Archive for February, 2010

How to create a file of arbitrary size with fsutil in Windows XP

Tags: , , ,

This post is a sequel to – How to create a file of arbitrary size in Linux Few people have used the fsutil command in Windows. Here is how you can use it to create a file of any desired size – fsutil file create myFile.dat 10240 This will create a file of size 10KB [...]

Continue reading » 1 Comment

How to create a file of arbitrary size with shell script commands

Tags: , , , ,

A few days ago I was working on writing Java code to transfer files via SFTP and FTPS. As part of the test cases, I wanted to try and transfer files of small medium and large sizes like 0 byte, 1 byte, 100 bytes, 1000 bytes, 1MB, 10MB. How would one go about creating files [...]

Continue reading » 3 Comments

Kaspersky ate my jconsole!

Tags: , , , ,

The other day I was trying to attach JConsole to a locally running Java application. Every time I tried it, Kaspersky anti virus that was running on my system “detected” a process intrusion attempt by jconsole and deleted (more accurately, quarantined) jconsole.exe. It popped up a message saying- “Process is trying to inject into another [...]

Continue reading » No comments

Check for corruption of files using md5 checksum

Tags: , , , , , ,

You just transferred a large multi-gigabit file from your build server to your QA server. You want to check if the files are exactly the same. Data corruption can happen for many reasons! What do you do? Remember, just because two files are the same size, it doesn’t mean that they are the same. It [...]

Continue reading » 2 Comments

Force Firefox to save passwords even if the page disables autocomplete

Tags: , ,

The remember password feature in Firefox is a huge time saver. Of course, if you use it, you better be using the ‘Master password’ feature too which locks down all of your saved passwords with one password that you get asked for just once – the first time when Firefox tries to load a saved [...]

Continue reading » 10 Comments

Content Disposition – Get a Save As dialog on the browser

Tags: , , ,

It is common for a web application to have a link to file types such as .xls or .pdf files – a typical use would be for reports generated by the application. The default behaviour of the browser is to open the linked document within the browser. What do you do if you want the [...]

Continue reading » No comments

Wildcard in Java classpath

Tags: , , , ,

One of the less known new features of JDK 6 is the ability to use wildcards in classpaths. That means that instead of doing… java -cp lib\x.jar;lib\y.jar;lib\z.jar; com.company.MyProggy …you could just do… java -cp lib\*.jar; com.company.MyProggy That generally turns out to be quite a time saver. Especially so if you are trying out something at [...]

Continue reading » 2 Comments

Airtel production database access – Revealed!

Tags: , , ,

How nice of Airtel (one of the largest telecom service providers in India with a worth of over $10 Billion) to show me the bit of code that was having trouble working when I came to their site to pay my bills. They showed me the full database connection string with the DB server details, [...]

Continue reading » No comments

Sun JDK 7 released

Tags: , , ,

As of this moment, if you google “sun jdk” you get a Google SiteLink to ‘Sun JDK 7 Update 17′ in the search results. Yay, let’s all update to the latest JDK! Well, sorry to disappoint you, but it’s obviously a mistake. JDK 7 is still under develpment. The link leads to JDK 6 Update [...]

Continue reading » No comments

BenQ G2412HD – 23.6 inch LCD monitor review

Tags: , , , , ,

I bought a BenQ G2412HD monitor some time back. Here are a few points that may be of help to anyone deciding to buy something in the family of large LCD monitors. I got it for Rs.12,000 from Croma in Pune in September, 2009. I got a Labtec Wireless Mouse + Keyboard set worth Rs.1,500 [...]

Continue reading » 3 Comments

Compiling cyclic dependency in Java

Tags: , , , ,

I was recently asked – If there is cyclic dependency between classes A, B and C. How do you go about compiling them in java? Apparently, that came up in an interview for someone. Well, I don’t know what kind of dependency that person had in mind when asking this question – But I had [...]

Continue reading » 3 Comments

Shaadi.com is a waste of time

Tags: , , ,

Context sensitive intelligent advertising programs have become really smart lately. The text “waste of time” on some website I happened to be passing through was linked to an ad for “shaadi.com” (that’s a popular Indian matrimony portal)! Clearly, the folks at Infolinks are good. Very good!

Continue reading » 8 Comments