I have a simple Linux bash file: /home/jack/lib/env.bash It is supposed to register the directory relative to the bash file (/home/jack/lib/opt in this case) as environment variable. #!/bin/bash export MYFOLDER=$PWD/opt  However, if I run it from a different folder like: *****:/home/jack/a/b/c$ source /home/jack/lib/env.bash  It registers /home/jack/a/b/c/opt to MYFOLDER in the env list instead. How to fix?
How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application
Why do you need 2 resistors when hooking up a transistor as a switch What is the point of R2 in the following diagram:   I get that R1 controls the current to the Base, but what does R2 do? Missing dollar problem This sounds silly but I saw this and I couldn't figure it out so I thought you could help. The below is what I saw.  You see a top you want to buy for $\$97$, but you don't have any money so you borrow $\$50$ from your mom and $\$50$ from your dad.  You buy the top and have $\$3$ change, you give your mom $\$1$,your dad $\$1$, and keep $\$1$ for yourself.  You now owe your mom $\$49$ and your dad $\$49$.  $\$49 + \$49 = \$98$ and you kept $\$1$.   Where is the missing $\$1$? How could the trained, physically stronger person lose this lightsaber fight? How could     Kylo Ren   lose the fight against      Rey?   I find the outcome totally illogical even though the Force may be strong in the woman. Furthermore, I would expect a man to be physically stronger than a woman. It is like having a very intelligent but uneducated person beating a math Phd in a math exam. Which cameras have built-in HDR? When taking landscape photos, I often struggle with dynamic range. I have either a burned out skies or landscapes are too dark.  Now I'm reading  that some cameras can take 3 pictures with different exposures, and combine them automatically to one image with higher dynamic range.   So my question is, which cameras have this feature? What is the radius of convergence of $\sum z^{n!}$? How to find the radius of convergence of $\sum z^{n!}$?   I'm used to applying the ratio test to power series of the form $\sum a_{n}z^{n}$, but for a different power of $z$, I am a bit stumped. What about $\sum z^{2n+a}$ for another example? Where $a\in \mathbb{R}$. Is there any way to create a bootable Ubuntu USB flash drive from the terminal without using any third-party applications like , , ,  etc.  I tried to create a bootable Ubuntu flash drive with dd method,  sudo umount /dev/sdb sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M   It creates files on the USB disk, but when I try to boot the USB disk it shows an Operating System Not Found error. $\sum_{n=1}^\infty\frac{z^n}{n}$ does not converge uniformly on $\mathbb{D}$. Table with multiple merging Is normality testing 'essentially useless'? What is this style of text-as-image called? I'm seeing a trend (especially on pinterest) of these posters where the image and subject is the text. THe text itself isn't really that important either, it's mainly the typefaces used and composition.  Does this style have a name to it? Is it just called text-as-image? Compactness of $A:=${$f \in C[0,1], |f|_\infty \le K, |f'|_\infty \le M$} Here we use infinity norm as metrics for $C[0,1]$. The professor claims that this set is compact. I can show this set is relative compact by Arzela Ascoli, i.e., for each subsequence there is a further sub-subsequence that uniformly converges to a continuous function on $[0,1]$. But it is not intuitive to me why this set is compact, i.e. the limiting function also satisfies $|f'|_\infty \le M$. Is it true that $A$ is close and therefore compact? How to batch import Wavefront OBJ files? Is it possible to batch import Wavefront .obj to blender? I'm working on 2.69. If I select multiple .obj files, only one gets imported. Also if I hit A on file selection window to select all files (.obj and .mtl) I get an error, nothing gets imported. I have to import several hundreds of .obj into the blender file, is this possible? The double cone is not a surface. Simulating group_concat MySQL function in Microsoft SQL Server 2005? I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :) Breitbart today:   What is the source for the term nothing-burger? Is it Safe to Delete Files From /var/tmp? I have 2 partitions (Windows and Ubuntu 13.04) and I am asked which one to boot each time I turn on my computer.  I want to install Ubuntu 13.10 to the entire disk.  I do not mind if all previous Ubuntu/Win data are lost.  How can I do that? Inform moderators migrating a question if the migration would have been normally blocked Is there a word for “not greedy”? The antonym of “greedy” is “generous”. Is there a word for “not greedy” (one who is content with what he has)? I looked up a few grammar-teaching websites (in Chinese language). The website says many people do not use the phrase "A xxx of" correctly because they do not identify the subject of the phrase correctly.   The website says phrases like "A range of; A high percentage of" is singular, while "a number of; a group of; a couple of; a total of" is plural.  Therefore according to the website, the correct sentences should be as follows.     A wide range of courses is available. ("A wide range" is the subject)      A high percentage of peptides that are made of amino acids is present   in the sample. ("A high percentage" is the subject)      A number/ group/ couple of people were killed in the earthquake.("people" is the subject )       A total of 230 employees were laid off. ("employees" is the subject)   I don't get the pattern here. All of this looks (or should I use "look"?) arbitrary to me. In fact I thought this phrase is supposed to be arbitrary and whether the phrase is plural or singular should depend on the the person's own judgment.   How do I identify the correct subject in the "A xxx of" phrase?