the full command is % echo hello &amp;&amp; $(echo &quot;world&quot;), where % is the shell prompt. why does this fail? I've noticed that the error is the same as if I had run the command substitution directly on bash as % $(echo &quot;world&quot;)
I've been working a bash script to automate the process of opening and closing an LVM over LUKS external hard drive. However I continue to receive errors on line 28:   $(vgchange -a n ; cryptsetup luksClose vol)   The error I receive:  $ sudo ./encryption.sh -l Locking System.............. ./encryption.sh: line 28: 0: command not found System Locked!   Here is the rest of the code for reference:  if [ $1 = -u ] ; then     $(cryptsetup luksOpen /dev/sdb2 vol)     echo "Unlocking.................." | pv -qL 10     $(mount /dev/mapper/vol-lvroot /mnt ; mount /dev/mapper/vol-lvvar /mnt/var ; mount /dev/mapper/vol-lvhome /mnt/home ; mount /dev/sdb1 /mnt/boot)     echo "System Mounted!" | pv -qL 10 #   exit 0 fi  if [ $1 = -l ] ; then     $(umount /mnt/var ; umount /mnt/home ; umount /mnt/boot ; umount /mnt/)     echo "Locking System.............." | pv -qL 10     $(vgchange -a n ; cryptsetup luksClose vol)     echo "System Locked!" | pv -qL 10     exit 0 fi   Other information:   I receive no apparent error when running the command in question by itself interactively. I'm new to writing bash, so any recommendations and constructive criticism is appreciated. The process appears to complete successfully, but I don't understand the error or how to make them go away. Upon further research when running the troubled code alone in interactive mode it does provide output after being executed.   This is given after posting the troubled code interactively.   0 logical volume(s) in volume group "vol" now active
I have two atoms, both of which are either bosons or fermions, with four allowed energy states: $E_1 = 0$, $E_2 = E$, $E_3 = 2E$, with degeneracies 1, 1, 2 respectively.  What's the difference between the partition functions of a pair of two bosons and that of a pair of two fermions? For every set $A$, the empty set is a subset of $A$. The empty set is a set. Therefore, the empty set has a cardinality $\geq 1\ldots$ I have only recently been exposed to sets. According to , as seen on the first bullet mark of the link, $ \forall A: \emptyset \subseteq A$  Does this mean that $\emptyset$ is an element of all sets? (This is False, thank you those that answered)  Is the empty set also a set itself?  Assuming these statements are true, then the empty set therefore an element of the empty set. This does not sound right, please clarify for me. Thank you. Graph for relationship between two ordinal variables What is an appropriate graph to illustrate the relationship between two ordinal variables?  A few options I can think of:   Scatter plot with added random jitter to stop points hiding each other. Apparently a standard graphic - Minitab calls this an "individual values plot". In my opinion it may be misleading as it visually encourages a kind of linear interpolation between ordinal levels, as if the data were from an interval scale. Scatter plot adapted so that size (area) of point represents frequency of that combination of levels, rather than drawing one point for each sampling unit. I have occasionally seen such plots in practice. They can be hard to read, but the points lie on a regularly-spaced lattice which somewhat overcomes the criticism of the jittered scatter plot that it visually "intervalises" the data. Particularly if one of the variables is treated as dependent, a box plot grouped by the levels of the independent variable. Likely to look terrible if the number of levels of the dependent variable is not sufficiently high (very "flat" with missing whiskers or even worse collapsed quartiles which makes visual identification of median impossible), but at least draws attention to median and quartiles which are relevant descriptive statistics for an ordinal variable. Table of values or blank grid of cells with heat map to indicate frequency. Visually different but conceptually similar to the scatter plot with point area showing frequency.   Are there other ideas, or thoughts on which plots are preferable? Are there any fields of research in which certain ordinal-vs-ordinal plots are regarded as standard? (I seem to recall frequency heatmap being widespread in genomics but suspect that is more often for nominal-vs-nominal.) Suggestions for a good standard reference would also be very welcome, I am guessing something from Agresti.  If anyone wants to illustrate with a plot, R code for bogus sample data follows.  "How important is exercise to you?" 1 = not at all important, 2 = somewhat unimportant, 3 = neither important nor unimportant, 4 = somewhat important, 5 = very important.  "How regularly do you take a run of 10 minutes or longer?" 1 = never, 2 = less than once per fortnight, 3 = once every one or two weeks, 4 = two or three times per week, 5 = four or more times per week.  If it  would be natural to treat "often" as a dependent variable and "importance" as an independent variable, if a plot distinguishes between the two.  importance &lt;- rep(1:5, times = c(30, 42, 75, 93, 60)) often &lt;- c(rep(1:5, times = c(15, 07, 04, 03, 01)), #n=30, importance 1            rep(1:5, times = c(10, 14, 12, 03, 03)), #n=42, importance 2            rep(1:5, times = c(12, 23, 20, 13, 07)), #n=75, importance 3            rep(1:5, times = c(16, 14, 20, 30, 13)), #n=93, importance 4            rep(1:5, times = c(12, 06, 11, 17, 14))) #n=60, importance 5 running.df &lt;- data.frame(importance, often) cor.test(often, importance, method = "kendall") #positive concordance plot(running.df) #currently useless   A related question for continuous variables I found helpful, maybe a useful starting point: How to implement Enums in Ruby? What gear do I need for a newborn photography session? I am an amateur photographer and I have a newborn session coming up for a family friend.   My current gear is:   Canon T5i (crop sensor) Canon 18-55 IS STM Kit lens 85mm f/1.8 lens   I plan on buying a reflector for the shoot and will be using natural light as my light source.  So my question is: is this enough gear to get some nice photos? Should I get another prime lens besides the 85mm? I don't really use the kit lens.  I also have another 8 month old baby shoot coming up and an informal wedding shoot coming up so it would be nice to use the lenses in all situations. I don't need a telephoto at the moment and will probably not use one any time soon. $3\times3$ linear system organization Is there any difference in equals and == for String variables? if ('text'.equals(str))   or   if ('text' == str)   Is there any difference? If yes, then what is it?   Added, after answered.  String q = 'teXt'; system.debug('teXt'.equals(q)); // true system.debug('teXt' == q);      // true system.debug('text'.equals(q)); // false system.debug('text' == q);      // true Can the notion of vector space or algebra over a field be meaningfully extended to fractional dimensions, so that for example $\mathbb{R}^{-2/3}$ makes sense? Has this been explored somewhere?  I know that super vector spaces can be thought of as one way of generalizing vector spaces to negative integer dimensions. Is there a similar concept for dimensions that are rational numbers? I'm not talking about Hausdorff dimension, because it doesn't allow for negative rationals, and I'm rather looking for extensions from a more algebraic point of view (dimension as the trace of the identity map), without recurring to a given metric. Is $f(x,y) = |xy|$ differentiable in $(0,0)$? I have no idea how to approach this problem. Mavericks unusually high RAM usage I thought Mavericks was suppose to utilize RAM memory better, thus run smoother.  Running ML on Mac mini 2012, with 16GB RAM...always running smoothly even with over a dozen apps running.  Now, after installing Mavericks, my Mac is SLOW, eating up RAM like crazy! Looking over usage, of the 16GB of installed memory...on average it uses 10-14 GB RAM when barely running a few apps!!!   There is this kernel_task that is always running with over 1GB of RAM and most apps are not taking that much RAM, so what is using up all my RAM?! File cache? It shows very high in that new description, with about 1/3 of my total RAM How to tell a wlan card supports RFMON mode Can someone please tell me how to check if a wlan card supports promiscuous mode transpose columns to rows I think it would be nice to have a "friends list" on Stack Overflow. This would allow us to be able to follow the questions and answers that are posted by users that we want to watch/monitor.  I suggest it be implemented in the same fashion as DotNetKicks.com; where you can add someone to your "friends list" without them needing to approve you the way that other social networks do it. It should be completely open for us to add anyone to our "friends list" that we like. New profile pages are out - bugs and feedback master list My understanding is that when using a Bayesian approach to estimate parameter values:   The posterior distribution is the combination of the prior distribution and the likelihood distribution. We simulate this by generating a sample from the posterior distribution (e.g., using a Metropolis-Hasting algorithm to generate values, and accept them if they are above a certain threshold of probability to belong to the posterior distribution). Once we have generated this sample, we use it to approximate the posterior distribution, and things like its mean.   But, I feel like I must be misunderstanding something. It sounds like we have a posterior distribution and then sample from it, and then use that sample as an approximation of the posterior distribution. But if we have the posterior distribution to begin with why do we need to sample from it to approximate it? I was trying to make python version 3 as a default version of Ubuntu,  I used nano ~/.bashrc and added the first line of this answer.    Then It just messed up my terminal.  Now when I am clicking on my Terminal or trying to access by ctrl+alt+t, the terminal does open/run. I can only talk to ubuntu using my terminal how could I fix this?  Please advise!  Pls, note that the terminal icon is present, but the terminal does not open when clicked on. How do I get the terminal to open and work?  Update: I deleted that line from .bashrc. However, I still have a problem opening my terminal. I also see this sign on my ubuntu as well.     saying: a problem occurred when checking for the updates ubuntu 18.04 Best way to make a shutdown hook? Since Ubuntu relies on upstart for some time now, I would like to use an upstart job to gracefully shutdown certain applications on system shutdown or reboot. It is essential that the system's shutdown or reboot is stalled until these applications are shut down.  The applications will be started manually on occasion, and on system shutdown should automatically be ended by a script (which I already have). Since the applications can't be ended reliably without (nearly all) other services running, ending the applications has to be done before the rest of the shutdown begins.  I think I can solve this by an upstart job which will be triggered on shutdown, but I am unsure which events I should use in which manner. So far, I have read the following (partly contradicting) statements:   There is no general shutdown event in upstart Use a stanza like start on starting shutdown in the job definition Use a stanza like start on runlevel [06S] in the job definition Use a stanza like start on starting runlevel [06S] in the job definition Use a stanza like start on stopping runlevel [!06S] in the job definition   From these recommendations, the following questions arise:   Is there or is there not a general shutdown event in Ubuntu's upstart? What is the recommended way to implement a "shutdown hook"? When are the events runlevel [x] triggered; is this when having entered the runlevel or when entering the runlevel? Can we use something like start on starting runlevel [x] or start on stopping runlevel [x]? What would be the best solution for my problem?   Thank you very much QTimer can only be used with threads started with QThread How can I keep Ubuntu updated automatically? I want help to  make Ubuntu 'update &amp;&amp; upgrade' itself automatically, select the settings for this automatic system.  How can I do it? Please advice about  where to find the menu (GUI) or file (command line) to do it, what settings that can be recommended (if different from the default).  As a bonus, please describe how different types of program packages are treated,  program packages from Ubuntu repositories and PPAs snap packages flatpak packages other kinds of programs/packages. How can you convert a byte array to a hexadecimal string, and vice versa?