What is the different between var myFunc = new Object(function myFunc () {}) and function myFunc () {}? I didn't know you could create a function using new Object:  var myFunc = new Object(function myFunc () {})   Looking at the console, it seems identical to:  function myFunc () {}   Is there a reason to use new Object to create a function?
var functionName = function() {} vs function functionName() {} I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?
bash regex with quotes? Radius of Convergence of a given Power series How to rename a group of files with what looks like a Windows file path in their names I got a bunch of files with the filename messed up. All the file names have the same beginning which appear to be windows file directories. The problem is there are 700+ files and I really don't want go through and manually rename all of them. These are examples of the file names (Note: None of these have file directories):  G:some\really\long\file\path\then\the\name1.jpg G:some\really\long\file\path\then\the\name2.png G:some\really\long\file\path\then\the\filename.txt G:some\really\long\file\path\then\the\file_name.mov ...   The important take away is that each file has G:some\really\long\file\path\then\the\ before the file name that I would like.   So I would want the above files to look like:  name1.jpg name2.png filename.txt file_name.mov   I've tried the rename command and was not successful. I am still new with Linux and really am not sure on how to go about it or really what to google. Any help would be appreciated. Why are integers subset of reals? In most programming languages, integer and real (or float, rational, whatever) types are usually disjoint; 2 is not the same as 2.0 (although most languages do an automatic conversion when necessary). In addition to technical reasons, this separation makes sense -- you use them for quite different purposes.  Why did they choose to say $\mathbb{Z} \subset \mathbb{R}$ in math? In other words, why are 2 and 2.0 considered the same?  When you are working in $\mathbb{R}$, does it make any difference whether some elements, eg. 2.0, also belong to $\mathbb{Z}$ or not? Brackets in if condition: why am I getting syntax errors without whitespace? Why do we say "try and" [verb] instead of "try to" [verb]? (E.g., "Try and call me tomorrow.") I want to do research but I'm too old for a PHD I really love research. I started a research project in graduate school for my M.A. in English. My research topic is a very viable and interesting topic for a dissertation. I'll be 60 on my next birthday and I know that many Ph.D programs are traditionally geared toward younger students.I was wondering are there any programs that I can continue this research in without facing the issues of ageism in academia? Are PHP short tags acceptable to use? Deprecated: Function split() is deprecated. How to rewrite this statement? Attaching towel rail to drywall Whey I try to run the program Layout Editor (available on ) on Ubuntu 14.04.1 64-bit LTS I get the following output in the terminal:  $ layout layout: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by layout)   I tried the command strings on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 as following and here is the input and the output:  $ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_DEBUG_MESSAGE_LENGTH   How can I resolve this issue I somehow guess that it is related with GCC but cannot figure out how to fix the problem. Furthermore, I have tried a PPA as suggested on  and there is a similar question for an older version of Ubuntu at . However, after I ran sudo update I get numerous warnings and the list I obtained with the strings command did not have new entries after installing gcc 4.9, so I purged the PPA() with ppa-purge. Any help, suggestions on how to proceed are greatly appreciated. dynamic does not contain a definition for a property from a project reference How do I avoid conversation with strangers while traveling? Sufficiency to prove the convergence of a sequence using even and odd terms Dependency problem with mysql-server-core-5.5 When I start the Ubuntu software centre, it says I cannot do anything until the package catalog is repaired. However, repairing fails.  I ran sudo apt-get -f install and found the problem to be:  mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.24-0ubuntu0.12.04.1); however:   Version of mysql-server-core-5.5 on system is 5.5.28-0ubuntu0.12.04.2.   So, the question is, how do I install that version and resolve the dependency problem? $$\tan(\theta_1+\theta_2+\cdots+\theta_n)=\frac{S_1-S_3+S_5+\cdots}{1-S_2+S_4+\cdots}$$  where  $S_i$ denotes the sum of product of tangent of angles taken $i$ at a time.     For example,$$\tan(\theta_1+\theta_2)=\frac{S_1}{1-S_2}=\frac{\tan\theta_1+\tan\theta_2} {1-\tan\theta_1\tan\theta_2}$$   (This formula is given  in my textbook with no derivation or background)  How to derive this? Tips for getting really good answers on SO What is the practical difference between a differential and a derivative? I ask because, as a first-year calculus student, I am running into the fact that I didn't quite get this down when understanding the derivative:  So, a derivative is the rate of change of a function with respect to changes in its variable, this much I get.  Thing is, definitions of 'differential' tend to be in the form of defining the derivative and calling the differential 'an infinitesimally small change in x', which is fine as far it goes, but then why bother even defining it formally outside of needing it for derivatives?  And THEN, the bloody differential starts showing up as a function in integrals, where it appears to be ignored part of the time, then functioning as a variable the rest.  Why do I say 'practical'? Because when I asked for an explanation from other mathematician parties, I got one involving the graph of the function and how, given a right-angle triangle, a derivative is one of the other angles, where the differential is the line opposite the angle.   I'm sure that explanation is correct as far it goes, but it doesn't tell me what the differential DOES, or why it's useful, which are the two facts I need in order to really understand it.  Any assistance? Can anyone tell me how to judge if a supervised machine learning model is overfitting or not? If I don't have an external validation dataset, I want to know if I can use ROC of 10 fold cross validation to explain overfitting. If I have an external validation dataset, what should I do next? Error when installing: "unable to find a medium containing a live file system" Error message:  (initramfs) unable to find a live medium containing a live file system   I got this error while trying to install Ubuntu 10.10 from a bootable USB stick on to Asus X64J series laptop. After getting this error the installation fails to start.  I have used the same USB stick on some other laptops and the installation started as usual. Any help will be appreciated.