Archive

Archive for the ‘Software Development’ Category

Simplified DES (S-DES) file encryption implementation in C

May 8th, 2009 No comments
Simplified DES

Simplified DES

This encryption algorithm is not secure at all, in fact it was made for educational purposes. It uses a 10-bit key that can be quickly broken by a brute force attack. But, who knows, it may be good for someone interested in some quick encryption where security is not that important, or for embedded devices were resources are limited, or just for lazy students. :D

Read more…

Cool JavaScript Tool Window

March 30th, 2009 No comments
Tool Window

Tool Window

This JavaScript class wraps a given HTML element into a movable and resizable floating tool window.  Required libraries: scriptaculous and prototype.js

Read more…

File Upload Progress with mod_python

March 28th, 2009 3 comments
Upload Progress with mod_python

Upload Progress with mod_python

Now that Gmail has added a progress bar for attachment uploads, everybody wants to do the same including myself :)
So, with the same method that everybody uses consisting in an upload form with a hidden <iframe> as target, and then a periodic Ajax request to update the progress, I made a simple implementation using mod_python on the server side… This is a veeery simple example, like everything that you do with Python.
Additionally I’ve added an upload size limit control based in examples that can be found in the mod_python forum site. Use the source Luke!

See LIVE DEMO!

Read more…

MacOS X 10.5.x (Intel) + mod_python + PIL + PyCAPTCHA notes

March 3rd, 2009 No comments

If you have a Mac OS X Leopard on an Intel platform, and you are interested in installing mod_python using your default apache setup and the python that comes with the Framework, even more if you want to give PyCAPTCHA a try together with mod_python, then check out this post! I’m covering also the installation of required libraries for PyCAPTCHA under Leopard (FreeType2, libjpeg, PIL)

Read more…

Slice and rotate images with CutNRot

June 4th, 2008 No comments

Cut and Rotate

Today I’m introducing another utility script written in python that uses wxPython to edit your scanned images (JPEG, BMP, TIFF, etc.) obtain sub-images, rotate and save them.

Read more…

Code optimization for RXTX parallel port implementation

May 26th, 2008 No comments

DB-25 Connector

RXTX is a native lib providing serial and parallel communication for the Java Development Toolkit (JDK). All deliverables are under the gnu LGPL license. The native part is developed in C.

If you are using the parallel port functions of this project for version rxtx-2.1-7r2 or older, you may be interested in this code optimization, it is a small change but it may improve the resource usage in certain cases.

Read more…

Converting Visual Studio solutions to SCons

May 23rd, 2008 4 comments

A python script to convert Microsoft Visual Studio 2005 solution files (*.sln) and the associated project files (*.vcproj) into a set of SCons files (SConstruct and SConscript).

Read more…

Converting Visual Studio solutions to Makefiles

May 23rd, 2008 9 comments

A python script to convert Microsoft Visual Studio 2005 solution files (*.sln) and the associated project files (*.vcproj) into a set of Makefile’s.

The class Sln2Make does all the work, parses the sln and vcproj files and generates a main Makefile and one Makefile.ag for every project in the solution. The Makefiles.ag generated will have two targets, ‘all’ and ‘clean’, the script also includes the dependent libraries if they are properly defined in the solution. To use it, just instantiate the class with the following parameters:

Read more…