I'm having a problem to add a directory to the PATH environment variable in Windows XP via command line. I've no issue doing this via GUI. I just want to do it in CLI. I know this OS is EOL, but this for testing purposes only. Default PATH C:\&gt;path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem  C:\&gt;  An attempt to set it via CLI C:\&gt;set PATH=%PATH%; C:\Program Files\7-Zip\  C:\&gt;  Looks fine, it's there. C:\&gt;path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem; C:\Program Files\7-Zip\  C:\&gt;  However, it didn't really work as expected. 7z program is located in C:\Program Files\7-Zip\ directory. C:\&gt;7z '7z' is not recognized as an internal or external command, operable program or batch file.  C:\&gt;   C:\&gt;cd &quot;c:\Program Files\7-Zip&quot;  C:\Program Files\7-Zip&gt;7z  7-Zip [32] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Questions about    setting environment variables the PATH   are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this.  So the question is: What are environment variables, like the executable PATH, and how can I change and use them on major operating systems?  A good answer would include a simple explanation of what environment variables and especially PATH mean to the OS, as well as simple guidelines on how to set and read them accordingly.
Trouble downloading packages list due to a "Hash sum mismatch" error When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead. Can't pair apple wireless keyboard Keyboard: Apple Wireless Keyboard (model number MC184LL/B)  System: Macbook Pro Early 2011 running OS X 10.8  The keyboard gets detected and when I try to pair it, the system asks to enter some numbers through the keyboard.   However when I press the key (on the wireless keyboard) nothing happens, the only key that seems to work (i.e. to move to the next key in the code) is 0. I can also press enter to confirm but it always fails (since the only code I can enter is 0000...0).   I've also tried pairing from the bluetooth preference and changing the passcode option. However this won't work either.   Any ideas? The keyboard was paired with another MacBook Pro (I don't have access to it anymore). Is there any method to 'reset' the keyboard to factory settings? Quantify Difference/Distance between Lognormal distributions I am trying to determine a metric that quantifies the distance between two continuous lognormal distributions. The data is actually a mixture of two lognormal distributions (I am not sure if this can be called bimodal). The individual distributions have different means but the same standard deviations. I have 20 data sets that can be divided into 4 groups, with each group having a constant standard deviation, but the 5 data sets in each group are made up of two distributions with different means. Some examples:      I am in search of a metric that accounts for the contrast (difference in means) and the standard deviation. I have tried out some parameters like coefficient of variation (of the mixture), Ashman's D etc. I have also tried percentage of overlap. However the problem always is that, at the end when plotted against the results I end up with 4 trend-lines again, corresponding to the 4 different standard deviations. Is there some other way I can quantify this?  Just to make myself clear, I want to quantify the difference between two distributions in a single case (between the red and green PDFs in the above image). I'm having trouble distinguishing between the concepts of scedasticity and stationarity. As I understand them, heteroscedasticity is differing variabilities in sub-populations and non-stationarity is a changing mean/variance over time.   If this is a correct (albeit simplistic) understanding, is non-stationarity simply a specific case of heteroscedasticity across time? Center of mass in a straight rod I got an assignment to prove that in a straight homogeneous rod, you can always choose a coordinate system in such a way that  $$\int_S x_1 \, dx_1 \, dx_2=0 $$  $$\int_S x_2 \, dx_1 \, dx_2=0 $$  $$\int_S x_1x_2 \, dx_1 \, dx_2=0$$  where $S$ is the cross section of the rod  Now, intuitively, I can understand that the first two expressions basically state that if you find the mass center of the rod, then all you have to do is to put the origin of the coordinate system in the mass center, and the integrals turn out to be zero. What I'm curious about is whether or not this is a good enough of an explanation, and also, a hint on how to obtain the third equality. Every proper ideal is contained in a maximal ideal, in a commutative ring with identity. The statement is:     In a commutative ring with 1, every proper ideal is contained in a maximal ideal.   and we prove it using Zorn's lemma, that is, $I$ is an ideal, $P=\{I\subset  A\mid A\text{ is an ideal}\} $, then by set inclusion, every totally ordered subset has a bound, then $P$ has a maximal element $M$.  My question is why $M$ must contain $I$? Seems that I just proved $2=4$. What is "the ground"? What are the similarities/differences between the behaviors of Quantum particles and bouncing droplets? I am trying to find all directories in a folder recursively while exclude all git submodules  by excluding all path containing .git file. How could I do it?     Explanation:  .git file exists at the root of every submodules folder. This submodule folder could be included anywhere.    Test Case  $ mkdir Test $ cd Test $ mkdir a $ mkdir b $ mkdir c $ cd a $ mkdir .git $ cd .. $ cd b $ touch .git $ cd .. $ cd c $ mkdir c1 $ mkdir c2 $ cd.. $ find . -type d \( \( ! -name . -exec [ -e {}/.git ] \; -prune \) -o \( \( \  -name .git\  -o -name .vscode\  -o -name node_modules\  -o -name Image\  -o -name Rendered\  -o -name iNotebook\  -o -name GeneratedTest\  -o -name GeneratedOutput\   \) -prune \) -o -print \) | sort    Expected Results  . ./a ./c ./c/c1 ./c/c2 Error - SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM I've been using this piece of code I've written and it's working in this most unclear manner. I wish to insert a row into the database which includes two columns of DateTime:  myrow.ApprovalDate = DateTime.Now myrow.ProposedDate = DateTime.Now   And yet, when I update the database I receive this error:     SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.    I've even tried copying an inserted value from the database and hard code it into the object being updated:  // I copied this value from the DB myrow.ApprovalDate =  Convert.ToDateTime("2008-12-24 00:00:00.000");   Still same error, the strange part is that the above trick worked for the first insert to the DB but failed from there on. Any ideas what's going on? How do I check if an array includes a value in JavaScript? What Percentage Makes Someone a Half-blood? Reading Excel files from C# Which is correct? - "Guess, what it is?" or "Guess, what is it?" I want to know which sentence is correct. If i say     Guess, what it is?   or     Guess, what is it?   which one is correct? Remember all opened files with split windows and their positions in Emacs How to find string position within another string in C recursively? Story about encounter with hostile aliens This is a short story I read in the late 80s or early 90s in an anthology or collection.  Here are the plot points I remember:   A human spaceship encounters a ship with hostile aliens (HA). There may be friendly aliens (FA) on board the human spaceship A human (or perhaps FA) telepath scans the HA and finds they are hostile and bent on conquest of other races The captain and crew decide on a bluff: pretend they are from a large federation of many species, one so big the HA will become discouraged and drop their plans of conquest They invite one or more HA on their ship To pretend that there are many (more) races in their federation, they do things like put a fake control panel in the ships aquarium and claiming the fish in them are one of the races in their federation The HA can't conceive of multiple races cooperating and are convinced there must be some race on top controlling it all. If not, they can just be conquered one at a time This goes on for a little while until, seeing their plan isn't working (via their telepath) the humans change their plan so that when      the ship's cat (so far unseen by the HA) walks in the room, one of the humans loudly calls "The CAT!" causing everyone to stand rigidly at attention while the cat walks around more or less ignoring everyone and everything the way cats do. Having seen the "top dog" and the rigid discipline and fear he instills in everyone else, the aliens "realize" the humans are deluded into thinking all races are equal members in their 'federation", the cats are really in control of a huge empire, and they should not be messed around with. Changing Vim indentation behavior by file type Could someone explain to me in simple terms the easiest way to change the indentation behavior of Vim based on the file type? For instance, if I open a Python file it should indent with 2 spaces, but if I open a Powershell script it should use 4 spaces. Creating a large amount of convex polygons using existing coordinates