June 9, 2009

Hudson Continuous Integration Server

ohsuke Kawaguchi, a staff engineer at Sun Microsystems, released Hudson in February of 2005. Since that time, Java developers have adopted Hudson as their continuous integration server in greater and greater numbers. From February 1 through February 7 of this year, users downloaded Hudson 2855 times. Java developers use Hudson

Use a Validator to Validate a DOMSource

This code snippet creates a Validator that you can use to validate an XML document represented as a DOMSource. //create a DocumentBuilderFactory objectDBF=DocumentBuilderFactory.newInstance(); //activating namespaces supportDBF.setNamespaceAware(true); //create a DocumentBuilder objectDB=DBF.newDocumentBuilder(); //get the Document from XML documentD=DB.parse(new File(XMLdoc)); //create a SchemaFactory objectSchemaFactory SF=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); //create a Schema objectSchema S=SF.newSchema(new File(“schema_name.xsd”)); //create a

How to Disable the Focus Rectangle on WPF Controls

When a WPF control gains the focus, it displays a dashed box around itself to indicate that it has the focus. In some cases, the focus rectangle can detract from the design of the program. To disable this box, add the attribute FocusVisualStyle=”{x:Null}” to a control. To re-enable it, set

Create a Popup Calendar in ASP.NET

This example assumes the main page from which users will pop up the calendar is named Calender.aspx. The following procedure shows how to create the popup calendar: In Calendar.aspx, add these controls: LinkButton Create a TextBox to display the selected date: Place the following JavaScript function in the Calendar.aspx page:

Getting Better Sound Capabilities in .NET 3.0

The .NET Framework includes a SoundPlayer class (in System.Media) that can play sound files. However, this class suffers from two crippling limitations: it can play only PCM-encoded WAV files, and it can play only one sound at a time. For example, if you start playing a long sound, and then

Error Using JavaScript’s this Keyword

Even though this is a reserved word in JavaScript, the following code fails… with(parent){…this.window.event…} …because it can’t back out of parent. The workaround is to assign the window object to a variable first: o=window; with(parent){…o.event…} That works, although it’s clumsy. Author’s Note: This was fail-tested on the Microsoft Internet Explorer