I want to ask, because this cycle throws me false ?, not know why that is the result. I think it has to do with floating point  Thank you for your help.  double a = 2d; System.out.println(a);  double b = 2.6d ; System.out.println(b);  for (int i = 0; i &lt; 6 ; i ++) {     a+= 0.1; }  System.out.println ( a==b ) ;   RUN  2.0 2.6 false
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Guarding against cryptanalytic breakthroughs: combining multiple hash functions I am trying to recall the name of a story I read when I was fairly young (maybe 20 years ago, but not sure how old the story is).    What I remember: A man acquires a set of creatures that he keeps in his house, I think in an aquarium.  They evolve over time, quickly, and think of him as their benevolent god. They build statues in his likeness.   Then, I believe some sort of accident happens, and the statues they build become a little less benevolent, which bothers him.  This pattern continues on with his cruelty increasing and their depiction of him becoming more cruel. Trigger a php file on every post or page if a condition is met I was wondering if we can trigger a PHP file on every WordPress post or page if a certain condition is met. Let me detail what I want.   Can we write a simple PHP script that will be automatically loaded on every WP post and page. Once loaded, the script should scan the HTML and if it finds a specific DIV tag with the ID myID it should trigger another PHP file (let's say script.php). Once the target PHP file has been triggered or executed, the target PHP file (script.php) should be able to automatically fetch the URL of the post or page that triggered the file and store it in a variable.   Any ideas?? Prove $\frac{a+b+c}{abc} \leq \frac{1}{a^2} + \frac{1}{b^2} + \frac{1}{c^2}$. So I have to prove $$ \frac{a+b+c}{abc} \leq \frac{1}{a^2} + \frac{1}{b^2} + \frac{1}{c^2}.$$  I rearranged it   $$ a^2bc + ab^2c + abc^2 \leq b^2c^2 + a^2c^2 + a^2b^2 .$$  My idea from there is somehow using the AM-GM inequality. Not sure how though. Any ideas?  Thanks I've got a directory shared on my network, using Samba. People on the netwerk use this Samba share to download files from my share to their computers. I'm interested in what files are downloaded most, and by which users they are downloaded. I'd like to see this in real time, if possible. Is there a program that allows me to do this? If yes, how can I use it?    I'm using Ubuntu 11.10. tables with lots of columns I have a table that lists various attributes of an individuals personal development plan; objective, time to complete objective, comments etc. The table is editable so the user can directly add comments without having to go to an intermediate form. The problem is that the client wants to add more columns and this is messing up the visual display.   The alternatives I have are:   allowing columns to expand out on click keeping essential attributes in table, rest in 'advanced edit option form' or somesuch I don't know - have you any ideas?   One more thing to add: I think the addition of extra columns is based on user feedback ...  edit: here is what I have gone for Remove the most popular tag from the title using JavaScript So, I see that  to fight site scrapers. But, this is harmful to User Experience. With browsers like Google Chrome, all I can see is the first few characters of the title, and it becomes annoying to try to find the right tab.  So, my request: Can you remove the tag from the &lt;title&gt; using JavaScript? Crawlers will still see the SEO-friendly &lt;title&gt;, and users won't have their user experience hampered by it. We all win. Is there a way to force the iPhone to use its own microphone when connected to a Bluetooth speaker? I connect my phone to a Bluetooth speaker to play music. When engage Siri or try to use dictation, the phone wants to use the microphone on the Bluetooth device, which is either too crappy or too far away for it to understand what I am saying.  So, I would like a way to restrict the iPhone to using its own microphone even when connected to a Bluetooth speaker.  I am open to doing this via a setting, buying an app, or jailbreaking or whatever.  Is there a way to do this? What Sith Lords were turned to the Light Side? Can I delete files or folders from /private/var/folders/? I have this folder /private/var/folders/bf/ with 3GB of what seems temporary files. Can I delete this folder? Geometric interpretation of $\frac {\partial^2} {\partial x \partial y} f(x,y)$ Are there any geometric interpretation for the second partial derivative? i.e.  $$f_{xy} = \frac {\partial^2 f} {\partial x \partial y}$$  In particular, I'm trying to understand the determinant from  for determining whether a critical point is a minima/maxima/saddle points:  $$D(a, b) = f_{xx}(a,b) f_{yy}(a,b) - f_{xy}(a,b)^2$$  I have no trouble understanding $f_{xx}(x,y)$ and $f_{yy}(x,y)$ as the of measure of concavity/convexity of f in the direction of x and y axis. But what does $f_{xy}(x,y)$ means? Help me to solve this problem please..  Let $Y_{(1)}, Y_{(2)}, Y_{(3)}, Y_{(4)}, Y_{(5)}$ denote the order statistics of a random sample of size 5 from a distribution having p.d.f. $f(y) = e^{(-y)}, 0 &lt; y &lt; \infty$, zero elsewhere. Show that $Z_1 = Y_{(2)}$ and $Z_2 = Y_{(4)} − Y_{(2)}$  are independent. Hint: First find the joint p.d.f. of $Y_{(2)}$  and  $Y_{(4)}$. Writing someone else's master's thesis: Unethical and illegal? It is really difficult for me to decide on this situation: when someone calls me and asks for work-for-hire for his/her thesis. I don't know what to do. I want to help and earn money but I think this way of earning money is unethical.  I think that receiving the title of thesis and giving back prepared manuscript is the intention that some people have, when asking for their thesis to be written.  There are plenty of websites offering such services!   The question is that: Is it legal and or ethical to write someone else's master's thesis as work-for-hire? I'm having problems understanding the following situation. Suppose two 1-tonne cars are going with the same orientations but opposite senses, each 50 km/h with respect to the road. Then the total energy is   $$\begin{eqnarray}E=E_1+E_2&amp;=&amp;\frac{1\mathrm t\times(50\mathrm{km}/\mathrm h)^2}2+\frac{1\mathrm t\times(50\mathrm{km}/\mathrm h)^2}2\\&amp;=&amp;1\mathrm t\times(50\mathrm{km}/\mathrm h)^2\\&amp;=&amp;2500\frac{\mathrm t\times\mathrm{km}^2}{\mathrm h^2}.\end{eqnarray}$$  Now if we look at it from the point of view of one of the cars, then the total energy is   $$\begin{eqnarray}E=E_1+E_2&amp;=&amp;\frac{1\mathrm t\times(0\mathrm{km}/\mathrm h)^2}2+\frac{1\mathrm t\times(100\mathrm{km}/\mathrm h)^2}2\\&amp;=&amp;\frac{1\mathrm t\times(100\mathrm{km}/\mathrm h)^2}2\\&amp;=&amp;5000\frac{\mathrm t\times\mathrm{km}^2}{\mathrm h^2}.\end{eqnarray}.$$  I know that kinetic energy is supposed to change when I change the frame of reference. But I understand that then there must be some other kind of energy to make up for it so that the energy in the system stays unchanged. But I don't see any other kind of energy here. I only see two total energies of the same system that seem to be different. Could you explain this to me?  Please note that while I don't understand any physics, I do understand college level mathematics, so if necessary please use it. (I doubt anything more than high school maths should be needed here, but I want to say this just in case.) I often hear about the wave-particle duality, and how particles exhibit properties of both particles and waves. However, I wonder, is this actually a duality? At the most fundamental level, we 'know' that everything is made up out of particles, whether those are photons, electrons, or maybe even strings. That light for example, also shows wave-like properties, why does that even matter? Don't we know that everything is made up of particles? In other words, wasn't Young wrong and Newton right, instead of them both being right? After I saw that post i wanted to solve the first one which is $a\mid b^2,b^2\mid a^3,a^3\mid b^4,b^4\mid a^5\cdots$ Prove that $a=b$  Now i started by proving that $a$ and $b$ have same prime divisors,proving that is trivial,after doing so I checked do those factors have to have the same power.I tried with $$a=p^2,b=p^3$$ I noticed it exactly goes for 3 terms,or that $a^3\mid b^4$ doing $$a=p^{n-1},b=p^n\\p^{n-1}\mid p^{2n}\\p^{2n}\mid p^{3n-3}\\p^{3n-3}\mid p^{4n}\\p^{4n}\mid p^{5n-5}\\\cdots\\p^{n(n-1)}\mid p^{n(n-1)}\\p^{n(n-1)}\mid p^{n(n+1)}\\p^{n(n+1)}\not\mid p^{(n-1)(n+1)}$$ Now yeah I guess that would be a proof,but wouldn't setting $n=n+1$ infinitely many times make every term dividable? How does conservation work in wormholes? My questions might seem naive as I haven't plunged into the mathematical descriptions, but wormholes are interesting even if I don't actually know them :)  First of all, is wormhole making two possible paths betwwen points (like the tunnel in most visualisations) or is it just making two points beside each other like in the game Portal? Of course, second case can be bent into a tunnel, but there would be nothing special about tunnel part and no preferred way to divide into "normal" and "tunnel" part of spacetime.  My main questions are these:   Is momentum conserved? Is kinetic energy conserved? How does potential energy work?   To elaborate... In the game Portal you can fall into floor and fly out of the wall or floor elsewhere with the same speed, but another direction (normal to the portal). So momentum is not conserved, but kinetic energy is. Is that how it would actually work? Where does the momentum go then?  And does it really allow you to increase your potential energy while retaining kinetic? It would seem fair to take away some kinetic energy if you are put in a region where you have more potential energy.  Either way is the change in energy non-continuous like in the game and discussion that's linked below? Or are there just more than one way to move through but the change in potential energy is smooth in any of those? That would mean more potential equilibrium points though...  Similar questions has been discussed , is it correct about how the falling guys gets a lot of energy (in form of a potential one) by draining it from the mouths? Help + Noun + Gerund or Infinitive Since it's Friday and others are playing games, here's another one to take us into the weekend.  Everyone knows about those Russian nesting dolls (called matryoshka dolls, I believe). A small doll nests inside a larger, which itself is inside a larger doll, and so on.   This game does the same with words. You start with a three-letter word, add a letter to make another word, and so on. Longest word wins. The catch? Each additional letter has to form a legitimate word.  Here's one to start you off:     bur   burr   burro   burrow   burrows     Good luck. Commandline shortcut for current directory similar to ~ for home directory? When i use the cp or move command in a terminal window, i'm currently with bash in a certain folder like this.  NES@server:~/Desktop/dir1$   And now i wanna copy a file from here ~/anotherdir/dir2 into the current chosen folder in bash (dir1) i would use the command  cp ~/anotherdir/dir2/file ~/Desktop/dir1   does a shortcut string exist to refer to the current chosen directory? So that in this example i don't have to provide the full path to the target dir, but the command knows it should use the current chosen directory in bash? i.e. as ~ stands for the home directory?