Friday, March 26, 2010

BarCode Sample in Flex

My friend is working in a flex project.I just helped him in a barcode generation. We just used barcode.swc which is available in adobe.To download barcode.swc click here. Then we explored the sample which is given in that link. Sample which is given in the link is just a swf file but it is not given how to add this swc into our project.So i study the package and class inside the swc. Here is a sample for creating a barcode in flex.
Steps
1. Create a new flex project
2. Add the downloaded "barcode.swc" into the project ( either copy swc into lib folder of your project or manually refer the location of swc in project buildpath)
3. here is the code.

In this sample, I used "Code128B" for barcode generation. There are 5 types of barcodes. Code128B, Code128C, Code39, Code93, CodeI2of5.
The necessary attributes to barcode.

barCodeText="text"
barCodeHeight="50"
addLabel="true"
charGap="5"
xDim="4"

Monday, March 1, 2010

simple mannasim program with nam generation

I am working on ns2. I used cygwin which contains gcc-3.2. I make use of http://paulson.in site to download ns2.29 with mannasim patch. I tried the sample WSN tcl program on mannasim, which seems some complex. So i tried modifying it. I tried nam generation for mannasim program. I tried modifing mannasim-rede-nierarquica. Here is the code mannasim-rede-hierarquica-with-nam