Tuesday, August 24, 2010

File Scrubber

File Scrubber is a secure data removal java class. It allows you to securely delete files/directories from your hard drive by overwriting it random data 'n' number of times.

Usage:


FileScrubber scrubber= new FileScrubber();
   try
   {
//overwrites the given directory 5 times
       scrubber.scrub(new File("C:\\fileOrDir\\to\\delete"), 5);
   }
   catch(Exception ex)
   {
       System.err.println(ex.getMessage());
   } 
 

Wednesday, August 4, 2010

Displaying Numbers in Native Scripts C#

For one of my web app i had to display numbers in native script, arabic in my case. After googling around, i found these two useful websites

UTF8Encoding.GetDecoder Method (MSDN)
JavaScript Unicode Charts

Navigate to the JavaScript Unicode Charts page, then select your preferred script from the dropdown menu(i'll follow the example for arabic). Then you'll be shown a Unicode script chart of your selected langauge.



The highlighted row in the above screenshot is the arabic numerals and D9A0 is the utf-8 encoding value for the arabic number 0, D9A5 will be the arabic number 5.