shared items

Sunday, May 31, 2009

magicjack and Win xp issues

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11 CE-BFC1-08002BE10318

Hopefully these simple directions will help those who are not master computer techs like me:) God knows I couldn't get it right to save my life! But a light bulb went off in my head and this is how I did it. Almost embarassing to mention;

When looking for this file in device manager please consider the following Steps:

To resolve this problem, remove the affected filter drivers. To do this, follow these steps:

1. Click Start, type regedit in the Start Search box, and then click regedit in the Programs list.

If you are prompted for an administrator password or confirmation, type your password, or click Continue.

2. Locate, and then click the following registry subkey:

ie., 1. Go to HKEY_LOCAL_MACHINE and click on it.
2. part of the sub directory will appear
3. then click on SYSTEM
4. You will then see Current Control Set click on it
5. And so on......get the picture now!
Whew! Now follow the rest of the directions and you should have any additional problems

Caution There can be many instances of the registry subkey that is mentioned in step 2. You must make sure that you are in the appropriate registry subkey before modifying the UpperFilters and the LowerFilters values. To verify that you are in the appropriate registry subkey, make sure that the Default data value is DVD/CD-ROM and the Class data value is CDROM.

3. In the right pane, right-click UpperFilters, and then click Delete.

4. Click Yes to confirm the removal of the UpperFilters registry entry.

5. In the right pane, right-click LowerFilters, and then click Delete.

6. Click Yes to confirm the removal of the LowerFilters registry entry.

7. Exit Registry Editor, and then restart the computer.

Source :;forums06

Wednesday, May 20, 2009

load files in jar

If you use a filename, then the filename has to refer to a real file. But if you use a "resource name," that resource might be a file or it might be a component of a JAR (or theoretically something else altogether.)
The magic method(s) in this case are the family of loadResource() methods. For example, Class.getResource().
If youve got a class foo/bar/Test.class inside a JAR file, and also a foo/bar/Image.jpg, then inside the Test class you can refer to Image.jpg using
URL theURL = getClass().getResource("Image.jpg");
and then pass the URL to ImageIcon's constructor for example.
Source :

Saturday, May 16, 2009

Clear Winxp RAM

How to Clear Ram Cache in Windows XP - Tips and Tricks

This is a nice and simple tip and trick, how to clear RAM on a Windows XP system that will release the idle processes which cause your system to run slowly, and doesn’t require a typical system reboot.

Steps to follow:

1. Locate an empty spot on your desktop, right click on your mouse and select - new shortcut.

2. Type “%windir%\system32\rundll32.exe advapi32.dll,ProcessIdleTasks” without the brackets in the box and click next.

3. Name your shortcut “XP Clear RAM,” and click finish…. All done!…

Now, when your system slows down just click the XP clear ram shortcut, and you are back to your normal operating speed.


Source : madmouseblog

Monday, May 11, 2009

Inflater Deflater

public class Inflater
extends Object
This class provides support for general purpose decompression using popular ZLIB compression library. The ZLIB compression library was initially developed as part of the PNG graphics standard and is not protected by patents. It is fully described in the specifications at the package description.

The following code fragment demonstrates a trivial compression and decompression of a string using Deflater and Inflater.

// Encode a String into bytes
String inputString = "blahblahblah??";
byte[] input = inputString.getBytes("UTF-8");

// Compress the bytes
byte[] output = new byte[100];
Deflater compresser = new Deflater();
int compressedDataLength = compresser.deflate(output);

// Decompress the bytes
Inflater decompresser = new Inflater();
decompresser.setInput(output, 0, compressedDataLength);
byte[] result = new byte[100];
int resultLength = decompresser.inflate(result);

// Decode the bytes into a String
String outputString = new String(result, 0, resultLength, "UTF-8");

Sunday, May 10, 2009

each_hash error with Rails 2.2 and mysql 5.1

Rails 2.2 MySQL removed error SOLUTION
by protech_v2 » Mon Dec 15, 2008 8:04 pm

If at any point when you've upgraded to Rails 2.2. you get the following error on Windows:

"!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql."

the problem is because MySQL 5.1 client library doesn't play well with Rails - the solution is simple however:

- download older MySQL client library, for example one from InstantRails: ... bmySQL.dll

- copy the downloaded file to C:\Ruby\bin (or wherever you installed Ruby)

- restart MySQL server

That's it! Just thought I'd share this with others, lost me an hour of researching.

Good luck!


Internet Explorer Inner HTML

Reference :

function helo()
var a = document.getElementById('targetDiv');
opt = document.createElement("option");
opt_txt = document.createTextNode("aaaa");
opt.setAttribute("value", "bbbbb"); a.appendChild(opt);

< onclick="helo();">Using JavaScript functions
< id="targetDiv" size="5">
< id="'a'">hh< / option >
< / select >

small textbox in IE 8.0

◦In IE8 click “Tools” | “Internet Options” | and choose the “Advanced” tab.
◦Scroll down one full scrolls worth and uncheck the “Enable visual styles on buttons and controls in webpages“
◦Click “OK” - it will take a few seconds, then your browser should display correctly. You should not have to close/reopen the browser for the change to take effect.

Sunday, May 3, 2009

What you do is create a select tag with the “select” method like so: (using the client/project scenario),

The next value you pass to the select method has to be an array of text/value pairs

like this: [ [ "Jason Johnson", 1], ["Trey Piepmeier", 2], ["Royall", 3] ]

In order to create this array, you do a find on your clients table and use Ruby’s “collect” method.

like so:

Client.find(:all).collect {|c| [, ]}

So, altogether now:, Client.find(:all).collect {|c| [, ] })


Saturday, May 2, 2009

JAXB ignores "@required" fields in validation

Reference Links :