Saturday, May 5, 2007

File Dialog in Eclipse RCP

I was trying out a simple application in Eclipse RCP. I needed a simple file open and file save dialog, like the Swing ones. I could not easily find an example on how to do this, from a Google search. Finally, this is what I came up with:


FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN);
String selectedFileName = dialog.open();
if (selectedFileName == null)
{
return;
}
File selectedFile = new File(selectedFileName);

Friday, March 2, 2007

Gaim on Windows Vista

I installed Gaim 2.0 beta 6 on my new Windows Vista Home Premium laptop, and it worked fine. I had a hard time finding the preferences files though. I turned on the Help -> Debug option in Gaim, and found they were in C:\Users\Sualeh Fatehi\AppData\Roaming\.gaim. Then I was able to overwrite these with my backed up accounts, prefs and blist XML files, and was up and running.

Sunday, January 28, 2007

Burning Google Video to DVD

I wanted to burn a video on Google Video to a DVD for a big screen experience. Google Video allows download of a .gvp file. On opening this file, which is a text file, I found the URL to download the video itself. I saved this video in a file with a .gvi extension on my hard-disk. Then, some more searching on Google showed that I could convert the .gvi to a standard .avi file using the open-source GVI2AVI program. I could play the converted file using Media Player, as well as burn it to a DVD.

Wednesday, September 29, 2004

Software to Catalog Books

Are you aware of any decent software to catalog books? I have not used software to catalog any of my book collection. It sounds like an interesting project. Probably even software that bills itself as a cataloger for videos or audio may work for books.



Here are some links I found on the web:

Let me know what you find.

Friday, November 12, 1999

The GEDCOM Standard Release 5.5

The GEDCOM Standard Release 5.5 "GEDCOM was developed by the Family History Department of The Church of Jesus Christ of Latter-day Saints (LDS Church) to provide a flexible, uniform format for exchanging computerized genealogical data. GEDCOM is an acronym for GEnealogical Data Com munication. Its purpose is to foster the sharing of genealogical information and the development of a wide range of inter-operable software products to assist genealogists, historians, and other researchers."



Well, as I tried to explain GEDCOM is a de-facto standard format that any family tree program can use. Once I enter data in, you can use your favorite family tree program to view the data I send you as a GEDCOM file.

Friday, November 5, 1999

If I have an appliance rated as 9V 150mA and an eliminator which gives an output rating of 9V 1 Amp, is it OK? If I remember correctly, the voltage has to be exact, but the eliminator amperage output rating should be equal to or more than the appliance. Am I right? Yes. However, if the appliance were to short or not have as many safety features and you were to touch a appliance part that can shock you, you would basically provide a least resistance path for the current causing the eliminator to send its maximum rated AMP output through your body. THAT can be dangerous. So yes, it will work but be careful - even a camera flash capacitor can shock you by discharging if you touch the insides of a camera flash (personal experience where I didn't realize that the capacitor may be

charged) .

Answer courtesy Murtuza Vasowalla



What is the the relation between volts, amperes and kilo-watt hours?

What is the the relation between volts, amperes and kilo-watt hours? Also,

where does BTU fit in?
Well a volt is a measure of potential difference. What this means is that it is a measure of the difference in electric "levels". You can compare it to a waterfall. Water will fall over the waterfall only if the water at one end is higher than the other. So we can say the measure of "potential difference" between the top of the waterfall and the bottom is the height of the waterfall. Similarly, electricity will flow only from a point that has a higher potential to apoint that has a loweer potential - that is a positive potential difference.



An ampere is a measure of the amount of electricity flowing. For example, if we have the Niagara falls, it will have a large amount of water flowing over it (or a greater number of "amperes") than a smaller waterfall in Khandala.



Here we have to introduce a new concept - resistance. Resistance is measured in ohms, and is the resistance to the flow of electricity. Resistance being same, a larger voltage (potential difference) will result in a higher current (amperes). But, if you increase the resistance, the flow of current (amperes) will reduce. What I have just explained is known as Ohm's Law, and is mathematically stated as current is directly proportional to the voltage, and the proportionality factor is the resistance, or:



V = iR (V = voltage, i = amperage, R = resistance)



Next we come to the concept of power. Power is the amount used per second. Electric power depends on the voltage (the potential difference). To increase the voltage requires energy. Power also depends on the current - the greater the current, the greater the electric power. So we arrive at a simple mathematical form:



P = Vi (P = power, V = voltage, i = amperage)



Power is measured in watts, and a 1000 watts are a kilowatt. As I mentioned earlier, power is the energy consumed per second. If you want to know exactly how much energy has been consumed, you need to know how much time that you have been using the power. This is commonly measured in hours. So, the measure of total electric energy consumed is measured in kilowatt-hours.



Energy = PT (P = power, T = time)



OR



Energy = ViT (V = voltage, i = amperage, T = time)



A BTU is an imperial measure of energy.

Thursday, November 4, 1999

Can scanners scan transparencies?

Can scanners scan transparencies? Yes. Some scanners have Transparency Media Adapters (TMA) built into the lid of the scanner, while others (better ones) replace the lid of the scanner when needed. New tray TMA's pull out from the middle of the scanner and produce some of the nicest transparencies. When evaluating a TMA make sure of the following:



A) Will the TMA be able to do the size of the transparent image?



B) Is the TMA just a lit light source or does it move in sync with the scanning lamp?



C) Is the TMA built into the scanner (such as as tray holder) or is it something that attaches and plugs into the rear of the scanner and replaces the lid?

Tuesday, November 2, 1999

Blog n. A Web log. vi. To run a Web log.


First spotted on the Eatonweb blog, er, Web log on 1999-08-25, [...]

The verb to blog seems to me to be intransitive. That is, Brigitte doesn't blog eatonweb, she simply blogs. A Web tool has arisen to aid in the endeavors of wannabe bloggers; it is, of course, blogger.com.

Monday, November 1, 1999

What is a Digital ID?

What is a Digital ID? A Digital ID (also known as a digital certificate) is a form of electronic credentials for the Internet. Similar to a driver's license, employee ID card, or business license, a Digital ID is issued by a trusted third party to establish the identity of the ID holder. The third party who issues certificates is known as a Certification Authority (CA).

Digital ID technology is based on the theory of public key cryptography. In public key cryptography systems, every entity has two complementary keys--a public key and private key--which function only when they are held together. Public keys are widely distributed to users, while private keys are kept safe and only used by their owner. Any code digitally signed with the publisher's private key, can only be successfully verified using the complementary public key. Another way to look at this is that code successfully verified using the publisher's public key (which is sent along with the digital signature), can only have been digitally signed using the publisher's private key (thus authenticating the source of the code), and has not been tampered with. For more information on public keys and private keys, please see Introduction to Public Key Cryptography).

Microsoft AciveSync 3.0

Microsoft AciveSync 3.0



ActiveSync® 3.0 is the latest and significantly improved synchronization software for Windows® CE operating system-based Palm-size PCs and Handheld PCs. ActiveSync 3.0 is dramatically easier to install and use because of a complete redesign of its communications architecture and user interface and improvements to its synchronization speed and overall performance. ActiveSync 3.0 is compatible with all versions of the Palm-size PC and with versions 2 and 3 of the Handheld PC, making it the easiest and most powerful synchronization for Windows CE from Microsoft to date.