Saturday 31 December 2016

CoC - Escalation After Day 1

Supercell offers boost of army for 1 gem. Army, spells and queen can be boosted by 3 gems. In a day arrived to cristall league.
The critical point is elixir. Now at a bit upper than 2M. It was at 7M at the beginning of escalation.

Now the army is:
Queen 26
10 valky 5 (max)
2 golem 4
4 bombers
9 wizards  (max)
2 levitation 3 (max)
2 rush (max)
1 freeze 4
1 poison 4

Wednesday 28 December 2016

Toridoll - ristorante giapponese a Milano

http://www.ilsole24ore.com/art/food/2016-12-28/toridoll-colosso-ristorazione-giapponese-apre-milano-5-locali-2017-e-fara-scoprire-ramen-secco-175231.shtml?uuid=ADgKUjLC

Tuesday 27 December 2016

Property in UK

http://www.expatarrivals.com/the-united-kingdom/buying-property-in-the-united-kingdom

Thursday 22 December 2016

Sunday 18 December 2016

Microservices in Netflix

https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/

Go vs Java Performance Comparison on 4 Core CPU

https://benchmarksgame.alioth.debian.org/u64q/go.html

fails to Java only for:

  • https://benchmarksgame.alioth.debian.org/u64q/performance.php?test=knucleotide
  • https://benchmarksgame.alioth.debian.org/u64q/performance.php?test=binarytrees

Go Language

http://www.infoworld.com/article/2928602/google-go/whats-the-go-language-really-good-for.html

The really good: Network and Web servers

The also really good: Stand-alone command-line apps or scripts

Simple HTTP Server in Java

http://stackoverflow.com/questions/3732109/simple-http-server-in-java-using-only-java-se-api

Solution # 1

package com.stackoverflow.q3732109;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;

public class Test {

    public static void main(String[] args) throws Exception {
        HttpServer server = HttpServer.create(new InetSocketAddress(8000), 0);
        server.createContext("/test", new MyHandler());
        server.setExecutor(null); // creates a default executor
        server.start();
    }

    static class MyHandler implements HttpHandler {
        @Override
        public void handle(HttpExchange t) throws IOException {
            String response = "This is the response";
            t.sendResponseHeaders(200, response.length());
            OutputStream os = t.getResponseBody();
            os.write(response.getBytes());
            os.close();
        }
    }
}


Solution # 2

import java.io.*;
import javax.xml.ws.*;
import javax.xml.ws.http.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;

@WebServiceProvider
@ServiceMode(value = Service.Mode.PAYLOAD)
public class Server implements Provider<Source> {

    public Source invoke(Source request) {
        return  new StreamSource(new StringReader("Hello There!

"));
    }

    public static void main(String[] args) throws InterruptedException {

        String address = "http://127.0.0.1:8080/";
        Endpoint.create(HTTPBinding.HTTP_BINDING, new Server()).publish(address);

        System.out.println("Service running at " + address);
        System.out.println("Type [CTRL]+[C] to quit!");

        Thread.sleep(Long.MAX_VALUE);
    }
}

Monday 12 December 2016

Url trip

http://igoro.com/archive/what-really-happens-when-you-navigate-to-a-url/

Tuesday 6 December 2016

SOA & Microservices

https://en.m.wikipedia.org/wiki/Service-oriented_architecture

Monday 5 December 2016

Red Black Trees in Java 8 Hashmap

https://en.m.wikipedia.org/wiki/Red%E2%80%93black_tree