How can I clear my working directory in Git?
How do you delete untracked local files from your current working tree?
How do I convert a video to GIF using ffmpeg, with reasonable quality? I'm converting a video to GIF file with ffmpeg:  ffmpeg -i input.flv -ss 00:00:00.000 -pix_fmt rgb24 -r 10 -s 320x240 -t 00:00:10.000 output.gif   It works great, but output gif file has a very low quality.  Any ideas how can I improve quality of converted gif? The effect of gravitational & Coulomb forces on free electrons in a conductor In a metal, why don’t the free electrons fall to the bottom of the metal due to gravity?  Also, charges in a conductor are supposed to reside on the surface so why don’t the free electrons all go to the surface?   Regarding the first question, my hunch is that it is due to the electric force which is greater than the gravitational force and electric force act along the length of the conductor.  I don't have any intuition for the second. Double value returns 0 Here's an example:  Double d = (1/3); System.out.println(d);   This returns 0, not 0.33333... as it should.  Does anyone know? Disabling IPv6 on Mint and Debian How does one disable IPv6 completely (for all interfaces, resp. for the whole machine?  Keep in mind, I don't want any kind of GUI solution.    OS in question:   Linux Mint 18.x Cinnamon 64-bit GNU/Linux Debian 9.x Cinnamon 64-bit How to initialize private static members in C++? What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this? Evaluation of $\sin \frac{\pi}{7}\cdot \sin \frac{2\pi}{7}\cdot \sin \frac{3\pi}{7}$ Evaluation of $$\sin \frac{\pi}{7}\cdot \sin \frac{2\pi}{7}\cdot \sin \frac{3\pi}{7} = $$   $\bf{My\; Try::}$ I have solved Using Direct formula::  $$\sin \frac{\pi}{n}\cdot \sin \frac{2\pi}{n}\cdot......\sin \frac{(n-1)\pi}{n} = \frac{n}{2^{n-1}}$$  Now Put $n=7\;,$ We get   $$\sin \frac{\pi}{7}\cdot \sin \frac{2\pi}{7}\cdot \sin \frac{3\pi}{7}\cdot \sin \frac{4\pi}{7}\cdot \sin \frac{5\pi}{7}\cdot \sin \frac{6\pi}{7}=\frac{7}{2^{7-1}}$$  So $$\sin \frac{\pi}{7}\cdot \sin \frac{2\pi}{7}\cdot \sin \frac{3\pi}{7} =\frac{\sqrt{7}}{8}$$  Now my question is how can we solve it without using Direct Formula, Help me  Thanks Straighten Vertices Along a Line On a line, I need to line up the bottom vertex points in relation to a top reference vertex point. How could I reset the X Y and Z coordinates of these vertex points to essentially line them up all through use of the vector of the reference point vertex.  I do not have access to Mesh -> Transform -> Scale on Axis for aligning vertices along a line. NSDate Format outputting wrong date Options to hide reputation information on Stack Overflow? Word to describe someone who goes to all the events in town! Can someone tell me what is wrong with this loop?    The error that I have is on the line 107 (first line of the loop). It says:      [V2016057174800: command not found.    I am trying to associate two the same filename from two different documents (if that makes sense). Why can't I move a window to the top left corner with wmctrl in Unity? I've been playing around with wmctrl to take more control of my windows. I've encountered a weird behaviour where Unity reserves double the space. See this screen shot:    I opened the terminal and moved the window using the top command. It should be at the top left corner (X=0 Y=0). But for some reason there is some margin between the terminal and the Unity bars.  If I understand the man pages correctly it might have something to do with the WA: 65,24.  Can anybody help me to fix this? Using the residue theorem, calculate $\int_{0}^{2\pi}\frac{1}{1-2a\cos{\theta}+a^2}d\theta$ Why isn't sizeof for a struct equal to the sum of sizeof of each member? I'm looking at buying a second-hand Mac, probably one that does not include an OS installation disk.  How can I scan it to make sure that it has not had security threats installed on it?  Is there a CD or DVD image I can boot it up with to perform this scan offline?  Edit: prospective machine would be a 2011- or 2012-vintage MacBook Pro.  Also note that I don't have reliable access to high-speed internet, so solutions that involve downloading 5GB over the Internet are not ideal.  For others, though,  may be helpful. Why is the upper Riemann integral the infimum of all upper sums? I was reading the theory of Riemann integration when I cam across the following ,   If $f$ is bounded on $[a,b]$, and $P = \{x_0,x_1,x_2.......x_n\}$ is a partition of $[a,b]$, let $$M_j = \sup_{x_{j-1}\leq x\leq x_j}f(x)$$ The upper sum of f over P is $$S(P) = \sum_{j=1}^{n} M_j(x_j-x_{j-1})$$ and the upper integral of $f$ over $[a,b]$, denoted by $$\int_{a}^{b^-} f(x)dx$$ is the infimum of all upper sums.  The theorem similarly goes on to state the result for lower sums.  My doubt is : I do not understand how is $$\int_{a}^{b^-} f(x)dx$$ the infimum of all upper sums. I understand that if we refine the partition P, then the upper sum would decrease, so it may be a lower limit for all the upper sums computed on the refinements of P (but still being the lower limit does not prove that it is the infimum) and what about those partitions for which P itself is the refinement of?  How do I know that it will be a lower limit for those, let alone a infimum? Just upgraded to Mountain Lion and I have to buy iPhoto again? Short sci-fi story about Earth blockaded by other human colonies Like the subject: short sci-fi story about Earth blockaded by other human colonies.  The best humans have colonized some stellar systems. But they begin to treat humans of earth like inferiors. A war began, colonies won the war and blockaded the earth, but despite this the earth won. Who is the author? Is there a way to enable the JavaScript Error/Debug Console for Safari within Android? Why do statisticians discourage us from referring to results as "highly significant" when the $p$-value is well below the conventional $\alpha$-level of $0.05$?  Is it really wrong to trust a result that has 99.9% chance of not being a Type I error ($p=0.001$) more than a result that only gives you that chance at 99% ($p=0.01$)?