November 13, 2007

Keep Your Run Menu Open to View Its Output

When you run some commands in the Run Menu, it closes before you can view the output. Here’s a small trick to make the window stay open after the execution of the command: execute the command prefixed with %comspec% /K. For example, the IPCONFIG command would be be run as,

Using the &ltidbag&gt Element in Hibernate

Hibernate’s facility allows you to map many-to-many associations and collections of values to a single table with a surrogate key. The following code shows an example of mapping: &ltidbag name=”cars” table=”CARS”&gt Done!

Invoking a Client-side JavaScript Function from the Server-side Code

.NET allows you to call a JavaScript function from the server-side code. For example, suppose you want to to display a message box to the user. This can be accomplished in two steps: Write a JavaScript function in the HTML view of the page inside the &ltHEAD&gt elements as shown

Create Domain-Specific Languages with ANTLR

he concept of Domain-Specific Languages (DSLs) has been around for years, but has recently experienced an uptick in popularity. This is due in large part to the success of Ruby on Rails, which exploits the Ruby programming language and its meta-programming capabilities to encourage the development of programs that closely