Add Subcategorie to woocommerce url structure

im trying to build my Shop URL with woocommerce like this example:

www.demo.de/category/subcategoryname/productitle

so

www.demo.de/dogs/bowl/cool-bowl

i tried several values in the custom url structures of wordpress like this

%category%/%product_cat%, %category%/%product_cat%/%postname%, %product_cat%/%product_cat%, shop/%product_cat% 

but none of those worked. How can i show the category and subcategories in my woocommerce links?

How to structure a multilingual site?

On my Drupal 8 site, I activated the French and English language.

See the 3 available URLs for languages :

https://www.example.com (in french)  https://www.example.com/en (in english)  https://www.example.com/fr (in french) 

The following 2 URLs are interpreted as duplicate content :

https://www.example.com (in french)  https://www.example.com/fr (in french) 

Then I use only the following URLs and delete the other from the index :

https://www.example.com/en (in english)  https://www.example.com/fr (in french) 

Why Google index the 2 urls french while there is a redirrectin 301 ?

enter image description here

enter image description here

enter image description here

Give a list of a from area code and to area code and a distance between them,which data structure?

What data structure i can use to lookup given a fromCode and toCode apart from hashMap which results in more number of entries in the memory. We are ok with log(n) efficiency also. Example data:

fromCode    toCode  distance 100          200     10 100          300     20 -----      ----     ---- 

Assume fromcode and tocode are some integer values and you might get sorted data as well.

Quantum Hamiltonian reduction and Quantum Airy structure

I have been reading Kontsevich and Soibelman’s “Airy structures and symplectic geometry of topological recursion” (https://arxiv.org/pdf/1701.09137.pdf) and having trouble understanding their Section 7.2 on Quantum Hamiltonian reduction. In particular, I’d like to understand how to compute $ \psi_{\hat{\mathcal{B}}}$ .

The following is what I think the paper says: Let $ (W, \omega)$ be a symplectic vector space, $ G\subset W$ a coisotropic subspace ($ G^\perp \subset G$ ) and $ L \subset W$ a Lagrangian submanifold. Given a point $ x \in L \cap G$ such that $ T_xL + T_xG = T_xW$ then $ \mathcal{H} := G/G^\perp$ is a symplectic vector space and $ \mathcal{B}_x := L_x \cap G \hookrightarrow \mathcal{H}$ is embedded as a Lagrangian submanifold (I interpreted the germ $ L_x$ as ‘small neighbourhood of $ L$ around $ x$ ‘, which is probably wrong?). Then $ G$ is naturally embedded into $ \mathcal{H}\times \bar{W}$ , where $ (\bar{W},\omega) = (W,-\omega)$ as a Lagrangian subspace. Let the coordinates of $ W$ be $ (q,p)$ and the coordinates of $ \mathcal{H}$ be $ (q’,p’)$ . From general theory (Section 2.4?) we have the wave function $ \psi_{G}(q,q’) = \exp(Q_2(q,q’)/\hbar)$ quantizing $ G$ where $ Q_2$ is a quadratic polynomial. Then the Hamiltonian reduction of $ L\subset M$ to $ \hat{\mathcal{B}}_x \subset \mathcal{H}$ at the level of wave functions becomes \begin{equation} \psi_{\hat{\mathcal{B}}}(q’) := \int \psi_{G}(q,q’)\psi_L(q) \end{equation} where $ \psi_L(q)$ is the wave function quantizing the quadratic Lagrangian $ L$ as studied in Section 2.4, 2.5.

My Attempts

  1. The only natural way I can think of to embed $ G \hookrightarrow \mathcal{H}\times \bar{W}$ is by writing $ G = T_x\mathcal{B}\oplus V$ , where $ V$ is a Lagrangian complement to $ T_xL$ , then embed $ G$ via $ T_x\mathcal{B}\hookrightarrow \mathcal{H}, V \hookrightarrow \bar{W}$ .
    However, this would mean I can write $ Q_2(q,q’) = Q_{T_x\mathcal{B}}(q’) + Q_W(q)$ . Evaluating the integral we would get $ \psi_{\hat{\mathcal{B}}} = \text{constant}\times \exp(Q_{T_x\mathcal{B}}(q’))$ . So $ \psi_{\hat{\mathcal{B}}}$ only going to quantize $ T_x\mathcal{B}$ in $ \mathcal{H}$ for a choice of $ x$ instead of the entire Lagrangian submanifold $ \mathcal{B}\subset \mathcal{H}$ as I would expect the result of this section to be about.

  2. Perhape the embedding $ G \hookrightarrow \mathcal{H}\times \bar{W}$ meant to be such that the image in $ \mathcal{H}$ is actually $ \mathcal{B}_x$ (and the image in $ \bar{W}$ is $ V$ ). If that is the case then $ G$ is embedded as Lagrangian submanifold not subspace (as stated in the paper). But then I’m still going to have $ Q_2(q,q’) = Q_{\mathcal{B}}(q’) + Q_W(q)$ where $ Q_{\mathcal{B}}(q’)$ is no longer just quadratic in $ q’$ and probably can be found using Section 2.4. But then I’m still going to have $ \psi_{\hat{\mathcal{B}}} = \text{constant}\times \exp(Q_{\mathcal{B}}(q’))$ which make me wonder why don’t I just directly quantizing $ \mathcal{B}_x \subset \mathcal{H}$ since the start instead of looking at $ G\hookrightarrow \mathcal{H}\times \bar{W}$ and do a quantum Hamiltonian reduction. Quantizing $ \mathcal{B}_x \subset \mathcal{H}$ directly seems difficult and I thought Hamiltonian reduction will help me with it.

Obviously, I have missed a lot of important things. If someone could help me understanding this section better or guid me to good references for quantum Hamiltonian reduction I would be really appreciated. Thank you.

Golang: Directory structure for Multiple Applications

I’m POCing a Go-app for my organization. I’ve read all of the intro docs on setting up a Go workspace, packages, etc. However, I am still unclear about the relationship amongst the recommended directory structures, packages, AND the fully-compiled applications that will eventually be deployed.

My team needs to be able to support many small, decoupled, applications –I am not sure how I can achieve this with the single-workspace-multiple-package approach, and would greatly appreciate clarification.

Thanks!

Migrate entire IMAP4 mail, including folders structure, to Gmail

When I am adding a new external IMAP4 server to Gmail I am offered an option to specify a label under which all mail from that server will be categorized in my Gmail account.

If I do so, will Gmail recreate entire folders structure under that label or will it put all fetched e-mails directly to that single label and I will be forced to optionally recreate folders structure manually?

I have 6610 e-mails, organized into 196 folders, to be imported to Gmail from external IMAP4 server. Will I have them imported organized or in “bulk” mode?

Work breakdown structure and activities on AOA

I have read some articles discussing how to go about work break down structure in different (sometime conflicting) ways.

In one example, suppose we have break down structure as follows: A, B (further broken down to B1 and B2), C, D (further broken down to D1 and D2).

Then A, C, B1, B2, D1 and D2 are used to draw the AOA graph.

[Question] Is this correct? Meaning, do the “leaf level” (if they may be called in this way) of WBS becomes activities that we draw on AOA?

In case there is some standard methodology of performing wbs I would be thankful for your suggestion.

Thank you in advance

How do i save a value onto a member of a structure inside a function using dynamic memory and pointers [pendente]

The error occurs when i try too save a value in items->reviews->user->id = 1 the program compiles and shows no errors only when i debug does it show a segmentation fault what am i doing wrong?

Defines and Structures

#define MAX_STR 100 #define MAX_TXT 1000 #define MAX_REV 100 enum tipo {FILME, SERIE, OUTRO}; struct utilizador{ unsigned long id; char nome[MAX_STR + 1]; }; struct review { struct utilizador* user; char texto[MAX_TXT + 1]; unsigned short score; }; struct item{ unsigned long id; unsigned int duracao, n_reviews; char titulo[MAX_STR + 1], descricao[MAX_STR + 1]; enum tipo tipo; struct review reviews[MAX_REV]; }; 

Functions

 int addReviews(struct item *items, unsigned int nitems ){  int i = 0; printf("OLA");    items = (struct item*)malloc(1 * sizeof(struct item));  if (items == NULL){     printf("Erro alocacao de memoria"); } else{     printf("seg fault");     items->reviews->user->id = 1;  }    printf("TRY"); return 0; } int contaReviews(struct item *items, unsigned int nitems, unsigned long id ){ int i,j = 0; items->reviews[i].user->id = 1; j = items->reviews[i].user->id; return j; } 

Main

int main (int argc, char** argv){ long res; struct utilizador* users; struct item* items;  addReviews(items, MAX_REV); res = contaReviews(items, MAX_REV, 1);  printf("%d", res);   free(items);   return 0;        } 

How to structure database for daily events?

I’m storing data which logs whether or not a user has logged their attendance for a given day. Some days are unimportant (holiday, weekend), so those are also stored.

The two requirements are that:

  1. Calculating the number of logs and missed logs can be done quickly, and
  2. The structure is scallable for whenever new users are added.

Right now it seems like I’m faced with two options for how the data should be stored, each with their own advantages/disadvantages:

Option 1: Two Tables

Table calendar – Tracks days to be not counted

date       | log | -----------+-----| 2019-01-10 | DNL | // "Do Not Log" - holiday etc. 2019-01-12 | NB  | // "Non-business day" 2019-01-13 | NB  | 

Table logs – Tracks successful attendance logs

user_id | date       | --------+------------|       1 | 2019-01-08 |       1 | 2019-01-09 |       2 | 2019-01-09 |  // It's implied that user #2 missed their log on Jan. 8 

Advantages:

  • Data is efficiently stored.
  • Tallying user logs and non-counting days is trivial.

Challenges:

  • Knowing how many days were missed is not obvious.

Option 2: One Table (What I’ve tried)

Table calendar – Tracks logs and days to be counted and not counted

date       | user_id | log  | 2018-01-09 |       1 |    1 | // Counted, logged 2019-01-10 |       1 |  DNL | // Not counted 2019-01-11 |       1 |   NB | // Not counted 2019-01-09 |       2 | NULL | // Counted, missed log 

Advantages:

  • A tally of days missed vs. days logged is trivial (used to calculate an overall percentage). The number of days in the calendar is explicit.

Challenges:

  • Adding new entries to the calendar is tricky, in the event that:
    • The calendar grows in length.
    • New users are added.
  • Table has gaps (wherever log == NULL), making traversal slower than Option 1.

My question is this: Is there a way to either use Option 1 and somehow encode the number of missed logs, or is there some other way of storing the data that meets both requirements? I’ve tried using Option 2, although scaling has become quite a challenge. Thanks in advance for any advice.

Structure of numbers in descriptive complexity

Descriptive complexity is a useful way to free yourself from computational considerations when studying complexity. One of those considerations is the encoding of the structures you are working on.

However, the way we usually see integers in descriptive complexity is exactly the same way we’re used to with Turing machines : $ n$ is an ordered set of $ \log_2 n$ elements, together with a unary relation that is true on the $ i$ -th element iff the $ i$ -th bit is 1 in the binary representation of $ n$ . This means we see integers exactly as their encodings.

Moreover, one of the main questions in descriptive complexity is Chandra-Harel conjecture, i.e. is there a logic for P on unordered structures. As such, is there a way to see integers as unordered structure ? Such a way should still ensure that the encoding of an integer is (at least poly-)logarithmic in $ n$ .