I just noticed that sometimes JS does something unexpected when simply adding 2 floating point numbers, e.g.  console.log(0.01 + 0.05);   will output 0.060000000000000005, when on the other hand something like  console.log(0.02 + 0.05);   will output 0.07.  I'm like WTF? Can anyone explain this kind of strange JS behaviour?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Can a spellcaster use spell slots above their normal limit if their ability scores allow bonus spells of that level? This question is inspired by discussion , about how Heighten Spell works with Reserve Feats.  The question that I am asking here deals with whether or not players can cast spells using spell slots for spell levels that they don't have access to yet.    I feel like an example would explain this concept best.  Take Xylitol, the first-level wizard with an intelligence of 18.  He has 5 0th-level spells per day and 3 1st level spells per day from his class.  He also has 1 bonus 1st level spell per day from his high intelligence.  The  table says that he also has 1 bonus spell of each 2nd, 3rd, and 4th levels.  The question is this:  Can Xylitol cast 1st level spells using the bonus slots for his 2nd, 3rd, and 4th level spells?  He clearly can't cast spells that are inherently higher level than 1st, since he can't learn them, but can he cast 1st level spells using bonus 2nd, 3rd, and 4th level slots?  This has come up on these boards before, .  What I'm looking for here is a clear rules citation that clarifies this one way or the other.  The wording in the section on ability scores makes it quite clear that characters cannot cast spells that are actually higher level than their class allows them to cast, but it is not clear that these higher level slots are barred until the appropriate spell level is unlocked.  If a character has access to a spell level that they can't use because their ability score isn't high enough, they can freely use those slots for lower level spells, so why can't they use their bonus spell slots for lower level spells?  As KRyan's answer says, the Basics section covers this.  Based on questions and comments both here and elsewhere, that section seems to be worded ambiguously enough that it's caused confusion.  I'd like to find another, more clear wording to this rule if at all possible.  Answers from either D&amp;D 3.5 or Pathfinder are acceptable, but please note which one your answer applies to.  N.B. I'd like to note that I personally don't feel that players should have access to higher level slots like this.  There are a large number of locations where it's heavily implied that this is not the case, but I feel that finding a clear rules citation here would be helpful.  I can't find one that is clear for either interpretation here. I have 2 storage devices; classical slow HDD (750GB, /dev/sda) and faster SSD (128GB, /dev/sdb). Currently I have installed Ubuntu &amp; Mint on same btrfs partition on SSD (/dev/sdb5). My btrfs pool consists of /dev/sdb5.  What I want to achieve is data replication on HDD while keeping SSD performance: Something like this:  For read case it would be ideal for procedure to go like this:   read from SSD check checksum if it verifies.. awesome, give me the data if not, fetch data from HDD and perform error correction through duplicate data   I'd manually run (some tool I'm not sure which one... btrfs check --repair perhaps?) every month or so to check HDD checksums and correct them via SSD data against bitrot.  For write case:   write to SSD sync to HDD when write requirements are low, thus not slowing down the system.   Is this possible and how would I do it?  Bottom line is, I like btrfs and would like it to duplicate data across HDD &amp; SSD drive automatically while keeping SSD excellent performance.   Using SSD as write cache is not an option since it's missing data duplication and security. Doing bad in undergraduate but good in a masters program Suppose you do bad in undergraduate school in say computer science. But you do very well in a masters program in computer science. If you want to apply to a PhD program in computer science, will the masters degree grades offset the undergraduate degree grades? I am wanting to find the correlation between two variables: a categorical vegetation variable (with categories 1-4)  and a continuous variable of erosion (with values anywhere between 0.2 and 9). I think I would be required to use a non parametric test to find the correlation, but bit of a newby to stats so could anyone suggest the best test to use? I also wanted to know how sample size can affect these tests, ie with a sample size of 100 or 1000? "All the good people" vs. "all of the good people" I have a few questions regarding Named Credentials. I need to perform a SOAP based call out to an external system from Sales Force. I used the wsdl2apex function to generate the class for the call out. When I started integrating this class into my process I got to thinking about securely storing the username and password for the call out, which led me to discover Named Credentials. Question is, can Named Credentials be used in the auto-generated apex class? If so, could you please provide an example?  Thanks in advance I am using ArcMap 10.2 and I'm looking for a way to add  a table containing certain fields from select elements from a featureclass to my map. Ive tried the add table option from the attribute table, but it doesn't quite give what I want (the table must be editable to look a certain way).   Are there any options out there for 10.2 like arcpy.mapping.tableview or will upgrading to 10.3 so I can get access to the "graphic table element" function be best? Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)? I'm looking for a Drupal Commerce Shipping in-cart estimate Find the value of $\int_{-\infty}^{\infty} \frac{e^{-x^2}}{1+x^2} dx$ . Find the value of $\int_{-\infty}^{\infty} \frac{e^{-x^2}}{1+x^2} dx$     My attempt  First, I know the existence of this integral since $$ \mid \int_{-a}^{a} \frac{e^{-x^2}}{1+x^2} dx \mid \;\; \leq\;\;  \mid \int_{-a}^{a} \frac{1}{1+x^2} dx \mid$$  Next, let $R &gt;0 $ be an arbitrary and $\gamma_1(t) = -R(1-t) + Rt , \;\; 0 \leq t \leq1$ and $\gamma_2(t)= Re^{i\pi (t-1)}, \;\; 1 \leq t \leq 2 $.  So, take $f(z) = \frac{e^{-z^2}}{1+z^2}$.   I tried to find the value or upper bound of norm of $$\int_{\gamma_2} \frac{e^{-z^2}}{1+z^2} dz$$.  However, $$ \lvert\int_{\gamma_2} \frac{e^{-z^2}}{1+z^2} dz\rvert \leq  \frac{\text{max}\lvert e^{-z^2}\rvert}{R^2-1}\pi R = \frac{e^{R^2}}{R^2-1}\pi R $$ So, I can't proceed this.  May I ask you how to solve this? After what speed air friction starts to heat up an object? I understand that air friction cools off an object at low speeds. For example, if you blow on a spoon of hot soup, it cools off. Or if you swing a hot frying pan in the air, it cools off faster.  But at higher speeds, the situation changes in the opposite. For example, consider a meteor falling on Earth. It is so fast that it heats up to such a high temperature that it burns into ashes.  What is the critical speed in which an object starts to heat up?  For example, consider a spherical object with radius of 1 meter. Let its density be 1 g/cm3 if needed. And let the air pressure be 1 atm. Assume that the temperature of the object is 400 K and the temperature of the air is 300 K. Also assume that the specific heat constant of the material is 1 cal/(gr.K). What is the critical speed for this object after which its temperature starts to rise above 500 K? Which IP address do I use to access my server? I'm running a Samba server on my MacBook and I've also set up port forwarding to said server from my router.  My public IP is 106.51.x.x (according to google and a few other services) and my Mac's local IP is 192.168.x.x, but when I head to my router's configuration page, it says my external IP is 10.242.x.x.  This is what I don't understand, when connected to my home WiFi, using the 10.242.x.x address works just fine. But if I try to access the same over 4G, the connection times out.  As for the public address, neither WiFi nor 4G works.  Is there some setting on my Mac (I'm running MacOS Sierra) that I must alter to make it visible to the public? Show that $(l_1)^* \cong l_{\infty}$ Any idea why the piece of code below does not add the script element to the DOM?  var code = "&lt;script&gt;&lt;/script&gt;"; $("#someElement").append(code); I declared random list using TikZ package and can get items randomly. But at same time I need to get all items in sequential order. How can I do it? Is it possible print \mylist items declared in noncomma variat?  \documentclass[a4paper,14pt]{extreport} \usepackage{tikz}   \def\mylist{{one}{two}{three}{four}{five}}   \pgfmathdeclarerandomlist{mynum}{\mylist} %Define the list   \begin{document} \pgfmathrandomitem{\mynum}{mynum} \pgfmathresult~\mynum\\  \pgfmathrandomitem{\mynum}{mynum} \pgfmathresult~\mynum\\  \pgfmathrandomitem{\mynum}{mynum} \pgfmathresult~\mynum\\  \pgfmathrandomitem{\mynum}{mynum} \pgfmathresult~\mynum\\  \pgfmathrandomitem{\mynum}{mynum} \pgfmathresult~\mynum\\ \end{document} When building console applications that take parameters, you can use the arguments passed to Main(string[] args).   In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly.    So I'm interested in:   Libraries that you use Patterns that you use   Assume the commands always adhere to common standards such as . prove/disprove Big-Oh I have the following function f(n), and I want to prove/disprove that it is O(n$^2$): \begin{cases}     4[sum(n/2,n)],&amp; \text{if n is even } \\     2n-1+sum(n-3,n),              &amp; \text{otherwise} \end{cases} (it should be 2 n-1, so a space between 2 and n) where sum( j,k ) is a ‘partial arithmetic sum’ of the integers from j up to k, that is \begin{cases}     0&amp; \text{if j&gt;k } \\     j + (j+1) + (j+2) + ... + k,              &amp; \text{otherwise} \end{cases} e.g. sum(3,4) = 3 + 4 = 7, etc. Note that sum(j,k) = sum(1,k) – sum(1,j-1) How do I prove or disprove that this is O(n$^2$)? How about a difficulty rating for questions? It might be useful to add a drop down field "Difficulty" for questions. With a very limited set of options, say:   Beginner Advanced Expert   This way, users could easily judge if they can answer a specific question (depending on their experience in the topic) and how much time it will probably take.  Beginners usually know they are new so they can easily select Beginner. Those with some experience just select Advanced and those working on a topic for years may chose Expert. I think it's not very difficult to judge halfway correctly.  And the difficulty rating does not have to be very precise anyway, it's more a rough estimate by the asking person.  As an addition, rep gained on this topic can be multiplied with a difficulty factor. This would solve the problem of lots of rep for often-viewed and easy to answer questions and few rep for less-viewed, difficult questions.  Update  Thank you so far for the answers. I clearly underestimated the fact that some users are going to always chose Expert difficulty.  Maybe readers voting on the difficulty would be a workaround. Of course, we cannot use the rep factor then, for the same reason.  This kind of voting would obviously introduce a whole new set of issues, since we could vote on both content and difficulty (I'm almost positive this kind of proposal existed before?). I don't know so much about coordinate systems...  In my office we use to deal with spatial data coming from archaeological sites. Each site has its own x-y-z coordinate system (GCS). Three simple ortogonal cartesian axis. In the last years we have been managing this spatial data through GIS software (ArcGIS), without using specific coordinate system (just leave it as "undefined")  I'd like to know if there exisits any GCS designed to deal with such datasets using simple cartesian orthogonal axis, without grid distortions of the typical GCS. In addition, I'd like to know if this system is suitable for using it in an online mapping application.  By the way, we manage 2D (ArcMap) and 3D (ArcScene) environments and work with "mm" as length base unit.   If such a thing doesn't exists, maybe someone knows how to create it. Is Switching the Neutral OK? What’s the worst that can happen if i put a switch in the neutral instead of the phase?   I just found out that 3 light bulbs sockets in my home  are connected this way, it first came to my mind to fix it but then I recalled the flow of current from positive to negative is just a convention since the electrons are charged negatively and they actually flow from N to L so i cant really find an solid excuse to mess with the wiring for the next 2 hrs