I have some values (:a , :a , :b , :c , :f , :f) which I want to store in a unique index based Data structure, which I can later iterate over to get my values.  Can any one please let me know which is the simplest way ?  E.g   :a :a :b :c :f :f   LATER,  Iterate on the DATA STRUCTURE based upon, the INDEX, to get my values  Thanks in advance
I've always been one to simply use:  List&lt;String&gt; names = new ArrayList&lt;&gt;();   I use the interface as the type name for portability, so that when I ask questions such as these I can rework my code.    When should  be used over  and vice-versa?
What is this mark over the question When I open a site I see a mark over a question.See screen shot.  When I open the question mark is not remove.It still appear.    is this bug or? GeoTools CRS.getAxisOrder(CRS.getAxisOrder("EPSG:4326")) returns EAST_NORTH (LON_LAT) All is in the title, with GeoTools if I do :  AxisOrder order = CRS.getAxisOrder(CRS.getAxisOrder("EPSG:4326"));   It returns EAST_NORTH (= LON_LAT), but EPSG:4326 is defined as ordering latitude first and then longitude, as stated here :   So, what is happening here ? Am I doing something wrong ? Creating controls within a Loop I have have some code which adds new cells to a table and fills them with text boxes.   The way I've coded it so far works fine:          TableCell tCell1 = new TableCell();         TableCell tCell2 = new TableCell();         TableCell tCell3 = new TableCell();         TableCell tCell4 = new TableCell();         TableCell tCell5 = new TableCell();         TableCell tCell6 = new TableCell();         TableCell tCell7 = new TableCell();          TextBox txt1 = new TextBox();         TextBox txt2 = new TextBox();         TextBox txt3 = new TextBox();         TextBox txt4 = new TextBox();         TextBox txt5 = new TextBox();         TextBox txt6 = new TextBox();         TextBox txt7 = new TextBox();          tCell1.Controls.Add(txt1);         tCell2.Controls.Add(txt2);         tCell3.Controls.Add(txt3);         tCell4.Controls.Add(txt4);         tCell5.Controls.Add(txt5);         tCell6.Controls.Add(txt6);         tCell7.Controls.Add(txt7);          tRow.Cells.Add(tCell1);         tRow.Cells.Add(tCell2);         tRow.Cells.Add(tCell3);         tRow.Cells.Add(tCell4);         tRow.Cells.Add(tCell5);         tRow.Cells.Add(tCell6);         tRow.Cells.Add(tCell7);   As you can see there's basically 4 instructions getting repeated 7 times. I'm sure there has to be a way to accomplish this with just 4 lines of code within a FOR loop and having all the names dynamically assigned but I just can't seem to find anything that would point me in the direction of how to do it.  Something like the following is what I'm after:      for (int i = 0; i &lt; 6; i++)     {          TableCell tCell[i] = new TableCell();         TextBox txt[i] = new TextBox();         tCell[i].Controls.Add(txt[i]);         tRow.Cells.Add(tCell[i]);      }    Any help would be much appreciated. What is the probability that when you place 8 towers on a chess-board, none of them can beat the other. What is the probability that when you place 8 towers on a chess-board, none of them can beat the other.  Attempt: ${64 \choose 8}^{-1} \approx1$ in $4\ 400\ 000\ 000$  Correct answer: ${64 \choose 8}^{-1} \cdot 8! \approx 1$ in $9\ 000\ 000$.  I disagree with the $8!$. If there's combinations (binomial coefficient) in the denominator, why would there be permutations i.e. the order counts, in the numerator? Multivariate polynomial with no mixed terms How does the twitter bot work? I heard that there was a twitter bot which automatically posted questions and asked for answers for specific questions on every site. How do they work? Is there an algorithm for doing this or is it purely random? I know that it doesn't tweet closed questions, but that's it. Variable number of arguments in C++? Java string to date conversion What's the full-form & significance of USS & ISS prefixes in name of Star Trek starships? Are PPAs safe to add to my system and what are some "red flags" to watch out for? I see a lot of interesting programs out there that can only be obtained by adding a "PPA" to the system but, if I'm understanding correctly, we should stay within the official "repositories" for adding software to our system.   Is there any way for a novice to know if a "PPA" is safe or if it should be avoided? What tips should the user know about when dealing with a PPA?. Is there any way to keep a command from being added to your history? I have a command that I want to keep out of my history file, and I really don't care to have it there when I search the history stored in memory, though that's less of a concern. Is there any way to prevent this, or do I just have to go back and edit my history file.  update: I didn't realize this might be shell-specific. My shell is zsh. You're welcome to answer for other shells so people know how to do this in their shell. Make a file pointer read/write to an in-memory location I understand the idea of a focal length for a single lens, i e the distance from the lens to the point at which parallel rays of light converge. However, in the case of a photographic lens with multiple lens elements, where exactly is the focal length of the lens as a whole measured from? I've seen them maneuver. They definitely can go backwards. How fast can they go in reverse? Is warp speed possible, or is reverse limited to impulse power? If it is limited to impulse power, can they travel backwards under impulse power as fast as they travel forwards under impulse power? Avoid trailing zeroes in printf() Cycles Normal Bake does'nt bake indents that are not tapered I can bake high poly normal maps with a lot of success, however if I try to bake a very simple indentation on a cube with no tapering I get a flat baked normal map, please see the below image to clarify what I mean.   I dont know I am doing wrong because if I scale down the indented face slightly it will bake the normal map correctly, as seen in the image below. How can I copy the contents of a folder to another folder in a different directory using terminal? I am trying to copy the contents of a folder to another folder in a different directory using terminal.  Would somebody be able to provide me an example of the command line syntax required to achieve this? Closed form for $\int_0^1\log\log\left(\frac{1}{x}+\sqrt{\frac{1}{x^2}-1}\right)\mathrm dx$ Can \includegraphics be used to change an image color? I'm including a number of PDF images in my document using \includegraphics.  I'm wondering if there's a way for LaTeX to adjust their color profile, hopefully the same way it can flip images upside down, resize, and crop, as here:   Let me detail a little more my desired outcome, in case there's another way to achieve this: The images are brightly colored---I'd like to reduce color levels, or possibly render them grayscale, and I'd prefer to not have to do external pre-processing, if this is possible.  I'm using XeTeX. I would like my Dock to show only the windows of the current workspace. Especially in the little preview window. I find it very confusing to jump around workspaces when trying to find the right window.