How to count lines of code including sub-directories
How can I count all the lines of code in a directory recursively?
Hydrostatic pressure - doesn't density vary with depth? Our class is learning about hydrostatic water pressure and we have been told that we can calculate the force of the liquid on an object at any depth using "the density x 9.8 x the depth". However, as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it? So should't there be something in the equation to account for the varying density? To me, "density x 9.8 x depth" seems like it is saying that the density will be constant... Selecting pixels in raster using polygon selection tool? I want to reclassify landcover image manually with respect to online imagery. I am looking for a software/plugin/script to manually select raster pixels using polygon selection tool and could be able to enter new value.  I have Arcgis with spatial analyst license. My 1.12 solution can be found . When trying to update command blocks to 1.13, I have the following:  scoreboard objectives add invert dummy   (run at start) then:  scoreboard players set FakePlayer invert 1   (impulse unconditional repeat) chained into:  execute at @e[tag=summoned] run scoreboard players reset FakePlayer invert   (chain unconditional repeat) chained into:  execute if score FakePlayer invert = 1 invert run say "All summoned animals are dead!"   This should reset FakePlayers score continuously until all entities with tag "summoned" are dead, then it should run the final condition. This does not happen, and I can't see why. Browsing the internet from the command line How can I browse the Internet from the command line in Ubuntu? Odds of rolling doubles or triples given N 6-sided dice Over the holidays I played a dice game where each player had 3 to 7 d6 to roll each turn.  The game gave certain advantages to doubles and triples.  I wanted to know the odds of rolling doubles or triples given N dice to understand the importance of "upgrading" to more dice.  My question is really about how to reason about such problems:  It's easy to see that the odds of rolling doubles with 2 d6 are 1/6 (first die can be anything, and 1/6 of the time the second will match).  It's also easy to see that with 7 dice the odds are 1.0 (6 dice could be 1..6, but the 7th must match one of them).  The middle cases are fuzzier to me.  I ended up writing a program to enumerate all of the possibilities (even 6^7 is only 279,936 cases to evaluate) because that was the only way I felt I could verify any closed formula I came up with.  This also enabled me to distinguish cases of multiple doubles (or triples).  I would like to know how to derive closed forms and how to validate such solutions without brute-force simulation. I have 4 time series. One of them is stationary and rest of them are not. I need to find relation between them. I will use AIC to decide lag length.   Should I use VAR or VECM to find relation between them?  Will VAR or VECM give me relation in terms of equation which can be used for forecasting?  Do I need to perform Johansen's test of cointegration?  What good would it do? Very hot network questions found Statistics and causal inference? I expect to be working on a web application within the next several months and I'd like to "shoehorn" a Spanish language version of the site. If a large enough number of Spanish language users begin using the site we'll likely hire a professional translator (or at least recruit someone who actually knows the language), but in the meantime is there a good cheat sheet I can use for common UX keywords, like "OK", "Submit", "Cancel", "Delete" and "Save"?  I know I could use an online translator, but I'm concerned the translator would not pick up on context (thus giving me a Spanish word meaning something closer to "Take" for "Accept" or "Surrender" for "Submit", etc.)  I'm not looking for a 100% solution, just something to give me the bulk of the keywords until there's enough reason to hire a real translator. This site will be in a beta development phase for a long time, I think, so we're not expecting a huge user base to start things off. long long implementation in 32 bit machine As per c99 standard, size of long long should be minimum 64 bits. How is this implemented in a 32 bit machine (eg. addition or multiplication of 2 long longs). Also, What is the equivalent of long long in C++. Ever since I upgraded to 15.10, fdisk -l reports 16 ram disks (/dev/ram0 ... /dev/ram15). I'm a bit unsure what those are needed for. Is it safe to delete them? If not, how can I get rid of that fdisk output? $k^{\phi(l)} + l^{\phi(k)} \equiv1\pmod{lk}\,$ if $\,\gcd(l,k)=1$ I would like to prove the following equality: $$k^{\phi(l)} + l^{\phi(k)} \equiv1\pmod{lk}$$if $\gcd(l,k)=1$. What methods can I use? Thank you for your help. The situation is my  has been enchanted with .  The creature has      when it dies, return it to his owner’s hand   The enchantment says     When enchanted creature dies, return that card to the battlefield under your control with a +1/+1 counter on it.   Who gets the creature? Me or my rival?  Does the creature ability trigger before or after enchantment? Determining $\lim_{n\to\infty}\left(n^{\tfrac{1}{n}}-1\right)^n$ with only elementary math I am trying to find this limit:  $$\lim_{n\to\infty}\left(n^{\tfrac{1}{n}}-1\right)^n,$$  I tried using exponential function, but I see no way at the moment. I am not allowed to use any kind of differentiation or other topics of advanced math, only induction and school math are possible. Thank you What are the badges I can earn on each site, and what are the exact criteria for earning each badge? Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a &quot;(retired)&quot; next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type. I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word &quot;dolor&quot; in this text: &lt;p&gt;     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. &lt;/p&gt; &lt;p&gt;     Quisque bibendum sem ut lacus. Integer dolor ullamcorper libero.     Aliquam rhoncus eros at augue. Suspendisse vitae mauris. &lt;/p&gt;  How do I convert the above to something like this: &lt;p&gt;     Lorem ipsum &lt;span class=&quot;myClass&quot;&gt;dolor&lt;/span&gt; sit amet, consectetuer adipiscing elit. &lt;/p&gt; &lt;p&gt;     Quisque bibendum sem ut lacus. Integer &lt;span class=&quot;myClass&quot;&gt;dolor&lt;/span&gt; ullamcorper     libero. Aliquam rhoncus eros at augue. Suspendisse vitae mauris. &lt;/p&gt;  Is this possible with jQuery? Edit: As  , this is quite possible without jQuery - but I was hoping there might be a special method of jQuery which would let you do selectors on the text itself. I'm already using jQuery heavily on this site, so keeping everything wrapped up in jQuery would make things perhaps a bit more tidy. It is my understanding that metals are a crystal lattice of ions, held together by delocalized electrons, which move freely through the lattice (and conduct electricity, heat, etc.).   If two pieces of the same metal are touched together, why don't they bond?   It seems to me the delocalized electrons would move from one metal to the other, and extend the bond, holding the two pieces together. If the electrons don't move freely from one piece to the other, why would this not happen when a current is applied (through the two pieces)? I saw this in Basic Topology by M.A.Armstrong. It gives three descriptions of real n-dimensional  projective space $P^n$. Two of them are:  (a) Begin with the unit sphere $S^n$ in $E^{n+1}$ and identify its antipodal points.  (c) Begin with the unit ball $B^n$ and identify antipodal points of its boundary sphere.  I find it hard to imagine why these two descriptions lead to the same space.  Can you please help? Thank you. Partial vs. Full Volume Wort Boil The starting position for most new extract brewers is to use a partial boil set up.  Defined as using a pot smaller than the intended batch size, all the ingredients are boiled in a smaller volume.  Then the wort is diluted to the final desired batch size.  (Often the dilution step is used as part of a cooling step)  What are the Ups and Downs of both Partial vs. Full boils? Difference between $\Delta$, $d$ and $\delta$