code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
package org.ros.concurrent;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.c... | Java |
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
package Model;
import java.util.Stack;
public class Messages {
Stack<Message> m_Msgs;
public Messages()
{
m_Msgs = new Stack<Message>();
}
public byte[] pop()
{
return m_Msgs.pop().getBytes();
}
public void push(byte[] payload)
{
m_Msgs.push(new Message(payload));
}
public int size() {
ret... | Java |
package Model;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
public class Data {
private final byte[] NO_DATA_PULL = {1};
// eager initialization is both thread safe and will also load the data from db
private static volatile Data instance = new Data();
private Map<ByteBuffer, M... | Java |
package Model;
public class Message {
private byte[] m_Payload;
public Message(byte[] payload)
{
m_Payload = payload;
}
public byte[] getBytes()
{
return m_Payload;
}
}
| Java |
package Model;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.util.Arrays;
public class RequestHandler
{
private final int SIZE_OF_INT = 4;
private String m_NextAddress;
private Integer m_NextPort;
private byte[] payload;
priv... | Java |
package Model;
import java.security.Key;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.spec.SecretKeySpec;
public class Encryption
{
private String KEY;
private Cipher cipher;
public Encryption(String key)
{
try
{
... | Java |
package Controller;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import Model.Data;
import Model.Encryption;
import Model.RequestHandler;
public class Request extends Thread
{
private Socket m_Socket;
private Encryption m_Enc;
public Request(Socket connSocket, Encrypti... | Java |
package Controller;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import Model.Encryption;
public class Server
{
private int m_Port;
public Server(int port)
{
m_Port = port;
}
public void start()
{
ServerSocket serverSocket = null;
Socket connSocket = null;
... | Java |
package Controller;
public class Start
{
public static void main(String[] args)
{
// start the server - on a specific port
Server server = new Server(3333);
//Server server = new Server(4444);
//Server server = new Server(5555);
//Server server = new Server(6666);
server.start();
}
}
| Java |
package Model;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
public class Mixes
{
List<Mix> m_Mixes;
public Mixes()
{
m_Mixes = new ArrayList<Mix>();
try {
... | Java |
package Model;
import java.nio.ByteBuffer;
import java.security.Key;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class Mix {
private String m_Address;
private Integer m_Port;
private String m_Key;
byte[] uuid;
private Cipher cipher;
public Mix(String address, String port, Stri... | Java |
package Model;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import bl.*;
public class TokenManager
{
enum eFlags
{
SimplePush((byte)1),
SimplePull((byte)2),
PushWithProof((byte)3),
PullWithProof((byte)4);
private final byte m_byte;
private eFlags(byte i)
{
m_byte = i... | Java |
package Controller;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import java.util.Stack;
import Model.Mix;
import Model.Mixes;
import Model.TokenManager;
import View.Screen;
public class Sender
{
private final byte[] DUMMY_PUSH = {1};
private int index;
private int c... | Java |
package Controller;
public class Start
{
public static void main(String[] args)
{
new Sender();
}
}
| Java |
package View;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swi... | Java |
package bl;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
public class IntegersFriendClientData implements FriendClientDataI {
public final static int BLOCK_SIZE = 16;
public final static String ENC_ALG = "AES/CBC/NoPad... | Java |
package bl;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Arrays;
public class IntegersPublicParameters implements PublicParametersI {
BigInteger G; // A prime number, represents the group Z*_G
BigInteger q; // The order of the group G
BigInteger g; // A generator for the group
... | Java |
package bl;
import java.math.BigInteger;
import javax.crypto.SecretKey;
public class IntegersTokenClassesManager implements TokenClassesManagerI {
@Override
public PublicParametersI CreatePublicParameters(int bitLength)
throws Exception {
return new IntegersPublicParameters(bitLength);
}
@Override
public... | Java |
package bl;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.InvalidParameterException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.cr... | Java |
package bl;
import java.math.BigInteger;
import java.security.InvalidParameterException;
import java.util.Arrays;
public class IntegersNIZKproof implements NIZKproofI {
BigInteger p1;
BigInteger p2;
private int byteLength;
public IntegersNIZKproof(BigInteger p1, BigInteger p2, int byteLengh) {
this.p1 = p1;
... | Java |
package bl;
import java.math.BigInteger;
public class IntegersClientData implements ClientDataI {
BigInteger identityPublicParameter;
BigInteger identitySecretParameter;
public IntegersClientData(IntegersPublicParameters ipp) {
// Generate secret identity parameter:
this.identitySecretParameter = Common.rand... | Java |
package bl;
import java.math.BigInteger;
import java.security.InvalidParameterException;
public class IntegersVEBToken implements VEBTokenI {
public BigInteger EBtoken;
private BigInteger token;
public IntegersVEBToken(BigInteger veb, BigInteger eb) {
this.token = veb;
this.EBtoken = eb;
}
public Integers... | Java |
package bl;
public class UnknownSecretParameterException extends Exception {
/**
*
*/
private static final long serialVersionUID = -5525670307705581428L;
}
| Java |
package bl;
public interface VEBTokensGeneratorI {
public PublicParametersI GetPublicParameters();
public VEBTokenI CreateToken(int epoch, FriendClientDataI client)
throws IneligibleTypeException;
public NIZKproofI CreateProof(VEBTokenI token, ClientDataI client)
throws IneligibleTypeException;
public VEBT... | Java |
package bl;
import java.math.BigInteger;
import java.security.InvalidParameterException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
public class Common {
static SecureRandom sc = new SecureRandom();
static public byte[] concat(byte[] a, byt... | Java |
package bl;
public interface FriendClientDataI {
// client details
public ClientDataI getClientData();
// Cryptographic information
public Object getCommonSecretKey();
public Object getIdentityPublicParameter();
public Object getIdentitySecretParameter();
}
| Java |
package bl;
public class IneligibleTypeException extends Exception {
/**
*
*/
private static final long serialVersionUID = -5525670307705581428L;
}
| Java |
package bl;
public interface NIZKproofI {
public byte[] GetBytes();
}
| Java |
package bl;
public interface TokenClassesManagerI {
public PublicParametersI CreatePublicParameters(int bitLength)
throws Exception;
public PublicParametersI CreatePublicParameters(byte[] ppBytes) throws Exception;
public VEBTokensGeneratorI CreateVEBTokenGenerator(PublicParametersI pp)
throws IneligibleTyp... | Java |
package bl;
public interface ClientDataI {
// Cryptographic information
Object getIdentityPublicParameter();
Object getIdentitySecretParameter();
}
| Java |
package bl;
public interface VEBTokenI {
boolean Verify(NIZKproofI proof, PublicParametersI pp)
throws IneligibleTypeException;
byte[] getBytes(PublicParametersI pp) throws IneligibleTypeException;
boolean Compare(VEBTokenI t2) throws IneligibleTypeException;
}
| Java |
package bl;
public interface PublicParametersI {
/*
public Object GetGroup();
public BigInteger GetOrder();
public Object GetGenerator();
*/
/**
* @return the bit-length parameter
*/
public int GetBitLength();
/**
* @return the length of a token in bytes
*/
public int GetTokenLengthBytes();
/... | Java |
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Arrays;
import bl.IntegersTokenClassesManager;
public class main {
static SecureRandom sr = new SecureRandom();
static void testBigIntegerAndBytesCastings() throws Exception
{
// choose random BigInteger
SecureRandom sc = new ... | Java |
package Model;
import java.util.HashMap;
import java.util.Map;
public class Messages
{
private final byte[] NOT_EXISTS_PULL = null;
private Map<Integer, byte[]> m_Data;
private int m_NextIndex;
public Messages()
{
m_Data = new HashMap<Integer, byte[]>();
m_NextIndex = 0;
}
// add data - from m... | Java |
package Model;
import java.nio.ByteBuffer;
import java.util.Map;
public class Data
{
private final byte[] NO_DATA_PULL = null;
// eager initialization is both thread safe and will also load the data from db
private static volatile Data instance = new Data();
private Map<ByteBuffer, Messages> m_Data;
priva... | Java |
package Model;
public class Message
{
private String m_Data;
private int m_Index;
public Message(String data)
{
m_Data = data;
}
public Message(String data, int index)
{
m_Data = data;
m_Index = index;
}
public String getMessage()
{
return m_Data;
}
public void setIndex(int index)
{
m_... | Java |
package Model;
import java.util.Arrays;
/*
* According to the message flags create a sub-class of BaseMessage
* and handle its push/pull operations
* */
public class RequestHandler
{
// relevant sub-class according to flags
private BaseMessage m_Message;
public RequestHandler(byte[] b)
{
// extract fi... | Java |
package Model;
public class PPMessage extends BaseMessage
{
@Override
public byte[] pull()
{
// Send the PO's public params
TokenManager token = TokenManager.getInstance();
return build(eCode.Success, token.getPublicParams());
}
}
| Java |
package Model;
public class BaseMessage
{
private byte[] NO_DATA = {1};
protected enum eCode
{
Success((byte)1), Error((byte)1);
byte m_Value;
private eCode(byte i)
{
m_Value = i;
}
public byte getCode()
{
return m_Value;
}
}
protected static byte[] build(eCode code, Object... ... | Java |
package Model;
import bl.*;
public class TokenManager
{
TokenClassesManagerI m_manager;
PublicParametersI m_ppPO;
VEBTokensGeneratorI m_POsideTokenGenerator;
byte[] m_ppBytes;
private static TokenManager m_Instance;
private TokenManager()
{
// via the this interface you create instances of the relevant m... | Java |
package Model;
import java.nio.ByteBuffer;
import java.util.Arrays;
public class PushAndPullMessage extends BaseMessage
{
private final int SIZE_OF_INT = 4;
private byte[] m_PullToken;
private byte[] m_Proof;
private int m_Index;
private byte[] m_PushToken;
private byte[] m_Message;
TokenManager manager... | Java |
package Model;
import java.nio.ByteBuffer;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
public class DB
{
private final String DB_DRIVER = "org.apache.derby.jdbc.... | Java |
package Controller;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import Model.RequestHandler;
/*
* Analyze the message -
* pull data if not dummy (reperesented by -1 index)
* push data if not dummy
* */
public class Request extends Thread
{
// when there is no d... | Java |
package Controller;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import Model.Data;
import Model.TokenManager;
/* Recieve all the messages and handle them */
public class Server
{
// which port the server listens to
private final int INCOMING_PORT = 1234;
public void star... | Java |
package Controller;
public class Start
{
public static void main(String[] args)
{
System.out.println("Server is up");
// start the server
Server server = new Server();
server.start();
}
}
| Java |
package com.clwillingham.socket.io;
import org.json.JSONObject;
public interface MessageCallback {
public void on(String event, JSONObject... data);
public void onMessage(String message);
public void onMessage(JSONObject json);
public void onConnect();
public void onDisconnect();
}
| Java |
package com.clwillingham.socket.io;
public class Message extends IOMessage{
public Message(String message){
super(IOMessage.MESSAGE, -1, "", message);
}
}
| Java |
// MODIFIED TO REDUCE LOGGING
package com.clwillingham.socket.io;
public class IOMessage {
public static final int DISCONNECT = 0;
public static final int CONNECT = 1;
public static final int HEARTBEAT = 2;
public static final int MESSAGE = 3;
public static final int JSONMSG = 4;
public static final int EVENT = ... | Java |
// MODIFIED TO REDUCE LOGGING
package com.clwillingham.socket.io;
import java.io.IOException;
import java.net.URI;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import net.tootallnate.websocket.WebSocketClient;
public class IOWebSocket extends WebSocketClient{
private Mess... | Java |
// MODIFIED TO USE END POINTS IN OUTGOING MESSAGES
// MODIFIED TO REDUCE LOGGING
package com.clwillingham.socket.io;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.util.Scanner;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSO... | Java |
package wasd;
import grits.wasd.R;
import java.io.IOException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.HttpResponseException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache... | Java |
package net.tootallnate.websocket;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
/**
* Implemented by <tt>WebSocketClient</tt> and <tt>WebSocketServer</tt>.
* The methods within are called by <tt>WebSocket</tt>.
* @author Nathan Rajlich
*/
interface WebSocketListener {
/**
* C... | Java |
package net.tootallnate.websocket;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.security.MessageDigest;
import java.security.NoSuchAlgor... | Java |
package net.tootallnate.websocket;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.security.MessageDigest;
import java.security.N... | Java |
package net.tootallnate.websocket;
/**
* Enum for WebSocket Draft
*/
public enum WebSocketDraft {
AUTO,
DRAFT75,
DRAFT76
}
| Java |
package net.tootallnate.websocket;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.channels.NotYetConnectedException;
import java.nio.channels.SocketChannel;
import java.security.NoSuchAlgorithmException;
import java.util.concurrent.BlockingQueue;
/... | Java |
package com.example.androideye;
import java.io.DataInputStream;
import java.io.File;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.graphics.Bitmap;
import android.util.Log;
publi... | Java |
package com.example.androideye;
import java.util.List;
import android.graphics.Bitmap;
import android.graphics.Rect;
/**
* Face Detector interface
* @author Everton Fernandes da Silva
* @author Alan Zanoni Peixinho
*
*/
public interface FaceDetect {
/**
* Find all the faces in the image.
* @param img Imag... | Java |
package com.example.androideye;
import android.graphics.Rect;
/**
* Wrap some image functions using OpenCV Library.
*
* @author André Marcelo Farina
*/
public class OpenCV {
static{
System.loadLibrary("opencv");
}
public static native byte[] findContours(int[] data, int w, int h);
public static... | Java |
package com.example.androideye;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.... | Java |
package com.example.androideye;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.util.Collection;
import ... | Java |
package com.example.androideye;
import java.util.Collection;
import android.graphics.Bitmap;
/**
* Face Descriptor interface.
* @author Alan Zanoni Peixinho
*
*/
public interface FaceDescriptor {
/**
* Extract descriptor from a face image.
* @param img Face image.
* @return Return the face descriptor.
... | Java |
package com.example.androideye;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import ... | Java |
package com.example.androideye;
import java.util.Locale;
import android.content.Context;
import android.content.Intent;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.util.Log;
import android.widget.Toast;
/**
* Wrapper to the Text to Speech Android too... | Java |
package com.example.androideye;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import android.content... | Java |
package com.example.androideye;
import java.io.File;
import android.os.Environment;
/**
* Store some global constants.
* @author Alan Zanoni Peixinho
*
*/
public class Globals {
public static final File APP_DIR = new File(Environment.getExternalStorageDirectory(), "AndroidEye");
public static final File BASE_D... | Java |
package com.example.androideye;
import java.io.File;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import android.app.Activity;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.content.Context;
import andr... | Java |
package com.example.androideye;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
i... | Java |
package com.example.androideye;
import android.os.Bundle;
/**
* Interface for speech recognition callbacks.
*
* Essentially a cut-down version of {@link android.speech.RecognitionListener},
* to avoid dependencies on Froyo and methods we don't need or can't provide.
*
* @author David Huggins-Daines <dhuggins... | Java |
package com.example.androideye;
import java.io.File;
import java.util.concurrent.LinkedBlockingQueue;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.util.Log;
import edu.cmu.pocketsphinx.Config;
import edu.cmu.pocketsphi... | Java |
package com.example.androideye;
import java.util.LinkedList;
import java.util.List;
import android.graphics.Bitmap;
import android.graphics.PointF;
import android.graphics.Rect;
import android.media.FaceDetector;
import android.media.FaceDetector.Face;
import android.util.Log;
/**
*
* @author Everton Fernandes da... | Java |
package com.example.androideye;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import android.graphics.Bitmap;
import android.util.Log;
/**
* Local Binary Pattern descriptor.
* @author Alan Zanoni Peixinho.
*
*/
public class LocalBinaryPattern implements FaceDescriptor{
p... | Java |
package com.example.androideye;
import java.util.Collection;
import java.util.LinkedList;
import android.graphics.Bitmap;
import android.util.Log;
/**
* Active Shape Model face descriptor, uses the Stasm library
*
* @author Alan Zanoni Peixinho
*
*/
public class StasmLib implements FaceDescriptor{
private ... | Java |
package com.example.androideye;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import android.util.Log;
import android.util.Pair;
/**
* Manipulate the Android Eye database.
* @... | Java |
package com.example.androideye;
import java.util.LinkedList;
import java.util.List;
import android.graphics.Bitmap;
import android.graphics.Rect;
public class ViolaJonesFaceDetector implements FaceDetect {
LinkedList<Rect> faces;
long time;
public ViolaJonesFaceDetector()
{
OpenCV.initFaceDetection... | Java |
package com.example.androideye;
import java.util.Collection;
import java.util.Iterator;
/**
* Some math utilities.
* @author Alan Zanoni Peixinho
*
*/
public class MathUtils {
/**
* Compute the Chi-Square distance between samples.
* @param i1 First sample.
* @param i2 Second sample.
* @return Return the... | Java |
package hr.fer.anna.tests.microcode;
import java.util.Random;
import hr.fer.anna.interfaces.IFlagsRegister;
import hr.fer.anna.microcode.AddMicroinstruction;
import hr.fer.anna.microcode.SubtractMicroinstruction;
import hr.fer.anna.oisc.StatusRegister;
import hr.fer.anna.uniform.Constant;
import hr.fer.anna.... | Java |
package hr.fer.anna.tests.oisc;
import hr.fer.anna.oisc.StatusRegister;
import hr.fer.anna.tests.uniform.IFlagsRegisterConformance;
import org.junit.Before;
import org.junit.Test;
/**
* JUnit testovi OISC-ovog StatusRegistera
* @author Boran
*
*/
public class StatusRegisterTest {
/**
* Primje... | Java |
package hr.fer.anna.tests.oisc;
import java.util.Random;
import hr.fer.anna.exceptions.BusAddressTaken;
import hr.fer.anna.exceptions.UnknownAddressException;
import hr.fer.anna.interfaces.IEventListener;
import hr.fer.anna.interfaces.IEventSetter;
import hr.fer.anna.oisc.Assembler;
import hr.fer.anna.oisc.C... | Java |
package hr.fer.anna.tests.uniform;
import org.junit.Assert;
import hr.fer.anna.interfaces.IBus;
import hr.fer.anna.interfaces.IBusMaster;
import hr.fer.anna.model.Word;
import hr.fer.anna.uniform.Address;
public class BusMasterForTesting implements IBusMaster {
/** Očekivana adresa */
private Address expectedAddr... | Java |
package hr.fer.anna.tests.uniform;
import hr.fer.anna.interfaces.IFlagsRegister;
import org.junit.Assert;
/**
* Klasa koja implementira metode za provjeru i testiranje nekog registra. Testira se
* zadovoljanje sučelja IFlagsRegister i njihova ispravna implementacija. Testovi su
* osmišljeni tako da se po... | Java |
package hr.fer.anna.tests.uniform;
import org.junit.Assert;
import hr.fer.anna.exceptions.BusAddressTaken;
import hr.fer.anna.exceptions.IllegalActionException;
import hr.fer.anna.exceptions.UnknownAddressException;
import hr.fer.anna.interfaces.IBus;
import hr.fer.anna.interfaces.IBusMaster;
import hr.fer.anna.inter... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.