Android ObjectInputStream and ObjectOutputstream snippet

At first, make your object serializable and let the IDE (in my case Eclipse) generate a serialVersionUID for you:

Writing to files with serialization and writing objects to file:

Reading files with serialization and get it as object:

Thats it!


How to include ActionBarSherlock in your Android-Project

If you have problems to include ActionBarSherlock in your Android project (because of not generated or something) then follow this quick guide:

Include ActionBarSherlock as library in your Eclipse-Workspace.

Both project needs to compile with Android 4.0 or newer. And you must  specify a targetSdkVersion of 11 or higher in your application’s manifest .


If you want to develop for Android 2.1 then add this to your application’s manifest and also build your app with api-level 15 (Android 4.0.3)

Finally select “Project” -> “Clean” -> “Clean all projects” in Eclipse.

WordPress: Get attachment_id from source


jQuery Mobile “mobileinit” Event

Unlike other jQuery projects, such as jQuery and jQuery UI, jQuery Mobile automatically applies many markup enhancements as soon as it loads (long before document.ready event fires). These enhancements are applied based on jQuery Mobile’s default configuration, which is designed to work with common scenarios, but may or may not match your particular needs. Fortunately, these settings are easy to configure.

When the jQuery Mobile starts to execute, it triggers a mobileinit event on the document object, to which you can bind to apply overrides to jQuery Mobile’s defaults.

That the mobileinit event works  you need to follow this sequence:

  1. Load jQuery
  2. Define mobileinit event
  3. Load jQuery Mobile

ASP.NET Calendar: Hide PrevMonthText or NextMonthText

If you use the ASP.NET Calendar Control and want to hide the PrevMonthText or NextMonthText then you need to use the PreRender-Event from the Calendar-Control.

In this example I hide the PrevMonthText (Hyperlink) when the current year and month equals calendars visible year and month. Note: You must set/init the VisibileDate-Property in Page_Load-Event. In my example I want that the start month and year of the control is set to today.