Tip Bank

DevX - Software Development Resource

The generate() Algorithm

You can use the generate() algorithm to fill up a sequence container with values that you generate by repeatedly calling a function. This algorithm takes three arguments. The first two

DevX - Software Development Resource

Deselect All Items in a ListView Control

You must set Checked property for each ListViewItem to False to clear all the checked items. ‘Declare the ListViewItemDim lvItem As ListViewItem’ Change each item’s Checked property to FalseFor Each

DevX - Software Development Resource

Make Text Scroll Vertically

Use the following code to make text scroll vertically: Vertical ScrollerThis is Vertical Scrollerwww.devx.com

DevX - Software Development Resource

A Multiple Getter/Setter Implementation

Suppose you’ve got a user interface class with many user options that you need to set/get at the same time. Here’s one way to implement this: class CUI{public: CUI() :

DevX - Software Development Resource

Posting Forms Programmatically

Posting forms in Java is easy. All you need is just a HTML code snippet. Here’s an example: Your Email : * Message : *

DevX - Software Development Resource

How to Write, Use, and Test a Singleton Class

class Mysingleton{ private Mysingleton objsingleton = null; private Mysingleton() { } //single way to get its instance. public Mysingleton getInstance() { if(objsingleton == null) { objsingleton = new Mysingleton(); }

DevX - Software Development Resource

Get Separate Records for the Comma Delimited Values of One Field (TSQL)

Use this code: if object_id(‘tblTemp’)0 drop table tblTempCreate Table tblTemp (Field1 varchar(5),Field2 Varchar(100))insert into tblTempselect ‘C1’ Field1, ‘Value1,Value2’ Field2Unionselect ‘C2’ Field1, ‘Value3,Value4’ Field2 if object_id(‘tblTempOutPut’)0 drop table tblTempOutPutselect * into