I have a question about iterate a hashmap:  Map&lt;String, Integer&gt; map = new HashMap&lt;String, Integer&gt;();   I want to iterate this hashmap and printout out the key and value pair using the following code:  Iterator iterator = portMap.keySet().iterator();   but it indicates me to cast the portMap.keySet().iterator(); to (Iterator)portMap.keySet().iterator();, but the iterator() return as a iterator already, why I need to cast it? And I checked some other code, there is no cast for the return value of iterator(), what is the reason, and how to fix it?
If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?
How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name? Custom arrangement for fields with multiple values in Drupal 7 Automatically make various multiple stroke colour the same as various underlying fill colours. I have auto traced a photograph in illustrator - its got thousands of vectors once I expand it and illustrator has converted each of them to a filled colour - I want to now trace the edges of them with a grungy brush but using the underlying fill colour. Where in illustrator can I stroke or outline these fills using the underlying colour - surely this is something that the program automatically does?   I've found this script online but don't know how to implement it. I'm new to this so any help appreciated. Many thanks.   James   var idoc = app.activeDocument;   var sel = idoc.selection;    for (i=0; i&lt;sel.length; i++) {       var ipath = sel[i];       ipath.stroked = true;       ipath.strokeColor = ipath.fillColor;   } Evaluation of Differentiation and Integration I was having some thought about what would be the syntax to make the end point evaluation of derivatives or integrals. Such as making the | with the two end points of evaluation on the top an bottom of the line. Any suggestions would be wonderful. I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals:  $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$  I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other? What is the difference in meaning of "frustrated at" and "frustrated with" used in sentences like     He is frustrated with me   or      He is frustrated at me   When is each of these sentences above are used? I could install with an error message "unknown media /ALL". It could not run WPS Office. I was wondering how to run a command as another user from a script.  I have the script's owner set as root. I also have the following command being run within the script to run the command as the hudson user:  su -c command hudson   Is this the correct syntax? Possible to change where Android Virtual Devices are saved? I have often read that using RSA for encrypting bigger size plaintext is not good solution.  What I understand is that using RSA encrytion is best for small plaintext and most effective if it is smaller than 'bit size' of RSA. For instance, if I use RSA with a 2048 bit size then the plaintext that I can encrypt must be smaller than 256 bytes.  Is this true? What happens if the plaintext is bigger than 256 bytes? Why is there a problem with larger plaintext when performing RSA encryption? More informative flagging history for comments Avoid footnotes from appearing before mark Many apps are missing from Ubuntu Software app I tried to enable additional repositories according to the instructions from , however my Ubuntu Software app is still missing a lot of popular apps. Is there anything I'm missing?  Ubuntu 16.10 Ubuntu Software app 3.20.1 Physical Interpretation of Planck's Constant I would like to convert a Mp4 file in HD into a Mp4 file of lower resolution. Is there any software that can be used for this? I was trying to give the wording "isomorphic groups have the same structure" a precise interpretation, at least for the finite order case. A positive answer to my final question would reach the goal, as it would translate a "$\cong$" between groups into a "$=$" between sets.    For $n$ positive integer, let be:   $I_n:=\{1,\dots,n\}$; $G$, $\overline G$ groups of order $n$; $\psi\colon G \rightarrow \overline G$ isomorphism; $f$, $\bar f$ bijections; $\theta$, $\bar \theta$ embeddings; in general, $\varphi^{(\alpha)}$ the isomorphism between symmetric groups on sets of the same cardinality, defined by $\sigma \mapsto (g \mapsto (\alpha\sigma\alpha^{-1})(g))$, where $\alpha$ is a bijection between the sets; $S_n$ the symmetric group of degree $n$.   Visually:  $$ \newcommand{\ra}[1]{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex} \newcommand{\ras}[1]{\kern-1.5ex\xrightarrow{\ \ \smash{#1}\ \ }\phantom{}\kern-1.5ex} \newcommand{\da}[1]{\bigg\downarrow\raise.5ex\rlap{\scriptstyle#1}} \begin{array}{c}    I_n     &amp;   &amp;    I_n      \\     \da{f}         &amp;           &amp;     \da{\bar f}          \\    G &amp; \ras{\psi} &amp;    \overline G  \\     \da{\theta}         &amp;           &amp;     \da{\bar \theta}          \\    \operatorname{Sym}(G) &amp; \ras{\varphi^{(\psi)}} &amp;    \operatorname{Sym}(\overline G)  \\     \da{\varphi^{(f)}}         &amp;           &amp;     \da{\varphi^{(\bar f)}}          \\    S_n &amp;  &amp;    S_n  \\ \end{array} $$     Is it $(\varphi^{(f)}\circ\theta)(G)=(\varphi^{(\bar f)}\circ\bar \theta)(\overline G)$? How Do I Opt Out of Privileges? According to  , gold badge holders can now unilaterally close questions as duplicates. I hold seven gold badges for tags on SO, which means I can, on my own, close questions as duplicates for those tagged questions.  Simply put: DO NOT WANT.  However, I do not see any ability in SO (the only SE site I spend much time in) to opt out of any privileges, let alone this one.  Is there a spot that I'm just not seeing that allows me to turn off this new privilege? Answers in top Network Posts showing incorrect score There is already a question  which is posted around a month ago (which was fixed). My question reports a similar issue of showing inaccurate scores along with another bug.   A couple of answers in the Top Answers in my network profile are showing incorrect score.         As we can see they are showing a score of 10. But as of writing this question, the score of both the answers is 9.  and  both have a score of 9 instead of 10.  Even though the current score is 9, both these answers reached a score of 10 a few months ago and I was awarded  for both.         The vote was removed either when a user was removed or there was an unupvote. As far as I can tell, I don't remember an unupvote notification in the achievement box from these answers. My guess is the votes are removed when user accounts were deleted.   So, I suspect the score of answers in Top Network Posts is not updated either when there is an unupvote or a vote thrown away due to account deletion.   Is this the right reason why score is inaccurate? Can this be fixed? Most properties of a single binary operation can be easily read of from the operation's table. For example, given $$\begin{array}{c|ccccc} \cdot &amp; a &amp; b &amp; c &amp; d &amp; e\\\hline a     &amp; e &amp; d &amp; b &amp; a &amp; c\\ b     &amp; d &amp; c &amp; e &amp; b &amp; a\\ c     &amp; b &amp; e &amp; a &amp; c &amp; d\\ d     &amp; a &amp; b &amp; c &amp; d &amp; e\\ e     &amp; c &amp; a &amp; d &amp; e &amp; b \end{array}$$ it is easy to check that it is closed (no elements occur in the table which don't occur as row or column index), commutative (the table is symmetric), has a neutral element (the row and column of $d$ are copies of the index row/column), and has an inverse element for each element (there's a $d$ in each row and column). In other words, almost all important properties can immediately be seen. The only part missing is associativity.  Therefore my question: Is there a simple way to see directly from the operation's table (i.e. without doing explicitly all the calculations) if an operation is associative? Finding parenthesis via regular expression