can not define a function inside jquery? ... undefined
Unable to make recursive call in Javascript
How to test if these two samples are from the same distribution? (These are tweets located near some tourist attractions.     If yes, is there a simple implementation in Python? How do I change the default session for when using auto-logins? When autologon is active, lightdm will start the Unity 3D session, not the 2D (or any other shell that I want to auto-login to).  Is there a way to start the shell I want automatically (autologon)?  Anyway, if autologon is disabled, the last used session is launched, and that's fine. I just want to choose which is default with autologon. There appears to be a poltergeist in my speakers (no, really) I've no idea if there's a suitable Stack Exchange for poltergeists. It appears to be software, hardware or virus related, so I thought I'd try here, seeing as Ghostbusters is just a film, so I can't call them.  I'm not going mad, and this isn't a joke.  There's what appears to be a radio stream coming out of my speakers, except I can only hear it when the volume knob is turned down to the min setting whilst the speakers are on, which makes no sense. Sometimes it's French, which also makes little to no sense.  The speakers are Logitech 5.1s, I forget the model number, and I'm running XP 64bit. If that makes a difference.  I'd suspect it could be some sort of crazy virus, but I've been randomly killing processes whilst the poltergeist is active and it hasn't killed it, so I'm not sure about that.  Once again, I'm perfectly sane and this really isn't a joke. Perhaps other people have had this problem but have been too afraid of the reaction to ask anyone (please don't have me committed to an insane asylum).  Googling for strange noises coming from speakers didn't really get me anywhere. Has anyone heard of a virus that can do this and affect the volume controls on the hardware in that way? The game  has a very unique intro that I would like to show my friend again for the first time. I'm not sure how to reset all my progress on this game to achieve this though. Any thoughts? Adding tags to files in OS X: How to use, where are tags stored, and will they work on a network? I've heard it is possible to add tags to a file's meta data in OS X, and have Spotlight search through such tags.   In a nutshell, how would one access this feature in Finder &ndash; not Spotlight (Command+Space) &ndash; but the adding of tags themselves? Where are these tags stored?  Do they go in .DS_Store (I tend to delete those!) or elsewhere in the filesystem? Does this tagging mechanism work on removable drives?  What are the requirements? Does this tagging mechanism work over a network share?  I have some Windows SMB network shares at home that I frequently store files on.  Would it work on those or is another configuration required? Aside from Spotlight, are there any command-line tools for searching through or accessing the tag data for files?   Thank you! I was setting up up android-studio referring to . While installing oracle-java7-installer, this error is displayed:  sudo apt-get install oracle-java7-installer [sudo] password for cyan:  Reading package lists... Done Building dependency tree        Reading state information... Done oracle-java7-installer is already the newest version (7u80+7u60arm-0~webupd8~1). The following package was automatically installed and is no longer required:   snap-confine Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ... Downloading Oracle Java 7... --2017-11-27 08:40:47--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 223.223.158.138, 223.223.158.136 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following] --2017-11-27 08:40:47--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.58.58.93, 2600:140f:7:18e::2d3e, 2600:140f:7:18d::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.58.58.93|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 [following] --2017-11-27 08:40:48--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-11-27 08:40:50 ERROR 404: Not Found.  download failed Oracle JDK 7 is NOT installed. dpkg: error processing package oracle-java7-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1)   How do I fix this error? I did a fresh installation of Ubuntu 16.04. I have two question concerning information content of qubit.  Question 1: How many classical bits are needed to represent a qubit:  A qubit can be represented by a vector $q = \begin{pmatrix}\alpha \\\beta \end{pmatrix}, ~~ \alpha, \beta \in \mathbb{C}$. So, we need four real numbers to represent it. But when facts that (i) $|\alpha|^2+|\beta|^2 = 1$ and (ii) two qubits which differ in global phase only are indistinguishable, are taken into account, only two real numbers are necessary (angles on Bloch sphere). Moreover, we can choose a precission of the qubit representation (i.e. number of decimal places in $\alpha$ and $\beta$ or Bloch sphere angles) which influence number of classical bits needed to described the qubit.   So, it seems to me that the qubit representation cannot be used for measuring qubit information content but only memory consumption in simulation. Am I right?  Question 2: What is an (effective) information content of qubit:  A superdense coding enable us to send two classical bits via one qubit. But on the other hand you need two entangled qubits prepared in advance.  Given these facts, what is an information content of qubit? One or two classical bits? Or do I need to use another angle of view given the fact that qubits are "continuous" (i.e. described by complex numbers $\alpha$ and $\beta$)? Understanding NSString comparison how to suppress "chapter" in \chapter (while keeping numbering) Is there a regular expression to validate an email address in JavaScript? Given that the sequence $(v,Av,A^2v,...,A^nv)$ is linearly dependent (1), $A_{n \times n}$, over $\mathbb{F^n}$ prove that scalars $c_0,c_1,..,c_n$ exist (such that not all of them are zeroes) such that the matrix $M=c_0I+c_1A+..+c_nA^n$ is singular.    First I'm not sure how (*) can be used here exactly. We can say that the sequence $(c_0I,c_1A,..,c_nA^n)$ resembles the sequence (1) where $v=I$. But here we have scalar $c_i$ so it's not exactly the same sequence.   Maybe I could say that the sequence $(c_0I,c_1A,..,c_nA^n)$ is linearly dependent because it has $n+1$ elements while over $dim\mathbb{F^n}=n$ $\quad$(2).  Intuitively I understand that suppose we sum all the matrices $c_iA^i$ and then in the last sum operation we get to some $c_jA^j$ and if it's a linear combination of other matrices then we can have such a $c_j$ that: $$ c_oI+\sum_{i=1}^{n-1} c_iA^i+c_jA^j=0 $$ But I don't think this is enough to prove. I'm far from being a physics expert and figured this would be a good place to ask a beginner question that has been confusing me for some time.  According to Galileo, two bodies of different masses, dropped from the same height, will touch the floor at the same time in the absence of air resistance.  BUT Newton's second law states that $a = F/m$, with $a$ the acceleration of a particle, $m$ its mass and $F$ the sum of forces applied to it.  I understand that acceleration represents a variation of velocity and velocity represents a variation of position. I don't comprehend why the mass, which is seemingly affecting the acceleration, does not affect the "time of impact".  Can someone explain this to me? I feel pretty dumb right now :) This is a story that was read on BBC radio about thirty years ago, and this is about as right as I can remember it: The human pilot of a spacecraft is doing some reconnaissance on an alien planet. He crashes but survives. For some reason, no one will know where to look for him. He sees something in the distance that looks like a building of some sort. When he gets there, it seems to be a home. Very much like a human home. There's furniture, but it's strange and uncomfortable . There's food, but it's inedible. There's a faucet but what comes out of it seems more like acid. Everything looks as though it should be right, but it's not. He leaves the house, wanders and after a few days is desperate for water. But there isn't any water anywhere. He's close to death, crawling on the ground and then something happens. There are cracks in the soil and there appears to be water bubbling up from perhaps some underground stream. The water revives him. He goes back to the house and tries the food again. It's delicious and he eats enough to gain back his strength. Then he decides to try the water again. It's pure and wonderful. He takes a shower and the last line of the story is how refreshing the water is on his skin and something about him lifting his tail. Proof that a sequence of continuous functions $(f_n)$ cannot converge pointwise to $1_\mathbb{Q}$ on $[0,1]$ Automatic line breaking of long lines of text? Here, it is just a example. I have a line:  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa   Now, I want to let LaTeX automatically wrap the line according to the width of the text block/margins. Fspy add-on not installing Escaping both forward slash and back slash with sed In thinking how to ask this question (somewhat) succinctly, I keep coming back to a Microwave Oven.  A Microwave Oven has a grid of holes over the window specifically designed to be smaller in diameter than the wavelength of the microwaves it produces, yet larger than the wavelengths of the visible light spectrum - this is so you can watch your food being heated without getting an eye full of microwaves.  The "realness" of electromagnetic waves seems indisputable - both from the microwave example above, and also because if I want to broadcast a radio wave with a certain wavelength, then I need to make sure I have an antenna of corresponding length to produce the wave I'm looking for.  Furthermore, we discuss and treat these waves as real, measurable "objects" that exist and can be manipulated.     Now, if I want to describe the behavior of my Microwave Oven in the framework of QM (let's pretend my oven is going to only produce 1 photon of energy corresponding to a wavelength of the microwave spectrum for simplicity) then I'll describe the behavior of that photon as a wavefunction that evolves over time and gives a probability distribution within my microwave that similarly does not allow the photon to pass through the safety grid and exit the oven cavity giving me a retinal burn.  The difference is, the wavefunction is never treated as something "real" in this description.  When the safety grid is described as working to protect you because it has holes smaller than the wavelength of the classical waves it's blocking, this is a useful description that seems to describe "real" objects/be-ables.  While it is possible to describe why an individual photon has low probability of passing through the same grid but extended physical properties such as wavelength (in space) are treated as non-real because we're dealing with a point particle and with behavior described by something we also treat as non-real (the wavefunction); it seems unclear to me why we insist this wave function which predicts behavior of physical measurements so well is somehow "non-real."    Put another way, if we have no problem treating EM waves as "Real," then why do we insist on treating the wavefunction that describes the same behavior as "unreal?"  I understand there is recent research (Eric Cavalcanti and his group for one) trying to argue this point, but as every respectable physics professor, I've ever encountered, has treated the wavefunction as an indisputably non-real mathematical tool, I needed to ask this community for an answer. How do I sort a dictionary by value? I have two user profile fields "Last Name" and "First Name". I also have a user list views. I want to expose "Name" as filter which can search for both Last Name and First Name. How can I do single filter of combination of those two fields? Can I create it from views UI?  One possible way is to create another profile field "Name" which will be hidden in the form. On user save, I would combine the two field values into the "Name" field and then expose it as filter in the views. But this solution is hard coding and it needs to write hooks.