Sunday, November 28, 2010

HTML5 and CSS3 - Awesome Technologies

This day is a big day in my life. First time in IIT - M classroom, not as a student but to attend a conference on HTML5. Its almost an year the technology came into market and I am not aware of the same. This Conference threw some light on the same and at the end of the day I liked the new features of HTML5 and CSS3 as well.

The presentation started with some introduction to HTML5 decleration. So this is suppported by mordern browsers like Chrome,Firefox,netscape (almost every browser supports other than our IE ). IE 9 will be supporting this. Also I was surprised to see the presentation they made was not in powerpoint or any slidemaker, It was in google chrome . Speaker started the presentation with the same point, HTML5 and CSS3 are used to prepare these slides. Was awesome to see google chrome or anyother browser doing the job of showing slideshows. Well the session taught us about the basic tags that are used in HTML5. Also about the "semantic mark up".

You could have also seen that the HTML 4 file starts with the following tag



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




But now in HTML5 we can declare the doctype as follows

<!DOCTYPE html >


Semantic markup is something which defines meaning for the data. The tags like article, header, footer are examples for semantic tags.

Next the session was about the CSS3. The session was given by a Microsoft employee and he redesigned his website in HTML5 to learn the same. The Website was awesome to look at.

He talked about a few features about the CSS3.


RoundedCorners
Transitions
Selectors
Gradient



Well Though I am not a UI guy i really liked the session very well and yes i have decided to build a new website for myself using HTML5 and CSS3.

Thursday, November 4, 2010

Java.lang.IllegalArgumentException: column '_id' does not exist

Its a common error when we use a data adapter in ANDROID for the first time. I used it to extract all the contacts.

So we declare a SimpleCursorAdapter as follows



SimpleCursorAdapter adapter = new SimpleCursorAdapter(
this,
R.layout.contactsview,
c,
projection,
new int[] {R.id.contactEntryText}
);




I used the projections as follows


String [] projection = new String [] {
ContactsContract.Contacts.DISPLAY_NAME
};


I got the exception Java.lang.IllegalArgumentException: column '_id' does not exist.

Make sure that the projection you have mentioned above do contain a field called as ContactsContract.Contacts._ID.

So you have to redeclare the array projection as




String [] projection = new String [] {
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.Contacts._ID
};



Thats it. Now you are good to go !!!!!!!!