Hreflang and canonical problem on session parameters

We have a oxid onlineshop with different domains/subdomains depending on currency and language.

Now we have a problem with hreflang tags, because of parameters

1) the session of the basket between domains is set by ?force_sid=(random string for session id)

2) for different views in categories like ?ldtype=grid&_artperpage=100&pgNr=0&cl=alist&searchparam=&cnid=3ae4a2e1dd7501139.35363255

if the url is accessed without the parameters then the canonical and hreflang tags are correct.

If the parameters are set then the canonical and hreflang tags are wrong.

What are the correct tags for example: www.example.de/category-name/?force_sid=e9k6p7d5dbpcu3s41p22tbll71 ?

We have:

<link rel="canonical" href="https://www.example.de/category-name/"> <link rel="alternate" hreflang="x-default" href="https://www.example.de/category-name/"> <link rel="alternate" hreflang="de" href="https://www.example.de/category-name/"> <link rel="alternate" hreflang="de-CH" href="https://www.example.ch/category-name/"> <link rel="alternate" hreflang="fr-CH" href="https://fr.example.ch/category-name/"> <link rel="alternate" hreflang="de-AT" href="https://www.example.at/category-name/"> <link rel="alternate" hreflang="fr" href="https://www.example.fr/category-name/"> <link rel="alternate" hreflang="en" href="https://www.example.com/category-name/"> <link rel="alternate" hreflang="es" href="https://www.example.es/category-name/"> 

How to tackle Big O proofs that involve multiple parameters

I am getting more and more familiar with the whole concept of time complexity but I have never encountered an example where more than one parameter is involved. Therefore, is it possible(well, I am sure it is :”)) and how to prove

a^n = Θ(logn)

or any other, similar-looking expression?

c1 * logn ≤ a^n ≤ c2 * logn

where, e.g. c1 = 1 and c2 = 2,

logn ≤ a^n ≤2 * logn.

Can I go one step further and set n, to be equal e.g. 2? This way I will get

log(2) ≤ a^2 ≤ log(4)

Which is surely true(for a between ~ 0.55 and 0.77)…

…but isn’t that too specific and interfere with the inequality too much? Sorry if the answer is trivial but Google is not helping and I have nobody to ask for explanation.

How to use Mathematica to prove that isotropic materials have only two independent parameters

Posts on related issues can be found from here or here.


Index symmetries:

A stiffness tensor $ C$ is a fourth-order tensor with components $ c_{ijkl}$ which maps symmetric second-order tensors into symmetric second-order tensors, i.e., $ \sigma_{ij} = c_{ijkl} \varepsilon_{kl}$ (linear elastic law), $ \sigma$ (stress) and $ \varepsilon$ (strain) being arbitrary symmetric second-order tensors. Due to the symmetry of the second-order tensors, $ C$ is allowed to be minor symmetric, i.e., $ c_{ijkl} = c_{jikl} = c_{ijlk}$ . The not minor symmetric part of $ C$ is irrelevant for the elastic law and is dropped. If the stress $ \sigma$ is to be related to an elastic energy potential $ W$ (referred to as hyperelastic behavior), i.e., $ \sigma = \partial W / \partial \varepsilon$ , then, due to Schwarz’s theorem, the stiffness tensor $ c_{ijkl} = \partial^2 W / \partial \varepsilon_{ij} \partial \varepsilon_{kl}$ has to possess the major symmetry, i.e., $ c_{ijkl} = c_{klij}$ .

Material symmetry:

A material with stiffness $ C$ is said to possess the material symmetry group $ G$ (e.g., triclinic, orthotropic, transversally isotropic, …) if

\begin{equation} C = Q \star C \qquad Q \in G \end{equation}

holds, where $ Q$ are second-order tensors, referred to as symmetry transformations of $ C$ . The product $ \hat{C} = Q \star C$ (referred to here as Rayleigh product) is defined in components as

\begin{equation} \hat{c}_{ijkl} = Q_{im}Q_{jn}Q_{ko}Q_{lp}c_{mnop} \end{equation}

For solids, $ G$ is a subset of the orthogonal group. In solid mechanics, if suffices to consider rotation matrices $ Q$ from the rotational group $ SO(3)$ . If $ G = \{I\}$ , $ I$ being the identity matrix, then $ C$ is said to triclinic. If $ G$ possesses more than the identity transformation, then different material classes can be defined (different anisotropy types). If $ G = SO(3)$ , the $ C$ is said to be isotropic (no direction dependency).


I want to use Mathematica to get the number of independent parameters needed for the fourth-order tensor to make $ C = Q \star C (Q \in SO(3))$ under the rotation of group $ SO(3)$ .

At present, I can only get 30 independent variables using the following method:

SymmetrizedIndependentComponents[{3, 3, 3, 3},    Symmetric[{1, 2, 3}]] // Length 

However, I still can’t use the rotation of group $ SO(3)$ to further reduce the number of independent variables. What should I do?

Impact of query parameters on SEO for a single page application

Might crawlers visit a page if there is no link referencing this page anywhere but a URL to this page is generated client side with JavaScript ?

Context:

Let’s say I have a SPA with Server Side Rendering. Some pages show a list of items and offer a filtering facility. When the user selects some options or fills in some input field to filter the list, I’d like to embed this information in the URL (eg. /items?sort=price&order=desc&q=something) via the history API (client side routing). Behind the scene, an API call is made to get the results.

Since I do SSR, the server will also be able to understand these URLs and render these pages (hence the user can bookmark the page or share it). But nowhere in the HTML pages these URLs will appear, there are only generated client side in response to user events.

In this context, I think crawlers won’t know these pages exist, and so, they should have no impact on SEO. Even if crawlers are now able to run JavaScript, they don’t use it to simulate user events.

Am I wrong ?

(I guess if someone shares publicly that kind of URL, it could suffice to make this page crawled ? In any case, what I’m worried about is the cost on the crawling budget if all these pages are visited, but I’m ok with a few pages being crawled, they could be marked as “noindex” for instance).

Will irrational parameters make a problem not well-defined on complexity

Given a set $ 𝑁=\{𝑎_1,⋯,𝑎_𝑛\}$ where all $ 𝑎_𝑖$ s are rational positive numbers and $ \sum_{i\in N}a_i=1$ , find a subset 𝑆⊆𝑁 such that $ (\sqrt{2\sum_{i\in S}a_i}-1)^2$ is minimized. Does the appearance of √ make the problem ill-defined with regrading to complexity? If well-defined, it is NP-hard, right?

Converting a function with single parameter to a function with multiple parameters

I have been solving some algorithm questions recently and a pattern I have observed in some problems is as follows:

Given a string or a list, do an aggregation operation on each of its elements. Here in each of these elements we apply some recurrence to solve it.

An example of one such problem is below.


Problem: Given n integers return the total number of binary search trees that can be formed using the n integers

To solve this problem, I define a recurrence relation as follows:

f(n) = 1 // if n = 0 f(n) = ∑ f(i) * f(n-i-1) where 0 <= i <= n-1 

This works and I get the correct answer however I want to modify the function a bit.

Instead of expressing the function in terms of f(n) I want to express it in terms of f(n, i) so I can remove the summation. However I am unable to do it correctly.


Code

My code to solve the problem by defining the recurrence in terms of f(n) is as follows: (I am aware it can be optimized by DP but that is not what I am trying to do here)

public int f(int n) {     if(n == 0)         return 1;      int result = 0;     for(int i = 0; i< n; i++)         result += f(i) * f(n-i-1);     return result; } 

I want to remove that for loop and instead express the function in terms of f(n,i) instead of f(n).


Question

  1. How to convert the recurrence shown above from f(n) to f(n,i) and remove the summation?
    • Here ‘n’ is the size of the list of element and ‘i’ is the ith element in the list that we choose to be the root of the tree.

Training with GPU and tuning parameters with ParallelTable

We intend to train a neural network. It has a hyperparameter, such as the learning rate. We want to compare the training results of different hyperparameters. Our computer has two multi-core CPUs and an NVIDA GPU. We want to train with GPU and adjust parameters with ParallelTable. The results show that the utilization of GPU and CPU is very low, which is no different from using Table. May I ask: Is it possible to improve the utilization of GPU and speed up the parameter adjustment? The code is illustrated as follows:

net=NetChain[{LinearLayer[], LogisticSigmoid}]; data = {1 -> False, 2 -> False, 3 -> True, 4 -> True};  AbsoluteTiming[  ParallelTable[NetTrain[net, data, All, MaxTrainingRounds -> 1000,    TrainingProgressReporting -> None, TargetDevice -> "GPU",     LearningRate -> c], {c, 0.1, 0.2, 0.1/200}];] 

Hydra HTTP Form Post with parameters containing a colon “:”

I’m trying to brute force login on my domain using THC Hydra v9.1-dev. It is using an ASP.net form and some of the required post body parameters contain a colon : in them which is the separator used by Hydra. An example parameter: _ctl0:PlaceHolder:LoginName:txtLoginUsername=^USER^.

This makes hydra think that I have _ctl0 as the first part and Placeholder as the error message.

I tried:

  • URL encoding them, e.g this becomes: _ctl0%3APlaceHolder%3ALoginName%3AtxtLoginUsername=^USER^
  • replacing : with a \:
  • placing the parameter in quotation marks ""

but none of them worked and I can’t seem to find a way to change the separator.

Any help is much appreciated!