
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
It seems that the only way to count the number of 1’s or 0’s in a binary value is creating a loop that iterates on all the 16 or 32
‘ returns the last occurrence of a substring’ The syntax is similar to InStrFunction InstrLast(ByVal Start As Long, Source As String, search As String, _ Optional CompareMethod As VbCompareMethod =
There are a lot of risks involved in using End in VB programs: your databases might not be correctly closed, your objects are not correctly terminated, etc. You should always
Under some circumstances, an ActiveX DLL can pass private objects to its client application, for example a reference to a control that belongs to a form in the DLL. While
You should always modify a vertical scrollbar’s width and a horizontal scrollbar’s height to conform to the display resolution. You can learn the suggested size (in pixels) using the GetSystemMetrics
When testing a component in the IDE, always perform a full compilation. This ensures that VB checks the syntax of all the code in the component, which in turn guarantees
‘ Return True if a directory exists’ (the directory name can also include a trailing backslash)Function DirExists(DirName As String) As Boolean On Error GoTo ErrorHandler ‘ test the directory attribute
‘ Return True if a file existsFunction FileExists(FileName As String) As Boolean On Error GoTo ErrorHandler ‘ get the attributes and ensure that it isn’t a directory FileExists = (GetAttr(FileName)
Const LF_FACESIZE = 32Private Type LOGFONT lfHeight As Long lfWidth As Long lfEscapement As Long lfOrientation As Long lfWeight As Long lfItalic As Byte lfUnderline As Byte lfStrikeOut As Byte
The call ‘select * from ‘ becomes costly when tables have a lot of fields. Because every data field would be required to be sent across the network (or processed)
Several developers have complained that in order to use Visual Studio 6.0’s online help, they must keep the MSDN Library CD in their CD-ROM drive, or copy all 680 MB
Redirecting based on the time of day is fairly easy to do. One thing to remember, however, is that because client-side JavaScript runs in the user’s browser, the time your
The Standard does not specify the memory layout of base class subobjects in a derived class. In practice, however, all C++ compilers use the same convention: The base class subobject
If you use the VB development environment in MDI mode (the default) and you like your code windows maximized, you might have noticed that, unlike VB5, VB6 doesn’t remember this
Question: For the same global function, what’s the difference between placing it in a global module and in a class module?Are there any performance issues involved? If so, which way
Question: Is there a way to round numbers to the nearest multiple of n, where n could be any number? For example, if n = 5, it would round 8
Question: I have a VB app which formats a large text file and then prints it using MS Word. I need to include what amounts to a thick underscore in
Question: I have an ActiveX dll into which I can pass an existing ImageList containing a set of images. This works fine and means that I only have to maintain
Question: In an event, I declared a dataobjectvariable and instantiated it this way : Dim do_1 as dataobject Set do_1= New dataobject But when I run the program I get
The C++ Standard guarantees that within every instance of class Date, data members are set down in the order of their declarations (static data members are stored outside the object
You can easily create a function that redirects to a different page depending on a user’s choice of OK or Cancel. You should use JavaScript’s confirm command and then based
If a class contains non-serializable variables, and you need to preserve the state of those variables, you will have to customize the default serialization behavior of the class. You can
One of the less commonly used keywords in the Java language is transient. The transient modifier came into effect in JDK 1.1. It indicates a field that is not a
The Serializable interface is a marker interface–in other words, it contains no methods. Its purpose is to categorize the classes that may be serialized using Java’s serialization API. Only the
You can enable and disable triggers on tables for SQL Server 7.0. This means you don’t need to drop triggers and recreate them if some process (which requires that triggers
Database backups from one MS SQL Server (server1) could be used to create a copy of the database on another MS SQL Server (server2). But existing user to login mappings
The easiest way to make ensure that a user picks a value from a dropdown list is to add a value to the top of the list that isn’t really
C code, which of course is unaware of object semantics, can access the data members of a C++ object directly, but certain requirements must be met. There are some guarantees
You can use ODBC settings to avoid truncation warnings from MS SQL Server. These warnings occur when the application tries to insert or update data that is larger than its
Piped streams are typically used in separate threads. One thread writes output to a PipedOutputStream. The other thread reads the same data from a PipedInputStream. The two streams are connected
