Coding: Difference between revisions

From esoterum.org
Jump to navigationJump to search
No edit summary
 
(129 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== SVN ==
*[http://web.asu.edu/community/ ASU Web Community]
*[https://forms.asu.edu/index.php?authenticator=jYWgZ8qAb0lY9zp_sYgjTMmatmQatXsnVs-FwRugRh1a6diybeyKAx_zI0slPG_V13KsSpZOfTqFlu5EZNfOEiidS2nRmPro6O9mGXfMBt2RmVEsYXKO9um0w20d-K7yllll ASU submitted requests]
*[http://csrl.beanstalkapp.com/ csrl.beanstalkapp.com SVN repository]
== GNU ==
== GNU ==
*[http://directory.fsf.org/ The Free Software Dictionary]
*[http://directory.fsf.org/ The Free Software Dictionary]


== Java ==
=== GCC ===
*[http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html gcc warning options]
 
== Programming ==
=== IDE ===
==== Eclipse ====
*[http://technology-shettyprasad.blogspot.com/2010/12/disable-syntax-error-check-in-eclipse.html turn off syntax error checking as you type]
*[http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_(3.0).pdf Eclipse Keyboard Shortcuts]
*Unlock file: <code><workspace>/.metadata/.lock</code>
 
=== Java ===
*[http://java.sun.com/docs/books/tutorial/java/index.html Sun Java tutorials]
*[http://java.sun.com/docs/books/tutorial/java/index.html Sun Java tutorials]


== HTML ==
=== C ===
*[http://www.w3schools.com/tags/default.asp HTML 4.01/XHTML reference page]
*> [http://www.cplusplus.com/reference/clibrary/cstdio/printf.html printf]
*[http://www.hypergurl.com/span.html Span formats (including mouse hover)]
* [http://www.cprogramming.com/tutorial/cpreprocessor.html Preprocessor tricks and Macros]
*[http://www.w3schools.com/tags/ref_ascii.asp HTML ASCII quick reference]
*> [http://docs.hp.com/en/B3901-90007/B3901-90007.pdf HP C], HP's book on the C language
*[http://www.w3schools.com/tags/ref_urlencode.asp HTML URL encoding quick reference]
*> [http://publications.gbdirect.co.uk/c_book/ The C Book]
*[http://c-faq.com/index.html C-FAQ.com]
*[http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/cpp/index.html#Top The C Preprocessor from apple.com]
*[http://www.eskimo.com/~scs/cclass/int/sx1e.html Linked Data Structures]
*[http://www.cs.cf.ac.uk/Dave/C/node19.html String handling]
*>[http://www.digitalmars.com/ Digital Mars C resources]
*[http://www.tuvasi.com/downloads/Suggestions_for_Coding_Guidelines_for_C.pdf Safe C coding tips], TÜV Rheinland Group
 
==== ''snippits'' ====
*Cstring to int: <code>int n = atoi(StrInt);</code>
*Return cursor to beginning of same line: <code>printf("%d'''\r'''",number);</code>
 
 
=== C++ ===
*> [http://www2.research.att.com/~bs/bs_faq2.html#null Bjarne Stroustrup's C++ Style and Technique FAQ]
*[http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=129 Creating persistent objects] by writing variables and data to binary file
*[http://www.cplusplus.com/reference/ cplusplus.com], C++ reference
 
=== SystemC ===
*[http://www.iro.umontreal.ca/~chareslu/systemc-2.0.1/hierarchy.html Online reference], U Montreal
 
*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: <code>systemc-2.2.0/src/sysc/utils/sc_utils_ids.cpp</code> as indicated [http://forums.fedoraforum.org/showthread.php?t=199153 here]:
::<code>#include "string.h"</code>
::<code>#include "cstdlib"</code>
 
*A generic makefile for SystemC projects is [http://www.esoterum.com/media/files/generic_systemc_makefile here]
 
*[http://www.tellurian.com.au/whitepapers/multiplegcc.php 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
 
*[http://www.forteds.com/SystemC/training/LaunchSystemC.asp?y=ftc&userid=7094&bkmark=tocmain SystemC tutorial from Forte Design]
 
*Black, David C and Donovan, Jack. [https://login.ezproxy1.lib.asu.edu/login?url=http://site.ebrary.com/lib/asulib/Doc?id=10101569 SystemC: from the ground up]. ebrary, Inc. 2004. Online through ASU library
 
*Müller, Wolfgang; Rosenstiel, Wolfgang; Ruf, Jürgen. [https://login.ezproxy1.lib.asu.edu/login?url=http://site.ebrary.com/lib/asulib/Doc?id=10078611 SystemC: methodologies and applications ]. ebrary, Inc. 2003. Online through ASU library
 
*[http://www.asic-world.com/systemc/index.html SystemC Tutorial, ASIC-World]
 
*[http://en.wikipedia.org/wiki/SystemC SystemC on Wikipedia]


== Post Script ==
*[http://panoramis.free.fr/search.systemc.org/ SystemC.org search resources]
*[http://en.wikibooks.org/wiki/PostScript_FAQ Post Script FAQ]


== C ==
=== Assembly ===
*[http://c-faq.com/index.html C-FAQ.com]
*> [http://www.securitytube.net/Assembly-Primer-for-Hackers-%28Part-1%29-System-Organization-video.aspx Assembly Primer for Hackers], video tutorials, also good gdb tutorial
*[[Cell_Broadband_Engine#Assembly_Programming|CBE Assembly Programming]]
*[http://www.agner.org/optimize/ Agner.org], software optimization resources
*> [http://www.xs4all.nl/~smit/asm01001.htm Assembly programming tutorial]
*[http://asm.sourceforge.net/resources.html#tutorials Unix assembly programming]
*[http://www.cs.uakron.edu/~margush/306/index.html Assembly programming tutor from U Akron]
*[http://www.techtutorials.info/assembly.html List of assembly tutorials (Linux)]


== Modeling ==


=== AMPL (Linear Programming) ===
=== Excel (VBA) ===
*Robert Fourer, [http://www.google.com/search?q=cache:nQKxqQRX5mIJ:www.ampl.com/REFS/amplmod.ps.gz+ampl+declaring+large+sets&hl=en&ct=clnk&cd=1&gl=us AMPL: "A Mathematical Programming Language"]
*[http://msdn.microsoft.com/en-us/library/7fzyhc74(v=VS.80).aspx Microsoft.Office.Tools.Excel Namespace]


== Scripting ==
== Scripting ==
Line 28: Line 85:


=== PHP ===
=== PHP ===
*[http://www.tizag.com/phpT/index.php PHP Tutoial]
*[http://www.tizag.com/phpT/index.php PHP Tutorial]
*[http://www.javascriptkit.com/howto/phpcgi.shtml PHP vs. Pearl scripting]
*[http://www.javascriptkit.com/howto/phpcgi.shtml PHP vs. Pearl scripting]
*[http://www.thesitewizard.com/archive/installphp.shtml Installing PHP on Windows]
*[http://www.thesitewizard.com/archive/installphp.shtml Installing PHP on Windows]
Line 35: Line 92:
*[http://www.bin-co.com/php/scripts/load/ Function for loading the contents of web pages into a variable]
*[http://www.bin-co.com/php/scripts/load/ Function for loading the contents of web pages into a variable]
*[http://weblogtoolscollection.com/regex/regex.php Regular Expressions Quick Reference]
*[http://weblogtoolscollection.com/regex/regex.php Regular Expressions Quick Reference]
*[http://php.net/quickref.php Quickreference]
=== Python ===
*[http://docs.python.org/index.html Python Documentation]
*[http://www.devshed.com/c/a/Python/String-Manipulation/ String manipulation]
*[[IMAP Utility]]
=== Perl ===
*[http://perldoc.perl.org/search.html?q=string Perl documentation]
=== Bash ===
*> [http://www.bestsolution.at/en/03_Products-nbsp~--nbsp~Projects__13_exclude-nbsp~wildcard-nbsp~matches.html GLOBIGNORE]
*> [http://www.linuxconfig.org/Bash_scripting_Tutorial Quality tutorial]
*> [http://kd7yhr.org/bushbo/bash.txt Bash commands reference]
*> [http://www.tldp.org/LDP/abs/html/index.html Advanced Bash scripting guide]
*> [http://linuxgazette.net/issue18/bash.html Handling strings], globbing
*> [http://www.ncsu.edu/it/mirror/ldp/LDP/LGNET/18/bash.html Handling strings]
*[http://www.tuxfiles.org/linuxhelp/wildcards.html wildcards]
*[http://tldp.org/LDP/abs/html/io-redirection.html file io]
=== DOS ===
*[http://www.computerhope.com/batch.htm Good short batch reference]
*<code>ICACLS [folder|file] /grane USER:(F)</code> grant everyone full control permissions on folder or all subfolders starting at folder
*<code>XCOPY [SOURCE] [DEST] /d/e/f/i/a /EXCLUDE:exclude.txt</code> Search subfolders for *.jpg and copy files to C:\FOLDER\
*<code>[http://www.microsoft.com/downloads/details.aspx?FamilyID=955D7F2F-73D9-4018-9DD7-42DA210E62EE&displaylang=en diruse] /M /S /C /L /Q:500 /D /* c:\</code> Find folders larger then 500MB and write output to DIRUSE.LOG in <code>diruse</code> folder: <code>c:\Program Files\Resource Kit</code>
*[http://superuser.com/questions/69624/windows-7-come-out-of-sleep-when-i-open-remote-desktop Remotely waking Windows machine from sleep]
=== Regular Expressions ===
*<code>(^([^ ^\t^\n^/]+ +)+(.*) *\(.*\)[^\{]*\{[^\n]*\n)</code> Finds a function declaration (eclipse find)
*<code><START>$1 trace\(" @ $3\\n"\); //MAB 22 SEP 08: Add trace print statements </code>
:<code><STOP></code> 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 ===
*[http://jimgroom.org/bavawiki/index.php?title=Bavawiki_home Bavawiki tutorials]
=== Dot ===
*[http://en.wikipedia.org/wiki/DOT_language DOT_language], Wikipedia
*[http://www.graphviz.org/doc/info/lang.html The DOT language specification]
*[http://www.graphviz.org/doc/info/attrs.html Available attributes]
=== LaTeX ===
*[http://www.tex.ac.uk/cgi-bin/texfaq2html?label=widows Notes on widow and orphan control]
*>[http://www.math.vanderbilt.edu/~schectex/wincd/intro_to_tex.htm Good LaTeX intro]
*[http://www.michaelshell.org/tex/ieeetran/ IEEETran Q&A]
*[http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf Comprehensive list of symbols]
*[ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf Equation/Math guide]
*[http://bib2web.djvuzone.org/bibtex.html bibtex entry formats], djvuzone.org
*[http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/LatexTips.html Latex Tips], Jakob Schiøtz
*[http://latex.mschroeder.net/index_en.php "LaTeX  for newbies"]
*[http://gurmeetsingh.wordpress.com/2008/09/20/latex-tips-n-tricks-for-conference-papers/ Tips and tricks for conference papers], wordpress.com
*[http://www.eng.cam.ac.uk/help/tpl/textprocessing/bibliographies.html University of Cambridge, bibiligraphies], how to put a bibliography at the end of each chapter
*[http://web.reed.edu/cis/help/latex/advanced reed.edu], documents, headers, footers, table of contents, splitting into multiple files etc.
*[http://www.physics.drexel.edu/liki/index.php/LaTeX_Math_Commands Math tricks], Drexel.edu
*Markus Neteler. [http://www.grassbook.org/neteler/highres_pdf.html Creating High Resolution PDF files for book production with Open Source tools]
*[http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ LaTeX Primer]
*[http://web.mit.edu/answers/latex/latex_bibliography.html Bibliographies with latex/bibtex]
*[http://kb.mit.edu/confluence/display/category/LaTeX Latex FAQ], MIT
*[http://www.andy-roberts.net/misc/latex/ Getting to Grips With LaTeX]
*[http://www.math.uiuc.edu/~hildebr/tex/displays.html Equations]
*[[Generating eps files]]
*[http://developer.berlios.de/docman/display_doc.php?docid=800&group_id=3442 algorithmic package manual]
==== Dissertation ====
*[http://math.asu.edu/graduate/Thesis_Template Style files from ASU Math Department]
==== TeXnicCenter ====
*In order to embed Type I fonts and use letter format, these switches were added in [Build]->[Define Output Profiles]->[Postprocessor]->[DviPs], [http://www.acm.org/sigs/publications/sigfaq reference], [http://www.tug.org/mactex/fonts/AboutEmbedding.pdf embedding fonts reference]:
:-<code>-Pdownload35  -P cmz -t letter</code>
==== Embedding Fonts ====
*[http://www.azfonts.net/search.html?name_filter=NimbusSanL Download Nimbus Fonts]
*[http://www.athleticaid.com/yaquinapress/postscript/XPHome_EmbedFonts.html Setup pdf printer to embed fonts]
:Replacing commercial fonts (which don't get embedded into the pdf with open source tools), script:
<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):
if [ "$1 " != " " ]
then
  TARGET=$1
  TARGET_TEMP=$TARGET".font.temp"
    echo
    echo "Executing font conversion $TARGET_STAGE_1 > $TARGET"
    cat ${TARGET} | \
    sed 's+Times-Bold+NimbusSanL-Bold+g' |\
    sed 's+Times-Italic+NimbusSanL-ReguItal+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' \
    > ${TARGET_TEMP}
  mv $TARGET $TARGET".old"
  mv $TARGET_TEMP $TARGET
fi
</code>
=== HTML ===
*[http://www.w3schools.com/tags/default.asp HTML 4.01/XHTML reference page]
*[http://www.hypergurl.com/span.html Span formats (including mouse hover)]
*[http://www.w3schools.com/tags/ref_ascii.asp HTML ASCII quick reference]
*[http://www.w3schools.com/tags/ref_urlencode.asp HTML URL encoding quick reference]
=== Post Script ===
*[http://en.wikibooks.org/wiki/PostScript_FAQ Post Script FAQ]
=== 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]+[left arrow]</code>
:-"Back" and "Forward" buttons can also be added to the toolbar, under navigation, they are referred to as "previous view" and "next view"
== Modeling ==
=== AMPL (Linear Programming) ===
*[http://www.ampl.com/FAQ/index.html AMPL FAQ]
*Robert Fourer, [http://www.google.com/search?q=cache:nQKxqQRX5mIJ:www.ampl.com/REFS/amplmod.ps.gz+ampl+declaring+large+sets&hl=en&ct=clnk&cd=1&gl=us AMPL: "A Mathematical Programming Language"]
*GLPsol command: <code>glpsol --model example.txt --output results.txt</code>
*[http://www.ampl.com/BOOKLETS/amplcplex100userguide.pdf CPLEX with AMPL Users Guide]


== Assembly ==
=== VHDL ===
*> [http://www.xs4all.nl/~smit/asm01001.htm Assembly programming tutorial]
*[http://www.seas.upenn.edu/~ese201/vhdl/vhdl_primer.html VHDL Tutorial], UPenn
*[http://asm.sourceforge.net/resources.html#tutorials Unix assembly programming]
 
*[http://www.cs.uakron.edu/~margush/306/index.html Assembly programming tutor from U Akron]
=== MATLAB ===
*[http://www.techtutorials.info/assembly.html List of assembly tutorials (Linux)]
*[http://www.cc.gatech.edu/classes/AY2002/cs7635_spring/tutorial/ MATLAB quick reference], Georgia Tech
*[http://web.cecs.pdx.edu/~gerry/MATLAB/programming/basics.html MATLAB functions]


== Interfaces ==
== Interfaces ==
*[http://electrosofts.com/links/port_programming.html List of articles on port programming]
*[http://electrosofts.com/links/port_programming.html List of articles on port programming]
== Windows ==
*[http://www.howtogeek.com/howto/windows-7/add-the-quick-launch-bar-to-the-taskbar-in-windows-7/ Bring ''quicklaunch'' back to the ''taskbar'']
== In General ==
*Magic Hex number: 0xDEADBEEF

Latest revision as of 10:43, 19 April 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

  • Good short batch reference
  • 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), script:

# 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): 

if [ "$1 " != " " ]
then
 TARGET=$1
 TARGET_TEMP=$TARGET".font.temp"
   echo
   echo "Executing font conversion $TARGET_STAGE_1 > $TARGET"
   cat ${TARGET} | \
   sed 's+Times-Bold+NimbusSanL-Bold+g' |\
   sed 's+Times-Italic+NimbusSanL-ReguItal+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' \
   > ${TARGET_TEMP}
 mv $TARGET $TARGET".old"
 mv $TARGET_TEMP $TARGET
fi

HTML

Post Script

Portable Document Format (PDF)

-"Back" and "Forward" buttons can also be added to the toolbar, under navigation, they are referred to as "previous view" and "next view"

Modeling

AMPL (Linear Programming)

VHDL

MATLAB

Interfaces

Windows

In General

  • Magic Hex number: 0xDEADBEEF