Tip Bank

DevX - Software Development Resource

Setting Logger Output with FOP

The following code demonstrates how to set a logger for FOP. You can send the logger’s messages to the System.out or in a file like this: //to System.outLogger logger=new ConsoleLogger(ConsoleLogger.LEVEL_INFO);fop.setLogger(logger);MessageHandler.setOutputMethod(MessageHandler.SCREEN);MessageHandler.setScreenLogger(logger);

DevX - Software Development Resource

Read an XML Document with the StAX Iterator API

This tip shows an example of how to use the Iterator API to read from an XML file: import javax.xml.stream.*;import javax.xml.stream.events.*;import java.io.*;public class StAXBasicEventReader{ public StAXBasicEventReader(){} public static void main(String[]

DevX - Software Development Resource

How To Debug Classic ASP Pages in VS 2005

VS 2005, like its predessor, does not allow debugging for classic ASP pages, by default. This forces you to attach the ASP worker process (w3wp.exe). Follow these steps: Enable ASP

DevX - Software Development Resource

Using the onMouseDragged Event in JavaFX

It’s easy to implement a nice dragging effect in JavaFX, using the onMouseDragged event in conjunction with the bind operator (incremental and lazy evaluation of attributes operator). import javafx.ui.canvas.*;import javafx.ui.*;import

DevX - Software Development Resource

Converting Numbers to Strings

Instead of writing your own function to convert an integer or float to a string, just use the C++ class stringstream (in the sstream header). In C++: #include #include #include