Difference between revisions of "Coding"

From esoterum.org
Jump to: navigation, search
(Post Script)
(Portable Document Format (PDF))
Line 189: Line 189:
  
 
=== Portable Document Format (PDF) ===
 
=== Portable Document Format (PDF) ===
*[http://superuser.com/questions/22786/back-button-of-adobe-pdf-reader-after-clicking-a-hyperlink-whose-target-is-on-the How to navigate backwards in Adobe Reader], <code>[ALT]+[<-]</code>
+
*[http://superuser.com/questions/22786/back-button-of-adobe-pdf-reader-after-clicking-a-hyperlink-whose-target-is-on-the How to navigate backwards in Adobe Reader], <code>[ALT]+[left arrow]</code>
  
 
== Modeling ==
 
== Modeling ==

Revision as of 16:38, 14 January 2011

SVN

GNU

GCC

Programming

IDE

Eclipse

Java

C

snippits

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


C++

SystemC

  • Installation on Fedora 9:
-SystemC compiles with Fedora 9 version of gcc, but it's necessary to add the following include statements to this file: systemc-2.2.0/src/sysc/utils/sc_utils_ids.cpp as indicated here:
#include "string.h"
#include "cstdlib"
  • A generic makefile for SystemC projects is here
  • Installing older gcc in Fedora 9, gcc 4.x was not compatible witn SystemC release, the configuration error says gcc-3.2 is compatible, but I could only get yum to work with compat-gcc-34

Assembly


Excel (VBA)

Scripting

CGI

PHP

Python

Perl

Bash

DOS

  • ICACLS [folder|file] /grane USER:(F) grant everyone full control permissions on folder or all subfolders starting at folder
  • XCOPY [SOURCE] [DEST] /d/e/f/i/a /EXCLUDE:exclude.txt Search subfolders for *.jpg and copy files to C:\FOLDER\
  • diruse /M /S /C /L /Q:500 /D /* c:\ Find folders larger then 500MB and write output to DIRUSE.LOG in diruse folder: c:\Program Files\Resource Kit
  • Remotely waking Windows machine from sleep

Regular Expressions

  • (^([^ ^\t^\n^/]+ +)+(.*) *\(.*\)[^\{]*\{[^\n]*\n) Finds a function declaration (eclipse find)
  • <START>$1 trace\(" @ $3\\n"\); //MAB 22 SEP 08: Add trace print statements
<STOP> 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)

Mark-up Languages

Wikimarkup

Dot

LaTeX

Dissertation

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

Embedding Fonts

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

# 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

Portable Document Format (PDF)

Modeling

AMPL (Linear Programming)

VHDL

MATLAB

Interfaces

Windows

In General

  • Magic Hex number: 0xDEADBEEF