:::: MENU ::::

Pascal Exercise from 1992 :)

Nov 25, 2016    |      Comments Off on Pascal Exercise from 1992 :)

I was cleaning up my old folders and papers, and found some old exercise from my early course in Pascal.

It is dated from April 1992 as shown in the red circle, wow! it is just 24 years back in time and things has just changed a lot when I compare this exercise to nowadays University exercises 😉

That time, no internet, no cell phone, more fun less stress ;).




Looks like an old Harddisk!

Nov 13, 2016    |      Comments Off on Looks like an old Harddisk!

I was working the other day some where and found this strange old harddisk/server system.

I was not able to identity the age of this system.

Old HarddiskOld HarddiskOld serverOld serverOld server

MyThings 2 Android App

Jun 28, 2016    |      Comments Off on MyThings 2 Android App

MyThings App

This app is to store a list of own things, location and bar code scanner of items. The list will be saved on the device locally and it can be synchronized over Rest Api both ways in cloud.


Based on my previous app MyThings App v.1 I have further developed on it and built MyThings app version 2.

It is basically containing the minimum of following requirement plus some extra fancy creative and technical features.

1.        The minimum requirement is:

  • Local database using SQLlite.
  • Create/Delete/View things from database.
  • Rest Api Synchronization
  • Ability of scanning bar-codes for new created things.
  • Search for thing based on scanning bar-code data in database.

2.       Smart fancy features

  • Force update database by swiping on My Things fragment.
  • When screen get rotated the fields and searching result will keep remembered.
  • Icon added to the tab layout
  • When press overview button on phone hardware button it changes the tabs with logo and name of MyThings App.
  • Refreshing list view on fragment transparently without using intent (This was problem I have had in my previous assignment, it is fixed now)

3.       Futuristic features

  • Building own Restful API to MyThings to sync both ways, it is build half way right now and because of time running out, it is put to side.
  • Adding Camera/Images of things to the list view.

Backend structure

MyThings App v.2 has the similar structure as previously, but it has got improvement on naming and variable conventions, Class are well structured, and in addition it has got google zxing barcode reading class library.

In my opinion the best documentation for coding is to make self-explaining code and structure. That makes it easier for team to understand. This is the case also in MyThings App.

When app get fired, the main activity launcher calls ThingsMainActivity class. Which is the skeleton of the app.

onCreate method must call super class implementation of this method which is part of life cycle, so in the beginning of onCreate I call CreateDummyThings.dummyCreate(this) method in class, it creates 3 dummy book in our local database. Off course we are able to create or delete more if we want so.

1.1.    Local database

Our database structure under Database folder contains 3 class inspired directly from the Android Programming 2nd Edition book that we use in our course. I could have also used some example from Android Source site or Internet in general, but I found the examples are nice and well presented. Under Entity I have a Thing class that has the definitions of fields.

I have also a ThingLab class inspired from the book as well. It is the bind logic between database calls and the controller.


Our ThingLab class contains the required method required to get, add and delete things from database.

Our Adapter ThingListAdapter showing things in list view by calling getThings method as instance of ThingLab

public List<Thing> getThings() {
   List<Thing> Things = new ArrayList<>();
   ThingsCursorWrapper cursor = queryThings(null, null);
   while (!cursor.isAfterLast()) {
   return Things;

The method simply iterates our database and add all things table rows in our ArrayList elements, and return it as List that we can use to view it on our list view.

In case we want to search by barcode to find specific thing we simply create new method similar to getThings call it getThingsBarcode (String input) and the method works in the same way, the only difference is we add query inside the method like:

ThingsCursorWrapper cursor = queryThings(
    MyThingsTable.Cols.BARCODE + " = ?",
    new String[]{input}

And we will get a list of things that has the same barcode.

This is to demonstrate the concept, else it is possible to search everything and get single results or list (multiple) of results.

Deleting things require us to specify which element to delete, so our code snippet will look like this, it is similar to search query but here we ask for deleting the finding results. The method delete single results, as is right now.

public Thing deleteThing(UUID id) {
    ThingsCursorWrapper cursor = queryThings(
    MyThingsTable.Cols.UUID + " = ?",
    new String[]{id.toString()}
try {
        if (cursor.getCount() == 0) {
        return null;
    mDatabase.delete(MyThingsTable.NAME, MyThingsTable.Cols.UUID + " = ?", new String[]{id.toString()});

    return cursor.getThing();
    } finally {

Finally creating new things at the other hand requires us to pass data like what and where information as minimum and barcode is optional. So for example our dummy thing creating method called doCreate that pass the mentioned data to our addThing method and it will create those data in our table.

doCreate method under CreateDummyThing class under Util folder

doCreate(Activity activity, String what, String where, String barcode) {
    mThing = new Thing(what, where, barcode);

addThing method under ThingLab class

addThing(Thing c) {
    ContentValues values = getContentValues(c);
    mDatabase.insert(MyThingsTable.NAME, null, values);


More to come

Computer vision project

May 16, 2016    |      Comments Off on Computer vision project

I have worked with 2 other students on different computer vision project using OpenCV.

A part of the project was about pupil and glint detection for eye tracking, here is a picture of the process in OpenCV.

Eye Pupil Process
The other part was about person tracking from side view and draw a tracking map from top view:

Homography Person Tracking

Top view of Person Tracking

This is a top view of IT University in Copenhagen

And one of the last parts was to create a primitive Augmented Reality concept as seen in the image below:

augmented reality

Thank to

  • Dan Witzner Hansen (Associate Professor), IT University of Copenhagen
  • Zaheer Ahmed
  • Fabricio Narcizo

Team mates

  • Gediminas Kučas
  • Alexandru Gheorghiasa

GuideBelt Project

Feb 18, 2016    |      0 comments


We see every day new technologies coming out to market but a few of those technologies are focused for people with special needs.

We have just finalized a research project called GuideBelt. It is simply a Bluetooth-based indoor navigation system for the visually impaired.bluetooth based indoor navigation system for the visually impaired

The GuideBelt, which is the product of this research, is such a solution that takes advantage of cheap Bluetooth beacons attached to places/objects of interest within an indoor space.

The implementation of the GuideBelt that has been the focus of this work is an early prototype, which uses phones to simulate the Bluetooth receivers (coupled with a vibration module). This was to allow us to focus on development of the algorithm rather than electronics. Therefore, the direction of this research is towards the implementation of the system with the actual technology necessary meaning with assembled electronic components (including Bluetooth modules and vibrators).

We have also wrote a research paper of our experiment that contains important details of the project.

We have made a little image site to present some images of the development:


We have also produced a video of the experiment:

Research and Development

  • Abdulrashid Mohammed
  • Maytham Fahmi
  • Tanase Comboeanu

Feedback for development
Thomas Pederson, Shahram Jalaliniya, Alexandre Alapetite

Technical support
Sebastian Büttrich

Birgit Christensen and all participants

Context Awareness Project

Mar 10, 2015    |      Comments Off on Context Awareness Project

Context awareness

In this paper we describe the concept, development and reflection for Pervasive Computing course (Spring 2015) at IT University of Copenhagen
where we built a context-aware mobile phone utilizing an iBeacon infrastructure.

Code available for group members

PDF download: ITU Contextphone platform

Full guideline to make VHOST (Virtual Host) on XAMPP/WAMP

Jan 3, 2015    |      Comments Off on Full guideline to make VHOST (Virtual Host) on XAMPP/WAMP

Note: To start with, the only difference for this guideline, between XAMPP and WAMP or other Apache packages for Windows, is question where those packages are installed on your computer.

Introduction: vhost (virtual host) is a great solution if you intend to develop many independent project in php and keep them isolated from each others, like:

  • Project 1 is based on php and has local url address php.localhost
  • Project 2 is a Laravel project with url laravel.localhost
  • Project 3 is a Codeigniter with url codeigniter.locathost
  • Project 4 is a WordPress with url wordpress.locathost

You are expected to have installed the latest version of XAMPP/WAMP. Btw, in my case, I have only installed Apache and MySQL.

*Note: By default, most web servers will uses port 80 as default port, in some situation if you have another web server installed like (Microsoft IIS), it uses port 80 as well OR in other cases SKYPE does also some times use port 80 like it is the case for some in Windows 8/10 for some users, in that case you can do two thing’s

  • Change your Apache port to port 8080, 8081 etc. or some other free ports (note: 8080 can some times also give some problems)
  • OR Change your others software/IIS port and keep Apache to default port 80 in case of Skype, just kill the Skype app and restart it after installing Apache on port 80, Skype will automatically get new port.

I have chosen to change my Apache to port 8080.

– For next section, we need to use text editor like notepad or regular IDE. I used sublime text editor.
– If you keep Apache to default port 80, skip this part and move on to Virtual hosts

Change XAMPP/WAMP port (only if necessary)
if left default, then jump to Setting virtual host

Step 1. Edit httpd.conf

Click on Config -> Apache (httpd.conf)
Or you find the file here C:XAMPPapacheconfhttpd.conf, C:XAMPPapache2confhttpd.conf, C:Bitnamiwampstackapacheconfhttpd.conf or C:Bitnamiwampstackapache2confhttpd.conf or similar location.

Change the line with

Listen 80

To 8080 or other, free ports.

Listen 8080

While we have httpd.conf file open we need to ensure that httpd-vhosts.conf is included:
Include conf/extra/httpd-vhosts.conf

Virtual hosts

Note: By default server documents are locate on C:XAMPPhtdocs or C:Bitnamiwampstackapache2htdocs that’s fine if you have only one project or many small test files. However, if you need to develop many projects then it suggested separating them by virtual host, as mentioned earlier.

Step 2. Setting Virtual host

  1. Create a folder for your projects; I have create one in c:vhost you can call it projects etc.
  2. In c:vhost folder we create a sub-folder domain1 or project1 or any other, it is up to you (c:vhostproject1)
  3. Open httpd-vhosts.conf file C:XAMPPapacheconfextrahttpd-vhosts.conf Add following code in line depending on how many vhost you want to create:
<Directory C:/vhost>
    AllowOverride All
    Require all granted

#this is the default address of XAMPP    
<VirtualHost *:8080>
    DocumentRoot "C:/XAMPP/htdocs/"
    ServerName localhost

#this is the first vhost address in XAMPP
<VirtualHost *:8080>
    DocumentRoot "C:/vhost/project1/"
    ServerName php.localhost
    SetEnv NS_ENV variable_value

#this is the second vhost address in XAMPP for project like Laravel
<VirtualHost *:8080>
    DocumentRoot "C:/vhost/Laravel-Blog/public"
    ServerName laravel.localhost


Note: If you work on Laravel projects you can create unlimited Laravel projects as well as other frameworks like codeigniter, Yii, etc., the point is to
have your Laravel project/s on c:vhostlaravel1,
c:vhostlaravel2 etc and make c:vhostlaravel1public as
DocumentRoot etc as showed before. Each Laravel project will have own
VirtualHost URL.

Save and close the file

Some additional information and notes:

  • If port is remain default 80 then the URL address will be localhost
  • If port is remain default 80 then the the VirtualHost tag should be changed to <VirtualHost *:80>
  • If port is changed to 8080, the URL address will be localhost:8080
  • And the vhost URL address could look like this project1.localhost:8080 etc
  • You can add unlimited projects and virtual host like this way.

We are not ready yet, read more.

Step 3. Edit Windows Host file

  1. Stop Apache and MySQL services from XAMPP/WAMP.
  2. Open hosts file in C:windowssystem32driversetc
    you need Administrator privilege to edit the file.
    I suggest to edit the file directly with Sublime text editor.
  3. Add project1.localhost at the end of the file, Save and close the file.       localhost       php.localhost       laravel.localhost       codeigniter.localhost       wordpress.localhost       laravel2.localhost
etc. those are just examples

save the file

Final Step.
Start/Re-start your Apache and MySQL again.

Addition (Suggestion)

Note: You might need to delete your cache in your browser and also it
is good to disable php cache under development process.

Open file php.ini under php folder in your XAMPP or WAMP folder and
change opcache.enable to 0

; Determines if Zend OPCache is enabled

Addition (Alternative solution)

It is possible to deploy temporary Virtual Server with out necessarily configuring XAMPP/WAMP Virtual Host, start CMD console and run following php command:

php -S localhost:8001 -t c:vhostLaravel-Projectpublic
  • Port 8001 can be change to any available port number and be sure nor conflicting with other software ports.
  • c:vhostLaravel... path should be changed to what ever your project path.
  • It is possible to start multiple servers but should have different port numbers.

In your browser you need only to right


Note on 403 Access forbidden error

If you get a 403 Access forbidden error when you browse to your site, you may need to add this to your httpd.conf file:

<Directory path_to_dir>
    AllowOverride none
    Require all granted

Seventh Room

Sep 23, 2014    |      Comments Off on Seventh Room

seventh room

Web shop solution is developed by C# MVC 4.0+ MSSQL 2010 database.