code Archive

Longest common subsequence problem

Dynamic Programming is a powerful technique that can be used to solve many problems in time T(n2) or T(n3) for which a naive approach would take exponential time. “DP” is a general approach to solving problems, much like “divide-and-conquer” is a general method, except that unlike divide-and-conquer, the subproblems will typically overlap and are used

Flex and Jabber, a practical approach

The widely adopted open protocol for instant messaging XMPP (also called Jabber) is a de facto standard used in various instant messaging systems. The aim of this article is to show how quick and easy it is to create a real time application using this protocol that relies on a restful architecture. In order to

Reading Exif data with ActionScript 3.0

Most of the digital cameras use Exif file format to store images and through this format tons of information is available so that each software that deals with images can show relevant data loading few bytes. The nice thing is that in the first 64 kbytes of an image all the information, thumbnail included, are

Flex image manipulation

Image file formats are standardized means of organizing and storing images, let’s start to recap the building blocks of them in order to move faster in our flex applications. Image file size (expressed as the number of bytes) increases with the number of pixels composing an image, and the color depth of the pixels and

Code tuning techniques

Code tuning techniquesCode tuning differs a lot from refactoring because it doesn’t always improve code readability, and changes that you make are not meant to improve the internal structure of a software. If the changes performed in the code don’t degrade the code’s readability, we believe that you are refactoring rather than fine-tuning. One of

Make ILOG elixir charts accessible

During the last 360|Flex at San Jose I have had the opportunity to talk about Flex and Accessibility. One of the samples I worked on is the exposure of the information stored inside the Organization Chart  to the screen reader. The experience was amazing for me because the ILOG elixir charts source code is well

Flex and Dictionary class

Today I have had the opportunity to play a lot with Flex and the Dictionary class. In ActionScript 2.0 when i needed something very simple to hold my data, I used pure Objects or their subclasses with bunch of methods, now we have more specialized class for this – flash.utils.Dictionary. The Dictionary class lets you

Positioning popups

This small demo show to you how to handle the position of popups created through the PopUpManager class in a Flex application. At the following link you find the demo with the view source enabled, the key points are: Dinamically position of the popups accordingly to a link button position Creation of a custom popup