I am using a function that returns some integers  int[] return;   This function is inside a loop like this  public static int[] toEOBArray(double[] tempVal)  {     int[] out;     for (int i = 0; i &lt; 10; i++)     {         out = fixArray(tempVal[i]);     }     return out; }   What I want is as new arrays come from fixArray to add them to the previous results, so in the end I have a big array that will contain all the small arrays resulting from fixArray  What is the most efficient way of doing this? My main problem is not knowing how to initialize the array that is to hold all the values.
I need to concatenate two String arrays in Java.  void f(String[] first, String[] second) {     String[] both = ??? }   What is the easiest way to do this?
How can I edit two materials simultaneously? Whenever I open a new shading window, whatever I do in one is just mirrored on the other. If I click a node in one window, the same node and material get selected in the other. I can't edit two shaders at once. How can I edit two shaders simultaneously? What are the rules of parallelism? I've been reading a lot about it since yesterday and all I encounter is "They must have the same grammatical form"? What does this exactly mean?  I know how to make parallel sentences with gerunds. The things get trickier when it comes to using modifiers.  For example:     I love using the phone that you bought me and the computer.   On the left side of the conjunction there is a noun phrase that consists of an article + noun + another modifier and on the right side there is an article + noun.  They are both noun phrases but the first one has additional modifier. Is that still considered a parallel sentence?  Another example:     I like to swim and to feel good.   Here on the right side of the conjunction there is an infinitive and on the left side there is an infinitive + complement? Is that parallel? If a PC's ability score increases due to an item, does it increase the corresponding modifier for the ability score or any skills/attacks? Setup SunFire 440 Raid Configuration EJB Transactions in local method-calls In the following setup, does method B run in a (new) transaction?  An EJB, having two methods, method A and method B  public class MyEJB implements SessionBean     public void methodA() {        doImportantStuff();        methodB();        doMoreImportantStuff();     }      public void methodB() {        doDatabaseThing();     } }   The EJB is container managed, with methodB in requires_new transaction, and method A in required transaction. thus:  &lt;container-transaction id="MethodTransaction_1178709616940"&gt;   &lt;method id="MethodElement_1178709616955"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;*&lt;/method-name&gt;   &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;   &lt;/method&gt;   &lt;method id="MethodElement_1178709616971"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;methodB&lt;/method-name&gt;   &lt;/method&gt;   &lt;trans-attribute&gt;RequiresNew&lt;/trans-attribute&gt; &lt;/container-transaction&gt;   Now let another EJB call methodA with an EJB method call. methodA now runs in an transaction. Will the subsequent call to methodB from methodA run in the same transaction, or does it run in a new transaction? (mind, it's the actual code here. There is no explicit ejb-call to method B) I'm too spoiled by Windows utilities that take a digital snapshot of your entire drive, which you can then restore from in the event of a drive crash.  (e.g. like Time Machine for Mac OS X).  Is there a similar way of doing this in Linux? How to do a secure erase on a Macbook Pro? I have a Macbook Pro with SSD and I would like to completely erase every single bits of data on it. How would I do that? On a PC, I would just run Darik's Boot And Nuke, but can I run it on a Mac too, or is there a better alternative? A lot of people write makefiles that say something like  paper.pdf: paper.tex         pdflatex paper         bibtex paper         pdflatex paper         pdflatex paper   To handle re-running TeX to get new/changed references and so forth. Is there a better way to do this? Convert hex string to int in Python How do I convert a hex string to an int in Python?   I may have it as "0xffff" or just "ffff". Dual boot Win 8 / Ubuntu loads only Win My computer is a Sony Vaio Notebook. I used Ubuntu and Win 8 with dualboot but windows somehow managed to remove the menu to choose the OS at startup. I think the BIOS is UEFI. Secure boot was disabled already and Boot Repair somehow fails.  How can I fix this? How to mount and unmount hard drives under Windows (the unix way) How does extra damage work for critical hits? Every Function in a Finite Field is a Polynomial Function Say I have an embedded device which is only capable of doing HMAC-SHA1 transformations (that device is, in fact, a YubiKey).  Would it be secure to feed it like a block cipher in counter mode to get a random pad suitable as an stream cipher?  Of course, I'm talking about not repeating the counter value ever to encrypt data (so this construction would also need some random IV or treating the counter value as a nonce forever). Possible Duplicate:          On Windows I am able to switch between keyboard layouts by pressing Alt+Shift. Is there a similar keyboard shortcut in Ubuntu? Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows&nbsp;XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting). Incorrect icons on hot network questions Can a werewolf turn a muggle into another werewolf? I'm confused about the use of symbols $\vdash$ and  $ \models$. Reading the answers to  and  I see that:  the turnstile symbol $ \vdash $ denotes syntactic implication. Then $ S \vdash \psi$ means that $\psi$ can be derived from the formulae in $S$  the double turnstile $ \models $, denotes semantic implication. Then the notation $A \models B$ means simply that B is true in every model in which A is true.  So I understand that, e.g., $(ZFC+ A) \vdash B$ means that $A \Rightarrow B$ is a theorem in ZFC and, in this sense $\vdash$ is a mathematical symbol for a theorem. While $(ZFC+ A) \models B$ means that $ B$ is true in every model of ZFC in which $A$ is true, and, in this sense $\models$ is not a mathematical but a metamathematical symbol.  I understand correctly? And those are the only uses of the two symbols? Is there any point of using "return !0" in javascript?