Installing Windows 2000 Professional

To install Windows 2000 Professional, follow these steps:

  1. Start the installation by using one of the following methods:
    • Start from the Windows 2000 Professional installation CD-ROM. Make sure that the CD-ROM is set to start before the hard disk starts. Insert the CD-ROM, and then when you are prompted, press any key to start the Windows 2000 Professional Setup program.
    • Start from boot disks. Insert Disk 1, and then insert each of the remaining three floppy disks when you are prompted to do so. For additional information about creating boot disks for Windows 2000
    • Start from within a current operating system. Insert the CD-ROM, and then, at a command prompt, type drive:\i386\winnt32.exe and then press ENTER, or if this is an installation on a computer that has no previous installation of Windows, type drive:\i386\winnt.exe and then press ENTER, where drive is the letter of the CD-ROM drive.
  2. Setup inspects your computer's hardware configuration and then begins to install the Setup and driver files. When the Microsoft Windows 2000 Professional screen appears, press ENTER to set up Windows 2000 Professional.
  3. Read the license agreement, and then press the F8 key to accept the terms of the license agreement and continue the installation.
  4. When the Windows 2000 Professional Setup screen appears, either press ENTER to set up Windows 2000 Professional on the selected partition, or press C to create a partition in the unpartitioned space.
  5. If you choose to install Windows 2000 Professional on a file allocation table (FAT) partition, specify whether you want to:
    • Leave the current file system intact.
    • Format the partition as FAT16.
    • Convert the existing file system to the NTFS file system.
    • Format the partition by using the NTFS file system.
    Press ENTER after you make your selection. Setup examines the existing hard disks and then copies the files that are needed to complete the installation of Windows 2000 Professional. After the files are copied, the computer restarts.

    Important Do not press a key to boot from your CD-ROM drive when your computer restarts.
  6. When the Windows 2000 GUI Mode Setup Wizard appears, click Next to start the wizard. Setup detects and installs such devices as a specialized mouse or keyboard.
  7. When the Regional Options dialog box appears, customize your installation of Windows 2000 Professional for locale, number format, currency, time, date, and language, if necessary. Click Next.
  8. In the Personalize Your Software dialog box, type your name and the name of your organization, and then click Next.
  9. In the Product ID dialog box, type the 25-character product key, and then click Next.
  10. In the Computer Name and Password dialog box, either accept the default name that Setup generates or assign a different name for the computer. When you are prompted for an administrative password, type a password for the Administrator account. (You can leave the box blank; however, this is not recommended.) Click Next.
  11. In the Date and Time Settings dialog box, set the correct date and time for your computer. You can also specify which time zone you are in and set the computer to automatically adjust the clock for daylight saving time. Click Next.
  12. Setup installs the networking software and detects your network settings. When the Network Settings dialog box appears, click either


    • Typical to set default network settings such as File and Print Sharing for Microsoft Networks, Client for Microsoft Networks, and TCP/IP protocol that uses Dynamic Host Configuration Protocol (DHCP), or
    • Custom to specify the network components that you require for your network environment,
    and then click Next.
  13. In the Workgroup or Computer Domain dialog box, specify the workgroup or the domain to join. If you indicate that you are part of a domain, specify your domain user name and password. Click Next.

    Setup installs the networking components.
  14. During the final stage of installation, Setup installs Start menu items, registers components, saves settings, and removes temporary files. When the Completing the Windows 2000 Setup Wizard dialog box prompts you to do so, remove the Windows 2000 CD-ROM, and then click Finish to restart the computer.
  15. After the computer restarts, click Next in the Welcome to the Network Identification Wizard dialog box.
  16. In the Users of This Computer dialog box, specify either that users must enter a user name and password or that you want Windows 2000 to automatically log on a specific user when the computer starts. Click Finish.
When the Windows 2000 Professional desktop appears, the installation is complete.




Shop more at Bizrate


Using Associative Arrays for Client-side Caching using AJAX & Javascript


Introduction

This article shows you a useful technique to cache some of that page data on the browser in-memory. Since we use Ajax, the page is not reloaded each time. This prevents the cache from being invalidated on each round-trip. Client-side caching is sometimes required for performance reasons and also to take the load off of the DBMS. Since most modern PCs have plenty of RAM to spare, client-side caching becomes an important weapon in the modern programmer's arsenal of tricks.

With the advent of Ajax, application data can be maintained on the client without the use of ViewStates (aka hidden fields) or to a lesser degree, cookies. As any experienced developer will tell you, ViewState is a double-edged sword. Indiscriminate use of ViewStates can really have a detrimental effect on performance - what with the Viewstate payload ferried to and from the server with every postback.

The accompanying code can be extended to use record data too, via Javascript and the presentation logic can also be hived off to a Javascript routine on the client. We could even pipe XML down to the client and it could be parsed and presented through client-side script.

To keep this sample code easy to comprehend, I have rendered the tabular data from within the Web Service itself - which may not be architecturally optimal. Since this is not a treatise on design best-practices, I have taken the liberty of cutting corners here and there for the sake of brevity.

img width="36" height="42" style="float: left;" alt="Screenshot - article1.gif" src="Client-sideCaching/article1.gif" />We use JavaScript associative arrays to maintain our client-side cache. One thing to be noted about JS associative arrays is that once you associate a string key with an array, there is no way to iterate through the array using indexes. Supposing you are using it like this:asarray["akey"] = <value> there is no way you can revert to accessing the elements by their ordinal position like this: var anyvar = asarray[0].

Calling Server Side Code from Client Side using Ajax

Introduction

Using Microsoft ASP.NET AJAX is to call ASP.NET Web services (*.asmx files) from the browser by using client script. The script can call a webservice containing server-based methods (Web methods) and invoke these methods without a postback and without refreshing the whole page. The option we are going to use in this article involves PageMethods. A PageMethod is basically a public static method that is exposed in the code-behind of an aspx page and is callable from the client script. PageMethods are annotated with the [WebMethod] attribute. The page methods are rendered as inline JavaScript

A cool'n'simple search page using Google AJAX Search API, and some DHTML



Introduction

In this article I'll demonstrate how easy it is, to create a usable webpage with some advanced technologies (such as fast asynchronous web search) in a very simple way, using a public API.

Salajax: simple Ajax library solving back button and bookmarks for Ajax web applications

Salajax is a simplified Ajax library that handles back buttons, bookmarks and is extremely simple to use. Yes, Ajax is great. It does have some minor issues though, like the back button not working and the inability to use bookmarks. This library provides a simple class that will handle all these issues and more, without you having to think about it too much.
The Simple Ajax Library Ajax class (Salajax) tries to:

  • Make the back button work with Ajax
  • Make bookmarks work with Ajax
  • Run JavaScript contained in the Ajax response
  • Keep the .NET Viewstate
  • Submit forms as an Ajax request
  • Specify OnStart and OnEnd JavaScript functions to call
  • Specify an OnError JavaScript function to call when the Ajax response is an error
  • Set the HTML to display when updating a div with an Ajax request
  • Set the HTML to display when there is an error making the Ajax request
  • Be extremely simple to use
Basically, I'm hoping that the Salajax class will make it very easy to do everything and anything you could possibly want to do using Ajax.

Dragging and dropping with ASP.NET 2.0 and Atlas



Introduction

This tutorial is intended to help readers understand how certain aspects of Microsoft's new AJAX Extensions technology works. AJAX Extensions is intended to simplify the development of AJAX-style functionality. As with all technologies, however, to use a tool well, it is important to understand the underlying technology that Atlas abstracts. One of the key ASP.NET AJAX abstractions is the new XML markup syntax developed to make coding with AJAX easier (originally included with the core Atlas files, XML markup is now a part of the CTP called AJAX Futures). With XML markup, developers can modify their code declaratively. However, there are times when a developer may want to be able to change her code programmatically, and in order to accomplish this, she will need to understand that underneath the markup abstraction, she is actually dealing with good 'ol JavaScript and some custom JavaScript libraries developed by Microsoft. In order to demonstrate the relationship between the Atlas declarative model and the programmatic model, I will go through a series of examples in which the same task will be accomplished both declaratively and programmatically. I will be demonstrating how to use the PreviewDragDrop library file to perform basic drag-drop operations as well as setting up drop zones.

Ajax AutoComplete in ASP.NET

Without using AjaxControlToolKit, we can implement AutoComplete Extender using pure Ajax Call. This article explains how to do make AutoComplete Extender.

OnKeyUp event helps you to fetch data from database with Ajax call. Here one Handler.ashx handles the AJAX request form Client. I add a Class file to handle database operations to better coding practice. Below I explain the database helper Class. Class has one method:

GetTable(string sqlQuery) 

Making Cross Domain jQuery AJAX Calls

Today's web browsers do not allow web pages to make cross-domain Ajax calls. By this, I mean that if you are at www.ajax.com and try to make an Ajax call (a call using the XmlHttpRequest object), the browser would not allow this to happen. Why? For security purposes that I cannot currently name.

However, at some point you get to a project where you're interfacing this third-party site that needs to talk to your main site, or some other similar situation where the only way you're going to get the data you need from point a to point b is with some JavaScript magic. Here is how to accomplish it.

Getting Started with iPhone and iOS Development

Introduction
This is a first in a series of articles to get some one up and running with iOS development. iOS is the operating system that runs on the iPhone, iPad, and iPod Touch. While I will use an iPhone for my example code you could apply the code to all three devices.


Web App Common Tasks by jQuery


Introduction
One of my experience of using jQuery is that I often need to search around for solutions to some particular tasks, although there are good chances that the problems you try to tackle have already been solved by someone else via a plug-in, you still need to digest, evaluate, test and sometimes modify it to fit your project needs. That's perfectly fine for most rapid web development efforts. However, for some browser based, low-level tasks that are common for almost all web applications, searching for multiple plug-ins then put them together and test them out would cost unnecessary time. This article provides a jQuery plug-in (CBEXP) that encapsulates the most common tasks together and is reusable for different web applications.

For example, if your web application needs to conditionally (say, one Ajax call hasn't returned yet) warn user when navigating away or closing the browser window, or your client/service interaction relies on cookies and you want to make sure browser cookie is not turned off, or you need to parse query string and retrieve a particular parameter value in the client, or need to load different stylesheet dynamically without a post back to server, etc., it would be nice to have one jQuery plug in to handle all these low level browser based tasks, then we can focus more on application specific features.

As a matter of fact, CBEXP plug-in was initially put together for a real world consumer facing web application, it has been tested and working, wish it would be useful for your web application too.

Scroll Bar for Blog Post Body

Adding Scrollbar to Blog Post body
once you are logged into Blogger account, go to Template -> Edit HTML and scroll to this code. Add the portion shown in red:-

Step 1 : Open your Blogger Account and Edit Html Under Layouts Tab;
Set 2 : Search for .post ( by browser Search) and Put the Red Portion in Curly Bracket. { }

.post {
height:200px;
overflow:auto;

}

This will give you scrollbars to every post:-

Scrollbars within Blog Post
Sometimes, you may not want to have the scrollbars to all the [...]

This will give you scrollbars to every post:-

Scrollbars within Blog Post

This setting, scrollbars will automatically appear according to your need:-
Sometimes, you may not want to have the scrollbars to all the blog posts, but only for several paragraphs within a post. Assuming you are writing an article and you wish to enclose some long text within a scrollbox, you have to first define a class within the stylesheet.

For example, we can insert in the stylesheet this code to specify the maximum height and width of the scrollbox. Once the text overflows

Step 1 : Open your Blogger Account and Edit Html Under Layouts Tab;
Set 2 : Search for by Browser search place the below code before it.

.scrollbox {

height:100px;

width:400px;

overflow:auto;

}
Step 3: Save the template.

Next, when you are writing a post, switch from the “Compose” mode to the “Edit HTML” mode and put the below code where your want to appear scrolling bar.


<div class=”scrollbox”>TEXT TO BE INCLUDED IN THE SCROLLBOX.</div>

You can continue typing the post by switching back to the “Compose” mode.

After you are done, when you publish your post, you will see that only the part of the text comprised with the tags will be in a scrollbox, like this:-

Show Limited Number of Labels in Widget.

As you write more and more posts you will keep adding labels to them to categorize your posts. You can add more than one label to any single post. Labels are useful as they serve as keywords channelling traffic to your posts through search engines like Technorati.

However the list of labels in your blog can get to be very long stretching your sidebar until y

our blog post looks like a flag on top of a long sidebar. To prevent this you can modify the code of your Labels widget to show only the topmost labels in your blog..............

Javascript Redirect Traffic from Blogspot to WordPress Site

Ok. So you’ve had a blogspot blog for a little while and you’ve decided you want a WordPress site. How do you redirect traffic from the old site to the new site and lose as little traffic as possible in the process.

First. Use the import feature available in WordPress. From your Daskboard, look for Tools > Import

Second. Add some javascript code to your blogger template. Update the vars blogTitle and wordPressUrl to match your blogspot blog.

<script>
var blogTitle = 'Flexing My Kerkness';
var wordPressUrl = 'http://kerkness.ca';

if( document.title == blogTitle ){
window.location = wordPressUrl;
} else {
var newUrl = str_replace( document.title, blogTitle+’: ‘, ” );
window.location = wordPressUrl + ‘/?s=’ + newUrl;
}
function str_replace(haystack, needle, replacement) {
var temp = haystack.split(needle);
return temp.join(replacement);
}
</script>


Basically what this script does is redirects from your blogger site to your new domain while conducting a search based on the title of page being requested.

For example. If you had a post called “How to change outboard motor oil” on blogger. When you try and access the blogspot url for that post you will be directed to the new wordpress domain and you will search for posts matching “How to change outboard motor oil”. If that post was imported into word press and you haven’t changed the title. Users will be shown a link to the post on your new site. Also they may find any new or relevant content you’ve posted since making the change to WordPress.

JAX Labels Reloaded

The AJAX Labels is back with more features! I was planning to release this with my new template, but the template design is slipping beyond schedule.
Note: If you want to integrate AJAX Labels with Phydeaux3's Label Clouds, read this post and come back here.
Some of the new features are:

  • Built-in navigation system.
  • More user customizability. (You don't even need to know coding for that!)
  • Support for Unicode Categories in IE.
  • More user-friendly installation. (Code to be copied/modified in template is reduced)

Adding Background Image to Post Titles


Dcloud Of Dcblog brought this fantastic thing to us.By this we can put a Image Just behing the Post Title like on his blog.It’s Very Simple,the only thing is that you need to have a superb image to put on their.

You will have to just check hard for the codes to implement as different blogger have different type of coding.

To locate the code which controls the post titles go to your Layout Tab (located in your Customize window) and click the Edit HTML sub tab. The code you are searching for is “.post h6″ (it can be something else also,So try searching) which looks like this

Scroll Bar for Blog Post Body

Adding Scrollbar to Blog Post body
once you are logged into Blogger account, go to Template -> Edit HTML and scroll to this code. Add the portion shown in red:-

Step 1 : Open your Blogger Account and Edit Html Under Layouts Tab;

Set 2 : Search for .post ( by browser Search) and Put the Red Portion in Curly Bracket. { }

.post {
height:200px;
overflow:auto;

}

Yahoo! Buzz is open for everybody

It’s been about six months since Yahoo Buzz launched and now Yahoo has decided to “open-up” Buzz. The Yahoo Buzz is similar to Digg, in which users can vote popular Internet news stories up and down.

When a story got so much buzz, it will be reached the Yahoo! homepage! This is good news for publishers because those who have already experienced a “Yahoo! Buzz Effect” have talked about the surge in traffic they experienced once Yahoo placed an article on their homepage.

Add Yahoo Buzz button to your blog Post

Yahoo Buzz can be your excellent traffic-maker if your story is interesting and get to Yahoo! homepage. The First Step to get it is to put a Yahoo! Buzz button to your blog so that people can vote your entry up. Adding a Yahoo! Buzz button is not too complicated if you follow my steps below

Step 1. Choose your favorite button from Yahoo! Buzz that fitted well with your site design (large button with vote count -Square Button - is highly recommended), then click “Get Code”.

Step 2. If you have selected the Square Button the code will be like this

<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square">ARTICLEURL</script>

15 Best Image Search Engines to Find Photos

What to find a great photo or perfect celebrity picture? This list of best image search engines will help you find interesting photos in the easiest way possible. You will learn about hidden preferences, unique features that will make you searches images like a professional and actually find the best images possible. Check them out… and see their test results on Aishwarya Rai.



Imageryis my favorite image search engine due to the intuitive interface. This has a cool tabbed search interface to browse your searched images. Just keep searching new image terms, which keep compiling in new tabs, click to load full size image at the bottom or in new window. Loads 20-100 images at a time in ajax-y fashion. Best for research and keep collecting all your search images easily. You can tweak preferences to select JPG, GIF or PNG, sort by size, sort by black and white, grayscale or color and of course get safe for work images too. Test

What is Google Adsense and how to get a Adsense account fast.

Google Adsense is one of the easiest way to allow webmasters to make money from content websites. You just need to add some simple javascript codes on the web pages, and then when visitors click the ads, you make money. No need to sell and think yourself, Google does all thinking for you. Very easy, right?

Google Adsense is really a gold mine. People are creating niche websites just to display the ads and make easy money everyday - automatically. There are so many success stories about people earning thousands of dollars a month from Adsense!

If you don’t have an Adsense account yet, you should get one and start profiting from it!
However, not all who applied for an Adsense account gets approved. You need to show your content websites to Google first to get approved.

Then how if you don’t have a content website? No need to worry, here is a secret method to get approved - fast and easily - just read on...

Google has its own blogging service - Blogger.com ( http://www.blogger.com/ ). You can start a blog on Blogger.com with any topics you like - and it is completely free. Once your blog is created, post two or more related articles on it. Wait for a day and then you can apply your blog for an adsense account using this link:

https://www.google.com/adsense

Wow, your Adsense account will get approved in 5 days.
Happy Earning from Adsense!

A - Z Tricks and Tips for Layout Optimization and Highest CTR

Google Adsense is perhaps the easiest way to attract advertisers from across the globe to your blog. Just submit your blog to Google for approval. If Google likes what it sees, it will place contextual ads linking to products likely to appeal to the readers. Each time a reader clicks a link, the advertiser pays Google a small fee, and Google splits that with you.

The next interesting question - How to Make Money with Google Adsense ? Here are The best Google Adsense Tips and Tricks for making more money (profit) from Google adsense program.

Precautions for Google AdSense before testing on your website

If you are testing your new website layout, you might be reloading your website pages again-n-again. And if these pages contain Google Ads, each time your reload your page, you make a request to Google Ads Server for a new set of ads.

Certainly Google is unaware that you are testing your website and it might even penalize your account for "click-fraud" since the IP requesting ads remains same. And if in the worst-case scenario, you might accidently click on your own ads. And these extra "ad impressions" will also chance your CTR data.

One simple way to avoid this serious problem is to remove the Adsense code altogether from your page before testing. But this may not be the best solution as your Google Ads are an important part of your layout. So here are a few simple but effective workarounds:

1. Instead of using Adsense code, add a static graphic (jpg image) with the same dimesions as your adsense code. (Google itself provides static images of various ad formats.)

2. Modify the value of google_ad_client to something like "pub-googleIamTesting"

3. Add another line to Google Adsense code google_adtest = "on"; Don't forget the semicolon.

4. Though there is no official comment, it is safer to remove the google_ad_channel variable.

Or contact Google Adsense Team with your query. Google folks are very quick to respond.

Google AdSense policies require that websites displaying Google ads be active and not under construction. When your site is complete and active, you may add the AdSense
ad code.

Show Adsense ads in individual post

First of all you should know how to show adsense ads in between the posts.
For that You will have to follow the steps below :

Step 1: Sign in to your adsense account and get the adense code.
Now, you have to parse the code using online parser. Paste your adsense code here and you will get the parsed code.

Step 2 : Sign in to your blogger account and from Template panel go to Edit-HTML. Expand HTML and then put your adsense code in the following format.
Example is given here :


For Wordpress users : I will prefer a plugin “Shylock Adsense” using which you can have adsense ads of different sizes, type on selected posts. You can fully customize your ads’ looks, it’s placement and much more.

Guide for Google AdSense Publishers

If you are a regular visitor to my site, you might have noticed some changes in the style. Well, I drew most of the inspiration from the picture above also known as the "heat map".


This “heat map” illustrates ideal ad placements on a sample page layout. Google folk have published an elaborate Optimization Tips page for Google Adsense publishers.


Looking at my recent adsense statistics, I must admit that the above illustration is fairly nice. The colors fade from dark orange (strongest performance) to light yellow (weakest performance). All other things being equal, ad placements above the fold tend to perform better than those below the fold. Ads placed near rich content and navigational aids usually do well because users are focused on those areas of a page.


Google has done an impressive presentation to woo new Adsense Publishers.


Adsense for Content remains my primary source of revenue from this blog. I do not use "Adsense for Search" as Googlebot doesn't index my site too well. Yahoo! spiders do a better job, atleast in my case.

How Invalid Adsence Clicks Detect by Google

Fooling Google Adsense is like you make a donkey yourself
Thinking to cheat AdSense?Stop that. It will never bring you anywhere. You might pull it off with smaller ads network, but definitely not with Google. Here are some detection methods they might use. At the very least, they have the resources to do so.

IP Address If the AdSense click is originated from the same IP Address as the one used for accessing your AdSense account, your account is flagged.

Cookies Most home users do not use static IP Address for Internet connection. In most cases just disconnect and reconnect will give you a new IP Address. But don’t forget, Google has set cookies on your computer.

How I Place Adsense Code in Blogger Post

There is trick to add Google AdSense and other advertising network such as AdBrite ad unit right beside and inside within Blogger post content, so that the ad block will appear wrapped and floated inline to the top left or top right next to the blog text. If you do not like this layout and dislike the prominent location the ads are displayed, there are other places within blog post to put the ad code.


How to install/uninstall the preview tool of AdSense?

The preview tool is available in all active AdSense languages. Installing the tool is easy, and only takes a few minutes. To install it, you'll need to add a registry file to your Windows system, by following the instructions below.

By installing and/or using the AdSense Preview Tool, you agree to abide by the Google Toolbar Terms of Use (which can be found at http://toolbar.google.com/terms) as if such terms applied to the AdSense Preview Tool and Google's advertising services.  Notwithstanding the Terms of Use, you agree to use the AdSense Preview Tool solely to manage your AdSense account or as part of a good faith evaluation of the AdSense program to help you determine whether to enroll as an AdSense publisher.  You may not use the AdSense Preview Tool in any manner that could damage, disable, overburden, or impair any Google services.

No AdSense Ads Below Blog Title or Post Title

By referring to Google AdSense placement heat map, we put Google AdSense ads above blog content (below post title) for better performance. But Google AdSense team does not quite agree with the ads placement.


QuickOnlineTips received an email from Google AdSense support pointing out the issue on their site.

In fact, Google Adsense Blog published 2 guidelines earlier and one of them is “ads shouldn’t be placed under a title or section heading in a way that implies that the ads are not ads.”

I didn’t take much attention to the guideline because I thought mine is different than the example. My AdSense ads was separated by categories and date. But it seems AdSense team think the different.

AdSense team advised QuickOnlineTips that:

publishers may not label the Google ads with text other than ’sponsored links’ or ‘advertisements’.

As a result, QuickOnlineTips now put a “ADVERTISEMENT” word above the AdSense ads.

Cleaning (Refreshing) Cache in Magento

The Magento Admin panel calls it refreshing (Refresh) the cache, while within the code it’s refered to as “cleaning” the cache.

If you want to Refresh your cache within the admin panel, simply go to System > Cache Management. Drop the box labeled “All cache” down to the Refresh option and hit the Save cache setting button near the upper-right of the window.

If you want to clear your cache from the command line, SSH into your server and get into the base directory of your magento installation. Type the following commands:

cd var/cache
rm -rf *

If you want to clean the cache from within your code (maybe within a cron or something), you’ll need to place the following PHP code within your script wherever you need the cache cleaned:....

Create Custom Category Attributes with phpMyAdmin (Tutorial)

The following is a brief tutorial for creating a custom category attribute. This has only been tested by creating a textfield-type attribute in Magento’s version 1.3.2. However, to the best of my current knowledge, it should work in any versions 1.2+ and for any type of attribute. Note: changing the attribute type will require a couple changes to the SQL below. So on we go…

  • 1. Open your Magento database using phpMyAdmin.
  • 2. We will first find the proper attribute_id for your new attribute.  Run the following SQL statement and keep the resulting number handy: 

Some Best Practices for C# Application Development

Few days ago, in one my earlier posts, I discussed about “Some Best Practices for Silverlight Application Development (XAML)” which got a huge hit by my readers. I got a lot of feedback on that too. Someone from the community also suggested that I write some best coding practices on C#. This struck my mind and hence I decided to write some best practices about C# coding here from my past few years of experience.
For the past few years, I learned a lot and tried to share the best of my knowledge to others who are new in the software development field. I contribute this post to those fellow members. Hope, I will get more feedback and/or suggestions here too.
I liked C# programming when I started with .NET technology. I never tried to write code in VB.NET as I decided my career on that. When I was new to this field, I made a lot of mistakes and from those mistakes I learnt more things. There’s a proverb: “Mistakes make you learn more & more…”. My career was one of them. Also there’s a proverb: “There’s no end to learning in life. Each second, a person can learn”. So, if there are any more suggestions, please share those with me. It will help me and others to learn more in a proper way.
One second, there are various posts available on the internet regarding the same topic. If you do a Google, you will get a number of them. But these collections are based on my experiences, those I learnt and thought of sharing.
Let’s stop here and start discussing the Best Coding Practices of C# application development. Here are some of them:

  • Use proper Naming Conventions
    • Always use Camel or Pascal naming format
    • Avoid all uppercase or lowercase names
    • Never use a name which begins with numeric character
    • Always prefer meaningful names for your class, property, method, etc.
    • Never build different names varied by capitalization
    • Don’t use the same name used in .NET Framework
    • Avoid adding prefixes or suffixes for your identifiers
    • Always use “I” as prefix for Interfaces
    • Always add “Exception” as suffix for your custom exception class
    • Never prefix or suffix the class name to its property name
    • Prefix “Is”, “Has” or “Can” for boolean properties
    • Don’t add prefix for your controls
  • Decide between Value Types and Reference Types
  • Always Use Properties instead of public variables
  • Use Nullable data types whenever required
  • Prefer Runtime Constants over Compile time Constants
  • Prefer “is” and “as” operators while casting
  • Prefer string.Format() or StringBuilder for string concatenation
  • Use Conditional attributes when you need them
  • Use ‘0’ (zero) as default value enum value types
  • Chose between Equals() and Equal (==) operator
  • Always prefer the foreach(…) loop
  • Initialize member variables at the time of assignment
  • Initialize static member variables with static constructors
  • Use constructor chaining whenever possible
  • Minimize boxing & unboxing of objects
  • Properly utilize try/catch/finally blocks
  • Catch only that Exception which you can handle
  • Use IDisposable interface
  • Utilize LazyInitializer in most of the cases
  • Split your logic in several small and simple methods
  • Try to use Patterns & Practices like MVP/MVC/MVVM
  • Always prefer DataBinding to populate values in the UI

Delete Data in GridView Using Template Button

This article snippet explains how to delete data from GridView using template buttons.
Now we look at how to add template button in GridView. First select Edit Columns in GridView.



UserControl/Control : How to get a reference to an element of the template

When you want to create your own custom control, you have two choices: create a UserControl or inherit from one of the "Control's classes" (ContentControl, ItemsControls or Control itself). When doing so, you'll surely need to access to the visual parts of your template from the code to add to it a nice behavior.

In this post, we'll discover how to access the template children by using the FindName method even on UserControl.

You Create a Control

I won't explain how to create a custom control, so here is its base code:

[TemplatePart(Name = "PART_MyGrid", Type = typeof(Grid))]
  public class MyCustomControl : ContentControl
  {
    private Grid myAimedGrid;
 
    static MyCustomControl()
    {
   //Overrides the style by ours
      DefaultStyleKeyProperty.OverrideMetadata(typeof(MyCustomControl),
          new FrameworkPropertyMetadata(typeof(MyCustomControl)));
    }
  } 
 
 

Limitation of Blogger ( Blogspot) Blogs

There are usage limits imposed by every free service, including Blogger.com. Often, the limits are necessary for design purposes (e.g., how much space to cater for each form field), logistics (e.g., server space and speed) and financial considerations. Most of the answers on the amount of storage space, limitations on posts, etc. are found in Blogger Help. However, since we still receive queries on that, we thought we shall add a few more items to that list for the benefit of the new Bloggers. These limits apply to one Google account, and if you find yourself exceeding these limits, one solution would be to register for an additional Google account to enjoy the services.

SQL DB Restore using PowerShell

If you are looking for a PowerShell script that lets you restore a database from a backup (.bak) file to MSSQL server, then this is the right place for you.

Database Restore - SQL

Let’s say you have a .bak file (Example: AdventureWorks), and you would like to restore it to an SQL server using PowerShell. If you use SQL Server 2008 Management Studio and click on the “Script” button, you will get the SQL statement that will do that restore for you.



The way to find a hotspot

Today I want to describe the way to find a hotspot without profilers. I often use this approach and find it effective and simple enough. The only tools you need are any Windows debugger (I prefer WinDbg, but you can use your favorite one) which should always be in your hands if you decided to investigate some performance issue (as well as any other problem with your software) and tool like Process Explorer which are available free from Windows Sysinternals. You can use this method without profiler at all or in conjunction with profiler to clarify the result of profilers work.

Before explaining the approach, I want to define the term “hotspot”. There are different definitions which can be applied in different contexts. In this article, we consider a hotspot as a limited set of instructions on which execution spends significant CPU time or more CPU time than you expect from it.

The process is divided into the three steps. If you used a profiler and have a call graph, you can miss the first two steps and jump to step number three to verify the profilers result and find out the hotspot most precisely. Nevertheless, I recommend you to go through all the steps because the results returned by profilers sometimes can be very obscure and you will lose time rolling around a call graph or other related information. Even if your profiler was absolutely right, you’ll have one more confirmation of its result. Sometimes it’s better to check twice. :)


Fixed -problems installing Windows Phone Developer Tools

Today, I had some troubles first uninstalling my existing CTP release of the Windows Phone Developer Tools. It was a required step to be able to install the newest release of these tools.

Now that I managed to uninstall the previous version, I have found other problems installing the newer one. More precisely, the problem appeared when trying to install the Windows Phone Developer Resources package, getting an error like the following in the automatic web installer (it surprisingly required a reboot when starting to install it, and the error did pop up when resuming the install process after the reboot).



How to create an animated expander

The expander control can be used in a lot of situations but the one proposed by default is quite "rigid".

In this post we will discover how to animate it quite simply just via XAML !


The WPF engine lets us redefine the template of the controls and we'll just do that.

The goal aimed

What we aim is to get the same functionnality as the original expander.
This is not as simple as we tought and I've seen a lot of expander loosing some of their behaviors when they became "animated" : original value of IsExpanded ignored, ExpandDirection ignored, etc...

The Compound Case of the Outlook Hangs

This case was shared with me by a friend of mine, Andrew Richards, a Microsoft Exchange Server Escalation Engineer. It’s a really interesting case because it highlights the use of a Sysinternals tool I specifically wrote for use by Microsoft support services and it’s actually two cases in one.

The case unfolds with a systems administrator at a corporation contacting Microsoft support to report that users across their network were complaining of Outlook hangs lasting up to 15-minutes. The fact that multiple users were experiencing the problem pointed at an Exchange issue, so the call was routed to Exchange Server support services.

The Exchange team has developed a Performance Monitor data collector set that includes several hundred counters that have proven useful for troubleshooting Exchange issues, including LDAP, RPC and SMTP message activity, Exchange connection counts, memory usage and processor usage. Exchange support had the administrator collect a log of the server’s activity with 12 hour log cycles, the first from 9pm until 9am the next morning. When Exchange support engineers viewed the log, two patterns were clear despite the heavy density of the plots: first and as expected, the Exchange server’s load increased during the morning when users came into work and started using Outlook; and second, the counter graphs showed a difference in behavior between about 8:05 and 8:20am, a duration that corresponded exactly to the long delays users were reporting: