I read that delegate are immutable objects.  If I have into a thread:  EventHandler handler = (s, e) =&gt; Console.WriteLine("..."); EventHandler copy = handler; copy(new object(), EventArgs.Empty);   that copy is a thread safety operations so when I invoke copy(...) if another thread eliminated the delegate from handler no exception can raise.  However If I make, i.e,:  handler.GetHashCode() and copy.GetHashCode() they both returns the same code.  I thought that the assignment operator did a new instance of that delegate and that the new reference had put into copy variable...  How can, thus, copy and handler be independent if they both references the same object in memory?  Confused!
The MSDN documentation on  describes 3 contradicting rules for how the method should work.     If two objects of the same type represent the same value, the hash function must return the same constant value for either object. For the best performance, a hash function must generate a random distribution for all input. The hash function must return exactly the same value regardless of any changes that are made to the object.   Rules 1 &amp; 3 are contradictory to me.  Does Object.GetHashCode() return a unique number based on the value of an object, or the reference to the object. If I override the method I can choose what to use, but I'd like to know what is used internally if anyone knows.
What is the best word describing the nature of expiring in a short amount of time, connoting "losing public attention"? vertical lines in matrix using tikz package my problem is interconnected to my two previous posts ( and) and i've tried to incorporate answers into solution but without success.   My task is this matrix multiplication with added description:   and my so far code follows:  \documentclass{article} \usepackage{tikz,amsmath}  \begin{document} \begin{tikzpicture} \node[minimum height=0cm,minimum width=2cm] (m) {}; \path[shade,draw] (0,2) -- (0,5) -- (3,5) -- (3,0); \draw (0,0) --(0,5); \draw (3,0) --(0,2); \draw (3,0) --(3,5); \node (r11) at ([xshift=0.6cm,yshift=4cm]m.south) {$S_{11}$}; \node (r11) at ([xshift=2.5cm,yshift=4cm]m.south) {$S_{12}$}; \node (r11) at ([xshift=2.5cm,yshift=2.15cm]m.south) {$S_{22}$}; \node (r11) at ([xshift=0.6cm,yshift=2.15cm]m.south) {$S_{21}$}; \node (r11) at ([xshift=0.6cm,yshift=2.6cm]m.south) {$--------------$}; \node (r11) at ([xshift=0.6cm,yshift=1.5cm]m.south) {$--------------$}; \end{tikzpicture} \[ \begin{bmatrix} \begin{equation}        wn_{1}           \\[0.3em]        wn_{2}       \end{bmatrix}  \]  \end{document}       with following output:      I am not able to add vertical line and nodes and incorporate the matrix into document (vector that follows behind the matrix is not centered). Problem with nodes and incorporation is the same as in . How to trigger a check for updates in Firefox programatically or from a command line? Is there a command line switch for firefox.exe or an "about:" URL that will either force an update check or at least display the Help/About dialog, which checks for updates and tells if you're running the latest version?    One site claimed that the "about:" URL was the same as menu Help -> About, but it's not.  I built a program to automate the updating of various programs on my machine, and most programs have command line tools for checking for updates. Windows update has wuauclt.exe, Java has jucheck.exe. For some applications, I can even automate the interface, but it's difficult in Firefox, because the main window title is unpredictable (it depends on which web page is active), and all Firefox windows seem to use the exact same window class name. What is the exact $SU(2)$ representation to which these Hermitian generators belong? \begin{equation} t_a=\{t_1,t_2,t_3\}=\left\{\frac{1}{\sqrt{2}}\begin{pmatrix}  0 &amp; 1 &amp; 0 \\ 1 &amp; 0 &amp; 1 \\ 0 &amp; 1 &amp; 0 \end{pmatrix},\,\frac{1}{\sqrt{2}}\begin{pmatrix}  0 &amp; -i &amp; 0 \\ i &amp; 0  &amp; -i \\ 0 &amp; i &amp; 0 \end{pmatrix},\,\begin{pmatrix}  1 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; -1  \end{pmatrix} \right\} \end{equation}  I'm a bit puzzled with this, these are not the generators of the triplet representation of $SU(2)$ (the triplet in $SU(2)$ is the adjoint rep which is real and constructed with the structure constants), nevertheless they are used as if they were in much literature. What are really these generators? They seem like the extension to 3 dimensions of the Pauli matrices. The 3 dimensional fundamental rep (this does not make sense to me)? some kind of non-irreducible representation? How to convert ISO 8601 date (string) to Date? New question asking form sometimes leads to accidental double posts of questions I've noticed that with the new question asking form, sometimes, attempting to submit a question will post two identical copies of the same question.  I've  (), but at the time, I assumed it was just a temporary fluke. As far as I remember, I just reviewed the question, saw no errors, and submitted it. (That's all the info I have.)  However, I just saw this happen to someone else, so it can't just be a fluke on my end. , and . The author claims there that they did indeed double click the "Review" button, but their question didn't go through since it didn't have a required tag, but when they tried to submit the question with the required tag, they only clicked it once.  Also, now that I think about it, it could not have been just a temporary client-side issue on both our ends. The system is supposed to  if one tries to post more than one question in 30 seconds. Neither of us got a CAPTCHA. This means that the server accepted the double post, and so it's a server issue.  This has the effect of denying users badges that they would have otherwise qualified for, since a single negatively-received, closed, or deleted question . This means that even if the double post is deleted and the original is upvoted, the user won't qualify for that day since they've made a "bad" question on that day. (While they may be able to later reverse this 60 days later by undeleting and re-deleting their question - questions deleted more than 60 days later aren't considered "deleted" for the check - they often won't be able to, since most of the time, users will have downvoted the double post, which also disqualifies one from the badges.)  Can an employee go through server logs to see what happened in both these cases, and add some safeguards to prevent accidental double submissions of questions? This seems to have come up when the new asking form was deployed.  Update: There was another case just now:  was . As both have the exact same time of submission, this is an instance of this bug, since as I said above, this thing is ordinarily prevented by a CAPTCHA. Cancelling special & general relativistic effects Why do I get compiler errors with this Java code?  1  public List&lt;? extends Foo&gt; getFoos() 2  { 3    List&lt;? extends Foo&gt; foos = new ArrayList&lt;? extends Foo&gt;(); 4    foos.add(new SubFoo()); 5    return foos; 6  }  Where 'SubFoo' is a concrete class that implements Foo, and Foo is an interface.  Errors I get with this code:   On Line 3: "Cannot instantiate ArrayList&lt;? extends Foo&gt;" On Line 4: "The method add(capture#1-of ? extends Foo) in the type List&lt;capture#1-of ? extends Foo&gt; is not applicable for the arguments (SubFoo)"   Update: Thanks to Jeff C, I can change Line 3 to say "new ArrayList&lt;Foo&gt;();".  But I'm still having the issue with Line 4. I love recursion. I think it simplifies things a lot. Another may disagree; I think it also makes the code a lot easier to read. However, I've noticed that recursion is not used as much in languages such C# as they are in LISP (which by the way is my favorite language because of the recursion).   Does anybody know if there is any good reasons not use recursion in the languages such as C#? Is it more expensive than iteration? Name for categorical product inside a monoid If a monoid is a category with a single object, is there a "monoid-theoretical" concept that the categorical product translates to? As an analogue, in a poset the product translates to the notion of meet (and the coproduct to its dual, the join).  Just by unwinding the definition one can see that this boils down to the existence of two monoid elements $p_1$ and $p_2$ such that for every $x$ and $y$ in the monoid there's a unique element $\langle x,y \rangle$ that factors as $x = p_1\langle x,y \rangle$ and $y = p_2\langle x,y \rangle$; the question is whether the concept is a known and/or useful one.  Incidentally, if the monoid in question is a group then the existence of a product makes the whole thing collapse into the trivial group; this might or not hint that the concept I'm looking for is "too boring" to have a name. In fact it suffices for one of the projections to be right cancellable, or for the pair $\langle x,x\rangle$ to be left cancellable for some $x$, to make the whole thing collapse. One of the mysteries that my numerics class left me with are "stiff systems". Our prof didn't really manage to explain what they are. Now that the class (and the test) are over, I'm still curious.   The most concise definition about "stiff systems" I've found so far is: "There is no universally accepted definition of stiffness". So, if there is none, I don't expect one.   I'd be thankful about information on both of the following points:   From what kind of (real-world) problems do stiff systems arise? What's so "stiff" about them? What's the good thing - or the bad thing - that I'd worry about when I have to numerically solve such a real-world problem? Does there exists an entire function such that for each $|z|>C$ for some constant $C$, $|f(z)|=|z|+1$? How do you log the machine name via log4net? I am using Log4Net with the AdoNetAppender to log messages from a simple systray application into a SQL Server 2005 database.  I want to log the machine name along with the log message because this application will be running on multiple machines and I need to know on which one the message originated.  But, I cannot find a way to expose this information via the log4net.Layout.PatternLayout that I am using with the appender.  Is there a way to log the machine name via log4net in this manner? Let $a,b,c\in\mathbb{R}^*_+$, $abc=1$.  How can i show that $\left(a-1+\frac{1}b\right)\left(b-1+\frac{1}c\right)\left(c-1+\frac{1}a\right)\leq1$ ?  I got $\left(ab-b+1\right)\left(bc-c+1\right)\left(ca-a+1\right)\leq abc=1$, but i can't go any further ...  If i expand it :   $2-ab-\frac{b}a-c-ac-\frac{a}c-b+2a+\frac{2}a-bc-\frac{c}b-a+2b+\frac{2}b+2c+\frac{2}c-4$  Which gives using $c=\frac{1}{ab}$ :   $5ab-\frac{b}a-\frac{1}{ab}-a^2b+\frac{1}a+b+\frac{1}b-2$ Prove that $\left| f'(x)\right| \leq \sqrt{2AC}$ using integration Suppose that $f(x)$ is a $C^2$ function on $\mathbb{R}$ such that $\left| f(x) \right| \leq A$ and $\left| f''(x) \right| \leq C $ for $x \in \mathbb{R}$. Prove that $\left| f'(x)\right| \leq \sqrt{2AC}$. When certain nationalities of people want to travel in the Schengen zone, they are required to apply for a Schengen visa. This is a straight-forward process for most, but when an applicant has had problems with removals or refusals they may be reluctant to apply because they want to avoid the complexities of serial visa refusals. This reluctance may lead some into wondering how their history can be expunged, and this line of thought inevitably leads to the idea of getting their passport replaced with a new one.  This sounds like a great formula for people who have had prior refusals or removals.  In essence they can become 'reincarnated' as a first-time traveller and hence avoid the unpleasantness of revealing their prior interactions with the Schengen authorities.  The relevant parts of the application form are shown here...    Nothing asks about a prior removal or refusal, and the applicant is left with simple denials for 3 questions in order to present themselves as a first-time traveller.  Assuming the person is happy to set aside the moral issues associated with denying their history, are there any holes to this strategy?  This question is scoped to Schengen visa applications so that it will not be unmanageably broad, but answers from other regimes (particularly the affluent Commonwealth and the USA) are acceptable as long as the main points are relatively consistent with Schengen. dropping trailing '.0' from floats I'm looking for a  way to convert numbers to string format, dropping any redundant '.0'   The input data is a mix of floats and strings. Desired output:  0   --> '0'  0.0 --> '0'  0.1 --> '0.1'  1.0 --> '1'  I've come up with the following generator expression, but I wonder if there's a faster way:  (str(i).rstrip('.0') if i else '0' for i in lst)   The truth check is there to prevent 0 from becoming an empty string.  EDIT: The more or less acceptable solution I have for now is this:  ('%d'%i if i == int(i) else '%s'%i for i in lst)   It just seems strange that there is no elegant way to handle this (fairly straightforward) case in python. How do I check if a number is a palindrome?  Any language. Any algorithm. (except the algorithm of making the number a string and then reversing the string). How is double negation interpreted in English? In my native language, double negations "cancel out". I have been trying to learn English using movies and such things, but double negation confuses me. I see instances when double negation cancels out, and some when they do not.  For example, "I haven't got no money" is interpreted as "I have no money." "There wasn't anyone who didn't enjoy the party" is interpreted as "Everyone enjoyed the party."  Is this context dependent? If so, how does one decide which interpretation is correct? I have a Surface Pro 4 and an iMac (late 2019). I would like to connect my Surface Pro to the iMac to use the iMac screen as a second monitor.  Is that possible?  What are the requirements to use an iMac as a second screen?