Sunday, 20 November 2011

Battery life breakthrough for mobile phones

Northwestern University scientists have designed a battery that could provide handheld gadgets like cellphones with much more energy. It could also recharge several times faster than today's common power cells. Available battery power is one of the strongest limiting factors in the development of personal tech like cellphones.

Read all about it here: http://www.technewsworld.com/rsstory/73764.html

Tuesday, 15 November 2011

Applidium - Cracking Siri

Some guys managed to reverse engineer the Siri protocol, which can now be used on other phones.

Read more about it here

Tuesday, 28 June 2011

Undergraduate thesis project (final)

This is the project i worked on my thesis at University of Patras. It was about creating a multiplayer FPS game in the Unity3d engine. The language used was JavaScript. Gameplay video below.

Thursday, 24 February 2011

The "in" operator

Did you know that there is a in operator in JavaScript? 
This operator checks if a key exists in an object and it can be used very simple like below:
var o = { 8:2008, 9:2009, 10:2010 };
8 in o; // true, key 8 exists with a value of 2008
1 in o; // false, the key 1 does not exist in o

Thursday, 10 February 2011

Extending the JavaScript language

Something useful i found searching the internet is that you can extend existing JavaScript functions by using Extension methods. In this example an array class is extended with a contains-method:
Array.prototype.contains = function(value) {
for (var i = 0; i < this.length; i++)
if (this[i] == value) return true;
return false;
}
We can then use the extension method as follows
var myArray = ["a", "b", "c"];
myArray.contains("c"); // true

Sunday, 9 January 2011

Extracting pure data from HTML using Python

I am creating a crawler in python for a project at the University and i am playing about with the NLTK trying to create an inverted index for multiple pages. A simple way to get the data from a site is when u read it into a text file u use the following method:

pure=nltk.clean_html(url_contents)

If u want to tokenize the data and store all the words in a list u can do it using the command:

tokens=nltk.word_tokenize(pure)

Iterate through the tokens to tag each word and create a tree data structure.