Mittwoch, 28. November 2007

BATCH_ Create libraries with valuable Batch subroutines

If you write some Batch subroutines that make common stuff like calculating the string length or testing for a number, you don't want to copy&paste these into each script that needs these. Be cool, there is a very easy solution how you can bundle all of your helper subroutines into one (or even more) files. Just copy them into an empty file, and add the following code at the very first line:
SHIFT /1 & GOTO %~1

That jumps to the label you provided as the first parameter after shifting all remaining parameters one down leaving %0 as it is.

Let's say you saved that file as C:\Windows\lib.cmd. Now you can call any subroutine from another script by issuing
CALL %SystemRoot%\lib.cmd :MY_SUBROUTINE param1 param2 ...

Remember to enable extensions and delayed variable expansion in each of your subroutines when needed - you cannot depend on the "frame" script's setting any more!
:MY_SUBROUTINE
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
... routine here ...
ENDLOCAL
GOTO :EOF

BATCH_ Test a String for Number

Testing a String for a number that can only contain the ciphers 0 to 9 and optionally a prefixed - character can be done with the following subroutine.
:: Checks if the first parameter is a number, that is it only contains the
:: characters 0 to 9 and additionally the minus as the first character.
:: PARAM
:: 1 string to test for number
:: RETURN String "true" if string is a valid number, "false" otherwise
:IS_NUMBER
SETLOCAL
FOR /F "tokens=*" %%A IN ('SET /A %~1 2^>^&1') DO (
    IF "%~1" == "%%A" (
       SET RESULT=true
    ) ELSE (
       SET RESULT=false
    )
)
ENDLOCAL & SET RESULT=%RESULT%
GOTO :EOF
This tests the input string using the SET /A arithmetic extension.
However this test two limits I can think of:
  • As SET /A echoes the error Missing operand. on invalid input, a test against that very string will return true.
  • A number with leading zeros like 007 will not be recognized as a number.
If you cannot live with these limitations, you have to replace this relatively fast solution with two loops doing something like this:
FOR EACH CHARACTER (
    FOR %%A IN (0-9) (
        IF (%%A == CHAR) (
            GOTO :END_INNER
        )
    )
    GOTO:EOF & FAIL
    :END_INNER
)

BATCH_ Redirect special characters into file

ECHOing special characters like german umlauts in Batch or creating files with such in their name does not cause any trouble. However, when redirecting into files
DIR /B *.* > list.txt
these files will be created using the same codepage (or encoding) like the command line. However, as that codepage differs in most cases from the encoding that is used to read that file in external programs or editors, special characters are not being displayed correctly.

Assuming that you are using a standard format for your textfiles, you can switch the encoding before redirection.
FOR /F "tokens=1* delims:" %%A IN ('CHCP') DO (
    SET /A CODEPAGE = %%B 2> NUL
)
CHCP 1252 > NUL
DIR /B *.* > list.txt
CHCP %CODEPAGE% > NUL
CHCP gives you the current codepage, however the output is localized (e.g. Active code page: 850 in English or Aktive Codepage: 850. in German). Therefore the tokens are delimited by the colon, which should work for most languages, I guess.
However, as you can see, the German output is ended with a dot, so that one is removed by converting the token to a number using SET /A. As that expression will work but give you a warning message about a missing operator (caused by the dot), redirection of error messages to NUL is added.

The rest ist simple: switching to standard text codepage 1252, redirecting and switching back to the original codepage.

Dienstag, 27. November 2007

BATCH_ Subroutines in Windows Batch

Since Windows 2000 you can use subroutines (depending on the understanding and definition of "function" and "procedure", one can also refer to them as "procedures", that can manipulate both local and global variables and don't return any value ("void")).

Basically, a subroutine is a number of commands between a label and a GOTO:EOF statement.
:MY_SUBROUTINE
ECHO Called MY_SUBROUTINE and ending now...
GOTO:EOF

GOTO:EOF is often written without a space, as it is used as a special GOTO command: It jumps to the End of File, thus ending the currently executed script.

That is the reason why a subroutine is not called with GOTO :MY_SUBROUTINE, but with
CALL :MY_SUBROUTINE

This executes the current batch AGAIN in the current context, but jumps immediately to the given label. And that is the reason why ending the script at the end of the subroutine - it just ends the execution started through the CALL command.

A subroutine has its own parameters, you don't have access to the "parent" batch parameters unless they were stored in an environment variable.
CALL :MY_SUBROUTINE "param 1" "param 2"
GOTO:EOF

:MY_SUBROUTINE
ECHO The first parameter is %~1.
ECHO The second parameter is %~2.
GOTO:EOF

You can see that there is another GOTO:EOF after the CALL command. You don't want your first subroutine being executed after your script finished, do you? This is the basic structure of a batch script using subroutines:
@ECHO off
REM Documentation here
REM Version 1.0 of 2007/11/11

... preprocessing, setting variables etc ...
... script body ....

GOTO:EOF
REM ############################
REM SUBROUTINES
:MY_SUBROUTINE
... subroutine body
GOTO:EOF


What about the local context I mentioned at the beginning? That does not differ from standard batch scripts:
:MY_SUBROUTINE
SETLOCAL
... local context here ...
ENDLOCAL
GOTO:EOF


As subroutines do not provide a way of returning any value (and, of course, there is no direct way to store the result of an execution in a variable), here is what I do. By convention, I reserve the global variable %RESULT% for storing the result of the last called subroutine that should return a value. You can think of it like putting a value onto a one-element stack.
:MY_SUBROUTINE
SET RESULT=4711
GOTO:EOF

This won't work if using local context within the subroutine, however due to the cmd.exe-nature there is way to preserve a variable after ending the local context:
:MY_SUBROUTINE
SETLOCAL
SET RESULT=4711
ENDLOCAL & SET RESULT=%RESULT%
GOTO:EOF

A little explanation: As the batch reads a full line, expands all variables, parses the line and then finally executes all contained commands in order, the important line looks like this after expansion:
ENDLOCAL & SET RESULT=4711
See, variable preserved and available in global context. Sometimes you want to preserve more than one variable, so you add additional SET statements. But be careful and do not insert a space before the ampersand - that space will contained in your variable!
ENDLOCAL & SET A=%A%& SET B=%B%& SET C=%C%

A little advise at the end: document your subroutines, otherwise you won't know what parameters it takes, what global variables it manipulates or requires or what value it "returns". I use double colons for subroutine documentation.
:: Shortens a string to the given number of characters.
:: PARAMS
:: 1 string to shorten
:: 2 number of characters
:: RESULT String shortened string
:SHSTR
SETLOCAL ENABLEDELAYEDEXPANSION
SET TEMP=%~1
ENDLOCAL & SET RESULT=!TEMP:~0,%~2!
GOTO:EOF

See also this article about handling parameters and variables containing special characters.

Sonntag, 25. November 2007

BATCH_ input parameter with Ampersand

The Ampersand

What is the ampersand? The ampersand (or And-sign, '&') is used for conditinal execution in batch scripts. So ECHO one & ECHO two will give you the output
one
two

The problem with the ampersand is, that it is a special character that can occur in paths and filenames (other characters like >, <, : etc. are not allowed!) passed to batched scripts. Of course, these characters can occur in user input, when reading text files etc, but that's not the point here because I want to focus on the ampersand only.
When it occurs in a batch script parameter, it will be either quoted or escaped:
:: Standard file
C:\>script.cmd file1.txt
:: File with spaces needs quotes
C:\>script.cmd "file 1.txt"
C:\>script.cmd "C:\Documents and Settings\file1.txt"
:: same applies to the ampersand occuring in paths
C:\>script.cmd "C:\files & more\file.txt"
:: but an ampersand itself can be also escaped
C:\>script.cmd files^&more


Batch script parameters

You can refer to parameters to your batch script with %1 to %9. You will get the parameter just as it was entered. You will not "see" the carets (^) of an escaped string. So if the first parameter entered is "C:\files & more\file.txt", an ECHO will give you exactly that phrase:
ECHO My input is %1.
results in
My input is "C:\files & more\file.txt".

You can also assign the parameter's value to an environment variable with the statement SET PARAM=%1. But what can we do about the annoying quotes around the string? The batch allows us multiple parameter substitutions, which all look like %~[op]n. So %~d1 gives us the drive name of the first parameter regarding it as an absolute or relative file path. All substitutions remove the optional surrounding quotes; if you just want to remove the quotes, you use %~1 without any operator.

But if the string contains an escaped ampersand or you remove the surrounding quotes from a string with an ampersand, that character will be treated by the interpretor as the conditional command execution character which will obviously break you script.

Parsing and executing a batch script

The way the batch interpretor works itself through a batch file is very special. In short this looks like this:
  1. Read a line. Round brackets spanning lines count as a single line.
  2. Expand all environment variables and batch script parameters by replacing them through their values. Optional substitution operations can be performed.
  3. Parse the line, identify commands, strings, operators etc.
  4. Perform delayed variable expansion on environment variables if enabled. Optional substitution operations can be performed.
  5. Execute all identified commands in order.
I assume you are already familiar with round brackets and substitution operations, so I will only explain the delayed variable expansion. Variables to be delayed expanded are written with exclamation marks instead of percent signs:
ECHO This %VARIABLE% expands before this !VARIABLE!.
Because the expansion takes place AFTER parsing, all special characters (including ampersand, caret, pipe etc.) will be indirectly escaped. That's why you can use this technique to handle strings with ampersands!
You enable delayed variable expansion with
SETLOCAL ENABLEDELAYEDEXPANSION


Working with Variables

As I told above, parameters with ampersand easily break your script. So you have to either quote or escape your parameters when using them. Just - you cannot escape parameters in a script, that only works for variables! Alright, let's quote - but what if a parameter is already quoted?
I told you above that through parameter substitution you can remove the quotes. With %~1 you are left with an unquoted string possibly containing one ore ampersands waiting to break your script. So ALWAYS use something like
ECHO "This is my first parameter: %~1."
SET PARAM="%~1"
IF "%~1" == "a" ECHO First parameter is a!

Okay, now you have a quoted string - but that sometimes sucks like in the ECHO line, because that command also echoes the quotes.
Aaaahh, yes, I wrote something about substitution operations.
SET STR="%~1"
ECHO This is my parameter: %STR:~1,-1%.
That removes the first and the last character, which are my manually added quotes. But dammit, it's unquoted now which breaks the script again! Hmmm, wait, there was something about "delayed" variable expansion after parsing? Right, that's the way to use unquoted strings WITH ampersands! As the variables are expanded AFTER parsing, special characters won't break your code because they will always appear as strings.
SET STR="%~1"
ECHO This is my parameter: !STR:~1,-1!.
Assignment works as well:
SET STR="%~1"
SET STR=!STR:~1,-1!
An now we got it: The variable STR contains the unquoted input parameter string. So if you want to use that variable, you either have to quote it again or use delayed expansion:
ECHO The variable STR contains the value !STR!.
ECHO "The variable STR contains the value %STR%".

Hmm, but what about when one actually cannot use delayed expansion? For example when using subroutines with local variables of which one should be left after return?
:MY_SUBROUTINE
SETLOCAL
.... assign many variables here etc. ....
ENDLOCAL & SET STR="%STR:"=^"%"& SET STR=!STR:~1,-1!
GOTO :EOF
This special technique to allow both local and global context needs two SET statements (note the missing space between quote and ampersand!!!)? That looks really bad, but is in fact the only clean solution.
However, if you are sure that the only special character contained in that string is the ampersand (e.g. it is an original file path), you can manually escape that string:
ENDLOCAL & SET STR=%STR:&=^&%
That has the same effect like above, but only for the ampersand!

Notes

  • The %0 parameter (storing the script name) can also be placed in a path containing ampersands. So the rules stated above also apply to this parameter.
  • Avoid using %*. It merges all parameters into one single string. That means, it can contain quoted parameters, so you cannot quote %*, and it can contain unquoted, escaped parameters, so you must use quotes. You see, there is no way handling it correctly, so you should use the shift command instead.
  • A common IF expression is
    IF "%TEST%" == "abcd" GOTO :DO_IT
    This works unless the variable contains double quotes. You could use other characters like [] to surround your variables in case they are empty, however this would still break in case of an ampersand. So here, you can use two equitable construtions: escape the quotes or use delayed variable expansion:
    IF "%TEST:"=^"%" == "abcd" GOTO :DO_IT
    IF "!TEST!" == "abcd" GOTO :DO_IT
  • As for FOR constructs, you should be very careful and use delayed expansion and quotation whenever possible. Sometimes you have to work the right solution out by trial and error.

BATCH_ Strip surrounding double quotes from string

Testing a batch string for surrounding quotes is quite annoying. Here is a solution for Windows 2000 and newer:
:: %T% contains the test-string
IF "%T:~0,1%%T:~0,1%" == """" IF "%T:~-1%%T:~-1%" == """" (
  SET T=%T:~1,-1%
)
You can see, I am using the first respectively the last character twice, because a single double quote would break the IF. I'll explain it with this little example:
T keeps the string "Hello World!" with the surrounding quotes. The (simplified) test

IF %T:~0,1% == " (...)
would expand to
IF " == " (...)
which will be parsed as
IF <string>
with the string being " == " (...). Cannot work, huh?

BATCH_ String length

This little subroutine calculates the string length in Batch (cmd.exe) using the divide and conquer algorithm. It starts with the maximum string length possible under Windows XP (4191, NT and 2000 are limited to 2047, see http://support.microsoft.com/kb/830473). It divides the string in two equal halfs and tests if the character in the middle exists. If not, does that again with the left half, if it does, stores the length including that character and starts of for the rest of the string.
:: Returns the string length.
:: PARAM
:: 1 String string to get length of
:: RETURN Integer string length
:STRLEN
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET STR="%~1"& SET STR=!STR:~1,-1!
SET LEN=0
:: Max string length is 8191, see http://support.microsoft.com/kb/830473
SET POS=8192
:STRLEN_LOOP
SET /A POS /= 2
IF NOT "!STR!" == "" (
    IF NOT "!STR:~%POS%,1!" == "" (
        SET /A LEN += %POS% + 1
        :: work on rest, that is after POS+1
        SET STR=!STR:~%POS%!
        SET STR=!STR:~1!
    )
    GOTO :STRLEN_LOOP
)
ENDLOCAL & SET RESULT=%LEN%
GOTO :EOF
I have to double check the string because substring extraction %STR:~x,y% on an empty string leaves you with ~x,y. However, extracting a substring after the end of a non-empty string works as expected and returns the empty string.

I did some performance testing, and though jumping to labels is heavily dependent of script layout and size, 100 calculations of a string no matter what length lasted about 1 sec and 300 ms on an AMD Athlon XP 3200+.

If you are using only very short strings, you can loop through each character and test it for existence:
:: Calculates the string length of the first parameter.
:: PARAM
:: 1 String to return length of
:: RESULT Integer length of tring
:STRLEN
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET I=-1
SET T=%~1
:STRLEN_LOOP
SET /A I += 1
IF NOT "!T!" == "" IF NOT "!T!" == "!T:~0,%I%!" (
    GOTO :STRLEN_LOOP
)
ENDLOCAL & SET RESULT=%I%
GOTO :EOF
However, the cost scales with the string length. Compared with the first solution, it is faster (less than 1 second for 100 tests) for strings shorter than 10 characters, and for 16 characters takes exactly the same amount of time.

Freitag, 23. November 2007

TECH_ Default-Action für Folder im Explorer wiederherstellen

Mein Ansatz: Ich wollte eine neue "File type action" für den Dateityp "Ordner" anlegen, um alle Audioinhalte per Script automatisch zu recodieren und auf die Speicherkarte meines Handys zu kopieren.

Meine Vorgehensweise: Tools > Folder Options... öffnen und auf den Reiter "File Types" wechseln. Dort gibt es nun "File Folder" und "Folder"... hmmmm, welcher Typ ist nun der richtige? In der Registry gibt findet man unter HKEY_CLASSES_ROOT die Keys "Directory" (für "File Folder") und "Folder" (für, genau, "Folder"). Hilft aber jetzt auch nicht viel weiter, zwei Namen für das Gleiche.
Ich fügte also bei "File Folder" eine neue Action hinzu. Anschließend war für einen Ordner die Default-Action "Search" (zu finden als "find"-Action bei "File Folder"), bei einem Doppelklick oder Enter öffnet sich also das Suchen-Fenster.

Die Lösung: Bei "File Folder" darf kein zusätzlicher Eintrag neben "search" existieren, andernfalls überschreiben die Actions dieses Typs sämtliche Actions des "Folder"-Typs. Dementsprechend lassen sich auch nicht mehr "open" und "explore" von "Folder" als default auswählen.
Also ist "File Folder" wieder zu bereinigen. Löschen und bearbeiten der Einträge geht nur nicht. Also Registry öffnen, zu HKEY_CLASSES_ROOT/Directory/shell navigieren und darunter alle Keys bis auf "find" löschen. Gegebenenfalls noch einmal zu den Folder Actions im Explorer wechseln und "explore" von "Folder" als default setzen.

Für die Zukunft: Benutzerdefinierte Actions nur bei "Folder" anlegen, niemals bei "File Folder".

Mittwoch, 29. August 2007

HOWTO_ XML-Editor in Eclipse installieren

Funktioniert leider nicht...
Nach mehrfachen Anlaufschwierigkeiten stelle ich jetzt hier eine Kurzanleitung ins Netz, damit auch ich endlich einen Plan habe, wie ich schnell und möglichst unkompliziert den XML-Editor in Eclipse installiert bekomme.

Update-Sites anlegen

Über Help > Software Updates > Find and install... öffnet man den "Install/Update Manager" und wählt Search for new features to install. Dort ergänzt man die drei folgenden Remote sites:
  • Eclipse WTP
    http://download.eclipse.org/webtools/updates/
  • Eclipse EMF
    http://download.eclipse.org/modeling/emf/updates/site.xml
  • Eclipse GEF
    http://download.eclipse.org/tools/gef/update-site/releases/site.xml
Mit Finish geht es weiter.

Benötigte Pakete auswählen

Am einfachsten lassen sich die Abhängigkeiten der Reihe nach auflösen. Eine Übersicht über momentan fehlende Pakete liefert der Button Error Details....
  • Eclipse WTP/Web Tools Platform (WTP)/Eclipse XML Editors and Tools 2.0.0, benötigt
    • Eclipse WTP/Enabling Features/WST Common UI 2.0.0
    • Eclipse EMF/EMF SDK/Eclipse Modeling Framework (EMF) - org.eclipse.emf.common 2.3.0
    • Eclipse EMF/EMF SDK/Eclipse Modeling Framework (EMF) - org.eclipse.emf.ecore 2.3.0
    • Eclipse EMF/EMF SDK/Eclipse Modeling Framework (EMF) - org.eclipse.emf.ecore.edit 2.3.0, benötigt
      • Eclipse EMF/EMF SDK/Eclipse Modeling Framework (EMF) - org.eclipse.emf.edit 2.3.0
    • Eclipse EMF/EMF SDK/Eclipse Modeling Framework (EMF) - org.eclipse.emf.edit.ui 2.3.0, benötigt
      • Eclipse EMF/EMF SDK/Eclipse Modeling Framework (EMF) - org.eclipse.emf.common.ui 2.3.0
    • Eclipse EMF/EMF SDK/XML Schema Infoset Model (XSD) - org.eclipse.xsd 2.3.0
    • Eclipse EMF/EMF SDK/XML Schema Infoset Model (XSD) - org.eclipse.xsd.edit 2.3.0
    • Eclipse GEF/R3.3/Graphical Editing Framework 3.3.0
Und nun nur noch installieren - und das dauert eine Weile...

Donnerstag, 16. August 2007

TECH_ Zeilenumbruch in Bash-Variablen speichern

Um einen Zeilenumbruch in eine Bashvariable zu bekommen, muss man bisschen tricksen:
#> var=`echo -e "a\nb"`
#> var=${var:1:1}
#> echo "$var"


#>
Wie man sieht, gibt echo "$var" zwei Zeilenumbrüche aus, der erste steht in der Variablen, der zweite kommt von echo selbst.

Steht ${var:1:1} zum Herausschneiden des Substring nicht zur Verfügung (etwa in einer alten Korn-Shell), kann man diesen Code verwenden:
#> var=${var#a}
#> var=${var%b}
Teilweise gibt es auch den Switch -e bei echo nicht, dann gibt echo "a\nb" bereits a und b in separaten Zeilen aus.

Samstag, 23. Juni 2007

HOWTO_ Entwickeln einer ersten qooxdoo-Applikation

Die Schritte, um eine erste qooxdoo-Applikation zu entwickeln, sind ein wenig komplex. Insbesondere, da die Dokumentation zwar offensichtlich umfangreich ist, mir aber nicht auf die Schnelle klar wurde, was ich nun genau zu tun habe.

Schritt 1 - JSEclipse-Plugin installieren

Die in meinen Augen beste IDE ist nach wie vor Eclipse, da sie nicht nur auf allen Systemen - insbesondere Mac OS X und Windows XP - läuft, sondern auch noch kostenlos ist und für die unterschiedlichsten Sprachen wie Java, PHP, C++ und eben JavaScript verwendet werden kann.
Nach meinen Recherchen ist wohl JSEclipse von Adobe Labs das momentan beste Plugin für erweitere JavaScript-Entwicklung mit Eclipse.

Die Installation ist denkbar einfach: Eclipse als Administrator starten, zu Help > Software Updates > Find and Install... durchklicken und Search for new features to install auswählen. Dann die neue Remote Site JSEclipse from Adobe Labs mit der URL http://download.macromedia.com/pub/labs/jseclipse/autoinstall anlegen, Häkchen davor setzen und Finish wählen. Anschließend wird die neueste JSEclipse-Version zur Installation angeboten.


Schritt 2 - Compilierungsumgebung installieren

Laut der Anforderungen muss unter Mac OS X und unter Windows eine entsprechende Umgebung einspielt werden. Da sich diese ggfls. ändern können, verweise ich hier nur auf das jeweils aktuellste Manual.


Schritt 3 - qooxdoo installieren

Auf der Downloadseite das SDK herunterladen und in das Zielverzeichnis, etwa C:\Programme\Entwicklung\qooxdoo entpacken. Dieses Verzeichnis kann später mit einer neueren qooxdoo-Version upgedated werden; das eigentlich Projekt landet woanders.
Auf der Konsole (unter Windows cygwin benutzen) in das Verzeichnis frontend/framework wechseln, mit mkdir .cache das Cacheverzeichnis anlegen. Dieses Verzeichnis muss nun noch Schreibrechte für den Standardbenutzer erhalten, etwa mit chmod 777 .cache oder über den Eingenschaften-Dialog von Windows.


Schritt 4 - Eclipse Projekt anlegen

Es wird ein Standard-Projekt angelegt, etwa im Workspace-Verzeichnis (default) oder anderswo auf der lokalen Festplatte.
Die Datei qooxdoo-0.7-skeleton.tar.gz aus <qooxdoo-Installationsverzeichnis>/frontend/application wird nun in ein Verzeichnis entpackt. Dieses sollte weder im qooxdoo-Installationsverzeichnis noch im Eclipse-Projekt liegen, denn hier landen die eigentlichen Dateien während der Entwicklung. Daher am Besten einen Ort verwenden, wo es täglich gesichert wird; oder gleich mit einer Versionsverwaltung wie Subversion (SVN) verwalten.
Im Projekt einen neuen Ordner anlegen, der auf das class-Verzeichnis des Skeleton verweist.

Schritt 5 - Makefile anpassen

Das Makefile muss nun noch an die qooxdoo-Installation angepasst werden. Zwei Variablen sind unbedingt zu setzen:
QOOXDOO_PATH wird beim Compilieren verwendet und benötigt den Pfad zur qooxdoo-Installation im Dateisystem. Dieser kann entweder relativ zum Makefile sein, oder absolut. In Cygwin muss bei einem absoluten Pfad mit /cygdrive/c/ das Laufwerk (in diesem Fall C:) angegeben werden.
QOOXDOO_URI verweist auf die qooxdoo-Libraries, wie sie der Browser beim Anzeigen der Applikation benötigt. Auch hier kann wieder ein relativer oder absoluter Pfad angegeben werden, beispielsweise http://www.mysite.com/qooxdoo oder /qooxdoo oder ../qooxdoo. Eine Besonderheit gilt beim Öffnen vom Dateisystem unter Windows, also über file://-Notation, wenn qooxdoo auf einem anderen Laufwerk liegt als die Applikation. In diesem Falle muss als URI file://C:/Program%20Files/Entwicklung/qooxdoo bzw der entsprechende Pfad angegeben werden. Ältere Firefox-Versionen benötigen file:///, also drei Slashes.


Schritt 6 - Compilieren

In das Verzeichnis wechseln, in welchem die Datei Makefile liegt und make eingeben.
Anschließend kann im Browser die Datei index.html aus dem source-Verzeichnis angezeigt werden. Sie sollte einen klickbaren Button mit einem Bild und einem Tooltip anzeigen.

Sonntag, 3. Juni 2007

TECH_ Adblock Preferences using regular expressions

My blocked domains for Adblock, ordered by TLD. These include ad providers, website statistics and some of the most annoying pornographic ads like adultfriendfinder.com. Additionally I block the most-used patterns in URLs "adserv", "linkads", "banner" etc.

Adblock-settings (txt, 1 KB)

Reflog

Informationstechnische Howtos, Hinweise und Merkwürdiges

Batchlib v1.0 2008-03-29

Aktuelle Beiträge

HOWTO_ O2 DSL Surf &...
Der O2 DSL Surf & Phone-Router ist für die alleinige...
cypressor - 12. Feb, 19:57
Uptweak Windows XP Home...
There are a lot of annoying limitations in Windows...
cypressor - 9. Okt, 19:30
BATCHLIB_ Batchlib package...
Download Batchlib package v1.0 (5 KB zip file) What...
cypressor - 29. Mär, 19:10
BATCHLIB_ Batchlib library...
The batchlib library string.cmd is part of the batchlib...
cypressor - 29. Mär, 18:10

Homepage Ticker

Links

Status

Online seit 6584 Tagen
Zuletzt aktualisiert: 28. Jun, 11:32
RSS XML 1.0 Button-Get-Firefox

batch
batchlib
howto
tech
video
Profil
Abmelden
Weblog abonnieren