Due to personal preference I always install the package &quot;NGINX&quot; . I want to be 100% sure that I'm actually installing  it from there, and not from the Ubuntu-provided repository. How can I give it higher priority or, even better, disable the installation of the nginx package from the default repo?
I'm trying to figure out how to assign higher priority to one PPA over another PPA. I had a look on bunch of the answers on this forum but none of them solves my problem.  We have two PPA sources on some of our servers which we stick into separate files in /etc/apt/sources.list.d . Some of these repos provide same packages (in terms of names) but different versions and possibly different binaries. Is there a way how we can PRIORITISE one repo over another ?  I read apt_preferences tutorial but it could not be more obscure and didn't find the answers for my question. Here is the situation. WE have the following sources:  $ ls -l /etc/apt/sources.list.d  total 12 -rw-r--r-- 1 root root 66 Jan  2 16:50 nginx-source.list -rw-r--r-- 1 root root 84 Jan  2 16:49 ruby-ng-experimental-source.list   where nginx-source.list content is:  deb     http://ppa.launchpad.net/nginx/stable/ubuntu precise main   and ruby-ng-experimental-source.list content is:  deb     http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu precise main   Both of these sources provide nginx-full package of different versions etc. When I list the priorities ruby-ng-experimental-source.list is on top of output hence nginx-full is installed from that repo:  $ apt-cache policy nginx-full                                  nginx-full:   Installed: 1:1.2.3-1~38~precise1   Candidate: 1:1.2.6-1~43~precise1   Version table:      1:1.2.6-1~43~precise1 0         500 http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu/ precise/main amd64 Packages  *** 1:1.2.3-1~38~precise1 0         100 /var/lib/dpkg/status      1.4.1-1ppa0~precise 0         500 http://ppa.launchpad.net/nginx/stable/ubuntu/ precise/main amd64 Packages      1.1.19-1ubuntu0.1 0         500 http://mirror.rackspace.co.uk/ubuntu/ precise-updates/universe amd64 Packages      1.1.19-1 0         500 http://mirror.rackspace.co.uk/ubuntu/ precise/universe amd64 Packages   How do I prioritize repo listed in nginx-source.list over the one which is on top of the list now ? I tried something like this:  $ cat /etc/apt/preferences Package: nginx-full Pin: origin http://ppa.launchpad.net/nginx/stable/ubuntu Pin-Priority: 1000  Package: nginx-full Pin: origin http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu Pin-Priority: 100   But that has changed priorities of both sources to the same number - or something like that ? So this has NOT changed the priorities and nginx-full is still being installed form the brightbox PPA  $ apt-cache policy nginx-full   nginx-full:   Installed: 1:1.2.3-1~38~precise1   Candidate: 1:1.2.6-1~43~precise1   Package pin: (not found)   Version table:      1:1.2.6-1~43~precise1 1000         500 http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu/ precise/main amd64 Packages  *** 1:1.2.3-1~38~precise1 1000         100 /var/lib/dpkg/status      1.4.1-1ppa0~precise 1000         500 http://ppa.launchpad.net/nginx/stable/ubuntu/ precise/main amd64 Packages      1.1.19-1ubuntu0.1 1000         500 http://mirror.rackspace.co.uk/ubuntu/ precise-updates/universe amd64 Packages      1.1.19-1 1000         500 http://mirror.rackspace.co.uk/ubuntu/ precise/universe amd64 Packages   Anyone has any idea how to achieve what I'm trying to do ?
What is the !! (not not) operator in JavaScript? IVP Differential Equation I have stumbled across a very old exam question from my linear algebra course and the solutions are not available. I was wondering if my working/logic is correct and if any improvements can be made.     Let  $\ B=\begin{pmatrix}     1 &amp; -1 &amp; 4 \\     6 &amp; -7 &amp; 2 \\     -3 &amp; 1 &amp; -6       \end{pmatrix}\ $ and $\ \vec{v_1}=\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}$.      Part (i): Calculate $(B+5I)\vec{v_1}$ and $(B+5I)^2\vec{v_1}$.   Using simply matrix multiplication, I calculated $(B+5I)\vec{v_1}=\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}$ and $(B+5I)^2\vec{v_1}=\vec{0}$.     Part (ii): Find all eigenvalues and eigenvectors of B.   From our calculations in part (i), we can see that $\ \lambda=-5,-5$ are two of the eigenvalues, with corresponding eigenvector $\ \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}$ and generalised eigenvector $\ \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}$. From the trace of B, the remaining eigenvalue is $\lambda=-2$ with corresponding eigenvector $\begin{pmatrix} -2 \\ -2 \\ 1 \end{pmatrix}$.     Part (iii): Giving reasons, write down a basis for the generalised eigenspace $GE_{-5}$ of B.   I am unsure of this part of the question. If I had to guess, I would say a basis for $GE_{-5}=\left\{\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix},\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}\right\}$. Is this correct?     Part (iv): Solve the initial value problem $\vec{y'}=B\vec{y}$ where $\ B=\begin{pmatrix}     1 &amp; -1 &amp; 4 \\     6 &amp; -7 &amp; 2 \\     -3 &amp; 1 &amp; -6       \end{pmatrix}\ $ and $\vec{y}(0)=\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}$.   Well, the solution to this IVP will take the form $\vec{y}=e^{tB}\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}$. I noticed that $\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}$ was a generalised eigenvector and hence we can write $\vec{y}=e^{-5t}\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}+e^{-5t}\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}t$. Thus $\vec{y}=e^{-5t}\begin{pmatrix} 1+t \\ 1+2t \\ -1-t \end{pmatrix}$ Show that $\frac{1}{\sqrt{2\pi}} \cdot \left(\int_{- \infty}^{\infty} e^{itx} \cdot e^{-\frac{1}{2}t^2 } dx \right) = e^{-\frac{1}{2}t^2}$ I am struggling to show that $$\frac{1}{\sqrt{2\pi}} \cdot \left(\int_{- \infty}^{\infty} e^{itx} \cdot e^{-\frac{1}{2}x^2 } dx \right) = e^{-\frac{1}{2}t^2}$$  In the same paper we defined  $$F(t):=\left(\int_0^t e^{-x^2}\right)^2 \quad \text{ and} \quad  G(t):=\left( \int _0^1\frac{e^{-t^2(1+x^2)}}{1+x^2} \right)$$  I showed that both functions are differentiable with  $$F'= 2e^{-t^2} \cdot \int_0^t e^{-x^2}$$ $$G' = -2te^{-t^2} \cdot \int_0^1 e^{-x^2t^2}$$  It follows that $F' + G' = 0$ and $F + G = \frac{\pi}{4}$  With that I showed that $\int_{-\infty}^{\infty} e^{-x^2} = \sqrt{\pi}$.  Any help is appreciated. Easiest way to sort DOM nodes? If I have a list like this:  &lt;ul id="mylist"&gt;     &lt;li id="list-item1"&gt;text 1&lt;/li&gt;     &lt;li id="list-item2"&gt;text 2&lt;/li&gt;     &lt;li id="list-item3"&gt;text 3&lt;/li&gt;     &lt;li id="list-item4"&gt;text 4&lt;/li&gt; &lt;/ul&gt;   What's the easiest way to re-arrange the DOM nodes to my preference? (This needs to happen automatically when the page loads, the list-order preference is gained from a cookie)  E.g.  &lt;ul id="mylist"&gt;     &lt;li id="list-item3"&gt;text 3&lt;/li&gt;     &lt;li id="list-item4"&gt;text 4&lt;/li&gt;     &lt;li id="list-item2"&gt;text 2&lt;/li&gt;     &lt;li id="list-item1"&gt;text 1&lt;/li&gt; &lt;/ul&gt; I'm wondering what the preferred method is for dealing with AJAX calls. Should one use the same plugin php file to process the POST or a separate one? Which is cleaner or safer? How to prove that $z\gcd(a,b)=\gcd(za,zb)$ I need to prove that $z\gcd(a,b)=\gcd(za,zb)$.    I tried a lot, for example, looking at set of common divisors of the two sides, but I can't conclude anything from that. Can you please give me some advice how I can handle this problem? And $a,b,z \in \mathbb{Z}$. Anthology for children; contains story about friendly Martian on postapocalyptic Earth I'm looking for the title of an anthology of children's science fiction stories from the 1950s. The best of the bunch involved a Martian who visited earth, and realized we'd blown ourselves up in a nuclear war and had fallen into savagery. The Martian is a vegetarian who subsists on biscuits made by a machine he brought with him, and communicates by using one of his tentacles to feed messages direction to/from the brain of the person he's talking to.  Inadvertently left behind by his expedition, he initially befriended some children, and eventually managed to rebuild civilization. Presently he dies, but when another expedition comes a generation later, they find the civilization he rebuilt.  there were other stories, but that was the best one.   If I can't find the name of the book it was in, I'd be happy to settle for the name of the author and the title of the story. I want to draw a TikZ matrix with its border and I would like to define the distance between most external matrix nodes and matrix border. Something like a matrix inner sep. If I change inner sep in matrix options declaration, all nodes inside the matrix also change its inner separation.      I know how to do it with fit library. I just want to know if its possible without it. Why are my objects in all layers? Is there any gold standard for modeling irregularly spaced time series? Javascript: negative lookbehind equivalent? Is there a way to achieve the equivalent of a  in javascript regular expressions?  I need to match a string that does not start with a specific set of characters.  It seems I am unable to find a regex that does this without failing if the matched part is found at the beginning of the string.  Negative lookbehinds seem to be the only answer, but javascript doesn't have one.  EDIT: This is the regex that I would like to work, but it doesn't:  (?&lt;!([abcdefg]))m  So it would match the 'm' in 'jim' or 'm', but not 'jam' Schengen Visa Refusal: Justification for the purpose and conditions of the intended stay was not reliable Schengen refusal formulae can be difficult to understand sometimes.  Sometimes an applicant receives a refusal with:       Justification for the purpose and conditions of the intended stay was not reliable.     often accompanied by:       Your intention to leave the territory of the Member States before the expiry of the visa applied for could not be ascertained.   What is meant by this refusal reason?  What are they trying to say? Do we have $\lim_{h\to 0^+}\int_0^\infty|f(t+h)-f(t)|dt=0$? Let $f:\mathbb{R^+}\to\mathbb{R}$ be an integrable function ($f\in L^1(\mathbb{R}^+,\mathbb{R})$). Do we have $$\lim_{h\to 0^+}\int_0^\infty|f(t+h)-f(t)|dt=0$$ ? How can we prove it ? GeoJSON does not appear on my Leaflet map I'm a beginner in Leaflet and I need help to deal with GeoJSON files.  I succeeded in creating a Leaflet basemap. I can add markers without troubles but I cannot manage to show a GeoJSON layer.  Here is the code I picked up from Leaflet Tutorials website  :  var geojsonFeature = {     "type": "Feature",     "properties": {         "name": "Coors Field",         "amenity": "Baseball Stadium",         "popupContent": "This is where the Rockies play!"     },     "geometry": {         "type": "Point",         "coordinates": [-104.99404, 39.75621]     } }; L.geoJSON(geojsonFeature).addTo(map);   Unfortunatly, the GeoJSON does not appear in my map.   Can you tell me where I missed something ?    Alright, you're fine Francisco, this part was OK. I changed the whole script and it works !  However, would you know how to load a GeoJSON from an external source ?  I tried this :   var geojsonLayer = new L.GeoJSON.AJAX("foo.geojson");        geojsonLayer.addTo(map);   from   but this definitely does not work.  Any ideas ?    I am not skilled enough to understand your advice.  Here is the whole code I am using to create my map :  &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;data&lt;/title&gt; &lt;meta charset="UTF-8"&gt; &lt;link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /&gt; &lt;script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"&gt;&lt;/script&gt; &lt;script src="https://code.jquery.com/jquery-3.1.1.min.js"&gt;&lt;/script&gt;   &lt;script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.3.0"&gt;&lt;/script&gt; &lt;script src="/js/leaflet-0.7.2/leaflet.ajax.min.js"&gt;&lt;/script&gt; &lt;script src="htdocs/webmap101/leaflet.ajax.min.js" type="text/javascript" &gt;&lt;/script&gt; &lt;style&gt;    #map {width: 960px; height:700px;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt;   &lt;div id="map"&gt;&lt;/div&gt; &lt;script&gt;   // create map var lat = 44.933331; var lon = 4.9;  var map = L.map('map',{center: [lat,lon],zoom: 6});   // basemaps var base = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',   {attribution: '© &lt;a href="http://osm.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors'  }); var toner = new L.StamenTileLayer("toner"); var watercolor = new L.StamenTileLayer("watercolor"); var landscape = L.tileLayer('https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png'); base.addTo(map);   // markers  var mark1=L.marker([lat,lon]) mark1.addTo(map)    // layers panel  L.control.layers({"base": base, "water": watercolor, "toner": toner , "landscape" : landscape}).addTo(map);    // geojson files var geojsonFeature = {     "type": "Feature",     "properties": {         "name": "Coors Field",         "amenity": "Baseball Stadium",         "popupContent": "This is where the Rockies play!"     },     "geometry": {         "type": "Point",         "coordinates": [-104.99404, 39.75621]     } }; L.geoJSON(geojsonFeature).addTo(map);    //ajax  var geojsonLayer = new L.GeoJSON.AJAX("foo.geojson");        geojsonLayer.addTo(map);  &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;   I know it's a bit messy but this is actually my very first HTML script... I guess I did not include in a proper way the AJAX library.    Actually, I just want a solution to replace the lines where I create the GeoJSON by something that tells javascript to load the GeoJSON stored locally in my folder. This :  var geojsonFeature = {     "type": "Feature",     "properties": {         "name": "Coors Field",         "amenity": "Baseball Stadium",         "popupContent": "This is where the Rockies play!"     },     "geometry": {         "type": "Point",         "coordinates": [-104.99404, 39.75621]     } };   should be transformed into something like (I don't know if it exists) :  var geojsonFeature = [foo.geosjon]   where "foo.geosjson" is a file like :  { "type": "FeatureCollection", "name": "abies", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature" Is there any quality difference between PNG vs BMP image formats? I have just learned that PNG is a lossless image format while BMP can be both uncompressed or lossless format. Should there be a quality difference between these two? If not, does it mean that other lossless formats like TIFF, JPEG2000 and PNG offer the same quality as BMP? Enlarged partition, filesystem still reports old size Let $1, \omega, \dots, \omega^{n-1}$ be the roots of the equation $z^n-1=0$, so that the roots form a regular $n$-gon in the complex plane. I would like to calculate $$ \prod_{j \ne k} (\omega^j - \omega^k)$$  where the product runs over all $j \ne k$ with $0 \le j,k &lt; n$.    My attempt so far  Noting that if $k-j = d$ then $\omega^j - \omega^k = \omega^j(1-\omega^d)$, I can re-write the product as $$ \prod_{d=1}^{\lfloor n/2 \rfloor} \omega^{n(n-1)/2}(1-\omega^d)^n$$  I thought this would be useful but it hasn't led me anywhere.  Alternatively I could exploit the symmetry $\overline{1-\omega^d} = 1-\omega^{n-d}$ somehow, so that the terms in the product are of the form $|1-\omega^d|^2$. I tried this and ended up with a product which looked like $$\prod_{j=0}^{n-1} |1 - \omega^j|^n $$  (with awkward multiplicative powers of $-1$ left out). This appears to be useful, but calculating it explicitly is proving harder than I'd have thought.  The answer I'm expecting to find is something like $n^n$.    My motivation for this comes from Galois theory. I'm trying to calculate the discriminant of the polynomial $X^n+pX+q$. I know that it must be of the form $ap^n+bq^{n-1}$ for some $a,b \in \mathbb{Z}$, and putting $p=0,q=-1$, the polynomial becomes $X^n-1$. This has roots $1, \omega, \dots, \omega^{n-1}$, so that $(-1)^{n-1}b$ is (a multiple of) the product you see above. An expression for $a$ can be found similarly by setting $p=-1,q=0$. How do I get attention for old, unfixed bug reports and feature requests without official responses here on Meta? How can Finder empty Trash more quickly than "rm -rf /Volumes/Foo/.Trashes/501/*"? The "Trash" of a 16-GB usb2 flash drive had 3.4-GB of data. I emptied it as such:     $ cd /Volumes/FooDrive/.Trashes/501   $ rm -rf *   This took over 5-seconds. That seemed pretty long. So, as a test I just decided to empty the Trash of all of my drives via Finder. Other drives: 2-TB usb3 500-GB usb2 16-GB usb2 250-GB ssd  I measured the size of the Trash as such:       $ du -ch /Volumes/WhateverDrive/.Trashes   There was 15-GB in the Trash of the 500-GB drive, and 5-GB in the Trash of my other 16-GB flash drive. I didn't measure the other drives.  Finder appeared to take much less than 5-seconds to empty the Trash for all those drives.   Does Finder really empty the Trash so much more quickly than /bin/rm? How?   Does Finder just make the "clicking sound" (signaling the trash is empty) before the Trash on all the drives is really empty? How to find out if an item is present in a std::vector? All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.  if ( item_present )    do_this(); else    do_that();