I have created an IList variable as below:  IList&lt;vertex&gt; matrix = new List&lt;vertex&gt; ();   Here, vertex is a structure I defined with one of the members being visited (boolean).  But, when I try to modify this member by traversing through the list as below:  matrix[j].visited = false;   It gives an error saying "Cannot modify return value because it is not a variable". Any idea why?
I have a list of structs and I want to change one element. For example :  MyList.Add(new MyStruct("john"); MyList.Add(new MyStruct("peter");   Now I want to change one element:  MyList[1].Name = "bob"   However, whenever I try and do this I get the following error:     Cannot modify the return value of   System.Collections.Generic.List.this[int]‘ because it is not   a variable   If I use a list of classes, the problem doesn't occur.  I guess the answer has to do with structs being a value type.  So, if I have a list of structs should I treat them as read-only? If I need to change elements in a list then I should use classes and not structs?
Remote desktop without a password I have an HTPC with a user that has no password and autologin.  I want to be able to connect to it via Remote Desktop without a password, so I can login with the original user. (I don't want to add another user just for the mstsc)  Is there a way of doing that?  The OS is Windows 7, 32bit. Book identification about boy who gets computer zapped into head I remember this book from 15+ years ago about a normal boy who was working on his computer (replacing the motherboard maybe?) and he touched something and got zapped. When he came to he came to realize that the computer shocked itself into his head.   Cut to being the hero sometime down the line and maybe saving someone who was kidnapped? Or was kidnapped himself and had to get out of it using the computer?  I don't know why it's in my head all of the sudden but Google isn't helping me at all! Possibilities for Python classes organized across files? I'm used to the Java model where you can have one public class per file.  Python doesn't have this restriction, and I'm wondering what's the best practice for organizing classes. Parameter Sniffing (or Spoofing) in SQL Server A while ago I had a query that I ran quite a lot for one of my users. It was still being evolved and tweaked but eventually it stablised and ran quite quickly, so we created a stored procedure from it.   So far, so normal.   The stored procedure, though, was dog slow. No material difference between the query and the proc, but the speed change was massive.   [Background, we're running SQL Server 2005.]  A friendly local DBA (who no longer works here) took one look at the stored procedure and said "parameter spoofing!" (Edit: although it seems that it is possibly also known as 'parameter sniffing', which might explain the paucity of Google hits when I tried to search it out.)   We abstracted some of the stored procedure to a second one, wrapped the call to this new inner proc into the pre-existing outer one, called the outer one and, hey presto, it was as quick as the original query.   So, what gives? Can someone explain parameter spoofing?   Bonus credit for    highlighting how to avoid it  suggesting how to recognise possible cause discuss alternative strategies, e.g. stats, indices, keys, for mitigating the situation Using round function in QGIS expression? On my system (Windows Vista Home Premium 64bit) Python files are associated with Python interpreter:  C:\Users\Piotr&gt;assoc .py .py=Python.File C:\Users\Piotr&gt;ftype Python.File Python.File=c:\python\2.7\python.exe "%1" %*   Nevertheless when I run any Python script from command line a window titled Open With pops up asking me to Choose the program you want to use to open this file. C++ preprocessor __VA_ARGS__ number of arguments If $\lambda$ is an eigenvalue of $A^2$, then either $\sqrt{\lambda}$ or $-\sqrt{\lambda}$ is an eigenvalue of $A$ $A$ is an $n\times n$ matrix of complex numbers. Prove that if $\lambda$ is an eigenvalue of $A^2,$ then $\sqrt{\lambda}$ or $-\sqrt{\lambda}$ is an eigenvalue of $A.$    If $\lambda$ is an eigenvalue of $A^2,$ we have $\lambda\alpha=A^2\alpha$ for some $\alpha.$ Then how can we find a $\beta$ s.t. $\sqrt{\lambda}\beta=A\beta?$ How can I check the integrity of a downloaded Ubuntu CD? I've just downloaded a CD image of Ubuntu. I know the installer has a check CD option, but how can I check that the image is good before burning it to CD? $\lim\limits_{n\to \infty} \int_0^1 |f(x)-a_nx-b_n| dx=0$ implies $(a_n)_n,(b_n)_n$ are convergent Let $f:[0,1] \to \mathbb R$ be a continuous function and the sequences $(a_n)_n,(b_n)_n$ s.t. $$\lim_{n\to \infty}  \int_0^1 |f(x)-a_nx-b_n| dx=0.$$ Prove that $(a_n)_n,(b_n)_n$ are convergent.   I know that $$\left|\int_0^1f(x)dx\right| \le \int_0^1|f(x)|dx.$$ Can somebody help me, please? To my (British) ear, it never sounds correct to say you have a doubt about something.  I expect that doubt to be pluralised, even if there's only one specific thing that I'm doubtful of, in one specific way, so I would always say "I have doubts about something".  Answers to  say that using doubt as a synonym for question is "Indian English". That seems to be the case in  which starts with "I have a doubt on my construction", because the OP really is saying "I have a question" (which he goes on to actually ask). Okay, it should have been a question/doubt about something, not on, but I'm not concerned with that detail here.  But in  the OP says "...there is a doubt that can I use [some construction]". In that case it's not easy to see how the word doubt can be replaced with question.  I don't have a problem with, for example, , because there I interpret it as doubt=uncertainty (a state of mind, syntactically equivalent to words like happiness, agitation, sorrow, etc.). But you certainly can't "have a happiness about something". So my question is...     Is it acceptable today to use singular noun doubt in any contexts where it means something other than state of mental uncertainty? If so, what are those contexts? JavaScript + Unicode regexes How can I use Unicode-aware regular expressions in JavaScript?  For example, there should be something akin to \w that can match any code-point in Letters or Marks category (not just the ASCII ones), and hopefully have filters like [[P*]] for punctuation, etc. How to add item to right-click menu when NOT selecting a folder or file? How do I add a menu item to my context menu to open up powershell (or any other arbitary application) when I right-click inside Windows Explorer?  I found tons of links on how to add menu items when doing this: (selecting a folder; )    ...but couldn't find any instructions on how to add menu items when doing this: (not selecting a folder or file)    I did find  and tried adding powershell to HKEY_CLASSES_ROOT\Directory\Background\shell\, (loosely based on the  and linked above) but it didn't work for me.  I'm running Windows 7, by the way.  Also, I'm currently interested in adding only PowerShell, but I'd prefer a general solution I can apply to add any program to the context menu. How can I reuse a Common Table Expression What is projection of WGS84 in GIS software? WGS84 is a reference ellipsoid that determines coordinates of every point on Earth using latitude, longitude and height about the its surface.  This ellipsoid is often used as a base to make maps. Though, to make a map on a flat paper or a flat digital screen you need a projection too. An example of a popular projection would be UTM.   Mainstream GIS software give plethora of projection alternatives to display your data layers. Among them, they also let you display your data using WGS84 only.  I think they are using a certain projection but what projection is that? I have read that positional parameters start at $1 (for example: $1, $2, $3 and so on are positional parameters). But $0 is not a positional parameter.  But why $0 is not a positional parameter?  I think this could be a reason, but not sure:  Positional parameters only take their values when a script is executed. For example: if we do ./myScript Hello, then $1 will have the value Hello. But $0 can take its value on two occasions: when a script is executed (it would have the value of the script name), and when bash itself is executed without a script (it would have the value bash or -bash). Is there a rule of thumb for objective questions asked out of curiosity? Isaac Moses, the patriarch of Mi Yodeya, :  [...] the general Stack Exchange directive, expressed in the uneditable part of that section of the About page, to &quot;Focus on questions about an actual problem you have faced. Include details about what you have tried and exactly what you are trying to do.&quot; In fact, while this directive is perfect for the behemoth programming site that Stack Exchange grew out of, it doesn't fit very well for any of the more intellectually-oriented, rather than practically-oriented sites. [...]  This is something that's bugged me for a while, and ended up prompting a discussion between Anna, Aarthi and me. The gist of it: is there any simple test that can be used to identify answerable questions asked in good faith when the &quot;problem to be solved&quot; is... simple curiosity? Obviously, this is something that sites like  and  have had to contend with for some time, but now and then such questions pop up even on sites where folks are generally trying to solve real problems. While a potentially interesting thought experiment, . Strictly-speaking, problems like that fail the  test. And yet, I would keep that question simply because I learned something useful from the answers − not necessarily something I would ever apply to socks mind you, but certainly something I might apply to similar problems. I don't believe the question was asked in bad faith or for mindless social fun; yet, I have a bit of trouble stretching the definition of &quot;based on actual problems&quot; to contain it. Obviously, the fact that we're hosting a growing number of sites dedicated mostly or entirely to intellectual curiosity makes this something of a rhetorical question. The &quot;actual problems&quot; part of the FAQ was added specifically to draw a line between good and bad  − heading off  and their ilk. But it's a pretty damn good litmus test, and if it's ok to ignore it for some questions − or particularly for  − then what should stand in its place? I often need to view on the canvas the (selected or not) features from the current active vector layer.  In this situation, I only need to view something on the canvas, without doing anything on the canvas itself (so, the active window is always the Attribute Table).  This is what I usually do:   Open the Attribute Table for the current active layer; Select the first feature; Press Ctrl+P button (i.e. the "Pan map to the selected row" button); Minimize the Attribute Table; View something on the canvas for the current feature; Go to the first step until needed.   Is there a way (a method, a shortcut) for directly browsing every feature on the canvas without the needing of going backwards and forwards with the Attribute Table? I mean, something like a "next" button?  (I may use the workaround of splitting the windows of the Attribute Table and of the canvas within the monitor, or also docking the Atrribute Table, but I would like to work on the full QGIS window).    EDIT I saw that my question was casted as a duplicate of  question. The two questions are very similiar, but I think it should be left as open for two reasons:   the related duplicated question doesn't have an accepted answer; my question is slightly different because I'm looking for the possibility of displaying only the selected features (and the @Joseph's , that I marked as accepted, answers well to my request). Child who entered under ESTA/VWP accompanying US citizen mother "More clear" vs "Clearer": when to use "more" instead of "-er"?