Tuesday, 31 May 2011

Flex4, trace function is not working anymore!


situation

This is known bug! This problem occurred when you exported a “release” previously; thenceforth the trace() messages are not appeared in the console window.
!!! If you are beginner on Flex, read the "attention" at the bottom of this post! !!!
problem

adobe flex4 AS3.0
Flex4, trace function is not working anymore!
----
> page: dn
difficulty level

3/10 :))
compatibility

flex4, as3
solution

Try 1
1. Clean the build: Project -> Clean -> Clean project (select this one specific from the list) -> ok
2. “Debug” the application (pressing the “bug” button); rebuild will be done
3. The problem should be solved! Otherwise try try2.

Try 2
1. Restart the Flex / Flash builder IDE
2. Restart the browser with Adobe Flash Debugger Player
3. Clean the build: Project -> Clean -> Clean project (select this one specific from the list) -> ok
4. “Debug” the application (pressing the “bug” button); rebuild will be done
3. The problem should be solved!
attention

Important note for beginners: You should “debug” the application (pressing the “bug” button) and not “run” the application (pressing the “play” button) to see the trace() messages at the console window. In “run” mode the trace() message are omitted.

excel... if function... with add comparison... how possible could it be??? [research!]


situation

how idiot excel could be??? TOO MUCH… so many years are passed and Microsoft is sleeping! They haven't implement yet a parser to the world's famous application for calculations… excel “shame on you microsoft!!!”
problem

What is the fucken syntax for ADD comparison in IF function of excel
difficulty level

0/10 :| microsoft SUCKS
Compatibility

All f*cken excel versions
solution


The follow formula
=IF(AND(1=1;2=2);"this is true";"this is false")
returns “this is true”

the follow formula
=IF(AND(1=1;2=3);"this is true";"this is false")
returns “this is false”

with similar way use the OR comparison

good luck and don’t forget that microsoft sucks
Attention

microsoft sucks

Sunday, 29 May 2011

Tuesday, 24 May 2011

flex4, how to make an image brighter, i.e. for focus purposes, without modify it


situation

how to make easy(!) modifications in Image components with out modifying their data. The data modification (image modification) requires a lot cpu resources as result low performance.
problem

adobe flex4 AS3.0
how to make an image brighter, i.e. for focus purposes, without modify it

> page: dn
difficulty level

2/10 :)
compatibility

flex4, as3
solution

- drop a Label on the Image component to cover it, clear text property
- on this Label... set as background color the white color
- also set as blendmode the "overlay" value
- also set as backgroundAlpha the value 0.5
- now... on runtime play with "alpha" property of the Label with values 0..400




Sunday, 8 May 2011

Firebird sql; How to make the Firebird SQL server portable, supporting the network connections!!!


situation

Firebird SQL server project, supports to be portable, as your application will use the same DLLs as the Firebird SQL server does; by this way you may open FDB files from your application without install the Firebird Server. The main disadvantage is that you can’t open the same FDB file from other application and of course there is no network support to open the FDB as remote database from other terminal(s).
By the way, if you are interesting how you do this, search at the internet and at Firebird's official page. I’ll go further as I will show to you how to make the Firebird server portable as it is, with network support also!
problem

Firebird
How to make the Firebird SQL server portable, supporting the network connections!!!
difficulty level

9/10 :(
compatibility

fb 2.0, 2.1 & 2.5
solution

- If you haven’t do this, install on a computer the firebird sql server.- Stop the service if it is running.
- Go to at “c:\Program Files (x86)\Firebird\” and copy whole “Firebird_2_0” directory somewhere else where you will play with it.
- Now go at the new location of Firebird.
- If you have made any modifications to firebird.conf… delete them.
- START the server; at the root directory of firebird, create the fbstart.bat with the follow two lines:
            cd bin
            fbserver.exe -a -p 55005 -database "localhost:..\security2.fdb" –n
  [i] some explanations,
      - the name fbserver.exe might be different regarding the version you are working with; this cheat/improvement is working with 2.0, 2.1 and 2.5 FB version.
      - the 55005 is the tcp ip port where the server will listen; I suggest you to keep it like this because the environment where your application (and portable firebird server) will work might already have another Firebird server installed, so the port 3050 will be occupied. For this simple reason use this port where it’s free. Of course you must do register an exception at windows firewall with port 55005 (as you should do also with 3050) and you should update your database connection component to use the 55005 port instead of 3050. For your initial test use the 3050 port instead of 55005 to check if are working well (replace in the previous code the 55005 with 3050; don’t leave it blank).
      - the –n switch tells the server to do not show its icon at system tray… you may remove this switch.
      - when you will run this batch, the cmd window will remain open; this batch is for test purposes, call the fbserver.exe with these parameters from your application to start the server (read the next important note).
      - NOTE: you must check to run the Firebird only once, if the server is already running you must not load it again.
- STOP the server; at the root directory of firebird, create the fbstop.bat with the follow line:
            taskkill /F /IM fbserver.exe /T
That’s all… good luck…
attention

Do not run the server more than once in the same time, check it is running or not.

Flex: how to make a image cache? (easier way) - REFdn4007673813


situation

how to make a image cache?
problem

adobe flex4 AS3.0 the image component
how to load images save them to cache…
and how apply them to Image components
---
> page by dn
difficulty level

9/10 :(
solution

In order to make a cashe of the photos/images, I do the follow simple way:
- With URLLoader I download the data… the "Complete" event gives me the "data" property… in this property the data of the image is in binary format (don't be afraid). I save this "data" to another variable (or array) of Object type. For this example, I named this variable "downloadData" you will see bellow.
- In order to load the data on a visual component Image, I do the follow code:
myImage.data=downloadData;
attention

no attentions!