I've tried out some Python now and it is really intriguing.
I work with software development as a freelance developer.
boolean login(String username, String password);
Application{
void run(){
splashScreen();
//Hack info from the User and crack away
loginInfo = gatherLoginInfo();
login(loginInfo.name, loginInfo.pass);
}
}
User{
void login();
}
Application{
void run(){
splashScreen();
//we have a new User here
User user = new User();
//user, could you please log ourself in?
user.login();
}
public static void main(String[] args) {
final int NUM_MSGS;
Connection connection = null;
if ((args.length < 1) || (args.length > 2)) {
System.err.println(
"Program takes one or two arguments: "
+ " []");
System.exit(1);
}
String destType = args[0];
System.out.println("Destination type is " + destType);
if (!(destType.equals("queue") || destType.equals("topic"))) {
System.err.println("Argument must be \"queue\" or " + "\"topic\"");
System.exit(1);
}
if (args.length == 2) {
NUM_MSGS = (new Integer(args[1])).intValue();
} else {
NUM_MSGS = 1;
}
Destination dest = null;
try {
if (destType.equals("queue")) {
dest = (Destination) queue;
} else {
dest = (Destination) topic;
}
} catch (Exception e) {
System.err.println("Error setting destination: " + e.toString());
e.printStackTrace();
System.exit(1);
}
try {
connection = connectionFactory.createConnection();
Session session = connection.createSession(
false,
Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(dest);
TextMessage message = session.createTextMessage();
for (int i = 0; i < NUM_MSGS; i++) {
message.setText("This is message " + (i + 1));
System.out.println("Sending message: " + message.getText());
producer.send(message);
}
producer.send(session.createMessage());
} catch (JMSException e) {
System.err.println("Exception occurred: " + e.toString());
} finally {
if (connection != null) {
try {
connection.close();
} catch (JMSException e) {
}
}
}
}
public static void main(String[] args) {
handleInputArguments(args);
connect();
}
When Chuck Norris jumps in a pool he doesn’t get wet, the water gets Chuck Norris.
If you have five dollars and Chuck Norris has five dollars, Chuck Norris has more money than you.
If Chuck Norris is late, time better slow the fuck down.
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid of the dark, but because the dark is afraid of Chuck Norris.
Chuck Norris can touch MC Hammer.
Chuck Norris counted to infinity - twice.
Chuck Norris ordered a Big Mac at Burger King, and got one.