Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

The old school way is to look it up in the Comprehensive LaTeX Symbol List (warning: 4 MB PDF file).

The new hotness is to use DeTeXify which uses handwriting recognition to look the symbol up for you.

DeTeXify even comes in an iPhone/Andriod app- you can get a free version or pay for one. The only difference is that with the paid app you are making a donation to the developer- the feature set is exactly the same.

The author is planning to work on a mobile version of the website that will supplant these apps.
3 years ago
There are several possibilities for controlling float placement. The question I see most here is along the lines of "How do I insert an image/table at the point I list it in the source document?".

First I think it is important to note that you don't need to use floats. An includegraphics does not need a surrounding figure and a tabular does not need a surrounding table. If captions are required, the \captionof command from the caption package can be used (perhaps they need to be boxed up to prevent a pagebreak between content and caption).

If a float environment is required, but the "amount of float" has to be limited to keep the content relatively close to the point where it was defined in the source, then the \FloatBarrier command from the placeins package can be used. This command specifies a barrier beyond which floats may not pass.
3 years ago
You can switch your cell layout to paragraph to use the \newline command.
***
\begin{tabular}{|p{2cm}|p{2cm}|}
\hline
Test & foo \newline bar \\
...
***
Edit:

Use the following commands instead of p if you want to specify the alignment as well:
***
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}***
3 years ago
Combining the previous answers and comments:

To simply extract the contents and create target directory if it is missing:
***mkdir -p /target/directory && tar xf archive.tar -C /target/directory***

To extract and also remove the root(first level) directory in the zip
***mkdir -p /target/directory && tar xf archive.tar -C /target/directory --strip-components=1***
3 years ago
This is normal behavior.

The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using

***cat /etc/motd***
Still seeing the same updates available, after running

***sudo apt-get update && sudo apt-get upgrade***
is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.
3 years ago
I was stuck in a large mv so I wasn't in a position to stop the process, setup screen and then start it again. I managed to exit the SSH session with the process running by essentially doing the following steps:

Establish SSH connection: ssh user@host
Run the desired command to start the process
Press Ctrl+Z to pause the process
Run bg to put the paused process in the background and resume it.
Run disown [pid] (process ID is optional, defaults to last process) to disown the process. To get a list of jobs simply type jobs before.
Exit the SSH session by running logout.
Usage of the disown command:
***
disown [-ar] [-h] [jobspec ... | pid ... ]
Without options, remove each jobspec from the table of active
jobs. If jobspec is not present, and neither the -a nor the -r
option is supplied, the current job is used. If the -h option
is given, each jobspec is not removed from the table, but is
marked so that SIGHUP is not sent to the job if the shell
receives a SIGHUP. If no jobspec is supplied, the -a option
means to remove or mark all jobs; the -r option without a job?
spec argument restricts operation to running jobs. The return
value is 0 unless a jobspec does not specify a valid job. ***
3 years ago
You can use Vim in Ex mode:

***ex -s -c '%s/OLD/NEW/g|x' file***

% select all lines
s substitute
g replace all instances in each line
x write if changes have been made (they have) and exit
3 years ago
think the canonical way in Ubuntu is:

create a new file under /etc/profile.d/

***sudo vi /etc/profile.d/SCRIPT_NAME.sh***
add there:

***export PATH="YOUR_PATH_WITHOUT_TRAILING_SLASH:$PATH"***
and give it execute permission

***sudo chmod a+x /etc/profile.d/SCRIPT_NAME.sh***
3 years ago
I had this issue when I was using ubuntu on a VPS. I solved it editing /etc/hosts file.

run this command:

***sudo nano /etc/hosts***
and then add:

***127.0.0.1 localhost.localdomain localhost
127.0.1.1 ubuntu***
I hope that will solve your issue :)

PS: Remember to reboot your computer!
3 years ago
n OS X 10.9.1 w/ Chrome 32 I needed to both clear the host cache and flush the socket pools to get Chrome to refresh the DNS cache:

Navigate to chrome://net-internals/#dns and click "Clear Host Cache"
Navigate to chrome://net-internals/#sockets abd click "Flush Socket Pools"
3 years ago
A couple of options:

Microsoft/SysInternals Process Explorer - Go to Find > Find Handle or DLL. In the "Handle or DLL substring:" text box, type the path to the file (e.g. "C:\path\to\file.txt") and click "Search". All processes which have an open handle to that file should be listed.

WhoLockMe - Explorer extension which adds a right-click menu option

N.B. WhoLockMe appears to not work with Win 10 (at least I have been unable to register it with either of the 32- or 64-bit versions of regsvr32.exe).
3 years ago
There is no direct way to tell git which private key to use, because it relies on ssh for repository authentication. However, there are still a few ways to achieve your goal:

Option 1: ssh-agent
You can use ssh-agent to temporarily authorize your private key.

For example:

***$ ssh-agent sh -c 'ssh-add ~/.ssh/id_rsa; git fetch user@host'***

Option 2: GIT_SSH_COMMAND
Pass the ssh arguments by using the GIT_SSH_COMMAND environment variable (Git 2.3.0+).

For example:

***$ GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
git clone user@host
***
You can type this all on one line — ignore $ and leave out the \.

Option 3: GIT_SSH
Pass the ssh arguments by using the GIT_SSH environment variable to specify alternate ssh binary.

For example:
***
$ echo 'ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $*' > ssh
$ chmod +x ssh
$ GIT_TRACE=1 GIT_SSH='./ssh' git clone user@host***
Note: The above lines are shell (terminal) command lines which you should paste into your terminal. They will create a file named ssh, make it executable, and (indirectly) execute it.

Note: GIT_SSH is available since v0.99.4 (2005).

Option 4: ~/.ssh/config
Use the ~/.ssh/config file as suggested in other answers in order to specify the location of your private key, e.g.

***Host github.com
User git
Hostname github.com
IdentityFile ~/.ssh/id_rsa***
3 years ago