int[] array = new int[] {1, 2};          int[] array2 = {1, 2};          int array3[] = new int[] {1, 2};          int array4[] = {1, 2};
I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?
It is a common assumption (and, as far as historical stock market data goes, also proven) that the stock market is always growing if you enlarge the time window long enough . In other words: The stock market always goes up in the long term. Is, therefore, the conclusion valid that you can totally invest as much as you want at any point in time you want and you can never go wrong, if  You diversify strong enough (invest &quot;in the world&quot;) You do not need to urgently sell your assets at any point in time  If yes, all that strategies that rely also on diversified, long-term investments (Dollar-Cost-Averaging &amp; Rebalancing, .. what others do you know?) are just to optimize the yiels, but you'd make profit even without those strategies. Is that correct? Expected value of sums Suppose we draw cards out of a deck without replacement. How many cards do we expect to draw out before we get an ace? Why do you cast downvotes on answers? This is a question which started off with a , then turned into an , and now it's a question in its own right (as suggested by Jeff). I'm not sure where it could go from here :)  It's obvious that different people cast downvotes for different reasons. (Upvotes are less controversial, generally.) Here are some possible reasons:   Answer is wrong Answer is misleading (may be technically accurate, but will lead to readers making mistakes) Answer doesn't match the question (e.g. a C# answer to a question about Java) Answer doesn't really address the question, e.g. suggesting a completely different solution, even if the question specifies that there are good reasons why the current approach has to be followed Answer is okay, but not as good as another one which currently has fewer votes Answer appears to be plagiarised from existing answers. Answer is by someone I don't like. Answer is abusive (profanity, spam etc). No reason, I just felt like it. I'm a , and prefer down to up. Have you considered down? Ideological grounds: answer suggests a technology I don't like, or expresses a negative opinion of a technology I do like   Personally I go with 1, 2 and 8 - although I'll add comments suggesting changes in various other situations.  Have I missed anything? What do you do, and why? What are the net benefits (to you, the world in general, and the answerer) from your approach? Drush from GitHub stopped working 101 positive integers placed on a circle A Pigeonhole Principle problem:     101 positive integers are placed on a circle whose sum is 300. Prove   that it is possible to choose from these numbers some consecutive   numbers whose sum is equal to 200.   (I don't know if the word 'consecutive' is appropriate in this case ,I mean that these numbers follow each other on that circle) How should I install HPLIP binary/proprietary plugin/driver for my HP printer or printer+scanner? Let's assume that one has some modern HP printer and/or scanner which is  supported by HPLIP package from official repository. Or supported by newer version of HPLIP package (see  about installation).  From official documentation () it is known that device needs proprietary/binary driver or plugin.  How should one install such plugin? Prove $\mathbb{Z}$ is not a vector space over a field This is an exercise from Chapter 3 of Golan's linear algebra book.  Problem: Show $\mathbb{Z}$ is not a vector space over a field.  Solution attempt:  Suppose there is a such a field and proceed by contradiction. I will write multiplication $FV$, where $F$ is in the field and $V$ is an element of $\mathbb{Z}$.   First we rule out the case where the field has characteristic 2. We would have   $$0=(1_F+1_F)1=1_F1+1_F1=2$$  a contradiction.  Now, consider the case where the field does not have characteristic 2. Then there is an element $2^{-1}_F$ in the field, and   $1=2_F(2^{-1}_F1)=2^{-1}_F1+2^{-1}_F1$  Now $2^{-1}_F1\in\mathbb{Z}$ as it is an element of the vector space, but there is no element $a\in\mathbb{Z}$ with $2a=1$, so we have a contradiction.  Is this correct? Extending an enum via inheritance I know this rather goes against the idea of enums, but is it possible to extend enums in C#/Java?  I mean "extend" in both the sense of adding new values to an enum, but also in the OO sense of inheriting from an existing enum.    I assume it's not possible in Java, as it only got them fairly recently (Java 5?).  C# seems more forgiving of people that want to do crazy things, though, so I thought it might be possible some way.  Presumably it could be hacked up via reflection (not that you'd every actually use that method)?  I'm not necessarily interested in implementing any given method, it just provoked my curiosity when it occurred to me :-) The situation is as below:  -------|----------------------------        |  stump |batsmen2   broken|batsmen1  here  |  -------|----------------------------   Is it a runout in the above situation? Order of finite fields is $p^n$ I have a script that I need to execute on an NTFS partition. The script's permission is set to 600.  I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything - but it also doesn't change the permissions on the file:  $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700  $ chmod 755 script.sh $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700   As you can see, it remains unchanged. Is the following conjecture true?     Given an $n&gt;1$ and a $k$ such that $0&lt;k&lt;n$ then $\gcd\left(\binom{n}{k}, n\right)&gt;1$   This was a question asked in my old Number Theory course that I recently remembered. It was posed after we learned that $p\mid\binom{p}{k}$ for $0&lt;k&lt;p$. We never resolved it either way. I expect it to be true and have an elegant answer, but I haven't been able to prove it. Run cURL commands from Windows console Is there a way to install cURL in windows in order to run cURL commands from the command prompt? What is the difference between logistic regression and Fractional response regression? In-universe explanation for single line of planetary entry/departure in Star Wars Science fiction story where a colonist is sent by a company to colonize a planet and there a robot tries to sell him a depilating liquid by pulling a gun on him. The company who sponsored his trip to the new planet is extorting him by charging him exorbitant rates for anything they declare is not considered by them as bare necessities. The robot and man collaborate to get from the company the fair deal he deserves. Can't redirect cut output Number of equivalence relations on a set How to Toggle Selected Objects Visibility with H shortcut as in Maya Every subsequence of $x_n$ has a further subsequence which converges to $x$. Then the sequence $x_n$ converges to $x$.