Reload part of checkout on changed shipping method

So I added the following action to add extra content about ‘local pickup’ to the checkout page.

add_action( 'woocommerce_review_order_before_payment', 'my_custom_action', 20 ); 

When I change the shipping method I want to ‘reload’ the action to hide/show the content in case the shipping method is local pickup.

I’m not an expert on hooks or wordpress ajax… can’t figure this thing out

Possible to use master method on T(n)/g(n)=aT(n/b)+f(n)

The master theorem can be used in case of a recurrence relation of the form

1) $ T(n) = aT(\frac{n}{b}) + f(n)$

My question is whether it can be applied if

2) $ \frac{T(n)}{g(n)} = aT(\frac{n}{b}) + f(n)$ .

My gut feeling is that is should be possible: just solve equation 2 by solving equation 1, and then multiply the asymptotic bound I receive by $ g(n)$

I just can’t prove it

Purpose of OPTIONS method

I’ve been seeing OPTIONS method on my web server logs, when I googled about that stuff it says the its responsible for handling request from Same Source Origin policy. So I tried to access our site and sniff through wireshark to see if I can see the OPTIONS method by filtering it. However i cannot see it on the traffic why is it?

Recurrences and Table/Tree Method

Use the tree and table method to compute the Ī˜ time complexity for š‘‡(š‘) = 4š‘‡(š‘ āˆ’ 5) + 7. Assume T(N) = 7 for all 0ā‰¤Nā‰¤4. Assume N is a multiple of 5. Fill in the table below and finish the computations outside of it.

I tried figuring it out, but this example hard haha.

How can I predict javascript Math.random method given integers?

I know this is possible because people have mentioned doing it. Given the XorShift128+ algorithm, how can I predict the next numbers given 15 integers generated through Math.floor(Math.random() * (max - min +1) + min). I have tried modifying this script https://github.com/TACIXAT/XorShift128Plus into this https://gist.github.com/jgc37/6456222408f17a874bd4bdd8e6923771, however my code doesn’t work and is stuck solving infinitely. Any help would be appreciated.

Is destructuring a heap (taking down a heap) also O(n) like building a heap? If so, can the selection problem be solved by this method in O(n) time?

If we can build up a heap with time O(n), can we take down a heap also by O(n)? (by delete-max repeatedly).

Intuitively, it may feel it is, because it is like the reverse of build it up.

If building a heap is O(n) in the worst case, including the numbers are all adding by ascending order, then taking the heap down is exactly the “reverse in time” operation, and it is O(n), but this may not be the “worst case” of taking it down.

If taking down a heap is really O(n), can’t the selection problem be solved by building a heap, and then taking it down (k – 1) time, to find the kth max number?

Iterative-substitution method yields different solution for T(n)=3T(n/8)+n than expected by using master theorem

I’s like to guess the running time of recurrence $ T(n)=3T(n/8)+n$ using iterative-substitution method. Using master theorem, I can verify the running time is $ O(n).$ Using subtitution method however, I arrive at a different answer than expected..

$ T(n)=3T(n/8)+n\ =3T(3T(n/8^2)+n)+n=3^2T(n/8^2)+3n+n\ =3^2(3T(n/8^3)+n)+3n+n=3^3T(n/8^3)+3^2n+3n+n$

We can see the pattern: $ 3^iT(n/8^i)+n*\frac{3^i -1}{2}$

The recursion finishes when $ i=log_8 n$ .

Substituting i into the discovered pattern, $ 3^{log_8 n}T(1)+n*\frac{3^{log_8 n} -1}{2} =\ n^{log_8 3}*c+0.5n*n^{log_8 3} – 0.5n =n^{log_8 3}*c+ 0.5n^{log_8 3+1}-0.5n \in O(n^{1.52})$ .

What am I doing wrong? why is my answer not $ O(n)$ ?

What’s a good method to obfuscating/packing exe’s built from Python for practice/deter amateurs?

I’m an amateur malware analyst/dev that works in IT and am practicing everyday on my own to improve my malware analysis skills. I built my own keylogger in Python and have compiled it to an executable using PyInstaller. To take it one step further, to practice reverse-engineering it for myself, I’m looking to pack/obfuscate the executable to hypothetically deter any normal person from reversing it. That, and especially learning more about obfuscating and packers in general from the programmer’s perspective and not so much the analyst’s.

What are some good methods/utilities for this regarding Python executables? I’m aware of the big boys like VMProtect, but that is obviously way out of the scope for what I’m looking to do. This isn’t actual code that will be used as it’s all for learning purposes, so something simple does the job just fine.

Minimization of DFA, Table Filling Method or Myhill-Nerode Theorem

I want to know, what if the DFA is merged states. So if my DFA starts with q0 and then have (q0,q1) state it goes to with an ‘a’ for example. How do I do the table filling method.

I tried to rename the merged state, for example turning (q0,q1) to q4 for example. But then the issue is when I try to do the table filling. With the input in the Automaton, I get only one state, sometimes the final state. So do I mark it.

For example, I renamed (q0,q1) to q4. Now in the table, if I want to find out the marking for q0 and q4. With an ‘a’ I get q4,q4 for both of the state and with ‘b’ I get nothing from q0 and q2(final state) from q4. I know since q4,q4 does not exist I do not mark. But I only get one state, which happens to be the final state. Do I mark q0,q4 part of the table or do I leave that blank aswell

AI – Heuristic method

I am trying to code a n puzzle solver. I am currently trying to think of heuristics for A* search. The heuristics I have currently came up with are Manhattan distance, max swap and Hamming distance. Is there any other (preferably more efficient) heuristic I may use?