Favourite option in mobile application
How to favorite a question from Android app?
How to disable grub menu at boot time in Ubuntu 20.04? I have installed Ubuntu 20.04 alongside Windows. When I boot the system, it shows the grub menu for 10 seconds to choose between Ubuntu and Windows. I don't want that menu, just want to boot it up right after pressing the power button. I have looked into  thread and added GRUB_HIDDEN_TIMEOUT_QUIET=true  and even changed GRUB_TIMEOUT to 0 and then ran sudo update-grub. But it didn't work, menu is still being shown at boot time. This is my /etc/default/grub file-   # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2&gt; /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   How do I disable it? prove inequality through mean value theorem Can .exe and .msi files (Windows software) be installed in Ubuntu? Creating a byte array from a stream What is the prefered method for creating a byte array from an input stream?   Here is my current solution with .NET 3.5.   Stream s; byte[] b;  using (BinaryReader br = new BinaryReader(s)) {     b = br.ReadBytes((int)s.Length); }   Is it still a better idea to read and write chunks of the stream? 14.04 --> 16.04 failed; apt (>= 1.0.1ubuntu2.13)' is not installed (This question was not resolved. Due to time constraints Computer was restored to factory settings.)  I was attempting to upgrade from 14.04 to 16.04, but apt threw this error:  The required dependency 'apt (&gt;= 1.0.1ubuntu2.13)' is not installed.   What does this mean, and how can I fix it?  When I type in the command apt-cache policy apt  Shageenth@shageenth-Inspiron-3451:~$ apt-cache policy apt apt: Installed: 1.0.1ubuntu2.11 Candidate: 1.0.1ubuntu2.11 Version table: *** 1.0.1ubuntu2.11 0 100 /var/lib/dpkg/status 1.0.1ubuntu2 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64  Packages   The error happens when I run the command:   sudo do-release-upgrade -d   and it produces the following:  Checking for a new Ubuntu release Get:1 Upgrade tool signature [198 B] Get:2 Upgrade tool [1,265 kB] Fetched 1,265 kB in 0s (0 B/s) authenticate 'xenial.tar.gz' against 'xenial.tar.gz.gpg' extracting 'xenial.tar.gz'  Reading cache  Checking package manager Reading package lists... Done Building dependency tree Reading state information... Done Building data structures... Done  Required depends is not installed  The required dependency 'apt (&gt;= 1.0.1ubuntu2.13)' is not installed. EM algorithm gaussian mixtures- derivation I'm trying to make sense of a derivation I'm following from the lecture notes of Stanford's ML course.  Specifically the notes are here:   I'm particular I'm interested in the step where they are optimizing the lower bound of the log-likelihood by finding the derivative of that function w.r.t the mean (top of page 7). I'm a bit stuck on going from line 1 to line 2 in that sequence.  To copy here (using abbreviated notation for space):  $$ \nabla \mu_s \sum_{i=1}^{m}\sum_{j=1}^{k} w_j^{(i)}\log\frac{\alpha_j \exp\psi_{j}^{(i)}\phi_j}{w_j^{(i)}}  \qquad(1) $$ $$ \nabla \mu_s \sum_{i=1}^{m}\sum_{j=1}^{k} w_j^{(i)}\psi_{j}^{(i)}\qquad(2) $$ where $\psi_{j}^{(i)} =-\frac{1}{2}(x^{(i)}-\mu_j)^T\Sigma^{-1}_{j}(x^{(i)}-\mu_j)$ and $\alpha_j=\frac{1}{(2\pi)^{n/2}|\Sigma_j|^{1/2}}$.  The quantity $\mu_s$ is the mean (of a multivariate gaussian distribution) for class $s$.    In short, I'm not sure how they get from (1) to (2).  From just changing the log of (1) I see:  $$ \nabla \mu_s \sum_{i=1}^{m}\sum_{j=1}^{k} w_j^{(i)}\log \left(\alpha_j \exp\psi_{j}^{(i)}\phi_j\right) - w_j^{(i)}\log w_j^{(i)} \qquad(1) $$  To get to their form (2) my impression is that they take pre-emptively discard terms that would contain derivatives of $w_j^{(i)}$ (w.r.t. $\mu_s$).  At least if you assume that much, you get to (2).  However, as they show earlier in that PDF,  $$ w_j^{(i)} = p(z^{(i)}=j | x^{(i)}) =\frac{p(x^{(i)}|z^{(i)}=j)p(z^{(i)}=j) }{\sum_j p(x^{(i)},z^{(i)}=j) } $$ i.e. this quantity is the posterior distribution of the class labels.  Intuitively, it seems like $\partial w_j^{(i)}/ \partial \mu_s$ should be non-zero.  After all, changing the location of the mean $\mu_s$ would change your posterior probability for a particular class given the same data.  (Right?).  Just from a mechanical point of view, $\partial w_j^{(i)}/\partial \mu_j$ would seemingly have some non-zero terms since $p(x^{(i)}|z^{(i)}=j) \sim \mathcal{N}(\mu_j, \Sigma_j)$.  If I work through the algebra, I get  $$ \frac{\partial w_j^{(i)}}{\partial \mu_j} = w_j^{(i)}(1-w_j^{(i)})\frac{\partial \psi^{(i)}_{j}}{\partial \mu_j} $$  What am I missing here?  If I take the log-likelihood (without even thinking about EM algorithm),    $$ \ell = \sum_{i=1}^{m}\log \sum_{j=1}^{k}p(x^{(i)}|z^{(i)}=j)p(z^{(i)}=j) $$ and differentiate w.r.t $\mu_s$, I correctly get  $$ \mu_s^* = \frac{\sum_{i=1}^{m}w_s^{(i)}x^{(i)}}{\sum_{i=1}^{m}w_s^{(i)}} $$  so I'm comfortable with the eventual result, just not the intermediate steps. The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead What is the best solution for database connection pooling in python? I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework.    The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect.    What is the best "drop in" solution to switch this over to using connection pooling in python?  I am imagining something like the commons DBCP solution for Java.    The process is long running and has many threads that need to make requests, but not all at the same time... specifically they do quite a lot of work before brief bursts of writing out a chunk of their results.  Edited to add: After some more searching I found  which looks decent, but as I'm relatively new to python I guess I just want to make sure I'm not missing a more obvious/more idiomatic/better solution. Examples of bijective map from $\mathbb{R}^3\rightarrow \mathbb{R}$ Injecting beans into a class outside the Spring managed context I'm an end-user of one of my company's products. It is not very suitable for integration into Spring, however I am able to get a handle on the context and retrieve the required bean by name.  However, I would still like to know if it was possible to inject a bean into this class, even though the class is not managed by Spring itself.  Clarification: The same application which is managing the lifecycle of some class MyClass, is also managing the lifecycle of the Spring context. Spring does not have any knowledge of the instance of MyClass, and I would like to some how provide the instance to the context, but cannot create the instance in the context itself. Antivirus software is breaking SE web page? (blocking CSS and JS)? "is" operator behaves unexpectedly with integers How do I time a method's execution in Java? How do I get a method's execution time?   Is there a Timer utility class for things like timing how long a task takes, etc?     Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want. I'm designing an I/O module by using optocouplers for the inputs and outputs which I want to control by a microcontroller.   Here are my questions:   In the datasheet of optocoupler's output current (per channel) is 50mA, and for the output port(figure 1) Relay nominal operating current is 16.7 mA. By knowing these can I calculate how much current will I need for the system. Which parameters do I know?   There are 12 relays, 20 optocouplers (5 module) in total. 3 Opto module for output, 2 for input ports     By directly connecting the GPIO pin and output of the optocoupler to the switches (as input), Can I control the inputs shown in the figures. For the input ports, I don't know how to make the connections. What should I connect to the collector pin? Prove by Double Counting Method $\sum\limits_{k = 0}^m \binom{m}{k}\binom{n}{r + k} = \binom{m + n}{m + r}$ Show by combinatorial arguments that:   $$\sum_{k = 0}^m \binom{m}{k}\binom{n}{r + k} = \binom{m + n}{m + r}$$  Hello ,  I want to prove this argument by double counting method, i kinda have an idea of proving by comb args. but not by double counting... Can someone give any clues or ideas? thanks :) First, when I never had installed sl:  diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   traslaction: "The program 'sl' is not currently installed. You can install it by typing:"  But when I'm tired of it and I remove it by typing sudo apt-get remove sl per example...  I get this when I type sl:  -bash: /usr/games/sl: Ficheiro ou directoria inexistente   translate: "-bash: /usr/games/sl: No such file or directory" instead of:    diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   This appears with others packages too...  How I get rid of this: -bash: /usr/games/sl: Ficheiro ou directoria inexistente ?  I want see the original:  diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   Output of type sl  sl está hasheado (/usr/games/sl) How did Asuna and Kirito survive? In the last episode of Aincrad arc of Sword Art Online, how did Asuna survive even though her avatar disintegrated after being attacked by Kayaba? Also Kirito was stabbed by Kayaba as well. How did he survive?  Was it in the novel on how they really survived? Interpreting plot.lm() I had a question about interpreting the graphs generated by plot(lm) in R.  I was wondering if you guys could tell me how to interpret the scale-location and leverage-residual plots?  Any comments would be appreciated.  Assume basic knowledge of statistics, regression and econometrics. I was reading the Math.random() javadoc and saw that random is only psuedorandom.    Is there a library (specifically java) that generates random numbers according to random variables like environmental temperature, CPU temperature/voltage, or anything like that? I'm new to the ICS os, coming from Gingerbread from another phone. The phone's quite nice and fast when I first used it, but just this morning it started exhibiting weird actions. Camera360 doesn't open up automatically when I click it, the Camera closes for no reason, Pocket restarts when an article has an image, and TTPod resets the song to the previous song on my widget in the middle of a new song I'm playing.  I checked out the ram, and and was surprised to see 500+ mb used, 0 mb available. I looked at the list of programs and I see the usual culprits like Facebook, but the ram they're using doesn't add up to 500+ mb. Yeah, I know that the whole ram indicated isn't usable by the apps, but I don't think I've done anything to warrant the 0 mb. I close my apps. There are times when there's free 4 to 5 mb, but I think that too shouldn't be the case. I tried installing Advance Task Killer, it listed less than 10 apps, killed it, still the ram is what it is above.   I did a reboot, and now it reads 300+ mb usage, 200 something free.   What can I do? How do I ensure an app's closed on ICS? I installed GoLaucher because it has a handy task killer and I can see the ram freed in an instant, but I would like to know if there's a better way to handle the RAM.