Using the Assert Macro
Question: I am not sure if it is good when I use the assert macro in the following code: int sum(int number)// Precondition: number => 1// Postcondition: return sum from
Question: I am not sure if it is good when I use the assert macro in the following code: int sum(int number)// Precondition: number => 1// Postcondition: return sum from
‘ return a file path not longer than the number of character’ specified in the 2nd argument” If necessary, it replaces directory names with ellipsises” Author: Fred Block’ CuzWare Systems’
Private Type POINTAPI x As Long Y As LongEnd TypePrivate Declare Function SetPixel& Lib “gdi32” (ByVal hDC As Long, _ ByVal x As Long, ByVal Y As Long, ByVal crColor
‘ —————————————-‘ The Rotator class module” A class for printing rotated text to a ‘ Form, PictureBox or the Printer” Author: Timm Dickel ([email protected])” —————————————-‘ Usage:’ Dim rotTest As New
Private Declare Function OemKeyScan Lib “user32” (ByVal wOemChar As Integer) As _ LongPrivate Declare Function CharToOem Lib “user32” Alias “CharToOemA” (ByVal _ lpszSrc As String, ByVal lpszDst As String) As
Option Explicit’————————————————————————‘ This enum is used by both InstrWordEx and ReplaceWordEx” It uses a binary value to determine what separator characters are allowed’ bit 0 = allow spaces’ bit 1
Private Type OSVERSIONINFO dwOSVersionInfoSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformId As Long szCSDVersion As String * 128End TypePrivate Declare Function GetVersionEx Lib “kernel32” Alias
‘————————————————————————‘ This enum is used by both InstrWordEx and ReplaceWordEx” It uses a binary value to determine what separator characters are allowed’ bit 0 = allow spaces’ bit 1 =
You should prefer to use the MapPath() method of the Server object instead of hard coding the complete literal paths in ASP applications. The MapPath() method allows you to physically
Question: I’m looking to make an online contact list without creating a whole new ASP page for my company. I was thinking that I could simply put the Outlook contact
Question: I have two databases and two tables in them have the same structure (same columns etc.). How do I copy some rows from one database to another? Both tables
Question: We are sending over 50K of outgoing e-mails an hour. Today the queue fills and we can only handle about 20K an hour. At some point the mail server
Question: I’m curious if you or anyone else has successfully created a data warehouse in SQL Server 7.0, using DTS to import/extract info from Informix, running Elite time/billing application? Answer:
Question: If I set up a delegate and they send a message on my behalf, the reply goes to my delegate. How can I force the reply to come to
You can use HTML forms to provide an efficient interface for collecting user information. You can include various types of controls like textbox, check box, buttons, listbox, and so forth
Question: Is there any way to get more than 255 objects on a VB form? Answer: No, there’s not a way to pass the limit of 255 objects per form.
Question: When using printer.print statements to send output directly to the printer, it used to be possible in QB PDS to use something like “printer.print format(number, “###,###.00”) to get right
Question: I have connected a form to the DB using an ADODC. I connect fine, I can read the DB if I put a literal in my sql: recordsource =
Question: I am developing an application in VB6 that uses its own DB. I need to link my application’s DB with clients’ DBS or even ERP systems. Therefore, I need
Question: Here’s some simple code in Test.bas: Public Type MY_RECORD Field1 as String Field1 as StringEnd Typein frmTest.frmGeneral DeclarationsPrivate mArrayOfRecords() as MY_RECORDForm_Load ‘this line of code BOMBS If IsEmpty(mArrayOfRecords) then
Question: I have a little problem which I can’t solve. I will give the question with an example. I’m working with Excel. In a cell the string “100dpi.txt” is written.
Question: How can I check to see if a file is in use/open? Answer: An easy way to do this is to attempt to open the file for writing. If
You can use Java’s layout managers to maintain the relative position of objects in an applet without manually repositioning them as the applet’s size changes. However, you may occasionally want
Normally, you declare functions and classes in a .h file and place their definition in a separate .cpp file. With templates, this practice isn’t really useful because the compiler must
It’s customary to use output statements as a debugging aid. For example, displaying the name of a function that is currently in scope or printing a variable’s value on the
While working with controls in HTML forms, you can assign ID as well as NAME attributes to the controls. You can then access both ID and NAME attributes through client-side
I recently received a question from a reader who asked how to sort a large file. My solution was based on the qsort() algorithm, which is the only sorting algorithm
In following expression: if (ticket_price > 7.50) What’s the type of the literal 7.50? One might think that it’s float. However, the actual type is double. To force the compiler
The operators static_cast and reinterpret_cast are similar: they both convert an object to an object of a different type. However, they aren’t interchangeable. Static_cast uses the type information available at
If you are developing Web pages that provide HTML forms to the user, then you may notice that many times invalid data gets submitted. To reduce such invalid input, you