PHP expression output I found somewhere in book   echo (int) ((0.1 + 0.7) * 10);    output is : 7  echo ((0.1 + 0.7) * 10);   output : 8  why both out are different ? I think answer should be  8
Is floating point math broken? Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Stop terminal auto executing when pasting a command Right, this is a slightly annoying feature because something this happens, and other times it doesn't, very odd.  I paste a command into the terminal with a view to tweaking its arguments, and sometimes it executes the second I paste it. Sometimes it doesn't.  This ranges from embarrassing ( posting nonsensical comments on an IRC ) to dangerous.   How can I shut this feature off for good? I never, never, never want the terminal to auto execute when I paste to it. Decide if the series converges and prove it using comparison test: $\sum_{k=1}^{\infty}\frac{1}{2k+3}$ Decide if the series converges and prove it using comparison test:   $\sum_{k=1}^{\infty}\frac{1}{2k+3}$   $$\frac{1}{2k+3} &lt;\frac{1}{2k}&lt;\frac{1}{k}$$  and since $\sum_{k=1}^{\infty}\frac{1}{k}$ diverges (we have defined that in our readings, so I can claim it here), the complete series will diverge, too.  Did I do everything correctly? What makes me feel a bit unsure is that there is no "$\leq$" sign anywhere and when I look up the comparison test on the internet, I don't see any "&lt;" or ">" in the definition.  Is it correct anyway? P.d.f of the absolute value of a normally distributed variable I came across this question as an exercise, had a brief idea, but didn't know how to proceed.     Let $X \sim N(0, 1)$. What is the p.d.f of $|X|$ ?   I know the final p.d.f looks just like the right half of the original pdf, but extended vertically for a factor of 2.  Could someone please show mathematically what the p.d.f of variable |X| is going to be, and explain briefly? Thank you. For the recently reported production (January 2017) of metallic hydrogen in the laboratory - what is the evidence exactly? My google news page has burst forth the news that metallic hydrogen has been produced in a laboratory using a diamond anvil cell. Only  mentions (at this particular moment) that it has been called into question at - at least - premature. That can be read about in Nature:   Here I only want to ask about the evidence. Is it only the sudden change in visual appearance change as recorded in a camera on top of the microscope, at a specific temperature and pressure? That it "looks shiny?" Or is there actually more direct data than that?  note: I am not asking if the data is sufficient or not, nor if it is convincing, or metallic or not. Just a narrowly defined question about the extent of the observations that have lead to the proposal that a metallic state was achieved.     above: potentially three states of hydrogen as viewed in a diamond anvil cell, from . Acro package provides "! Missing number, treated as zero." after update to acro-v2.7b Solving "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection" InvalidOperationException How do I get a file extension in PHP? Is Python/ArcPy capable of delimiting strings with commas into different fields, and running a calculation based on those separate columns Using ArcGIS ArcMap 10.6: I have a text field in an attribute table that has comma separated values (example: 12,24, 64, 87,29). For this example, I will name this field VALUES. Please note that VALUES includes data collected from field work so the spacing between commas will be varied. My current workflow is as followed:  Export the ID and VALUES fields in the attribute table into a .csv file using Table to Table in ArcMap 10.6 Open the .csv in Excel and run the 'text to columns' function under the Data ribbon Separate the VALUES field into multiple columns based on commas Run the calculation: Copy Column I values and ID columns into a new .csv file Save and close the new .csv file and join the shapefile to the new .csv file based on ID Export the newly joined shapefile into a new file and delete the duplicate ID field in the new shapefile  I am wondering if there is a way to automate this Python/ArcPy so I can create a custom script tool to do this without leaving the ArcGIS environment. Is there a way to separate values in a text field based on commas into different columns, run the above calculation, and have the values from that calculation entered in a new field named VALUES_CALCULATED? I had just arrived at the hotel, checked in and gotten into my room. Just as I was about to unpack, I noticed that one of my bags was missing. At first I thought I had left it back at the airport, but it turned out that I had left it on the taxi.  Here, what's the meaning and role of "just"?  Why do you guys input the word "just" here?  What exactly does the word do grammatically?   Could you help me? Locking a vertex group from modification In a mesh there is a group of vertices which should not move after being positioned once. I would like to find a way to lock them in place for the whole duration of the project.   Currently I 'lock' them by hiding them and then sculpting. I imagine it is possible also to create shape keys for the vertices. Or I could write a script which would save position of the vertices.   Is there a better way to do it? I'm having trouble with \includegraphics I'm using MacTeX What does really attracts a water stream to a charged object? I saw  by  and I was not 100% sure about the third phenomena, a statically charged object attracting a stream of water, especially because he explicitly mentioned that it is not due to the  of the water. A week later he uploaded an  all five phenomena and he says it is because of repelled equally charged ions, back up the water flow, such that the water actually falling along the charged object would be oppositely charged and therefore attracted. Here is a still image from the video illustrating this:    However this explanation seems strange to me, since this would mean that this way you could build up a charge in the water which has exited the tap (as well as in the water inside the tap as well). Therefore it should get harder to push those ions back over time, and therefore there also would be a decrease in the attraction of the water (assuming there is no other way to discharge it). I have tried a simple similar experiment, where I catched the water leaving the tap in an insulated bowl, but I did not notice a decrease in attraction.  There a couple of reasons why my experiment does not rule out his theory:   I was holding the charged (plastic) object by hand, which caused that its distance to the water stream varied, making it difficult to observe a decrease in attraction. I only conducted my experiment for roughly 30 seconds, which might be enough time for a opposite charge to build up.   The reason that he mentioned why permittivity can't cause this phenomena is because the electric field would be homogeneous and therefore the attractive and repulsive force of both dipoles of a water molecule would cancel out. However the electric field would only be homogeneous if the charged object would be an infinitely large plate, which it isn't. Thus water molecules would be attracted to the charged object. In order to make the permittivity theory more plausible I thought of maybe doing a order of magnitude calculation to see if it could generate a large enough force would be able the water stream by the observed amount. However I do not know what a good guess would be for variables such as the amount charge on the charged object and how the electric field would fall off over distance.   So, my question is whether his theory is really correct, or if the permittivity of the water can cause it. How to render world position pass A world position pass is a pass used for composting other elements into the scene after the initial render. In a world position pass the R, G, B values correspond to the X, Y, Z axis (or X, Z, Y). A world position pass could look something like this. (Image form another 3d app)    Is there a way to render out corresponding world space coordinates of each pixel? How to find the mime type of a file in python? Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer.  Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in the HTTP response.  Based on that assumption, in addition to the bytes of the file, you also want to save the MIME type.  How would you find the MIME type of a file? I'm currently on a Mac, but this should also work on Windows.   Does the browser add this information when posting the file to the web page?  Is there a neat python library for finding this information? A WebService or (even better) a downloadable database? Calling future method from Batch Prove that $f$ has a fixed point . For $f:[a,b]\rightarrow [a,b]$ is a continuous . Prove that $f$ has a fixed point . Is that true if we change $[a,b]$ by $[a,b)$ or $(a,b)$. How to change the color of symbols (mobile, email, homepage, etc) in moderncv? Sometimes, others just inform us about things without us asking them, other times they do not do that even if we ask them. I want a verb for when others do not give us information — whether because they do not like to or they just don't give it, but we cannot directly ask them to — but we actively extract the information from them sometimes without them being aware of it.   So the word I am looking for shouldn't be only for cases where we coerce or force others to give us information, and it shouldn't be only for cases where others do not like to give us information.  Example:     I needed that information. But I couldn't ask her for it, or most   probably she would not give to me even if I asked her. So, I ....   the information I wanted.   It could be a phrasal verb and so not just a single word, but I couldn't devise a  blank suitable for all possibilities!   Two verbs I've already had but I think are not suitable:  to give someone the third degree   To prize something from/out of somebody I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it? What is the rule for omitting/including the definite article in the following sentences:     I used to play piano.   I used to play the piano.   I would pick the first sentence, but I've heard people say the second sentence even when they are not referring to a specific piano. Which one is correct?