Sunday, December 30, 2012

How I doubled my Internet Speed

Recently I got an email from Comcast that they have doubled my internet speed, but in order to access it, I had to get a new cable modem that supported docsis 3.0. It sounded a bit too good to be true, but I thought I would give it a try since I had been using the same cable modem for over 7 years. Before buying a new modem, I decided to test my speed at speedtest.net and it came out to be 20Mbps.

Then I searched on gooogle to see if my old modem, the Motorola sb5100 supports Docsis 3.0 and sure enough Comcast was right, it did not.

Then, I looked at the Comcast approved device list to find a cable modem that supported the new speed tier.


Tuesday, September 4, 2012

Eclipse SVN bad_record_mac

If you are running eclipse and the SVN plugin (Subversive) is showing the following error, continue reading for the fix.

Problem:
Some resources were not updated.
svn: E175002: Received fatal alert: bad_record_mac
svn: E175002: PROPFIND request failed on '/svn/remote-remind/trunk'

Fix:
1. Add the following line to the eclipse.ini file in your eclipse installation directory.
-Dsvnkit.http.sslProtocols=SSLv3  
2. Restart eclipse.
3. Repeat the same operation as before and it should complete without any errrors.

The problem is caused by a bug in SVNKit which is the connecting software layer between Subversive and SVN. If you want more details about the bug, read more at 
http://issues.tmatesoft.com/issue/SVNKIT-176

Monday, June 4, 2012

Eclipse Java Template for Apache Commons Logging

If you use Eclipse and want to save some typing, here is a template for Eclipse to generate an Apache Commons Logging Log for the class you are currently working on.


${:import(org.apache.commons.logging.Log,org.apache.commons.logging.LogFactory)}
private static final Log LOG = LogFactory.getLog(${primary_type_name}.class);


To use it, open preferences > java > editor > templates, create a new template with the name "log" and paste the code above in the Pattern field.

Eclipse Slf4j Logger Template

If you use eclipse and want to save some typing, here is a template for Eclipse to generate an Slf4j Logger for the class you are currently working on.

    ${:import(org.slf4j.Logger,org.slf4j.LoggerFactory)}
        private static final Logger LOG = LoggerFactory.getLogger(${primary_type_name}.class);

To use it, open preferences > java > editor > templates, create a new template with the name "log" and paste the code above in the Pattern field.

Thursday, March 29, 2012

BodyEngine.com BMI Calculator

I use BodyEngine.com a lot and they recently added a BMI Calculator widget. I am adding it here for convenience. If you want to get the code for your own website, go to their Free Weight Calculators page.


Powered by BMI Calculator

Monday, February 6, 2012

Transport error: 415 Error: Cannot process the message because the content type ...


Today I ran into the following error while using an Axis2 Java Client to consume a WCF Soap Service.

Caused by: org.apache.axis2.AxisFault: Transport error: 415 Error: Cannot process the message because the content type 'application/soap+xml; charset=UTF-8; action="http://myservice.com/mySoapService/"' was not the expected type 'text/xml; charset=utf-8'.

This problem is caused because the WCF SOAP service is using SOAP 1.1 while the Axis2 Client defaults to SOAP 1.2

The fix is to set the Soap Version URI in the Axis2 ServiceClient options as follows:


stub._getServiceClient()
       .getOptions()
       .setSoapVersionURI(
                   SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);