Search
The Way of the Software Engineer

Archive for September, 2007

Regular Expression Checker

Posted by admin on September 24th, 2007

function checkRegEx() { var myoutput = document.getElementById(“outout”); var expression = document.getElementById(“regex”).value; var data = document.getElementById(“data”).value; var matches = data.match( expression, “gi” ); if( !matches ) { myoutput.innerHTML = “No Matches found”; } else { var tmp = “”; for( i=0; i < matches.length; i++ ){ tmp += i + ” ” + matches[i] + ” [...]

Green Code

Posted by admin on September 22nd, 2007

Many hard engineering fields see the impact of their work on the environment directly. Using sustainable materials in your products implies that they’re better for the environment than they might otherwise be. How does this translate to software engineering? Certainly, there are the direct contributors. The maintainers of the linux ACPI kernel module that allow [...]

Java 1.6 on OS X

Posted by admin on September 21st, 2007

Apple has a build of java 1.6 available through the Apple Developer Connection site. The build is pretty recent (1.6.0-dp-b88-34) and includes a complete JDK. The package can be installed through the normal GUI method, or by the installer command line utility: `sudo installer -pkg JavaSE6Release1.pkg -target “/” `. However, once this is installed it [...]

Java and XML

Posted by admin on September 17th, 2007

A fellow engineer asked me about parsing XML in Java and I handed them this utility class I wrote a while ago. The class fit her need so well, she suggested I post it for others to use. It’s only a few lines of code, but it is useful. I find the nodeListTree2Hash method to [...]