Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, May 12, 2010

New Features in C# 4.0

Visual Studio 2010 is out and we have a new version of C# that also accompanies it. That's C# 4.0 - I have been working on C# from the good old 1.0 or 1.1 version upwards. So whats the new 4.0 version of C# got in store for you. Here's a wrap up of the new features available as part of C# 4.0 release.

keyword Dynamic

There's a new kid in the block, with the introduction of a very a key feature of this release called the dynamic keyword. The keyword dynamic bridges the gap that existed between a dynamically and statically - typed languages. Well, C# can now also be considered a dynamically typed language too. You can easily create dynamic objects on the fly and even have their types determined only at run time. You will simply need to add a new namespace called System.Dynamic, and lo you can create expandable objects and even advanced class wrappers. You can also facilitate interoperability between different languages, including the dynamic ones.

To better understand the use of dynamic keyword, here's an example:

dynamic BankAccount = new ExpandoObject();
BankAccount.Number = "174258733-451269";
BankAccount.HolderName = "Jason S";
BankAccount.Branch = "Bangalore";

Though there are many pros and cons for the use of dynamic keyword and the system performance overheads, it makes like that much more simpler for the developer in the end.

Optional (or Default) Method Parameters

If I rightly remember, VB.net is preferred to C# when porting old projects in ancient langues of VB 5 / 6 or when working on creating COM wrappers since VB.net allows you the use of Optional or Default parameters in methods. C# 4.0 has finally got this feature to make it that much more robust in this area.

You can now easily specify a default value for a parameter within the method declaration in C# 4.0. Also, the consumer of the method can either pass a value or can easily skip the parameter. When the parameter is skipped, the default value declared in the method is passed.

Here's a simple example to explain it:
Method declaration:
public static void GetMoney(int amount = 0) { }

Bot the below Method calls for the above declaration are valid in C# 4.0:

GetMoney(); // 0 is used as amount in the method.
GetMoney(1000);

Named Arguments

Well, here's another relief to the developer. Did you know that in C# 4.0 the order of parameters in a method declaration and also the order of arguments you pass to the method when calling don’t need to match anymore!!. You can now easily provide arguments to a method in any order that you are comfortable with by specifying parameter names with-in the method call. This feature also tremendously improves the readability of one's code.

Here's a simple example of using Named Arguments in C# 4.0
var sample = new List();
sample.InsertRange(collection: new List(), index: 0);
sample.InsertRange(index: 0, collection: new List()); // both ways it'll work now

Covariance and Contravariance

Does the heading sound confusing? Well, the use of variance on generic type parameters in interfaces and delegates is yet another new feature available in C# 4.0. Though, strictly speaking it doesn’t add that much of a new functionality. But it rather makes things work in the first place as you expected them to work. Here is a major advantage that is hidden in the power of C# 4.0 in simple line below. Note: The below code wouldn't have compiled up until C# 4.0 was released:

IEnumerable objects = new List();
Now you have the ability to implicitly convert references for objects instantiated with different type arguments. This makes it that much more simpler and easier to reuse code.

Improved COM Interop Support

As I started this article with the dynamic keyword, then we had the optional parameters and named arguments, did you know that all of this actually enables a significant improvement in working with COM interop. Though all these features have arrived pretty late for the COM Interop world - but it's like late than never is better.

Take a look at my ugly code below:

var excelApp = new Excel.Application();
// . . .
excelApp.get_Range("A1", "B4").AutoFormat(
Excel.XlRangeAutoFormat.xlRangeAutoFormatTable3,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
I can now simply write it in a few lines as below:

excelApp.Range["A1", "B3"].AutoFormat(
Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2);

Ain't it pretty neat?

So, there you go - that was a wrap up of the new features that are available in C# 4.0. Hope it helped!!

Tuesday, May 11, 2010

Can your OS make some ice-cream for you? Well, Linux can!!

We have the OS wars raging like the Cold War down under and ready to erupt any given time. In this time, I have a question for you - Can your OS really churn out some delicious ice-cream? Most probably the answer would be in the negative. But if you happen to run Linux - the answer is YES!!

Well, a company called MooBella (what a name to Moo around with) has come up with a rather geeky invention - a Linux-powered ice cream maker which is currently undergoing demo runs in New England. This is not the size of your average PC though for home use, but a full fledged ice cream machine that reportedly churns out Fresh Dairy Ice Cream in 40 seconds and has a whooping 96 varieties. All this being 100% natural dairy stuff.

The ice cream machine sports a 15" touch screen but under the hood it is basically an off-the-shelf PC Hardware that is in use and best of all it happens to runs Redhat Linux. Well, the basic interface happens to run off Firefox too. This seems to be a cool innovation and also a great example of what Linux can do.

I am sure that in near future we will have refrigerators / TVs / ACs coming with a choice of OS like Linux / Android / Chrome / Windows. Any takers yet?

Monday, November 16, 2009

VMLite the best alternative for running Windows XP in your Windows 7

Well, when Windows 7 was released there was one very nice feature which was much talked about by the geeks and that was the Windows XP Mode. Well, Windows XP Mode is part of a seperate installation by which you can run Windows XP on your Windows 7.

But the catch was that in order to use Windows XP mode Microsoft made it mandatory that you must be running Windows 7 Professional or Windows 7 Ultimate - also your PC must have virtualization support by the hardware.

These mandatory requirements was a downer and many users weren't able to truly enjoy Windows XP Mode. But here some very good news - enter the VMLite which is a very nice alterative to Microsoft's Windows XP Mode.



VMLite XP Mode does offer very similar features like the Microsoft XP Mode but lo it doesn't need you to have Windows 7 Professional or Windows 7 Ultimate - so even Windows 7 Starter edition will work fine and also it doesn't require hardware virtualization.

VMLite allows you to easily run Windows XP from your desktop running on a different host operating system - not just Windows 7. You can download VMLite here.

Tuesday, July 21, 2009

Simple difference between Java Beans and Enterprise Java Beans(EJB)

JavaBean - A Java Bean is a software component written in the Java programming language that conforms to the JavaBeans component specification. It is an API for objects which expose their properties via standard naming convention (getXXX(), setXXX(), isXXX()). These properties can be determined at runtime via reflection and introspection. For true JavaBeans, they should be Serializable and have a default constructor. The orginal intent was to make them easy for tooling (tools could discover their properties, expose them to configuration, etc.).

The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 release of the JDK.

EJB - Enterprise JavaBeans (EJBs) are Java-based software components that are built to comply with Java's EJB specification and run inside of an EJB container supplied by a J2EE provider. It is an "enterprise" api for distributed objects. Provides a standard approach to building such objects and allowing an EJB container (EJB application server) to manage the lifecycle of the beans. EJB's provide persistance, scalability, and distributed transaction support (via the container).

An EJB or an enterprise java container provides distributed application functionality such as transaction support, persistence and lifecycle management for the EJBs. Further Details about apache tomcat or simply tomcat server and JavaBeans can be found at Sun Java Tutorial.

Wednesday, July 8, 2009

How to easily set the Bing Wallpaper of the Day as your Desktop Wallpaper automatically?

bing Bing – The latest web search engine from the Microsoft Stable is liked by some and scorned by others who would bet that Google is the best anytime. But whatever side you take – whether you like it or hate it – you will always like the daily changing background image that Bing sports.

Now if you want to automatically set the Bing Wallpaper of the day as your desktop wallpaper, you have a small utility that has been developed by MugunthKumar called as Bing Downloader. It is a small exe that is just about 10KB in size and can be easily downloaded here. All this fantastic utility (BTW, the code is open source – so you can change the C# code to ur whims and fancies) does is that it picks up the latest wallpaper from Bing and automatically sets it as your Desktop Wallpaper.

But what is missing in this light weight app is that there is no “Advanced Options” which would allow us to say download yesterday’s or any previous background wallpaper. Also, the user will need to run the Bing Downloader once a day to download that day’s Bing background image to the computer’s Desktop wallpaper.

Also, another issue is that the Bing background wallpapers are usually 958×512 pixels in size and this maynot make them very suitable for use on many Desktop Computers with large screens and having a larger display. But such users can easily center the wallpaper to make it look more pleasing. As for general NetBook or Laptop users this must be great. But my Acer D250 has a native resolution of 1024x768 so this is smaller for it too.

Below are some cool Bing Wallpapers that I have seen over the days.

Fish_ROW919673108

bing_screenshot bing-home Bing-Homepage bing-screenshot-2-custom thumbs_bing_homepage thumbs_bing-home_page thumbs_bing-image thumbs_bing-microsoft untitled

Tuesday, July 7, 2009

Green Dam hits the Great Wall of China!!

Zhongguo-China For those of you who are not aware of what the Green Dam I am speaking is all about – it’s a new piece of software that was thrust upon it’s Citizens a few weeks back. It is officially called as the “Green Dam for Escorting Children" filtering software which the authorities claim to filter pron and other malicious websites from easy access to children and adults too!! The last of the official statements that was announced by the Chinese IT officials was way back on June 30th, eversince they have kept numb – you may be wondering why?

Well, the new software seems to open a Pandora box of issues including many serious security issues – than protect the users from such stuff for what it was designed in the first place. Last month there was a damning report by Prof. J. Alex Halderman and his team that seems to have nailed the Green Dam to the Great Wall.

User Black Prof. J. Alex and his team claims to have found several serious security flaws in the software which are likely attributed to “Programming Errors”. Also, his team claims that once the Green Dam software is installed it makes the user much more vulnerable to website scripts that can easily take control of the user’s system. Also, these scripts that can target the Green Dam’s vulnerability can easily steal sensitive information off a PC, also can steal passwords, send Spam or simply turn the computer into a botnet. Also, since Green Dam is designed to process blacklist updates – it can easily allow hackers or even the software makers to install malicious code on a user’s PC during the update process.

So, all these seemed to have nailed the Chinese very ambitious Green Dam project – also the program is available only for the PC version, so users of Mac, Linux and other OS’s are spared. Coupled with all this – it is one big flop!!

Friday, July 3, 2009

How to easily get the Highest Score and Fastest Time in FaceBook / MindJolt Crazy Taxi Game

Crazy Taxi LogoWell, of late I have been playing a few FaceBook games like SCRAMBLE, SCRABBLE, Crazy Taxi, etc. I was just checking the High Scores for Crazy Taxi and found quite a few folks having a magic 7 Digit score and I was here struggling with my pals with scores of 5 digits.

So, this afternoon I was looking for any tricks to update the score manually – I found that there was the score being sent via the query string along with a Random Key called as ‘gamekey’ which was being changed for every game. But with so many trials and errors – yet I couldn’t find a solution. Again, a few moments back the idea struck to me to find a solution and I did quite a bit of research and here is the solution I found.

play 1

Using these simple steps below you can very easily get high scores in FaceBook Crazy Taxi game:

  • Download the latest version of a cool software called Cheat Engine 5.5 from here (MediaFire Link) or the creator’s website and install it.
  • Now goto the Crazy Taxi Game page using either Internet Explorer or Mozilla FireFox (I haven’t tested it on other browsers yet).
  • Once, you get the main screen of Crazy Taxi – head over to the newly installed Cheat Engine and Open it.
    Cheat Engine screen
  • Click on the “Computer Icon” (Step 1 in above Screenshot).
  • A Process List Pops up, If you are using Firefox – select it from the list (Step 2 in above Screenshot). Else if you are using Internet Explorer, you will need to select iexplore.exe from the list.
  • Then hit the Open Button (Step 3 in above Screenshot).
    Cheat Engine
  • The above screen opens up.
  • Select “Enable Speedhack” (Step 1 in above Screenshot).
  • Then set the speed to around 100 by using the slider or entering the value (Step 2 in above Screenshot).
  • Click Apply (Step 3 in above Screenshot).
  • Now head back to the Crazy Taxi game in your browser and hit Start.
  • Remember to hold the Up arrow key before you press start again.

Now you can simply sit back and enjoy as your scores fly by and also the cars. You can very easily score really high points like me (Screenshot below).
play
As you can clearly see, I have simply crossed all my pals scores in just a tiffy. Now am aiming to come up at challenging the “All of FaceBook” high scores.

But please note that this method is currently working in Windows XP and Vista only. Hope you folks find this useful.

Wednesday, July 1, 2009

iPhone OS 3.1 Beta And SDK out already!! Available for Free Download

iPhone SDK Logo iPhone OS 3.0 was released to the public barely 2-3 weeks back and already you have a next major update in the form of iPhone OS 3.1 being released in Beta. This has been the very first time in history that Apple has made such a major release in quick succession – though the new 3.1 version is in Beta, it surely does address some major issues that were reported by users of iPhone OS 3.0.

The new iPhone OS 3.1 addresses a major battery issue that many users had reported. The battery values were not getting displayed correctly, but it now seems that the issue is fixed with this Beta release. Also, another change that many users of iPhone OS 3.1 Beta have reported is that MMS has been switched ON by default – looks like the service providers have had their say with Apple. Since, MMS services are offered at a premium with almost all service providers – so turning it ON by default can rake in more usage and in-turn more profits.

iPhone SDK Download Screen

Friday, June 19, 2009

How to easily program your Directv DVR remote to control your dvd player?

Most folks who have a Direct TV DVR Box would want the same remote to control your DVD Player or TV remote from it. Well, that was the same case with my cousin who wanted to control her Sanyo DVD player with the Directv DVR white remote. But with whatever programming she had done to it, it used to turn on/off the Sanyo DVD player and also the function buttons used to not work.

So, here are the actual steps that you need to follow to reprogram your Direct TV Service remote control to be used for your Sanyo DVD player. This guide can be used to reprogram the Directv DVR remote to work with a whole host of gadgets like TV, CD Players, DVD Players, Home Theatres, etc - but you will need to find the exact code from the Directv website for the others according to the brand.

  • First of all, you must make sure your Sanyo DVD player is turned on(Sometimes we miss the basics - afterall, we are humans).
  • Next slide the mode switch at the top of your Directv DVR remote to AV1.
  • Now Press and Hold the MUTE simultaneously and hit the SELECT button at the same time until the green light starts to flash twice. (If you don't get it the first time, try a few times over).
  • Now enter the code: 20873 (This is specific for a Sanyo DVD Player that my cousin had - so get your codes from the website)
  • After this the green light on the remote should flash twice, indicating that it has accepted your code.
  • Now aim the Directv DVR remote control at your DVD player and press the PWR button once.
  • Voila - if you have done this correctly it must turn off the DVD player.
You are done - and can use the Directv DVR remote to control both the Directv DVR box as well as your DVD Player.

PS. If the code I have provided above doesn't work, you can repeat the first 3 steps and enter any of these other codes: 20695, 20670 and give it a try.

For other devices, use the other codes for the Directv System.

Wednesday, June 17, 2009

Free Online Computer Training Courses on YouTube

If you're looking for using free online video sharing websites, such as YouTube or Google Videos, for enhancing or honing your computer skills or simply to attend online training, then you're unquestionably in luck. On YouTube, you can find thousands, if not millions of video recordings that are available for you to view, often most of them are full length and also for free.

YouTube makes video viewing at ease. They do this by placing all the video recordings into several channels or categories. You will be able to easily find online video recordings by seeing the ones that are watched the most, the ones that have the most remarks and gossips or simply the ones that are rated the highest. Besides those categories, you'll as well find categories that break up videos into particular subject categories, based on the specific video content. The category that we will need to look up for particular is the Technology Category.

YouTube also has a channel that is labeled Science and Technology. The Science and Technology or Education videos often include videos that help you master on a specific configuration or use of a particular feature. The best thing online is that these video's are a shot from different parts of the globe. Popular video tutorials are mainly on Windows Technologies and I found the k alliance sub site on YouTube to be particularly useful..

As you might already know, the biggest reason why YouTube is so popular is because it's free. Yes, absolutely free. This signifies that you are able to not only view as many video recordings as you wish, without being forced to pay a thing, but you will be able to also produce and share your own. Though YouTube is free to utilize, they do request that you register with the website and that can be done with your existing gmail ID too. This registration is absolutely free of charge. In spite of being optional, the registration will render you access to other additional YouTube features, including the power to rate/comment videos that you've lately watched.

The above-named channels / categories are just a couple of the numerous that you will be able to find on YouTube. So make the best use of technology when you can easily get it for free!!

Tuesday, June 2, 2009

Why is Corporate Training so important?

Employees should always be considered as the key to your business success. Time and again I have seen numerous studies that have proved beyond doubt that the most successful, productive employees are those who have received extensive certification boot camps. These employees always contribute as the top cream of the crop, often having the strongest stake in the company's future and success.

It is very true that in an ideal world, you will always be able to hire folks who already possess the exact skills your business needs. But the reality today in the most competitive labor market is definitely the demand for skilled workers who will far exceed the supply.

This is exactly where the need for training comes in. What corporate training does is that it not only instruction arm's your employees with the much needed professional or technical skills, but it also goes on to show that you are invested in them and interested in bringing them with you into the company's future and growth. This kinda goes a long way in keeping workers motivated and involved.

Here are some helpful tips for you to include in your training :
  • COACHING TO ENHANCE PERFORMANCE
  • TRAIN THE TRAINER PROGRAMME
  • NEGOTIATE TO WIN
  • HOW TO DEVELOP A WINNING 360 DEGREE PERSONALITY?
  • PSYCHOLOGICAL SELLING
  • SPEECH ENHANCEMENT TRAINING
  • CLASSIC BUSINESS WRITING SKILLS
  • CONFLICT MANAGEMENT SKILL
  • CONTEXTUAL LISTENING

Monday, May 4, 2009

What is the process JQS.exe and how to easily disable JQS.exe?

This morning I noticed a lot of activity going on my PC, even at times when it was idle. I just got curious to find out what the reason could be in the strange activity on my computer. Well, like any other tech geek - I first pulled up the Windows Task Manager (hitting Ctrl Alt Del keys at once). I noticed a strange process called JQS.exe and also found that JQS.exe was running on low priority. But interestingly this strange process called JQS.exe was using 1.3 MB of computer memory and almost 2 MB of virtual memory. Also, there was a lot of activity by this process at random since it was initiating too many I/O read processes.

Well, I figured out that JQS.exe was not any virus process but was indeed Java Quick Start which was actually designed to reduce the startup time of Java applets
and Java apps by prefetching Java Runtime Environment files frequently into memory and caching it. But I'm not a person who uses Java Applets or Java Apps that often - I hardly use Java related stuff maybe once in 2-3 weeks, so there is absolutely no use for it to run all the time on my box to make a rare use app work faster!!

So here is how you can easily disable JQS.exe :
  • Goto the Control Panel (Start > Control Panel).
  • Double click the Java icon to open the Java Control Panel.
  • Now click on the Advanced option
  • Goto Miscellaneous and you will find that Java Quick Start has been enabled.
  • Uncheck the box to disable the JQS.exe process.
You can now see that JQS.exe has disappeared from the Task Manager.

Friday, February 27, 2009

Visual Studio 2010

Just as the dust was settling on Visual Studio 2008 the new Visual Studio 2010 is already in a good phase of development(atleast that's what the screen shot says). Visual Studio 2010 has a completely new UI that Microsoft claims is more than just a face lift - it has more punch under the hood.

Click to Enlarge the Screenshot of Visual Studio 2010


Visual Studio 2010 has been re-designed with features such as a reorganized layout with file menus and commands on a “shelf” at the top of the IDE. As you can clearly see fom the screenshot, Microsoft has now begun to use Windows Presentation Foundation (WPF) for the evolution of toolbars and menu bars.

Visual Studio 2010 will also feature a new UI with which developers will be able to enjoy additional real estate space because of multi-monitor support and can also simply drag source code windows to a secondary monitor. Rather cool I must say!!

Thursday, February 26, 2009

SQL Server :: Why does sp_help and Design View column length have variations in results?

Well, the question of Why does sp_help and Design View column length have variations in results? has been a Million Dollar question for my SQL geek friend in office. She was confronted with this issue where the column length appears differently when sp_help is used and the correct column length is visible in design view.

Being a SQL geek herself, she usually only uses command line commands (like sp_help) to get the information she needs - but this was a very hard nut for her to crack. Well, she did crack it last evening and here's the detailed explanation on why the variations appear. Hope this information is useful for others who are struck with a similar investigation.

When we use sp_help to check the properties of the table, the length of every column which is of Unicode data type (Nchar, Nvarchar, etc.) is doubled than the original column width which can be seen in design view.

For eg. If we have a column whose data type is Nvarchar(25). When we use sp_help for this table, the column length appears 50. But when we open the table in design view it shows 25.

This is because Unicode data type takes 2 bytes for storing data. And sp_help uses int to display the length of the column.

Hope that added some gyan to you too.

Monday, November 3, 2008

How to easily UnInstall Windows Live Messenger 2009 Beta

I do agree that Beta softwares have very limited support and can even corrupt your system. But little did I ever imagine that Microsoft would ship out a Beta release of Windows Live Messenger without an Uninstaller!! Yes - the latest Windows Live Messenger 2009 Beta comes without an UnInstaller.

For some strange reason, after installing the Windows Live Messenger 2009 Beta - I was getting an error called 8000ffff - I tried many solutions posted online but in vain. Finally, I felt my Messenger 8.1 was much better and there my hunt for the uninstaller began. I searched high and low but in vain.

Finally, I found an easy method to Uninstall Windows Live Messenger 2009 Beta. Goto Start > Run and type the following command and press enter - this starts the uninstaller.

msiexec /x {B1403D7D-C725-4858-AACC-7E5FA2D72859}

How funny?

Btw, for the other Live Beta softwares - here are the codes to uninstall.

To UnInstall Windows Live Mail Beta Easily
msiexec /x {DFD6935E-D94A-4DBE-AD8F-E37CBC6B577F}

To UnInstall Windows Live Toolbar Beta Easily
msiexec /x {5524A0D4-F826-4961-9B53-EFF6C615251B}

To UnInstall Windows Live Writer Beta Easily
msiexec /x {AC5568AB-C3E3-490E-BE40-50977C12288D}

To Uninstall Windows Live Photo Gallery Beta Easily
msiexec /x {F6D0986F-D9A8-479B-A80F-61D53CDF65BA}

To Uninstall Windows Live Family Safety Beta Easily
msiexec /x {3491D278-AF52-4A0E-A1F5-D1A57B4F2222}

Wednesday, October 22, 2008

How to easily Install Ubuntu 8.10 in a USB/Flash drive from the Live CD

It's been quite sometime since I have visited the world of Linux. So here's a small tutorial I have pieced together to help you get started on having a Ubuntu Linux installion right on your USB/Pen Drive. This tutorial is very simple and lucid - the end of which it will enable the reader to install Ubuntu 8.10 (Intrepid Ibex) into a USB flash drive / pen drive. It's basically having a Live CD installation in a USB drive.

I have also gone a step further to harness the the persistence or casper persistent feature that allows you to automatically save changes back to the thumb drive as you work, and then restore those saved changes upon subsequent boots - that's gonna be very useful for people on the move or people who change systems often.

Please Note that the final version of Ubuntu 8.10 (Intrepid Ibex) will only be released on October 30th but you can download the beta version right now which is pretty close to the final version.

Before we get started, here are the list of things you will need to make an Ubuntu 8.10 USB installation:
  • A working CD Drive and ofcourse - an Ubuntu 8.10 CD (in a moment I'll let you know how you can get a Ubuntu CD off the internet for free)
  • An established internet connection - I would prefer a broadband one.
  • and the Most Important - 2GB or larger USB flash drive (2GB+ if you want some special script to be installed too).

Here's how you can create an Ubuntu 8.10 flash drive automatically, without much hassles.
With this method, you must use a completely free 2GB or larger usb drive - anything lesser will cause problems in later stages.
  • Now go ahead and download the latest Ubuntu 8.10 ISO and burn it to a CD.
  • Next, restart your computer and boot from the Live CD you have created.
  • Insert the 2GB+ USB flash drive.
  • Open a terminal window and type the following into the terminal window:
    wget pendrivelinux.com/downloads/u810/u810.sh
    chmod +x u810.sh && sh u810.sh
  • From here on, just follow the onscreen instructions - that'll be a breeze (trust me).
  • Once you have the complete installation of the script - reboot your computer and set your BIOS or boot menu to boot from the USB device.
  • Volla - You now have a working Live Installation of Ubuntu Linux on a Pen Drive.

Thursday, September 11, 2008

How to easily reset Administrator password in Windows XP?

There are many a times when we could have forgotten the all exclusive Windows XP Administrator password in our home or office system. I have detailed down the few steps that will be needed for you to easily reset your Administrator password in Windows XP.

Here we go with the steps.
  • Boot your system with the Windows XP Setup CD. A screen will come up to welcome you, then you'll have an option to accept the EULA agreement, etc - proceed as required.
  • Then you will get an option to install XP afresh or "Repair your existing Windows XP installation". Choose to Repair by pressing “R”.
  • It will then start the repair process by first copying files the files needed.
  • In a few minutes, the setup will begin to restart your system and when it restarts remember NOT to press any key when it shows “Press any key to continue…”. Else setup will start from the beginning. Don’t press any key and setup will resume from where it stopped.
  • It will start doing other tasks and will show a small progress bar with a few details in left hand corner.
  • Look carefully at the details and when it shows “Installing Devices“, remember to press Shift key + F10 key in your keyboard.
  • This will open up a Command Prompt window. Now type nusrmgr.cpl and press the Enter key.
  • This opens up the “User Accounts” window which you normally get in the Control Panel.
  • Cheers!! You can now easily reset any account's password.

Wednesday, August 6, 2008

How to add data from Excel sheet to a C# program?

I have a coding article for all the geeks out there. I had a strange requirement to access data from a dynamic excel sheet on the fly and use it within my .net program.

Here's how it can be done easily in C#.


string strConn;

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +

"Data Source=C:\\Master Report List.xls;" +

"Extended Properties=Excel 8.0;";

//You must use the $ after the object you reference in the spreadsheet

OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Production Reports$]", strConn);

DataSet myDataSet = new DataSet();

myCommand.Fill(myDataSet, "ExcelInfo");

DataGrid1.DataSource = myDataSet.Tables["ExcelInfo"].DefaultView;

DataGrid1.DataBind();

Tuesday, June 17, 2008

Now SysInternals tools available at an Internet Website near you

Well, if you're a fan of the Sysinternals tools like me - then you have great news. You can check out the beta of Sysinternals Live - a cool service that makes it easy for you to execute Sysinternals tools directly from the Web without hunting for and manually downloading them. That's simply wonderful as I use ProcessMonitor, FileMonitor , etc to maximum use and go hunting for it if I'm at a colleague's desk.

You can now simply enter a tool's Sysinternals Live path into Windows Explorer, or at the command prompt as \\live.sysinternals.com\tools\, or view the entire Sysinternals Live tools directory in a browser.

Now's that's what I call some wishful thinking for the Developer community.

Sunday, April 20, 2008

How to easily Set a Reminder to reply to a message in Outlook?

  • [Outlook 2003 users]
    Right-click the message you want to set the reminder for, point to Follow Up, and then click Add Reminder. In the Due By list, click the date when you have to complete the reply. In the second list, click a time. In the Flag color list, click the flag color you want, and then click OK.
  • [Outlook 2007 users]
    Drag the message directly to the To-Do bar. Right-click on the flag for email, and select Add Reminder. In the Reminder section, select the date and time you want the reminder to appear and click OK.
    (In Outlook 2007, messages that you flag for follow-up not only show-up not only show up in the To-Do bar, but also in your task list and your calendar.)