Friday, 29 January 2010

Batch Watermark with Delphi part I

As a novice photographer, always upload my pictures on flickr and the other day someone told me about putting watermarks to the pictures just in case (in order to protect my pictures). Well, said and done, here you can find one of my last applications: Thundax batch watermark. A simple application that lets you upload a set of jpeg images and a bitmap watermark and then embed the mark in each of the images by merging the pixels.

Imagine that we have this picture:

Wednesday, 27 January 2010

Monitoring processes with Delphi

The other day we were interested on listing the threads of a process with one of my colleagues. We started looking for some information on the internet and ended in a very interesting application from sourceforge. Before continuing, I've made several changes into the blog in order to gain more exposure. I've added the Feedjit widgets to show the list of trafic feed and page popularity and I've also added two more buttons showing my profile into delicious and flickr. And I've truncated the post to gain load pages and bandwidth.

Well, going on in our topic, I've managed to release a little application that shows all the processes and the threads on every process. It's a simple approximation, but it helps to understand how works the API by Using the CreateToolhelp32Snapshot function where we can point the list of process and go to each of them and gather their properties. For the threads, we can use the same function but using the threads functions to cover all of them.

Sunday, 24 January 2010

New features with VLO framework part VI

Before I start with the new features of my framework, I'm gonna say that I've put a little gadget on the right side of the blog showing the best of my pictures. Feel free to glance at them, because photography is one of many hobbies that I have. I hope you enjoy!.

Anyway, this article will show you all the new features that I've been carrying out these days, refactoring the code and doing some important changes into the structure of the platform. Now the framework is more based in Nodes, Edges and graph attributes than boxes and lines. If we take a look at the new UML diagrams, they look like this:

Node Class:

Saturday, 23 January 2010

Developing a simple MRU List

If you are developing an application and you need a simple MRU list, here I left my system. The MRU acronym stands for Most Recently Used, and that's very useful when we are working with documents and we want to open the last document opened. To implement this in our application in a simple way, we only need to do this:

In our MainMenu item we need to add 5 new subitems called MRU1 to MRU5 and a separator called separatorMRU.

After that, I've designed the following classes to accomplish my goal:

Star professors

Today I'm gonna change subject with an "off topic" called the Star professors. The other day I saw on the Internet a little interview to the Rector of the UOC (Open Univeristy of Catalonia) where she was talking about the Star professors.
The UOC is an online university born from the knowledge society and whose mission is to provide people with lifelong learning and education. And it's also a leader and innovator in education and technology, and is a benchmark for quality in its academic work and research in e-learning based on Information and Communication Technologies (ICT).
Here is where I'm finishing my second degree in Computer Science Engineering and I love it!. By the way, I was talking about Star professors, that is a new term for the best teachers in the world. For example those from MIT, Standford, Yale, etc. And now with the Information and technology (IT) era, we can learn from them because all the lectures from these professors are published in a place called "Academic Earth". Amazing!!, isn't it?.

Tuesday, 19 January 2010

Changing the currency format in a ReportBuilder report

These days I've been working on a project with Reportbuilder from Digital Metaphors where we need to display different currency symbols in an invoice report. Here was my surprise when I found out that the DisplayFormat of the DBText is linked to the local currency symbol that your computer is using!. If we open the control panel -> Regional and language options we'll see the default currency symbol of the system:

Sunday, 17 January 2010

Parsing algorithm for Graph implementation part I

Working on your own project has the inconvenient that you have to find some extra time to do all this stuff. My last project (VLO Framework) it's been like a dream come true (Developing a graphic system is not easy). Maybe in two or three months I'll be able to sit back and reflect a bit, but for now it's pretty hectic. I'm keen on releasing a new product (P-Zaggy) that implements a lot of algorithms to use with graphs. I am preparing a power point that I'll publish in order to introduce you to this application. I have a lot of ideas, and sometimes it's quite difficult to tell my brain to shut up!.

In this article, I'll introduce you How I built this little parsing algorithm to implement a graph inside the canvas test framework. With this little gadget, now the application is getting quite spectacular. Now, adding a simple edges list, we can generate a diagram and using the layout algorithm, format the entire graph as we desire.

Tuesday, 12 January 2010

Sunday, 10 January 2010

Force-Directed graph layout approximation part IV

I'm still working on the component, and I've implemented zoom in and zoom out methods for the better visualization of the graph. The issue here is that when we develop a system like this (visual application with mouse edition), all the action it should do is allegedly involved. Like the drag and drop, the zooming system, printing, etc. And you should always take into account all these problems. We have got into a bad habit by what the other programs do, and when we develop a new application, we usually take a little from everywhere. Nevertheless, it's better to let things clear from the beginning and report the final characteristics of your program.

With this new methods, now we can enlarge the graph and zoom out the view until we see all the drawing inside the picture. I haven't finished it yet, but I can show you the latest results:

Friday, 8 January 2010

Review from the passing scene

In this article I'll be reviewing all the interesting posts I've published where the set up of the VLO framework is involved. From working with the canvas to using a Force-directed graph layout I'll show you the vast amount of information I've posted, and this will help me to think "Where the project is?" and "Where the project is going to?".

Wednesday, 6 January 2010

Force-Directed graph layout approximation part III

Today I've released the last version of my project VLO. You can find the latest win32 desktop application with the canvas test here:
In this version I've made several changes due the bug list that I had. Now, after fixing all the little bugs that the application had, I can say that I'm very satisfied with the results. Indeed, I've changed the hierarchy of classes that I have, and I've moved all of them to a TNode and TGraph classes instead of TBox and TBoxManager. In a few weeks I'm gonna release a new application with all this algorithms (and I'm still thinking in the name of this application).

Tuesday, 5 January 2010

Monday, 4 January 2010

Force-Directed graph layout approximation part II

In this article I'll describe the different calculations that we have to do in Repulsive and Attraction methods to calculate the position of the different nodes. As I published yesterday in part I, I'll focus on the Hooke's and Coulomb's laws and the integration inside the platform.
  • Hooke's Law (attractive force):
The functionality here is very simple, we need to think that every edge represents a spring, and when 2 nodes that are connected try to move in opposite direction (by a force of repulsion), the spring tend to be deformed by that force. When this happens (the spring is being forced to move) , it returns to the initial state of equilibrium. For this, we need to create a model to generate this behaviour. I've found several examples on the Internet, like in (Pendulum simulation ), for example in youtube we can find very good videos explaining the hooke's law:

Sunday, 3 January 2010

Force-Directed graph layout approximation part I

I've been working on these last days in a Force-Directed graph layout approximation applicated in my VLO Framework (That's why I've been off these days without posting anything). The system consists on applying physics laws to each node calculating the repulsion force using Coulomb's law and the attractive force using Hooke's law. To do this, I've made a lot of changes to accomplish all the requirements of the new functionality. Now, every TBox class implements a TNode class which has all the physics components like hooke_force, coulomb_force, speed, mass, etc. And the manager ThundaxBoxManager that handle all the canvas methods now implements the TGraph class which has all the data about repulsion calculation, attraction calculation, energy of the system, etc. The algorithm is easy to understand because it works in a simple way. We need to iterate every node and calculate in steps the hooke and coulomb force for everyone. In every step there will be new forces that interact with each node, and when the total amount of energy is nearly zero, we can stop the algorithm.