SubClosure

{ Don't Repeat Yourself ! }

I took me a while to find a free paint programm for Mac OS that works
similar to paint for windows.  Had to google around for quite some time to find it.

Being new to Mac I’m no so used to the fact that everything Mac related starts with the letter “i”. Otherwise I would have found this little program much quicker.

Here it is:  iPaint – http://ipaint.sourceforge.net/

this is what iPaint looks like in action:

this is what iPaint looks like on my Mac

It seems to  work pretty good

I have been trying to add new line breaks to text only emails with \n\n.
I discovered that it will only work when using double quotes (“) for the body string.
When using single quotes (‘)  \n\n will show in emails as such.
This is because PHP interprets single and double quotes in a different manner.

As stated in the PHP String Manual:

“Unlike the double-quoted  and heredoc syntaxes, variables and escape sequences for special characters will NOT be expanded when they occur in single quoted strings.”

This little Flex Application lets you create or reset a new Joomla password that you can save directly into your joomla database. Joomla passwords are by default encrypted with md5 + salt.

To use this application you just need to type in the desired password and click “make password”
You can then directly save the generated password string into the appropriate row of the jos_users table in your joomla database.

if you just need a temporary password to gain access, you can use this:

password: 12345
code: e7d4aa4793a91a61bb1f1768095b765c:IEJh02NvSn0C2QmUmg0AuAEZSkgtk6Gv

just remember to change this password to something complicated, once you have access to the joomla administration interface.

 

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

I recently joined Amazon’s S3 simple file storage service to use for my server backups.
I’m very happy with it.

To get the backups running on a Debain Server I had to do the following:

  1. Install Duplicity – apt-get install duplicity
  2. generate a GPG key (gpg –gen-key)
  3. create a little backup script – following these steps.
  4. set up a cron job for automatic backups

Great site that explains how to do it: https://help.ubuntu.com/community/DuplicityBackupHowto

Get Adobe Flash player