Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!
Archive for June, 2008
SQL RS Known Issue
Posted by jinibyun on June 23, 2008
Fixing Reporting Services Errors (rsWrongItemType) in July CTP
If you’ve successfully installed Team Foundation Server and created a team project, you’ll likely see this on the home page of the team project portal site:
This is a known issue in the July CTP. To fix this issue, here’s the workaround you’ll need to do for each of the reporting Web parts:
- On the Web Part Menu, click Modify Shared Web Part.
- In the Page Viewer Toolpart, click Test Link. This will open a new browser window using the specified link, which will redirect to the correct page.
- In the browser, copy the URL of the page to which you were redirected.
- Paste the URL into the Link box in the Page Viewer Toolpart.
- Click OK.
Ultimately, what you’re doing is updating the link to point to the appropriate report. The link for each report will resemble the following:
Posted in SQLRS | Leave a Comment »
How Can I Use Javascript to Allow Only Numbers to Be Entered in a TextBox?
Posted by jinibyun on June 23, 2008
Posted in Javascript / Css | Leave a Comment »
The DHTML / JavaScript Calendar
Posted by jinibyun on June 23, 2008
Posted in Javascript / Css | Leave a Comment »
Convert VB.NET to C# online. Free code converter
Posted by jinibyun on June 23, 2008
Posted in C# | Leave a Comment »
Debug JavaScript with Firebug
Posted by jinibyun on June 23, 2008
Writing JavaScript is easy, but debugging is not due to the very limited debugging functionalities provided by the JavaScript language itself. One of such limitations is that there’s no effective way to display debugging message other than embedding a bunch alert boxes or a million lines of document.write in the JavaScript code. Fortunately, external debuggers can more or less help developers to overcome these limitations and make debugging more pleasant.
Preparation
As promised in the title, I am going to show you how to debug JavaScript using Firebug — the coolest web browser debugger on the net. Firebug’s JavaScript debugger allows you to set breakpoint, step through the code, and inspect variables as it step through it. Firebug is a Firefox extension, which means you will need to have Firefox installed somewhere. Install Firefox if you haven’t done so, and install Firebug extension from Firefox’s official site.
If you see a green check button at the bottom-right corner of your Firebox browser window, that means you have successfully installed Firebug.
Start debugging
We will use two file for this purpose: test.html and test.js. Test.html contains a link reference to test.js, and test.js contains the actual JavaScript we are going to debug. For your convenience, I put them into a zip file.
test.html
Debugging JavaScript using Firebug Debugging JavaScript using Firebug!
test.js
//implementing a stack, create a object
function Stack(){
this.list = [];
}
Stack.prototype.push = function(value){
this.list.push(value);
}
Stack.prototype.pop = function(){
return this.list.pop();
}
Stack.prototype.size = function(){
return this.list.length;
}
//create a custom toString function,
//event though Array object has its own
//we want to customize it a little bit
Stack.prototype.toString = function(){
var temp = '[ ';
for(var i = 0, length = this.list.length; i <= length; i++){ temp += this.list[i]; if(length - i != 1){ temp += ', '; } } temp += ' ]'; return temp; } var stack = new Stack(); stack.push(1); stack.push(2); stack.push(3); stack.push(4); stack.push(5); alert(stack.toString());
Nothing fancy about test.js. It provides an implementation of the Stack, which included some methods of a stack such as push and pop. The Stack object has a helper function called toString, which returns a list elements in the stack. For instance, suppose we have these values in the stack, 1, 2, 3, 4, toString will returns a formatted string like this: [ 1, 2, 3, 4 ].
Open test.html from Firefox, you should see a pop up alert box similar to this one:
Obviously something is wrong because the string “undefined” shouldn’t be there. In test.js, we pushed values 1 through 5 to the stack, so we expect toString returning [ 1, 2, 3, 4, 5 ]. Let’s use Firebug to debug this code and see what’s going on.
Debug by Setting Breakpoints
Since toString method of the Stack did not produce the right result, naturally, it becomes the target function of our debugging. To start:
- Toggle Firebug debug panel by click on the green check button.
- Switch to Script tab.
- Scroll down to line 22 and set a breakpoint at line 22 by click on the left sidebar as shown below.
- Reload the page.
The execution stopped at line 22. At this point, you can gather many valuable information to debug your script. Instead of using the old fashion alert pop up or document.write, you can now inspect the value of each variable by hovering your mouse pointer over it. As you are doing it, a tooltip will pop up and display the content of that variable. Easy, isn’t it?
Since this code block (the code in toString function) hasn’t been executed yet, when you move your mouse pointer over those variables, you will see null or 0 for object and numeric data type respectively as you inspecting them.
Step through the Code
Click on the button says “Step Over” to execute the code line by line:
As you step through the code, all variables in this code block is being updated and displayed on the right side of the debug window. Watch these values closely because from them, you can often spot the root cause for the bug you are debugging, .
Continue stepping through the code, you will enter a loop and you will see how the variable temp is being built incrementally. At sixth iteration of the loop, the variable temp holds something that is not indented: "[ 1, 2, 3, 4, 5undefined", which means something has gone wrong during that iteration. By examining the code block, we know the string that was being added to the variable temp came from this.list[i];, which is any Array object. At this point, we can presume that the index of array is out of bound at sixth iteration.
To verify this, expand this node and then list node from variable inspection window. As you can see from the figure below, the indices of list range from 0 to 4, but the provided index i is 5.
To fix this script is easy, all you need to do is change the condition of the loop from i <= length; to i . However, this is not the point of this article. The point is to show you what Firebug can do for you in terms of JavaScript debugging: it has the ability to shows you line-by-line how the code is being executed; In addition to that, it allows you to inspect the value of every single variable during the execution. Imagine that how would you do the equivalent debugging using alert function, especially for code that consists of thousands of lines.
Alternative Way for Setting Breakpoints
Besides setting breakpoints by using Firebug’s code browser, you can set breakpoint by adding debugger; anywhere inside of your JavaScript code. By adding this line of code, you can effectively pause your JavaScript code as we did in the previous step. You might find one way is more convenient than the other.
Using Console for Writing Output
Alert message box is not a great way to display script output since it pauses the script execution and requires user (the programmer) to click to resume the execution. Firebug offers a built-in JavaScript object that provides a separate channel for data outputting. For example, if you want to write something to console window instead of browser window, you can call functions of the console in the following way:
console.log("Init...");
//printf like string formatting
console.log("Title: %s, page: %d", title, page);
console.log(document); //you can log virtually any JavaScript object
//you can specify the type of message
console.debug("debug");
console.info("info");
console.warn("warn");
console.error("error");
Now, you can replace the last line of test.js to
console.log(stack.toString());
Find out more at Firebug logging functions.
Conclusion
The features I have covered here are only a tiny tip of what Firebug has offered. There are many exciting features such as in page inspecting of HTML element, change CSS styles on the fly, DOM element inspection and many other more which can be found from Firebug’s official web site.
Files
Posted in Javascript / Css | Leave a Comment »
CodeProject: IIsAdmin.NET: Create Multiple Web Sites Under Windows XP. Free source code and programming help
Posted by jinibyun on June 23, 2008
CodeProject: IIsAdmin.NET: Create Multiple Web Sites Under Windows XP. Free source code and programming help: “* Download setup file – 143 Kb
* Download source files – 41.3 Kb
Sample Image – IIsAdminNet.jpg
Introduction
As web developers we all know that very rarely do we only get to work on a single site at a time. Many times we find ourselves juggling between web sites. As each site becomes more complex (virtual directories, web site configuration settings, etc.), the task of switching between different sites becomes more time consuming. Now throw in the fact that you can only create a single site under Windows XP Pro, and you have frustration waiting to happen.
Initial Solution
After looking for a bit, we were able to find a solution to the problem called IIS Admin. IIS Admin allowed for multiple site definitions to be created under Windows XP (with only a single site started at a time). At first this seemed like the answer to our prayers. We can create a separate site for each project, all the configuration changes would be saved with that site, and to switch we just start a different site. However, we soon realized IIS Admin came with a few interesting “features” of its own.
Initial Solution Drawbacks
First, the program did not show up in the taskbar. This meant that if the program lost focus it could be difficult to find”
Posted in IIS | Leave a Comment »
free backup software
Posted by jinibyun on June 19, 2008
Free Backup Software for Microsoft Windows
Cobian Backup
Cobian Backup is a multi-threaded program that can be used to schedule and backup your files and directories from their original location to other directories/drives in the same computer or other computer in your network. FTP backup is also supported in both directions (upload and download).
Cobian Backup exists in two different versions: application and service. The program uses very few resources and can be running on the background on your system, checking your backup schedule and executing your backups when necessary.
Cobian Backup is not an usual backup application: it only copies your files and folders in original or compressed mode to other destination, creating a security copy as a result. So Cobian Backup can be better described as a “Scheduler for security copies”.
Cobian Backup supports several methods of compression and strong encryption.
Freebyte Backup
Freebyte Backup is a freeware backup program for Windows 95/98/ME/NT/2000/XP. Freebyte Backup allows one to easily copy (and filter) a large number of files and directories from various sources into one backup directory.
It is possible to backup all files found in the specified set of input directories, or to have only certain file types copied. Files can be filtered according to file-extensions. E.g. you can specify that you want to backup all .doc, .rtf, .jpg, .bmp files, but none of the .exe, .dll and .txt files. You can very easily define new file extensions yourself to be added to the filter.
SyncBack Freeware
SyncBack Freeware is a freeware program that helps you easily backup and synchronize your files to: the same drive; a different drive or medium (CDRW, CompactFlash, etc); an FTP server; a Network; or a Zip archive.
Free Backup Software for Unix and Microsoft Windows
AMANDA
AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that allows the administrator of a LAN to set up a single master backup server to back up multiple hosts to a single large capacity tape drive.
AMANDA uses native dump and/or GNU tar facilities and can back up a large number of workstations running multiple versions of Unix. AMANDA can also use SAMBA to back up hosts running Microsoft Windows.
Bacula
Bacula is a set of computer programs that permit you (or the system administrator) to manage backup, recovery, and verification of computer data across a network of computers of different kinds.
In technical terms, Bacula is a network based backup program.
Bacula is relatively easy to use and efficient, while offering many advanced storage management features that make it easy to find and recover lost or damaged files.
afbackup
afbackup is a client-server backup system allowing many workstations to backup to a central server (simultaneously or serially).
Backups can be started remotely from the server or via cron jobs on the clients.
afbackup has been tested on Linux, FreeBSD, AIX, IRIX, Digital Unix (OSF1), Solaris and HP-UX. The afbackup client has also been tested on SunOS and OpenBSD.
Posted in Utility | Leave a Comment »




