Problem combining -or and -exec with find command I'm finding that when I use find's -or operator in combination with -exec, I don't get the result I expect. When searching for .cpp and .h files, the command works as expected if I don't use -exec:  find . -name '*.cpp' -or -name '*.h' ./file1.cpp ./file1.h ./file2.cpp ./file2.h   However, when I use -exec, only the .h files seem to be passed:  find . -name '*.cpp' -or -name '*.h' -exec echo '{}' \; ./file1.h ./file2.h   It works fine when I use the more generalized approach for returning the result:  echo $(find . -name '*.cpp' -or -name '*.h') ./file1.cpp ./file1.h ./file2.cpp ./file2.h   However, I'd like to know what I'm doing wrong with -exec, as it's often more convenient. I'm using Mac OSX 10.9, but the same issue occurs in a Cygwin terminal. What's going wrong here? How can I make -exec work the way I want?
`find` with multiple `-name` and `-exec` executes only the last matches of `-name` When I'm using  find . -type f -name "*.htm*" -o -name "*.js*" -o -name "*.txt"  it finds all the types of file. But when I add -exec at the end:  find . -type f -name "*.htm*" -o -name "*.js*" -o -name "*.txt" -exec sh -c 'echo "$0"' {} \;  it seems it only prints .txt files. What am I doing wrong?  Note: using MINGW (Git Bash)
As a physics student, I have occasionally run across the gamma function  $$\Gamma(n) \equiv \int_0^{\infty}t^{n-1}e^{-t} \textrm{d}t = (n-1)!$$  when we want to generalize the concept of a factorial.  Why not define the gamma function so that   $$\Gamma(n) = n!$$  instead?  I realize either definition is equally good, but if someone were going to ask me to choose one, I would choose the second option.  Are there some areas of mathematics where the accepted definition looks more natural?  Are there some formulas that work out more cleanly with the accepted definition? Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval. Is the proposal creator guaranteed moderator status? When an Area 51 site goes into public beta is the person who created the proposal one of the pro tem moderators or not?  They are talking on Area 51 about combining all the sports proposals into , including one I proposed. Would I still be one of the pro tem moderators on the merged site?  Is the proposal creator afforded any elevated status or perk? How can one link / merge / combine / associate two accounts / users? (Anonymous / unregistered / cookie, or Google / Facebook / registered) I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit &quot;&quot; in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms) What is the safest way to move the iTunes Library from one hard drive to another? This may happen later with my iMac, but right now it is happening for my iTunes on PC.  The PC had 60GB of partition to install Windows 7, and right now it is down to about 2GB of free space.  All iTunes purchases, including Music and Movies, are downloaded to  C:\Users\mike\Music\iTunes\iTunes Media\Music  C:\Users\mike\Music\iTunes\iTunes Media\Movies   which will make the C: drive have less and less free space.  (and C: will be more healthy if it has at least a couple of GB of free space).  What is the safest, most proper way to migrate all the media to an external hard drive J: ?  On J:, the path might be:  J:\iTunes\iTunes Media\Music   or  J:\iTunes Media\Music   My guess is that we can change the folder in iTunes, but won't iTunes go to that folder or create it, and find nothing, and index everything wrong?  So, should an exact copy of C:\Users\mike\Music\iTunes\iTunes Media be made as J:\iTunes Media first (probably 30GB of files copying), and then start iTunes and change the preference for the folder to the J: one?  Is there a standard or official method to do this? How to put a full-width table at the top or bottom of the same two-column page as the reference text? Proof of the following inequality $ \frac{x - y}{\log x - \log y} > \sqrt{xy} $, $x>y$. I have seen the following inequality  $$ \frac{x - y}{\log x - \log y} &gt; \sqrt{xy} \ , \quad \forall x&gt;y $$ be stated as a near "obvious" fact in another , on the site.  The inequality is very cute, but so far I have not been able to prove it.  It reminds me of the Lipschitz inequality, but has some minor differences. Also Jensens inequality comes to mind. Is there something obvious I am missing, or is this ineqality not as easy to prove as it looks? Which is the correct sentence, if there is a correct one?     I use to be a hitman.        I used to be a hitman.   I've read the second sentence recently in a book, but I was sure it should be I use to be a hitman. Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to other group I'm currently working on a proof, but didn't get the right idea, a hint would be appreciated:  Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to $\mathbb{Z}/n \times \mathbb{Z}/n$  So, lets assume there is an isomorphism between these groups, my first idea to was to construct a contradiction with the homomorphism property. But I don't know how, there should be an element in  $\mathbb{Z}/n \times \mathbb{Z}/n$ which is not in $\mathbb{Z}/n^2$ to reach this kind of contradiction. Of course there is $n \in \mathbb{Z}/n^2$ which is not in the other group but I don't know if this helps.  Thanks Finding specific users by their location and a tag score Has 'Ubuntu Software' been renamed to 'Snap Store'? I updated Ubuntu last night (sudo apt get update &amp;&amp; sudo apt get upgrade) and to  my surprise this morning I didn't find the 'Ubuntu Software' app and there's a new entry called 'Snap Store' which when opened looks just like the old 'Ubuntu Software' app. So has 'Ubunu Software' been renamed to 'Snap Store'? And if yes, why? I want to unwrap a label which has a transparent area Can't transfer purchases from iPhone to iTunes in iOS 9 After upgrading to iOS 9, I can't transfer purchases from my iPhone to iTunes. It happens to just start the process, then it finishes without transferring anything. However, I can still transfer purchases from my iPad with iOS 8.4 like before.   iPhone 5c, iOS 9 iTunes 12.3 MacBook Pro 13" with Retina Display Mid 2014, OS X El Capitan   Apparently, not many people happen to use this "transfer purchases" feature so it didn't get any real attention. I used it a lot, I used to update my apps on my iPhone, transfer them to iTunes and updated my iPad apps using iTunes. Still, I can update my apps using iTunes and update apps on all my devices. True or false: {{∅}} ⊂ {∅,{∅}} Keyboard layout/language changes in every boot I have Ubuntu installed in my laptop, with Catalan language support and I have properly set up my keyboard to the Spanish layout. However, every time I start Ubuntu, the keyboard language/layout has switched to English (I think) and I have to select the correct disposition again ("Es"). The tray icon, though, always shows "Es" as the input language, which, by the way, is the only option available.   Is there a way to tell Ubuntu to properly configure the keyboard?  Edit: Once I login, I always change the language using the top-left button on the tray (see the "[Es]" icon in the picture below:) Can I use Wilcoxon Signed-Rank Test to test pairs of data in a time series? I have a dataset of measurements (non-normally distributed). Each line of this dataset is composed of two measurements of the same variable at a specific time (i.e. XYY [time, meas1, meas2]). This dataset contains 24 lines.  Is it correct to use the Wilcoxon Signed-Rank Test to compare these two measurements? Is it correct to use this test to compare the mean value of these measurements between different experiments?  Thanks This query works for me when I tried in PG admin query tool:    UPDATE bankdetails SET bank_details = 'mysore' ,"PAN"= 123,bank_acc = 456,                        "UAN"=789,tax = 'myy' WHERE  user_id = 79; INSERT INTO bankdetails (user_id,bank_details,"PAN",bank_acc,"UAN",tax)        SELECT 79,'mysore',123,456,789,'myy'        WHERE NOT EXISTS (SELECT 1 FROM bankdetails WHERE user_id=79);   Later I implemented in my code like this:  db.query('UPDATE bankdetails SET bank_details = $2 ,"PAN"= $3,bank_acc = $4,"UAN"=$5,tax = $6 WHERE user_id = $1; INSERT INTO bankdetails (user_id,bank_details,"PAN",bank_acc,"UAN",tax) SELECT $1,$2,$3,$4,$5,$6 WHERE NOT EXISTS (SELECT 1 FROM bankdetails WHERE user_id = $1);', [companyuser.rows[0]._id, data.bankDetails.bank_details, data.bankDetails.PAN, data.bankDetails.bank_acc, data.bankDetails.UAN, data.bankDetails.tax],function(err,bank) {                  if (err) return callback(new Error('error')); })   it says:     cannot insert multiple commands into a prepared statement   Can some one guide me here? Massless charged particles What is the intuition behind defining completeness in a statistic as being impossible to form an unbiased estimator of $0$ from it? Windows Logs Application is full of "Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: ****]" I have Windows Server 2016, with SQL Server 2017, and found Windows Log Application is full of Login failed messages (as follows) :     Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: ****]    Client's IP addresses are various. I don't have any maintenance plan in SQL Server     What's the problem?