Visualizzazione post con etichetta google. Mostra tutti i post
Visualizzazione post con etichetta google. Mostra tutti i post

domenica 11 novembre 2012

NetBeans 7.2 + Google App Engine

1) Donwload appengine sdk.

2) unzip file


3) Open NetBeans -- tools - plugins

4) add new Url http://kenai.com/downloads/nbappengine/NetBeans7.2/updates.xml


5) install plug-in

6) add new server


7) Start new project (Web Application) with Server Google App Engine.

mercoledì 11 maggio 2011

Java - Generare e scaricare il Qrcode di Google

comoda funzionalità per scaricare da url un file generato da google per di Qrcode utilizzando le commons.io:




package com.utils;

import java.io.File;
import java.io.IOException;
import java.net.URL;

public class HttpUtil {

    public static synchronized void downloadData(String url, String target) {

        try {
            org.apache.commons.io.FileUtils.copyURLToFile(new URL(url), new File(target));
        } catch (IOException ex) {
            System.err.println("errore " + ex.getMessage());
        }


    }
}




poi semplicemente:


HttpUtil.downloadData("https://chart.googleapis.com/chart?cht=qr&chs=100x100&chl=http://www.google.it", "/home/marco/qrcode.png");




la documentazione di Google