Notka.eu - short notes

Hello visitor

This site is under development - meaning its content will be changing as the time passes.
At the moment you can visit my blog - It is dedicated to web development using the following tools/techiques:

  • html, css, javascript (particulary YUI library)
  • php, perl, mysql
  • Drupal CMF
  • image manipulation and processing
  • RIA, SOA

Imagemagick and perl example

Digging in my old scripts I have found something like this. It uses Image::Magic module to produce resized version of images (+thumbnail) it has found in script directory - you must upload them on server in the place. In order to change execution parameters you must edit the following script variables (I know - ugly way): $im (subdir where output images are put), $width, $height and $small_size (width or height of thumbnail, depends which one is greater).

Building Tesseract Ocr from SVN on Ubuntu Oneric

  1. Install Leptonica from source (version: 1.68 at this moment), in the following steps:
    • sudo apt-get install autoconf automake libtool libleptonica libleptonica-dev libpng12-dev libjpeg62-dev libtiff4-dev
      Notice: libpng12-dev, libjpeg62-dev, libtiff4-dev are needed if you want Leptonica (and of course Tesseract) to be compiled with

Some MySQL SQL

SELECT @rownum:=@rownum+1, id FROM (SELECT @rownum:=0) r, some_table

For each 'id' we produce corresponding row number. However...., SQL standard doesn't quarantee that records will be returned in order they were added. You may get right results form this query (especially when there are only a few records added) but it doesn't mean it will always work as expected. This query is wrong one. So what about ...

add-edit-input : My new project on GitHub

It's the new Era of web development and my project presents some new concepts.
It's YUI3 based browser widget and server-side php/mysql back-end you can "build from blocks".

Example:
http://notka.eu/pub/add-edit-input/

Link:
https://github.com/d-adamkiewicz/add-edit-input

YUI3 Snippets using JSFiddle.net

search2 - MS Windows command line utility written in python

Recently I wrote python script (and created project on github),
- its description from README file:

"this is multipurpose MS Windows command line utility (Python 3 script)
which needs at least two parameters: file pattern and search dir
it always scans 'search_dir' directory and saves list of full
pathnames that matches the pattern to output file
it also can:
- copy
- move
files of given pattern preserving original directory tree

Python and pyTenjin templating engine

Some time ago I interested in python because of xml.etree.ElementTree module which is very good tool if you want to read and modify XML files.
Later I discovered yaml module which is simple and effective tool for manipulation of YAML files.

Recently I needed to put some values fetched from YAML files into html pages - I recalled myself plTenjin templating engine I've used in perl and the fact that there is its python version - pyTenjin. It's very fast templating engine look: tenjin

TimeControler (RIA)

TimeControler is a Rich Internet (Intranet) Application I wrote two years ago.
You can check it out here http://www.koktail.net/tc-0.9.4
Here http://timecontroler.sourceforge.net you will find some information about it.

Using YUI2 Element module to handle additional state of html elements on the page - advanced example

Advanced example is a page that uses YUI Element in much more sophisticated way than I described in my previous post
It is aimed to be prototype for dynamic script that manipulates database data using XHR script calls.
I use this logic in real world application - it is quite useful in a case you need to add new record copying and modifying data of existing ones.

Syndicate content