We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

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.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

DevX

Making the Case for Local Database and Synchronization

Editor’s Note: Martyn Mallick is a wireless solutions evangelist at iAnywhere Solutions, a vendor of mobile database solutions. Though the article is not impartial, we have sought it for publication

DevX

Making a Cafeteria Plan

ven as wireless hardware diversifies (see sidebar “Inspecting the Ranks“), there’s a simultaneous convergence of sorts going on, but that convergence is happening inside devices, not outside. “The great thing

DevX

Heed the Siren Call of Wireless Development

here’s no lack of innovation going on in the wireless area and the technology is maturing fast. But still, the vast majority of developers have avoided taking the wireless plunge.

DevX

The DataTable’s Compute method

The DataTable class has a method, Compute, that executes SQL-like functions on the rows locally stored in the DataTable. It supports functions such as COUNT, SUM, MIN, MAX, AVG and

DevX

BackupDatabase – Backing-up a SQL Server database

‘ Backup the specified database.’ Note: requires Imports System.Data.SqlClient” Example:’ Dim connString As String = “server=(local); user id=sa; password=; ‘ Database=master;”‘ Try’ BackupDatabase(connString, “MyTestDB”, “D:MyTestDbBackup.bak”)’ Catch ex As Exception’ MessageBox.Show(ex.Message)’

DevX

RestoreDatabase – Restoring a SQL Server database

‘ Restore the specified database.’ Note: requires Imports System.Data.SqlClient” Example:’ Dim connString As String = “server=(local); user id=sa; password=; ‘ Database=master;”‘ Try’ RestoreDatabase(connString, “MyTestDB”, “D:MyTestDbBackup.bak”)’ Catch ex As Exception’ MessageBox.Show(ex.Message)’

DevX

Calculated columns that refer to relationships

The DataSet is a container of multiple DataTables, and it allows to create parent-child relationships between two tables, as shown below: ‘ create a relationship between the Categories and the

DevX

Choosing the Right swap() Implementation

wap() is one of those tricky algorithms that has several implementations, each of which offers its own advantages and disadvantages. In the following sections I will show why familiarity with

DevX

GetSystemUpTime – Retrieving the system’s up time

‘ Returns a TimeSpan for the interval of time the system has been up.’ EXAMPLE:’ Dim ts As TimeSpan = GetSystemUpTime()’ Console.WriteLine(String.Format(“The system’s up time is: {0} days, {1} ‘

DevX

DecodeBase64 – Decoding a string from base64

‘ Returns the input string decoded from base64Private Function DecodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Convert.FromBase64String(input) Return System.Text.Encoding.UTF8.GetString(strBytes)End Function

DevX

EncodeBase64 – Encoding a string to base64

‘ Returns the input string encoded to base64Private Function EncodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Text.Encoding.UTF8.GetBytes(input) Return System.Convert.ToBase64String(strBytes)End Function

DevX

Set Attributes in a Servlet Request

Usually, you set attributes in a session and the attributes are available through out the session. If you want to limit the scope of an attribute to just a request,

DevX

The Beans Class

The standard Java library contains a host of valuable methods. Many of these are hidden away, such as Beans.isInstanceOf.This method belongs to the java.beans.Beans class. However, it’s an object version

DevX

Implement Property File Attributes in Real Time

Say you need to change the behavior of your Java application depending on some parameters read from a properties or ini file (like batchMode, debugMode, etc.). You want to turn

DevX

Loading from the Classpath

If your application includes .properties files or images and you want to load them without hard-coding their location, store the files in the class path. Classes are stored in archive

DevX

Do Not Use CreateThread() when Using C-Runtime Functions

When writing multithreaded applications in the Windows Environment, you have two options for creating new threads: the C-runtime function _beginthread (and _beginthreadex) or the WIN32 API CreateThread(). If the thread

DevX

A Power Function for Integers

Need a quick and dirty way to exponentiate integers? Or perhaps you are working on a number library of your own. This will work in all cases. templateTYPE power(TYPE x,

DevX

Validating the Data Type in a T-SQL Query

Using the ISNUMERIC() and ISDATE() functions, you can check the required column’s data type validity. If the column passes the data type validity check, it will return a 1. If

DevX

How to Fail in One Easy Step

t’s daunting to come up with a topic of interest to a large group of readers?and then to write about it well. I know it’s impossible to please everyone, but

DevX

Peek Into the Future of XSLT 2.0

xtensible Stylesheet Transformations, or XSLT, has received decidedly mixed reviews from developers. Although XSLT has many evangelists it has its detractors as well. Because of some concepts, such as static