Android REST: HTTP GET Example

In developing a mobile application on Google Android platform often requires client-server communications. The communication itself often uses TCP/IP protocol on port 80 (HTTP) to represent a client state to a (service) server. This communication style often known as Representational State Transfer (REST). REST is a style of software architecture for distributed systems such as the World Wide Web. REST has emerged as a predominant Web service design model (wikipedia). If REST implemented in HTTP, it is often called Continue reading Android REST: HTTP GET Example

Inflate Android Layout Using Layout Inflater Service

Below is a small snippet in Android Java code to inflate a layout xml file into as a View using a Layout Inflater Service. Very useful if you intend to insert or include (inflate) any layout into another layout during runtime. AbsoluteLayout mainLayout = (AbsoluteLayout) findViewById(R.id.your_main_layout); LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); View menuLayout = inflater.inflate(R.layout.your_menu_layout, mainLayout, true); Assuming that your current activity has an AbsoluteLayout container named mainLayout in which a Continue reading Inflate Android Layout Using Layout Inflater Service

Sorting Array of Objects using Ruby and Python

From my previous post, I had explained on how to sort an array consists of objects by object’s attribute using PHP. While on PHP sorting by object’s attribute requires additional function other than sorting itself, Ruby and Python has it’s own array of object sorting syntax. For example in Ruby, the following one line syntax will sort an array named population by comparing it’s objects length property (attribute) ascendingly without Continue reading Sorting Array of Objects using Ruby and Python

Sorting Array of Objects Using PHP

Consider you have an array or list of objects and wanted to sort it based on one attribute of objects. If the array consists of integer, it is very easy to sort it ascendingly using sort() function, otherwise if the array consists of objects, you have to create custom sorting function which is passed to the PHP usort() function. Here is an example on how to manually sort array of Continue reading Sorting Array of Objects Using PHP

Hello, Ruby!

Ruby was come preinstalled on Mac OS X Mountain Lion, so for you who want to develop application using Ruby this one will come in handy. To check the Ruby version installed on your Mac, fire up the Terminal, and type: ruby -v For other OSes please refer to this article in downloading and installing Ruby on Mac, Linux, and Windows.

Open Source GIS Library for .NET Framework Application

If you are going to develop a GIS application based on Microsoft .NET Framework, there are 2 two free/open source libraries which you can use out of the box. The first one is DotSpatial and the second one is Easy GIS .NET. Both of them offer complete features and easy integration in your Microsoft .NET application. Both DotSpatial and Easy GIS .NET are able to render ESRI .shp map files Continue reading Open Source GIS Library for .NET Framework Application

CSS Starter Snippets

Below is CSS starter to reset CSS properties which are predefined by web browsers. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, Continue reading CSS Starter Snippets

PHP Development: A Test-Driven

All Code is Guilty Until Proven Innocent – http://net.tutsplus.com/ Even good programmers make mistakes. The difference between a good programmer and a bad programmer is that the good programmer uses tests to detect his mistakes as soon as possible. The sooner you test for a mistake the greater your chance of finding it and the less it will cost to find and fix. This explains why leaving testing until just before Continue reading PHP Development: A Test-Driven

Easy Install PHP Mcrypt Extension on Ubuntu Linux

Most of web-based application development todays were developed using database. The most popular one is using PHP and MySQL. When developing using MySQL most of beginners were using phpMyAdmin as their power tools in database CRUD (Create-Read-Update-Delete) as well as databases/tables creation and manipulation. PhpMyAdmin supports encryption feature which enables database developers to raise their application security bar in database. In order to use encryption feature in PHP, phpMyAdmin need Continue reading Easy Install PHP Mcrypt Extension on Ubuntu Linux