Today I want to share an SQL Server 2005 stored procedure to make autonumber. This stored procedure provide two numbering templates.
autonumber template #1: ..
autonumber template #2: <1DIGIT-YEAR><1DIGIT-MONTH>.
Today I want to share an SQL Server 2005 stored procedure to make autonumber. This stored procedure provide two numbering templates.
autonumber template #1: ..
autonumber template #2: <1DIGIT-YEAR><1DIGIT-MONTH>.
Today I created a script to compare the contents of two folder including its subfolders. It’s a simple solution if you don’t want to buy folder comparator software, but the script will not compare the content of the file, it only compares the file size and last modified date.
Click read more to see the script
(more…)
Since Windows rename command doesn’t support regular expression, so today I made a VB Script to batch rename multiple files using regex method.
What is Regular Expression?
Basically, a regular expression is a pattern describing a certain amount of text. Their name comes from the mathematical theory on which they are based. But we will not dig into that. Since most people including myself are lazy to type, you will usually find the name abbreviated to regex or regexp. I prefer regex, because it is easy to pronounce the plural “regexes”.
Click read more to see the script
(more…)
I’ve created a javascript code to show sliding image on the web (youtube-like video preview).
Requirement
To use the script you need an HTML and Javascript Editor, I’m using Adobe Dreamweaver. You may need 6 jpg image files (to try an example below), and ofcourse a web browser.
Click read more for see the script.
(more…)
Microsoft Windows XP Pro has built in Web Server called Internet Information Service (IIS). In order to use the feature, make sure your IIS service already activated:
IIS Installation
To install IIS Service, follow these instructions to activate it:

Create a Virtual Server
Check on the Web Sites folder in IIS management console, you may see only “Default Web Site”. If you are a web developer, sometime you need to have another separate web servers. Of course you can also mount a virtual directory to the server, but it will never have root path.
PHP server provide a method in which it can establish socket connection to communicate with other server. Many software applications including web server, instant messaging, and peer to peer file sharing systems rely on sockets. In other words, you can possibly create any web based application, ie. instant messaging client purely in PHP.
Open Connection
The basic function to open a socket connection is fsockopen(). You can establish a connection in just one line of PHP code, pretty simple uh?
//this method will open a connection and store a file handler to $fp variable,
//you can use fgets/fputs on it then later,
//if something goes wrong, you can check $errno and $errdesc variable
$fp=fsockopen("www.host.com",80,$errno,$errdesc);
After we established a connection, let’s close it by using fclose() method.
$fp=fsockopen("www.host.com",80,$errno,$errdesc);
fclose($fp);
Sending a Request
Now I will show you how to send a data (request) to a server and then check the response returned by the server. Once we open a socket, you can send any data to it, and wait for the response.
Java provide a framework API which enables audio, video and other time-based media to be added to applications and applets built on Java technology. We can use The Java Media Framework API (JMF) to capture video/images from a webcam device.
Above picture explains how JMF works, first we initialize capture device, and then create a datasource object, bind it to player object, and display it to user on JFrame window (the TV). Now I will demonstrate you how to implement it.
Requirements
Click read more to see the code!
You can grab data from web URL, here is 2 methods we can use.
1. Using IE Instance
The first method using IE instance
pros:
cons:
Function IEGetRequest(URL)
'Create IE Instance
Dim IeInstance
Set IeInstance = CreateObject("InternetExplorer.Application")
'Uncomment the next line to see IE window
'IeInstance.Visible = True
IeInstance.Navigate URL
Do While IeInstance.Busy
Wait 1, "Waiting " & URL
Loop
'Get the response
On Error Resume Next
IEGetRequest = IeInstance.Document.Body.innerHTML
IeInstance.Quit
End Function
Sub Wait(sec, msg)
On Error Resume Next
Dim Shell
If IsEmpty(Shell) Then
Set Shell = CreateObject("WScript.Shell")
End If
Shell.Popup msg, sec, "", 64
End Sub
' Test the function
MsgBox IEGetRequest("http://www.yahoo.com/")
I found a solution to import Access Data to SQL Server easily using SQL Server Migration Assistant (SSMA) for Access. This is a free tool from Microsoft that comes with three versions (Access, Oracle, and Sybase).