package testing;
import java.awt.Rectangle;
import java.io.File;
import org.apache.log4j.PropertyConfigurator;
import org.json.JSONObject;
import processing.core.PApplet;
import processing.core.PImage;
import servers.FaceDetection;
import servers.Google;
import servers.ImageSearcher;
import servers.ImageSearchClient;
import servers.Modem;
import servers.ModemListener;
import servers.Sql;
import textures.FacesLoader;
import utils.ConsoleIO;
import javax.swing.*;
public class Testing extends PApplet implements ModemListener{
ImageSearcher is;
FacesLoader tl;
FaceDetection fd;
Sql sql;
Modem modem;
//Rectangle[] rect = new Rectangle[0];
public static void main(String args[]) {
PApplet.main(new String[] { "testing.Testing" });
}
public void setup(){
size(800,600);
PropertyConfigurator.configure("./data/logs/logger.properties");
modem = new Modem(this, true);
// image = loadImage("/Users/diex/Documents/WORK/PROGRAMACION/EclipseWS/SerLiquido/imagenes/Angelina+Jolie/_qcxDKJaQfUtBM.jpg");
//fd = new FaceDetection();
// rect = fd.analyze(image);
// println(rect.length);
// println(rect.toString());
sql = new Sql("./db/serBahia.sqlite");
}
PImage image;
public void draw(){
background(127);
// image(image,0,0 );
noFill();
strokeWeight(4);
// if(rect.length != 0)
// rect(rect[0].x, rect[0].y, rect[0].width, rect[0].height);
}
public Testing() {
// slq = new Sql();
// for(int i = 0 ; i < 10 ; i++){
// is = new ImageSearcher();
// is.searchImagesFor(ConsoleIO.prompt("Nombre: "));
// }
// tl = new TextureLoader();
// tl.importImages(ReadString.getFeedback("folder: "));
}
public void keyPressed(){
sql.rowExists("originator", "0111555245212");
System.out.println(sql.getCode());
// image = loadImage(ReadString.getFeedback("imageFile: "));
// rect = fd.analyze(image);
}
@Override
public void modemEvent(JSONObject theMessage) {
// TODO Auto-generated method stub
}
}