I have a list which contains SelectListItem, I am making dropdownList for it. This is my list element's  1 Declined 2 Bad Phone 3 Medical 4 No Answer 5 Try Again 6 Left Voice mail 7 Skip  8 Not Valid 9 Warning 10 Unemployed   The list is sorting according to their values(I have shown values next to the item) I have to display elements like this  5 Try Again 7 Skip  6 Left Voice mail 3 Medical 8 Not Valid 1 Declined 2 Bad Phone 4 No Answer 9 Warning 10 Unemployed   ie in Random Order, How can I do this Random sorting in List, One thing I can do is to find index of each item and change its index/position,but it will be a hectic. The List items are fixed and are not dynamic.
What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.
Trichromelibrary was suddenly downloading from Google Play Store From nowhere, my friend got a notification that com.google.android.trichromelibrary was downloading together with a progress bar.  Why? This is a follow up from this .  I'm using this slightly modified script to enumerate all installed MSI packages:  strComputer = "."  Set objWMIService = GetObject("winmgmts:" &amp; _     "{impersonationLevel=impersonate}!\\" &amp; _     strComputer &amp; _     "\root\cimv2")  Set colSoftware = objWMIService.ExecQuery _     ("SELECT * FROM Win32_Product")     If colSoftware.Count &gt; 0 Then     For Each objSoftware in colSoftware         WScript.Echo objSoftware.Caption &amp; vbtab &amp; _         objSoftware.Version     Next Else     WScript.Echo "Cannot retrieve software from this computer." End If   What is surprising however, is its abysmal performance. Enumerating the 34 installed MSI packages on my XP box takes between 3 and 5 minutes !  By comparison, the Linux box that sits besides is taking 7s to enumerate 1400+ RPMs... sigh  Any clues on this ? vertical align middle in How do I pass JavaScript variables to PHP? Why is my total reputation less than my monthly reputation? When I went to the  to see my ranking in the reputation league, I saw this. Is this an error? My total reputation is less than my monthly reputation. Read fixed width record from text file The annual student intake of Hogwarts seems about 100. Since in book 7 Hogwarts is declared mandatory for all children, this means that the total magical population of Britain cannot be much more than 10,000.  How do these people make a living?  All jobs mentioned in the books are non-productive occupations (government, stores, sports &amp;c) - not farmers or engineers. There are exceptions - makers of wands/robes/broomsticks - but where do they get the raw materials from?  Who and how "creates goods" in the wizarding world?  Note that if you say "wizards exchange their gold for Muggle money and buy stuff from Muggles (through intermediaries, if necessary)" then you would have to explain where they get their gold: they would either have to mine it, or produce something of value to the Muggles (in which case the separate financial system of galleons/sickles/knuts does not make sense).  PS. A simple issue of maintaining a steam locomotive for Hogwarts express is pretty much insurmountable for 10k people - without Magic, that is. So, I can imagine that the skilled tradesmen can transfigure dirt into raw materials for their trade - except for food, which "is the first of the five Principal Exceptions to Gamp's Law of Elemental Transfiguration". $\displaystyle \int\nolimits_0^8 \sqrt{x^4+4x^2}\,dx$.   Alright, so I thought I had this figured out. Here's what I did:   I factor out an $x^2$ to get $\sqrt{x^2(x^2+4)}$. I let $x = 2\tan(\theta)$, therefore the integrand is $\sqrt{4\tan^2(\theta)  (4\tan^2(\theta) + 4)}$. Factor out a 4 and it becomes $\sqrt{(16\tan^2(\theta)  (\tan^2(\theta) + 1))}$ Which equals $\sqrt{16\tan^2(\theta) \sec^2(\theta)}$ This is easy to take the sqrt of. The integrand becomes $4\tan(\theta)\sec(\theta)$. Now, the integral of this is $4\sec(\theta)$ And it's evaluated from $0$ to $\arctan(4)$ right? Because as $x$ goes to $0$, so does $\theta$, and as $x$ goes to $8$, $\theta$ goes to $\arctan(4)$... But the end result $(4 (\sec(\arctan(4)) - 1) )$ isn't the correct answer   I put it into WolframAlpha and I get $(8/3) (17\sqrt{17} - 1)$, which is the right answer. How did they get that? (there's no "show steps" option)  Any help is greatly appreciated!  PS, what's the syntax for doing sqrts and exponentials? How can I use variables in the LHS and RHS of a sed substitution? I used this isomorphism today but now I'm having trouble justifying it. The norm function isn't additive so I can't come up with a ring isomorphism to prove the following:     For any $\,a+bi\in\Bbb Z[i],\,\gcd(a,b)=1$, we have a ring isomorphism   $$\Bbb Z[i]/\langle a+bi\rangle\,\cong\Bbb Z/(a^2+b^2)\Bbb Z=:\Bbb Z_{a^2+b^2}.$$   Could someone show me an isomorphism between these rings to prove this? T-Shirt print resolution I'm trying to compute this integral, $$\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx \hbox{ where } 0&lt;a&lt;1$$ I drew a typical Pacman contour with branch cut at positive real axis. Then, we have $$\int_{\Gamma}\frac{\ln z}{z^{a}(z+1)}dz=\left(\int_{L_{1}}+\int_{L_{2}}+\int_{C_{R}}+\int_{C_{\epsilon}}\right)\frac{\ln z}{z^{a}(z+1)}dz$$ The function has a pole at $z=-1$. Then, by residue theorem, the whole integral becomes  \begin{align*} \int_{\Gamma}\frac{\ln z}{z^{a}(z+1)}dz&amp;=2\pi i\text{res}(\frac{\ln z}{z^{a}(z+1)};-1)\\&amp;=2\pi i\lim_{z\rightarrow-1}(z+1)\frac{\ln z}{z^{a}(z+1)}\\&amp;=2\pi i\lim_{z\rightarrow-1}\frac{\ln z}{z^{a}}\\&amp;=2\pi i\frac{\ln e^{i\pi}}{e^{i\pi a}}\\&amp;=2\pi i\frac{\ln1+i\pi}{e^{i\pi a}}\\&amp;=-\frac{2\pi^{2}}{(e^{i\pi})^{a}} \end{align*} On $L_1$, $z=xe^{i\epsilon}$ where $\epsilon\leq x\leq R$  On $L_{2}$, $z=xe^{i(2\pi-\epsilon)}$ where $\epsilon\leq x\leq R$  On $C_{R}$, $z=Re^{i\theta}$ where $\epsilon\leq\theta\leq2\pi-\epsilon$  Lastly on On $C_{\epsilon}$, $z=\epsilon e^{i\theta}$ where $\epsilon\leq\theta\leq2\pi-\epsilon$  So I tried to compute them separately and I anticipate the curves will both go to $0$ by ML inequality, and two linear integrals will consist of the term $\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx$ and hence simply solve for it. But I'm having trouble physically solving it out. I think the log is throwing me off. Can anybody please help me? There are three random variables, $x,y,z$. The three correlations between the three variables are the same. That is,  $$\rho=\textrm{cor}(x,y)=\textrm{cor}(x,z)=\textrm{cor}(y,z)$$  What is the tightest bound you can give for $\rho$? How do I diff two text files in Windows Powershell? I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't considered?  I've tried compare-object, but get this cryptic output:  PS C:\&gt; compare-object one.txt two.txt  InputObject                                                 SideIndicator -----------                                                 ------------- two.txt                                                     =&gt; one.txt                                                     &lt;= Prove that polynomial of degree $4$ with real roots cannot have $\pm 1$ as coefficients (IITJEE) So I was going through  my 11th class package on Quadratic equations and I saw a question to prove that a polynomial of $4$th degree with all real roots cannot have $\pm 1$ as all its coefficients.   I tried proving it using calculus, by showing that at least one consecutive maxima  and minima will lie either above or below the x axis, but couldn't solve it using that.  I also tried using Descartes Rule of Signs but couldn't solve it with that too. Any help? Can I simplify an expression into form which uses my own definitions? How do I split a forest tree into two trees with proper vertical alignment? \documentclass[oneside,12pt]{article} \usepackage{geometry} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}  \usepackage{enumitem} \setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,   labelsep=1.5em} \setlist[enumerate,2]{label=\arabic*.,labelindent=1em,labelsep=1.5em,   leftmargin=*}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{sol}{Solution}  \usepackage{forest} \forestset{   ass/.append style={     before computing xy={l=\baselineskip},     no edge   },   prooftree/.style={     for tree={       child anchor=north,       parent anchor=south     }   } }  \begin{document} \subsection*{Exercises 29} \begin{enumerate} \item Use QL trees to evaluate the entailment claims (1) to (10) in Exercises   28A.   \begin{enumerate}   \item $\forall x(Fx\supset Gx)\vDash\forall x(Gx\supset Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(Gx\supset Fx)\checkmark$,ass       [$\exists x\neg(Gx\supset Fx)\checkmark$,ass       [$\neg(Ga\supset Fa)\checkmark$,ass       [$Ga$,ass       [$\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$] [$Ga$]]]]]]]]     \end{forest}      $\neg Fa$ and $Ga$ make the premisses and the negation of conclusion true.     Thus, the entailment is invalid.   \item $\forall x(Fx\supset Gx)\vDash\forall x(\neg Gx\supset\neg Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\exists x\neg(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\neg(\neg Ga\supset\neg Fa)\checkmark$,ass       [$\neg Ga$,ass       [$\neg\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$ [*,ass]] [$Ga$ [*,ass]]]]]]]]]     \end{forest}      Since the tree closes, the entailment is valid.   \item $\forall x\exists yLxy\vDash\forall y\exists xLyx$      \begin{forest}       prooftree       [$\forall x\exists yLxy$       [$\neg\forall y\exists xLyx\checkmark$,ass       [$\exists y\neg\exists xLyx\checkmark$,ass       [$\neg\exists xLax\checkmark$,ass       [$\forall x\neg Lax$,ass       [$\exists yLay\checkmark$,ass       [$Lab$,ass]]]]]]]     \end{forest}      \begin{forest}       prooftree       [$\neg Lab$,ass [*,ass]]     \end{forest}   \item $\forall x((Fx\wedge Gx)\supset Hx)\vDash\forall     x(Fx\supset(Gx\supset Hx))$   \item $(\forall xFx\vee\forall xGx)\vDash\forall(Fx\vee Gx)$   \item $\forall x(Fx\supset Gx),\forall x(\neg Gx\supset Hx)\vDash     \forall x(Fx\supset\neg Hx)$   \item $\exists x(Fx\wedge Gx),\forall x(\neg Hx\supset\neg Gx)\vDash     \exists x(Fx\wedge Hx)$   \item $\forall x\exists y(Fy\supset Gx)\vDash\forall y\exists x(Gx\supset     Fy)$   \item $\forall x\forall y(Lxy\supset Lyx)\vDash\forall xLxx$   \item $\forall x(\exists yLxy\supset\forall zLzx)\vDash\forall x\forall y     (Lxy\supset Lyx)$   \end{enumerate} \end{enumerate} \end{document}   Usually, I have to manually split a forest tree into two to emulate page breaking in a forest tree. However, the second tree doesn't vertically align with the first as in the picture below. How can I vertically align them together? @cfr A question about the arctangent addition formula. In the arctangent formula, we have that:  $$\arctan{u}+\arctan{v}=\arctan\left(\frac{u+v}{1-uv}\right)$$  however, only for $uv&lt;1$. My question is: where does this condition come from? The situation is obvious for $uv=1$, but why the inequality?  One of the possibilities I considered was as following: the arctangent addition formula is derived from the formula:  $$\tan\left(\alpha+\beta\right)=\frac{\tan{\alpha}+\tan{\beta}}{1-\tan{\alpha}\tan{\beta}}.$$  Hence, if we put $u=\tan{\alpha}$ and $v=\tan{\beta}$ (which we do in order to obtain the arctangent addition formula from the one above), the condition that $uv&lt;1$ would mean $\tan\alpha\tan\beta&lt;1$, which, in turn, would imply (thought I am NOT sure about this), that $-\pi/2&lt;\alpha+\beta&lt;\pi/2$, i.e. that we have to stay in the same period of tangent.  However, even if the above were true, I still do not see why we have to stay in the same period of tangent for the formula for $\tan(\alpha+\beta)$ to hold. I would be thankful for a thorough explanation. Can I nohup/screen an already-started process? I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in screen.  Is there any way to "retroactively" nohup a process, or do I need to leave my computer online all night? If it's not possible to attach screen to/nohup a process I've already started, then why? Something to do with how parent/child proceses interact? (I won't accept a "no" answer that doesn't at least address the question of 'why' -- sorry ;) ) I have a Red Hat Enterprise Linux server (7.5 x86_64). I have OpenSSH version 7.4. I was asked to upgrade it to a later version for security reasons: Nessus states that . However the Red Hat software and downloads does not have the latest package RPM.  I found some clues on where to get the latest package for OpenSSH. I found , however, I do not know on how to upgrade it and trust this website. I do not want the SSH and other configuration to be modified by the ugrade.  I did find links but however they are not useful, for example .  I would like to know how to upgrade OpenSSH without using yum.