how to create a dynamic password thats between 8 and 16 characters This is my password generator and it generates 8 characters and shuffles them. But i need to make it dynamic length. How would i go about doing that. So the output would be different length between 8 - 16 characters.  if [ $# -eq 0 ]; then num=("0" "1" "2" "3" "4" "5" "7" "8" "9") special=("@" "#" "$" "%" "*" "-" "+") upper=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) lower=(a b c d e f g h i j k l m n o p q r s t u v w x y z) lower2=${#lower[*]}   #${lower[$((RANDOM%lower2))]} upper2=${#upper[*]}   #${upper[$((RANDOM%upper2))]} num2=${#num[*]}     #${num[$((RANDOM%num2))]} special2=${#special[*]} #${special[$((RANDOM%special2))]}  echo "${special[$((RANDOM%special2))]}${num[$((RANDOM%num2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}" | fold -w 1 | shuf | tr -d '\n' echo fi
how to shuffle characters of strings in bash? i have this script where it generates random password but it needs to be shuffled. I couldnt find a way to do it. Please Help me.  num=("0" "1" "2" "3" "4" "5" "7" "8" "9") special=("@" "#" "$" "%" "*" "-" "+") upper=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) lower=(a b c d e f g h i j k l m n o p q r s t u v w x y z) lower2=${#lower[*]}   #${lower[$((RANDOM%lower2))]} upper2=${#upper[*]}   #${upper[$((RANDOM%upper2))]} num2=${#num[*]}     #${num[$((RANDOM%num2))]} special2=${#special[*]} #${special[$((RANDOM%special2))]} echo "${special[$((RANDOM%special2))]}${num[$((RANDOM%num2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}"   this is the output: @7nOyIaJ  how do I randomize this?
I have a point $(X,Y)$ on an elliptical curve $E(a,b)$ where $a=-3$ and $B$ is a large number that is in hexadecimal from -51BD. To compress this point oficially in a program, we know that every $X$ on the curve has two $Y$'s, one even and one odd. Therefore, we only need to store whether the corresponding $Y$ point we are storing is even or odd. So to store the point $(X,Y)$ now, we shift $X$ ridding of its most significant bit and add $1$ if the $Y$ point is odd. Therefore, one can think of the compressed point being $2 \cdot X+B$ ($B$ is the bit we added to tell if $Y$ was odd or even) since the multiplication by $2$ is implied because of the shift. I understand this completely. It's recovering the original point that has me confused.  Since a point on the curve is given by the equation $y^2=x^3+ax+b$, we can find square roots officially in $\mathrm{GF}(p)$. The following from my spec is what confuses me.  If $p$ is prime and congruent to $3$ mod $4$, one of its square roots is $z^{(p+1)/4} \bmod p$ and the other is $p-z^{(p+1)/4} \bmod p$. How would I solve this? What is $z$?  For example, I know how to extract the $x$ point so let's say I simplify the right side of the equation to be $7$ and $p$ is $11$. Would I be trying to solve for the square root that's equal to $7$ mod $11$? Laravel 4.1 Run migrations and update configuration from package dependencies How can I make Firefox open magnet-links in Transmission? Suppose a gambler starts with one dollar and plays a game in which he or she wins one dollar with probability $p$ and loses one dollar with probability $1 - p$. Let $f_{n}$ be the probability that he or she first becomes broke at time $n$ for $n = 0, 1, 2\ldots$. Find a generating function for these probabilities.  Is it binomial distribution $?$ and then use the $\operatorname{mx}\left(s\right) = rx\left(\mathrm{e}^{s}\right)$ of the binomial distribution $?$. Help$\ldots!$. I am correcting my quiz. Matrix Group induction proof and order of elements question $H$ is the set of the matrices $A$ of the form $$A= \begin{pmatrix} \cos(\theta) &amp; \sin (\theta) \\ -\sin (\theta) &amp; \cos (\theta)\end{pmatrix}$$  where $0\leq \theta &lt; 2\pi$  is a group with respect to matrix multiplication.  Question part (1) Prove by induction that  for any $\theta$ and any positive integer $n$,  $$\begin{pmatrix} \cos(\theta) &amp; \sin (\theta) \\ -\sin (\theta) &amp; \cos (\theta)\end{pmatrix}^{n} = \begin{pmatrix} \cos(n\theta) &amp; \sin (n\theta) \\ -\sin (n\theta) &amp; \cos (n\theta)\end{pmatrix}$$   When $n =1$ we have $$\begin{pmatrix} \cos(\theta) &amp; \sin (\theta) \\ -\sin (\theta) &amp; \cos (\theta)\end{pmatrix}^{1} = \begin{pmatrix} \cos(\theta) &amp; \sin (\theta) \\ -\sin (\theta) &amp; \cos (\theta)\end{pmatrix}$$   and clearly this holds for the base case.   Now I'm going to assume true when $n=k$ and try and prove for $k+1$. So we have   $$\begin{pmatrix} \cos(\theta) &amp; \sin (\theta) \\ -\sin (\theta) &amp; \cos (\theta)\end{pmatrix}^{k}\begin{pmatrix} \cos(\theta) &amp; \sin (\theta) \\ -\sin (\theta) &amp; \cos (\theta)\end{pmatrix}^{1} = \begin{pmatrix} \cos(k\theta + \theta) &amp; \sin (k\theta + \theta) \\ -\sin (k\theta + \theta) &amp; \cos (k\theta + \theta)\end{pmatrix}$$   Now I'm sure I can cheese this, but is there some clever way to pull this apart? I want to just be able to say something like the determinant of the left side is $1^{k+1}$ and its the same on the right ...  Question part (2) Find an element of $H$ of order 5.  Here I'm totally lost, I seem to think that every element is of order 1 cause the determinant is 1.  Question part (3) Find an element of $H$ of infinite order.  Again I'm lost; I want to somehow make the determinant 0 for this but it can never be 0 for any $\theta$. Why does the compiler say "a constant value is required" for the first case...the second case works fine...    switch (definingGroup) {     case Properties.Settings.Default.OU_HomeOffice:           //do something           break;     case "OU=Home Office":           //do something         break;     default:         break;  }   also tried...  switch (definingGroup) {     case Properties.Settings.Default.OU_HomeOffice.ToString():           //do something         break;     case "OU=Home Office":         //do something         break;     default:         break;  }   ...same error  Here's the Properties.Setting code  [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("OU=Home Office")] public string OU_HomeOffice {     get {         return ((string)(this["OU_HomeOffice"]));     } } How to learn commutative algebra? How extended must my extended paper be? The difference between with or without intercept model in logistic regression Find the MLE of the unknown parameter $\theta$ when $X_1,X_2,...,X_n$ is a sample from the distribution whose density function is: $$f_X(x) = \frac12e^{-|x-\theta|}, -\infty&lt;x&lt;\infty$$ What I did so far: $$\text{maximize }(\frac12)^ne^{-|x_1-\theta|-|x_2-\theta|-...-|x_n-\theta|} \\ \text{thus we want to minimize }|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|$$ Since $|x_i-\theta|$ is positive for all $i$, we want to solve for $\theta$ so: $$|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|=0$$ What do I do from here? It seems that a number of the statistical packages that I use wrap these two concepts together. However, I'm wondering if there are different assumptions or data 'formalities' that must be true to use one over the other. A real example would be incredibly useful. (1, eval)('this') vs eval('this') in JavaScript? I may be visiting the US soon for both work (conference) and leisure (sight-seeing) but was wondering whether it is possible to pay a visit to Cuba, as I see that direct commercial flights have been restarted. From what I can tell, it is still not permitted for US citizens to travel to Cuba as tourists (from the ).  What is the legal status of European citizens - would it be permitted for me to travel as a tourist from, say, Florida to Cuba on a commercial flight? Would this cause problems for me on my return to the US?  I understand that the question has been asked before () but the situation has changed and I believe it warrants asking again. Correct use of "is" or "are" Possible Duplicate:          Would I use is or are in the following sentence?      The Pohutakawa Coast, Hauraki Gulf, and Waiheke Island is/are the backdrop for our day.   If I rewrote it so the subject (backdrop) starts the sentence, then it seems to me that as it is singular, the verb should be the singular is. But as it is written above, are seems less clumsy. How should a family with young children apply for UK visas? We are sponsoring a family to visit us in UK as friends from Madagascar for two weeks. They have a 6 year old and a 16 month old.   Do the kids need their own visas, and are they the standard visitor visa or a special child visa?   Also, when I try and apply on the website I can only apply for one person so how do I apply for all the individuals in the family?   I have looked on the Immigration website and can't find the answers I need. Finding CPU usage of a service Because my laptop fan was spinning up for no reason, I had a look at the CPU usage and I see  svchost with 12.5% CPU, which is basically a full core.  Now, I'm aware that  svchost runs services and I know how to display the services it runs in Task Manager or Process Explorer ().  Now I know which services are run, but I don't know which service eats the CPU time. I could disable one service after another, but I don't really like doing this (it could break things that are currently in use and I could forget turning the service back on later).  Therefore I'd like to know whether it's possible to instruct Windows to run only one service per svchost the next time I boot my PC. While I might have the slight disadvantage of several processes, I could immediately find out which one it is and it would be a much easier decision of whether or not to stop or restart the service. This image is what's supposed to look like in Edit Mode/Object Mode(although I still can make these screenshots even after the update by pressing F12 which is rendering) but the following is what my donut looks like now in Blender.  It shows no shadows and colors. The only thing I did is updating blender to 2.81 from 2.80. And I don't know what but something seems off with blender. Sometimes I can't click any objects so I just pressed tab and then now it's all clickable. Seems like I was in edit mode, but to me, it looked exactly like object mode. I don't know what is wrong with it. How do I make my colors show up again? Manually change filetype icons in Windows 7 I'm trying to find the dialog tab in Windows 7 that allows a user to change the icon used for a particular file type.  In Windows XP it would be under the Folder Options properties dialog.    Where is it on Windows 7?  I only want to change the icon of a specific filetype, to anything I want but this tab is no longer present in Folder Options of Windows 7. Can you help me with my software dependency issue? This is a  about Compile Dependencies and Package Management.    I have a question regarding compiling ports/software or installing RPMs on my *nix server.  When I try to do this I receive lots of messages about missing dependencies.  Can the Server Fault community please help? How did Luke know where to land on Dagobah?