Alex likes neither candy nor cake.   Alex don’t like candy and cake.      What is the difference in meaning between these two sentences?
When I have these facts,   French coins were not found in the ruin. German coins were not found in the ruin.   which of these sentences are grammatically correct?  1.     No French and German coins were found in the ruin.   2.     No French or German coins were found in the ruin.   3.     No french nor German coins were found in the ruin.   I think 1 is correct but I'm not sure.  By the way, I can also say     Neither German nor French coins were found in the ruin.   Also, when you have an additional fact   Italian coins were not found in the ruin   which of these statements are grammatically correct?  1.     No French, German and Italian coins were found in the ruin.   2.     No French, German or Italian coins were found in the ruin.   3.     None of French, German and Italian coins were found in the ruin.   4.     None of French, German or Italian coins were found in the ruin.   Thanks,
Firefox application associations not working in the 'Downloads' window I am trying to write a bash script for testing that takes a parameter and sends it through curl to web site.  I need to url encode the value to make sure that special characters are processed properly.  What is the best way to do this?    Here is my basic script so far:  #!/bin/bash host=${1:?'bad host'} value=$2 shift shift curl -v -d "param=${value}" http://${host}/somepath $@ I saw this question: .  My situation is a little different though.   My target moves, and the shooter moves.  Also, the shooter's velocity is added to the bullets' velocities, i.e. bullets fired while sliding to the right will have a greater velocity toward the right.   What I'm trying to do is to get the enemy to be able to determine where they need to shoot in order to hit the player.  Using the linked SO solution, unless the player and enemy are stationary, the velocity difference will cause a miss.  How can I prevent that?      Here is the solution presented from the stack overflow answer.  It boils down to solving a quadratic equation of the form:  a * sqr(x) + b * x + c == 0   Note that by sqr I mean square, as opposed to square root. Use the following values:  a := sqr(target.velocityX) + sqr(target.velocityY) - sqr(projectile_speed) b := 2 * (target.velocityX * (target.startX - cannon.X)       + target.velocityY * (target.startY - cannon.Y)) c := sqr(target.startX - cannon.X) + sqr(target.startY - cannon.Y)   Now we can look at the discriminant to determine if we have a possible solution.  disc := sqr(b) - 4 * a * c   If the discriminant is less than 0, forget about hitting your target -- your projectile can never get there in time. Otherwise, look at two candidate solutions:  t1 := (-b + sqrt(disc)) / (2 * a) t2 := (-b - sqrt(disc)) / (2 * a)   Note that if disc == 0 then t1 and t2 are equal. Has Wonder Woman ever killed a mortal in anger? Roll a 6-sided die until the total $\geq M$. Mean amount by which $M$ is exceeded? Here is the question:  You roll a fair 6-sided dice iteratively until the sum of the dice rolls is greater than or equal to M. What is the mean and standard deviation of the sum minus M when M=300?  Should I write a code to answer these kind of questions?  Please give me some hints on that. thanks! I've upgraded from 12.04 to 14.04 via command-line when my system froze, had to do REISUB and dpkg --configure -a to recover from crash after rebooting.  Now everything seems to work except automatically mounting external thumb drives and external hard disk drives. After plugging in said drives, they fail to show up on the left pane and remains unmounted. I can see the device if I run lsusb and fdisk though, so it's possibly to manually mount it but I'd rather resolve why it's not automatically mounting. Why are properties lost in the Cayley–Dickson construction? What's a way to implement a flexible buff/debuff system? Determining a matrix from its characteristic polynomial I use a Windows 10 machine remotely at work. Both the local and remote machine are in the same ISP network (not same local network, but same ISP). I've been using it like that for almost a year now and I had never experienced absolutely any issues.  Until recently. I don't know if anything specific triggered this behavior, but I feel that it started happening after I upgraded the remote to W10 1903. I later upgraded the local one as well and I feel that it only made the problem worse (but I don't really have any data).  From time to time, the session will freeze - the image stops updating. However, what I type and mouse clicks are still being sent. No error message is shown whatsoever, the image simply freezes. To make it work again, I have to close and re-open the session. Everything that I had typed and/or clicked while it was frozen is there.  Is there any way I can debug this? Swapping right shift and delete key using xmodmap I'm unsure how to swap these 2, this is the thought process I had but am unsure how to get it working:  remove sh = Shift_R remove dl = Delete  keysym Delete = Shift_R keysym Shift_R = Delete  add sh = Delete add dl = Shift_R   This is based on the code I use to swap caps lock and control.  Any thoughts?  xmodmap output:  dan@lantea:~$ xmodmap -pke | grep Shift_R keycode  91 = Shift_R NoSymbol Shift_R keycode 119 = Shift_R NoSymbol Shift_R dan@lantea:~$ xmodmap -pke | grep Delete keycode  62 = Delete NoSymbol Delete Summing data from column in the Attribute table I'm working with population data, and I have an issue when it comes to knowing the sum of a population inside the attribute table.  In my attribute table, I'd like to add all the numbers in the red box, i.e. all the numbers together from the column &quot;UN_2015_E&quot;. Is there a way to do so? How do I wrap a macro definition in an environment? I'm creating a style file, and want to store the body text of the abstract environment so that I can put it on my custom titlepage. I could have required that my users enter the abstract as  \customabstract{Abstract text goes here}`   which I would have implemented as something like  \newcommand{\customabstract}[1]{\gdef\abstracttext{#1}}   However, I would prefer that the user is able to use environment notation,  \begin{customabstract}Abstract text goes here\end{customabstract}   To do this, I thought I could define something like  \newenvironment{customabstract}{\gdef\abstracttext\bgroup}{\egroup}   But this definition makes \abstracttext expand to \bgroup, which is not what I wanted. I tried to solve the problem by \expandafter,  \newenvironment{customabstract}{\expandafter\gdef\expandafter\abstracttext\bgroup}{\egroup}   but this results in a runaway error.  Is there any way to acheive what I want? Answers that helps me understand the inner workings of TeX (instead of just referring to a custom package) are preferred. Fatal error: Class 'SelectQuery' not found in includes/database/database.inc on line 813 Fatal error: Class 'SelectQuery' not found in /home/content/71/11241671/html/drupal/includes/database/database.inc on line 813   We built a site in a subfolder called /drupal while building the site, and then moved the files to the root directory when we were finished but it gave the above error on a WSOD.  I have tried:    flushing the cache before moving  tried the registry rebuild truncating and replacing the registry and registry_file tables with a fresh install copy, and rebuilding the registry again rewrite base in htaccess setting a new base url in settings.php   But nothing has worked.  The second we put the files back into the /drupal folder, it works again. It also looks like the error mentions the file in the /drupal directory, which isnt there anymore.   This is on 7.37   Anyone have any ideas? Should I really have been awarded mortarboard on a Per-site meta? Is PCA still done via the eigendecomposition of the covariance matrix when dimensionality is larger than the number of observations? I have a $20\times100$ matrix $X$, containing my $N=20$ samples in the $D=100$-dimensional space. I now wish to code up my own principal component analysis (PCA) in Matlab. I demean $X$ to $X_0$ first.  I read from someone's code that in such scenarios where we have more dimensions than observations, we no longer eigen-decompose the $X_0$'s covariance matrix. Instead, we eigen-decompose $\frac{1}{N-1}X_0X_0^T$. Why is it correct?  The normal covariance matrix is of size $D\times D$, each element of which tells us the covariance between two dimensions. To me, $\frac{1}{N-1}X_0X_0^T$ is not even of the correct dimensions! It is $N\times N$ matrix, so what would it tell us? Covariance between two observations?! Allowed Wave Functions of System Given a single-particle system with Hamiltonian $H$, what constraints can be put on the wave function at a particular point in time $\psi(x)$? Of course $\psi(x)$ must obey boundary conditions given by $H$. However, in situations where $H$ does not yield strict boundary conditions (e.g. the harmonic oscillator) can $\psi(x)$ be any normalised function? My intuition says no for the following reason: QM textbooks say that any valid wave function can be represented as a linear combination of the eigenstates of $H$. In the case of the harmonic oscillator, the eigenstates of $H$ are a countably infinite set. However the set of all normalised functions is uncountably infinite. It seems to me that one cannot change between one complete set of basis functions to another and reduce the "dimensionality" somehow. This makes me think that the eigenstates of $H$ are not complete, that they imply some constraints on $\psi(x)$. This is not an area of mathematics that I understand well. Can somebody help me out? Distribution of the digits of Pi Difference between ulimit, lsof, cat /proc/sys/fs/file-max I've been getting java.io.IOException: Too many open files while running a Kafka instance and using one topic with 1000 partitions so I started investigating the file descriptors limits in my ec2 vm. I cannot understand which is exactly the limit for open files on a Centos 7 machine since all the following commands produce different results. The commands are:   ulimit -a: open files 1024 lsof | wc -l: 298280 cat /proc/sys/fs/file-max: 758881 (which is consistent with /proc/sys/fs/file-nr)   If the actual limit is the one the last command produces then I am well below it (lsof | wc -l: 298280). But if this is the case, the output of the ulimit command is quite unclear to me since I am well above the 1024 open files.   but are there all these seemingly "inconsistencies" between these commands? I am failing to add a heading for the appendix to the ToC with the correct page number:  \documentclass{scrbook} \begin{document} \tableofcontents \chapter{test} \appendix \addcontentsline{toc}{part}{\appendixname} \chapter{First Appendix} \end{document}     I also tried to use the \addappheadtotoc command from the  package, but that changes nothing (expect that it writes 'Appendices' instead).  I assume that the appendix package provides the solution, but I could not figure out how to use it.