How can I hide the /node page in Drupal 8?   This site:  describes the reasons for hiding it and the process for Drupal 6 and 7, though no information for Drupal 8 now  has been removed.
In other words, what is the Drupal 8 equivalent of ?  Drupal 8 still uses hook_menu(), but for what I can see, the information returned by the hook is different from what the hook returned in Drupal 7. For example, the definition given in user_menu() for user is the following.    $items['user'] = array(     'title' =&gt; 'User account',     'title callback' =&gt; 'user_menu_title',     'weight' =&gt; -10,     'route_name' =&gt; 'user_page',     'menu_name' =&gt; 'account',   );   The route_name property links to an entry in the  file.  user_page:   pattern: '/user'   defaults:     _content: '\Drupal\user\Controller\UserController::userPage'   requirements:     _access: 'TRUE'   This is different from what done with Symphony, and it confuses me about how a module can alter the route defined from another user.  The only function that is still invoking hook_menu_alter() is menu_router_build(), but that function still contains code that needs to be updated, since it is still using the now deprecated drupal_alter().    // Alter the menu as defined in modules, keys are like user/%user.   drupal_alter('menu', $callbacks);   foreach ($callbacks as $path =&gt; $router_item) {     // If the menu item is a default local task and incorrectly references a     // route, remove it.     // @todo This may be removed later depending on the outcome of     // http://drupal.org/node/1889790     if (isset($router_item['type']) &amp;&amp; $router_item['type'] == MENU_DEFAULT_LOCAL_TASK) {       unset($callbacks[$path]['route_name']);     }     // If the menu item references a route, normalize the route information     // into the old structure. Note that routes are keyed by name, not path,     // so the path of the route takes precedence.     if (isset($router_item['route_name'])) {       $router_item['page callback'] = 'USES_ROUTE';       $router_item['access callback'] = TRUE;       $new_path = _menu_router_translate_route($router_item['route_name']);        unset($callbacks[$path]);       $callbacks[$new_path] = $router_item;     }   }
states:  Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.  However if the class/method/function that I am importing is only used in rare cases, surely it is more efficient to do the import when it is needed? Isn't this: class SomeClass(object):      def not_often_called(self)         from datetime import datetime         self.datetime = datetime.now()  more efficient than this? from datetime import datetime  class SomeClass(object):      def not_often_called(self)         self.datetime = datetime.now() Commutator subgroup and cyclic normal subgroup I have a geotiff raster image that has a coordinate system with longitudes from 0 to 360. The horizontal center of the image is 180 longitude. See image below:    I want to transform it to EPSG:4326 SRS with -180 180 longtitude range.  And I want the center of the image to be at Greenwich meridian (0). I guess this srs is very widely used. I expect the result look like this:    So I use a gdalwarp command to reproject:  gdalwarp -s_srs '+proj=latlong +datum=WGS84 +pm=180dW' -t_srs EPSG:4326 test_col.tif test_4326.tif   But I only get a tiff with bigger dimensions (more pixels) and EPSG:4326 metadata. The image itself looks the same, as the initial one. But I expect it to swap the hemispheres.  How do I gdalwarp an image to be strictly -180 180 EPSG:4326 with the center in 0 longitude?  This is gdalinfo of my initial file:  Origin = (-0.102272598067084,89.946211604095552) Pixel Size = (0.204545196134167,-0.204423208191126) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=BAND Corner Coordinates: Upper Left  (  -0.1022726,  89.9462116) (  0d 6' 8.18"W, 89d56'46.36"N) Lower Left  (  -0.1022726, -89.9462116) (  0d 6' 8.18"W, 89d56'46.36"S) Upper Right (     359.897,      89.946) (359d53'50.18"E, 89d56'46.36"N) Lower Right (     359.897,     -89.946) (359d53'50.18"E, 89d56'46.36"S) Center      ( 179.8975000,  -0.0000000) (179d53'51.00"E,  0d 0' 0.00"S)   This is gdalinfo after gdalwarp     Origin = (-180.102727401932952,89.946211604095552) Pixel Size = (0.091397622896436,-0.091420837939082) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=PIXEL Corner Coordinates: Upper Left  (-180.1027274,  89.9462116) (180d 6' 9.82"W, 89d56'46.36"N) Lower Left  (-180.1027274, -89.9699975) (180d 6' 9.82"W, 89d58'11.99"S) Upper Right ( 179.8211116,  89.9462116) (179d49'16.00"E, 89d56'46.36"N) Lower Right ( 179.8211116, -89.9699975) (179d49'16.00"E, 89d58'11.99"S) Center      (  -0.1408079,  -0.0118929) (  0d 8'26.91"W,  0d 0'42.81"S) Convergence of the arithmetic mean Let $(a_n)_{n \in \mathbb{N}}$ be a convergent sequence with limit $a \in \mathbb{R}$. Show that the arithmetic mean given by: $$s_n:= \frac{1}{n}\sum_{i=1}^n a_i \tag{A.M.} $$ also converges to $a$.  I have read:  but unfortunately the answers there don't help me much because I don't understand their substitutions and most of it all, why their substitutions seem to work.   What I know from the problem is that since $a_n$ is convergent and $\epsilon &gt;0$ is given, I can say that:   $$\exists N_1 \in \mathbb{N}, \forall n \geq N_1: |a_n-a|&lt;\epsilon_1 $$ I also know that since $a_n$ is convergent, it is bound, so $(a_n) &lt; M, \ \forall n \in \mathbb{N}$   I need to show that: $$\exists N_2 \in \mathbb{N}, \forall n \geq N_2: |s_n-a|&lt; \epsilon_2$$ I started as follows: $$ \left|s_n-a \right| = \left|\frac{1}{n}\sum_{i=1}^na_i -a\right|= \left|\frac{1}{n}\sum_{i=1}^m(a_i-a)+\frac{1}{n}\sum_{i=m+1}^n(a_i-a) \right| \\ \leq \frac{1}{n} \sum_{i=1}^m|(a_i-a)|+\frac{1}{n}\sum_{i=m+1}^n|a_i-a|$$ I believe to understand that the left sum after the $\leq$ is finite, bound and doesn't depend on the values that $n$ takes on. However, I don't understand where all the substitutions come from and make this proof so seemingly easy to complete.   Is there a general idea I can follow to complete such proofs? Because I know that the last step is to show that the given sum is smaller than $\epsilon$. I also know that I should bring the condition $a_n &lt; M$ into place somewhere, but I don't know where.  If I choose an $n \geq N: |a_n-a|&lt; \epsilon'$ what does that tell me about $|a_i-a|$? I know that they are seemingly the same just with a different index. How do you make USB bootable on chromebook I have a chromebook series 5. I want to install Ubuntu onto a USB stick. When I downloaded Ubuntu onto my USB stick, it won't start up.  Do I first have to download Ubuntu onto my chromebook hard drive, open Ubuntu and then make USB stick bootable? And then return back to chrome?  Or is there a way to download directly onto USB and make the stick bootable?  I appreciate any help. I was wondering if there are any alternatives to  tools.  Thinking about it for a bit, I think the only alternative is to use R or RPY to do the analysis.   Basically I'm trying to solve routing problems based on nonPostGIS databases. As most of my data is actually stored in a different format; however, it's not to hard to convert. I'm finding that pgRouting to my dumb silly brain is difficult to implement. So perhaps a non-database solution that I can easily tweak would be ideal for me I know I've seen somewhere how to typeset 1/2 as ½, but with arbitrary fractions (that is, a macro that takes two arguments and makes the first denominator and the second numerator...). Now I can't seem to find it.  How do I typeset an arbitrary fraction the same way as ½? Controversy over verb choice in "neither you nor I {is/am/are} in control" My adoptable storage is full. How can I move the data to a bigger MicroSD card? I've got a Moto G 2014 LTE running CM13. When I found out about the whole 'adopt SD card as internal storage' thing, I was quite excited, as the actual internal storage on this phone is tiny. I set up a 16gb micro SD, the biggest I had at the time, and have been using it with minimal problems.  Fast-forward to this day, and I now have a 64gb micro SD that I want to use instead of the 16gb one. However, I'm at a loss as to the best way to copy the data over onto the new one, or if it's even possible. The ideas I've got so far include:   Titanium Backup all [system] apps, factory reset, format new SD and then restore (should work, but a massive pain) NANDroid the SD card onto a USB OTG stick, then restore to the new one (pretty sure this is a bad idea and won't work, but...) Copy all the stuff onto my computer via my phone through a file manager of some sort (I have a linux/linux/windows triple boot, so file format isn't a problem), format the new SD into phone, and copy back (can't be that simple, can it? Hidden/inaccessible files?) Copy the files onto USB OTG with a root file explorer app, reformat the SD as portable, format the new one as adopted, and then copy them back (could work, except for the point below)  with the command adb shell sm set-force-adoptable true, use a root browser to copy all the data over from the old SD, format the old SD as external and remove it, and take the new SD and put it in the SD card slot (seems overly complicated, and also suffers the below pitfall)   The other thing that worries me is mount points: will the apps with externally-stored data know to look at the new SD card for it? Will I have to remount it in a specific location with the shell each boot (or use an init.d script perhaps)? I suppose that it can always be accessed through /sdcard or /storage/emulated/0, but I'm not 100% sure what goes on behind the scenes.  I've got recent NANDroid backups, so if anyone can eliminate the options that definitely won't work (or say which one[s] probably will), I can try them and report back in case someone stumbles across this question in the future.  EDIT: So, my phone further bit the dust and got to the point where it got into a pretty major bootloop. Ended up having to flash a whole new ROM. As such, I probably won't be able to test the full image/decryption/etc. method that I was originally planning. However, I will write up what I've discovered so far in case anyone wants to take up this particular method in the future:   Image the old SD with dd as follows: sudo dd if=/dev/mmcblk0 of=~/SDCardBackup.img, where /dev/mmcblk0 is the location of the sd card as obtainable through lsblk Restore the image you just made to the NEW sd card : sudo dd bs=4M if=~/SDCardBackup.img of=/dev/mmcblk0 (you may have to unmount it first) From here on in, I was following  (thanks @beeshyams!) tutorial, which explains the next steps way better than I ever could have done. The plan was to decrypt the storage and resize the main partition with gparted. I had no idea whether it would work or not, but I felt it was worth a try. However, when I came to run the actual decryption command using the key I'd extracted, I got an error (which I believe was my shoddy linux skills more than anything).   As I say, I have no idea if the above method would work or not even if everything did go to plan. Also, feel free to correct any of my commands above if I mis-typed them (I'm on Windows currently, so this is all from memory.) If this info helps anyone, then good. But until then,  should work fine.  Thanks, Jackdafish Quantum mechanics and everyday nature Is there a phenomenon visible to the naked eye that requires quantum mechanics to be satisfactorily explained? I am looking for a sort of quantic Newtonian apple. Novel about a man who has his car stolen and is cryogenically frozen with his cat? So this is a bit of a memory game of my behalf, but I'm trying to remember the name of a (presumably) Sci-Fi novel with only a recollection of the following:   A man owns a (yellow?) car parked outside his house along with a cat The car goes missing or is stolen The man decides to be cryogenically frozen for 75 (fairly sure, could be 50?) years along with his cat (I might be muddling up novels but I'm sure there was a cat...?) He takes a walk along the street X years in the future when he wakes up and the currency he has in his pocket is now worthless   I don't think I got that far into the book and all the above happened relatively early.  I read it about 10 years ago and at a guess, it's an 80's novel - all of the above details might be inaccurate, but I'm certain about the cryogenic freezing and the currency aspects.  I'd be surprised if this one gets anywhere! What's the deepest reason why QCD bound states have integer charge? What's the deepest reason why QCD bound states have integer electric charge, i.e. equal to an integer times the electron charge?  Given that the quarks have the fractional electric charges they do, this is a consequence of color confinement. The charges of the quarks are constrained in the context of the standard model by anomaly cancellation, and can be explained by grand unification. The GUT explanation for the charges doesn't care about the bound state spectrum of the QCD sector, so it just seems to be a coincidence that hadrons (which are composite) have integer charge, and that leptons (which are elementary) also have integer charge.   Now maybe there's some anthropic argument for why such a coincidence is useful (in the case of proton and electron, it gives us atoms as we know them). Or maybe you can argue that GUTs naturally produce fractionally charged particles and strongly coupled sectors, and it's just not much of a coincidence.   But I remain curious as to whether Seiberg duality, anyons, some UV/IR relationship... could really produce something like the lepton-hadron charge coincidence, for deeper reasons. I suppose one is looking for a theory in which properties of bound states in one sector have a direct and nontrivial relationship to properties of elementary states in another sector. Is there anything like this out there?   (This question was prompted by muster-mark's many recent questions about fractional charge, and by a  that the hadron-lepton charge coincidence is a "semi-coincidence", which assured me that I wasn't overlooking some obvious explanation.) I want to view the fonts that are installed on my system. Specifically, I want the client-side (fontconfig) fonts, not the old-style X11 bitmap fonts on the server (for which xfontsel does an adequate job). I guess what I'm looking for would be called a font viewer or font gallery. I want to see a bit of sample text for each font, ideally configurable sample text.  Being able to filter by font name, available character sets and other characteristics would be a plus.  A search of packages in Debian wheezy found gnome-font-viewer and kfontview, but they can only display a single font. I'd rather avoid depending on software that isn't widely available, including on the current Debian stable and Ubuntu LTS. Do spell effects move if the object they are cast on moves? let's suppose that I cast a Silent image of a wall on an airship. Let's suppose that I don't move it with concentration.  Does the image of the wall move with the airship or it will progressively go far? We work heavily with serialization and having to specify Serializable tag on every object we use is kind of a burden. Especially when it's a 3rd-party class that we can't really change.  The question is: since Serializable is an empty interface and Java provides robust serialization once you add  implements Serializable - why didn't they make everything serializable and that's it?    What am I missing? How to install specific Ubuntu packages, with exact version? I want to setup a new virtual machine with some specified packages (name and version), that are provided.  For example apache2 in version 2.2.20-1ubuntu1 with all dependencies. Even if there is a new version of this package on the servers this one should be installed.  The solution has to work/scale with multiple (n) "setups". Another virtual machine might need an older version of apache2.  I currently know of some possibilities that install the exact packages, but do not scale that good:   Copy all required *.deb to every virtual machine manually and enter: dpkg -i ... -> Could work, but it is very error prone. (Manual scripts etc.) Create and use a new Ubuntu repository for each setup. -> Does not work because I would need n repositories. Setup the machine once and copy the VM / create a snapshot. -> Does not work because I would need to store n VMs.   My problem could be labeled as patch management, but I do not want to update my packages to the current version. My goal is to install old packages. Which is correct?        She was told that it was against the law to steal.      Or        She was told that it is against the law to steal.        Background information: The original context is that I was relating an incident via email, where my colleague told a customer that some of our actions were part of the organisation's policy. The policy is still valid, but the statement I used to relate the incident in my email went like this:    "Mr Jay was informed that it was our policy to do this."   And I received feedback that it should go like this instead:    "Mr Jay was informed that it is our policy to do this." Prove that $f_n$ converges uniformly on $\mathbb{R}$ $Path hijacked by PacletManager? NullReferenceException in Unity