Search This Blog

Wednesday, January 14, 2009

Product Review - Featured product/tool for Dotnet (.NET) Developers- SSWare.VS Explorer 2009 for .NET

VS Explorer adds a Windows Explorer-Like file and folder browsing window to Visual Studio. It provides complete access to file and folder context menus (including 3rd party extensions such as TortoiseSVN) and drag-drop functionality which allows directly adding files/folders to your projects. VS Explorer eliminates switching back and forth between Visual Studio and Windows Explorer and other external programs and allows you to focus on your work flow and preserve concentration, save time, reduce stress and work efficiently.
VS Explorer can quickly browse to the current solution folder, project folder or the selected item. It can add selected dll/exe files as references and open command prompt window on selected folder. It can filter files matching specified patterns and automatically open specified files in the current Visual Studio instance. It features Thumbnail View, Details View, Icon View and List View and various layouts which show/hide the folder tree and the file/folder list. VS Explorer fully supports Visual Studio 2008 and Visual Studio 2005

home @:

dn @:


FAST and FREE mirror download: 

Product Review - Featured product/tool for Dotnet (.NET) Developers- SSWare.VS Explorer 2009 for .NET

Ebook - Download - Hardware-based Computer Security Techniques to Defeat Hackers - Free ebook

Ebook - Download - Hardware-based Computer Security Techniques to Defeat Hackers - Free ebook

Presents primary hardware-based computer security approaches in an easy-to-read toolbox format
Protecting valuable personal information against theft is a mission-critical component of today’s electronic business community. In an effort to combat this serious and growing problem, the Intelligence and Defense communities have successfully employed the use of hardware-based security devices.

This book provides a road map of the hardware-based security devices that can defeat—and prevent—attacks by hackers. Beginning with an overview of the basic elements of computer security, the book covers:

Key generation and distribution
The qualities of security solutions
Secure co-processors
Secure bootstrap loading
Secure memory management and trusted execution technology
Trusted Platform Module (TPM)
Field Programmable Gate Arrays (FPGAs)
Hardware-based authentification
Location technologies

Hardware-Based Computer Security Techniques to Defeat Hackers includes a chapter devoted entirely to showing readers how they can implement the strategies and technologies discussed. Finally, it concludes with two examples of security systems put into practice.

The information and critical analysis techniques provided in this user-friendly book are invaluable for a range of professionals, including IT personnel, computer engineers, computer security specialists, electrical engineers, software engineers, and industry analysts.


Download Free ebook - Beginning Visual Basic.Net Database Programming(VB.Net Database Programming)

Beginning Visual Basic .NET Database Programming: (Book is in RAR format ) FreeThis book has been fully tested on and is compliant with the official release of NET. Almost all applications have to deal with data access in some way or another. This book will teach you how to build Visual Basic. NET applications that make effective use of databases.

Monday, January 12, 2009

Article - Don't Let your data fall into the wrong hands

Removing data from a hard drive, permanently, is something that sounds an awful lot simpler than it proves to be in reality. As we all know deleting a file does not remove the file or its content from the hard drive permanently, data recovery companies can normally aid in the recovery of such files, no doubt other less scrupulous individuals are equally capable of such recovery feats.

So if it is so hard to remove private data from an old hard drive what exactly should you be doing to ensure your data has no risk of getting into the wrong hands?

To put it simply there is no safe and easy way of ensuring that data is permantly eradicated from a hard disk or any other form of storage medium in reality. That doesn’t mean however that it can’t be done.

Data can only be considered completely erased when it has been overwritten several times, each time using a different method. The level of overwriting usually considered to guarantee that data has been successfully erased is a seven pass overwriting method using software or manual processes that adhere to the DoD 5220.22-M standard for data erasure.

There is software available that can help in the task but many people prefer to leave data elimination to professional services as they will at least understand the exact processes that need to be followed to ensure complete elimination of any data and the chance of it falling into the wrong hands.

Apart from software and manual deletion there are more robust methods of data disposal which is commonally know as data destruction. This involves the complete destruction of the disks to the point where recovery would be impossible.

If you wish to attempt this yourself, it is important to note that the platters within the device should be completely destroyed, this means bending, scratching, smashing, shattering or whatever else seems reasonable to completely annihilate the hard disk platter.

Always remember deleting a file does not remove your data beyond the point of recovery. Formatting a hard disk, even full formats/low level formats do not guarantee complete data erasure. Re-installing an operating system does not get rid of your data either. The only reliable method is the multi-pass method.

If your data is business critical or extremely sensitive, always ensure that you can have the data certifiably removed from the storage media, whether that media be Flash Memory device, a hard disk drive, a RAID Array, Floppy Disk or CD / DVD Optical Media often only a professional can help you.

Your local data recovery services company will be able to advise you on safe data disposal methods and will probably have a local service. Data recovery and disposal should always be left to professional operators who are happy to certify their work.

A Supercar that runs on wind energy

LONDON: Get ready for a supercar that could reach a top speed of 155mph without harming the environment, for it runs on wind energy. 

Designed in California, the environmentally friendly Formula AE car will initially use a solar-powered battery to move, but later depend upon the airflow around it to power a turbine. 

The high performance car will take less than four seconds to accelerate from 0 to 60 mph. 
The car is expected to cost around 100,000 pounds when it hits the market. 

The two-seater's bodywork boasts paper-thin solar panelling that could fully charge the battery in just 1.5 hours. 

However, this time will be reduced to just six minutes with a new prototype battery. 

A full battery would enable the drivers to cover more than 200 miles or to race around a track for at least an hour. 

An advanced alternating current induction motor with a power output of 212 kilowatts will propel the Formula AE. 

In fact, the chassis will be constructed from lightweight aluminium and super strong steel in a Formula 1-style monocoque shell. Rory Handel and Maxx Bricklinas from Beverly Hills, California designed the sleek motor of the car, and they expect the prototype to be completed in August. 

"The Formula AE car embraces a rarely thought of alternative source of energy," the Telegraph quoted a RORMaxx spokesman as saying. 

He said: "The target market would be the sports car, track day, eco-concerned auto-enthusiast. In addition, those enthusiasts who support and would want to promote the future development of revolutionary green technologies."

Technology News - First flying automobile to take air test next month

LONDON: The first flying automobile, equally at home in the sky and on the road, is scheduled to take to the air next month. 

If the automobile, which can transform itself from a two-seater road car to a plane in 15 seconds, survives its first test flight next month, it is expected to land in showrooms in about 18 months, The Sunday Times claimed. 

The Terrafugia Transition, developed by former NASA engineers, is powered by the same 100bhp engine on the ground and in the air. 

Its manufacturer, Carl Dietrich, who runs the Massachusetts-based Terrafugia, said the flying automobile uses normal unleaded fuel and fits into a garage. 

Dietrich claimed that Terrafugia will be able to fly up to 800 km on a single tank of petrol at a cruising speed of 115mph. Up to now, however, it has been tested only on roads at up to 90 mph, he added. 

"This is the first really integrated design where the wings fold up automatically and all the parts are in one vehicle," Dietrich said. 

Dietrich said he had already received 40 orders despite an expected retail price of USD 200,000. Though, he accepted concerns over its price. 

"For an airplane that's very reasonable, but for a car that's very much at the high end," he admitted. 
There are still some drawbacks in launching the auto- mobile as getting insurance may be a little tricky and finding somewhere to take off may not be straightforward, he said. 

Alaska is the only place in the US where taking off from a road is legal. 

Dietrich said, "In the long term we have the potential to make air travel practical for individuals at a price that would meet or beat driving, with huge time savings."

Interesting News- Did you know that Googling Pollutes the Planet?

IT SEEMS YOU can't do anything nowadays without inadvertently contributing to your ever-growing, mutant-like black carbon footprint, and googling is no exception.

According to new research by Harvard University physicist Alex Wissner-Gross, every two Google searches performed generate about the same amount of noxious carbon dioxide as boiling water for a cuppa.

Apparently ye average innocuous search - ie "how big is my carbon footprint?" - produces 7g of CO2 whilst a boiling kettle generates about 15g. Don't even get us started on Googling WHILST drinking a cuppa.

According to Wissner-Gross "Google operates huge data centres around the world that consume a great deal of power". Shocka. But, admittedly, with well over 200 million internet searches a day, it's no wonder the concerned boffin found the need to state that, in his humble opinion, "a Google search has a definite environmental impact."

Of course, it's nothing new to claim the IT industry is polluting the planet. Greenpeace bangs on about it all the time, and even Gartner recently jumped on the organic bandwagon claiming the global IT industry generated as much greenhouse gas as the world's evil airline industry, or some filthy two per cent.

So, how exactly does a quick search for "best celebrity arse of 2008" foul up the planet? Well, firstly, any search request gets sent to a plethora of servers, which compete to get you the answer quickest. This is purportedly a rather energy-consuming enterprise, as servers which hold billions and billions of web pages filled with inane content tend to require rather a lot of power.

Wissner-Gross reckons he's even managed to calculate the CO2 emissions caused by a single individual viewing a simple web page to about 0.02g of CO2 per second. And the physicist believes he can extrapolate that number for an individual viewing a complex, image heavy, multimedia page to 0.2g of CO2 a second.

So concerned is Wissner-Gross with the state of the planet, he's even set up his own energy consuming website ( for people to produce more CO2 checking how much CO2 they produce whilst wibbling away. The man's a genius.

Google's Senior Vice President of Operations, Urs Hölzle, was seemingly unimpressed by Wissner-Gross' report, however, claiming in a company blog that the actual cost of a search query was closer to one twenty-fifth of the carbon released when making a cup of tea, or 0.2 grams of carbon dioxide per search.

Hölzle let off steam claiming Google's commitment to invest in clean energy technology should also be taken into account, including's $45 million effort to "[cut] the energy consumed by computers in half by 2010 - reducing global CO2 emissions by 54 million tons per year."

Still, at least Google's big dirty hoof-prints seem less significant when compared to the seeming pointlessness of maintaining a Second Life avatar, which guzzles approximately 1,752 kilowatt hours of electricity a year, or almost as much as an average Brazilian.

And if you think about it, if you weren't noodling about on the Internet for hours, you'd probably be watching TV or going on a long country drive, both of which would sully up the planet even more.

So, good god people, just google away

Download Free book - .NET Security and Cryptography

Download Free book - .NET Security and Cryptography
.NET Security and Cryptography : (Book is in RAR format ) FreeSecurity and cryptography, while always an essential part of the computing industry, have seen their importance increase greatly in the last several years. Microsoft's .NET Framework provides developers with a powerful new set of tools to make their applications taken From


Download free ASP.NET books - dotnet Books


Website to download ebooks ASP.NET 3.5 Unleashed, ISBN: 0672330113 by Stephen Walther Sams e-books for free from rapidshare link or megaupload torrent


Website to download ebooks ASP.NET Bible, ISBN: 0764548166 by Mridula Parihar Wiley e-books for free from rapidshare link or megaupload torrent.


Website to download ebooks Pro ASP.NET 3.5 in C# 2008, ISBN: 1590598938 by Mario Szpuszta Apress e-books for free from rapidshare link or megaupload ...


Website to download ebooks Microsoft ASP.NET 2.0 Step By Step, ISBN: 0735622019 by George Shepherd Microsoft Press e-books for free from rapidshare link or ...


Visit us to download free e-book Professional ASP.NET 3.5 In C# and VB P2P and ebook Learning ASP.NET 3.5 in pdf, chm, rar or zip format. - download YouTube Videos

YouTube is a wonderful resource for videos. Unfortunately, doesn't provide an option for downloading videos. However, if we want to view the same video many times on different occasions, the video gets downloaded multiple times, leading to wastage of precious bandwidth and increased internet usage charges.

The workaround to this is to download the videos from is an online tool which helps us do precisely this - download youtube videos. Go to youtube, choose the video you would like to download, copy its url and paste it on and press the download button, and lo, you have the video. You can play the video with compatible players like VLC.

Product review - Dotnet cool tools - .NET Refactor - Automate Refactoring of VB.NET and C# Code

Let us first see What Refactoring is?  

Refactoring is a methodology for restructuring existing code.  The plan is to change the internal structure without changing the external behavior.  The plan should include making your code easier to read, navigate through, and maintain.  If possible, refactoring should also improve the perfomance of the code.  

NET Refactor is a set of automated tools that allows you to refactor code, reorganize the code of your forms and classes, and generally clean up some undesirable code sequences.  It is an add-in for Visual Studio .NET that fits seamlessly into the Visual Studio .NET IDE.

The features of NET Refactor are broken into two major classes of automated tools.  NET Refactor is built on the framework of the very popular free add-in, Net Class Organizer, which has been available for download from KnowDotNet for several months.  There have been hundreds of downloads of this free add-in.

All features of NET Refactor can be invoked from one menu.  This menu, shown in Figure 1 below, can be placed on the Tool menu, on the main MenuBar, in the Code Window Context Menu, or both the MenuBar and Context Menu.

Figure 1 - NET Refactor Menu.

NetRefactor Main Menu

All refactoring features of NET Refactor  work for C# and VB.NET and include the following functionalities:

Refactoring Functions

  • -Complexity Analyzer -  Displays Solution Structure and Analyzes Complexity of Methods
  • - Extract Method - Extract selected block and create a new method.
  • - Simplify Conditional - Simplify Comple If Statements by extracting a new method.
  • - Create Properites- Generate Property Methods from one or many selected variables.
  • - Create Interface - Build Interface for selected Class.
  • - Wrap Selection - Surround the selected block with user-defined constructs.
  • -Insert Snippet - Insert user-defined code snippet at cusor position.
  • -Refactor Strings -  Convert String Contatenation code to use StringBuilder.
  • - Smart Commenter - Solve Your Comment Maintenance Problems with Smart Commenting.
  •  - Wrap Long Line - Automatically make continued lines.
NET Refactoris  Free to try for 30 days or can be  purchased by clicking Download or Purchase.

Sunday, January 11, 2009

Obfuscation in .NET - Prevent your Source Code from Being Open Source

Found this excellent introduction to Obfuscation in .NET by Joydip

Obfuscation in .NET

Prevent Your Source Code from Being Open Source



With so many decompilers available in the software industry today, your application’s source code faces security threats from a variety of prying eyes. This alludes to the potential loss of your intellectual property. But what makes this possible? .NET reflection, ILDASM.exe, and .NET decompilers.


So, then, what’s the solution? This potential threat has facilitated the development of a technology called obfuscation.


What Is Obfuscation?

Without changing its functionality, obfuscation protects source code from being disassembled/decompiled. This is a technology that makes the .NET assemblies more difficult to decompile and impedes the reverse-engineering efforts, hence, protecting the source code from potential threats. Obfuscation works by shrouding the facts in your code. Encryption suffers from the drawback that it needs to keep the decryption key along with the encrypted data. Therefore, it is possible to decrypt your source code. On the other hand, obfuscation can increase the protection against decompilation to a great extent, while leaving the application’s functionality intact.


Why Obfuscate?

There are several reasons why we should obfuscate:

  • Obfuscation reduces the size of an executable
  • Obfuscation improves the application’s performance at run time
  • Obfuscation protects intellectual property


How Does It Work?

Obfuscation encrypts the source code and removes some unnecessary information from the assembly metadata when it deems that it is safe to do so, thus making the assembly more difficult to understand or read after it is decompiled. The assembly metadata and manifest are used by the dissemblers to decompile them and get the original source code. Note that even if an application is compiled to native code at the time of execution, the Microsoft .NET runtime environment still requires that the assembly metadata and IL code be embedded in an assembly before it starts its execution. There are a number of techniques that can be used to obfuscate. However, the disadvantage of obfuscation is that it can affect performance (but not to a great extent).


Obfuscation never changes your source code. Rather, the obfuscators obfuscate your assemblies using a specific encryption methodology and transform them into another assembly that is obfuscated, but the functionality of it remains unaltered.


How to Obfuscate?

Obfuscation in .NET can be achieved by scrambling the meaningful names in the assembly metadata with non-meaningful ones and trimming the non-essential metadata, but without affecting any functionality. The techniques used include, but are not limited to:

  • Changing the Assembly Metadata
  • String Encryption
  • Size Reduction


Is this the Best Solution?

Unfortunately, the available obfuscators are unable to completely protect your intellectual property. Even if obfuscators can be a good tool for preventing most decompilers from stealing your code, if you are determined and possess a good knowledge of data structures and algorithms, you can steal the code even from an obfuscated assembly. So, obfuscation can be a good solution, but there is no software that is absolutely safe.


The Future

Microsoft realized the importance of this technology and introduced the Dotfuscator tool for obfuscation with Visual Studio .NET. In addition, these .NET obfuscator tools are available:


Obfuscation is a very powerful technology and will continue to be a part of the application build and deployment process in the years to come.

Obfuscation in .NET - an introduction

In the context of software, obfuscation is the process of scrambling the symbols, code, and data of a program to prevent reverse engineering.

Optimizing C++ compilers for native code tend to produce obfuscated code by default. In the process of optimizing, the code is often rearranged quite a bit and symbols are stripped from retail builds. In contrast, managed code compilers (C#, VB.NET, etc) generate IL, not native assembly code. This IL tends to be consistently structured and fairly easy to reverse engineer. Most optimization happens when the IL is JIT-compiled into native code, not during compilation.

This means it's pretty easy to take a compiled assembly and de-compile it into source code, using a tool such as Reflector. While this is a non-issue for web scenarios where all the code resides on the server, it's a big issue for some client scenarios, especially ISV applications. These client applications may contain trade secrets or sensitive information in their algorithms, data structures, or data. This is where obfuscation tools come in.

Obfuscation tools mangle symbols and rearrange code blocks to foil decompiling. They also may encrypt strings containing sensitive data. It's important to understand that obfuscators (as they exist today) can't completely protect your intellectual property. Because the code is on the client machine, a really determined hacker with lots of time can study the code and data structures enough to understand what's going on. Obfuscators do provide value in raising the bar, however, defeating most decompiler tools and preventing the casual hacker from stealing your intellectual property. They can make your code as difficult to reverse engineer as optimize native code. 

If you're interested in obfuscation for your code, I recommend taking a look at one of the third-party obfuscators that work on managed code. For example, Visual Studio ships with the community edition of Dotfuscator, a popular obfuscation package. The community edition only mangles symbol names, so it's not doing everything the full-featured editions do, but it will at least give you an idea of how an obfuscator works. And there are other third-party obfuscators that work on managed code as well. Keep in mind that obfuscating your code may make debugging more difficult or impossible. Many of the third-party obfuscators have features that help with debugging, however, such as keeping a mapping file from obfuscated symbol names to original symbol names.

Cool .NET Tools - Product Review - .NET Reflector

.NET Reflector enables you to easily view, navigate, and search through, the class hierarchies of .NET assemblies, even if you don't have the code for them. With it, you can decompile and analyze .NET assemblies in C#, Visual Basic, and IL. To download this tool, Visit 

Disassembler and analyzer panes

.NET Reflector lets you disassemble and analyze assemblies


  • Full support for .NET 1.0, 1.1, 2.0, 3.0, and 3.5
  • Windows® Shell Integration – Run Reflector.exe /register to register file extension
  • Assembly lists for .NET 1.0, 1.1, 2.0, 3.0, 3.5, Compact Framework 2.0, Compact Framework 3.5, XNA framework, Silverlight, Mono, and Direct X for Managed Code
  • Click navigation of source code
  • Find where types are exposed or instantiated


  • Expand methods

Expand methods

  • Linq query expression support

Linq query expressions

  • Lambda expression support

Lambda expressions

  • Anonymous methods and nullable type support

Anonymous methods and nullable types

  • Extension method support

Extension methods

  • Context-sensitive documentation view
  • Find virtual method overrides
  • Code URL support – Navigate to code://mscorlib/System.Object in IE

Code url support

  • Explore resources in assemblies

Problem with printer - Printing multiple pages on a single sheet

Recently, I came across a problem with my HP all-in-one printer: 
 if I print a document that's more then one page, all the  print goes on one piece of paper. So even if i fired a print of pages 1-20, i would get a single sheet with all the content. 
As usual, i browsed the web for a solution. I did find one and it worked. For those facing a similar problem, the solution is:
Go to printer settings, advanced features and turn the ADVANCED FEATURES option OFF. 
I am not sure how it worked but this is the solution and it worked for me.

DotNetNuke - a Web Application Framework - Product Review

Web Application Framework

DotNetNuke is an open-source Web Application Framework ideal for creating and deploying projects such as commercial websites, corporate intranets and extranets, online publishing portals, and custom vertical applications.  

DotNetNuke is provided as open-source software, licensed under a BSD agreement.  In general, this license grants the general public permission to obtain the software free-of-charge.  It also allows individuals to do whatever they wish with the application framework, both commercially and non-commercially, with the simple requirement of giving credit back to the DotNetNuke project community. 

DotNetNuke is built on a Microsoft ASP.NET (VB.NET) platform, and is easily installed and hosted.  With a growing community of over 440,000 users, and a dedicated base of programming professionals, support for DotNetNuke is always close at hand. Visit their site at

Monetized eMail Models

Newer ecommerce models are hitting the market. One such model works like this - you get paid to open & read the contents of RupeeMail. You receive promotional offers & special discounts in RupeeMail.

Interestingly RupeeMails will reach you based on the preference list you opted for.


Friday, January 9, 2009

Download Essential Skills for Agile Development - Free ebook download

Download the whole book (about 2MB)

Click here to download.

Download the individual chapters (they are designed to be read sequentially)

Chapter 1. Removing duplicate code

Chapter 9. OO design with CRC cards

Chapter 2. Turning comments into code

Chapter 10. Acceptance test

Chapter 3. Removing code smells

Chapter 11. How to acceptance test a user interface

Chapter 4. Keeping code fit

Chapter 12. Unit test

Chapter 5. Take care to inherit

Chapter 13. Test driven development

Chapter 6. Handling inappropriate references

Chapter 14. Team development with CVS

Chapter 7. Separate database, user interface and domain logic

Chapter 15. Essential skills for communications

Chapter 8. Managing software projects with user stories

Chapter 16. Pair programming

All-digital TV? Please stand by

The transition to digital television next month has been hailed as the biggest advance in over-the-air TV since the advent of color, but it's shaping up as a black eye for the government and risks leaving millions of viewers without a picture.
On Thursday, President-elect Barack Obama asked Congress to postpone the federally mandated switch to all-digital broadcast television, called DTV, scheduled to take place Feb. 17.
The unspecified delay would give the government time to fix a consumer-help program that ran out of money this week. But it also would set back the long-promised benefits of digital TV, which offers sharper pictures and more free channels while opening valuable airwaves for public safety and wireless Internet access.

The government took in $19.6 billion last year by auctioning existing analog TV airwaves to telecommunications companies for new wireless services, but Congress allocated less than $2 billion to educate consumers about the transition and issue coupons to buy needed converter boxes.

Now an estimated 7.7 million households nationwide may find their screens going dark next month.

Although a delay is far from certain, given potential opposition from broadcasters, public safety agencies and telecom companies eager to start using those new airwaves, there was plenty of frustration Thursday with the way the digital TV transition has been managed.

"The list of who's to blame is long," said Joel Kelsey, a long-time critic of the transition as policy analyst with Consumers Union, which also called for a delay this week. "It was a giant miscalculation by our federal government."

Some lawmakers urged a delay to give the incoming administration more time to correct problems, but others thought the clamor for a postponement was "just panic." Some congressional leaders simply weren't ready to weigh in. A spokesman for House Speaker Nancy Pelosi (D-San Francisco) said the relevant committees were working with Obama's transition team to solve the problems. 

Congress decided in 2005 to require all TV stations to broadcast only in digital to free up airwaves for public safety use in the aftermath of the Sept. 11 attacks and for auctioning to telecom companies to shrink the federal deficit.

People with cable, satellite or phone company TV services will continue to receive broadcast stations. But those who rely on antennas must have either a newer TV with a digital receiver or get a converter box. No-frills versions of those boxes cost $40 to $70. To offset the expense, the federal government allocated $1.5 billion to provide households with up to two $40 coupons.

But Monday, the National Telecommunications and Information Administration said the program had used all allocated funds. The agency has a waiting list of about 1.1 million requests, which can be filled as unused coupons reach their 90-day expiration. So far, about 13 million of the 41 million coupons mailed have expired.

Still, the nearly 8 million households that rely on antennas and are unprepared for the conversion face the prospect of paying full price for converter boxes during a recession -- or watching their TVs go blank after the switch. About 535,000 of those homes are in the L.A. market, the Nielsen Co. says.

In a letter Thursday to key members of Congress, John Podesta, co-chairman of Obama's presidential transition team, said the Feb. 17 conversion should be delayed, though he did not specify for how long. But with the incoming administration facing economic and foreign policy crises, it does not want to add a major problem with TV viewing in its first weeks in office.

Podesta cited troubles with the converter box coupon program as well as inadequate efforts to educate the public about the switch, and the need to help elderly, poor and rural Americans prepare for it.

"With coupons unavailable, support and education insufficient and the most vulnerable Americans exposed, I urge you to consider a change to the legislatively mandated analog cutoff date," Podesta wrote.

Podesta said the waiting list for coupons could climb to more than 5 million by early February. Obama is planning to include an additional unspecified amount of money for the digital TV switch in the economic stimulus package that is still being drafted.

"The Obama administration deserves time to bring order to what has been an appallingly mismanaged process by the Bush administration," said Senate Commerce Committee Chairman John D. Rockefeller IV (D-W. Va.).

Some Republicans said Obama was needlessly concerned when all Congress needed to do was make small fixes to the program.

"We don't need to bail out the DTV transition program because it isn't failing, and reintroducing uncertainty to the switch will make things worse instead of better," said Rep. Joe L. Barton (R-Texas). "Ditching the deadline and slathering on more millions of taxpayer dollars, however, is just panic."

The National Telecommunications and Information Administration has requested a temporary allocation of $250 million to resolve the coupon program backlog, said acting Administrator Meredith Atwell Baker. She said the Bush administration opposed a delay.

"Congress established everything about this program. We are just the implementers," Baker said.

The National Assn. of Broadcasters was cautious in its response Thursday, saying it was willing to work with Obama and the Congress "to ensure a successful DTV transition." And News Corp., which owns 27 broadcast stations, said it supported any efforts to make the transition a success.

Broadcasters have invested billions of dollars in preparing for the switch and are anxious to turn off their analog signals, which use large amounts of electricity. But stations also do not want to lose viewers because their TVs can't receive the digital signals.

Rep. Jane Harman (D-Venice) has worried that a poorly run transition could delay the allocation of new airwaves to public safety organizations so they could solve communications problems that plagued response to the 9/11 attacks and Hurricane Katrina. But she said Thursday she might have to support a delay.

"If the money wasn't provided and information isn't out there and large groups of people are going to be stranded [without broadcast TV], we have to take action," she said. "But it was avoidable."

Thursday, January 8, 2009

Capturing a screen shot in .NET 2.0 Windows Application

When supporting installed software, descriptions of problems can be enhanced greatly by viewing the contents of the user's screen. In this article we will explore how to perform a screen grab and display the captured image in a Windows Forms application.

Creating the Application

It was not possible to capture the contents of the desktop using the early versions of the .NET framework without resorting to Windows API calls. The .NET framework 2.0 introduced several new and modified classes within the System.Drawing and System.Drawing.Imaging namespaces that make the job much simpler. Instead of using API calls, the Graphics Device Interface 'plus' (GDI+) system that was introduced in Windows XP, and is provided in later operating systems, is utilised.

To demonstrate, we will create a simple Windows Forms program that copies the contents of the screen onto the background of its main form on loading. The image will be the same as that copied to the clipboard when the Print Screen key is pressed. To begin, create a new Windows Forms application. The entire code for this sample will be held in the form's Load event so add this event using the development environment of your choice. The generated code should be similar to the following:

private void Form1_Load(object sender, EventArgs e) {  }

The process uses two key drawing namespaces. To reference these, ensure that the following using directives appear at the top of the code file:

using System.Drawing; using System.Drawing.Imaging;

Creating the Bitmap

The first task for the program is to create the bitmap image that will be used to hold the captured desktop contents. This image will, at the end of the process, be displayed within the application's window as the background image. It could alternatively be saved to disk or displayed in another image control according to the program's requirements.

Bitmap Size

The bitmap image will be created with a fixed size. This size must match the screen resolution exactly or the image will be cropped or contain blank areas that are simply wasting resources. To determine the screen resolution, add the following code to the Load event:

Rectangle bounds = Screen.PrimaryScreen.Bounds;

NB: In the example we are using the PrimaryScreen property to examine the contents of the main display. If multiple monitors are in use, the AllScreens array can be used to capture the other displays.

Colour Depth

The colour depth for the screen is measured in bits per pixel. Usual values for number of bits used per pixel are 8, 16, 24 and 32. The higher the number of bits, the more colours can be represented in each screen pixel giving improvements in graphical quality at the cost of memory usage. We will identify the colour depth and use a similar value for the bitmap so that memory usage is minimised.

To determine the colour depth, add the following code:

int colourDepth = Screen.PrimaryScreen.BitsPerPixel;

Selecting the Pixel Format

To create a bitmap object with a specific number of bits per pixel, a PixelFormat structure must be created. This data type specifies information relating to pixel formats that may be used by GDI+ when working with images. The structure contains some pre-defined constants that can be used to specify the various bit-depths required.

One limitation of the screen capturing method  is the inability to capture a bitmap with eight bits per pixel. This is due to the image being pallet-based rather than defined as an RGB value. To avoid this problem, if the screen is set to use 256 colours (8-bit), the captured image will use a sixteen-bit colour depth.

The following code creates a new PixelFormat structure and assigns its value according to the colour depth identified earlier. The switch statement includes a default option that uses thirty-two bits per pixel. This is used if the colour depth is not one of the expected values.

PixelFormat format; switch (colourDepth) {     case 8:     case 16:         format = PixelFormat.Format16bppRgb565;         break;      case 24:         format = PixelFormat.Format24bppRgb;         break;      case 32:         format = PixelFormat.Format32bppArgb;         break;      default:         format = PixelFormat.Format32bppArgb;         break; }

Initialising the Bitmap

Now that the size and number of colours for the final image is known, a Bitmap object can be initialised. Add the following to create the image, which will be named 'captured'.

Bitmap captured = new Bitmap(bounds.Width, bounds.Height, format);

Creating a GDI+ Drawing Surface

To use the GDI+ functions, a drawing surface must be created. The drawing surface is linked to the bitmap so that all activities performed affect the bitmap's contents. The Graphics class' FromImage method returns a correctly linked drawing surface.

Add the following line to create the drawing surface:

Graphics gdi = Graphics.FromImage(captured);

Copying the Screen Contents

With the GDI+ drawing surface prepared, the screen contents can now be captured. The Graphics class defines a method named CopyFromScreen for this purpose. The variant that we will use requires five parameters.

The first two parameters contain the co-ordinates of the top-left pixel to be captured. This can be found in the 'bounds' variable initialised earlier. The third and fourth parameters hold the co-ordinates in the drawing surface where we wish the copied image to be positioned. As we wish to copy to the top-left of the image, these are both set to zero. Setting a different pair of values allows the copying to be repositioned, cropping edges and creating margins. Finally, the size of the area to be copied is required. This again comes from the 'bounds' variable.

Add the following code to capture the screen and copy it into the Bitmap object.

gdi.CopyFromScreen(bounds.Left, bounds.Top, 0, 0, bounds.Size);

Displaying the Screen Grab

The process is now complete and the screenshot exists within the Bitmap object. All that remains is to display the image in the background of the form. To ensure that the width:height ratio of the image is preserved, the background will be set to 'zoom mode' before assigning the image.

To complete the program, add the following code. Then execute the application to see the results.

this.BackgroundImageLayout = ImageLayout.Zoom; this.BackgroundImage = captured;

C# NaN and IsNaN

Some mathematical operations yield results that are not real numbers. The answers may be imaginary numbers or undefined values, either of which cannot be represented within a floating-point structure. In these cases, the resultant value will be NaN.

"Not a Number"

C# and the .NET framework do not provide a manner of representing some numeric values. For example, there is no standard way for a variable to hold an imaginary number or complex number . Some of the mathematical methods of the Math class library can calculate such values or produce other answers that are not real numbers. Instead of producing an exception in these cases, the functions return a special value named NaN, which is an abbreviation of "Not a Number".

The NaN value can also be obtained from a constant field of the float or double structures. This field is a static member of the structure. It cannot be used for comparison purposes, as two NaN values could logically be different, so equality tests will always return false.

The following sample generates a NaN result by attempting to obtain the square root of a negative number. A comparison with the constant is then made. Note that the comparison fails.

double negSqrt = Math.Sqrt(-1); Console.WriteLine(negSqrt);                 // Outputs "NaN" Console.WriteLine(negSqrt == double.NaN);   // Outputs "False"

Testing for NaN

As standard comparison operators do not allow you to test if a value is not a number, the float and double structures provide a method for this purpose. The method, named IsNaN, returns a Boolean value that indicates if the provided parameter is a number or not.

double negSqrt = Math.Sqrt(-1); Console.WriteLine(double.IsNaN(negSqrt));   //Outputs "True"

VB.NET - Converting Integers to Binary, Octal or Hexadecimal

Convert Integers to Binary, Octal or Hexadecimal

For readability it is usual to present integer values using the decimal numbering system. However, sometimes the binary, hexadecimal or octal number bases are more appropriate. This tip shows how to convert a value to one of these alternatives.

Convert.ToString Method

The .NET framework does not provide a special data type for holding a value in different number bases. For this article, we will simply be using the standard integer data types, which are generally displayed in decimal but which are held in memory using binary.To convert the numbers to a non-decimal system, the ToString method in the Convert class is used and the results are returned as a string.

The conversion described can be performed on any of the signed integer data types (short, int or long) or the byte data type. To convert any of these types, the Convert.ToString method is used with two parameters. The first parameter is the value to be processed. The second parameter holds the number base that is required. The number base may be 2 for binary, 8 for octal, 10 for decimal or 16 for hexadecimal. Using any other value causes an exception.

The following example demonstrates the conversion to all three non-decimal variations using a console application:

Console.WriteLine(Convert.ToString(value, 2));      // Outputs "10101010" Console.WriteLine(Convert.ToString(value, 8));      // Outputs "271" Console.WriteLine(Convert.ToString(value, 16));     // Outputs "b9"

Adding Leading Zeroes

The conversion process produces a string containing the converted value without leading zeroes. To pad the string with zeroes to achieve a specific length, the PadLeft method can be used. The first parameter of the method sets the target length for the converted string and the second parameter is the padding character, in this case a zero.

int value = 31;  string binary = Convert.ToString(value, 2); Console.WriteLine(binary.PadLeft(8, '0'));          // Outputs "00011111"

Free Images on the Internet

Finding Images on the Internet

Some times you will need to find images for your posts through out the Internet. Fortunately there are several websites that stock royalty free and images and photographies. Below you will find links to some useful ones.

A tip for fellow bloggers -

For those maintaining blogs, I discovered a site recently -, which accepts popular blogs into their fold. Its a unique online advertising/ ecommerce model in which once accepted, the blog owner can bid for writing reviews of advertiser sites. Once accepted by advertisers, such bids are to be executed by blog owners, for which money is paid. So here is an opportunity for bloggers to make some money by blogging. 
 Of course, receives a commission for providing the platform of interaction between advertisers and blog publishers.
Payments are made once in two weeks through Paypal accounts.

Spell Checkers in Web Browsers

Have you ever made embarrassing mistakes in your blog posts or emails? Why not invoke the good old spell checkers that we are so used to in our word processing applications?
Here is some guidance for spell checker extensions for Web Browsers

  • Firefox 2.0: Ever posted a comment on a blog only to find out that you had written “embarasment” instead of “embarrassment?” The latest release of the Mozilla house comes with an in-built spell checker that works inside web forms; very useful for active Internet users.
  • Firefox 1.5: If you have a fetish with Firefox 1.5 and are reluctant to upgrade it to the newest version, no worries! There is an extension called SpellBound that will add the spell checking functionality to your browser.
  • Internet Explorer: There is no reason to use Internet Explorer. Firefox is faster, more flexible and more reliable. But this is not the central topic of this article, so if you (still) are an Internet Explorer user, you can use an extension called IESpell
  • News - Windows 7 Beta Gets Official

    The public will get its first, well... official first taste of Windows 7

    Steve Ballmer, always an entertaining speaker, graced the Consumer Electronics Show 2009 in Las Vegas with a keynote speech on the night before the show's official launch. While not as animated as in some of his speeches (there was no hollering involved), his enthusiastic presentation did not disappoint and included a number of big announcements.

    Perhaps the largest was the (official launch of the Windows 7 beta to MSDN and TechNet subscribers. The beta may look a little familiar to some as it leaked onto torrents last week. Some have accused Microsoft of engineering the leak as a PR stunt. All of that is in the past now, though, as Windows 7 beta is getting official. The beta will be available to general users worldwide this Friday.

    Steve Ballmer broke the news to tremendous applause, stating, "The beta version of Windows 7, Microsoft's next-generation PC operating system, can be downloaded today by MSDN, TechBeta and TechNet customers. Consumers who want to test-drive the beta will be able to download it beginning January 9 at"

    A Group Project Manager, Charlotte Jones, was on hand to walk the audience through all Windows 7's hottest features. What was most interesting was how different the feel from Microsoft was in contrast to past OS's. Gone was the spartan interface of past versions of Windows, replaced by a graphics rich user OS. Some audience members might have sworn they had accidentally stumbled into an Apple Leopard demo at MacWorld.

    While Windows 7 is architecturally remarkably similar to Vista, Microsoft's focus has been on providing users with in essence a cleaner, more intuitive, and prettier interface. While the merits of such an approach, long championed by Apple, are debatable, it’s hard to debate that Microsoft has succeeded in meeting these goals.

    The Preview Bar, which previews Internet Explorer 8 tabs, jump lists available in most programs, dockable windows, and even the much maligned revamped taskbar were all showcased. Jones also demoed some of the new touch screen technology, an important addition to Windows 7.

    In all the UI is shaping up to be fast, responsive and intuitive. The learning curve may be slightly steeper for those with limited computer experience as the new OS brings more menus and widgets to the interface, but for all the added content it mostly feels remarkably simple and intuitive.

    Noticeably absent, though, was any sort of information on the memory footprint of Windows 7 or talk of hardware compatibility, two major concerns users have voiced on DailyTech and elsewhere. While memory usage in Windows 7 was very similar to Windows Vista in the milestone releases, a source at Microsoft spoke with DailyTech before the briefing and stated, "The final release will likely be substantially leaner than the milestones."

    Memory usage and hardware support were two of Windows Vista's biggest shortcomings, particularly during the OS's early days. While it is unclear if Windows 7 is going to give Vista's critics something to change their minds, it may go a long way to helping the average user have a more enjoyable experience. And as of Friday you can go online and download the official beta and form your own opinions of 2009's biggest coming software release.