NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Thu
30
Nov '06

What is the difference between CAST and CONVERT in SQL?

You can use either CAST or CONVERT. Because CAST and CONVERT provide similar functionality.

The difference is CASE is more ANSI standard and use this only if you are writing a program which you will need to use in many database platforms. Where CONVERT is Microsoft specific and more powerful.



Links:
http://msdn2.microsoft.com/en-us/library/ms187928.aspx
http://searchwinit.techtarget.com/tip/0,289483,sid1_gci1014050,00.html
Mon
27
Nov '06

Technological Myopia in Kerala

Govt. of Kerala took a very bad decision to take off Microsoft products from Schools. As far as I know more than 70% of the machines in Kerala (also the whole India) is running on Microsoft Windows. And 25% of the machines use Linux and that too for Server purpose only. Microsoft’s products are giving more support and user friendlyness and the very important thing is JOB MARKET!.


Politicts is that much bad now? I was a small student leader representing a political party 5-6 years back at my college. That time I thought these parties are standing for the helping of people. It is very horrible that a Govt. ordered such a bad decision in a Technologically Developing State. I heard this decision is because of political problems between previous Govt. and the Present Govt. How sad :(

Well, I have posted a related thing at t-mug forum - http://forum.t-mug.org/topic.asp?TOPIC_ID=1529.


If you think the decision taken by the Govt. is not helpful for the development of Kerala, please sign on the petition at http://www.petitiononline.com/Kerala1/petition.html
Fri
24
Nov '06

Contineous Javascript Marquee

This script will let the text scroll contineously. This means, the second round scroll will start just after first round. This will overcome the in-between delay of HTML MARQUEE tag. However, this script is not free from limitations. But works on both IE & Firefox.


 
<html>
	<head>
		<script language=“javascript”>
		var text = “There is a long sentence With some more text However as soon as this message plays There’s a really long break Before the text starts Over.”; // User Text
		var i = 0;
		var n = 50;	// Number of Charaters to display
		var speed = 50; // Scroll speed in milliseconds
		text = text + text.substring(0,n)
		function marqueeText() {
			document.getElementById(“divText”).innerHTML = text.substring(i,i+n);
			i++;
			if (i > text.length - n ) i = 0;
			setTimeout(‘marqueeText()’, speed);
		}
		</script>
	</head>
	<body>
		<div id=“divText” style=“border:solid 1px gray;background-color:#CCCCCC “ align=“center”></div>
	</body>
</html>
 
<script language=“javascript”>
	marqueeText();
</script>
Tue
7
Nov '06

Windows Logger with VBS

This is a quick script from my hands which logs the date and time of windows ‘loging’ and ‘logoff’.

 
dim objfso, objtextfile
 
set objfso = CreateObject(“Scripting.FileSystemObject”)
set objtextfile = objfso.OpenTextFile(“f:\logsystem.txt”,8,True)
 
if WScript.Arguments(0) = “LOGIN” then 
	objtextfile.Write(vbCrLf & Date & ” “ & Time)
else
	objtextfile.Write(” - “ & Time)
end if
	
objTextFile.Close
Wscript.Quit
The output will be like:
11/7/2006 4:15:25 PM - 4:15:27 PM
11/7/2006 4:15:31 PM - 4:15:32 PM
11/7/2006 4:15:34 PM - 4:15:35 PM
11/7/2006 4:15:36 PM
To configure the script in your system you may use “gpedit.msc”. Under “User Configuration” -> “Windows Settings” -> “Scripts(Logon/Logoff)”.

This is the syntax:
[filename .vbs] LOGIN
[filename .vbs] LOGOFF
The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Trivandrum Microsoft Users Group Community Website