Saturday, February 26, 2005

curl - linux/unix command

curl is a client to get documents/files from or send documents to a server, using any of the supported protocols (HTTP, HTTPS, FTP, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction or any kind of interactivity.

Thursday, February 24, 2005

Search Serial Number by Google

Type in <your software name> 94FBR in google search and good luck.

Tuesday, February 22, 2005

File Comparison Software

  • ExamDiff: download free version from www.cnet.com
  • Files Comparer: from Embedding Scripts & Vector Graphics.
  • WinMerge is an Open Source visual text file differencing and merging tool for Win32 platforms. It is highly useful for determing what has changed between project versions, and then merging changes between versions.

Joda Time

Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API.

Saturday, February 19, 2005

Install PHP under Mac OS X

  • download apache 2 and install it under /usr/local/apache2 (default)
  • download and install mysql 4.1.10 into /usr/local/mysql
  • download php 5.0.3 source code
  • start apache and mysql
  • install libraries
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
libpng-1.2.16.tar.gz from http://www.libpng.org/pub/png/libpng.html
ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz
  • ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-gd --enable-gd-native-ttf --enable-mbstring --with-mysql=/usr/local/mysql --enable-zip --with-java=/Library/Java/Home --enable-gd-native-ttf
  • in httpd.conf add:
LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
  • in /etc/php.ini
include_path = /usr/local/lib/php
extension=mysql.so
extension=mbstring.so
mbstring.func_overload = 7

Thursday, February 17, 2005

Basic authentication with WebService and Apache Axis

In a recent project a had to access a WebService with Apache Axis with basic authentication.
In the simple case of using a WebService with Apache Axis, you have an instance of the class Call where you can set your authentication parameters:
    Service service = new Service();
Call call = (Call) service.createCall();
call.setUsername("myusername");
call.setPassword("mypassword");
With the WSDL2Java Tool and a generated ServiceLocator, it is not that obvious, how to setup basic authentication. The implementation of the Remote interface returned by the ServiceLocator extends the class Stub which has the same methods as the previous example. So the trick is to cast the remote interface to the concrete implementation:
    MySample mySample = new MySampleLocator().getMySample();
((Stub) mySample).setUsername("myusername");
((Stub) mySample).setPassword("mypassword");

This article was copied from http://jroller.com/page/kriede/20050211#basic_authentication_with_webservice_and

Wednesday, February 16, 2005

E-Mail Icon Generator

A very interesting website to generate GMail, Hotmail, MSN, Yahoo!, AOL and many more.

This one is just for gmail.

Tuesday, February 15, 2005

Diary Software

Splinterware has a couple of pieces nice software.

iDailyDiary
iDailyDiary - This diary has been designed around a simple page-for-a-day diary. Providing a simple interface that immediately gets you started taking daily notes, creating a journal, putting your thoughts into writing and much more. iDailyDiary provides a "richtext" editor and the ability to insert graphics, URL's and Hypertext links.

System Scheduler
System Scheduler - Scheduler to run applications, popup reminders and other useful tasks. Various scheduling options and ability to send keypresses to applications make this a really useful tool. The Professional version also includes extra features such as: reboot local and remote computer, logon or logoff automatically, lock/unlock console automatically and extra scheduling options.

Thursday, February 10, 2005

Monitoring Tomcat 5.5.x with JMX

To monitor your Tomcat instance with JMX start Tomcat with the following JVM parameters.

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9000
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

Then download MC4J and configure it to connect to Tomcat with the following string:

jmx:rmi:///jndi/rmi://localhost:9000/jmxrmi

Wednesday, February 09, 2005

Configure Tomcat

  • server.xml:
    1. Change webapps location:

    <Host name="localhost" appBase="/usr/local/bio1/data/webpage/tomcat/webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">

    2. Use mysql to control user info:

    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="org.gjt.mm.mysql.Driver"
    connectionURL="jdbc:mysql://localhost/tomcat"
    connectionName="tomcat" connectionPassword="Apachetomcat"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
  • web.xml under ROOT:

    <servlet-mapping>
    <servlet-name>org.apache.jsp.index_jsp</servlet-name>
    <url-pattern>/management.jsp</url-pattern>
    </servlet-mapping>

Tuesday, February 08, 2005

Google Maps

Google just lunched the beta version of google maps. I really like google.

Wednesday, February 02, 2005

Database Pooling

DbConnectionBroker is a pure Java package for handling multiple concurrent database connections. DbConnectionBroker creates a broker with a very simple interface for handing out and returning database connections from a configurable pool of connections. The Broker creates a dynamic pool of connections and manages them for you with a background housekeeping thread.