I am trying to customize the html in theme/woocommerce/layout-products/grid.php, I have copied the file from parent theme to theme-child/woocommerce/layout-products/grid.php but without any effects.  From the answers I found here I understand that sometimes copying the php file works, sometimes not?  I also tried the require_once for this file but this breaks the whole WordPress. How can I customize the product grid html?
Basically, I'm trying to override some files of the Uncode theme. But this is not a theme-specific question: it can be applied to any theme. The Uncode theme has a custom dir 'partials' (/uncode/partials/) that contains some layout elements. On my child theme I created a 'partials' folder as well (my-child-theme/partials), but the inner files seem not to be overridden. Is it normal? WP docs say that any file of the same name should be overridable, but is seems that's not true. Am I doing something wrong?
Using Process.Start() to start a process as a different user from within a Windows Service I'd like to periodically run an arbitrary .NET exe under a specified user account from a Windows Service.   So far I've got my windows service running with logic to decide what the target process is, and when to run it. The target process is started in the following manner:   The Windows Service is started using "administrator" credentials. When the time comes, an intermediate .NET process is executed with arguments detailing which process should be started (filename, username, domain, password). This process creates a new System.Diagnostics.Process, associates a ProcessStartInfo object filled with the arguments passed to it, and then calls Start() on the process object.   The first time this happens, the target process executes fine and then closes normally. Every subsequent time however, as soon as the target process is started it throws the error "Application failed to initalize properly (0xc0000142)". Restarting the Windows Service will allow the process to run successfully once again (for the first execution).  Naturally, the goal is to have target process execute successfully every time.  Regarding step 2 above: To run a process as a different user .NET calls the win32 function CreateProcessWithLogonW. This function requires a window handle to log the specified user in. Since the Windows Service isn't running in Interactive Mode it has no window handle. This intermediate process solves the issue, as it has a window handle which can be passed to the target process.  Please, no suggestions of using psexec or the windows task planner. I've accepted my lot in life, and that includes solving the problem in the manner stated above. What's the smallest positive integer which is divisible by all integers $1, 2, \dots, n$?  Is there a simple way to represent the answer?  Call it $f(n)$ here.   Clearly factorial ($n!$) satisfies the condition of divisibility.  But once you get to $f(4)$ (which is $12$), factorial ($24$) is too large, because it includes as factors both $4$ and $2$, which are redundant.  Multiplying all the prime numbers up to $n$ gives you another estimate, which is this time too low, because you need to include primes multiple times when they're repeated in the factorization of the inputs.  So the answer is somewhere between factorial, and the product of primes.  Is there a simple answer? Lazy Method for Reading Big File in Python? I have a very big file 4GB and when I try to read it my computer hangs. So I want to read it piece by piece and after processing each piece store the processed piece into another file and read next piece.  Is there any method to yield these pieces ?  I would love to have a lazy method. iOS app blocking actions with "you must join this site" message for sites I belong to Piping for loop output prevents local variable modification I'm trying to write a simple bash function that takes, as its arguments, a number of files and/or directories. It should:   Fully qualify the filenames. Sort them. Remove duplicates. Print all that actually exist. Return the number of non-existent files.   I have a script that almost does what I want, but falls down on the sorting. The return value of the script as it stands is correct, but the output is not (unsorted and duplicates). If I uncomment the | sort -u statement as indicated, the output is correct but the return value is always 0.  N.B. Simpler solutions to solve the problem are welcome but the question is really about why is this occurring in the code I have. That is, why does adding the pipe seemingly stop the script incrementing the variable r?  Here's the script:  function uniqfile {     local r=0       for arg in "$@"     do           readlink -e "$arg" || (( ++r ))      done #| sort -u    ## remove that comment      return $r } Auto incrementing field based on groups within feature class? I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec When installing or booting from USB flash drive screen goes blank When I was installing Ubuntu 11.10 64-bit on my new PC from a flash drive since the only computers I have do not have disk drives, I ran into a problem.  After the ASUS logo when switching on the PC, and pressing F8 to select the USB flash drive, there was the options thing as normal that allows me to select to either boot form the flash drive or install on the HDD, when I do either of these, there is a bunch of text on a black background, as I would expect, but after a few seconds the screen goes blank and the monitor says No signal.  I have previously installed Ubuntu with a flash drive to fix issues caused my Windows and ran into no problems.  Is it a problem with the pen drive I am using? Or maybe a problem with the system? I tried it in my USB 3.0 ports at the back and the USB 2.0 ones as well.  My Specs are:   &nbsp;&nbsp;AMD Phenom II x4 965BE &nbsp;&nbsp;ASUS AMD Radeon HD 6670 &nbsp;&nbsp;ASUS M5-L75 USB3 (typing this from memory, it's an AM3+ ASUS board with USB3.0 in the AMD700 chipet or something) &nbsp;&nbsp;Corsair XMS3 DDR3 4GB(2x2GB) 1333MHz RAM    I ran the memtest program on the flash drive as well, and it came out clean. So my teacher gave a pretty tough (for me) problem in class today: Does the series $$ \sum_{n=1}^{\infty}\frac {\sin{\frac 1 n}} {\sqrt n} $$ converge or diverge?  So far I've thought of trying the Comparison Test and Ratio Test but couldn't really get anywhere. Intuitively I think it should converge, but how do I actually show this? Am I being scammed by a sugar daddy? I met a guy on a sugar daddy dating site and we talked, I told him my situation and he said he would help.   He asked for my bank account information and I told him you can use cash app or PayPal to go through. He said his account manager deals with his finances. So I set up an account with a bank that I don’t use so that my primary account isn’t used.  Eventually he was in the process of sending me money and we had agreed on a amount that wasn't crazy. But then he asked for my address and I asked why and he said just wondering. Then said he wanted to send me a surprise for being his baby. Which I didn’t give.  Then later on he sent the money and said he sent me a bonus and that I was supposed to use that to pay his mothers caregiver, which he didn’t mention until after.  I kept questioning him and he was saying that he works in construction and he’s trusting me to carry out the errand. Then he said don’t let him down and I asked him if he was threatening me and he kept saying I need this done but didn’t really answer my question.  Am I being scammed? I’m about to change my password but is this a scam? How to change the light grey text that many web sites seem to use these days? Of late, I've noticed that many web sites seem to be using light grey text for many sections of their sites. Some such sections include - the text (link, usually) that shows in the status bar at the bottom of the browser when you hover the mouse over a link on their page, the indicator text in form fields to be filled in (e.g. the word "email" in the email address field), and many other elements on the page.  That light grey makes it much less readable.    Not sure whether is a new trend, or something to do with my browser settings (I haven't changed them lately, AFAIK), or Google Chrome, which is my browser. This is on Windows 7 running on a Dell Vostro laptop. I added the info about the laptop because I suspect the problem may even be due to my hardware settings, since I found the default brightness to be too high after I bought it, and changed it via Control Panel.  Would like to know what are some of the things I can check or change to solve this.  Thanks. The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by $\sum_{k=1}^{n-1} {n-1 \choose k-1} k^{k-2} (n-k)^{n-k-2}$.  I am unsure how to approach this question. Could someone guide me through the proof? If G is a spanning tree and it is disconnected then I know it is a spanning forest. Also, I know by Cayley's thm that there are $n^{n-2}$ nonequal tree on a vertex set V = {1, 2, ...,n} which is where i'm assuming the $k^{k-2}$ comes from but I do not understand where the rest of it is coming from. How do I read image files directly from a zip without extracting to disk? HTTP vs HTTPS performance Legend in tikzpicture the weak form of 'on' I am confused at whether or not there is a weak form at preposition's 'ON'. I've checked at some dictionaries at Cambridge and Oxford dictionary, they don't mention on the weak form's pronunciation. However, I, am a Japanese, checked at English-Japanese dictionaries, they mention on the weak form as /ən/.  For example, is there the difference of pronunciation between 'It goes on' and 'There is an apple on the table' in connected speech?  Does it exist?  Thanks Yuichi  *It's Edited This may be a very basic question.      Let $R$ be a commutative ring with unity (may be assumed to be an integral domain, if necessary) and $I$ be an ideal of $R$. Assume that $R/I$ is isomorphic to $R$. Does this mean $I=(0)$ ? Administrator URL '&' changed to '&amp;' How to set up a root cron job properly I tried to set up a root cron job to run a Bash script as root, to run at minute 7,37, every hour, every day of month, every month. This script is located in /usr/bin and named tunlrupdate.sh. It updates the DNS of Tunlr.  $ ls -l /usr/bin/tunlrupdate.sh  -rwxr-xr-x 1 root root 2133 Sep 24 15:42 /usr/bin/tunlrupdate.sh   This Bash script is available .  When invoked the script writes what's happening in a log located in /var/log/tunlr.log  To add this root cron job I used the standard for root's crontab  sudo crontab -e   And inserted these 2 lines at the end. I expect cron to run the script as root.  # check for updated Tunlr DNS every 30 minutes at the hour + 7 mn and hour + 37 mn 07,37 * * * * root /usr/bin/tunlrupdate.sh   A later command sudo crontab -l confirmed that the cron job has been inserted.  I did reboot Ubuntu and was checking in the log file if the cron job was launched properly. However there is nothing in the logfile /var/log/tunlr.log meaning the job was never successfully launched.  I did check that if I run the script from the command line  sudo /usr/bin/tunlrupdate.sh   then the logfile is updated accordingly.  Why is this cron job not running as planned in my system?  UPDATE 1 : All the proposed solutions so far do not work. I thank Olli for a CLI to list the system log sudo grep CRON /var/log/syslog. However I did get a CRON error  CRON[13092]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] &amp;&amp; [ -d /var/lib/php5 ] &amp;&amp; find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php /maxlifetime) ! -execdir fuser -s {} 2&gt;/dev/null \; -delete)   with the suggested PATH= insertion &amp; use of absolute path from root for functions in the script or without this suggested solutions here. I still get this error.  After some searching I pinpointed the error in the file /usr/lib/php5/maxlifetime as is explained : Change #!/bin/sh -e --&gt; #!/bin/sh -x  Then listing the CRON error log in my system  sudo grep CRON /var/log/syslog Feb 11 18:07:01 Marius-PC CRON[14067]: (root) CMD (root /usr/bin/tunlrupdate.sh) Feb 11 18:07:01 Marius-PC CRON[14066]: (root) MAIL (mailed 1 byte of output; but got status 0x00ff, #012)   I still don't get the bash script executing. This time no error is shown in the log. To get assurance this was not the content of the script I reduced the script to the following 3 lines:  #!/bin/bash LOGFILE=/var/log/tunlr.log echo $LOGFILE &gt;&gt; $LOGFILE   I still don't get the cron job through. Nothing is written in the log file. So even may be an empty script will not run in cron ? I don't get it. I am know trying a script reduced to these 2 lines:  #!/bin/bash exit 0   And still the same error log. The cron script does not go through ... Why "be king", not "be a king"? I've heard people say "be king" (as in "I can't wait to be king") in movies and TV. Why don't they say "be a king"? Which is correct? How to correctly assess the correlation between ordinal and a continuous variable? I'd like to estimate the correlation between:  An ordinal variable: subjects are asked to rate their preference for 6 types of fruit on a 1-5 scale (ranging from very disgusting to very tasty) On average subjects use only 3 points of the scale.  A continuous variable: the same subjects are asked to quickly identify these fruits, which results in an mean accuracy for the 6 fruits.   Is Spearman rho the best method to analyze these data and/or are there other good methods I could consider?