I am using a struct List with 2 variables. I am trying to set the value of a variable in a loop but I get the error:  Cannot modify the return value of 'List&lt;&gt;.this[int]' because it is not a variable  Why am I seeing this error? [Serializable] public struct SetData {      public float Time;      public float Value; }  public List&lt;SetData&gt; setData;  void Start () {     for (int i = 0; i &lt; setData.Count; i++)     {        setData[i].Time= ((float) DateTime.Now.Hour + ((float) DateTime.Now.Minute * 0.01f));     } }
I have this struct:  struct Map {     public int Size;      public Map ( int size )     {         this.Size = size;     }      public override string ToString ( )     {         return String.Format ( "Size: {0}", this.Size );     } }   When using array, it works:  Map [ ] arr = new Map [ 4 ] {     new Map(10),     new Map(20),     new Map(30),     new Map(40)};  arr [ 2 ].Size = 0;   But when using List, it doesn't compile:  List&lt;Map&gt; list = new List&lt;Map&gt; ( ) {     new Map(10),     new Map(20),     new Map(30),     new Map(40)};  list [ 2 ].Size = 0;   Why?
I'm sure everyone is familiar with the Ship of Theseus paradox, basically "If you replace parts of a ship over time until none of the original ship is left, is the end product still the same ship?"  I just read pop philosophy books, so spare me if this is an idiotic question, but could this be applied to the Brain and consciousness? If you were the take individual atoms/neurons, and somehow replace them with its exact copy one at a time, how would the person experience that?   I don't think there would be an interruption of consciousness, but at the end it's a completely separate (but identical) brain from the one you started with. Exactly as if you had just cloned the whole thing, right? But without interruption.  What interests me is the gradual transition of consciousness here, is it possible to know how that would  work?  I think I remember hearing people argue similarly for both the existence of a transcendent soul and also AI consciousness. And the only other discussion I found of this was on a flat earth forum, so I don't know what to make of that.   I hope I articulated my question clearly. Thank you! What is the difference between linear equation and linear regression? I am using linear equation to find the correlation of values of x, y and z  3x + 4y + 2z = 6 4x + 1y + 4z = 17 8x + 2y + 5z = 9   I would like to know the difference between linear equation and linear regression. Is it the same in approach? xml serializing of saved game data Bjarne Stroustrup once mentioned in one of his bigthink interviews that one of the greatest problems most programmers have is not finding or using the right libraries.  On stackoverflow and programmers, I've observed a trend towards questions like "I want to do this, is there a [library | programming language] for that", or "I have these {n} [library | language] candidates for my project; which one would yield me the least amount of headache given these requirements".   Since questions like these aren't exactly programming questions in the sense of "this code should do this, but it does this, why?", they are often (though not always) being closed as "not constructive" because they do not have a definite answer (which is true, and according to the FAQ they would be off-topic on both stackoverflow and programmers).  Nonetheless, I think library questions are valid, and that it is helpful for any programmer to receive independent input from experienced programmers (at least it helps me a lot every time I browse through one of those closed questions, which I found through google). Does anyone agree that posting library choice questions should be explicitly allowed on either stackoverflow or programmers? Understanding Lasso Regression's sparsity geometrically Whenever someone writes about Lasso and Ridge Regression thy draw this diagram with the circle or with the diamond.    In the case of the diamond (Lasso regression) it is then always stated that Lasso forces one of the coefficients to 0. Therefor it introduces sparsity. I understand it somehow, but whenever I see the diagram my doubts return. Why couldn't one just draw it like this:    Obviously none of the coefficients is forced to zero in this case. Both can take number between -1 and 1. What am I missing? My drawing has to be wrong, but I don't get it why they always draw so that it hits $\beta_1=0$  Edit:  Just found this quote:     However, the lasso constraint has corners at each of the axes and so the ellipse will often intersect the constraint region at an axis   Is that it? It will intersect often with the constraint region, but it doesn't have to? Can't wrap my head around it. I can only imagine that in higher dimensional cases hitting a corner becomes more likely or even inevitable. Given two functions $f$ and $g$, is there a formula for the Fourier transform of $f \circ g$ in terms of the Fourier transforms of $f$ and $g$ individually?  I know you can do this for the sum, the product and the convolution of two functions. But I haven't seen a formula for the composition of two functions. I'm having some problems with listings and UTF-8 in my document. Maybe someone can help me? Some characters work, like é and ó, but á and others appear at the beginning of words...  \documentclass[12pt,a4paper]{scrbook} \KOMAoptions{twoside=false,open=any,chapterprefix=on,parskip=full,fontsize=14pt}  \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{listingsutf8}  \usepackage{inconsolata} \lstset{     language=bash, %% Troque para PHP, C, Java, etc... bash é o padrão     basicstyle=\ttfamily\small,     numberstyle=\footnotesize,     numbers=left,     backgroundcolor=\color{gray!10},     frame=single,     tabsize=2,     rulecolor=\color{black!30},     title=\lstname,     escapeinside={\%*}{*)},     breaklines=true,     breakatwhitespace=true,     framextopmargin=2pt,     framexbottommargin=2pt,     extendedchars=false,     inputencoding=utf8 }  \begin{document} \begin{lstlisting} &lt;?php  echo 'Olá mundo!'; print 'Olá mundo!'; \end{lstlisting}  \end{document} \end{lstlisting} Train passport control from London to Paris I'm a non-EU citizen, I will be travelling from London to Paris next month, so I was wondering since most countries track entry and leave dates, if I use the train to switch these countries and they don't control it, my UK visa will seem like entry YES but no leaving. Same for the Schengen, I wouldn't have an entry date but I'll be leaving,  Will it be trouble later? Are they controlling this on trains? If not is there anything I should do before? If I want to use objects as the keys for a Dictionary, what methods will I need to override to make them compare in a specific way?  Say I have a a class which has properties:  class Foo {     public string Name { get; set; }     public int FooID { get; set; }      // elided }    And I want to create a:  Dictionary&lt;Foo, List&lt;Stuff&gt;&gt;   I want Foo objects with the same FooID to be considered the same group.  Which methods will I need to override in the Foo class?  To summarize: I want to categorize Stuff objects into lists, grouped by Foo objects. Stuff objects will have a FooID to link them to their category. Windows 7 equivalent for ntrights.exe ${a^2}{\mid}({b^3} + 1)\;$and$\;{b^2}{\mid}({a^3} + 1)$ In ZF, how would the structure of the cardinal numbers change by adopting this definition of cardinality? In ZFC, a good way of ordering sets by cardinality is by leveraging the notion of an injection. We define: $$X \lesssim Y \leftrightarrow \mbox{ there exists an injection } X \rightarrow Y.$$  Alternatively, we can leverage the notion of a partial surjection, by which I mean a partial function that hits every point of its codomain at least once.  $$Y \succsim X \leftrightarrow \mbox{ there exists a partial surjection } Y \rightarrow X.$$  Now in ZFC, these approaches are equivalent, in the sense that $$X \lesssim Y \iff Y \succsim X.$$  But if we just consider ZF (that is, we drop choice) then the equivalence breaks down. However, we've still got the forward implication, because the converse of an injection is always a partial surjection.  A specific question. Define that two sets are weakly equipotent iff $X \succsim Y$ and $Y \succsim X$. Question: does weak equipotence imply genuine equipotence? I'm guessing "no."  A general question: In broad terms, how would the structure of the cardinal numbers in ZF be altered by adopting $\succsim$ rather than $\lesssim$ as the fundamental order relation, and taking equality of cardinal numbers to correspond to weak equipotence of sets? I'm guessing this would hide a lot of the (usually very complicated) structure of the cardinal numbers in ZF.  Remark. The order symbols can be written \lesssim and \succsim. Electrical potential energy stored in vacumm for a single point charge? I have come to know the electrostatic potential energy in vacuum is given by $${\frac{1}{2}} \epsilon_0\int d^3x {E^2} $$ and this energy  is due to the mutual electrostatic coulomb potential energy. So only a single point charge in space also contributes to some electrostatic potential energy according to $${\frac{1}{2}} \epsilon_0 \int d^3x {E^2} $$  as due to a single point charge also we have an electric field at every point in space. Now I am not getting it physically, why should there be any Coulomb energy in this case as there is no other charge to provide the electrostatic coulomb potential energy? Icon missing when application is launched I've created an application launcher in /usr/share/applications that launches rdesktop. The file specifies an icon name and I've added the icons to:   /usr/share/icons/HighContrast/48x48/apps /usr/share/icons/HighContrast/22x22/apps /usr/share/icons/HighContrast/256x256/apps /usr/share/icons/HighContrast/32x32/apps /usr/share/icons/HighContrast/scalable/apps-extra /usr/share/icons/HighContrast/24x24/apps /usr/share/icons/HighContrast/16x16/apps /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/128x128/apps /usr/share/icons/hicolor/16x16/apps   I then drug the launcher to the taskbar and the launcher with the correct logo is visible in the taskbar. However, when I start the task, a new icon is created in the taskbar, a square with a question mark in the center.  What icons do I need and where, so that the taskbar displays the correct icon for the application when it is launched?  The .desktop file contents:   [Desktop Entry] Version=1.0 Terminal=false Icon=mswindows Type=Application Categories=Network; Exec=rdesktop win7shared1 -g 1680x1000  Name=win7shared1 GenericName=rdesktop Comment=Open windows desktop  Keywords=Windows StartupNotify=false “Screen overlay detected” dialog? Turned off everything, doesn't work I started receiving the “Screen overlay detected” dialog when trying to change apps settings.  Tried to turn off all "draw over other apps" as it says here - , first without system and then with, but it still doesn't work.  Then, I restored apps to original settings and it just made a bigger mess, dialog continue appearing. Any way to go back to previous settings???  Thanks! How to show  that $\mathbb{Z}[i]/I$ is a finite field whenever $I$ is a prime ideal? Is it possible to find the cardinality of $\mathbb{Z}[i]/I$ as well?  I know how to show that it is an integral domain, because that follows very quickly. where do I use Database. Methods? I m trying to understand where we use following Database.Methods. I know if we want to insert a record to an object we use DML Statement. What i want to know is why/where we use Database. methods. It might be silly question. Database.saveResults Database.insert Database.query Database.Query Database.error   really appreciate the inputs. Thanks a ton in advance. Resetting Ubuntu to factory settings I've had a lot of problems lately and now I'm having problems logging in at the login screen. I'm giving up and just want to reset and start over. How can I "factory reset" Ubuntu, in this situation, or, for future reference, in general? How do I make sure that values from MySQL keep their type in PHP? Passive aggressive people will sometimes veil insulting, critical, derogatory or generally aggressive comments with humor. The patina of humor makes the comment seem like a joke, not to be taken seriously, all in good fun, and it safeguards the aggressive person. If someone gets offended, they are being too serious, can't take a joke, and so they cannot voice their upset without seeming to be the one escalating the situation, when in fact it was the aggressor who did that.   This behavior seems to lie on a spectrum. On one side are comments which are simultaneously aggressive and genuinely funny (though of course both, especially the latter, are fairly subjective). On the other side would be lame attempts at the behavior, something like "you are fat!... just joking!" in which nothing in the tone or delivery signals a register of humor. In the middle of the spectrum, I imagine, are aggressive statements genuinely delivered as jokes. Their register signals that they are jokes, but they are aggressive rather than funny. They are aggressive comments masquerading as jokes.      A friend once called this "joking on the square", but I have never heard or seen this phrase. This type of comment is both pervasive and psychologically subtle and in my experience there is often an exact word describing such things. If not a word, is there an astute phrase which cuts to the heart of this?