Setting up Objective-C on Ubuntu

This tutorial will explain how to set up environment for successful building Objective-C applications on Ubuntu for total beginners (without Apple machine) :).

It’s based on this step by step wizard: Getting started with Objective C on Ubuntu.

We can’t use default Cocoa implementation from iOS, instead we have another implementation suitable for Linux: GNUstep.

Needed steps:

  1. Install headers for gcc:
    sudo apt-get -y install build-essential
  2. Install GNUStep:
    sudo apt-get install gobjc gnustep gnustep-make gnustep-common
  3. Add next line to .bashrc
    #GNUSTEP Environment vars
    . /usr/share/GNUstep/Makefiles/GNUstep.sh

And you are good to go. How to create make file and Hello World follow this link: Getting started with Objective C on Ubuntu.

Some useful links:

Advertisements

Java Web Application & UTF-8

This is probably the best way to set encoding for all jsp pages, you should also save jsp files in UTF-8 encoding or whatever you need.

<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri&gt;
/WEB-INF/tld/liferay-portlet.tld
</taglib>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<page-encoding>UTF-8</page-encoding>
</jsp-property-group>
</jsp-config>

Google Maps Internationalization

English: Wordmark of Google Maps

Google Maps API supports internationalization of user interface and locations names. In order to add language definition to our map we have to provide additional parameter language to <script> declaration.

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=sl"></script>

Source:
https://developers.google.com/maps/documentation/javascript/basics

With this kind of language declaration we can define only one language (if we forget JavaScript DOM manipulation). What we need is dynamically loaded Google Maps API and Google Loader is the right choice for this kind of job. It is capable of loading several JavaScript libraries like Google Maps API, Google Data APIsGoogle Visualization API… For more information click here. Google Loader API requires <script> declaration in header of HTML  document:

<script type="text/javascript" src="https://www.google.com/jsapi"></script>

And this is an example of dinamicly loaded Goolge Maps API with provided language and callback function which builds a new map:

<script type="text/javascript" src="https://www.google.com/jsapi">  function mapsLoaded() { ... }
   google.load("maps", "3", {"callback" : mapsLoaded, "language": "sl", "other_params": "sensor=false"});
</script>

And what is wrong whit this code?

The language is never set properly. What actually works is language declaration inside other_params like this:

<script type="text/javascript" src="https://www.google.com/jsapi">  function mapsLoaded() { ... }
   google.load("maps", "3", {"callback" : mapsLoaded, "other_params": "sensor=false&language=sl"});
</script>

Do not forget sensor parameter!

Virtual Hard Drive resizing

VirtualBox is one of the most useful virtualization software available for free.

Creating virtual machine is easy, just a few clicks and we are able to explore new operating system. What we need to sacrifice is some processor time, RAM memory and a few GBof hard drive. These resources can be dynamically allocated, even the hard drive.

VirtualBox

Recently, I had set up a developement environment on a virtual machine running Windows 7. Hard disk has been dynamically allocated at 30 GB. I was running GlassFish server with MySQL database and Eclipse IDE. I also had installed ruby with rails framework along and Aptana Studio. As you can imagine VHD become insufficient. As I couldn’t afford to install everything from scratch again, I decided to extend virtual disk.

Continue reading “Virtual Hard Drive resizing”

Tomcat Server running as Windows service

English: Logo of Русский: Логотип Apache Tomcat

How to install service for Tomcat 6.x/7.x to start automatically after reboot on Windows 7 or Windows Server 2008?

First of all you will need administration privileges to install service. This step by step guide is for standalone zip version of Tomcat Server.

Continue reading “Tomcat Server running as Windows service”