Pages

Monday, January 3, 2011

Setting up an Android Development Environment on Windows

Now that i have finally managed to run a stable fast version of Android on my HTC HD2 (thanks to Dark Forces Team at xda-developers.com) I am looking forward to having a go at writing an application. Here are the steps i have taken to setup my development environment on Windows.

Before you start you will need to download an IDE like Eclipse. I downloaded Eclipse Classic 3.6. Eclipse does not install like a usual windows application so you have to manually copy the eclipse folder to a suitable location on your hard drive then create yourself a shortcut.

Install the JDK if you do not have it already.

Install the Android SDK starter package I downloaded the windows executable from
here
make a note of the install path as you will need this in the next step. In my case it was "C:\Program Files\Android\android-sdk-windows" . When the starter package install has finished agree to run and then select the "accept all" check box to download all the SDK tools.

Install the ADT Plugin. Open Eclipse and select Help/Install New Software click add in the top right corner then enter ADT Plugin for the name and input the following link.

https://dl-ssl.google.com/android/eclipse/



then click next, accept the agreement and click finish to install the plugin.

To configure the ADT plugin click Window/Preferences, select android on the left then paste in or browse to the path of your sdk location.



To add platforms or other components double-click the SDK Manager.ext file at the root of the Android SDK directory. Here you can also setup virtual devices.


That completes the setup of your Android Development Environment in my next post I am going to be setting up the "Hello World" application.

Sources: developer.android.com

Sunday, January 2, 2011

Learn CSS positioning in ten steps


CSS Positioning is something i have always found a bit tricky.

This tutorial I found examines the different layout properties available in CSS: position:static, position:relative, position:absolute, and float.


Learn CSS Positioning in Ten Steps

What happens when you steal a hackers computer

Windows phone 7 theme for Desktop,



I was recently watching a video by Scott Hanselman (asp.net) and noticed
that he had this cool theme on his laptop. I searched google for more info
and managed to set the same thing up for myself (screenshot above). If you
would like to set this up for yourself you need to install two programs.


1. Rainmeter (Free)
2. Omnimo 3.1 for Rainmeter by *fediaFedia on deviantART (Free)

Once installed there are hundreds of widgets/resource meters that you can
download so you can fully customize it to your own style.

Full credit to both products they are absolutely brilliant.

2011 New Year’s Resolutions

I have just been reading some new years resolutions on twitter,
i thought that it would be a good idea to make some of my own.

So here they are:

1. Get more sleep.
2. Learn how to complete my Rubik's cube in under two minutes.
3. Master asp.net mvc and master linq to sql.
4. Build an android app.
5. Make better use of social networking sites.
6. Update my blog more regularly.
7. Eat more healthily.
8. Exercise more.
9. Keep my desk free from clutter.
10. Give up niquitine gum.

Tuesday, October 6, 2009

Unable to cast object of type 'System.DBNull' to type 'System.String'

When trying to assign data from a datasource to string variables where some of the fields contained null values i was was getting the following error.

Unable to cast object of type 'System.DBNull' to type 'System.String'

I know this is really simple stuff but as a beginner it took me a while to figure this out. If you use the Convert.ToString method then even though your data may be the correct datatype to start with it will convert a null value to an empty string instead of throwing the above error.


MyStringVariable = Convert.ToString(myDataReader["MyDBFieldName"]);

Wednesday, September 30, 2009

About My Blog

I live in the UK and work for a medium sized publishing company. I have always enjoyed computers and have recently started developing web based applications using .net, c# and SQL server. Previously i have developed several applications in classic asp,visual basic 6 and MS Access. As the demand at work for data driven applications has increased, combined with the fact that nobody else in the world seems to be using classic asp anymore i thought it's about time i learned something new.

This blog is to discuss coding resources, websites, blogs, forums etc that i find useful. I may even publish some of my own techniques and tips along the way. Please let me know if you find any of my posts useful and feel free to correct me when i get it wrong.
 
 

Blogger