In the C/C++ language, the argument needs to be replaced as shown in the table below.
FORTRAN | C/C++ |
Integer |
int* |
Real(8), |
double* |
Character(Len=n) |
char*, size_t n |
extern "C" __declspec(dllimport) void _cdecl SETTYPEVERSION(int* ver);
#define setTypeVersion SETTYPEVERSION
For installing the software in a specified directory
mkdir ~/directory
./configure --prefix=$HOME/directory
make
make install
More information can be found here
Linux: tar extract files
Extract or Unpack a TarBall file
To unpack or extract a tar file, type:
tar -xvf file.tar
More information can be found here
Q: How can I sort the output of 'ls' by last modified date?ls -t
or (for reverse) ls -tr
undo: u
redo: ctrl+r
The :substitute command searches for a text pattern, and replaces it with a text string
:%s/foo/bar/g
Find each occurence of 'foo' (in all lines), and replace it with 'bar'
:s/foo/bar/g
Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.
:%s/foo/bar/gc
Change each 'foo' to 'bar', but ask for confirmation first.
:%s/\
Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
sed, a stream editor
Q: How to delete all lines of the files in Vim
A:
1. Type gg
to move the cursor to the first line of the file.
2. Type dG
to delete all the lines.
SketchUP
Git
git diff --name-only --diff-filter=U
or maybe just git status
Q2: What is the simplest way to accept all (incomming or current) changes in confilicted files in git?git checkout --theirs -- filenames
or maybe just git status
Q3: Setting up multiple GitHub accounts on Windows
A3: http://kevinpelgrims.com/blog/2012/07/20/setting-up-multiple-github-accounts-on-windows/