SubClosure

{ Don't Repeat Yourself ! }

Browsing Posts in Uncategorized

Great news – Nathan Mische has released a Firbug Plugin for Firefox that allows us Flash and Flex developers to view decoded AMF Traffic Requests and Responses from within our browser.

Check it out here: https://addons.mozilla.org/en-US/firefox/addon/78928

The only problem at the moment – it is not very easy to find requests/responses if you have an application that is making a lot of requests simultaneously. It takes quite a bit of clicking and scrolling to find what you are looking for.

Nevertheless I’m absolutely impressed so far and I think it is a great tool. I’m very much looking forward to future developments.

This is a screenshot, that I took when running my flex password generator:

This is a bit off topic but I just came across a pretty cool animation by Fredrik Andersson called Watch Alice Bleed.

Watch Alice Bleed Animation

Description:

Watch Alice Bleed is a gore-filled stop motion animation. It opens with Alice being decapitated, and having her head fed to a dog. Then things start getting gruesome…

It can be found on vodo.net which features quite a few good free movies from creators who WANT to share their work! Movies are shared over bit torrent.

ever executed shell commands that process large amounts of text data?

for example mysql mydatabase < data.sql

with data.sql being a huge file.

this cool little tool called bar can display a nice ASCII progress bar for commands

Wow – thats funny

Super Baozi vs Sushi man from sun haipeng on Vimeo.

When working with databases one always need to keep track of  changes in the database structure.
If an older database needs to be updated to the latest version quite possible a lot of ALTER statements need to be created to make the old database look like the new one. Doing this manually often leads to issues, particularly if lots of changes were made.

A really cool and free tool to design and synchronize databases is Power Architect

It’s open source and java based. It can connect to multiple source databases concurrently and compare data models & database structures to identify discrepancies.

Just noticed that some of my image assets where missing in the release build folder after using the Flex Builder 3 “export release build” function.

Cause: Flex only copies those assets that are not embedded into the release folder

Problem: If the same asset is embedded in one place and just referenced by URL in another, the file is missing.

Solution: if embedding assets – embed them globally and make sure to only use the embedded assets in all components.

Problem: when setting the rotation property on a Flex label or text component the component becomes invisible.

Cause: To rotate text in Flex the font must be embedded.

Easy Solution:

1. Embed a system font in your Application like so:

[Embed(systemFont='Verdana',  fontName='myPlainFont',  mimeType='application/x-font' )]
private var font1:Class;

2. set the embedded font as font family for the text component you want to rotate, e.g:

l = new Label() ;
l.setStyle("fontFamily" ,"myPlainFont") ;

3.  set rotation ( e.g. l.rotation = 90 ) -  now the label should be rotated by 90 Degrees and visible.

Reference: http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html

The Eclipse core icons are great icons to use in any application.
Here is a online archive of all (3904) 16×16 eclipse icons.
Great if you don’t have eclipse on your machine or for just quick browsing of these super useful icons.

http://xantorohara.110mb.com/core-icons/Eclipse-16×16.html

note: this page also has a nice list of open office icons available.

Getting class not found errors even though the require and include statements work fine?
It might be the case that the php configuration (php.ini) does not allow short opening tags.

short_open_tag = 0

A short opening tags in php looks like this <? instead of <?php
Some older libraries use these short opening tags. Best practice is to replace them by standard php opening tags.

After installing mysql on Mac Os 10.5.8, I could connect to the mysql server from the command line.
But when I tired to open phpmyadmin I got this error:

Error: The server is not responding (or the local MySQL server’s socket is not correctly configured)

Solution that worked for me:

  1. sudo mkdir /var/mysql
  2. sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
  3. restart apache
Get Adobe Flash player