Single quote or Double quote in Node.js? I am learning Nodejs from scratch and I would like to make it a habit of using either single quote or double quote in Node.js. I read few answers elsewhere in Stackoverflow which said that it's purely dependent on the coding style used by the team.   So, which one should I use? Or rather, which one does the expert programmers use? in Apis and elsewhere.
When should I use double or single quotes in JavaScript? console.log(&quot;double&quot;); vs. console.log('single'); I see more and more JavaScript libraries out there using single quotes when handling strings. What are the reasons to use one over the other? I thought they're pretty much interchangeable.
Determining true mean from noisy observations What is the difference between Θ(n) and O(n)? Sometimes I see Θ(n) with the strange Θ symbol with something in the middle of it, and sometimes just O(n). Is it just laziness of typing because nobody knows how to type this symbol, or does it mean something different? Add the option to do a case-sensitive search I noticed that the search engine does not consider capital letters (just like most regular search engines). However, I have the feeling that in a "coding" context, this could be useful.  For example, searching pages about the standard C library "FILE" struct returns a lot of pages containing the "file" word, that are not (always) relevant.  Is there a way to force keeping capitals? If not, maybe it could be a nice feature to add? Why do I get TypeError: can't multiply sequence by non-int of type 'float'? I am typing to get a sale amount (by input) to be multiplied by a defined sales tax (0.08) and then have it print the total amount (sales tax times sale amount).  I run into this error. Anyone know what could be wrong or have any suggestions?   salesAmount = raw_input (["Insert sale amount here \n"]) ['Insert sale amount here \n']20.99 &gt;&gt;&gt; salesTax = 0.08 &gt;&gt;&gt; totalAmount = salesAmount * salesTax  Traceback (most recent call last):   File "&lt;pyshell#57&gt;", line 1, in &lt;module&gt;     totalAmount = salesAmount * salesTax TypeError: can't multiply sequence by non-int of type 'float' Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file. Output from ls has newlines but displays on a single line. Why? I think I may be overlooking a relatively fundamental point regarding shell. Output from the ls command by default separates output with newlines, but the shell displays the output on a single line.  Can anyone explain this to me? I had always presumed that the output was simply separated by spaces, but now that I see the output separated by newlines, I would expect the output to be displaying on separate lines.  Example:  cpoweradm@debian:~/lpi103-4$ ls text* text1  text2  text3   od shows that the output is separated by newlines:  cpoweradm@debian:~/lpi103-4$ ls text* | od -c 0000000   t   e   x   t   1  \n   t   e   x   t   2  \n   t   e   x   t 0000020   3  \n 0000022   If newlines are present, then why doesn't the output display as:  text1  text2 text3 Proving by induction that $ \sum_{k=0}^n{n \choose k} = 2^n$ $\displaystyle \int\nolimits_0^8 \sqrt{x^4+4x^2}\,dx$.   Alright, so I thought I had this figured out. Here's what I did:   I factor out an $x^2$ to get $\sqrt{x^2(x^2+4)}$. I let $x = 2\tan(\theta)$, therefore the integrand is $\sqrt{4\tan^2(\theta)  (4\tan^2(\theta) + 4)}$. Factor out a 4 and it becomes $\sqrt{(16\tan^2(\theta)  (\tan^2(\theta) + 1))}$ Which equals $\sqrt{16\tan^2(\theta) \sec^2(\theta)}$ This is easy to take the sqrt of. The integrand becomes $4\tan(\theta)\sec(\theta)$. Now, the integral of this is $4\sec(\theta)$ And it's evaluated from $0$ to $\arctan(4)$ right? Because as $x$ goes to $0$, so does $\theta$, and as $x$ goes to $8$, $\theta$ goes to $\arctan(4)$... But the end result $(4 (\sec(\arctan(4)) - 1) )$ isn't the correct answer   I put it into WolframAlpha and I get $(8/3) (17\sqrt{17} - 1)$, which is the right answer. How did they get that? (there's no "show steps" option)  Any help is greatly appreciated!  PS, what's the syntax for doing sqrts and exponentials? How does Hextech Crafting work? How do you earn free loot?  What's the deal with essences and why are they so important?  What do the different options mean when dealing with Redeeming Rerolling Disenchanting and Upgrading?  How does it all work? Finding minimum bounding extent of given pixel value within raster? 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. Check if an image is loaded (no errors) with jQuery How to export/backup Notes in macOS in one go I have a lot of Notes on my machine which I don't want to loose. It's not logical to export them one by one. Is there any way to export them in one go, which would make me either use them on my new   I learned that I could backup ~/Library/Group Containers/group.com.apple.notes but I am not really sure if this would be helpful. This is what I get as for this directory.  $ du -sh ./* 4.0K    ./Library 256K    ./NoteStore.sqlite  32K    ./NoteStore.sqlite-shm 3.0M    ./NoteStore.sqlite-wal   I am running macOS Mojave. I would like to scale an image file for each dimension differently for example 50% of the x dimension or 25% of the y dimension. Thank you very much. How do I convert a light circuit with a single pole switch to use two 3-way switches? I have a box in the hall which includes a 3-way switch (with another switch at the other end of the hall), a single pole switch to the garage lights and a single pole switch to the exterior lights on the garage.  The single pole switch to the garage is wired with a 3 wire plus ground. The white and black wires feed the garage lights from the switch and the red wire feeds the garage ceiling outlets and is hot all the time.  In the garage I would like to add a 3-way switch for the garage lights and another 3-way switch for the exterior garage lights.  In other words I would like to be able to turn on both of those light locations from both the inside hall and the garage as well. I know that I will of course have to replace the existing single pole switches in the hall with 3-way switches and add a junction box in the garage with 2 3-way switches in it.  The thing that I don't know is what wiring connections I need to make.  Can you help? Fastest way to remove non-numeric characters from a VARCHAR in SQL Server I'm writing an import utility that is using phone numbers as a unique key within the import.  I need to check that the phone number does not already exist in my DB. The problem is that   phone numbers in the DB could have things like dashes and parenthesis and possibly other things. I wrote a function to remove these things, the problem is that it is slow and with thousands of records in my DB and thousands of records to import at once, this process can be unacceptably slow. I've already made the phone number column an index.  I tried using the script from this post:   But that didn't speed it up any.  Is there a faster way to remove non-numeric characters? Something that can perform well when 10,000 to 100,000 records have to be compared.  Whatever is done needs to perform fast.  Update Given what people responded with, I think I'm going to have to clean the fields before I run the import utility.   To answer the question of what I'm writing the import utility in, it is a C# app. I'm comparing BIGINT to BIGINT now, with no need to alter DB data and I'm still taking a performance hit with a very small set of data (about 2000 records).   Could comparing BIGINT to BIGINT be slowing things down?  I've optimized the code side of my app as much as I can (removed regexes, removed unneccessary DB calls). Although I can't isolate SQL as the source of the problem anymore, I still feel like it is. Does the shebang determine the shell which runs the script? How can I add the word "Chap" before the chapters numbers in the Toc in class report? At here  the word Chapter added in \documentclass{book}. Now I want to use them in \documentclass{report}. How can I do that? Find out if any files were exported from my MacBook SR Flip-Flop: NOR or NAND?