dracoblue.net

DJson 1.0 released

Today I released the first version of DJson. DracoBlue's DJson is a dynamic file based reader/writer for the pawn language.

[em]Why Djson as name?[/em] Because the saved files are encrypted with JSON (JavaScriptObjectNotation), which is a very light weight encoding for data structures and originally used to describe javascript objects.

Check out the official djson-page!

In djson, open source, pawn by DracoBlue @ 25 Aug 2008 | 56 Words

Change recursive CVS repository information on commanline

You can easily apply a new "Root"-file for a recursive checked out repository structure with the following line (assuming, that you don't have any files called "CVS/Root" except the CVS/Root).

 find . | grep "CVS/Root" | while read LINE; do echo "$LINE:";cp /home/dracoblue/Root $LINE; done

In this example /home/dracoblue/Root holds the updated Root-File and the command line is executed in the directory which you want to change recursively.

In articles, bash, linux, open source by DracoBlue @ 07 Aug 2008 | 74 Words

Launching Acrobat-Reader with Relative Filenames

Today I noticed once again, that texmaker only supports the following command to launch the newly generated .pdf file.

"C:/Program Files/Adobe/Reader 8.0/Reader/AcroRd32.exe" %.pdf

Actually AcrobatReader does not like that, since he won't find the .pdf file, since it is not a absolute path.

To fix that problem I wrote a small .bat-file called runincurrent_dir.bat and put that in my home directory. Contents:

%1 %CD%\%2

Now I put in the line for automatic pdf display the following:

c:\users\jan\run_in_current_dir.bat "C:/Program Files/Adobe/Reader 8.0/Reader/AcroRd32.exe" %.pdf

Hope that helps anyone else expiriencing problems with relative filenames and acrobat reader.

In articles, latex, open source by DracoBlue @ 16 Jul 2008 | 109 Words

preg_match multiple lines

If you try to use preg_match on strings, which do have multiple lines you run into the problems that they actually won't match at all.

This can be easily fixed by adding s-modifier, so:

/\[(code)\](.*?)\[\/code\]/

becomes to

/\[(code)\](.*?)\[\/code\]/s

and works like a charm!

In open source, php by DracoBlue @ 04 Jul 2008 | 54 Words

tcsh

tcsh does some strange things, if you are using variables (in the example h in a one line while loop.

set h = 1; echo $h; while ( $h != 0 ) ; echo "Input please" ; set h = $< ; echo $h ; end ;
while? end
Input please
4
4
1
Input please
5
5
1

In dracoblue.net by DracoBlue @ 03 Jul 2008 | 69 Words

Page 33 - Page 34 - Page 35