CSV to Excel – keep leading zeros

February 9, 2010 · Posted in Windoze · Comment 

When opening a csv file in excel, leading zero’s are displaced as below:

if the CSV file has “010101″, when opened in excel, it becomes “10101″.

To overcome this issue, store data in CSV file as =”010101″ (add ‘equals’ sign before the first quote.). If now you would open this file in excel, the leading zeros will stay as is.

IE 6 bug in window.location

January 13, 2010 · Posted in Windoze, general web · Comment 

There is a bug in IE 6 where following code does not work

var newUrl = "http://www.google.com/";
window.location = newUrl;
// This also doesn't work!
// window.location.href = newUrl;

After a scratching head for couple of hours, found the solution here

var newUrl = "http://google.com/";
setTimeout(function()
{
window.location = newUrl;
}, 0);

TOP 25 Most Dangerous Programming Errors

January 13, 2009 · Posted in Windoze, general web, linux · 2 Comments 
  1. CWE-20:Improper Input Validation
  2. CWE-116:Improper Encoding or Escaping of Output
  3. CWE-89:Failure to Preserve SQL Query Structure
  4. CWE-79:Failure to Preserve Web Page Structure
  5. CWE-78:Failure to Preserve OS Command Structure
  6. CWE-319:Cleartext Transmission of Sensitive Information
  7. CWE-352:Cross-Site Request Forgery
  8. CWE-362:Race Condition
  9. CWE-209:Error Message Information Leak
  10. CWE-119:Failure to Constrain Operations within the Bounds of a Memory Buffer
  11. CWE-642:External Control of Critical State Data
  12. CWE-73:External Control of File Name or Path
  13. CWE-426:Untrusted Search Path
  14. CWE-94:Failure to Control Generation of Code
  15. CWE-494:Download of Code Without Integrity Check
  16. CWE-404:Improper Resource Shutdown or Release
  17. CWE-665:Improper Initialization
  18. CWE-682:Incorrect Calculation
  19. CWE-285:Improper Access Control
  20. CWE-327:Use of a Broken or Risky Cryptographic Algorithm
  21. CWE-259:Hard-Coded Password
  22. CWE-732:Insecure Permission Assignment for Critical Resource
  23. CWE-330:Use of Insufficiently Random Values
  24. CWE-250:Execution with Unnecessary Privileges
  25. CWE-602:Client-Side Enforcement of Server-Side Security

Full story

How to RDP Vista Home Premium with SP1

May 30, 2008 · Posted in Windoze · Comment 

Previously I had written a blog entry to enable RDP on Vista Home Premium. After installing SP1, I realized that I could not connect to my machine.  After a little search in google, I found the same group has done their magic for SP1 too. For your reference, here is the file.

Edit Windows Vista Hosts File

March 9, 2008 · Posted in Windoze · Comment 

1. Open Notepad with Administrative privileges by clicking Start, All Programs, Accessories, and then right-click Notepad and select to open as Administrator.

2. Browse to (C:\Windows\System32\drivers\etc) in Notepad and open the hosts file.

Now you can edit and save the hosts file.

How to RDP to Vista Home Premium

December 12, 2007 · Posted in Windoze · Comment 

I cannot believe it. I recently bought new computer which came with Vista Home Premium installed. Everything was cool and only thing I missed was that I could not RDP to it. After searching a little on google, found a great great hack to fix the problem. Kudos to the hackers who made this possible!!