Usage

From TechWiki

Contents

Subversion

Eclipse's dot-files (e.g., .classpath) and the directories containing the binaries are registered and marked as changes by subversion. So although your code is identical to the repository, subversion tags the project in eclipse as 'edited'.

To get subversion to ignore local setups, you need to use the ignore option. Note however, that eclipse can't do this (results in revision conflicts) and you need to do this in the terminal.

Go to the directory and type

svn status

to see something like

M     .
M      .classpath
?      bin/ch

Then

svn propset svn:ignore .classpath .
svn propset svn:ignore bin .

and commit

svn commit 

Type some test in the emacs editor and 'Ctrl-x' and 'Ctrl-s' to save and 'Ctrl-x' and 'Ctrl-c' to exit the editor.

Some of the content of this page has been split and migrated to separate wiki pages. In order for all the various links pointing to this page not to be broken, it now contains redirects...

See also http://svnbook.red-bean.com/en/1.1/ch07s02.html

Gnuplot

sudo apt-get install gnuplot

Start gnuplot by typing

gnuplot

int a terminal, or run a file containing gnuplot commands

gnuplot myGnuplotFile.gnu

Gnuplot outputs to various terminals, e.g., X11, JPEG, SVG, ... To see a list of possible terminals, run gnuplot and type

set terminal

E.g.:

set term post eps enh rounded color 6
set out "filename.eps"

for a color .eps file.

Example 1: Multi 3d plots

# Output
set term post eps enh rounded color 6
set out "trigger-0.25.eps"

# Plotting
set view 31, 326
set pm3d
set palette rgbformulae 30,31,32

set size 1,1
set origin 0,0

set mxtics 5
set mytics 5

set xlabel '%' 0, -0.5
set ylabel 'tick' 0, 0
set zlabel 'trend' 0, 0

set ztics 20

#set key spacing 1.0

# Do
set title 'EUR-USD-TCK-T-XYZ-0.25-cdf-TRIGGER'
set multiplot

# plot the first graph so that it takes a quarter of the screen
set size 0.5,0.5
set origin 0,0.5
splot 'EUR_USD-TCK_T-XYZ-0.25-DC-nosync-cdf_TRIGGER-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with pm3d t 'DC-nosync'

# plot the second graph so that it takes a quarter of the screen
set size 0.5,0.5
set origin 0,0
splot 'EUR_USD-TCK_T-XYZ-0.25-DC-synchr-cdf_TRIGGER-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with pm3d t 'DC-synchr'

# plot the third graph so that it takes a quarter of the screen
set size 0.5,0.5
set origin 0.5,0.5
splot 'EUR_USD-TCK_T-XYZ-0.25-MOVE-nosync-cdf_TRIGGER-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with pm3d  t 'MOVE-nosync'

# plot the fourth graph so that it takes a quarter of the screen
set size 0.5,0.5
set origin 0.5,0
splot 'EUR_USD-TCK_T-XYZ-0.25-MOVE-nosync-cdf_TRIGGER-cnt_1-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with pm3d  t 'MOVE-nosync-cnt-1'

unset multiplot

# remove all customization
#reset 

#pause -1

The .dat files look like this:

0.05999999999999339     10.0    44.05420881847681
0.05999999999999339     20.0    43.946932006633496
0.05999999999999339     30.0    43.391115926327195
0.05999999999999339     40.0    43.7007874015748
0.05999999999999339     50.0    42.8656895004487
0.05999999999999339     60.0    44.24242424242424
0.05999999999999339     70.0    45.18141899699561
0.05999999999999339     80.0    46.22067767158992
0.05999999999999339     90.0    44.904334244435766
0.05999999999999339     100.0   46.61688164743155

0.08999999999999009     10.0    43.110236220472444
0.08999999999999009     20.0    46.36989931107578
0.08999999999999009     30.0    44.852627082443405
...

The empty lines between blocks of different x-values (1st column) are crucial for pm3d (color contours) to work.

The multiplot looks like this:

Image:Gnuplot.jpg

Example 2: Multi 2d Plots

# Output
set term post eps enh rounded color 6
set out "2d.eps"

# Plotting
set size 1,1
set origin 0,0

set mxtics 5
set mytics 5

set xlabel '%' 0, 0.5
set ylabel 'trend' 0.5, 0

#set title ,-1
set key left

#set key spacing 1.0

# Do
set multiplot

# plot the first graph so that it takes a quarter of the screen
set title 'EUR-USD-TCK-T-XYZ-nocdf-0.25'
set size 0.5,0.5
set origin 0,0.5
plot 'EUR_USD-TCK_T-XYZ-0.25-DC-nosync-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'DC-nosync',   'EUR_USD-TCK_T-XYZ-0.25-DC-synchr-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'DC-synchr'

# plot the second graph so that it takes a quarter of the screen
set title 'EUR-USD-TCK-T-XYZ-nocdf-0.9'
set size 0.5,0.5
set origin 0,0
plot 'EUR_USD-TCK_T-XYZ-0.9-DC-nosync-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'DC-nosync',  'EUR_USD-TCK_T-XYZ-0.9-DC-synchr-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'DC-synchr'

# plot the third graph so that it takes a quarter of the screen
set title 'EUR-USD-TCK-T-XYZ-nocdf-0.25'
set size 0.5,0.5
set origin 0.5,0.5
plot 'EUR_USD-TCK_T-XYZ-0.25-MOVE-nosync-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'MOVE-nos',   'EUR_USD-TCK_T-XYZ-0.25-MOVE-nosync-cnt_1-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'MOVE-nos-1'

# plot the fourth graph so that it takes a quarter of the screen
set title 'EUR-USD-TCK-T-XYZ-nocdf-0.9'
set size 0.5,0.5
set origin 0.5,0
plot 'EUR_USD-TCK_T-XYZ-0.9-MOVE-nosync-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'MOVE-nos',   'EUR_USD-TCK_T-XYZ-0.9-MOVE-nosync-cnt_1-2004-08-02_00:00:00-2007-08-17_00:00:00.dat' with linespoints t 'MOVE-nos-1'

unset multiplot

# remove all customization
#reset 

#pause -1

The .dat files

0.05999999999999339     44.593202883625125
0.08999999999999009     45.55026683975191
0.12000000000000899     44.794899756731816


The plot

Image:Multi2d.jpg

Example 3: Customized 2d Plot

set logscale x
set logscale y
set title 'title'
set xlabel 'x'
set ylabel 'y'
set xtics 2
set ytics 2
set mxtics 0
set mytics 0
set grid xtics ytics
set nokey
set xrange [59.999999999999986:604799.9999999995]
set yrange [1.8744125935726553E-4:0.01389934317940217]
plot 'EUR_USD.dat' with points 6
replot (x/4.579984127356672E9)**0.4696553976767496
set label 'E:0.470, C: 4.580e+09' at 3609.6661965508965,2.497701103862245E-4
set term post eps enhan
set out 'myplot.eps'; replot

The.dat file is something like

60.0 1.874412593572656E-4
600.0 5.130908097244596E-4
2000.0 9.894948969972036E-4
3600.0 0.0013748500693382786
7300.0 0.0019572563316895383
22000.0 0.003460270370820821

The plot is:

Image:Slex.jpg

MySQL

MySQL

PHP

PHP

A Little CSS

CSS

LaTeX

For extensive information, go to LaTeX.

Using LaTeX Syntax in MediWiki

Use the math tags for LaTeX syntax:

 <math> a^2 </math> \qquad \Rightarrow a^2

Use

 <nowiki>...</nowiki>

to get verbatim rendering of LaTeX code.

Using

 : <math> a^2 </math> 

renders

a2

not
a2

<math>
\begin{pmatrix}
  x & y \\
  z & v 
\end{pmatrix}
</math>
 

gives \begin{pmatrix}   x & y \\   z & v  \end{pmatrix}.

Equation numbering is a bit of a pain, as it is not done automatically. A quick fix given here:

<math id="eq.3"> e^{\bold{i}\pi} = -1 , \qquad (3) </math>

yields

e^{\bold{i}\pi} = -1 , \qquad (3)

and as reference

[[#eq.3|Equation 3]]

i.e., Equation 3. However this doesn't work for my MediaWiki version, as the "id" attribute for the math tag gets deleted when saving the page.

As MediaWiki doesn't allow anchor tags, I can't get equation numbering working...