I am trying to import a file with a list of latitude and longitude coordinates.  In Visual C#, and using GMAP.NET, a marker is placed for every coordinate pair.  I want multiple files to be able to be uploaded, and for the user to be able to select the color of the marker for that specific file. I have a combobox with a few options included, however when I try to set the color of the marker to the text in the textbox, it can't "implicitly convert type string to GMarkerGoogleType". Is there a way to make this conversion?  Here is the relevant code:  private void btn_KMLFile_Click(object sender, EventArgs e)     {         DialogResult result = openFileDialog4.ShowDialog();         if (result == DialogResult.OK)         {             string filename = openFileDialog4.FileName;             string[] lines = System.IO.File.ReadAllLines(filename);             foreach (string line in lines)             {                 GMarkerGoogleType MarkerColor = cbo_MarkerType.Text;  //How can I convert this string to a GMarkerGoogleType?                 string[] Data_Array = line.Split(',');                 Double londecimal = Convert.ToDouble(Data_Array[0]);                 Double latdecimal = Convert.ToDouble(Data_Array[1]);                 var marker3 = new GMarkerGoogle(new PointLatLng(latdecimal, londecimal), MarkerColor);                 marker3.IsVisible = true;                 gMapOverlay.Markers.Add(marker3);                  gmap.Update();               }         }     }   EDIT: This question is not a duplicate, the question can be rephrased as what type is a GMarkerGoogleType?
What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse(&quot;Active&quot;);  but that isn't a valid code.
short view distance in 3d view? How do I prove/disprove that $F_n^2 + F_{n\pm 1}^2 = F_{2n\pm 1}$, where $F_n$ is the $n$th Fibonacci number? I was looking at the Fibonacci sequence:  $$1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,\ldots, F_n : F_n + F_{n - 1} = F_{n + 1} \land F_0 = 0$$  Here I noticed something; $\qquad F_n^2 + F_{n\pm1}^2 = F_{2n\pm1} : n\in \mathbb{N}$  For example; $$\ \ F_3^2 + F_{3 + 1}^2 = F_3^2 + F_4^2 = 2^2 + 3^2 = F_{2\times3 + 1} = F_{6 + 1} = F_7 = 13$$ $$F_3^2 + F_{3 - 1} = F_3^2 + F_2^2 = 2^2 + 1^2 = F_{2\times3 - 1} = F_{6 - 1} = F_5 = 5$$ However, no matter how true this can seem, I cannot seem to prove/disprove it.    My Attempt: $$\because (a + b)^2 = (a + b)(a + b) = a^2 + ab + ba + b^2 = a^2 + b^2 + 2ab : (a,b)\in \mathbb{Z}$$ $$\implies F_n^2 + F_{n\pm 1}^2 = (F_n + F_{n\pm 1})^2 - 2F_nF_{n\pm 1}$$ $$\implies F_n^2 + F_{n - 1}^2 = F_{n + 1}^2 - 2F_nF_{n - 1} : F_n + F_{n - 1} = F_{n + 1}$$ $$\implies F_n^2 + F_{n + 1}^2 = F_{n + 2}^2 - 2F_nF_{n + 1} : F_n + F_{n + 1} = F_{n + 2} \iff F_n + F_{n - 1} = F_{n + 1}$$ $$\implies F_{2n\pm 1} + 2F_nF_{n\pm 1} = F_{n + 2\lor1}^2 : F_n^2 + F_{n\pm 1}^2 = F_{2n\pm 1} \tag{+2 if +, +1 if -}$$ $$\implies F_{2n\pm 1} + 2\sqrt{F_{2n\pm 1} - F_{n\pm 1}^2}\sqrt{F_{2n\pm 1} - F_n^2}= F_{n + 2\lor1}$$ $$\implies F_{2n\pm 1} + 2\sqrt{(F_{2n\pm 1} - F_{n\pm 1}^2)(F_{2n\pm 1} - F_n^2)} = F_{n + 2\lor1}^2$$ $$\implies F_{2n\pm 1} + 2\sqrt{F_{2n\pm 1}(F_{2n\pm 1} - F_n^2 - F_{n\pm 1}^2) - (F_nF_{n\pm 1})^2} = F_{n + 2\lor1}^2$$.  $$\because F_n^2 + F_{n\pm 1}^2 = F_{2n\pm 1}$$ $$\implies F_{2n\pm 1} + 2\sqrt{-(F_nF_{n\pm 1})^2} = F_{n + 2\lor1} \neq F_{2n\pm 1} + 2\sqrt{\big(-(F_nF_{n\pm 1})\big)^2}$$ $$\therefore F_{2n\pm 1} + 2F_nF_{n\pm 1}i = F_{n + 2\lor1} : i = \sqrt{-1}$$  I have looked over every step and cannot see where I am wrong. The only part that must be wrong is that:  $$F_{2n\pm 1} + 2F_nF_{n\pm 1}i = F_{n + 2\lor1} \iff F_n^2 + F_{n\pm1}^2 = F_{2n\pm 1}$$  I can seperate $F_{2n\pm 1}$ as $F_n^2 + F_{n\pm 1}^2$ (if true) so I turn the equation into:  $$F_n^2 + F_{n\pm 1}^2 + 2F_nF_{n\pm 1}i = F_{n + 2\lor1}$$ $$\therefore (F_n + F_{n\pm 1})\bigg(\frac{F_n}{F_{n\pm 1}} + \frac{F_{n\pm 1}}{F_n} + 2i\bigg) = F_{n + 2\lor1}$$ Now I know that the greater the value of $n$, one of the fractions in the above equation (depending on which sign is used in $F_{n\pm 1}$) will get closer to the golden ratio $φ = \frac{1 + \sqrt{5}}{2}$ but $i = \sqrt{-1}$ is not a "real" number, although $F_n$ is.  I then searched for other formulae for finding $F_n$ and came across the one below (being Binet's Formula):  $$F_n = \bigg\{\frac{φ^n - ψ^n}{φ - ψ} : ψ = φ - \frac{\sqrt{20}}{2} = \frac{1 - \sqrt{5}}{2} \ \land \ φ - ψ = \sqrt{5}\bigg\}$$  But I do not know what how to turn that into $F_{n\pm 1}$. Could you please show me where I went wrong (because I must have gone wrong somewhere), and also if you wish, could you please show me how to turn the above fraction into $F_{n\pm 1}$ (if possible).  I only used the $(a + b)^2$ expansion rule because my skill level in mathematics is not particularly high compared to most of the users on this site (especially when logging into the MSE and finding fancy symbols like $\nabla$ and $\partial$ and $\sum$ which all look Greek to me, however the only "fancy" thing I know is that $i = i^5 = \cdots = \sqrt{-1}$) so if you used any other techniques in trying to prove this formula, could you please show me step by step?  Much appreciated. Thank you in advance.    Edit: I believe this question is a duplicate of this other question $\longrightarrow$   and I can go here to serve as a little hint $\longrightarrow$ 'I have decided to purchase a jet for getting to NYC and back more quickly.' Are the following sentences grammatical or not? If not, does substituting a to-infinite make them grammatical? (Optional: designate if the sentence expresses purpose, reason, aim, or function)  1 I have decided to purchase a jet for getting to NYC and back more quickly. 2 I have decided to buy a jet for having a quicker way to get to NYC and back.  This is my only reason and aim; this will be the jet's only purpose and function.  3 I hate hairdryers, so I am buying a space heater for drying my hair more naturally, and that is my only aim &amp; purpose &amp; reason and that will be its only function 4 For having a lasting shine in your hair, buy ShineOn Shampoo. 5 My neighbor and I have decided to cooperate more for having a better life together.   Research done: ELL  (Note the  here is a restatement of Cambridge Dictionary's ) ELL  ELL  BBC English  (Currently the best site I've found.) ELU  All of which have answers that I find  (i) incomplete (ii) contradictory (iii) terribly confusing, if not (iv) wrong. To sort through the haze, I am focusing on one issue. Background Some sources say that you need to use a to-infinitive for expressing purpose, aim, function, reason, etc. I find these to be rather hazy distinctions, given that the ODO defines  as The reason for which something is done or created or for which something exists and the same work lists as : aim, reason, function, etc. It is my assertion that at least some of the following sentences demonstrate that one can use the -ing form (be it a gerund, verbal noun, participle) to express individual purpose (aim, reason, function, intention, whatever you want to call it). Do you agree, or not? Why (not)?  In shorter terms, are the sentences grammatical? or do we have to substitute a to-infinitive (including in order to + infinitive) to make them grammatical? (Optional: designate if the sentence expresses purpose, reason, aim, function, etc.) How was the Cloak of Invisibility Created? Why can't Python's raw string literals end with a single backslash? Technically, any odd number of backslashes, as described in .  &gt;&gt;&gt; r'\'   File "&lt;stdin&gt;", line 1     r'\'        ^ SyntaxError: EOL while scanning string literal &gt;&gt;&gt; r'\\' '\\\\' &gt;&gt;&gt; r'\\\'   File "&lt;stdin&gt;", line 1     r'\\\'          ^ SyntaxError: EOL while scanning string literal   It seems like the parser could just treat backslashes in raw strings as regular characters (isn't that what raw strings are all about?), but I'm probably missing something obvious. I need a poll inside my content types.  Sometimes the users create an article and like to create a poll directly into the node they created. They don't want to create an extra poll with no connection to the original article.  So how can I get the poll functionality inside a different content type? How do you use a variable in a regular expression? I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string? In the 10 k tools,  is described as if I had approved it:    However, the review item itself (correctly) displays that I rejected this edit:    Going by   , this should be fixed, but it isn’t.  This could be solved by replacing approved by to reviewed by in the list or making an explicit list, who approved and rejected an edit (which is probably more complicated). My keyboard is typing by itself, could there be a ghost in it? The keyboard on my laptop seems to be typing by itself:   It sometimes types characters like 134, whether by itself or when I hit certain keys. Repeating characters may appear unexpectedly. The system volume may change by itself, or windows like the Print dialog or Web browser may appear.   This can happen without any input or as I type, and may occur more often when certain keys are pressed. Sometimes, the keyboard fails to respond altogether. This is happening regardless of the software involved.  Is there a ghost in my keyboard—is my keyboard broken?  A sample of text from the keyboard might look like this (normal QWERTY...ASDF...ZXC... sequence is expected):   QWERTYUIOPASDF)(G@*HKLZXCVBN QWERTYIOPASDFGL!#ZXCVB13 QWERTYUIOPASDFGHJKLZXCVB!#N qwertyu41iopasdf19g13h28j113k4113zxcvb4n qwerty4u1iopasdf0g7h1jklzxcvb13m qwert13uuuuuuuuuuuuuuuiopasdf87091134ghhhhhhhhhhhhhhhhhhhhhhh13jk13zxcvb14      This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. How to find out when an Oracle table was updated the last time Can I find out when the last INSERT, UPDATE or DELETE statement was performed on a table in an Oracle database and if so, how?  A little background: The Oracle version is 10g. I have a batch application that runs regularly, reads data from a single Oracle table and writes it into a file. I would like to skip this if the data hasn't changed since the last time the job ran.  The application is written in C++ and communicates with Oracle via OCI. It logs into Oracle with a "normal" user, so I can't use any special admin stuff.  Edit: Okay, "Special Admin Stuff" wasn't exactly a good description. What I mean is: I can't do anything besides SELECTing from tables and calling stored procedures. Changing anything about the database itself (like adding triggers), is sadly not an option if want to get it done before 2010. How is the determinant related to the inverse of matrix? Could you please help me computing    $\Big\lfloor\underbrace{\sqrt{2017+\sqrt{2017+...+\sqrt{2017}}}}_\text{2017 roots}\Big\rfloor$? How can I stop fish from sticking to a stainless steel pan? I think Anne Burrell lied to me. She said fish will always stick to a stainless pan. This is true. No matter how well I lubricate my pan, my fish will always adhere like cement. She also said that the pan will release the fish "when it's ready." Maybe meaning it will eventually become unstuck when the fish is done cooking? Well, I've tried that, and it never works. No matter how long I wait, it never becomes unstuck. Most recently I gave it as much time as I could. When I finally chiseled it off the pan, tearing it apart in the process, I saw that it was starting to burn on that side. I've started going back to non-stick until I get this figured out.  Are there any tips? Am I heating the pan wrong? Does it help to slide the fish around a bit after putting it in the pan? What graphics packages are there for creating graphics in LaTeX documents? What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings. I have been playing with the settings for the text object recently, and every time I add a new text object, I need to change the font to my favorite one. (Eurostile LT ExtendedTwo) Is there any way to change the default font so I do not need to change it every time I add a new text object?   Example: $F$ is a finite field of order $q$. What is the size of $\operatorname{GL}_n(F)$ ?  I am reading Dummit and Foote "Abstract Algebra".  The following formula is given:  $(q^n - 1)(q^n - q)\cdots(q^n - q^{n-1})$.  The case for $n = 1$ is trivial.  I understand that for $n = 2$  the first row of the matrix can be any ordered pair of field elements except for $0,0$. and the second row can be any ordered pair of field elements that is not a multiple of the first row.  So for $n = 2$  there are $(q^n - 1)(q^n - q)$ invertible matrices.  For $n\geq 3$, I cannot seem to understand why  the formula works.  I have looked at Sloane's OEIS A002884.  I have also constructed and stared at a list of all $168$ $3\times 3$ invertible matrices over $GF(2)$.  I would most appreciate a concrete and detailed explanation of how say $(2^3 - 1)(2^3 - 2)(2^3 - 2^2)$ counts these $168$ matrices. How do I start Nautilus as root? I've got a problem with Nautilus in Ubuntu 12.04 LTS.  When I run the command gksu nautilus /, the password ask box appears and I type my super-user password, then the password box disappears and Nautilus is not opened.  When I try to open Nautilus as a normal user in with the command nautilus, the folder is opened.  When I try in terminal   $ sudo nautilus   I got the following error  $ sudo nautilus /  ** (nautilus:8523): WARNING **: Command line `dbus-launch --autolaunch=2c8ce9b7da2257c2609b749700000007 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n Could not parse arguments: Cannot open display:   How can I fix this error? Prove that for any $x_0 \in X$ and any $r&gt;0$, the open ball $B_r(x_o)$ is open.   My attempt: Let $y\in B_r(x_0)$. By definition, $d(y,x_0)&lt;r$. I want to show there exists an $r_1\in\mathbb{R^+}$ s.t. $B_{r_{1}}(y)\subseteq B_r(x_0)$. Let $a\in B_{r_{1}}(y)$. Then, $d(a,y)&lt;r_1$. For $a\in B_{r}(x_0)$, $d(a,x_0)&lt;r$. I want to show $d(a,y)&lt;r_1$ implies $d(a,x_0)&lt;r$. By triangle inequality, $d(a,y)\leq d(a,x_0) + d(y,x_0) \rightarrow$  $d(a,y)&lt;r_1\leq d(a,x_0)+d(y,x_0)&lt;2r...$  I'm a little stuck after this point. C# has the keyword called . VB.NET lacks this keyword. How have the Visual Basic programmers gotten around the lack of this keyword? Do they implement they own iterator class?  Or do they try and code to avoid the need of an iterator?  The  keyword does force the compiler to do some coding behind the scenes.  has a good example of that. Is it possible to batch import Wavefront .obj to blender? I'm working on 2.69. If I select multiple .obj files, only one gets imported. Also if I hit A on file selection window to select all files (.obj and .mtl) I get an error, nothing gets imported. I have to import several hundreds of .obj into the blender file, is this possible?