Archive for July, 2008

Agile

Tuesday, July 8th, 2008 Posted in Software Engineering | Comments Off

Infrastructure Development Environment Eclipse Version Control Subversion Project Tracking XPlanner Issue Tracking jTrac Application Server (Dev) Tomcat Application Server (Prod) JBoss Business Tier Container Spring Framework Contineous Integration CruiseControl Build Ant Documentation Wiki Database (Dev) HSQL Database (Prod) PostgreSQL Persistence Framework Hibernate Read more..

General Information

Monday, July 7th, 2008 Posted in Embedded Systems | Comments Off

Embedded Operating Systems Windows Embedded CE Windows XP Embedded Linux VxWorks pSOS QNX Palm OS DOS only Windows Embedded for Point of Service CPU Architectures ARM MIPS PowerPC SH x86 Embedded Devices Application Areas ATM Consumer Electronics Content Delivery Networks Digital Camera Digital Imaging via printer, copier, scanner or fax Gaming or ... Read more..

TimerFilter : A Simple HTTP Servlet Filter

Monday, July 7th, 2008 Posted in Java | Comments Off

import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class TimerFilter implements Filter { public void destroy() { System.out.println("destroy"); } public void doFilter(ServletRequest req, ServletResponse res, FilterChain filterChain) throws IOException, ServletException { System.out.println("doFilter"); long startTime = System.currentTimeMillis(); filterChain.doFilter(req, ... Read more..

A JSP to Pre-Compile JSPs

Monday, July 7th, 2008 Posted in Java | Comments Off

<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page import="javax.servlet.*"%> <%@ page import="javax.servlet.http.*,javax.servlet.jsp.*"%> <%@ page import="java.util.Set,java.util.Iterator,java.io.IOException"%> <%! private void compileAllJsps(PageContext pageContext, JspWriter out, HttpServletRequest request,HttpServletResponse response, String uripath) ... Read more..

Object Oriented JavaScript

Wednesday, July 2nd, 2008 Posted in Html-JavaScript | Comments Off

<script language="JavaScript"> function Person(first, last) { this.init(first, last); } Person.prototype.init = function(first, last) { this.first = first; this.last = last; }; Person.prototype.toString = function() { return this.first + " " ... Read more..

Auto Image Refresh

Wednesday, July 2nd, 2008 Posted in Html-JavaScript | Comments Off

<script language="javascript"> function RefreshImage(){ document.webcam.src="http://yourdomain.com/webcam.jpg?a=" + String(Math.random()*99999999) setTimeout('RefreshImage()',500); } </script> <body onload="RefreshImage()"> <img name="webcam" src="http://yourdomain.com/webcam.jpg"> </body> Read more..

A Simple Reflection Example

Wednesday, July 2nd, 2008 Posted in Java | Comments Off

import java.lang.reflect.Method; public class SimpleReflection { public static void main(String[] args) throws Exception { // ================================================ // The code in this method is equivalent to the following lines of code // ------------------------------------------------- // reflection.Echo echo = ... Read more..

Logon to a Remote Machine and Write File using jCifs

Wednesday, July 2nd, 2008 Posted in Java | Comments Off

import jcifs.smb.NtlmPasswordAuthentication; import jcifs.smb.SmbFile; import jcifs.smb.SmbFileOutputStream; public class Logon { public static void main( String argv[] ) throws Exception { String user = "user:password"; ... Read more..

Ntlm Password Authentication using jCifs

Tuesday, July 1st, 2008 Posted in Java | Comments Off

// Dependencies // (1) jcifs-1.2.9.jar import java.net.UnknownHostException; import jcifs.UniAddress; import jcifs.smb.NtlmPasswordAuthentication; import jcifs.smb.SmbAuthException; import jcifs.smb.SmbException; import jcifs.smb.SmbSession; public class Test01 { public static void main(String[] args) { boolean userAuthenticated = false; String authenticationMessage = ""; try { String domainController = "subdomain.domain.com"; UniAddress dc = ... Read more..

Retrieve Database Table Names

Tuesday, July 1st, 2008 Posted in Java | Comments Off

import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.Driver; import java.sql.DriverManager; import java.sql.ResultSet; import java.util.HashSet; import java.util.Set; public class TableNames { public static void main(String[] args) { Connection conn = null; try { conn = getConnection(); Object tableNames[] = getTableNames(conn).toArray(); for (int i=0; i<tableNames.length; i++) { System.out.println(tableNames[i]); } } ... Read more..