Hashmap : iterate and get values in each key
How do I efficiently iterate over each entry in a Java Map?
How does the Schengen 90/180 rule work? Is it better in C++ to pass by value or pass by constant reference?  I am wondering which is better practice.  I realize that pass by constant reference should provide for better performance in the program because you are not making a copy of the variable. C programming: How to program for Unicode? Will it be possible to update Windows XP after April 2014? How does the Comma Operator work How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  &lt;-  Note comma typo! c = d; The comments in  say that I shouldn't wait until low battery charge level before I charge, because that reduces battery life (this is contrary to my understanding before that the faster we charge (without waiting for battery to discharge) the worse it will be for battery life). My question is, when I should generally start charging to avoid this effect? 20%?   Interesting question: If we always limit the usage of the battery only 20% and above, won't we, in effect, reduces our battery capacity to 80%, because we will only use the battery in 20%-100% state? Well structured URLs vs. URLs optimized for SEO I know that I have to use some tweaking tool and then a extension for this. But all extensions that are suggested for this(Workspace grid, Workspace matrix), aren't available in the software center. Prove Uncountable set minus a countable set is uncountable Let B be a countable set, and let A be an uncountable set. Prove that A-B is uncountable How can I test whether a command's output is an empty string while not   interfering with buffering?  Example:  command | ??? if [ $? = 0 ] &amp;&amp; [ -n "$output_from_command"]; then    ...   I want the output from the code above to be the same as when running command. Where did the convention of using single dashes for letters and doubles dashes for words come from and why is continued to be used?  For example if I type in ls --help, you see:    -a, --all                  do not ignore entries starting with .   -A, --almost-all           do not list implied . and ..       --author               with -l, print the author of each file   -b, --escape               print octal escapes for nongraphic characters       --block-size=SIZE      use SIZE-byte blocks   -B, --ignore-backups       do not list implied entries ending with ~ ...   I tried googling - and -- convention even with quotes with little success. Set a polygon's normal's orientation as the objects local rotation orientation (if every polygon is an object) Is there a replacement for unistd.h for Windows (Visual C)? I'm porting a relatively simple console program written for Unix to the Windows platform (). All the source files include "unistd.h", which doesn't exist.  Removing it, I get complaints about misssing prototypes for 'srandom', 'random', and 'getopt'. I know I can replace the random functions, and I'm pretty sure I can find/hack-up a getopt implementation.    But I'm sure others have run into the same challenge.  My question is: is there a port of "unistd.h" to Windows? At least one containg those functions which do have a native Windows implementation - I don't need pipes or forking.  EDIT:  I know I can create my very own "unistd.h" which contains replacements for the things I need - especially in this case, since it is a limited set. But since it seems like a common problem, I was wondering if someone had done the work already for a bigger subset of the functionality.  Switching to a different compiler or environment isn't possible at work - I'm stuck with Visual Studio. Can negative levels get rid of racial HD? What happens when one is affected by something such as energy drain, and permanently loses levels when one only has racial HD? Does the victim of the spell die? Or do they permanently lose racial HD? Composite primary key from multiple tables / multiple foreign keys I want to build a composite primary key made up of foreign keys from two different tables. I'm still pretty green to this...  A great answer was given to building a composite key from multiple foreign keys on  but I want to do this from multiple tables. I am using Oracle 11g.  foreign key (Name, BoughtFrom, TimeBought)    references the_other_table_name (Name, BoughtFrom, TimeBought)   Imagine that the "references" line actually includes multiple tables. I'm not even sure that the above syntax will work with Oracle.  I have one table "Student" and one table "Parent". It is a many-to-many relationship. My association table is named "Relation" and I would like to make a composite primary key from "PAR_ID" and "STU_ID". Both are foreign keys. What did Enel do after being defeated? As shown in the Manga and the Anime, Enel survived along with the Ark.  He then Embarks to Fairy Verth      The Moon.   In the Manga it shows his adventures on the Moon.  But what happened?  I didn't understand the situation that happened.  What exactly happened on the Moon? I'm trying to use itemize inside a tabularx environment, but I have a problem when I mention the end of the line. It seems that using \\ end the line after the end of itemize, resulting in a supplementary vertical spacing that I would like to remove.  Any hint?  \begin{frame} \frametitle{Sujet de thèse}         \begin{center}             \textit{Sujet N$^\circ$221 : Formation et dynamique des champs de dunes longitudinales.}         \end{center}          \begin{tabularx}{\textwidth}{l !{\color{blue}\vline width 3pt} X}             Contexte &amp;  \scriptsize{Classification des dunes selon leur mécanisme de croissance, leur orientation et leur forme.              Bonne compréhension :             \begin{itemize}[noitemsep,topsep=0pt, label=\textbullet]                 \item du mécanisme de croissance lié à une disponibilité en sédiment grande.                 \item de la croissance sous un vent unidirectionnel.             \end{itemize}} \\             Objectifs &amp; \scriptsize{Etude de l'orientation longitudinale :             \begin{itemize}[noitemsep,topsep=0pt, label=\textbullet, parsep=0pt ]                 \setlength\itemsep{0cm}                 \item Développement d'un formalisme sous des vents multidirectionnels.                 \item Etude des dunes longitudinales dans le cas d'une faible disponibilité en sédiment. (Fingering mode)                 \item Inversion: données topographiques $\longrightarrow$ Données de vents $\rightarrow$ paléo-climats.              \end{itemize}} \\             Outils &amp; \scriptsize{Modèle numérique (Rescal), Données expérimentales, Théorie.} \\         \end{tabularx}     \end{frame}     And yes, dunno if it's important but everything is inside beamer. How can I give a script its own icon in the Unity launcher? With Ubuntu 16.04, if you create a launcher (desktop file in ~/.local/share/applications) with a custom icon for a terminal application (so with Terminal=true) then when you start it, it will spawn a new standard terminal icon, and your custom icon will pulse and disappear within a few seconds.  In 14.04, it just worked as expected. (it would not start a new standard terminal icon).   Any idea what to do to change this behaviour? I have a few terminal apps that I want to launch from unity and the new behaviour is problematic (I lose trace of which is which since they all end up with the standard terminal icon)... Types of polynomial functions. Quadratic, cubic, quartic, quintic, ...,? I would very much like to have a complete list of the types of polynomial functions. I know that theres:  Quadratic :                      (AX^2 + BX + C) Cubic     :               (AX^3 + BX^2 + CX + D) Quartic   :        (AX^4 + BX^3 + CX^2 + DX + E) Quintic   : (AX^5 + BX^4 + CX^3 + DX^2 + EX + F)   What are the names of polynomial functions to the further powers? Sexstic? Septic? Octic? I'm not sure, so if someone could enlighten me, then that would be great. Please provide a list that goes at least to the seventh power, but it would be nice if you could go further. Thanks. I thought the way to undo a \def was to define it to \relax, but that does not appear to work.  Also, am not sure why this produces no output if I try to use \def instead of \let in my attempt to do an undef.  \documentclass{article}  \begin{document}  \def\CaseA{}%  \ifdefined\CaseA%     \def\ProcessCaseA{}%     % Do stuff that uses \ProcessCaseA     %\def\ProcessCaseA\relax% no output if use this, and comment next line     \let\ProcessCaseA\relax% no output if comment this, and use above line \fi  % Now do stuff that requires \ProcessCaseA NOT be defined \ifdefined\ProcessCaseA     ERROR: \textbackslash ProcessCaseA is still defined \else     SUCCESS: \textbackslash ProcessCaseA is not defined \fi  \end{document}