Why does assigning null to a node does not delete that node in a linked list To remove the last node of the list, I just traversed till the last node and assigned it to null. But I still see the last node value. I am wondering why node = null does not have any effect.  void deleteLastNode(Node node){     while(node.next != null)     {         node = node.next;     }     node = null; }
Is Java "pass-by-reference" or "pass-by-value"? I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
Is there an easier or more 'correct' way to open gedit as root? I have ubuntu 12.04 running in a virtual machine on virtual box.  Its existence is mainly as a 'toy' to play about with Ubuntu, so for this reason I wanted the GUI (is that what 'Dash' is in ubuntu 12.04?  Anyway...)  One thing I am currently using this machine for is a LAMP server.     I use 'gedit' to edit my files, but because I haven't correctly set permissions yet I just open it with sudo in terminal.  Just now, to try to simplify this process I created a shell script on the desktop with a very simple job - sudo gedit  I can't help thinking there must be an even more obvious way to open gedit as root from the GUI than this.  So is there?  Edit:  I just 'improved' my script by replacing sudo with gksudo.  Now I don't have to have a terminal window open while gedit is open.   So I guess this is quite convenient for now :)   It would be good, for the sake of knowledge, to know if this is anything close to how the more seasoned ubuntu users would do this type of thing. Ubuntu 13.10 Macbook Air Mavericks Parallels 9 Black Screen I can install Ubuntu 13.10 in parallels ok and then log in.  Problem is Ubuntu does an update and I get black screen / desktop such that I can't see any app windows that I open.  I've tried a few of the other suggestions and they don't work for me. Neatest proof that set of finite subsets is countable? I am trying to convince my friend that the integral of $0$ is $C$, where $C$ is an arbitrary constant. He can't seem to grasp this concept. Can you guys help me out here? He keeps saying it is $0$. biblatex: Cite commands with the same author prints authors name twice I'm using biblatex 1.4b, and Biber 0.9. However, I think the problem is with my settings, not with the versions of those programs.  I'm trying to cite a single author, and produce their name, followed by the dates of two papers, using the authoryear-ibid style, and natbib compatability. Here's my biblatex preamble:  \usepackage[style=authoryear-ibid,natbib=true,backend=biber]{biblatex}   What I want is for the following command: The works by \citet{Blau81, Blau88} ... to produce: The works by Blau (1981; 1988) ... however, what I'm getting is: The works by Blau (1981); Blau (1988)...  I know that biblatex knows they're the same author, since in the bibliography they fall under the same name (i.e. after the first instance of the name, there's just a dash instead of the name)  What am I doing wrong here? I've also tried it with the commands \cite and \cites, and neither produces what I want.   (crossposted with comp.text.tex) What is the best technique to calculate a confidence interval of a binomial experiment, if your estimate is that $p=0$ (or similarly $p=1$) and sample size is relatively small, for example $n=25$? Users below 15 reputation can't effectively vote. It says:     Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score   Does it mean that they will take effect after I reach 15 reputation or because they were cast before, they're recorded but ignored? How to get rid of banding in illustrator while using gradient? How to get Rid of Banding in illustrator while using Gradient Showing $F[x,y]/(ax^2+by^2-1)$ is a Dedekind domain What are the best JVM settings you have found for running Eclipse? Holmby Hall is a landmark site in Los Angeles. The Wikipedia page doesn't use "the" before Holmby Hall, but has used the before The Fox Theatre. I've downloaded a driver for a video card (*.run) and tried to install within a terminal. When I started the installation process I got this error: ERROR: nvidia-installer must be run as root. I'm logged in with my own profile. I have a question about inheritance in Java.  I have two classes A and B , and class B, inherits from A:  public class A {      public A() {          System.out.println("Hi!");      } }   public class B extends A {      public B() {          System.out.println("Bye!");      }       public static void main(String[] args) {          B b = new B();      } }   When I run program B, the output is:  Hi! Bye!      Question : why the constructor of class A is invoked, when I create and object of class B ?    I know that B inherits everything from A - all instance or class variables, and all methods, and in this sense an object of B has all characteristics of A plus some other characteristics defined in B. However, I didn't know and didn't imagine that when I create an object of type B, the constructor of A is also invoked. So, writing this:  B b = new B();   creates Two objects - one of type B, and one of type A.  This is getting interesting,   can somebody explain why exactly this happens? Proving that $\lim_{k\to \infty}\frac{f(x_k)-f(y_k)}{x_k-y_k}=f'(c)$ where $\lim_{k\to \infty}x_k=\lim_{k\to \infty}y_k=c$ with $x_k<c<y_k$ Question.  Suppose that a function $f$ is defined on an interval $I$, $c$ is a point of $I$, and {$x_k$} and {$y_k$} are any two sequences in $I$ such that $\lim_{k\to \infty}x_k=\lim_{k\to \infty}y_k=c$ with $x_k&lt;c&lt;y_k$ for all $k$. Prove that, if $f'(c)$ exists, then $\lim_{k\to \infty}\frac{f(x_k)-f(y_k)}{x_k-y_k}=f'(c).$   My Attempt.  Let $\epsilon_k=\frac{1}{k}$ be given.  For $\epsilon_1=1,$ there exists $\delta_1&gt;0$ such that $x_1,y_1\in I, x_1,y_1\in N'(c;\delta_1)$ implies $\vert \frac{f(x_1)-f(y_1)}{x_1-y_1} -f'(c) \vert&lt;\epsilon_1.$  For $\epsilon_2=\frac{1}{2},$ there exists $0&lt;\delta_2&lt;$min$\{\vert x_1-c \vert,\vert y_1-c \vert,\epsilon_2\}$ such that $x_2,y_2\in I, x_2,y_2\in N'(c;\delta_2)$ implies $\vert \frac{f(x_2)-f(y_2)}{x_2-y_2} -f'(c) \vert&lt;\epsilon_2.$  Similarly, for $\epsilon_{k}=\frac{1}{k},$ there exists $0&lt;\delta_k&lt;$min$\{\vert x_{k-1}-c \vert,\vert y_{k-1}-c \vert,\epsilon_k\}$ such that $x_k,y_k\in I, x_k,y_k\in N'(c;\delta_k)$ implies $\vert \frac{f(x_k)-f(y_k)}{x_k-y_k} -f'(c) \vert&lt;\epsilon_k.$  Then by taking the limit to infinity, we obtain $\lim_{k\to \infty}\frac{f(x_k)-f(y_k)}{x_k-y_k}=f'(c).$   It really took me a lot of time to finish the proof and I need this to be checked by an expert:) Is the proof okay? Any response would be appreciated! A "friends list" on Stack Overflow would be nice I think it would be nice to have a "friends list" on Stack Overflow. This would allow us to be able to follow the questions and answers that are posted by users that we want to watch/monitor.  I suggest it be implemented in the same fashion as DotNetKicks.com; where you can add someone to your "friends list" without them needing to approve you the way that other social networks do it. It should be completely open for us to add anyone to our "friends list" that we like. Titles should be stand-alone summaries of questions *without* depending on tags Titles should be completely independent of tags.  A good title tells an expert whether they want to read the full question all by itself. I know this has come up multiple times before, before, but in each case, the discussion has seemed to have turned into a different question.  For example,   really asks, &quot;Don't we need tags in titles to help with SEO&quot;? So, &quot;no, we don't, because we add the top tag (or two, in some cases) to the crawler results,&quot; is correct, but it appears that people are interpreting that to mean that people generally can (or should) omit key terms from their titles if they exist in the tags.  To be clear:  I agree that we should never force a tag into a title if it's not helpful;  should NOT have &quot;[Baking]:&quot; jammed into the title, because it adds nothing to a reader's understanding of what it's about, BUT...  Nothing should be left out of a title just because it exists in the tags.   Trilogy examples:   , ,   examples: , , , The problem with all of these is that without a language, OS, or game title, they fail to convey whether you care to read the question, because you need to read the tags to even figure out if you work with the language or own the game in question. A term being in a tag in no way reduces the need for it in the title.  Tags are great for filtering, but a title is supposed to function like a headline. This is a good headline:  This is not very good headline:  Titles, like headlines, are BIG AND BOLD on the front and other pages.  So you can browse and stuff.  Tags are small, and kind of low contrast.  So they don't, you know, distract you from the headlines. Bear in mind that on non-technical sites, new visitors, even new experts, don't necessarily even know what tags are. The title test:  If you assume the reader can't even see the tags, is your title a good, stand-alone summary of the question for an expert on that topic?  I'm sticking with gaming examples because they're more broadly accessible than some topics:   does not need, &quot;in Starcraft&quot; added, because it's impossible to be interested in the answer and not know that a zergling question relates to Starcraft.  but...  , absolutely needs &quot;...in Starcraft 2&quot; added to it, because without the tags, it's currently useless as a way to decide if you want to read it.  This is really no change from :  In the wake of that comment, people seemed to mostly hear:  &quot;stop forcing a word you don't need in just cuz it's a tag&quot;  ... which is right, but what it really says is,  &quot;most of the time, some tags will naturally belong in a title that effectively summarizes the question&quot;.  EDIT: Some folks felt this was (an unduly public) way to call out gaming specifically. It's not - I think this is a problem to varying degrees on a number of sites, but used examples from gaming because they're easy for most readers to follow. Sincere apologies to anyone in the Arqade community who felt I was using a network-wide forum to criticize a gaming practice - I wanted to clarify the best practice for all the sites that encounter this at least sometimes, including SO, where you still see people stripping languages from titles in edits sometimes. I'm using a common charger for both of my laptops.  The charger is specified at 20 Volts and 3.25 Amperes. My other laptop has a specification of 19 V and 3.42 A.  Is it safe to charge my laptop with chargers whose specifications exceed or are not equal to the mentioned specifications?  I have read somewhere that it may cause some damage if the voltage or amperage is not matching the specs. How do I use the Tooling API to create a new Apex Trigger? How do I use the Tooling API to create a new Apex Trigger (rather than update an existing one)?  According to the  I need to specify the ContentEntityId as an existing Trigger Id. But in my case I don't have an Id because I've trying to create a new sObject.  If I omit the ContentEntityId I get an error back in the SaveResult:     Status Code: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY   Message: "insufficient access rights on cross-reference id"   The following is more or less a test case in C# that attempts to use the SOAP tooling API to create the new trigger.  SforceService toolingService = //... Get instance of the Tooling API  MetadataContainer container = new MetadataContainer(); container.Name = "Test" + DateTime.Now.Ticks;  SaveResult[] saveResult = toolingService.create(new sObject[] { container }); string metaDataContainerId = saveResult[0].id;  ApexTriggerMember apexTriggerMember = new ApexTriggerMember(); apexTriggerMember.MetadataContainerId = metaDataContainerId; apexTriggerMember.Body = "trigger TestOpportunityBeforeUpdate on Opportunity (before update) {\n//Horray\n}";     // Adding this will successfuly update the existing trigger //apexTriggerMember.ContentEntityId = "01q70000000GuzP";  SaveResult[] triggerSaveResults = toolingService.create(new sObject[] { apexTriggerMember }); Assert.AreEqual(1, triggerSaveResults.Length); SaveResult triggerSaveResult = triggerSaveResults[0]; if (!triggerSaveResult.success) {     Assert.Fail(triggerSaveResult.errors[0].message); } Assert.IsTrue(triggerSaveResult.success);  ContainerAsyncRequest containerRequest = new ContainerAsyncRequest(); containerRequest.MetadataContainerId = metaDataContainerId; containerRequest.IsCheckOnly = false;  SaveResult[] containerResults = toolingService.create(new sObject[] { containerRequest }); I'm trying to do something similar to this epsilon-delta graph I've found.  Specifically, I'd like to copy the placements and arrows, like the L+e and L-e coming out of L. Same thing with the x0 + d and x0-d coming out of the x0. Can someone help me with this? This is what I have so far.    \begin{tikzpicture} \begin{axis}[ ,         legend pos=north east,         axis x line=middle,         axis y line=middle,         x tick label style={/pgf/number format/fixed,                             /pgf/number format/fixed zerofill,                             /pgf/number format/precision=1},         y tick label style={/pgf/number format/fixed,                             /pgf/number format/fixed zerofill,                             /pgf/number format/precision=1},         grid = major,         width=8cm,           height=6cm,         grid style={dashed, gray!30},         xmin=0   ,     % start the diagram at this x-coordinate         xmax= 4,    % end   the diagram at this x-coordinate         ymin= 0,     % start the diagram at this y-coordinate         ymax= 11,   % end   the diagram at this y-coordinate %axis background/.style={fill=white},         xlabel=$x$,         ylabel=$f(x)$,         tick align=outside,         enlargelimits=false] % plot the stirling-formulae %\addplot[domain=0:200, red, ultra thick,samples=100] {K/(1 +    ((K-X0)/X0) * exp(r*x))    }; \addplot[domain=0:200, red, ultra thick,samples=100] {3*x-1 };  \addplot[line width=1pt, dashed, mark=none, black] coordinates {(0,8) (3,8)}; \addplot[line width=1pt, dashed, mark=none, black] coordinates {(3,0) (3,8)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(3.33,0) (3.333,9)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (2.666,0)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (0,7)}; \addplot[line width=1pt, solid, mark=none, blue] coordinates {(3.333,9) (0,9)}; \addplot[holdot] coordinates{(60,8.66)};  % 1\addlegendentry{$f(x) = 10 \sin (x)$}  \end{axis}   \end{tikzpicture}   which gives Limit of $s_n = \int\limits_0^1 \frac{nx^{n-1}}{1+x} dx$ as $n \to \infty$ Let $s_n$ be a sequence defined as given below for $n \geq 1$. Then find out $\lim\limits_{n \to \infty} s_n$.   \begin{align}   s_n = \int\limits_0^1 \frac{nx^{n-1}}{1+x} dx  \end{align}  I have written a solution of my own, but I would like to know it is completely correct, and also I would like if people post more alternative solutions.