code
stringlengths
3
1.18M
language
stringclasses
1 value
package jsqlite; /** * String encoder/decoder for SQLite. * * This module was kindly donated by Eric van der Maarel of Nedap N.V. * * This encoder was implemented based on an original idea from an anonymous * author in the source code of the SQLite distribution. * I feel obliged to provide a quote from the orig...
Java
package jsqlite; /** * Callback interface for SQLite's query results. * <BR><BR> * Example:<BR> * * <PRE> * class TableFmt implements SQLite.Callback { * public void columns(String cols[]) { * System.out.println("&lt;TH&gt;&lt;TR&gt;"); * for (int i = 0; i &lt; cols.length; i++) { * ...
Java
package jsqlite; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * Internal class implementing java.io.InputStream on * SQLite 3.4.0 incremental blob I/O interface. */ class BlobR extends InputStream { /** * Blob instance */ private Blob blob; /** ...
Java
package jsqlite; /** * Context for execution of SQLite's user defined functions. * A reference to an instance of this class is passed to * user defined functions. */ public class FunctionContext { /** * Internal handle for the native SQLite API. */ private long handle = 0; /** * Set ...
Java
package com.spatialite.test.utilities; import java.io.File; import java.io.IOException; import com.spatialite.utilities.ActivityHelper; import com.spatialite.utilities.AssetHelper; import jsqlite.Exception; import android.test.AndroidTestCase; public abstract class DatabaseTestCase extends AndroidTestCase { // Sp...
Java
package com.spatialite.test.spatialite; import com.spatialite.test.utilities.DatabaseTestCase; import jsqlite.Callback; import jsqlite.Stmt; import android.util.Log; public class RTreeTest2 extends DatabaseTestCase { private static final String TAG = "RTreeTest2"; @Override protected void setUp() throws Exceptio...
Java
package NetworkManager; import java.io.*; import java.net.*; import java.util.Observable; import MiddleLayer.OtherClass.*; import java.util.Observer; import java.util.logging.Level; import java.util.logging.Logger; public class MultiThreadChatServer implements Observer{ MyObservable _observable = new My...
Java
package NetworkManager; import MiddleLayer.OtherClass.CommandStruct; import MiddleLayer.OtherClass.MyObservable; import java.io.*; import java.net.*; import java.util.Observer; import java.util.logging.Level; import java.util.logging.Logger; public class MultiThreadChatClient extends Thread implements Runnable{ ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package heartgame; import GUI.GameplayForm; import MiddleLayer.ClientProcessing; import MiddleLayer.OtherClass.CommandStruct.MessageType; import MiddleLayer.ServerProcessing; /** * * @author ThanhTri */ public clas...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; /** * * @author ThanhTri * Kiễm tra luật và trạng thái bàn cờ trong game. */ public class GameRules { private boolean bIsHeartBroken = false;//kiểm tra xem được đi quân Cơ chưa hay không? ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; /** * * @author ThanhTri */ public class Card { static String resources[] = { "Images/Cards/2s.gif", //2 bích "Images/Cards/2c.gif", //2 chuồn "Ima...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; import MiddleLayer.OtherClass.CommandStruct; import NetworkManager.MultiThreadChatServer; import java.util.ArrayList; import java.util.List; import java.util.Observable; import java.util.Observer; ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; import java.util.ArrayList; import java.util.List; /** * * @author ThanhTri * Lớp quản lý toàn bộ những lá bài mà client hay server đang giữ. */ public class Cards { List lstOfCards = ne...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer.OtherClass; import MiddleLayer.Cards; import java.util.ArrayList; import java.util.List; /** * * @author ThanhTri * - Lớp dùng để chứa dữ liệu đi lên đi xuống giữa các middle và network */ publ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer.OtherClass; import java.util.Observable; /** * * @author ThanhTri */ public class MyObservable extends Observable { @Override public void clearChanged() { super.clearChanged(); } ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; /** * * @author ThanhTri */ public class HeartGame { //Kiểm tra trạng thái kết nối vào server hay chưa? Nếu chưa không cho bắt đầu chơi private boolean isStillConnectToServer = false; ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; import GUI.Hearts; import MiddleLayer.OtherClass.CommandStruct; import MiddleLayer.OtherClass.CommandStruct.MessageType; import NetworkManager.MultiThreadChatClient; import java.util.List; import j...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiddleLayer; import GUI.*; import GUI.Hearts.GameState; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Method; import java.net.Socket; impor...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.Point; import java.util.ArrayList; /** * * @author Green */ public class MotionManager { ArrayList<Motion> lstMotions = new ArrayList<Motion>(); publi...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Server.java * * Created on Jun 26, 2011, 10:00:34 PM */ package GUI; /** * * @author Green */ public class Server extends javax.swing.JFrame { /** Creates new form Server */ public Server() { ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import MiddleLayer.Card; import MiddleLayer.Cards; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Point; import java.util.ArrayList; import java.util.Collections; /*...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.GregorianCalendar; import java.util.Rando...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.Point; /** * * @author Green */ public class Motion { public enum MType { Deal, Play, Lose }; private GUICard card; private Point targ...
Java
package GUI; import javax.swing.JPanel; import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.ImageIcon; import javax.swing.JButton; public class GamePanel extends JPanel { // private GameApplet...
Java
package GUI; import MiddleLayer.ClientProcessing; import MiddleLayer.ClientServerMessenger; import java.awt.*; import java.awt.event.ActionListener; import java.awt.image.*; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; public abstract class Game implements ActionListener { GamePanel gp; C...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.Point; import java.awt.image.BufferedImage; /** * * @author Green */ public class GUICard implements Comparable<GUICard> { public static final int SPADES =...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.Point; import java.util.ArrayList; /** * * @author Green */ public class GamblerManager { ArrayList<Gambler> lstGamblers; Gambler player; int scree...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.Point; import java.util.ArrayList; /** * * @author Green */ public class Banker implements IMotionFinish { private Deck deck; public Point position; ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * HeartsForm.java * * Created on Jun 26, 2011, 10:00:56 PM */ package GUI; import MiddleLayer.HeartGame; /** * * @author Green */ public class HeartsForm extends javax.swing.JFrame { HeartGame app; ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.URL; import java.util.logging.Level; import java.ut...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; /** * * @author Green */ public interface IMotionFinish { public void end(Motion motion); }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * GameplayForm.java * * Created on Jun 18, 2011, 12:24:39 AM */ package GUI; import MiddleLayer.ClientProcessing; import MiddleLayer.ClientServerMessenger; /** * * @author Green */ public class GameplayForm ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package GUI; import MiddleLayer.Card; import MiddleLayer.GameRules; import MiddleLayer.OtherClass.CommandStruct.MessageType; import java.awt.Color; import java.awt.Graphics; import java.awt.Point; import java.awt.event....
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package doan_totalcommander_002; /** * * @author Administrator */ public enum jEnum_CacEnumTrongBai { BangTrai (1), BangPhai (2), KB (1024), MB (1024 * 1024), GB (1024 * 1024 * 1024), ...
Java
/* * DoAn_TatalCommande_002View.java */ package doan_totalcommander_002; import QuanLyFile.BoQuanLyFile; import QuanLyFile.Dialog_Xem_ChinhSuaFile; import QuanLyFile.Dialog_SoSanhFile; import DuyetFile.EventListener_ClickChuotVaoBangDuyetFile; import DuyetFile.BangDuyetFile; import DuyetFile.CayDuyetFile; import Du...
Java
package doan_totalcommander_002; import java.awt.Image; import javax.swing.ImageIcon; /** * Dùng để co giản các ImageIcon tham khao tại: http://www.java2s.com/Code/Java/2D-Graphics-GUI/Imagescale.htm * @author Administrator */ public class BoCoGianImage{ public BoCoGianImage() { } /** * Co giản ảnh kiểu Imag...
Java
/* * DoAn_TatalCommande_002App.java */ package doan_totalcommander_002; import org.jdesktop.application.Application; import org.jdesktop.application.SingleFrameApplication; /** * The main class of the application. */ public class DoAn_TatalCommande_002App extends SingleFrameApplication { /** * At start...
Java
/* * DoAn_TatalCommande_002AboutBox.java */ package doan_totalcommander_002; import org.jdesktop.application.Action; public class DoAn_TatalCommande_002AboutBox extends javax.swing.JDialog { public DoAn_TatalCommande_002AboutBox(java.awt.Frame parent) { super(parent); initComponents(); ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_AppendZip.java * * Created on Apr 19, 2009, 5:48:34 AM */ package QuanLyFileNen; import java.io.FileNotFoundException; import java.io.IOException; import java.util.logging.Level; import java.util.loggi...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package QuanLyFileNen; import QuanLyFile.BoQuanLyFile; import java.io.*; import java.text.DateFormat; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.*; import javax.swing.JOptionPa...
Java
package DuyetFile; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.awt.Point; import java.util.EventListener; /** * * @author Dang Thi Phuong Thao */ public interface EventListener_ClickChuotVaoCayDuyetFile extends EventListener { public void Eve...
Java
package DuyetFile; import java.awt.Point; import java.awt.event.MouseEvent; import java.util.EventListener; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Administrator */ public interface EventListener_ClickChuotVaoBangDuyetFile extends Event...
Java
package DuyetFile; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import java.text.SimpleDateFormat; import javax.swing.*; import javax.swing.tree.*; import javax.swing.event.*; /** * *Tham khao http://www.java2s.com/Code/Java/Swing-JFC/FileTreewithPopupMenu.htm * @author Dang ...
Java
package DuyetFile; /* Definitive Guide to Swing for Java 2, Second Edition By John Zukowski ISBN: 1-893115-78-X Publisher: APress */ import QuanLyFile.BoQuanLyFile; import doan_totalcommander_002.*; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.*; impo...
Java
package DuyetFile; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.util.EventObject; /** * * @author Dang Thi Phuong Thao */ public class Event_ClickVaoCayDuyetFile extends EventObject { public Event_ClickVaoCayDuyetFile(Object source) { ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package DuyetFile; import QuanLyFile.BoQuanLyFile; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.dnd.DnDCon...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package DuyetFile; import java.util.EventObject; /** * * @author Administrator */ public class Event_ClickVaoBangDuyetFile extends EventObject { public Event_ClickVaoBangDuyetFile(Object source) { ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_SoSanhFile.java * * Created on Apr 10, 2009, 2:59:38 AM */ package QuanLyFile; import doan_totalcommander_002.*; import java.awt.Color; import java.awt.HeadlessException; import java.awt.event.Adjustme...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_CatNho.java * * Created on Apr 10, 2009, 6:38:44 PM */ package QuanLyFile; import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package QuanLyFile; import doan_totalcommander_002.*; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_Copy.java * * Created on Apr 16, 2009, 7:41:29 PM */ package QuanLyFile; import java.awt.Cursor; import java.awt.Toolkit; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * MyComp_OpenSaveFile.java * * Created on Apr 15, 2009, 12:05:37 AM */ package QuanLyFile; import com.sun.org.apache.bcel.internal.generic.Select; import javax.swing.JFileChooser; import javax.swing.plaf.FileCh...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package QuanLyFile; import java.util.EventObject; /** * Sự kiện khi tạo mới hoặc xóa một file * phát đi để bạn hiện thị file có thể cập nhật kiệp thời * @author Administrator */ public class Event_Tao_XoaMotFile e...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_CatNho.java * * Created on Apr 10, 2009, 6:38:44 PM */ package QuanLyFile; import doan_totalcommander_002.jEnum_CacEnumTrongBai; import java.awt.Cursor; import java.awt.Toolkit; import java.awt.event.A...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package QuanLyFile; import java.util.EventObject; /** * * @author Administrator */ public class Event_DongFileChooser extends EventObject { public Event_DongFileChooser(Object source) { super(so...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_TimFile.java * * Created on Apr 13, 2009, 3:48:12 PM */ package QuanLyFile; import DuyetFile.BangDuyetFile; import DuyetFile.EventListener_ClickChuotVaoBangDuyetFile; import doan_totalcommander_002.jEn...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_Xem_ChinhSuaFile.java * * Created on Apr 9, 2009, 10:14:10 PM */ package QuanLyFile; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JFra...
Java
package QuanLyFile; import java.awt.Point; import java.util.EventListener; import javax.swing.JFileChooser; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Administrator */ public interface EventListener_HoanThanhCongViec extends EventListener ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_Copy.java * * Created on Apr 16, 2009, 7:41:29 PM */ package QuanLyFile; import java.awt.Cursor; import java.awt.Toolkit; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Dialog_Copy.java * * Created on Apr 16, 2009, 7:41:29 PM */ package QuanLyFile; import java.awt.Cursor; import java.awt.Toolkit; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener...
Java
package edu.gatech.gro.model; import edu.gatech.gro.utils.Utils; public class ItemType extends AbstractObject { /* Attributes matching exactly the database model. */ private String name; private String nameClean; public ItemType() { super(); } public String getNameClean() { return nameClean; } public ...
Java
package edu.gatech.gro.model; import java.util.ArrayList; public class ListGroup extends ItemType { private ArrayList<Item> items; public void setItems(ArrayList<Item> items) { this.items = items; } public ArrayList<Item> getItems() { return items; } }
Java
package edu.gatech.gro.model; public class Currency { public static final Currency[] ALL = new Currency[] { new Currency(1, "$", "dollar"), new Currency(2, "€", "euro"), new Currency(3, "£", "pound") }; private final int id; private final String symbol; private final String name; private Currency(int id, Strin...
Java
package edu.gatech.gro.model; import edu.gatech.gro.utils.Utils; public class Item extends AbstractObject { /* Attributes matching exactly the database model. */ private int itemTypeId; private int groceryStoreId; private String name; private String nameClean; private String barCode; private String barCodeHas...
Java
package edu.gatech.gro.model; import java.util.List; public class ObjectResponse { private boolean success; private Object data; private int totalCount; private List<String> errors; public boolean isSuccessful() { return success; } public void setSuccess(boolean success) { this.success = success; } p...
Java
package edu.gatech.gro.model; import java.util.ArrayList; import java.util.List; import android.content.Context; import edu.gatech.gro.utils.Utils; public class NamedList extends AbstractObject { /* Attributes matching exactly the database model. */ private int userId; private String name; private String nameCl...
Java
package edu.gatech.gro.model; import edu.gatech.gro.utils.Utils; public class GroceryStore extends AbstractObject { /* Attributes matching exactly the database model. */ private String name; private String nameClean; public GroceryStore() { super(); } public String getName() { return name; } public vo...
Java
package edu.gatech.gro.model; import java.util.List; import android.content.Context; import edu.gatech.gro.model.dao.NamedListDao; import edu.gatech.gro.utils.Utils; public class User extends AbstractObject { /* Attributes matching exactly the database model. */ private String username; private String usernameCl...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.NamedList; public class NamedListJsonHandler extends JsonHandler { private static final String TAG = "NAMED_LI...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.User; public class UserJsonHandler extends JsonHandler { private static final String TA...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.Item; import edu.gatech.gro.model.ListItem; public class ListItemJsonHandler extends JsonHandler { private sta...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.ItemType; public class ItemTypeJsonHandler extends JsonHandler { private static final S...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.Item; import edu.gatech.gro.model.ListGroup; public class ListGroupItemJsonHandler extend...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.GroceryStore; public class GroceryStoreJsonHandler extends JsonHandler { private static...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.Item; public class ItemJsonHandler extends JsonHandler { private static final String TA...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.ListGroup; public class ListGroupListItemJsonHandler extends JsonHandler { private static final String TAG = "...
Java
package edu.gatech.gro.model.parser; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import edu.gatech.gro.model.AbstractObject; import edu.gatech.gro.model.ObjectResponse; public class JsonHandler { ...
Java
package edu.gatech.gro.model.dao; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public abstract class DatabaseHandler extends SQLiteOpenHelper { protected static final String DATABASE_NAME = "grocery311db"; protected static final int...
Java
package edu.gatech.gro.model.dao; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import edu.gatech.gro.model.ListItem; public class ListItemDao extends DatabaseHandler { private static ...
Java
package edu.gatech.gro.model.dao; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import edu.gatech.gro.model.ItemType; public class ItemTypeDao extends DatabaseHandler { private static ...
Java
package edu.gatech.gro.model.dao; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import edu.gatech.gro.model.GroceryStore; public class GroceryStoreDao extends DatabaseHandler { private...
Java
package edu.gatech.gro.model.dao; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import edu.gatech.gro.model.Item; import edu.gatech.gro.model.ListItem; public class ItemDao extends Datab...
Java
package edu.gatech.gro.model.dao; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import edu.gatech.gro.model.Item; import edu.gatech.gro.model.ListGroup; import edu.gatech.gro.model.ListIt...
Java
package edu.gatech.gro.model.dao; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import edu.gatech.gro.model.User; public class UserDao extends DatabaseHandler { private static final St...
Java
package edu.gatech.gro.model; import edu.gatech.gro.utils.Utils; public abstract class AbstractObject { protected int id; protected int creationTime; protected int lastUpdateTime; protected boolean deleteFlag; protected AbstractObject() { int now = Utils.getCurrentTimestamp(); this.creationTime = now; th...
Java
package edu.gatech.gro.model; public class ListItem extends Item { private int namedListId; private boolean checked; private int quantity; private int currentQuantity; public ListItem() { super(); } public ListItem(Item i) { super(); setId(i.getId()); setCreationTime(i.getCreationTime()); setLastUp...
Java
package edu.gatech.gro; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.os.Handler; import android.os.Message; import...
Java
package edu.gatech.gro; public class Options { private static final Options instance = new Options(); private boolean offline = false; private Options() { } public static Options getInstance() { return instance; } public boolean isOffline() { return offline; } public void setOffline(boolean o) { t...
Java
package edu.gatech.gro; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android...
Java
package edu.gatech.gro.http; import edu.gatech.gro.model.ObjectResponse; public interface IResponseAdapter { public void onResponse(ObjectResponse response); }
Java
package edu.gatech.gro.http; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.http.HttpResponse; import org.apache.http.client.ResponseHandler; import android.util.Log; import edu.gatech.gro.model.ObjectResponse; import edu.gatech.gro.model.parser.JsonHan...
Java
package edu.gatech.gro.http; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.cli...
Java
package edu.gatech.gro; import java.util.regex.Pattern; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.wid...
Java
package edu.gatech.gro; import java.util.regex.Pattern; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.wid...
Java
package edu.gatech.gro; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android...
Java
package edu.gatech.gro; import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import android.app.Application; import edu.gatech.gro.http.HttpRequest; import edu.gatech.gro.http.IResponseAdapter; import ed...
Java
package edu.gatech.gro; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.LayoutInfla...
Java
package edu.gatech.gro.utils; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.content.Context; import android.util.Log; import edu.gatech.gro.model.AbstractObject; import edu.gatech.gro.model.Item; import edu.gatech.gro.model.ListGroup; impo...
Java
package edu.gatech.gro.utils; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Calendar; import android.util.Log; public class Utils { private static final String TAG = "UTILS"; public static int getCurrentTimestamp() { return (int) (Calendar.getInstance().get...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package _bai02_phantichphankhaibao; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.JOptionPane; /** * * @author Administrator */ public class jCLass_PhanPre implements Interface_...
Java