author profile image

Matt Reid

Solo Entrepreneur | Lead Software Architect

Communication with an XML-RPC server via Java is extremely easy with the apache XML-RPC library using the following snippet: XmlRpcClient client = new XmlRpcClient(); XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();// Setting timeouts for xmlrpc calls made using XmlRpcSunHttpTransportFactory, the default connection factory int xmlrpcConnTimeout = 10000; // Connection timeout int xmlrpcReplyTimeOut...

I recently found the following post on stackoverflow here, simply add the following code (sorry, no xml version) tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 25; If you have your tabs positioned at the bottom of the screen, make sure you give android:gravity=”bottom” to your layout  

Just a quick note, I had the following exception when adding tabs to a tabhost in an android app that I”m building 11-03 22:54:09.530: ERROR/AndroidRuntime(508): at android.widget.TabHost.addTab(TabHost.java:207) The fix (after some googling) seems to be to add the following before adding any tabs to a tabhost tabHost.setup();  

I recently needed to work out the intersection of 2 text files and the lines that didn’t match in 2 documents, after some googling I found the following 2 lines of script that take 2 files and pipe the output to a new file Intersection of 2 files grep -Fxv...

Having moved my blog over to use facebook’s comments plugin I needed a new way to display the number of comments for each of my links. It turns out to be very easy. Simply making a request to URL_TO_COUNT_COMMENTS returns a json string with the following format { “http://www.matt-reid.co.uk/blog_post.php?id=68”: {...