Bogdan Manate

A good way to disable swf browser cache

I found a very cool way to disable the browser cache for my .swf files. When I have searched for a solution for this problem, I found that you can add a dummy parameter, like timestamp or date, to your swf file and the browser will re-download the file. This solution is wide spread on every site that offer a solution for this issue, but I don’t like it because the browser still  cache your swf file, creating multiple cache files for a single .swf file. So, after reading a lot of blogs I found the following solution:

Continue reading…

Using cron jobs in CentOS

I spent more than 5 hours, today, trying to make a cron job on my company web server. So, after numerous tries, I was almost ready to give up, but finally I found that even the manual say that you should not restart the crond daemon after you add a new cronjob in the crontab, because the crond daemon check every minute for changes in the crontab file and if there are any changes it run the new added cron jobs. This entry in the manual is not always true. So if you have made a cron job and in the /var/log/cron file you don’t see an entry at the time when your job was scheduled, and assuming that you are running a valid Unix command like ‘ls’, try to restart your crond daemon ( /etc/init.d/crond restart ) after adding a new cron job.

Continue reading…

Your Flash Builder is running slow ? Allocate some memory to JVM

I had installed Flash Builder builder some time ago and everything just seems to be allright, but when I had to made a major refactoring for all modules belonging to a very large project Flash Builder started to run slower than Flex Builder. The configuration of my PC is very good, Intel dual core at 2 GHz and 3 gb of RAM and I had allready Flex Builder installed and it worked just fine.  After I done some reasearch I found that you can increase the JVM memory, so these are the steps you must follow:

  1. Exit Flash Builder ( or Eclipse if you have installed Flash Builder as an Eclipse plugin ) if is allready running.
  2. Open your FlashBuilder.ini  or eclipse.ini located in your installation folder. For Windows user: C:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.ini ( if you are using a 64 bit operating system you must search in C:\Program Files(x86)\Adobe\Adobe Flash Builder 4\FlashBuilder.ini ) or <path to Eclipse>\eclipse.ini .
  3. Find the maximum heap size setting, e.g. “-Xmx512m”.
  4. Change the maximum heap size. I set it to 1024 mb, e.g. “-Xmx1024m”. Be careful to not allocate more memory than your pc has.
  5. Save the file.
  6. Restart de Flash Builder or Eclipse, now it should run faster.

[Later edit]

Mac users can find the *.ini file this way:

  1. Right click on Adobe Flash Builder 4.app or Eclipse.app, Show Package Contents
  2. Open Contents > MacOS > Adobe Flash Builder 4.ini or eclipse.ini

Create OS native installer with ADT for AIR applications

In order to create a native installer for your AIR application with ADT you need to go from command line to your bin-debug folder and follow these steps:
1. Create a certificate:
adt -certificate -cn CertificateName 1024-RSA certificate.p12 yourPass
2.Create the air archive:
adt -package -storetype pkcs12 -keystore certificate.p12 Application.air Application-app.xml Application.swf <You can also add here other files wich you can find in your application directory >
You will pe prompted for your certificate password that you set at step 1.
3.Create native installer:
adt -package -target native Application.exe Application.air

Now you can distribute Application.exe to your customers.

Note. If you want to create a native for a specific operating system you must run the command from above on your preferred OS. I created this exemple on a Windows OS.

Flex error #2176 when using FileReference

The flash player 10 has new rules for UIA ( user initiated action ) so when I tried to use the FileReference save method I got the following error: Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press. After I made some research I found a very cool article here, but I didn’t found any workaround.

Continue reading…

FX 4 tour live at Timisoara

Adobe has announced the launch of Flash Builder 4 on April, so Adobe user group Timisoara invites all the people who are interesed at West University of Timisoara, room A02, on 10 April from 11:00 AM , where the evanghelist Mihai Corlan will present the new cool features included in the brand new FX 4. If someone wants to come to the event, you can register here. It is no need to bring the ticket with you, we just want to know how many people will come. We will provide free pizza and drinks and maybe some t-shirts.

Blogging from my BlackBerry 8520 Curve

This post is wrote from my BlackBerry phone, so it’s purpose is to test the phone keyboard and the WordPress application for BlackBerry. I use my BlackBerry phone without a data plan for now, but I don’t think I need one, because it works just fine connected to my wifi network. It’s true I can’t use the mail application and the IM application, but I solved this problem by installing 3rd party applications. First of all, the keyboard is very cool, I wrote the text from above very quick and I didn’t made spelling mistakes. This article will be continued after I will discover other new things. So that’s all for now. I noticed that the WordPress application fail to retrieve my categories, so for now this article will be uncategorized.

Using shell scripting to start multiple background processes

I made yesterday some tests on a Java server running on a linux machine. So I had to run the Java server and a policy server in background, then I had to stop them to change some things and then I then I started them again several times ( I will explain in my next article why  I needed a policy server ) .  Of course, after I repeated this operation many times, I got bored and I decided to simplify my work by creating a shell script  and after some googling I found a way to run multiple background processes from a shell script.

Continue reading…