I'm trying to make a stacked bar chart with two bars next to each other with different colors. I've based my code on discarding \addplot commands similar to , but even though I'm discarding an \addplot it seems to remember the height of the previous bar (due to stacking presumably). I want all bars to start at y=0.  \documentclass{standalone} \usepackage{filecontents}  \usepackage{pgfplots} \usepackage{pgfplotstable}  \pgfplotsset{     discard if/.style 2 args={         x filter/.code={             \edef\tempa{\thisrow{#1}}             \edef\tempb{#2}             \ifx\tempa\tempb                 \def\pgfmathresult{inf}             \fi         }     },     discard if not/.style 2 args={         x filter/.code={             \edef\tempa{\thisrow{#1}}             \edef\tempb{#2}             \ifx\tempa\tempb             \else                 \def\pgfmathresult{inf}             \fi         }     } }  \begin{document}  \begin{filecontents}{data.csv} X   Alpha   Name    Normal  Spike   Min     Max 1   5       CR      2.42    3.19    0.92    0.98 2   5       LR      2.48    0.80    0.59    0.47 4   10      CR      2.03    3.30    1.76    2.21 5   10      LR      2.10    0.92    0.53    0.62 7   15      CR      2.03    2.88    1.60    1.28 8   15      LR      2.05    1.12    0.68    0.69 \end{filecontents}  \pgfplotstablegetrowsof{data.csv} \edef\numberofrows{\pgfplotsretval}  \begin{tikzpicture} \begin{axis}[     width=10cm,height=6cm,     ybar stacked,     xtick={1,2,4,5,7,8},     xticklabels from table={data.csv}{X}, ]  \addplot [draw,fill=orange,discard if={Name}{LR}] table [x=X, y=Normal] {data.csv}; \addplot [draw,fill=orange!20,discard if={Name}{LR}] table [x=X, y=Spike] {data.csv};  \addplot [draw,fill=green,discard if={Name}{CR}] table [x=X, y=Normal] {data.csv}; \addplot [draw,fill=green!20,discard if={Name}{CR}] table [x=X, y=Spike] {data.csv};  \end{axis} \end{tikzpicture}  \end{document}
How can I get multiple stacked plots (ybar stacked, stack plots=y) in one diagram, such that there are multiple stacked bars for the same x-coordinate, each slightly shifted? Is there a way to reset pgfplot's zero levels after an \addplot command, such that the next \addplot[xhshift=...] doesn't add something to the current stack, but rather starts a fresh stack?  FWIW, overlaying two plots with scale only axis won't help; I need this to work with groupplot
Most efficient way to see if an ArrayList contains an object in Java I have an ArrayList of objects in Java.  The objects have four fields, two of which I'd use to consider the object equal to another.  I'm looking for the most efficient way, given those two fields, to see if the array contains that object.  The wrench is that these classes are generated based on XSD objects, so I can't modify the classes themselves to overwrite the .equals.    Is there any better way than just looping through and manually comparing the two fields for each object and then breaking when found?  That just seems so messy, looking for a better way.  Edit: the ArrayList comes from a SOAP response that is unmarshalled into objects. Is there a difference between Cursor.Current and this.Cursor (where this is a WinForm) in .Net? I've always used this.Cursor and have had very good luck with it but I've recently started using CodeRush and just embedded some code in a "Wait Cursor" block and CodeRush used the Cursor.Current property. I've seen on the Internet and at work where other programmers have had some problems with the Cursor.Current property. It just got me to wondering if there is a difference in the two. Thanks in advance.  I did a little test. I have two winforms. I click a button on form1, set the Cursor.Current property to Cursors.WaitCursor and then show form2. The cursor doesn't change on either form. It remains Cursors.Default (pointer) cursor.  If I set this.Cursor to Cursors.WaitCursor in the button click event on form1 and show form2, the wait cursor only shows on form1 and the default cursor is on form2 which is expected. So, I still don't know what Cursor.Current does. i install ubuntu and followed a guide to put 20gb in '/' and the rest (150gb) in '/home'. Now i just found out that a lot of the things installed in ubuntu usually goes to '/' instead of '/home'. I have a lot more things to install.  So what is the point of '/home' ? How do I fix this ? Should I transfer 150gb from '/home' to / ?  Filesystem      Size  Used Avail Use% Mounted on udev            7.8G     0  7.8G   0% /dev tmpfs           1.6G  9.5M  1.6G   1% /run /dev/sda6        19G   16G  1.8G  91% / tmpfs           7.8G  676K  7.8G   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup /dev/sda2        96M   29M   68M  31% /boot/efi /dev/sda8       159G  1.1G  150G   1% /home tmpfs           1.6G   56K  1.6G   1% /run/user/1000   what is /boot ? Its not '/' or '/home' Can we have a high-speed low-drag close vote review queue? How can I re-enter the US after time in Canada on the VWP? I am an Australian citizen, currently studying in Canada.   I entered the United States In July 22nd for 3 days, where I stayed in Seattle before leaving to return to Vancouver. I then again entered the states on 11th of October and returned on the 18th of October.  On October 19th my original and first Electronic System for Travel Authorization (ESTA), expired. I was under the impression that if I was to travel into the United States again I would have to apply for another ESTA and start the 90 days again, which I was planning on around December the 10th. In addition to this I am flying into Los Angeles on the 17th of December 2014 (where I plan to travel around the USA until flying out of Los Angeles again on 18th of January back to Australia).  However, after speaking to friends and looking at the website I have become confused on what my next course of action should be.  I am told that I cannot apply for another ESTA and be granted another 90 days visit into the USA, whilst I am in Canada and thus not be able to take any of my flights.  What would be the most appropriate action so that I can take my flights leaving North America and also travel the United States? Born's Rule, What is the Reason? The topological space $X=\omega_1\cup \{\omega_1\}$ is not first countable but $\omega_1$ is. Here $\omega_1$ denotes the set of all countable ordinals and $\{\omega_1\}$ is the first uncountable ordinal. Cardinality of $\omega_1$ is $\aleph_1.$And also $\omega_1$ is called the limit ordinal meaning it is the limit point of the set $\omega_1.$  Here I want to prove two things. $1)$ $\omega_1$ is first countable. and $2)$ $\{\omega_1\}$ is the limit point of $\omega_1$. But since no sequence converges to $\{\omega_1\}$, using this I could say that our space $X$ is not first countable.  $1)$ The proof of this I got from  with just one question: it says we need to prove that such an $S(y)$ exists,and I'm thinking $S(y)=\cap\{u\in \omega_1:u\gt y\}.$ This is correct$?$ But here is a chance that the countable base around $y$ may be finite and not countably infinite.  $2)$ If possible let us assume that $\omega_1$ is not a limit point of the set $\omega_1.$ $U$ be a nbd of $\omega_1$ that does not intersect $\omega_1.$ Then what are the elements of $U$ like? The ones coming before $\omega_1$  cannot be uncountable because $\omega_1$  is the first. Then they must be countable. This is absurd so no such $U$ exists. Thus $\{\omega_1\}$ is a limit point.  Are my proofs correct? Thank you. Is it somehow possible that I can extend the link to something which I produce by using \ref with a label by the word standing before \ref? If I write something like that: For further information, have a look into chapter \ref{chap:abc} and figure \ref{fig:def}  then the only thing being &quot;clickable&quot; are the chapter number and the figure number. Is it somehow possible to make the words &quot;chapter&quot; and &quot;figure&quot; being linked to those objects as well? Laptop with no battery What is the use/meaning of 'swap area' while linux installation? When i installed ubuntu in my x86 machine, I had to configure some memory as 'swap area'.  What is the use of this memory and what is the importance of this memory in linux file systems?  How can I determine the exact size of 'swap area' in a machine for the safe working of linux inside in it? Prove that $PSL(2,\mathbb{Z})$ is free product of $C_2$ and $C_3$ Prove that $PSL(2,\mathbb{Z})=C_2 \star C_3$.  Now $C_2 \star C_3=\langle a,b\ |\ a^2, b^3 \rangle$ i.e. the free product.  But how do I show that presentation of $PSL(2,\mathbb{Z})$ is this? Why are the Degrees of Freedom for multiple regression n - k - 1? For linear regression, why is it n - 2? I'm reading a textbook and I see this question:    So there are 200 women, and the DF is 196, implying that the equation for DF is $n - k - 1$. There are 3 variables: bp, age, and type so $k == 3$. What's the intuition behind this?  Also, why is the degrees of freedom for linear regression n - 2? IE9 HTML5 video support How to send mail from the command line? How to send mail from the command line? Difficulty in creating macro '\newcommand' for the beginning and end of frames in Beamer I would like to create a Latex macro for my beamer presentations. I use beamer frequently, and want to make macros for the \begin{frame} and \end{frame} to require fewer keystrokes. At the beginning of the document I have:  \newcommand{\bfrm}{\begin{frame}}%start new frame \newcommand{\efrm}{\end{frame}}%end new frame   Which compiles fine. I then test the first of the two macros for the beginning of the frame:  \bfrm{New frame testing}     blah blah \end{frame}   Which produces the result I am looking for. I then test the second of the macros:  \bfrm{New frame testing}     blah blah \efrm   Fails to compile, saying that there is a runaway argument. What is the reason for the failure? How much money did Harry Potter have? So, we know Harry . By descriptions from the books, it looks like he had enough money to spend during his school years with plenty to spare for later life.  Is there an estimate on how much money he had? How much would that be in muggle money? Was he extremely rich?  I'm thinking here that he could have received more than just an inheritance. For example, anonymous supporters could have given him money through the bank while he was a baby, or when he was about to go to Hogwarts, and he wouldn't have known (not even Dumbledore would have known). Padding a number in a filename to a fixed length I have a directory of files such as:  file.1.png file.2.png … file.10.png … file.1000.png file.1001.png …   How can I pad the number to 4 digits? It should end up like this:  file.0001.png file.0002.png … file.0010.png … file.1000.png file.1001.png … Best practice when analysing pre-post treatment-control designs Imagine the following common design:   100 participants are randomly allocated to either a treatment or a control group the dependent variable is numeric and measured pre- and post- treatment   Three obvious options for analysing such data are:   Test the group by time interaction effect in mixed ANOVA Do an ANCOVA with condition as the IV and the pre- measure as the covariate and post measure as the DV Do a t-test with condition as the IV and pre-post change scores as the DV   Question:    What is the best way to analyse such data?  Are there reasons to prefer one approach over another? Can US citizens go to Cuba freely and vice versa after the recent diplomatic relation restoration? A recent full diplomatic relation restoration between the US and Cuba took place, does that mean that US citizens can go to Cuba freely and vice versa? I want to implement an addition key layer, so that I can access non-alphanumeric keys without having to move my wrists.  I've been using Autokey for this purpose, but the experience was unsatisfactory: it had occasional lags and let original keystrokes slip into certain apps.  So I need a low-level solution.