I was googling for and found no results for this.  most of the people declare the array inside the void. like this  private void Something(){                 ArrayList list = new ArrayList();                 list.Add("awdawd"); }   but I have to declare the array outside of it because it would be used from different voids. this is my code:   public string[] Names= { "Rick", "Morty", "John" };   and for the db:   private void GetNames() {          string cmdText = "SELECT * FROM Login";          // using (SqlConnection cnn = new SqlConnection("Server=.\\SQLEXPRESS;Database=TestDB"))         using (SqlCommand SelectCommand = new SqlCommand(cmdText, connectionstring))         {             SqlDataReader myReader;             connectionstring.Open();             myReader = SelectCommand.ExecuteReader();          }      }   I tried to make it Names.add("Mario"); but it didnt work.  any suggestion?
How to add new item in existing string array in C#.net?  I need to preserve the existing data.
QGIS area calculation differs when on the fly CRS transformation enabled When I open QGIS, add the layer, and calculate the areas of the shapefile via field calculator I get a different area than when I open QGIS and check "Enable on the fly CRS transformation" and calculate the area. This is despite making sure that the project and the layer have the same Coordinate system (same EPSG number). What am I doing wrong?   I have a shapefile with area calculations made with ArcGIS (not be me, the data was handed to me and I have no clue for which CRS the area was calculated with ArcGIS). The shapefile layer CRS is EPSG: 21781 (Switzerland). In QGIS, if I do not change the OTF settings and leave the project CRS as EPSG:4326 (WGS84) I get the same value as the ArcGIS area value. However, if I change the OTF before adding the layer to EPSG: 21781 I get different area values. As I understand this suggests that ArcGIS Area was calculated with the CRS EPSG: 4326.  First workflow:   open QGIS  project CRS: EPSG 4326  add layer  project CRS adapts automatically and is EPSG 21781 now  calculate $area with field calculator    Second workflow:   open QGIS  project CRS: EPSG 4326  Turn on OTF, set project CRS to EPSG 21781  add layer  calculate $area with field calculator    Step 5 of the first and second workflow DO NOT produce the same area. Subtracting (erasing) polygons from polygon using ArcGIS for Desktop? In a ring, I was trying to prove that for all $a$, $a0 = 0$.  But I found that this depended on a lemma, that is, for all $a$ and $b$, $a(-b) = -ab = (-a)b$.  I am wondering how to prove these directly from the definition of a ring.  Many thanks! Why won't my taskbar display on my secondary monitor? On my secondary monitor (currently using Windows 10), my taskbar will barely show up. I've tried adjusting the resolution to lower ones (it recommends 1920x1080) and it doesn't do much. Is there a way to adjust the taskbar so I can see it?  That is about what I see. I could make it bigger via Snipping Tool and see my entire desktop on the picture but not normally. how do i get my stolen phone& pictures back? On 7 july 15 someone broke in my house and stole my galaxy note 3 it did not have service it has been disconnect for about 6mo now i would like to get my phone back because it had picture of me and my dad who died the day after father day this past june &amp; other family pictures that can not be replaced.how do i go about getting those back? Extract substring in Bash Why does demand for stock rise when a company appears to have high future value? How to remove ubuntu partitions and use them to install windows There seems to be a preference for to have the    18 mm - 55 mm 55 mm - 250 mm   lenses, but no mention of why they're better than a single 18-200mm. Could someone please explain why the two separate are better than the one combined, and if anyone has quantified this difference?  (I'm curious about Canon in particular.) How do I rename all folders and files to lowercase on Linux? I have to rename a complete folder tree recursively so that no uppercase letter appears anywhere (it's C++ source code, but that shouldn't matter).  Bonus points for ignoring CVS and Subversion version control files/folders. The preferred way would be a shell script, since a shell should be available on any Linux box.  There were some valid arguments about details of the file renaming.   I think files with the same lowercase names should be overwritten; it's the user's problem. When checked out on a case-ignoring file system, it would overwrite the first one with the latter, too. I would consider A-Z characters and transform them to a-z, everything else is just calling for problems (at least with source code). The script would be needed to run a build on a Linux system, so I think changes to CVS or Subversion version control files should be omitted. After all, it's just a scratch checkout. Maybe an "export" is more appropriate. Replace \n by a newline in sed portably Why do we need in RSA the modulus to be product of 2 primes? Change Windows 7/8/10 system language - welcome screen, login, etc How to influence the name of the pdf file created with pdfLaTeX (from within the source code)? I have a source file called 2011-05-27_Myfilename.tex and I'd like to create a PDF file from it called only Myfilename.pdf.  Can this be configured from within the .tex file itself?  (It seems to be possible with    pdflatex -jobname=Myfilename.tex 2011-05-27_Myfilename.tex   However, as many different files are concerned, It would be easier to have an option like output=Myfilename in the LaTeX source code.) This is an example from a question sheet (non-assessed) of a university class. If M is a non-orientable, closed, connected 3 manifold, prove $H_1(M;\mathbb{Z})$ is an infinite group. I know that since $M$ is non-orientable it follows that $H_3(M;\mathbb{Z}) = 0$ and since $M$ is connected $H_0(M;\mathbb{Z}) = \mathbb{Z}$. I want to apply a combination of Poincare duality and Universal coefficient theorem to try and find a contradiction if $H_1(M;\mathbb{Z})$ has no free part. However poincare duality doesn't apply here so I'm stuck.  I would appreciate any hints as to how to proceed. Why isn’t singular ‘they’ used with 3Sg verb forms? There are many (duplicate) questions about the acceptance, popularity and history of singular they (and their, them and themself) around here, it even got a tag of its own. If I didn’t miss anything, however, the proper verb form hasn’t been questioned yet.  As we all know, English third person singular pronouns (it, she, he and one, +body), names (Alice, Bob, …) and nouns (student, teacher, …) demand the +(e)s suffix be added to the finite verb form in simple present, where some auxiliary verbs have a “special” form (is &lt; *bes / *ares and has &lt; *haves). All other subjects don’t, including plural third person pronoun they.  When the plural you replaced thou (with thee, thy / thine), the other marked verb form that had remained in English – i.e. suffix +(e)st or +t – vanished, too. The first and second persons only ever appear as pronouns (I, we; you), not names or nouns, so there was no strong inclination to keep the verbal inflection.  The second person precedent would suggest that singular they be used with uninflected verb forms which is how it’s usually encountered in the wild. Assuming that they someday replaces he and she (and maybe it) it would lead to disagreement with the words the pronoun stands in for:        Alice         goes to her   place  by herself.   Bob           goes to his   place  by himself.   Alice and Bob go   to their place  by themselves. – (common)   Alice and Bob go   to their places by themselves. – (separate)                  She  goes to her   place  by herself.   He   goes to his   place  by himself.   They go   to their place  by themselves.   They go   to their places by themselves.                  They ?goes to their place  by themself.   ditto   They  go   to their place  by themselves.   They  go   to their places by themselves.                  They ?go to their place  by ?themselves.   ditto   They  go to their place  by  themselves.   They  go to their places by  themselves.      So why doesn’t singular they afford s on present-tense verbs like all other third person singular subjects do?   I learned about singular they only long after I had been taught English as a second language in school. That’s why it’s still a conscious decision to use it and hence I could easily adapt to use s forms with it, but would that sound and look funny / strange / wrong to native speakers? Arduino only works in root I've installed Arduino but as the title says, I can only upload with sudo. And yes my user is part of the dialout group so that's the weird thing.   Arduino did function before on my system. What could be wrong?  Output ls -l:  ls -l /dev/ttyUSB* crw-rw-rw- 1 root dialout 188, 0 apr  2 09:23 /dev/ttyUSB0 How to pipe the result of 'date' command to 'mv' command I want to rename my file to the current timestamp.I know how to get the current timestamp("date +%s") but how can I pipe it to 'mv' command? $n$ choose $k$ where $n$ is less than $k$ I am working on parameter estimation and one of the estimators involves a summation of $_nC_k$ ($n$ choose $k$) expressions. For some iterations, I need to compute expressions like $_0C_1$, $_0C_2$, etc.  In general how do we compute $_nC_k$ when $n$ is less than $k$? Do we still use the formula $\frac{n!}{(n-k)!k!}$ and use the gamma function to compute the negative factorial?  Thanks! Why is ++i is l-value and i++ not?