Artikel in Kategorie "Programmierung"

Using VIm’s „Negative Lookahead“ to Delete All Lines NOT Containing a Pattern

UPDATE: Please note that „bw1“ has notified me of a much simpler solution than what is described here; please see „Using VIm’s „:v“ Command to Delete All Lines NOT Containing a Pattern„ Some statements have been struck through in the article below because they are false. I want to delete all lines in the current […]

Web-MP3-Player with HTML5, Flash and Playlist Support

About This project provides a JavaScript constructor MyPlayer({…options…}) that can be used to embed lists of audio files as read from an index document or an M3U into a web document. They will be displayed in a playback GUI with a playlist that can optionally be filled from the „title“ and „artist“ values of the […]

WordPress: Eigene Übersetzungen in Thematic-Child-Themes

Ich habe einige deutschsprachige Textbausteine in meinem Thematic-Child-Theme „linuxfoo“ angepasst. Dazu benutze ich eine Datei mit eigenen Übersetzungen auf Basis der „de_DE.po“ in „Thematic“ selbst und übersetze diese mit dem Gettext-Werkzeug „msgfmt“. Das Verfahren wird nachfolgend im Einzelnen beschrieben.

An OpenOffice/LibreOffice Macro to Colorize Internal References

Since I found no way to assign a character style to all „reference“ text fields of a document, to, for example have them colorized blue (indicating that they are links to some other place in the document) I had to write the following OOo BASIC macro to colorize them on the entire document Sub ColorizeInternalReferences […]

 Thumbnails aus allen Bildern im aktuellen Verzeichnis …

… erstellen und daraus HTML mit einer 3-spaltigen Tabelle machen.

An Introduction to the VI Text Editor

A Google/YouTube Series of Screencasts about VI (classic version).

Geometrie erzwingen und EXIF-Orientation korrekt anwenden mit „convert -resize“

Nach so vielen Jahren tritt immer noch ein Feature von „convert“ zutage, das ich nicht gekannt habe, und bei dem ich mich frage, wie das überhaupt sein kann. Ich musste ein Batch-Skript mit ImageMagick prototypen, das nebst anderem Bilder auf eine vorgegebene Größe skalieren kann. Es seien also folgende Eingaben gegeben: Pixmap „image_in“: das originale […]

Array-Arithmetik in PHP

Wirklich komisch finde ich das Ergebnis einer „Addition von Arrays“ in PHP. <?php $a = array(101,20,31); $b = array(19,42,300,101); $c = $a + $b; $d = array_merge($a,$b); echo ‚[a=(‚.implode(‚,‘,$a).‘)] + ‚. ‚[b=(‚.implode(‚,‘,$b).‘)] = ‚. “.“\n“; echo ‚array_merge(a,b) = ‚. ‚[d=(‚.implode(‚,‘,$d).‘)]‘.“\n“; ?>