See edit below, thanks  I have the following test script (important note: I cannot change this part):  while (($#)); do   echo $1   shift done   Running the command ./test aaa "bbbb cccc" ddd gives the following output:  aaa bbbb cccc ddd   which is what any sane person would expect.  I have another script:  mode="good" status="okay" name="bro" description="very good man dood" extra=""  # ----  PARAMS=""  // $1: key, $2: value function addParam {     if [ ! -z "$2" ]; then         PARAMS="$PARAMS --$1 \"$2\""     fi }  addParam "mode" "$mode" addParam "status" "$status" addParam "name" "$name" addParam "description" "$description" addParam "extra" "$extra"  echo ./test $PARAMS ./test $PARAMS   The output from echo is ./test --mode "good" --status "okay" --name "bro" --description "very good man dood", so I would expect the output of ./test $PARAMS to be  --mode good --status okay --name bro --description very good man dood   but instead, for some reason, I get the following output:  --mode "good" --status "okay" --name "bro" --description "very good man dood"   If I copy the output of echo ./test $PARAMS and paste it, I get the expected output from ./test. So I tried removing the last line which executes ./test and leave the echo line last, but apparently $(./script) still does not work and I'm beyond ideas.  What am I doing wrong?    Edit: @steeldriver's solution works but there's another constaint - I have to allow users to send their own arguments.  So having this script (thanks @steeldriver):  #!/bin/bash  mode="good" status="okay" name="bro" description="very good man dood" extra="" arguments="--config \"blablabla=yes\" --config2 \"bla2=no problem\""  # ----  declare -a PARAMS  # $1: key, $2: value function addParam {     if [ ! -z "$2" ]; then         PARAMS+=("--$1" "$2")     fi }  addParam "mode" "$mode" addParam "status" "$status" addParam "name" "$name" addParam "description" "$description" addParam "extra" "$extra"  # (1) PARAMS+=("$arguments")  # (2) PARAMS+=($arguments)  echo ./test "${PARAMS[@]}"  ./test "${PARAMS[@]}"   The desired output is:  --mode good --status okay --name bro --description very good man dood --config blablabla=yes --config2 bla2=no problem   However the output I get is:  With (1):  --mode good --status okay --name bro --description very good man dood --config "blablabla=yes" --config2 "bla2=no problem"   With (2):  --mode good --status okay --name bro --description very good man dood --config "blablabla=yes" --config2 "bla2=no problem"   Much appreciated!
Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?
Continuous function preserving rational difference. Find all the continuous functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that if $x-y\in \mathbb{Q}$ then $f(x)-f(y)\in \mathbb{Q}$.   Can somebody give me some hint to solve this problem. I think that the functions are $f(x)=mx+b$ where $m\in\mathbb{Q}$.  Thanks! I found an argument online that the two fields are not isomorphic but I can't make sense of the argument. You find it .  These are the things I'm confused about when it comes to the argument.     It says that the field $\mathbb Q[x]/(x^2+1)$ contains a root of the polynomial $x^2+1$. I suppose this is the congruence class $[x]$? But this is not the same as the zero element of the field $\mathbb Q[x]/(x^2+1)$, right?   It says that every isomorfism takes $0$ to $0$. I interpret this as the zero-element in $\mathbb Q[x]/(x^2+1)$ (which I interpret to be $[0]$) is taken to the zero-element in $\mathbb Q[x]/(x^2+2)$ denoted $[0]_2$. But in the argument it says that this means that if $\mathbb Q[x]/(x^2+1)$ has a root of the polynomial, then also $\mathbb Q[x]/(x^2+2)$ must have a root of this same polynomial. Why is that?     Greatful for any help! SQL - Query to get server's IP address Why is it string.join(list) instead of list.join(string)? Subject–verb agreement not clear in "Is two bars OK?" Is the following correct?     Can I get some chocolate for myself? Yes, you can but not much.   Is two bars OK?   Is there any rule to explain the sentence above?  The dialogue's taken from Grammar Textbook Round-Up Level #3. Are Goodberries affected by the Life domain class features? I write some choice questions into beamer frame, after some research, here is my code:  \documentclass[aspectratio=169]{beamer} \usetheme{Berkeley} \usepackage{tasks,CJK} \begin{document} \begin{CJK*}{utf8}{bsmi} \begin{frame} \transwipe 1.Which one you want to choose? \begin{tasks}[counter-format=tsk[A].,debug=true](4) \task A \task B \task C \task D \end{tasks} \end{frame} \end{CJK*} \end{document}   output with pdflatex:  But I don't want the D choice goto the second line, I want them stay in one line, what should I do? I have updated my kubuntu 14.10 to kubuntu 15.04. And now after boot, when I enter my password on welcome screen, I will get black screen. It's looks like screen powered off. No cursor, no change brightness. Nothing. And when I try switch to text consoles (Ctrl+Alt+F1) nothing happening. If I doesn't login in welcome screen I can switch to text console. How to prove $\det(I+uv^\intercal)=1+v^\intercal u$ Let be $u,v\in\mathbb{R}^n$, then $\det(I+uv^\intercal)=1+v^\intercal u $ where $I$ denotes the identity matrix of order $n$. How to prove this?   what I did:   let be $A=\{n\in\mathbb{N}: \forall u,v \in \mathbb{R^n}, \det(I+uv^\intercal)\neq1+v^\intercal u  \} $, and suppose $A\neq \varnothing $, then for the well-orderer-principle there exists $n_0\in A$ such $n_0\leq n,\;\forall n\in A$. since $1\notin A,\; n_0\neq 1 \rightarrow n_0-1\in\mathbb{N}\setminus A  $ so: $$\forall u,v\in\mathbb{R^{n_0-1}}: \det(I+uv^\intercal)=1+v^\intercal u $$ Then, let be $u,v\in\mathbb{R}^{n_0}$, so $$\det(I+uv^\intercal)= \displaystyle\sum_{j=1}^{n_0}(-)^{1+j}a_{1j}\det(A_{1j})$$ where $a_{ij}=\begin{cases} u_iv_j+1 &amp; i=j \\ u_iv_j &amp; i\neq j \end{cases}$, and $A_{1j}$ is the  submatrix of $I+uv^\intercal$ that results deleting the i-file and j-column. Then I try to open the term for $j=1$ and try to use the relation for the new matrix of $n_0-1$ order with the determinant because it holds the same form but I have other terms which difficult me the work. Do you know other method?.  Ps. , in page 2 I've found something similar but I don't understand what it means PS. I'm taking a course of numerical analisys JavaScript: document.getElementById slow performance? `find` with multiple `-name` and `-exec` executes only the last matches of `-name` How to get this only in small letters (lowercase)? I used the following code to give out the category name (without link) in a single post.  How would it be possible for the category name that is given out to only appears in small letters ?  I just think this has to be made with substring, but I dont get it :) Could somebody please help me :)  &lt;?php foreach((get_the_category()) as $category) { echo $category-&gt;cat_name . ' '; } ?&gt; Transpose Ranges repeated by row I would like to convert several range of columns into rows, and keeping the association to the original col/row source  Sample source sheet  --------------------------------------------------- | Data 1 | 1/1/2018 | 1/2/2018 | 1/3/2018 | etc...365 days | --------------------------------------------------- | name 1  |    25    |   30     |    5     | etc...|  --------------------------------------------------- | name 2  |    2     |          |    4     | etc...| --------------------------------------------------- | etc ... 100 rows   Expected Results  --------------------------------------------------- | Data 1 |   Date      |  Value   |  --------------------------------------------------- | name 1  |  1/1/2018   |   25     |    --------------------------------------------------- | name 1  |  1/2/2018   |   30     |    --------------------------------------------------- | name 1  |  1/3/2018   |   5      |    --------------------------------------------------- | name 1  |  etc.. 365 days --------------------------------------------------- | name 2  |  1/1/2018   |   2      |    --------------------------------------------------- | name 2  |  1/2/2018   |          |    --------------------------------------------------- | name 2  |  1/3/2018   |   4      |    --------------------------------------------------- | name 2  |  etc.. 365 days --------------------------------------------------- | etc ... for each change of name pull all the col dates/values   Current results  --------------------------------------------------- | Data 1 |   Date      |  Value   |  --------------------------------------------------- | name 1  |  1/1/2018   |   25     |    --------------------------------------------------- |         |  1/2/2018   |   30     |    --------------------------------------------------- |         |  1/3/2018   |   5      |    --------------------------------------------------- |         |  etc.. 365 days                      I have to copy down to bring in "name 1" for each date  --------------------------------------------------- | name 2  |  1/1/2018   |   2      |             now update the formula to bring in the second item for the sequence of dates --------------------------------------------------- |         |  1/2/2018   |          |    --------------------------------------------------- |         |  1/3/2018   |   4      |    --------------------------------------------------- |         |  etc.. 365 days --------------------------------------------------- | etc ...     =Sheet1!A:A I can bring in the name from the source list, but I have to copy it down for the number of dates.  How can I have it match the number of dates?  and be dynamic to update as dates/values are added Edit: trying to use split and rept to count the number of times to repeat, then transpose.. =transpose(rept(split(arrayformula(concatenate(Sheet1!A:A&amp;"1")),"1",True, True),COUNTA(Sheet1!I1:ZZ1)))  =TRANSPOSE(Sheet1!$C$1:$Z$1) I can use transpose to get the dates/values, but it's fixed range.  How can I make it dynamic to import dates as they are added? How can an encryption scheme be indistinguishable with multiple messages but vulnerable to an adaptive chosen-plaintext attack? In order to be indistinguishable with respect to multiple messages, wouldn't the scheme need to be nondeterministic? How would this then possibly be vulnerable to an adaptive CPA? Coloring a black and white PDF graphic I have a graphic in PDF format (originally converted from an SVG) that is monochromatic (black on white). Is it possible using TikZ or PSTricks but not (Illustrator or Inkscape) to include this image in a different color?  Example:    While it lasts (there seems to be no long term way to host a pdf), you can .  Edit: Simple was perhaps a bit of a misnomer - the pdfs are cropped and monochromatic, but to intricate to redraw on my own. The above example is a character from a font (which I can recolor), but it gives a good example of what shapes I am talking about. How to highlight (color/draw attention to) a particular snippet in Minted I'm currently doing some work on error messages in programming languages. As such, I'm showing faulty pieces of code, alongside the compiler-errors accompanying them.  I'm using minted for the code snippets, but ideally, in addition to normal syntax highlighting, I'd like to highlight the sections of the code at which the error is located, by underlining them, putting a red box around them, shading their background, etc.  Is this possible using Minted? Union of subgroups is a subgroup if and only if one subgroup is a subset of the other Let $H$ and $K$ denote two subgroups of a group $G$.  Prove that the union $H \cup K$ is a subgroup of $G$ if and only if $H \subset K$ or $K \subset H$. Find the smallest value of $c$ such that $(1-x)\ln(1-x)+(1+x)\ln(1+x)\leq c x^2$ holds for $0&lt;x&lt;1$.   I saw the curve and realized this is true for $c=2$. How can I prove it? What is the smallest $c$ that still makes the inequality valid?  I think we should use the Taylor expansions of the $\ln$s. Convert IEnumerable to DataTable I get the following error:     Strict warning: Only variables should be passed by reference in include() (line 18 of /home/sites/dev/theparce/sites/all/themes/parce/block--block--3.tpl.php).   This is the block code which is causing that error.  if ($user_gallery) {   print render(node_show($user_gallery));  // Line 18   print drupal_render ($user_gallery_edit);  } else {   print drupal_render($user_gallery_new); }   Why do I get that error, even if I get all printed as expected?