Posted 3 months ago

Error starting Eclipse Indigo

I have been using eclipse for a few years now for the majority of my development now fr all of my development, recenly I upgraded to the Indigo release of Eclipse. This morning on the train I was presented with a popup directing me to a logfile with the error below:

!ENTRY org.eclipse.osgi 4 0 2011-10-27 07:41:06.158
!MESSAGE Startup error
!STACK 1
java.lang.ExceptionInInitializerError
	at org.eclipse.osgi.framework.internal.core.Framework.initializeProperties(Framework.java:378)
	at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:200)
	at org.eclipse.osgi.framework.internal.core.Framework.(Framework.java:162)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:261)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
	at java.net.InetAddress.getLocalHost(InetAddress.java:1356)
	at org.eclipse.osgi.framework.internal.core.UniversalUniqueIdentifier.getIPAddress(UniversalUniqueIdentifier.java:146)
	at org.eclipse.osgi.framework.internal.core.UniversalUniqueIdentifier.computeNodeAddress(UniversalUniqueIdentifier.java:113)
	at org.eclipse.osgi.framework.internal.core.UniversalUniqueIdentifier.(UniversalUniqueIdentifier.java:35)
	... 12 more

The fix that I found to resolve the crash was to delete the preferences (plist) file for Eclipse on the mac. The file is called ‘org.eclipse.eclipse.plist’ and can be found by navigating to ‘/Users/<username>/Library/Preferences/’.

I deleted the file and tried starting Eclipse and it has been smooth sailing from there.

I would love to know if others are having this issue? and is it something I can expect to be doing often?

Posted 3 months ago

Enable the Facebook timeline

This is the how-to that I used to enable the new Facebook timeline

Posted 3 months ago

New Avengers trailer is awesome….. is it too early to get excited :P

Posted 4 months ago

Diggnation on the train and Sun AWESOME!

Posted 5 months ago

Python Yield Statements

Here is an awesome explaination on what the function of a yield statement is. It also supplies some great examples on using and controlling generator functions. 

Posted 5 months ago

Linking tweets to status updates.

I have been asked a couple of times lately by friends on how to get your Twitter updates to show up in Facebook as status update. 

I have tried a couple of solutions and this one has worked the best for me:

  • Goto https://apps.facebook.com/twitter/ and sign into your account.
  • Select the “SIgn in with Twitter” button and enter your details

Now all you need to do is go to one place now to tell the world what you are having for lunch.

Linking your social networking tools together is a great way to get your message out to all of your Friends, Followers and Plus’ers without having to repeat yourself. 

So give it a try and link Twitter to Facebook for lasier Social Networking.

(Source: apps.facebook.com)

Posted 6 months ago

This is my Friday and loving it.

Posted 6 months ago

Httplib examples

Awesome example code for httplib. Cut Paste and away you go, great shortcut!

Thanks Gregory Mazzola!

Posted 6 months ago

Disabling user-agent Stylesheets

I have been working on te views for a django web application and was having huge CSS issues with the user agent Stylesheet in Chrome, Firefox and Safari. It was applying styles that were breaking my template.

After searching around the web for a while I found a solution that seems to negate the styles that browsers are trying to enforce on sites.

I found it in the User Foruns of Drupal.org a great PHP CMS. 

/* These are here to override "user-agent" stylesheets */
html{
    color:#000;background:#FCF1D1;
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{
    margin:0;padding:0;
}
table{
    border-collapse:collapse;border-spacing:0;
}
fieldset,img{
    border:0;
}
address,caption,cite,code,dfn,em,strong,th,var{
    font-style:normal;font-weight:normal;
}
li{
    list-style:none;
}
caption,th{
    text-align:left;
}
h1,h2,h3,h4,h5,h6{
    font-size:100%;font-weight:normal;
}
q:before,q:after{
    content:'';
}
abbr,acronym{
    border:0;font-variant:normal;
}
sup{
    vertical-align:text-top;
}
sub{
    vertical-align:text-bottom;
}
input,textarea,select{
   font-family:inherit;font-size:inherit;font-weight:inherit;
}
input,textarea,select{
*font-size:100%;
}
legend{
color:#000;
}
del,ins{
    text-decoration:none;
}
/* User-aget override end */

A big thanks to the Drupal community for coming up with this great solution. The origional thread can be found here.

Posted 6 months ago

Installing comments on the blog.