Archive for the ‘ Tips ’ Category

OSX 5005:Unknown error optimizing byte code

Working in a large AIR project, the flash compiler give me this strange error:

1
5005:Unknown error optimizing byte code

To avoid it , we must increase the memory of the compilator by creating a file in:

1
~/.MacOSX/environment.plist

and put this text in it:

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>JAVA_TOOL_OPTIONS</key>
<string>-Xmx512m</string>
</dict>
</plist>

If you use flash CS5 also edit this file:

1
~/Library/Application Support/Adobe/Flash CS5/en_US/Configuration/ActionScript3.0/jvm.ini

Then change -Xmx128m to -Xmx512m

OSX Messenger all my contacts was unadmitted

A strange thing happened to my messenger, it was opened it today and my surprise was that all the contacts I have are listed as ( not allowed ).

Searching the net I find the solution.

Close MSN and open a terminal window and move to this directory:

1
/ Users / <- OUR USER -> / Library / Preferences / Microsoft

There you find a file named:

Microsoft Messenger User Cache.plist

What we have to do is rename the extension to any other (eg. Bak) to restart MSN after re-create your configuration settings.

We do this process by:

1
mv Microsoft \ Messenger \ User \ Cache.plist Microsoft \ Messenger \ User \ Cache.bak

Reboot MSN to see that everything worked properly.

jsPDF An javascript utility library for generate PDF’s

jsPDF is a javascript utility library for generate PDF’s
With only 5.8kb it let us to generate PDF’S dynamically.
Is compatible with Safari, Firefox 3.5 y iPhone Safari.

1
2
3
4
5
6
7
8
9
10
11
jsPDF.init();
jsPDF.addPage();
jsPDF.text(20, 20, 'Hello world!');
jsPDF.text(20, 30, 'This is client-side Javascript, pumping out a PDF.');
jsPDF.addPage();
jsPDF.text(20, 20, 'Do you like that?');

// Making Data URI
var out = jsPDF.output();
var url = 'data:application/pdf;base64,' + Base64.encode(out);
document.location.href = url;