How to conditionally invoke a generic method with constraints?
How do I use reflection to call a generic method?
How to check if file exists on FTP before FtpWebRequest Close and flag links do nothing on mobile site This morning (it's about six AM here) I find that I can no longer submit close votes; the link just jumps to the beginning of the page.  I'm on iOS, using a third-party browser called Grazing, but a brief check with Mobile Safari shows the same problem there.   Here on Meta, where my score is much lower, I only get a "delete" link on my own question, and that works fine. (Oops :-))   Update: As per comments, this affects the "flag" link, too, which doesn't even scroll to the top of the page. Update 2: Latest comment suggests this affects Android, too. Update 3: This also affects desktop computers when viewing mobile (when you click "mobile" in the footer) Update 4:  mentions Windows 8, too; simply deleting platform-specific tags I mistakenly typed cd // instead of cd /. To my surprise, current directory showed up as //.   What is that directory? Why does it exist?  apple@snipped $ pwd /home/apple apple@snipped $ cd / apple@snipped $ pwd / apple@snipped $ cd // apple@snipped $ pwd // apple@snipped $ cd /// apple@snipped $ pwd / When is it okay to exceed the absolute maximum rating on a part? How to sort strings in JavaScript I have a list of objects I wish to sort based on a field attr of type string. I tried using -  list.sort(function (a, b) {     return a.attr - b.attr })   but found that - doesn't appear to work with strings in JavaScript. How can I sort a list of objects based on an attribute with type string? Finding Sylow 2-subgroups of the dihedral group $D_n$ I am trying to describe the Sylow $2$-subgroups of an arbitrary dihedral group $D_n$ of order $2n$.   In the case that $n$ is odd, $2$ is the highest power dividing $2n$, so that all Sylow $2$-subgroups have order $2$, and it is fairly easy to describe them.  However, if $n$ isn't odd, we may factor a power of $2$ out and write $|D_n|=2^{k}m$ for some odd integer $m$.   There is  that there exist precisely $m$ Sylow $2$-subgroups, but it does not provide an explicit description of such subgroups in the case $n$ is odd.   Additionally, someone has asked a similar question in the past, and they claim to give a description of the Sylow $2$-subroups in the case $n$ is odd, but I can not find a source or an explanation. The question is .     Can anyone provide a description of how one may determine precisely the Sylow $2$-subgroups for the case $n$ is odd?    Thank you. Scaling in object and edit mode My question is: why do Object mode scaling and Edit mode scaling seem to be incompatible? I'm quite new to blender, so I may not know sth important about these modes. The actual case is:  I create a cube, which is 2×2×2 metres in metric units by default  (it's also shown under 'dimensions')    Then, with the cube selected, I switch to Edit mode, and enable 'Edge info: Length' under 'Mesh display'    And it shows the cube's measurements, which are 2m on each edge.  Now I use the scale tool in Edit mode, making the edges 2.244m    That's good so far. Changing back to Object mode, the changes can be seen under 'dimension'    However, when I use the scale tool in Object mode, the scale and dimensions also change, but changing back to Edit mode, the measurements shown remain the same      So the question is, why does the scale tool work differently and have different effects in Ojbect mode and Edit mode? Also, how can I enter the desired size of my cube manually to get an accurate result, without using the scale tool in Edit mode, and without changing the scale ratio in object mode? Parameterize an SQL IN clause How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that. Uninstall apps locked by phone vendor I'm using a Samsung I9000 and I have some annoying apps that came pre installed by the phone vendor, like a music store, a custom web browser and other memory leaking apps.  Those crappy apps can't be uninstalled neither by Manage applications tool, nor by editing the apps tiles in the front menu.  I guess I have to be a root user or something to get rid of those apps, but I don't know how. Set horizontal width on custom listings environment I want to create a custom listings environment and want to set its width as something like 90% of textwidth, centred.  Per an  for algorithms, the first thing I tried was to embed the listing in a minipage environment. However, . I found a way to still make standard environment work, but it requires to use the escape command every time before ending the environment.  The second thing I tried was this latter command, but as far as I can see, it doesn't offer a feature to set the width of the listing or centre it.  \documentclass{article} \usepackage{listings} \usepackage{lipsum}   \lstnewenvironment{queryl} %% APPROACH 1  {\lstset{frame=shadowbox,escapechar=`}}  {}  \newenvironment{query} %% APPROACH 2  {\begin{minipage}{4cm}\centering\begin{queryl}}  {\end{queryl}\end{minipage}}   \begin{document} %% APPROACH 1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. \begin{queryl} begin { do nothing } end ; \end{queryl} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.  %% APPROACH 2 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.  \begin{query} begin { do nothing } end ;`%&lt;- needs escape-to-LaTeX character to work \end{query}  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. \end{document}     One can note that for the first environment, the frame extends beyond the width of the text. Also, puzzlingly the minipage environment doesn't seem to want to centre and swallows space (though I guess I could perhaps at least get that to work with tinkering).  In any case, does anyone have any ideas on how to set a width for a custom listings environment and centre it without requiring use of the escape character each time to end the environment? What are all the correct answers to the Squirrel's questions, and what is the reward when I get them all correct? How do I set a background image while I am editing? I remember after Stargate: Universe was cancelled, that I read, somewhere on the web, either part of an interview or an article by one of the producers about what they were planning if there had been a third season.  (He said they weren't sure whether they'd set it soon after the ending of the second season, or later, or were going to do something else.)  He also wrote that, while he felt okay discussing that, he did not feel like he could reveal how the story about the superstructure the Destiny had found would turn out.  He said that was something the other two producers had worked out and he didn't want to reveal it and would leave it up to them to reveal it if they wanted to.  Was this ever revealed?  Did the other producers ever discuss or reveal anything about what was going to happen with that storyline?    Addition: I'm referring to the superstructure that is the message found in the background radiation throughout the universe, not anything from the planet builders or other easily seen physical structures. What's the standard "roadmap" to learning quantum physics? I'm really interested in quantum physics and would like to learn more. However, I don't know where to start and in what order I should learn things. So, ideally I'm looking for some sort of roadmap of what to learn. What physics topics do I need to know to start learning about quantum mechanics? (In addition to the mathematical topics mentioned at )  My current knowledge is mostly popular science stuff, like tv shows on Discovery Science and National Geographic Channel. So I have a basic understanding of some basic principals. There's also a recent lecture from Brian Cox that I have watched which gave a bit more in-depth information. I have my bachelors degree in engineering science: computer science, option electrotechnic. I have a good understanding of basic mechanics and dynamics, calculus (differential equations).  The books I'm now having a look at are:       What book do you recommend for studying fluid dynamics on my own and why? Let $R \simeq S$ be isomorphic commutative rings with unity. Prove the following:  a). If $R$ is an integral domain then $S$ is an integral domain.  For this, I said that If I let $f: R \to S$ be an isomorphism and $(R, + , \circ), (S, \oplus, \ast)$, then let $x, y\in R$,  such that $x \circ y = 0_R$, because $f$ is an isomorphism, $f(x \circ y) = f(x) \ast f(y) = f(0_R)$. If I let $R$ be an integral domain then, as per the definition $R$ is commutative, has unity, and no zero divisors.   So $f(x \circ y) = f(x) \ast f(y) = f(0_R)$ where we have either $f(x \circ y) = f(0_R) \ast f(y) = f(0_R)$ or $f(x \circ y) = f(x) \ast f(0_R) = f(0_R)$.   Since $f$ is an isomomorphism, let $s = f(x), t = f(y)| s,t \in S$. Then $s \ast t = f(0_R)$. By definition, $S$ also has unity so $0_S$ exists. If we map $0_R \to 0_S$. Then either $s = 0_S$ or $t = 0_S$.   So then, since $S$ has unity, is commutative, and has a no zero divisors as we showed above, it is also an Integral domain.  I'm not sure I have this correctly.  b). If $R$ is a field then $S$ is a field. I don't really understand how to do this one. Since $S$ is an integral domain, it has a $0_S$. So I need to show that $S$ distributes $\ast$ over $\oplus$.  Any help with these is appreciated How to solve "permission denied" when using sudo with redirection in Bash? How did Jaqen H'ghar get caught? Following a recent 9gag post:    Did Jaqen H'ghar end up in that cage because he knew that he would meet and "recruit" Arya, or was it some strange coincidence? Is it described somewhere in the books, or left unexplained? Polynomial degree 3 Equation Why is a normal subgroup of $G_1\times G_2$ with trivial intersections with $G_1$ and $G_2$ is abelian? Let $G=G_1\times G_2$ be a direct product, and let $H\triangleleft G$ be a normal subgroup such that $H\cap G_1=H\cap G_2=\{1\}.$ Then $H$ is abelian.     I considered the commutators of two elements in $H$, trying to show that it must be $1,$ but I don't see how this works. Any hint is very welcomed and appreciated. Thanks in advance.