I have a problem with this source code. The outer for loop doesn't iterate:     java.util.ConcurrentModificationException       at java.util.Hashtable$Enumerator.next(Hashtable.java:1387)         The Foo function only reads from myVar and returns a Hashtable .  As a matter of not rewriting myVar function, I've created an auxiliary variable called iteratingHashTable.  while (condition) {      Hashtable&lt;String, Boolean&gt; iteratingHashTable = new Hashtable&lt;String, Boolean&gt;();      iteratingHashTable = myVar;      for (Map.Entry entry : iteratingHashTable.entrySet()) {          if (value.equals(entry.getValue())) {             String analyzingURL = entry.getKey().toString();             myVar.replace(analyzingURL, true);              Hashtable&lt;String, Boolean&gt; listedLinks = Foo(myVar, entry.getKey().toString());              if (listedLinks != null) {                  for (Map.Entry entry1 : listedLinks.entrySet()) {                      if (!entry1.getKey().toString().isEmpty()) {                         myVar.put(entry1.getKey().toString(), entry1.getValue().equals(true));                     }                 }             }         } else {             condition = false;         }     } }
I am using a Collection (a HashMap used indirectly by the JPA, it so happens), but apparently randomly the code throws a ConcurrentModificationException. What is causing it and how do I fix this problem? By using some synchronization, perhaps?  Here is the full stack-trace:  Exception in thread "pool-1-thread-1" java.util.ConcurrentModificationException         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)         at java.util.HashMap$ValueIterator.next(Unknown Source)         at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:555)         at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)         at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)         at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)         at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)         at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
I installed Ubuntu 12.10 and entered a password in SeaHorse. I would like to remove the password of "Default" but I get this error :  GDBus.Error:org.freedesktop.Secret.Error.NoSuchObject: The collection does not exist   Is there a fix or a way to bypass modify the password ? Language hints for quoted code In  I tried to add  for syntax formatting to code blocks quoted from the question. However, it seems they won't be honoured if I write them as a comment in my own part of the post, and if I include the hint in the qutotation as well then I have some ugly empty space before the code block. There should be a way to write these things properly. Finding a basis for a certain vector space of periodic polynomials I am having a little bit of trouble solving an homework question.  I found that $S={ p(x) \in R_4[x]} \big| p(x)=p(x-1) $ is a vector space.  Now I need to find some set, K that holds ${span(k)=S}$  My idea was to substitute: $ a+bx+cx^{2}+dx^{3}+ex^{4}=a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}$  But here I get something that seems a little bit weird, I'd like to look if I have any mistakes that I did not notice. and if I had mistakes, how to make my answer right. I calculated the right side of the equation and I got to  :  $a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}=a+bx-b+cx^{2}-2cx+c+dx^{3}-3dx^{2}+3dx-d+ex^{4}-4ex^{3}+6ex^{2}-4ex+e= (a-b+c-d+e)+(b-2c+3d-4e)x+(c-3d+6e)x^{2}+(d-4e)x^{3}+ex^{4}  $  From here, $ (a-b+c-d+e)+(b-2c+3d-4e)x+(c-3d+6e)x^{2}+(d-4e)x^{3}+ex^{4}=a+b(x-1)+c(x-1)^{2}+d(x-1)^{3}+e(x-1)^{4}\Rightarrow $  $(-b+c-d+e)+(-2c+3d-4e)x+(-3d+6e)x^{2}+(d-4e)x^{3}=0+0x+0x^{2}+0x^{3}+0x^{4}$  And the solution to this equation is only whan $a=b=c=d=e=0$.  I think that I am maybe not in the right direction. Do you have any Idea how to find a set $K\Rightarrow span(K)=S$ ?  Thanks in advance. Do Inverters change the lithium-ion batterie's mA capacity and wattage? let me say if I have a pack of lithium batteries connected in series and parallels, and i want to connect it to an Inverter, BUT...BEFORE I connect it to inverter, lets say it gives out 12 volts "hypothetically" some informations like 3.7 volt batteries, and 2500 mAh,  lets say then the pack gives 12 volts in DC and hypothetically again I calculate it ((still in DC)) is .....  W = V* Amp ... then it means wattage = 11.1 V * 5 Ah which is 55.5 W. then we got 55.5 watts, THEN....after we want to change the dc into ac it gives you 120 volts "please hypothetically" just answer me this, ARE the Wattage And Ampere are remains the same as DC? what would it be the result after AC? How can you find and replace text in a file using the Windows command-line environment? Do my animals need fences? I have a barn and a coop. Each has several animals in. Because fences keep deteriorating and get in the way, I didn't build any. The animals can roam freely around my farm.  Is there a downside to this? Will the animals eat my crops or escape if I don't enclose them? What does "apostrophe s" stand for in "What's it all mean"? I heard someone on a TV show say:     What's it all mean?   As far as I know, 's could be the short form of has and is. But in this case, it seems more like to be the short form of does. Am I correct? I unlocked the 'Files' button/icon from my unity launcher and now it disappearead and I cannot restore it or get it back I unlocked the 'Files' button for the Ubuntu file manager from the unity launcher and I cannot get it back.   When I run the file manager from the dash, the icon does not appear on the launcher like it does for all other applications while they are running. I wanted to have an empty launcher when no applications are running, and just have the icons of those I am actively using there.  Any idea why I don't see it in the launcher when its running or how to lock it back? Alternatives to "and/or"? Is there a way to disable certain Windows 7 keyboard shortcuts?  Specifically, in this case, I want to disable Alt+Space and WinKey+Space. Why does the checkbox stay checked when reloading the page? 5v output to 3.3v? I have a microcontroller and a Raspberry Pi, both running off of the same 5v supply, in parallel. The microcontroller has 4 5v output pins and the other is a Raspberry Pi, that can only accept inputs of 3.3v and less.    Obviously I cannot directly connect the outputs to the inputs - that'll fry the Raspberry Pi.    How can I connect 5v outputs to the GPIO pins on the Raspberry Pi? $\lim\limits_{n\to \infty} \int_0^1 |f(x)-a_nx-b_n| dx=0$ implies $(a_n)_n,(b_n)_n$ are convergent Let $f:[0,1] \to \mathbb R$ be a continuous function and the sequences $(a_n)_n,(b_n)_n$ s.t. $$\lim_{n\to \infty}  \int_0^1 |f(x)-a_nx-b_n| dx=0.$$ Prove that $(a_n)_n,(b_n)_n$ are convergent.   I know that $$\left|\int_0^1f(x)dx\right| \le \int_0^1|f(x)|dx.$$ Can somebody help me, please? A question about how to express a fraction as ${1\over q_1}+{1\over q_2}+ \cdots+{1\over q_N}$ Let $x$ be a positive rational number, strictly between $0$ and $1$. Prove that there is a finite strictly increasing list of positive integers $2 \leq q_1&lt;q_2&lt;\cdots&lt;q_N $ such that $$x={1\over q_1}+{1\over q_2}+ \cdots+{1\over q_N}.$$  I have tried many methods, such as mathematical induction. I know it is obvious that $\frac{1}{m}$ is right for assumption, but when I begin to prove $\frac{2}{m}$, I feel it is hard to find some patterns for $\frac{2}{m}$. Thus, maybe my thoughts are wrong.  Also, I still tried to change the fraction so that the numerator will be smaller and smaller. But I still cannot find a way to lower the numerator. Can someone help me solve the question? Or, can someone give me some hints. I will appreciate you very much! The words in the node of tree I want to plot this graph, but I don't know how to code the words in the nodes.     Here is my code:  \documentclass{article} \usepackage{amsmath} \usepackage{titletoc} \usepackage{tikz} \usetikzlibrary{trees,positioning,fit}  \begin{document}{\allowdisplaybreaks[4]}  \tikzstyle{bag} = [text width=2em, text centered] \tikzstyle{end} = []  \begin{center} \begin{tikzpicture}[sloped] \node (a) at ( 0,0) [bag] {$\ln r_0$}; \node (b1) at ( 3,1.5) [bag] {$\ln r_{10} + \sigma_1\sqrt{\Delta t_1}$}; \node (b2) at ( 3,-1.5) [bag] {$\ln r_{10}$}; \node (c1) at ( 6,3) [bag] {$\ln r_{20} + 2\sigma_2\sqrt{\Delta t_2}$}; \node (c2) at ( 6,1.5) [bag] {$\textrm{Mean} = \ln r_{20} + \dfrac{3}{2}\sigma_2\sqrt{\Delta t_2}$\\$\textrm{Mean Change} = \mu_{11}\Delta t_2 = \ln\dfrac{r_{20}}{r_{10}} + \dfrac{3}{2}\sigma_2\sqrt{\Delta t_2} - \sigma_1\sqrt{\Delta t_1}$}; \node (c3) at ( 6,0) [bag] {$\ln r_{20} + \sigma_2\sqrt{\Delta t_2}$}; \node (c4) at ( 6,-1.5) [bag] {$\textrm{Mean} = \ln r_{20} + \dfrac{3}{2}\sigma_2\sqrt{\Delta t_2}$\\$\textrm{Mean Change} = \mu_{11}\Delta t_2 = \ln\dfrac{r_{20}}{r_{10}} + \dfrac{3}{2}\sigma_2\sqrt{\Delta t_2} - \sigma_1\sqrt{\Delta t_1}$}; \node (c5) at ( 6,-3) [bag] {$\ln r_{20}$}; \draw [-&gt;] (a) to node [below] {} (b1); \draw [-&gt;] (a) to node [above] {} (b2); \draw [-&gt;] (b1) to node [below] {} (c1); \draw [-&gt;] (b1) to node [below] {} (c2); \draw [-&gt;] (b1) to node [below] {} (c3); \draw [-&gt;] (b2) to node [below] {} (c3); \draw [-&gt;] (b2) to node [below] {} (c4); \draw [-&gt;] (b2) to node [below] {} (c5); \end{tikzpicture} \end{center}  \end{document}       Update code use  \draw [-&gt;] (a) to node [below] {} (b1.south east); \draw [-&gt;] (a) to node [above] {} (b2.north east); \draw [-&gt;] (b1.south east) to node [below] {} (c1.west); \draw [-&gt;] (b1.south east) to node [below] {} (c2.west); \draw [-&gt;] (b1.south east) to node [below] {} (c3.west); \draw [-&gt;] (b2.north east) to node [below] {} (c3.west); \draw [-&gt;] (b2.north east) to node [below] {} (c4.west); \draw [-&gt;] (b2.north east) to node [below] {} (c5.west); I want to run the command   python quast.py -o quast contigs.fasta   but I want to do this for multiple contigs.fasta files in multiple directories.  I'm running OSX. Finding $\int x^xdx$ I'm trying to find $\int x^x \, dx$, but the only thing I know how to do is this:  Let $u=x^x$.  $$\begin{align} \int x^x \, dx&amp;=\int u \, du\\[6pt] &amp;=\frac{u^2}{2}\\[6pt] &amp;=\dfrac{\left(x^x\right)^2}{2}\\[6pt] &amp;=\frac{x^{2x}}{2} \end{align}$$  But it's certain that this isn't the correct way to evaluate that, and the answer must be wrong. What the pointer size in 64 bits computer in C++? Drush 6 works great of corse on a Drupal 6 website, but will I have all of the Drush 6 features when working on a Drupal 7 website? Should I use Drush 7 when working on a drupal 7 website?  I found this post that says you can switch between the two version easily, is this correct?  switch to drush6 command: composer global require drush/drush:6.*  switch to drush7 command: composer global require drush/drush:dev-master Global keyboard capture in C# application I want to capture a keyboard shortcut in my application and trigger a dialog to appear if the user presses a keyboard combo even outside of the app. Similar to Google Desktop Search's Ctrl, Ctrl to bring up the search dialog.  I have tried using some keyboard hook modules out there that basically use Win32 interop to get this effect but each implementation I've tried ties down the keyboard to some extent to where you start getting weird behaviors when the application is doing something intensive. Such as loading a large amount of data, this would cause the keyboard and mouse to lockup.  I'm looking for a lightweight solution that would allow this to be done without tying down the keyboard and mouse.