Working with namespaces

First when you start working with XML in flex you are completely wondered about how easy the xpath like syntax is used. However some botlenecks might occur. One of them is using namespaces. Consider the following example: <?xml version="1.0" encoding="UTF-8"?><report version="3.2.15" xmlns="http://www.len.ro/report"> <item name="user">len</item></report> First approach is to do something like: var myXML:XML = XML(event.result);trace("XML: " + myXML.item.@name); you will see nothing and start wondering what you are doing wrong. Some time later you realize it’s namespace related and you try (according to flex doc) to do this:...

June 16, 2008 · len

Locale files

When using flex and java in parallel the localization mechanism might be clear. One aspect which is not clear is the encoding of the properties files: Flex locale files encoding: UTF-8 Java locale files encoding: ISO-8859-1 Convertor script: ..$ cat fixUTF.sh #!/bin/bash TMP=iconv.tmp if [ "!$2" == "!rev" ]; then iconv -t ISO_8859-1 -f UTF-8 -o $TMP $1else iconv -f ISO_8859-1 -t UTF-8 -o $TMP $1fimv $TMP $1

May 13, 2008 · len

C# COM

I was a bit shamed about writing something about windows but then I thought there are so many ugly jobs which are respectable so the job of writing windows programs might fit somewhere too. So this is an article about how to write a small C# application which can calls code from a COM object. As a warning some of the informations here might be considered common knowledge to windows people so please don’t be too judgmental about....

September 25, 2007 · len

My first flash (flex) application

How come? As I am currently evaluating a Digital Signage project which makes heavy usage of Flash movies I decided to re-evaluate this technology. Until now I was rather reticent for the following reasons: it is proprietary and does not have any free development tools and (most disturbing) it requires Windows. However today while browsing the Adobe site I found out some rather cool things. There is a product called flex which allows to freely develop flash applications on Linux....

April 13, 2007 · len

Graph web representation (conclusions)

Updated 18-oct-2008: There is a great solution in Flex which I have used for this and this projects. Conclusion The problem of representing a graph on the web is not a solved one. On the desktop application side there are lots of tools which can handle large graphs with nice visualization but on a web page the choices are limited. For the given problem of representing a set of nodes connected through lines in order to illustrate the elements of an application I have tried the following:...

February 2, 2007 · len

SOM neural networks

The SOM (self organizing maps) are some very intuitive neural networks. There are a lot of more detailed description of these networks but here is a more intuitive description. You have a number of neurons usually arranged in a 2D or 3D grid, each neuron has an associated weight vector. The input, which is a vector of the same size as the weight vector is connected to each neuron. The natural association is that each vector is a point in an n-dimensional space....

January 5, 2007 · len

xmlIndent.py

<pre class="python"><span style="color: #008000;">#!/usr/bin/python </span> <span style="color: #c00000;">import</span> <span style="color: #000000;">sys</span><span style="color: #0000c0;">,</span> <span style="color: #000000;">re</span> <span style="color: #000000;">iE</span> <span style="color: #0000c0;">=</span> <span style="color: #004080;">' '</span> <span style="color: #000000;">pStart</span> <span style="color: #0000c0;">=</span> <span style="color: #000000;">re</span><span style="color: #0000c0;">.</span><span style="color: #000000;">compile</span><span style="color: #0000c0;">(</span><span style="color: #004080;">'<[a-z]+'</span><span style="color: #0000c0;">,</span><span style="color: #000000;">re</span><span style="color: #0000c0;">.</span><span style="color: #000000;">IGNORECASE</span><span style="color: #0000c0;">)</span> <span style="color: #000000;">pEnd</span> <span style="color: #0000c0;">=</span> <span style="color: #000000;">re</span><span style="color: #0000c0;">.</span><span style="color: #000000;">compile</span><span style="color: #0000c0;">(</span><span style="color: #004080;">'(/>)|(</[a-z]+)'</span><span style="color: #0000c0;">,</span> <span style="color: #000000;">re</span><span style="color: #0000c0;">....

November 23, 2006 · len

Verilog 2 VHDL

VERILOG 2 VHDL CONVERTOR INTRODUCTION We have succeded in making work our first version of a Verilog to VHDL convertor. The convertor was written for a subset of the Verilog grammar, taken from the IEEE specifications. The convertor was implemented on a Linux iv386 machine, using a lexical analyser written in “Lex” (flex), a sintactic analyser written in “Yacc” (bison), a set of ANSI C++ classes and some C sources. The graphic interface was created using Qt v1....

November 19, 2006 · len

knockd.py

<pre class="python"><span style="color: #008000;">#!/usr/local/bin/python </span> <span style="color: #008000;"># $Id: knockd.py,v 1.5 2004/02/06 22:29:38 len Exp $ </span> <span style="color: #008000;"># Latest version can be found at http://nemesisit.rdsnet.ro/len </span> <span style="color: #008000;"># Copyright (C) Marilen Corciovei <marilen.corciovei@nemesisit.ro> </span><span style="color: #008000;"># </span><span style="color: #008000;"># This program is free software; you can redistribute it and/or modify </span><span style="color: #008000;"># it under the terms of the GNU General Public License as published by </span><span style="color: #008000;"># the Free Software Foundation; either version 2 of the License, or </span><span style="color: #008000;"># (at your option) any later version....

November 19, 2006 · len

knock.py

<pre class="python"><span style="color: #008000;">#!/usr/local/bin/python </span> <span style="color: #008000;"># $Id: knock.py,v 1.2 2004/02/06 22:29:38 len Exp $ </span> <span style="color: #008000;"># Latest version can be found at http://nemesisit.rdsnet.ro/len </span> <span style="color: #008000;"># Copyright (C) Marilen Corciovei <marilen.corciovei@nemesisit.ro> </span><span style="color: #008000;"># </span><span style="color: #008000;"># This program is free software; you can redistribute it and/or modify </span><span style="color: #008000;"># it under the terms of the GNU General Public License as published by </span><span style="color: #008000;"># the Free Software Foundation; either version 2 of the License, or </span><span style="color: #008000;"># (at your option) any later version....

November 19, 2006 · len