Hlavní stránka |
English main
Computers / Počítače
Last change: May 15, 2005 AD
[CZ] české popisky jsou
je bílé
[EN] English texts are green
Index
- Linux / Unix
- Windows
- Programming
- Other
- Unfinished / Nedokončené ("črty")
- Emacs
, čeština a Windows [CZ]+[EN] (pro aktuálnější a lepší verzi viz Wokna)
- Projekt
psavec
- návrh na vylepšení textového
editoru [CZ]
On this page
How to program in assembly using Borland C++ Builder.
I only know how to do it if the assembly code implements a function that is
called by the C or C++ main function.
1. Create a new project
File->New, on the "New" tab select "Console Wizard",
when a dialog appears, press OK
Above main() method, insert (in the .cpp unit):
extern "C" float MySubroutine(float Arg1,float Arg2);
Write in the main() something like this (to call the assembly part):
float result = MySubroutine(10,15);
2. Add the assembly source
Assume you have an assembly source myfile.asm, that is as follows:
586p
model flat
locals
.DATA
.CODE
PUBLIC C MySubroutine
MySubroutine PROC C Arg1:DWORD, Arg2:DWORD
... YOUR CODE HERE ...
fld Arg1
fmul Arg2
ret
ENDP
END
Project->Add to project , find myfile.asm (change the
mask from .c/.cpp to .asm), add it.
3. Voilá, you can compile it!
Print title of a page (notice that we need two escape slashes):
#!/bin/sh
FILE="myfile.html"
TITLE=`
perl - <<EOF
use HTML::TokeParser;
\\$p = HTML::TokeParser->new("$FILE") || die "Can't open: \\$!";
if (\\$p->get_tag("title")) {
my \\$title = \\$p->get_trimmed_text;
print "\\$title";
}
EOF
`
echo "Title is: $TITLE"
Print a table of content:
#!/bin/sh
# NOTE: we need to escape '$' for Perl variables
echo 'Usage: generate_toc <filename>';
FILE="$1"
# Generate + redirect output into the file itself (rewrite it)
perl - > "$FILE" <<EOF
use HTML::Toc; use HTML::TocInsertor;
my \$toc = HTML::Toc->new();
#Set what elements to use and their level starting with 1
\$toc->setOptions({
'tokenToToc' => [{
'level' => 1,
'tokenBegin' => '<h2>'
}, {
'level' => 2,
'tokenBegin' => '<h3>'
}]
});
my \$tocInsertor = HTML::TocInsertor->new();
\$tocInsertor->insertIntoFile(\$toc, "$FILE");
EOF
***
Perl notes
- Is a module installed? $ perl -MModule_name -e 1
- What modules are installed: $ perldoc perllocal (see CPAN
FAQ)
- Update the library search path (@INC) - type in your Perl script:
use lib '/some/new/library/directory'; (more)
OR use lib qw(/path/to/module); (from CPAN FAQ)
- Install a module
- Automatic install from CPAN (if you've got the module Cpan):
$ perl -MCPAN -e shell #find and configure the module
cpan> install <module>
OR
$ perl -MCPAN -e 'install HTML::Parser'
- .
C :
|
if (myvar == 2 && 1) { printf("true"); } else {
printf("is"); printf("false"); } |
Lisp :
|
(if (and (= myvar 2)
t) ; 't' == true == '1' in
C
(print "true") ; then-caluse
(progn (print "is") (print "false")) ; else-clause
) ; ('progn' creates 1 form (block in C) from a set of
forms) |
- Check a variable is defined (sometimes also set): if(
(typeof myVAR)=="undefined" ) alert("myVAR undefined!");
- Check a function is defined: if(self.myFuncName) alert
("Is defined!");
- Define a class (implicit declaration): var point = { x: 0,
func: myFunction }; point.x += 5;
- When using JavaScript in href="javascript:..." it must not
return any value; if it does use the operator void to suppres
it.
- Remove a style you set:
document.getElementById('myElementID').removeAttribute('style');
Generate table of content from H2 and H3 elements.
#!/bin/usr/perl
$file = 'disman.html';
use HTML::Toc;
use HTML::TocInsertor;
my $toc = HTML::Toc->new();
#Set what elements to use and their level starting with 1
$toc->setOptions({
'tokenToToc' => [{
'level' => 1,
'tokenBegin' => '<h2>'
}, {
'level' => 2,
'tokenBegin' => '<h3>'
}]
});
my $tocInsertor = HTML::TocInsertor->new();
$tocInsertor->insertIntoFile($toc, $file);
PEAR: Manual install example
Let's install HTML parser XML_HTMLSax if we cannot
use the pear install utility.
Assume our php script will be in C:\my\example\path.
Unpack the parser's files [and PEAR.php from the package PEAR] and save them
as follows:
- C:\my\example\path\ is the home of your script using the parser;
- C:\my\example\path\XML\XML_HTMLSax.php
- C:\my\example\path\XML\HTMLSax\XML_HTMLSax_Decorators.php
- C:\my\example\path\XML\XML_HTMLSax_States.php
- [C:\my\example\path\XML\PEAR.php] (if PEAR not installed)
<?php
ini_set("include_path", 'C:\my\example\path' . PATH_SEPARATOR
.ini_get("include_path"));
//OR replace 'C:\my\example\path' by getcwd() (returns the script's
directory)
require_once "XML/XML_HTMLSax.php";
?>
Various PHP notes
- No errors are shown on the page, only an empty html page
- Solution - in php.ini add/rewrite:
display_errors = on
Czech in TeX
Declare either \usepackage[czech]{babel} if you use the package babel or
\usepackage{czech} and process by [pdf]cslatex otherwise. It's better not to
use babel and [pdf]cslatex together.
TeX Links
References for TeX
and Friends
Index of links
Web development
- Color codes in HTML
- HTML Help promotes "the creation
of non-browser specific, non-resolution specific, creative and
informative sites that are accessible to all users worldwide" (articles,
links to tools, html/css validation ...)
- W3Schools Full Web Building
Tutorials - All Free (CSS, .js, (X)HTML, ASP, PHP, SQL, SMILE ... ...
...)
- Viewable with Any
Browser Campaign - advices to make your web viewable by any browser,
listed differences ...
- W3C validator (HTML,CSS,Link
Checker), CSE HTML
Validator
- Freehosting Info
[CZ](spec.on
PHP+MySQL)-užitečné
- Making table-like layout with
styles
- Composing Good HTML
- XML
tutorial(sun.com)
- MathML - W3C
instructions for displaying math formulas (MathML homepage)
- Add a site icon to your web (for address bar and bookmarks):
- Anti-spam mailto address
encoder
- WEB TOOLS (for web development)
- HTML Preprocessors: The Dolt (GPL; Perl;
only flat directory structure), PPWIZARD
(freeware; Unix,Win,...; powerful but seems not to be easily added to
existing pages), G-Cows (GPL;
web content management; Unix; generates Makefile), Youhp3 (GPL, C, Unix; this
one I like most (powerful, easy to add to existing pages); processes
only a single file), htp
(freeware, Win+Unix+?, site management, commands in special tags, 2nd
best I saw). My requirements: 0) Free. 1) runs under Windows and
Linux (=>Perl, Java, binaries for both, Cygwin); 2) Easy to embed
in existing pages (=>don't need to be rewritten <=> no
existing text is interpreted as a command for the preprocessor); 3)
Support for managment of a set of pages (a whole web). MS FrontPage
has a feature to include a page in another (must be html and only the
body part is included): Insert->Component->Include Page.
- CMS Review - review of
Content Management Systems (both proprietary/free; see WYSIWYG Editors)
- TTW WYSIWYG Editors
Review (Through The Web editors for content management)
- Drupal CMS - an open-source
platform and content management system for building dynamic web
sites
- Automatic TOC generation (TOC = table of contents):
- Perl: a) Modules: HTML::GenToc + a
script using it, HTML::Toc
(seems to be indeed powerful and still easy to use; see note). b) Scripts: htmltoc
(a bit crappy),
ExplorerIndex - indexes directories and files =>
JavaScript tree control + cookies.
- Executable: HTMLDOC (Windows +
source).
- JavaScript: dynamic TOC 1
by QuirksMode and dynamic TOC 2 +
article by Mishoo.
- NICE DESIGN: kryogenix.org
(mouse over left-side icons), Outer-Court
(irregular shapes), Mozilla ...
(content+left menu,DIVs,menu defined under content), phpBB, binarycloud,
- phpWebThings and phpDBform
Creator - libraries and modules to facilitate creating web pages with
forms linked to MySQL/PostgreSQL DB, forums, login, news etc. (docs)
- 1041
Best PHP Pages
- Webguru.cz -
články, zvl. o PHP
- Content Management Systems (Redakční systmy): PHPNuke, cz: phpRS (+ je jednoduchost).
- Phorum.org - PHP forums above
MySQL/PostgreSQL
- phpBB - bulletin board system above
MySQL/PostgreSQL/MS SQL/MS Access
- binarycloud (docs) - a web application
platform for php, extensible component based sys., XML config.; seems to
be very interesting and sophisticated; LGPL license (r2).
- ---
- PEAR :: The PHP Extension and
Application Repository; see a manual
install example.
- PHP Classes
Repository (a mirror, see also the home site)
- CLASSES: HTML parser XML_HTMLSax, Antonio's
Generic Parser (define your own
rules/grammar), MixedEval
by J. Dickinson (parse a string containing a mixture of php and html,
eval php & display html), Metabase (at
freshmeat too; DBMS
independent access and management of
databases;mssql,postgres,mysql,odbc,...), phpSecurityAdmin
(manage access; uses Metabase)
- ---
- phpPatterns() - articles,
...
ASP
Sources &
tutoriaux pour C/C++/Java/JavaScript/PHP/ASP/VB/Flash/Assembleur/...:
vois "Autres languages" a droit).
- Java
- C++/C
- Assembly
- Perl
- Other
See also Wokna
and UNIX/Linux Applications
.
See Freshmeat (e.g. the
category Scientific/Engineering)
Various tools, applications
etc.
- FOR PROGRAMMERS: free installer for Windows
programms (Inno Setup); a graphical front-end for it.
- Squeak (free) - prototyping tool
based on Smaltalk (visual manipulation ...)
- irssi - an IRC client, it was
highly recommanded to me
- Licq - another ICQ clon (in
C++)
- netbeans - see few lines above, in 'Java' links
- TeXmacs - free
scientific text editor inspired by TeX and Emacs (wysiwyg!)
- DOCUMENTATION tools ----------------------
- List of
tools for documentation generation from commented source codes at
Doxygen
- Doxygen - document generating
tool for C++/C/Java/..., seems to be good
- HTMLToHlp
converts HTML files (perhaps javadoc documentation) into WinHELP
format. Free for non-commercial use.
- gsar
literally find&replace in multile files (Win+Linux, free, command
line; not line-oriented as grep)
- RegExp find&replace in multile files ------------------
- Blender - open source 3D
graphics creation suite, also for creating games
- Maxima - a GPL computer
algebra system (Emacs mode Imaxima.el available)
- Octave - free Matlab under
Linux
- A Compact Guide to Lex & Yacc -
lexical analyzer & parser generation tools
- STATISTICS
- OpenStat -
a free-ware statistics program, written for the behavioural sciences.
It is very SPSS-like in its "feel" and in the statistical commands.
(freeware, Linux+Win)
- MacAnova - A
Program for Statistical Analysis and Matrix Algebra (Linux/Win/Mac).
Command line.
- R Project: "R is a language
and environment for statistical computing and graphics", recommended
by many people. Some GUI. (GPL; Linux/Win/Mac)
- GNU PSPP -
statistical analysis of sampled data; interprets commands in the SPSS
language and produces tabular output in ASCII, HTML, or .ps. No GUI?
(Linux)
- Eclipse (includes Java IDE)
plus: CDT (C/C++ Development
Tools), GEF (Graphical Editing
Framework), Hyades
(Automated Software Quality Evaluation framework), EMF (Eclipse Modeling Framework +
Java Code Generation), VE
(Visual Editor Project: GUI building tools for Eclipse, so far for
Swing), UML2 (EMF-based UML
2.0 Metamodel Implementation). Viz článek o Eclipse na root.cz.
(Linux+Win+Mac)
- PROBLEMS AND ALGORITHMS -----------------------------------
- COIN-OR: COmputational
INfrastructure for Operations Research - open source for the
operations research community
Linux tools, application etc.
(some available also under Windows)
- DOSEMU - MS-DOS emulator for
Linux
- MPlayer - movie player
for Linux
- ML - a
powerful mail client & processing system for unix systems
- Lyx - word processor, a front-end for
LaTeX (other interesting links)
- Apache Java open source
server
Find & Download Software
COMMERCIAL
----------------------------------------------------------------------
- ObjectiF
- SW project design and implementation tool with support for
collaboration. It's used for: modeling (UML), prototyping, collaboration,
code generation (C++, Java, VB etc.), documentation ... . The component
architecture is supported.
Linux and UNIX
- Info
- Journals
- X Window System
- Desktop managers etc.
- Find & Download Software: see above
- Various
- AWK tutorial - a
text-processing programming language
- Annoyances - Do you have
Windows? Hopefully this site will help you to survive.
On-line manualy, ucebnice aj. (On-line tutorials
etc.)
- WhatIS - Information Technology
Glossary (find out how printer works ...)
- xkernel - environment
for simulating computer networks
- MS Access:
- Tutorials for
beginners for the world of computers (elementary computer security,
how a PC works ...)
- tutorials at sgi.felk.cvut
- CGI(cz), HTML specif., HTTP(cz), VRML, Apache, PHP, TeX ...
- Donsez courses
(French; Java, UNIX ....; lecture slides in .pdf)
- William Stallings books
homepage (useful links and more)
- Computer Hope - "free
computer help" - find what you need to know about hw (install...)
- HW
HOWTOs and tutorials at Google
- PC Guide - "Comprehensive PC
hardware reference, troubleshooting, optimization and procedures"
- BRaU PC - building,
reparing and upgrading PC
- Algorithms
- an extensive collection of links
- SW
Design - links related to the design of software (UML, analysis, OO
methods and more)
- Tutorial on dynamic
programming (a brief one)
- Dictionary of algorithms and
data structures
- The Algorithm Design
Manual - excerpts and links to implementations.
- Mathematical
Programming Glossary
- Cognitive
science lecture notes: brief overviews - heuristic search, logic,
theorem proving et.
- DBs and
AI lecture notes (quite nice) - Prolog, knowledge representation,
expert systems, search, natural language processing, uncertainty
- Stochastic
search and evaluation methods ... - a thesis
- Operating system
lectures (ppt, pdf): processes, synchronization, kernel, scheduling,
deadlocks, physical and virtual memory, file systems, I/O, security
...
- HEURISTIC SEARCH -------------------------------------------------
- Global
Optimization Software links (public domain & commercial)
- Greenberg's
Optimization links: group theory, GA, integer programming, algorithm
theory etc., pretty good
- Metaheuristic
I.C. papers 2001 (Metaheuristic International Conference) - Tabu
Search, GA and many more, over 40 papers.
- TABU SEARCH (TS) & TRAVELING SALESMAN (TSP)etc.
- J.W.
Barnes' papers on TS, Group Theory TS, Traveling Salesman Problem
(TSP) and more.
- Databases
- slides (pdf,ps) for the book Database Management Systems by Raghu
Ramakrishnan, 1st edition
- FSA & REGULAR EXPRESSIONS ------------------------------
- FSA Toolkit
(in Prolog||binaries): RegExp->FSA, NFA->DFA, minimization, C code
generation ... .
Jakub Holý 2002AD