I always ran scripts using ./      For example ./script.sh   I recently learned that you can also type . script.sh   Is there any difference?   The second is much easier for me since my keyboard doesn't have a key for / but I need to press SHIFT -.
I have one bash source run.sh as follows,  #!/bin/bash if [ $# -ne 1 ]; then     exit fi ...   when I execute it in two ways, there are different behaviors. The first way is,  source run.sh   It will close the terminal after execution. The second way is,  ./run.sh   this will simply finish running the script, and stay on the terminal. I am asking if there is a command for exiting a bash scripts for both source run.sh and ./run.sh execution. I have tried return too, which does not work well under ./run.sh execution.  More generally, I am interested in why this is happening, and what's difference between using "source" and "." for script execution?
Boolean b1 = true; Boolean b2 = true; String b3 = 'b1 &amp;&amp; b2'; Boolean b4 = Boolean.valueOf(b3); system.debug('test Bool '+ b4);   Given a string how can you convert into expression without breaking the sting. How can I iterate over an enum? How can I convert a std::string to int? of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER? Suppose there are several journals with the same impact factor. Is it better to submit my papers to one of them or each time I finished a manuscript it is better to submit to an equally good journal that I have not published in yet.  I am early in my career and I already published two papers in the same journal and I am going to finish my third paper, which potentially can be published in the same journal as my previous two papers. What is a "closed" or "duplicate" question? Questions can be closed or marked as duplicates.  What does it mean for a question to be &quot;closed&quot;? What does it mean for a question to be marked as a &quot;duplicate&quot;? Who can close a question? What are the reasons for closing a question ? Is closure the end of the road for a question? When are closed questions eligible for deletion?   Related        For more information, see &quot;&quot; in the . How can I undo git reset --hard HEAD~1? I can't seem to get Python to import a module in a subfolder. I get the error when I try to create an instance of the class from the imported module, but the import itself succeeds. Here is my directory structure:  Server     -server.py     -Models         --user.py   Here's the contents of server.py:  from sys import path from os import getcwd path.append(getcwd() + "\\models") #Yes, i'm on windows print path import user  u=user.User() #error on this line   And user.py:  class User(Entity):     using_options(tablename='users')      username = Field(String(15))     password = Field(String(64))     email    = Field(String(50))     status   = Field(Integer)     created  = Field(DateTime)   The error is: AttributeError: 'module' object has no attribute 'User' I am trying to count the number of bit-strings of length 8 with 3 consecutive zeros or 4 consecutive ones. I was able to calculate it, but I am overcounting. The correct answer is $147$, I got $148$.  I calculated it as follows:  Number of strings with 3 consecutive zeros = $2^5+5\times2^4 = 112$, because the 3 zeros can start at bit number 1, 2, 3, .., 6  Number of strings with 4 consecutive ones = $2^4+4\times2^3 = 48$, I used the same reasoning.  Now I am trying to count the number of bit-strings that contain both 3 consecutive zeros and 4 consecutive 1s. I reasoned as follows:   the strings can be of the following forms: 0001111x, 000x1111, x0001111..thus there are $2+2+2 = 6$ possibilities for bit-strings where the 3 consecutive zeros come first. Symmetrically there are $6$ bit-strings where the 4 consecutive ones come first.  Thus the answer should be = $112+48-12 = 148$.  clearly there's something wrong with my reasoning, if someone could point it out, that would be awesome. Thanks How do I make a program auto-start every time I log in? I frequently need to start several programs that I use every time I start my computer. How can I make it so that whenever I login the program is automatically launched? How to finish current activity in Android How to use the parskip package? (space in between paragraphs) In Helgason, "Differential Geometry, Lie Groups and Symmetric Spaces"  we have the formula for the exterior derivative  $(p+1)d\omega(X_{1}, \ldots X_{p+1})=\Sigma_{i=1}^{p+1} (-1)^{i+1} X_{i} \cdot \omega(X_{1}, \ldots , \hat{X_{i}}, \ldots X_{p+1})+\Sigma_{i&lt;j} (-1)^{i+j}\omega([X_{i}, X_{j}], X_{1}, \ldots , \hat{X_{i}}, \ldots \hat{X_{j}}, \ldots , X_{p+1})$  but in other sources on-line they have the same formula without the factor of $p+1$ on the left-hand side.  Are there two different definitions of the exterior derivative, or is there an error in Helgason? What happened to the ia32-libs package? The ia32-libs package is no longer present in Ubuntu 12.04 repositories for a 64bit system. Are there any available replacement packages available for download? How can I send mail from an iPhone application I want to send an email from my iPhone application. I have heard that the iOS SDK doesn't have an email API. I don't want to use the following code because it will exit my application:  NSString *url = [NSString stringWithString: @"mailto:foo@example.com?cc=bar@example.com&amp;subject=Greetings%20from%20Cupertino!&amp;body=Wish%20you%20were%20here!"]; [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];   So how can I send an email from my app? Why are the solutions of polynomial equations so unconstrained over the quaternions? An $n$th-degree polynomial has at most $n$ distinct zeroes in the complex numbers.  But it may have an uncountable set of zeroes in the quaternions.  For example, $x^2+1$ has two zeroes in $\mathbb C$, but in $\mathbb H$, ${\bf i}\cos x + {\bf j}\sin x$ is a distinct zero of this polynomial for every $x$ in $[0, 2\pi)$, and obviously there are many other zeroes.  What is it about $\mathbb H$ that makes its behavior in this regard to be so different from the behavior of $\mathbb R$ and $\mathbb C$?  Is it simply because $\mathbb H$ is four-dimensional rather than two-dimensional? Are there any theorems that say when a ring will behave like $\mathbb H$ and when it will behave like $\mathbb C$?   Do all polynomials behave like this in $\mathbb H$? Or is this one unusual? Why does the symbol for the multiplication operation change shape? Why does the "$\times$" used in arithmetic change to a "$\cdot$" as we progress through education? The symbol seems to only be ambiguous because of the variable $x$; however, we wouldn't have chosen the variable $x$ unless we were already removing $\times$ as the symbol for multiplication. So why do we? I am very curious. It seems like $\times$ is already quite sufficient as a descriptive symbol. What are the difference between the following sentence?    I ate apples. I have eaten apples.    When should we use simple past tense? When should we use perfect past tense? I am trying to use the AwesomeCV template () for creating a CV using TexMaker 5.0.3 with XeLaTex. However, I am not able to get this to work as I get the following error messages:    Does anyone know what the source of problem might be and how to solve it?  Thanks a lot in advance,  Cheers Deriving ordered statistics minimum cdf Assume ${{X}_{1}}$, ${{X}_{2}}$, ${{X}_{3}}$,...,${{X}_{n}}$  are i.i.d. samples from distribution with density f, and cdf F.  Let V=min( ${{X}_{1}}$, ${{X}_{2}}$, ${{X}_{3}}$,...,${{X}_{n}}$)  To find the minimum $${B}_{v}={\{V\ge{v}\}}=\{{X}_{1}\ge{v}\}\cap\{{X}_{2}\ge{v}\}\cap...\cap\{{X}_{n}\ge{v}\}$$  So, $$P(V\ge{v})=[1-F(v)]^{n}$$  The cdf is  $$F_{v}(V)=1-[1-F(v)]^{n}$$   The density is $${f}_{v}(V)=\frac{d}{dv}[1-F(v)]^{n}=nf(v)[1-F(v)]^{n-1}$$   To find the density, why did we use $[1-F(v)]^{n}$ instead of $1-[1-F(v)]^{n}$, shouldn't we used the cdf to derive the pdf?