March 12, 2008

A Flickr-based Introduction to Ruby on Rails 2.0

nitially released in 2004, the Rails web application framework became the perfect killer application for the Ruby language and an extremely powerful tool for rapidly developing web applications based on the CRUD (Create, Read, Update, Delete) pattern. At the end of 2007, version 2.0 of the now popular web application

Generate a Stub/Proxy Client from a WSDL File

To generate a stub/proxy client from a WSDL file, you need to download Axis from the Apache website This tip will work for jdk1.4.x or above. Suppose you have a WSDL file named Login.wsdl and you’re working on the directory (in Windows, c:wstest). Just follow these steps: Set the classpath:

Using the “Friendly Name” When Sending Emails Through Code

To use friendly names instead of the plain email IDs, simply write the email ID in the following format: mailobj.From = “AliasName &ltemailid&gt” For example: msgMail.From = “sms “; You can use it anywhere you write an email ID.

Determine the Direction of Stack Growth

A simple way to determine the direction of stack growth is to compare the address of a function parameter with the address of a local variable in the function. Of course, the main difficulty here is to avoid compiler optimization, such as register variables, function inlining, and so on. So,

Create Your Own Exception

Here’s an example of how to create an exception. You can extend this example as needed for your own applications. The important principle is the exeption’s mechanism, not its subject: class PrivateException extends Exception{//constructor without parameterspublic PrivateException() {}//constructor for exception descriptionpublic PrivateException(String description) { super(description); }}class Test { public Test(){}