Difference between revisions of "Coding"

From esoterum.org
Jump to: navigation, search
(LaTeX)
(LaTeX)
Line 59: Line 59:
 
=== LaTeX ===
 
=== LaTeX ===
 
*Markus Neteler. [http://www.grassbook.org/neteler/highres_pdf.html Creating High Resolution PDF files for book production with Open Source tools]
 
*Markus Neteler. [http://www.grassbook.org/neteler/highres_pdf.html Creating High Resolution PDF files for book production with Open Source tools]
 +
:Replacing commercial fonts (which don't get embedded into the pdf with open source fonts:
 +
<code> 
 +
# We go for replacing the wrong commercial font names with URW names, we also
 +
# adapt some similar fonts names on the fly (extend for further font names):
 +
 +
cat original_graphics.eps | sed 's+Times-Bold+NimbusSanL-Bold+g' |\
 +
sed 's+Times-Roman+NimbusSanL-Regu+g' |\
 +
sed 's+Times+NimbusSanL-Regu+g' |\
 +
sed 's+Helvetica-BoldOblique+NimbusSanL-BoldItal+g' |\
 +
sed 's+Helvetica-Oblique+NimbusSanL-ReguItal+g' |\
 +
sed 's+Helvetica-Bold+NimbusSanL-Bold+g' |\
 +
sed 's+Helvetica-Bold-iso+NimbusSanL-Bold+g' |\
 +
sed 's+Helvetica+NimbusSanL-Regu+g' |\
 +
sed 's+Helvetica-iso+NimbusSanL-Regu+g' |\
 +
sed 's+Symbol+StandardSymL+g' > new_graphics.eps
 +
</code>
 
*[http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ LaTeX Primer]
 
*[http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ LaTeX Primer]
 
*[http://web.mit.edu/answers/latex/latex_bibliography.html Bibliographies with latex/bibtex]
 
*[http://web.mit.edu/answers/latex/latex_bibliography.html Bibliographies with latex/bibtex]

Revision as of 17:28, 10 August 2009

SVN

GNU

Programming

IDE

Eclipse

TeXnicCenter

  • In order to embed Type I fonts and use letter format, these switches were added in [Build]->[Define Output Profiles]->[Postprocessor]->[DviPs], reference, embedding fonts reference:
--Pdownload35 -P cmz -t letter

Java

C

snippits

  • Cstring to int: int n = atoi(StrInt);
  • Return cursor to beginning of same line: printf("%d\r",number);

SystemC

Assembly

Scripting

Bash

DOS

  • XCOPY *.jpg C:\FOLDER\ /S Search subfolders for *.jpg and copy files to C:\FOLDER\

Mark-up Languages

LaTeX

Replacing commercial fonts (which don't get embedded into the pdf with open source fonts:

# We go for replacing the wrong commercial font names with URW names, we also
# adapt some similar fonts names on the fly (extend for further font names): 

cat original_graphics.eps | sed 's+Times-Bold+NimbusSanL-Bold+g' |\
sed 's+Times-Roman+NimbusSanL-Regu+g' |\
sed 's+Times+NimbusSanL-Regu+g' |\
sed 's+Helvetica-BoldOblique+NimbusSanL-BoldItal+g' |\
sed 's+Helvetica-Oblique+NimbusSanL-ReguItal+g' |\
sed 's+Helvetica-Bold+NimbusSanL-Bold+g' |\
sed 's+Helvetica-Bold-iso+NimbusSanL-Bold+g' |\
sed 's+Helvetica+NimbusSanL-Regu+g' |\
sed 's+Helvetica-iso+NimbusSanL-Regu+g' |\
sed 's+Symbol+StandardSymL+g' > new_graphics.eps

HTML

Post Script

Modeling

AMPL (Linear Programming)

VHDL

Scripting

Regular Expressions

  • (^(?:(\w+)(?:( )+|( )*\n))+((.)*)\(((.)*|(.)*\n(.)*)\)(( )*|( )*\n)\{(.)*\n) Finds a function declaration (eclipse find)
  • $1 trace\(" @ $5\\n"\); //MAB 22 SEP 08: Add trace print statements !!!!!INSERT RETURN CHARACTER HERE!!!!! Use this to replace the function declaration adding a trace statement identifying the function (normally "trace" should be replaced with printf), in eclipse, the return character apparently needs to be copied and pasted into the replace field, \n does not seem to work)

MATLAB

CGI

PHP

Interfaces