Tip Bank

DevX - Software Development Resource

Optimizing Loops in JavaScript

Not all JavaScript loops are identical. Try the code below by pasting the HTML in this tip into a file and then opening the file in your browser. You should

DevX - Software Development Resource

Unzipping an Archive from a Servlet

package com.extensions;import java.io.IOException;import java.io.File;import java.io.PrintWriter;import java.io.FileOutputStream;import java.io.FileInputStream;import java.io.OutputStream;import javax.servlet.ServletException;import javax.servlet.ServletContext;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpSession;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import java.util.zip.ZipEntry;import java.util.zip.ZipFile;import java.util.zip.ZipInputStream;import java.util.StringTokenizer;public class ExtractZipsServlet extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse

DevX - Software Development Resource

Automating Visual Studio Solution Builds

You can make Visual Studio build a solution automatically at certain time of the day using a batch file. In the example below, devxtry.sln is the name of the solution

DevX - Software Development Resource

Using the EXISTS Command in SQL

Suppose you wanted to retrieve the department number (deptno) and name (dname) fields for employees in an emp table. One way to get the values is with this SQL query:

DevX - Software Development Resource

New IDE Feature in VS 2008: Tracepoints

When editing in Visual Studio, you would normally write a MessageBox.Show or a Console.Writeline to log the value of a variable. But you can eliminate that work now. Instead, try

DevX - Software Development Resource

An Alternative Way to Lock Your Computer

Here’s an alternative way to lock your Windows computer. Right-click an empty spot on the desktop, and select New ? Shortcut. In the Create Shortcut dialog box, type or copy

DevX - Software Development Resource

Run a Partial Query in TOAD

To run only a portion of a large SQL or PL/SQL query in TOAD, you can press Shift+F9 to run the specific part of the query situated at your cursor.

DevX - Software Development Resource

Customize Window Layouts in Visual Studio

Microsoft Visual Studio (VS) comes with four window layouts: Design, Debug, Full Screen Mode, and File mode. You can alter these layouts through the General Development Settings dialog, which allows