iPhone: Nimbuzz in, AIM out

 


The truth is that Skype totally dropped the ball on iPhone and AIM client was so bad, it was most of the time unusable.

The new application, Nimbuzz, provides support for most of the chat networks in the nice package.

Big pros for me:

  • All networks in one design - no switching
  • Skype - finally a good client
  • AIM / MobileMe / iChat
  • big horizontal keyboard typing
Cons:
  • no photo transfer (yet)
  • the list of contacts is very long, it would be nice if they were sorted by status ("online" on the top)
  • (option) hide all "Away" contacts
  • AIM often shows message that it is "temporarily unavailable"
  • no full names of the contacts (frankly I don't remember all the user names of all the people I have)
  • ability to make fonts smaller in the chat to show more messages while typing
  • better fitting of the messages (balloons?)
  • no group support (yet), I need a small groups like "friends", "work" and "all others"

Overall, Nimbuzz is the best chat application so far and the fact that it combines multiple networks makes it a winner on iPhone that can have only one app open at the time.


Fire Fox: emptying cache

To clear your cache on fire fox browser in Mac:
Go to Tool menu -> Clear Private Data

iPhone: add app icon SDK 3.1

To add an icon to your app:
  • create 57x57 pixel "icon.png" image file (any other name will do)
  • drag that image to Resources folder (check the copy option)
  • in Info.plist edit "Icon File" - CFBundleIconFile property, enter the name e.g. "icon.png"



The SDK 3.1.1 upgraded this functionality by hiding the unreadable names:



SVN - remove .svn, UNIX find, rm commands

When you copy files over from another project the .svn directories prevent you from checking in the files to the new SVN directory. To list and then remove .svnrun the following commands:
find . -name '.svn' | xargs rm -fr

Mail Server for Mac

http://cutedgesystems.com/software/MailServeForLeopard/

Regular expression: user input validation checks

Validate email properties:
String regexExp = "^[a-zA-Z0-9]+[.a-zA-Z0-9_-]+@[a-zA-Z0_.-]+\\.[a-zA-Z]+$";

String regexExp2 = "^[a-zA-Z]+@[a-zA-Z0_.-]+\\.[a-zA-Z]+$";

String errMessage = "Invalid email address.";

Validate alpha numeric properties:

String regexExp = "[a-zA-z0-9]*";

Validate numeric properties:

String regexExp = "^[-+]?\\d*\\.?\\d*$";

Validate alpha properties:

String regexExp = "^([a-zA-Z\\s-\']+)$";

Validate URL properties:

String regexExp = "(HTTPS?://)[A-Z0-9.-]+\\.[A-Z]{2,6}([\\w\\d:#@%/;$()~_?\\+\\-=\\\\\\.&]*)";

String

SQL: simple database insert statement

insert into org_attribute (name,value,organization,level) values 

('name_a', 'My Company.', '1', 2),

('name_b', 'Your Company', '2', 2);

HTML: mailto tag

Using HTML mailto tag, you can open local system mail client to automatically open a new mail window. When a user clicks on an email address in the webpage, this tag will open up a new email message. Use below example to use this tag:

Button Alignment

To align a button in the center of an a vertical container using google web toolkit:

Button selectOther = new Button("My Button");

favListing.setCellHorizontalAlignment(selectOther, HasHorizontalAlignment.ALIGN_CENTER);

Java comparator

Java provides comparator interface which is used to order elements in collection objects such as TreeMape or TreeSet. Below is an example of a comparator method:

 public int compareTo(Administrator admin)

    {

Map entityValue = new HashMap();

entityValue.put("Application", 1);

entityValue.put("Organization", 2);

entityValue.put("League", 3);

entityValue.put("Team", 4);

int thisIndex = entityValue.get(this.entityName).intValue();

int otherIndex = entityValue.get(admin.getEntityName()).intValue();

int compare = thisIndex - otherIndex;

if (compare == 0)

    compare = this.entityID.intValue() - admin.getEntityID().intValue();

return compare;

    }

You can call the compareTo method for a TreeSet collection for example. 

SQL: query

SELECT (CONCAT( MONTH(date_time), "/", DAYOFMONTH(date_time) ,"/", YEAR(date_time))) as date, COUNT(*), column_x, column_y FROM table_x group by YEAR(date_time), MONTH(date_time), DAYOFMONTH(date_time), column_x, column_y;