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.
‘ Rotate an image by a specified angle (in degrees)’ The x and y parameters are the coordinates of the upper-left point’ Note: requires Imports System.Drawing.Imaging” Example:’ Dim gr As
‘ This routine demonstrates how to create an Enhanced Metafile (EMF) from a ‘ bitmap image, contained in a PictureBox.’ You must use a PictureBox control, since the Image control
‘ Return the date of the Monday for a specified week..’ This function can be tweaked to return any weekday. I use it in Access to’ subdivide reports into weekly
AUTH_TYPE request.getAuthType()CONTENT_LENGTH request.getContentLength()CONTENT_TYPE request.getContentType()DOCUMENT_ROOT getServletContext().getRealPath()PATH_INFO request.getPathInfo()PATH_TRANSLATED request.getPathTranslated()QUERY_STRING request.getQueryString()REMOTE_ADDR request.getRemoteAddr()REMOTE_HOST request.getRemoteHost()REMOTE_USER request.getRemoteUser()REQUEST_METHOD request.getMethod()SCRIPT_NAME request.getServletPath()SERVER_NAME request.getServerName()SERVER_PORT request.getServerPort()SERVER_PROTOCOL request.getProtocol()SERVER_SOFTWARE getServletContext().getServerInfo() HTTP_XXX_YYY Variables of the form HTTP_HEADER_NAME can be accessed using the request.getHeader(Header-Name) Example:
Public Function GetHtmlString(rs)Dim StrHtmlDim FldLimiter,RowLimiterFldLimiter=””RowLimiter=””If Not rs.EOF ThenStrHtml=”” ‘Table Tag’Prefix for 1 col valueStrHtml=StrHtml & “”StrHtml=StrHtml & rs.GetString(2,-1,FldLimiter,RowLimiter)’Trim of the Last StrHtml=Left(StrHtml,Len(StrHtml)-Len(“”))’Close TableStrHtml=StrHtml & “”End IfEnd Function Usage: Response.Write(GetHtmlString(rs))
IN tblTicker table we have following fields: [CompanyID] INT IDENTITY (1,1) [TickerSymbol] [char] (10) NULL [ClassOfShare] [char] (10) NULL We inserted some rows and deleted some from table tblTicker.Now At
This tip is useful when debugging and testing complex stored procedures that have a lot of business logic. It helps to find out exactly what is being returned from a
This technique allows you to delete the contents of a List at the same time you are storing pointers a list. This same approach can be used for maps or
The const keyword in C++ provides a type-safe way to replace some of those #define preprocessor statements that you’re used to writing from C.Whenever you have a value that you
This task is quite common task. However, explicit insertion of values can be unacceptable in many cases?like if you need to insert a lot of values. I’ve found that it’s
When you construct an object using new, you have no control over where it gets created in the heap. What if you want the object to be placed at a
For some programs, it is helpful to create a listener to keep track of all the events being dispatched by the UI. This can be very useful in debugging programs.
ew people know this, but when PHP as we know it today was being molded, back in the summer of 1997, there were no plans for it to have any
Indexes are critical to smooth data retrieval and manipulation in SQL Server. They are the way foreign keys maintain relationships among themselves and the way DB pros enforce order on
Java swing provides a Timer class to cause an action at a pre-defined rate. For instance, you could have a label that blinks at a pre-defined rate. The class has
To do this, you need the javax.mail package. It’s a part of J2EE and available from java.sun.com.Sending a simple e-mail is pretty easy: import java.util.Properties;import javax.mail.*;import javax.mail.internet.*;public class Mail {static
Use Flash’s robust printing support to add print functionality to your Flash movies or Web applications. By using off-screen movie clips and ActionScripts movie clip copying commands, you can create
Whether it is a word-processing application that saves documents to a disk, a utility that remembers its configuration for subsequent use, or a game that allows players to assume world
Implementing Object Pooling with .NET Remoting Part I As you probably know, Object Pooling is a powerful feature available when hosting .NET or COM components in a COM+ application. I
‘ Create an XmlElement object with inner text and make it a child of another ‘ XmlNode.’ Note: requires Imports System.XmlFunction CreateAppendElement(ByVal parentNode As XmlNode, ByVal name As String, _
‘ Deserialize an object from a file in SOAP format.Function LoadSoapData(ByVal path As String) As Object ‘ Open a file stream for input. Dim fs As FileStream = New FileStream(path,
‘ A reusable function that does object cloning’ by serializing it to a memory streamFunction CloneObject(ByVal obj As Object) As Object ‘ Create a memory stream and a formatter. Dim
‘ Display a XML file in a TreeView’ Note: requires Imports System.Xml’ Example: DisplayXmlFile(“employees.xml”, TreeView1)Sub DisplayXmlFile(ByVal filename As String, ByVal tvw As TreeView) Dim xmldoc As New XmlDocument() xmldoc.Load(filename) ‘
‘ Serialize an object to file in SOAP format.Sub SaveSoapData(ByVal path As String, ByVal o As Object) ‘ Open a file stream for output. Dim fs As FileStream = New
‘ A module for evaluating expressions, with support for’ parenthesis and many math functions’ Example:’ Dim expr As String = “(SQR(9)^3)+COS(0)*3+ABS(-10)”‘ txtResult.Text = Evaluate(expr).ToString ‘ ==> 27+3+10 ==> 40 Imports
The Component Services MMC gives you an easy way to export and import COM+ applications. However, if you want to export the entire COM+ catalog to one or more systems
n my last article, I demonstrated how to build an Explorer-like tree control using JavaScript. This month’s installment focuses on converting the tree control to an object-oriented structure. Such a
November 8, 2002?Microsoft chose the venue of the OOPSLA conference, being held this week in Seattle, to reiterate what company officials called “Microsoft’s commitment to computer science” and to announce
More than ever before, corporations are clamoring to evaluate their security architectures and identify any gaps. The Java platform, and specifically the J2EE platform, provides some of the most robust
hen I had to write my first NT service, I went to MSDN and looked for samples. There, I found “Creating a Simple Win32 Service in C++, an article by











