I am setting up a script in bash that return some information about a specific dictionary (french for example). I want that this script supports some parameters (4 currently). The issue is how manage the parameters easily than via many conditions ?   For the time being I am testing all the arguments of the script ($1, $2, ..) to be able to know which argument refers to which parameter  # langstat.sh : give statistics on letter occurrences in a specific language # Usage : langstat.sh &lt;dictionary&gt; # -&gt; Display the number of times each letter is used at least once in a word of &lt;dictionary&gt; # Usage : langstat.sh --percentage &lt;dictionary&gt; # -&gt; Display the percentage of times each letter is used at least once in a word of &lt;dictionary&gt; # Usage : langstat.sh --word &lt;word&gt; &lt;dictionary&gt; # -&gt; Return true if &lt;word&gt; is a word of &lt;dictionary&gt; # Usage : langstat.sh --all &lt;dictionary&gt; # -&gt; Display the number of times each letter is used in &lt;dictionary&gt; # Usage : langstat.sh --alphabet &lt;alphabet&gt; &lt;dictionary&gt; # -&gt; Display the number of times each letter is used at least once in a word of &lt;dictionary&gt; using &lt;alphabet&gt; as alphabet   if [[ $# -lt 1 || $# -gt 5 ]] then     echo "Usage : $0 [--percentage] [--all] [--alphabet &lt;alphabet&gt;] &lt;dictionary&gt;"     echo "Usage : $0 --word &lt;word&gt; &lt;dictionary&gt;"     exit fi   ...... ...... ......  # Tests to understand how parameters are ordered if [ $# -eq 1 ] then  elif [ $# -eq 2 ] then     if [ $1 == "--percentage" ]     then      elif [ $1 == "--all" ]     then      fi elif [ $# -eq 3 ] then     if [[ $1 == '--percentage' &amp;&amp; $2 == '--all' || $1 == '--all' &amp;&amp; $2 == '--percentage' ]]     then      elif [ $1 == '--alphabet' ]     then      elif [ $1 == '--word' ]     then      fi elif [ $# -eq 4 ] then     if        fi elif [ $# -eq 5 ] then     if [[ $1 == '--percentage' &amp;&amp; $2 == '--all' &amp;&amp; $3 == '--alphabet' ]]     then      fi fi   So my question is do you have some suggestions, maybe do you know any command, that permit to manage easier the parameters ? There are many conditions to test with 4 parameters then how people do when parameters are 10 or 20 ?
Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?
Measuring accuracy of latitude and longitude? How to find a real solution Conjugate to $\cos z$ is not equal to $\cos z$ conjugate $\overline{\cos(z)}\neq\cos(\overline{z})$ I have a dilemma. I have a task where I'm supposed to show that $|\cos z|^2+|\sin z|^2=1$ if and only if $z\in \mathbb{R} $. In my argument I have that $$\cos z\cdot\overline{\cos z} + \sin z\cdot\overline{\sin z}=\cos z\cdot \cos\overline{z} + \sin z\cdot \sin\overline{z}$$ but my teacher said that $\overline {\cos z} \neq \cos \overline{z}$.  Is this true?  But $$\overline{\cos(z)} = \overline{\frac{e^{iz}+e^{-iz}}{2}}=\frac{e^{-i\overline{z}}+e^{i\overline{z}}}{2}=\cos(\overline{z})$$ How much creative independence are the Show runners accorded in Game of Thrones? Since Season 3, we have been observing that the show was taking a different direction than the books. Many important characters never made it into the show, others who are still alive were killed off.   As we know the show is supposed to be based on the books, not to be direct adaption of the books from print to television media, there's bound to be a certain degree of creative independence accorded to them by the author of the series, George R.R. Martin.   The question is, how much independence do they have? Do they still have to take GRRM on board with whatever changes they might intend to make? By "they" I mean D&amp;D and the whole writers crew for the show. Given the number of significant changes they have made, I reckon the answer would be a lot. Has GRRM or HBO ever commented on that? Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing? What are the current travel restrictions on individuals entering the United States from regions affected by Covid-19? This community wiki explains the current restrictions by the United States of America on the entry of individuals who may pose a risk of transmission of the SARS-Cov2, the virus which causes the Covid-19 disease. How to move Ubuntu to an SSD I have multiple datasets that I am attempting to use principal component analysis (PCA) on in order to infer the underlying structure of the data.  I'm attempting to predict growth increment of conifers (the response which apparently needed to be cube root transformed for my original linear models).  My predictor variables include: continuous (some log-transformed like size-related variables, some compositional, and some traditionally scaled); binary; ordinal; and nominal (of which I'm pretty sure I can order with respect to site productivity).  I'm mostly attempting to make inferences because some of my previous models from linear regression have not produced significant terms corresponding to categories like health or climate and I feel that they should have.  I've read in Joliffe (2002) that I might want to leave my compositional data uncentered.  Forgive my naiveté, but I'm wondering if I should also do this for my binary data.  It also seems that I might not want to scale these since they're already on a 0 - 1 scale but I'm not sure.  After only using my continuous predictors (including compositional variables), it appears that a size principal component makes up the largest portion of the variability and Joliffe also mentions that one might want to attempt a "double-centering" of the log-transformed data if this is the case.  I don't know if this is even possible since the log-transformed data only makes up a small portion of my datasets.  Finally, I should ask if having such a combination of data types will complicate analysis so much that it will make inferences unreliable.  I am currently using R for this analysis.  Thank you. A weaker Axiom of Infinity? How can I multiply each item in an array easily with PHP? Behaviour of return statement in catch and finally My wife, two kids and I will be traveling in Ireland and the UK Nov. 1st through 21st. We're flying into and out of Dublin. Our plan is to do a clockwise tour: Fly into Dublin -> Belfast -> Scotland -> England/London -> Back to Dublin to fly home.  We've been planning to rent a car when we land in Dublin (doing just things outside Dublin at the start of the trip) and have a car all the way until London, then turn in the car and take a train/ferry to get back to Dublin before flying home.  However, reading through the car rental section of Rick Steve's 2012 Ireland book is causing us to question if this is the right plan.  He says (p. 480):     If your trip covers both Ireland and Great Britain, you're better off   with two separate car rentals, rather than paying for your car to ride   the ferry between the two islands. On an all-Ireland trip, you can   drive your rental car from the Republic of Ireland into Northern   Ireland, but be aware of drop-off charges ($75-150) if you return it   in the North.   So it seems like he recommends against doing one car rental for both islands, but he also recommends against renting in the Republic of Ireland and returning it in Northern Ireland (our other option for our current itinerary).  So we're not sure which is best here.  A few questions about this:   If we do one car rental all the way from Dublin to London, will there be a similar $75-$150 fee? Is there an easy place to return a car on the Northern Ireland side of one of the Northern Ireland -> Scotland ferries, and an easy place on the Scotland side to rent a car?  We'd like to minimize the number of buses/whatever we need to take between car rentals since we'll be lugging around car seats for both of our children (on top of carrying them and our luggage). Will one way be significantly cheaper than the other?  Besides the basic cost of taking the car on the ferry and the drop-off charges, our credit card will cover insurance in Scotland/England but not in Ireland, so we could potentially get a better rental rate by renting a second vehicle once we're on Great Britain. Although, I know you often get a better rate when keeping a car rental for longer, so that may negate any benefit from the credit card covering the insurance. I have always recommended pressing ALT+F2 and typing for example gksu nautilus or gksudo nautilus both are equivalent; to run graphical programs with root privileges.  However, I have just installed raring on a test system and this no longer works.  gksu and gksudo are not installed as part of a default raring install; though they are in the repositories. In 12.04 at least gksudo was just a symbolic link to gksu  The reasons I have always done this are because while it is often safe to use sudo under some circumstances it can cause problems with graphical applications because gksu has you running the program as root while with sudo you are running as yourself but with elevated privileges.  This can mean you inadvertently change the owner of critical system files.  This can cause problems.  This reasoning is explained better here:         Why was command removed from a fresh install and what should we be using instead? Determine all $f: \mathbb{R} \rightarrow \mathbb{R}$ such that, for all $x, y \in \mathbb{R}$, $$f((x + 1) f(y)) = y (f(x) + 1).$$    Source: Vuong Lam Huy, on a Facebook group. I created some texture maps in MindTex to use in Blender, but I can't figure out how to properly hook them up. The maps I have:  - Diffuse  - Normal  - Height   - Specular   - Gloss   - Self Illumination  - Reflection  - Ambient Occlusion   MindTex (left) vs. Blender (right)  As you can clearly see it's a pretty big difference.  is my material node setup in Blender. In the examples I don't actually use self illumination or reflection images, but including this in the answer would be helpful. I need to calculate the SQRT of  $x$ to $y$ decimal places. I'm dealing with $128$-bit precision, giving a limit of $28$ decimal places. Obviously, if $\,y &gt; 28$, the , which I'm currently using, becomes futile, as it simply doesn't offer $y$ decimal places.  My question to you is, can I calculate the Square Root digit-by-digit? For example, calculating the $n$-th digit, assuming I already have digit $\,n - 1$. I'm well aware this may be impossible, as I've not found any such method through Google yet, just checking here before I give up in search of arbitrary precision methods. Isomorphism between two models of Hilbert's Axioms with different notions of congruence I've been reading about Hilbert's Axioms of geometry, and I have two models on $\mathbb{R}^2$ which satisfy the usual axioms of incidence, betweenness, and congruence.   The first model has a distance function given by  $$ d(A,B)=|a_1-b_1|+|a_2-b_2| $$ where $A=(a_1,a_2)$, $B=(b_1,b_2)$, and two segments $AB\cong CD$ if $d(A,B)=d(C,D)$.  The second model has a distance function given by $$ d(A,B)=\sup\{|a_1-b_1|,|a_2-b_2|\}, $$ and again $AB\cong CD$ if $d(A,B)=d(C,D)$.  The author claims that these two models are isomorphic in that there is a bijection between the sets of points in $\mathbb{R}^2$ that preserves lines, betweenness and congruence. I've been toying with it for a while, but it seems to me that the notions of congruence in particular are too different.   For example, in the first model, if $A=(0,0)$ and $B=(2,1)$, and $C=(2,0)$ and $D=(5/2,5/2)$, then $AB\cong CD$ since both segments have length $3$. To preserve congruence, I suppose two segments are congruent if the maximum of the displacement along the $x$-axis or $y$-axis by traveling along one segment is equal to the maximum of the displacement along either axis when traveling along the other segment. In this sense, how could you shape the segment $CD$ so that the maximum of the displacements along either axis is the same as the maximum of the displacement for whatever the image of $AB$ is?  In the first model, $AB$ is congruent to any segment which is the hypotenuse of triangle with legs that sum to $3$, and this sum could split into any two terms. I just don't see a function that could handle all these possibilities at once. Does anyone know of a particular isomorphism between these two? Thanks. Order of an element in a finite cyclic group I am trying to save a GeoJSON file in QGIS as EPSG:4326, but it keeps being saved as CRS84.   EPSG:4326 and CRS84 are the same except CRS84 saves coordinates as long, lat - and EPSG:4326 saves them as lat, long.   When I open the saved file in QGIS it's read as EPSG:4326, but really the file is CRS84. I know this because when I open the GeoJSON file in notepad it's listed as CRS84, and when I load the file in Shapely it's recognized as CRS84.   What's going on here?  I've tried this on both QGIS 3.6.3 and QGIS 3.4.8 with the same result. How do you convert a cake recipe to make brownies?