Google App Engine: love the pros and hate the cons.

Some users love App Engine others hate it. Why?
Sure, App engine have it poor and cons. You might love it or hate but it only depend what your trying to achieve.
Continue reading

Java on iOS and Windows Phone using GWT

We developed a prototype for a company who wanted to go mobile on iOS and Windows Phone.
The challenge was to avoid rewrite java code in Objective-C and C# as much as possible.
Also running in a native app for a better the user experience.

But there is no JVM available on iPhone, iPad nor Windows Phone. So how to execute Java code?

This tutorial only demonstrate the principle on iOS.
With the exact same code I was able to run it on Windows Phone.

Continue reading

CGRect utils an helper for UIView frame

To move a UIView by 10 pixel I have been writing this kind of code in Objective-C

myView.frame = CGRectMake(myView.frame.origin.x + 10,
                         myView.frame.origin.y,
                         myView.frame.size.width,
                         myView.frame.size.height);

From now I will simply write:

myView.x += 10;

Continue reading

4 ways to create an executable jar file

First it’s important to understand what is a runnable java jar.
It’s simply a zip file renamed in jar file who embed the compiled code.

  • Create runnable jar with eclipse
  • Using Maven to create a runnable jar
  • Runnable Java Jar by hand
  • importing Java jars programmatically at runtime
  • Lucene MoreLikeThis Java example

    Lucene is an open source search engine written in Java and C#.
    Using the MoreLikeThis query can quickly find similar entries from it index.
    It’s also able to search for similar documents simply by comparing a string to it indexed fields.

    Continue reading

    Adding local jar in maven using a local repository

    Sometimes the library you’re trying to use don’t have any Maven repository.
    You can solve this problem without creating you own repository server.

    Simply run your repository on localhost pointing into your project.

    Continue reading

    Detecting string similarity in Java and C#

    Detecting when two textes are very similar can be use full in many case.

    With string similaity algorithms we can de-duplicate documents from a database, cleaning document, finding almost duplicate html page on our website and much more.

    Continue reading

    Node.js + MongoDB Hello World Example

    A simple node.js + MongoDB hello world example – how to connect, create database, collection and document, save, update, remove, get and display document (data).

    First go and install
    Node.js
    MongoDB

    Continue reading

    Concurrent HTTP requests in node.js

    When fetching a list of 1 million URL you want to process them in parallel but not all in the same time.

    Continue reading

    Dropbox App example in Java CLI

    Let’s prototype a Dropbox Application who send file from you client to a server without using FTP.
    We will look more in detail into JCommander library and how to authenticate and send file into your dropbox.

    Continue reading