I am working on a project and I noticed that the person used a list for a piece of code. Had it been me, I would have used an array simply out of personal preference because that is what I know. Looking at the code below, what benefit would choosing the list have over the array?  List&lt;string&gt; errors = new List&lt;string&gt;();  if (ddDirector.SelectedItem.Value == "")     errors.Add("You must select an item in the Director list.");  if (errors.Count &gt; 0) {    ErrorList.InnerHtml = "Please correct the following issues below:&lt;br/&gt;&lt;ul&gt;";    foreach (string e in errors)    {       ErrorList.InnerHtml += String.Format("&lt;li&gt;{0}&lt;/li&gt;", e);    }    ErrorList.InnerHtml += "&lt;/ul&gt;"; } return (errors.Count()==0);
MyClass[] array; List&lt;MyClass&gt; list;   What are the scenarios when one is preferable over the other? And why?
If $\left|z+\frac{2}{z}\right |=2$, then prove that max value of $|z|$ is $\sqrt 3 + 1$ (Corrected version) Then the expression will be  $$|z|+\frac{2}{|z|}\ge 2$$  Solving the quadratic inequality   $$|z|\ge1+i$$ and $$|z|\le1-i$$  I don’t know how to solve further. Please help  Thanks!   this is the corrected version of an identical question asked by me. I am sorry for the inconvenience caused This is a revisit of  that seems to have grown stale without any solid answer. Just recently I was baffled by 's ability to :  In my experience, certain review queues seem to be more inclined to &quot;single-user reviews&quot; (like First Posts and/or Late Answers), while others are more geared to &quot;multi-user reviews&quot; (like Close Votes and/or Suggested Edits). This does not seem to be the case here. The &quot;requirement&quot; for such late, duplicate reviews are questionable and               (         ). Even being able to  (I highly doubt this was an instance of keeping the review window open for more than an hour and only reviewing it post mortem - first post reviews are dealt with far more quickly than most other review queues):   While these examples do not speak to the , it sure seems biased. Something is amiss... Over at  we have a far smaller community, so these situations are far more noticeable.  Edit: The following are all candidates for the above discussion: How can I set Excel to always import all columns of CSV files as Text? Though I try to avoid it, I occasionally have to open a CSV file in Excel. When I do, it formats columns containing numbers, which makes them useless for my purposes. As far as I can tell, the only way to prevent this from happening on import is to rename the file so the extension isn't .csv and use the import wizard to specify the format of each column individually. For files with 50-60 columns, this is impractical.  Since every answer for this oft-asked question on the internet suggests either some means of converting the formatted numbers back once the file is open (which won't work for me - I want to solve the general problem, not a few specific cases) or manually selecting the format type of each column (which I don't want to do), I'm looking for a way to set a global preference or style such that all columns of all CSV files opened are always formatted as text.  I know about "armoring" the numbers with quotes, too, but the files I get don't come like that and I was hoping to avoid having to pre-process the files so Excel doesn't screw them up.  Is there a way to do specifically this: Always format all columns in opened CSV files as text, without manually selecting each column every time during import?  I'm using Excel 2003, but I'll take answers for 2007 if that's what you know. Are fractions with prime numerator and denominator dense? So the question is in the title. And I mean dense in positive real numbers ofcourse. Somehow I cannot grasp if this is very trivial or not. The prime numbers aren't that dense, but are there enough of primes to make the fractions constructed from them dense? Is there any matrix $2\times 2$ such that $A\neq I$ but $ A^3=I$? Is there any $2 \times 2$ matrix $A \neq I$ such that $A^3=I$?  In my opinion: no. Thank you very much. How can I prevent URLDownloadToFile from retrieving from the cache? I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version.  I assume it is retrieving a cached version. I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day? Does any uncountable set contain two disjoint uncountable sets? Is it true that for any uncountable $S$, there exits two uncountable subsets $S_1,S_2 \subseteq S$ with $S_1 \cap S_2 = \emptyset$?   I can find no counter example, but no proof either.  I am aware of similar questions regarding the partition of uncountable subsets of the real line, and there are many examples of disjoints uncountable subsets of $\mathbb{R}$, say $R_1,R_2$.   It is not clear to me however whether this extends to any uncountable set. For uncountable sets $S$ with $S \succeq_{card} \mathbb{R}$, there exists an injection $f : \mathbb{R} \rightarrow S$ and choosing $S_1,S_2$ with $S_i = \{s\in S~|~ s = f(r_i) $ for some $ r_i \in R_i\}$, works.   But from what I understood of the continuum hypothesis, there might exist an uncountable sets $H$ with $\mathbb{R} \succeq_{card} H$. So using the above argument, one cannot infer that the property holds for every uncountable sets from observing that it holds for $\mathbb{R}$. Is this right? Are there other ways to prove or disprove the assertion? Export beamer slides to powerpoint/openoffice-impress/keynote editable format I usually prepare my talks using powerpoint/openoffice-impress/keynote, where I explaing programs, pseudocodes, etc. Recently I was thinking about creating text-only, code-only and pseudocode-only slides with beamer and then exporting them somehow to powerpoint where I modify them to add figures or some minor details for polishing the presentation, which are usually hard to do with beamer. I googled a bit around and found that beamer can export to PDF or PS but not to powerpoint. I wonder anyway if you know some possibility of conversion from beamer to on-screen editable powerpoint/openoffice-impress/keynote. I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it:  The memset_16aligned function requires a 16-byte aligned pointer passed to it, or it will crash. a) How would you allocate 1024 bytes of memory, and align it to a 16 byte boundary? b) Free the memory after the memset_16aligned has executed.  {        void *mem;    void *ptr;     // answer a) here     memset_16aligned(ptr, 0, 1024);     // answer b) here     } Managing constructors with many parameters in Java In some of our projects, there's an class hierarchy that adds more parameters as it goes down the chain. At the bottom, some of the classes can have up to 30 parameters, 28 of which are just being passed into the super constructor.  I'll acknowledge that using automated DI through something like Guice would be nice, but because of some technical reasons, these specific projects are constrained to Java.   A convention of organizing the arguments alphabetically by type doesn't work because if a type is refactored (the Circle you were passing in for argument 2 is now a Shape) it can suddenly be out of order.  This question might be to specific and fraught with "If that's your problem, you're doing it wrong at a design level" criticisms, but I'm just looking for any viewpoints. I'm looking for a free RAW editor/converter on Windows. Can you tell me some strong/weak points of them comparing with Capture NX and/or Adobe Photoshop Elements?       - conversion &amp; EXIF  - white balance  - registration not possible anymore   EXIF editing would be a nice bonus.  Related: Why multiplicative group $\mathbb{Z}_n^*$ is not cyclic for $n = 2^k$ and $k \ge 3$ Why does ice make such peculiar sounds? I've come across a couple of videos where some interesting sounds are produced using ice.  (Click on the images to see the video.)      Here, they drop a block of ice into a deep crevice and as the block falls, you can hear some strange sounds. These sounds remind me of some sound effects in old cartoons and sci-fi movies. The pitch of the sounds start high and end up low. Is this some kind of doppler effect?      Here, there's a man performing 'nordic skating', making the same sounds as he skates on top of a thin ice sheet. Maybe they are caused by the cracking ice. But why does that sound like this?    There are some other videos too, where they skip stones on frozen lakes.    Here the ice makes some high-frequency sounds which correspond to the chirping of birds.  What are these sounds and why do they sound the way they sound? Distant aliens receive signal with instructions on how to construct humans, long after Earth is extinct How would I go about creating a 3D MMORPG Mouse Look? How would I go about creating a 3D MMORPG Mouse Look? I have created a 3D Space Rpg that is almost finished with success so far. However, I didn't have a clue, how I would attempt to make a Mouse Look method where if a user right clickes and then holds the right mouse button and moves it around the camera moves around with the mouse. The camera can not move away from your character/ship, it should act as if the character/ship is it's origin and that it rotates all around the origin.  I don't mind coding this with python either. Advice is welcome! How to flatten a list to return a new list with all the elements? Legendre symbol, second supplementary law $$\left(\frac{2}{p}\right) = (-1)^{(p^2-1)/8}$$ how did they get the exponent. May be from Gauss lemma, but how.  Suppose we have a = 2 and p = 11. Then n = 3 (6,8,10), but not  $$15 = (11^2-1)/8$$  n is a way to compute Legendre symbols from Gauss lemma: $$\left(\frac{a}{p}\right) = (-1)^n$$ How do I instantiate a string array object into a Spring.Net container? Remove Windows entry in GRUB menu