Using CSS, how can I remove a Woocommerce grid from a specific page that has ::before & ::after inserted in it

The specific page ID is 6329

I have tried different variations of the CSS below, but still can’t get it to work!

CSS used:

.page-id-6329 .products.columns-3 {
display: none !important;
}

and other variations on the same lines with no success. I think it has to do with the ::before and ::after, but have no idea how to write the CSS.

I am setting up a website that caters for retail and wholesale. The retail will show the normal category grid to the user, while the wholesale will have a special page where a list of products shown in a table.
The wholesale page, as it is now, shows the category grid AND the table underneath. I just need to get the grid to disappear for that particular page.

Any help will be appreciated.
Thanks

powershell – How to check permissions per specific user for all sites in SharePoint Online

How can I check (create csv report) all permissions per specific user for ALL SharePoint site collection on SharePoint Online tenant?

Is there PowerShell script for that as I’m not aware of a report in SP Online admin centre..

I see there are scripts for SP2010/13 and I used before ControlPoint (Metalogix) to do so, but cannot find anything for SharePoint Online.

Your help is much appreciated!
Thanks!

url – How to intercept application specific MIME types used by 3rd party (Windows) browser/plugins apps?

I’m trying to intercept and decipher scripted code that is sent to a previously installed Windows application, after a user have clicked on a particular URL in their web browser which is somehow returning a MIME response that is intercepted by the Win app and processed as a script/program.

The particular example of concern, is how the (Windows) trading application Think-or-Swim (aka. TOS) is downloading and running user scripts from either a custom URL handler of the form: `tossc:XXXX` or using a standard URL like `http://tos.mx/A1PZUml` which then sends one of the MIME types:

``````x-scheme-handler/tossc
application/x-tossc
application/x-thinkorswim
``````

I have posted a similar question on SO here but I don’t think that forum is appropriate for this question and hope someone here would a have some more technical know-how of how to do this and also explain what’s going on. As you can tell I am probably not even using the correct language for asking the question in a clear manner. So feel free to correct me or this post.

Q: How can I intercept and inspect code that is loaded in this way?

(Hoping to also learn what is going on and how this is done, or an be done, by e.g. python?)

performance – Creating a specific distribution of random numbers in Powershell

I originally posted this on StackOverflow but was requested to post it here instead as it relates to optimization/performance of the code rather than a specific problem.

TL;DR: Get-Random produces an even distribution of numbers where every number in the pool has an even chance of appearing. I’m looking for a way to generate random numbers where every individual number appears with a frequency that I myself specify.

If I run

``````for(\$i=1;\$i -le 1000;\$i++){
Get-Random -Minimum 0 -Maximum 10
}
``````

I get a very evenly distributed count for each number (roughly 100 for each number between 0 and 9). Using Get-Random allows me to get a random number every time but on average, every individual result will appear roughly an equal amount of times. I want to decide the frequency for how often any specific number appears, and then generate random numbers that fit that distribution. As an example:

``````Number   Probability
0        10
1        11
2        19
3        12
4        3
5        10
6        6
7        7
8        4
9        18
``````

I’m looking for a way to use the above list to randomly generate a number between 0 to 9, but with the probability of each individual number appearing using the Probability column.

My very hard-coded and not so generic solution so far is that I thought of doing something like adding a cumulative percentage column:

``````Number   Probability   CumulativeProbability
0        10            10
1        11            21
2        19            40
3        12            52
4        3             55
5        10            65
6        6             71
7        7             78
8        4             82
9        18            100
``````

And from here, run the object through a filter. Something like:

``````\$RandomNumber = Get-Random -Minimum 0 -Maximum 100
\$MyProbabilityObject | Where-Object {\$RandomNumber -ge \$_.CumulativeProbability}
``````

This gives me all numbers with a lower Cumulative probability than the random number. Let’s say the \$RandomNumber was 42, that would result in:

``````Number   Probability   CumulativeProbability
0        10            10
1        11            21
2        19            40
``````

From here, I could pipe the result to

``````Select-Object CumulativeProbability | Measure-Object -Property CumulativeProbability -Maximum
``````

Which gives me the highest value, and then use that column as a reference to find the number with

``````Where-Object {\$_.CumulativeProbability -eq \$TheNumberIGetAbove}
``````

While this kinda works, it feels like I’m doing several laps around a problem that should be easier and more straightforward to solve. Are there any better ways of generating random numbers that fit a distribution you specify yourself instead of using an even distribution such as Get-Random?

sensor size – Focal length for a specific distance?

I have the following information:

``````s: Image sensors dimensions: 6.00mm, 4.80mm, 3.60mm (diagonal, horizontal, and vertical)
f: focal length range: 5.1mm - 51mm
f=(s*WD/FOV), where `WD` is the working distance and the `FOV` is the object size.
``````

I would like to compute the optimal f for a given `WD=10m` and `FOV=1mx1m`.

Which sensor dimension should I choose (diagonal, horizontal, or vertical)? Since the results differ quite heavily depending on that.

Thanks

pygame – How do I click on specific text in an array of text?

I am trying to click on a specific word in an array but I can’t think of how.

This is what I have:
for x in range(0, len(names)):
templine = font.render(names(x), True, WHITE)
tempRect = templine.get_rect()
tempRect.midleft = (50, (170+30*x))
if mouse012(0) == True and tempRect.collidepoint(mouseXY):
state = AppState.STATS

``````      detailsName = names(x)
screen.blit(templine, tempRect)
``````

docker – Messaging specific microservice

We have a system where we will be scaling a docker container programatically using the Docker API and assigning each instance a unique name ie inst0001..inst9999. We could have thousands of these instances.

Another manager container would do the scaling and keep track of all instances. What we would like to know is how we could communicate with a specific instance. We need to do asynchronous communication. Do we use a message broker? We wouldn’t really want a queue for each instance.

Thanks

turing machines – Specific undecidable language

Let $$K = {langle W rangle: W text{ est Turing-Machine (working of the alphabet } {a, b, c}text{) and }$$ $$L(W) text{ contains at least one word where there’s no a}}$$

I know that I can suppose that $$K$$ is decidable (contradiction) and show that $${〈M, w〉: M text{ is Turing Machine and M accepts w} }$$ is also decidable (which is a contradiction). I just don’t know how to continue. Can you help from here?

turing machines – Decidable specific language

Let the language $$K = {langle W rangle: W text{ is a deterministic finite automaton (operating on the alphabet }{a, b, c})$$
$$text{ and } L(N) text{ contains at least one word in which there is no a}}$$. I would like to show that the language here is Turing-decidable. I think I have to show that there exists a Turing-Machine $$W$$, give $$w$$, which will halt and accept if $$w$$ is accepted by $$W$$ and halt and reject if $$w$$ is not accepted by $$W$$.

Is it sufficient to define $$W$$ as follow :

1. Input $$w$$;
2. Simulate the computation of $$W$$ on $$w$$
3. If the accepting state is final after reading at least one $$b$$ or one $$c$$ or both, then halt and accept $$w$$.
4. Otherwise, halt and reject $$w$$

I think if $$W$$ is a DFA, $$L(W)$$ is a regular language, so it has a pumping length $$p$$ that is at most the number of states in $$W$$. Using the pumping lemma to explain why $$M$$ need only test words in $${a,b,c}^∗$$ whose lengths are less than $$p$$ in order to ensure that if $$L(W)$$ contains at least one word with no $$a$$‘s, $$M$$ will find one. Can I use that? If so, how? I am a bit stuck right now.