A Mug Of Java
My thoughts, code snippets and musings on Java and technology in general...
Wednesday, 30 November 2011
Silent Start
The app is fairly simple. It switches the ringer and media volumes to silent when you shut the handset down, and restores them again when you switch the handset back on and bootup has completed.
If you wish to install the app you can find the apk file here. In order to install it you will need to ensure that you have "Unknown sources" option enabled which you will find in Settings -> Applications.
I have only tested it on my own HTC Wildfire S so any feedback from other device users would be greatly appreciated.
Note : Doesn't currently seem to work correctly with Fast Boot enabled.
Friday, 23 September 2011
Remove Blogger Image Borders
You will need to make some changes to the template of your blog. There are a few steps involved, but it's a fairly simple process:
- Click on the design option and then select Template Designer.
- From the design screen click the Advanced option.
- Scroll to the bottom of the advanced options and select 'Add CSS' (see fig below).
- Cut and paste the following into the custom CSS pane:
border: 0px;
-moz-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
-webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
}
The CSS should have an immediate effect and you should find that your images loose the border. If you are happy, click the 'Apply to Blog' button and your changes will be saved.
![]() |
| Adding custom CSS |
Monday, 27 June 2011
Android - Adding A Hidden Network
- From your home screen hit the menu button and select settings.
- Select Wireless & Networks
- Select Wi-Fi settings
- Select Add Wi-Fi network
- Enter the SSID for the hidden network. DO NOT CLICK SAVE.
- As you can just see from the screen shot the form is in fact scrollable and contains more than just the Network SSID value. Scroll the form to reveal the security type list box.
- Select the security used for your network.
- Scroll the form further to reveal the password box and enter the password.
Monday, 13 December 2010
Ugly Opera Fonts Under Linux - How To Fix It
Xft.antialias: 1
Xft.autohint: 1
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.rgba: none
If you find after doing the above the fonts still look ugly, it may be that .Xdefaults on your system is not being read or honored. So, add xrdb -override .Xdefaults to your .bashrc script and try again! As you can see from the screen shots below - the fonts look much better after the config change.
Friday, 12 November 2010
Bye, bye Metal
It was a shame to read in a recent post that Oracle has decided to keep Metal as the default laf for JDK 7 rather than switching to Nimbus. But for me, I think I will be making a permanent switch to Nimbus. Bye, Bye metal. You did a good job but now it's time to go...
Wednesday, 17 February 2010
Parsing SharePoint Metadata
The SharePoint Document libraries hold a lot of metadata against each document which is returned in the web services in the ows_MetaInfo field. This is a long string of metadata which, in the GetListItemChanges method is broken up into lines making it easy to pick out each key and value pair. However, the GetListItem methods returns this metadata as a plain string leaving it up to you to parse and turn in to something meaningful. After much head scratching and memory refreshing on regular expressions I have come up with a snippet of code that, for all my testing so far, successfully pulls out each key and value pair :
Pattern pattern = Pattern.compile("(\\w*):\\w{2}\\|");
Matcher matcher = pattern.matcher(ows_MetaInfo);
boolean fnd = matcher.find();
while (fnd)
{
String key = matcher.group(1).trim();
int start = matcher.end();
fnd = matcher.find();
int end = fnd ? matcher.start() -1 : ows_MetaInfo.length();
String val = ows_MetaInfo.substring(start, end);
if (val.length() > 0)
{
System.out.println("Key: " + key + " - Val: " + val);
}
}
Tuesday, 2 June 2009
JavaFX On Linux
I shall post my musings when I get time to try it out.
Happy coding!






