I want the automatic login after pressing Ctrl-Alt-F1 in GUI. I tried to change the last line of /etc/init/tty1.conf to   exec /sbin/getty --autologin USERNAME -8 38400 tty1   but it did not work. My OS is Ubuntu 16.10  I have set the automatic login in tty2 by following .
Something has changed in server 16.04 LTS, I can't find tty1, but I need to make an auto-login on tty1 (in console mode), in 14.04 LTS I can make this work.  I can't find /etc/init/tty1.conf  How to, or a link?
I recall :    It was one that I knew could use a bit more spit and polish, but I didn't have the inclination or energy to edit it myself, so I skipped it.  I wander my way over to  (10K only), and look at the listing...    ...so, when did I approve this again? I skipped the question; that doesn't mean I gave my tacit approval, does it?  Seems like the dashboard needs to agree with the suggested edits view. What is the best way to add options to a select from a JavaScript object with jQuery? What is the best method for adding options to a &lt;select&gt; from a JavaScript object using jQuery?  I'm looking for something that I don't need a plugin to do, but I would also be interested in the plugins that are out there.  This is what I did:  selectValues = { "1": "test 1", "2": "test 2" };  for (key in selectValues) {   if (typeof (selectValues[key] == 'string') {     $('#mySelect').append('&lt;option value="' + key + '"&gt;' + selectValues[key] + '&lt;/option&gt;');   } }   A clean/simple solution:  This is a cleaned up and simplified :  $.each(selectValues, function(key, value) {      $('#mySelect')           .append($('&lt;option&gt;', { value : key })           .text(value)); });   Changes from matdumsa's: (1) removed the close tag for the option inside append() and (2) moved the properties/attributes into an map as the second parameter of append(). Renaming a bunch of files with date modified timestamp at the end of the filename? I am working on plugin to Drupal Commerce, and I started getting this error:   DatabaseTransactionOutOfOrderException: in DatabaseConnection-&gt;rollback() (line 1058 of /Library/WebServer/Documents/includes/database/database.inc).   Can anyone shed some light on what this error means? If I install a fresh drupal and reinstall my plugin, is that likely to clear things up?   Any advice?   Thanks! How to query More than 50000 records from sObject i need to count total number of records in an sObject which can have around one million records. Will the code below work ? If no, how can this be done ? I dont need to use this in a vf page.   I will be using this COUNT() SOQL Query in a batch class which is scheduled to run at specific time.  AggregateResult results = database.query('SELECT COUNT(id) result FROM someSObject');     System.debug('No of ids are: '+results.get('result')); Why is it called an “Indian file”? How to connect to device via SSH over direct ethernet connection I have a device that I need to connect to over SSH. The device is connected to my workstation via a direct ethernet connection. I'm attempting to assign the connected device an IP address somehow that I can SSH to, however all of the guides I'm finding have the user configure the IP from whatever device they're working with (namely Raspberry Pi's and so on). This is not something I can do with this device as I've no physical interface to work with.  I've been recommended to setup a DHCP server on my workstation so it would take care of this for me, however I've no idea how to configure it and none of the guides I have followed have been helpful. With that approach, I seem to have been able to bind an IP to the interface the device is connected on, however SSHing to that IP just brings me back to my own machine.  So my main question is: How do I assign an IP address to a device directly connected to my computer via ethernet cable without having any kind of access to the device (no interface, keyboard, monitor, etc). If the answer is to set up a DHCP server on my machine, how do I properly configure this and get an IP I can SSH to?  For reference, I am using Ubuntu 16.04 with OpenSSH installed. The device is also running some flavor of Linux and has SSH software installed, but again there's no way to interact with it except through SSH. I also do not have access to my router, so plugging the device in there and letting the router do the work is not an option. This is a recurring question (see ,  and ), but I have a different spin.  Suppose I have a bunch of samples from a generic MCMC sampler. For each sample $\theta$, I know the value of the log likelihood $\log f(\textbf{x} | \theta)$ and of the log prior $\log f(\theta)$. If it helps, I also know the value of the log likelihood per data point, $\log f(x_i | \theta)$ (this information helps with certain methods, such as WAIC and PSIS-LOO).  I want to obtain a (crude) estimate of the marginal likelihood, just with the samples that I have, and possibly a few other function evaluations (but without rerunning an ad hoc MCMC).  First of all, let's clear the table. We all know that the harmonic estimator is the . Let's move on. If you are doing Gibbs sampling with priors and posteriors in closed form, you can use ; but I am not sure how to generalize outside of those cases. There are also methods that require you to modify the sampling procedure (such as via ), but I am not interested in that here.  The approach I am thinking of consists of approximating the underlying distribution with a parametric (or nonparametric) shape $g(\theta)$, and then figuring out the normalization constant $Z$ as a 1-D optimization problem (i.e., the $Z$ that minimizes some error between $Z g(\theta)$ and $f(\textbf{x}|\theta) f(\theta)$, evaluated on the samples). In the simplest case, suppose that the posterior is roughly multivariate normal, I can fit $g(\theta)$ as a multivariate normal and get something similar to a Laplace approximation (I might want to use a few additional function evaluations to refine the position of the mode). However, I could use as $g(\theta)$ a more flexible family such as a variational mixture of multivariate $t$ distributions.  I appreciate that this method works only if $Z g(\theta)$ is a reasonable approximation to $f(\textbf{x}|\theta) f(\theta)$, but any reason or cautionary tale of why it would be very unwise to do it? Any reading that you would recommend?  The fully nonparametric approach uses some nonparametric family, such as a Gaussian process (GP), to approximate $\log f(\textbf{x}|\theta) + \log f(\theta)$ (or some other nonlinear transformation thereof, such as the square root), and  to implicitly integrate over the underlying target (see  and ). This seems to be an interesting alternative approach, but analogous in spirit (also, note that GPs would be unwieldy in my case). Navigate folder structure in Open/Save File Dialog with keyboard? Blank lines in an equation and some other similar function Why blank lines between equation makes error? there are a lot of commands in latex and almost for all of them these blank lines are not important,  but why in this case is important and is there any similar function? Can the weak force create a bound state? The units of $\mathbb Z[\sqrt{2}]$ How can I show that the units $u$ of $R=\mathbb Z[\sqrt{2}]$ with $u&gt;1$ are $(1+ \sqrt{2})^{n}$ ?   I have proved that the right ones are units because their module is one, and it is said to me to do it by induction on $b$ and multiplication by $-1+\sqrt{2}$. I have already shown that the units of this ring has norm $1$ and all the numbers with norm $1$ are units, this may help. Updating my appointment without cancelling the previous date Me and my friend want to build a basic 101 mob farm, but we can't decide where to put it. He says it has got to be over an ocean, I say it can just be 128 blocks above ground and it will be just fine.  So the question is:    What is the absolute ideal place for a mob spawner?  If we build it 128 blocks above ground do we still need to light up caves? If we dig a 128x128 square straight to bedrock will that make a perfect environment?   Please advise! Suppose a cleric casts Zone of Truth on a captured enemy. Unbeknownst to them, the enemy is a rakshasa. Zone of Truth says (PHB, p. 289):     You know whether each creature succeeds or fails on its saving throw.   But (MM, p. 257):     The rakshasa is immune to spells of 6th level or lower unless it wishes to be affected.   Assuming the rakshasa doesn't wish to be affected by the Zone of Truth spell, does the caster know this?  More generally, does a caster know when targets are unaffected by a spell they have cast, either because they have made saving throws, or because they are outright immune to the spell or its effects (e.g., casting Ray of Sickness on a shadow demon, which is immune to poison damage and the poisoned condition)? Evaluating this integral $ \small\int \frac {x^2 dx} {(x\sin x+\cos x)^2} $ The question:      Compute$$ \int \frac {x^2 \, \operatorname{d}\!x} {(x\sin x+\cos x)^2} $$   Tried integration by parts. That didn't work.  How do I proceed? How to combine an SSD boot drive with a HDD data drive? I have an SSD with 64 GB and a 6 GB/s 1 Terabyte hard drive. I want to use the SSD only as a boot device and maybe for swap storage. On the 1 Terabyte hard drive, I want to have the main file system. As in Windows, I liked to have at least 2-3 Partitions example for music games programs and so on. Which partition layout do you recommend to me? Is there any reason to use this-> What is this story about 20 y.o. inexperienced "kids" fighting against a stronger foe in space? Pre-image of a measurable set A is always measurable?