Wednesday, June 30th, 2010 | Author: J. Lawson-Bradfield

image

Great no matter if it’s the major leagues or minor…

Category: Personal  | Leave a Comment
Friday, June 11th, 2010 | Author: J. Lawson-Bradfield

image

And the cup rolls by us. Way too packed and hot but still worth it for a bit of history

Category: Personal  | Leave a Comment
Sunday, June 06th, 2010 | Author: J. Lawson-Bradfield

image

Just a simple fellow rescued from a shelter, but by night he’s Bat-Dog!

Category: Personal  | Leave a Comment
Saturday, June 05th, 2010 | Author: J. Lawson-Bradfield

There are a million posts out there that cover how to make an ISO image of a CD/DVD. For some reason I was having a particularly hard time with a specific disk. It had long file names, funny folder structures and I kept getting all uppercase file names. I tried the stock dd if=/dev/cdrom of=~/[file-name].iso first and found that it was just not cutting it. The below seemed to work the best on multiple CDs and formats.

mkisofs -r -J -l -d -allow-multidot -allow-leading-dots -joliet-long -no-bak -o ~/[name-of-file-or-disk].iso /media/[source-folder]

Category: Linux, Technology  | Leave a Comment
Tuesday, May 25th, 2010 | Author: J. Lawson-Bradfield

Pictures from Jamaica are the photos page. For right now (due to incompatible versions of Wordpress and a better photo manager I prefer) the gallery may act a bit funny…

Category: Personal  | Tags:  | Leave a Comment
Wednesday, May 19th, 2010 | Author: J. Lawson-Bradfield

This article caught my eye as I was playing catch-up on my RSS subscriptions….
http://www.handlewithlinux.com/android-reverse-ssh

Category: Linux, Technology  | Tags: , ,  | Leave a Comment
Tuesday, April 06th, 2010 | Author: J. Lawson-Bradfield

In my recent development/project endeavors I have had a keen eye on error messages and their contents. This had lead me to a common practice of paying closer attention to error messages and the user experience from both a technical perspective (always in my mind) to the non-technical end user. I was rather surprised to see this error from Chrome (I know, blast me later, it’s been an interesting experience) and I can’t say what my opinion is on this one.

ChromeError

Category: Personal  | Leave a Comment
Wednesday, March 17th, 2010 | Author: J. Lawson-Bradfield

InterPortletCommunication

Sunday, February 28th, 2010 | Author: J. Lawson-Bradfield

Note: I wrote this back some time ago (27th, February 2007) on another site but thought this warranted a re-post. Much has been done by way of AJAX frameworks, IDEs, stadards etc but I feel that the basics are still important and provide the foundation for understanding.

I’ve been intending to write this article for a while now. This desire started close to a year ago after attending several break-out sessions at Java One. It was one of these specifically that the core of what AJAX was and is was detailed out. The following is an attempt to give a basic tutorial on how to get started. Please note that I’m assuming a decent knowledge of Java Script and events.

Contrary to what I found in more than one Google search, AJAX is rather simple. What i found was that the majority of it all is related to one simple and small key piece. XMLHTTPRequest (or for those that are forced to code for I.E. the ActiveX object Microsoft.XMLHTTP) is the key component that make this whole thing go. The rest is just the “extras”.

First off, this “event” will be captured using the onChange() Java Script function within the <select> tag. If you are not familiar with Java Script events or at least this event, please check out the tutorial at QuirksMode or a Google search for JavaScript Events.

Now let’s assume that we have already created a web accessible script or something that produces a document that is structured like the following.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<code>ID or Code</code>
<display>Display Value</display>
</response>

And next we make a request to a server for information based on this data. Now we see where XMLHTTPRequest comes into play. This simple “function” will look to retrieve XML from a specified source and return it all without reloading the browser window. The following code will give you an idea of what’s going on:

if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = processReqChangeXML;
req.open("GET", sendURL, true);
req.send(null);
}

This brings us to the step of capturing the event using the ReadyState value from our “req” variable earlier. The following is a snippet from a library I created and detail below.

if (req.readyState == 4) {
//-- only if "OK" from web server
if (req.status == 200) {
response  = req.responseXML.documentElement;
response.getElementsByTagName('display')[a].firstChild.data;
}
}

At this point you should be looking at two functions and a script that produces an XML document. The rest of our work is simply putting all the pieces together. Now at this point you may be lost so let’s get some actual code together. Start off by downloading this AJAX library written for a series of applications over the last few months. Make sure you have your XML producing script ready and running. Paste the following in an HTML page and add a couple of values for the dropDown1 select box.

<select name="dropDown1"
id="dropDown1"
onChange="loadXMLDoc(this.form, 'dropDownCode', this.value, '/scriptName.php');" >
<option value=""></option>
</select>
<select name="dropDownSelect" id="dropDownSelect">
<option value="">Please select from above list</option>
</select>

Please let me know what issues you run into. The AjaxLib.js file is meant to be minimalistic and also meant as a tutorial aid. Good luck and have fun.

Tuesday, February 23rd, 2010 | Author: J. Lawson-Bradfield

Who rides this to Home Depot on a Saturday? And not a warm one I might add…

Category: Personal  | Leave a Comment