SubClosure

{ Don't Repeat Yourself ! }

Browsing Posts published in February, 2010

The Email Validator’s static method validateEmail requires 3 parameters according to the Flex 3.2 API Documentation:

Parameters

validator:EmailValidator — The EmailValidator instance.
value:Object — A field to validate.
baseField:String — Text representation of the subfield specified in the value parameter. For example, if the value parameter specifies value.email, the baseField value is “email”.

I’m wondering  why it is that I have to specify the actual String value of my textfield as value parameter and then also have to specify “text” as baseField.
I would have thought as value I should specify mytextfield and as baseField “text” as it is done in all other places. I find that confusing.
But this method will only work when used like this for example:

var result:Array = EmailValidator.validateEmail( myemailvalidator , mytextfield.text , “text” ) ;

Ever had to choose a new secure password but couldn’t think of anything and ended up using the same old insecure password as always?

Well here is the solution. It comes in form of a little Unix/Linux programm, called pwgen. It automatically generates difficult passwords that are designed to be easily memorized by humans.

This Flex Application is a frontend for pwgen. You can use it to generate as many passwords as you like.

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.

 

Get Adobe Flash player