I’m confused about the right way of saying it. Please tell me the correct answer and why it is correct.
Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other?
Easiest way to add a text to the beginning of another text file in Command Line (Windows) What is the easiest way to add a text to the beginning of another text file in Command Line (Windows)? Is there any specific word for a person who is always online on the Internet?  I am just curious to know because staying online is like a profession nowadays. Altium de-highlighting nets after using 'Find Similar Objects...' command Is the Formula Logically Valid? Object emit light distance I created an object, and I wanted it to glow. I used to just place points of light around it, and parent them to it, but using the emit option in the materials seemed so much easier.  But when I gave it an a higher emit than 0, it went only a small distance before the light stopped. I turned it up to 200, and the object was white with light, but the light didn't go any farther. Oh and I changed the color, and nothing happened. Custom right-click action in Unity Launcher keeps cursor busy for 20 seconds To have a "minimize window" option through right click on an icon in the Unity launcher (Ubuntu 14.04), I followed the detailed instructions  about changing a .desktop file and made a custom Firefox launcher in ~/.local/share/applications/ folder. The relevant part of the .desktop file is:  Actions=NewWindow;NewPrivateWindow;Minimize  [Desktop Action NewWindow] Name=Open a New Window Exec=firefox -new-window OnlyShowIn=Unity;  [Desktop Action NewPrivateWindow] Name=Open a New Private Window Exec=firefox -private-window OnlyShowIn=Unity;  [Desktop Action Minimize] Name=Minimize Windows Exec=sh /home/myusername/Documents/xdotool_sh/minimize.sh firefox OnlyShowIn=Unity;   The desktop action "Minimize" invokes a simple shell script, minimize.sh that has the following content:  #/bin/bash name=$1 for i in $(xdotool search --class "$name"); do     xdotool windowminimize $i done   The script uses xdotool, that can be installed from the official repositories, to find all the firefox windows, iterate over them and minimize them.  The script works and the launcher right menu option "Minimize Windows" works as well, but as soon as the windows are minimized, the mouse pointer gets in "busy" mode and stays like this for about 20 seconds (although the mouse actions are still responsive).   Does anyone know why starting a shell script from a right menu option in Unity could lead to this behaviour?  EDIT: Apparently the wait period is inevitable, as explained in Jacob Vlijm's answer. Since the mouse remains responsive, avoiding the transformation of the pointer in the spinning wheel is a partial esthetic workaround, as explained on .  EDIT2: giving the system a fake window is a better solution, as explained by Jacob below. Management of fruit bowls on the Enterprise D I have noticed that guest quarters on the Enterprise D have fruit bowls on their tables.  A prominent instance is the fruit bowl in Berlinghoff Rasmussen's quarters in "".  The first thing that Rasmussen does when Data takes him to his guest quarters is take a piece of fruit and shove it in his pocket.  Who replicates fruit for these fruit bowls before guests arrive?  More generally, who removes unused fruit and tidies quarters after guests leave?  Is there a ship hospitality staff, perhaps including Guinan's wait staff in Ten Forward? Can a JavaScript object have a prototype chain, but also be a function? function a () {     return "foo"; }  a.b = function () {     return "bar"; }  function c () { }; c.prototype = a;  var d = new c(); d.b(); // returns "bar" d(); // throws exception, d is not a function   Is there some way for d to be a function, and yet still inherit properties from a? Apex compile error : variable does not exist I'm having issues with creating a pretty simple test Utility Class. I want to create two records: an account and a related child contact. The error I see in the developer console is:     Variable does not exist: a.ID   My code, based on the Salesforce Apex Workbook, is as follows. I've played around with various things, but it's not working. Where am I going wrong? Thanks in advance.  @isTest public class AccountSaveTestSuite {      public static Account createOneAccount(){           Account testAccount = createAcct('ABC Computing inc.');              Contact testContact = createContact();          return testAccount;             }      // Helper methods //     //        private static Account createAcct(string accountName) {          Account a = new Account(             Name=accountName);         insert a;         return a;     }      private static Contact createContact(){         Contact c = new Contact (             FirstName = 'Jane'              , LastName = 'Smith'             , Account = a.ID); // *** Error is here ***         insert c;         return c;      }  } What does InitializeComponent() do, and how does it work in WPF? What does InitializeComponent() do, and how does it work in WPF?  In general first, but I would especially be interested to know the gory details of order of construction, and what happens when there are Attached Properties. I used the upgrade manager to upgrade from 17.04 to 17.10. When I start the machine, I only get a black flickering screen now. I was using the nvidia binary drivers before the upgrade.     NOTE: This question (and answer) relate to a specific issue when upgrading from 17.04 to 17.10 while using Nvidia or AMD binary drivers. You might experience a completely different issue. For that please see the more general question . Show $\lim_{n \to \infty} n^{-1} E \left( \frac{1}{X}1_{[X>n^{-1}]} \right) =0$ Suppose $X$ is a non-negative random variable satisfying  \begin{align*} P[0 \le X &lt; \infty ]=1. \end{align*} Show   a)  \begin{align*} \lim_{n \to \infty} n E \left( \frac{1}{X}1_{[X&gt;n]} \right) =0 \end{align*} b)  \begin{align*} \lim_{n \to \infty} n^{-1} E \left( \frac{1}{X}1_{[X&gt;n^{-1}]} \right) =0 \end{align*}  What I did  I showed part a) already here is the proof:  \begin{align*} n E \left( \frac{1}{X}1_{[X&gt;n]} \right) \le n E \left( \frac{1}{n}1_{[X&gt;n]} \right)=n\cdot\frac{1}{n}P[X&gt;n]=P[X&gt;n] \end{align*} So $\lim_{n \to \infty} n E \left( \frac{1}{X}1_{[X&gt;n]} \right) \le \lim_{n \to \infty} P[X&gt;n]=0$.  What about part b)? The same techniques no longer works.  I was thinking that  \begin{align*} \lim_{n \to \infty} n E \left( \frac{1}{X}1_{[X&gt;n]} \right) \le \lim_{n \to \infty} n E \left( \frac{1}{X} \right) \le 0 \end{align*} but I am not sure that $E \left( \frac{1}{X} \right) &lt; \infty$ Unloading classes in java? I have a custom class loader so that a desktop application can dynamically start loading classes from an AppServer I need to talk to. We did this since the amount of jars that are required to do this are ridiculous (if we wanted to ship them). We also have version problems if we don't load the classes dynamically at run time from the AppServer library.  Now, I just hit a problem where I need to talk to two different AppServers and found that depending on whose classes I load first I might break badly... Is there any way to force the unloading of the class without actually killing the JVM?  Hope this makes sense How to Toggle Selected Objects Visibility with H shortcut as in Maya Using while loop to ssh to multiple servers PhD in Europe without scholarship from non-European homeland Is there a command like head but for line truncation? Lots of questions in the reopen queue I've noticed in the last couple of days that there have been a few occasions when there's been a sudden surge of questions in the SO "Reopen" review queue.  Normally there's either no questions at all to reopen or at most three or four, and that's still the case, except that for the last couple of days I've gone to the review page and seen about fifty-odd questions in the queue, where just moments before there had been none.  I've gone through the reviews and the questions themselves seem reasonably legitimate (including the occasional audit), so I'm not questioning that... it just seems odd that there would be so many more than usual all of a sudden, and that they'd all appear at once.  Anyone got any insights, or should I just chalk this down as "one of those things"? What is the effect of the number of cross-type focus points on sharp focus? There is a type and search drodown which will appear after user type in the value. I need to click on the dropdown which contains the name of the drop down field.   The problem here is that there is no unique attribute present (No unique class, no unique name) &amp; the id keeps on changing after every login so cannot take id also.