code
stringlengths
3
1.18M
language
stringclasses
1 value
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author acazares */ public enum ConcursoStatus { nuevo, iniciado, pausado, finalizado; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author Windows */ public enum UsuarioTipo { usuario, equipo, administrador; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author Windows */ public enum UsuarioStatus { nuevo, activo, bloqueado; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author acazares */ public enum ComponentesNombre { Aclaraciones, CodigoFuente, Concurso, Dudas, Lenguaje, LenguajeConcurso, Reactivo, Rol, Servidor, Usuario; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author Windows */ public enum RolStatus { aceptado, bloqueado, rechazado; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author acazares */ public enum ConcursoTipo { publico, privado, bloqueado; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tipos; /** * * @author Windows */ public enum ServidorStatus { activo, pausado, apagado }
Java
package DTO; // Generated 16/11/2012 12:38:33 PM by Hibernate Tools 3.2.1.GA import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.Id; ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package validadores; import javax.faces.validator.*; import javax.faces.application.*; import javax.faces.component.*; import javax.faces.context.*; import java.util.regex.*; /** * * @author Windows ...
Java
import java.util.Date; import DTO.Usuario; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Windows */ public class ImplementacionHibernate { public static void main(String...args){ DAO.UsuarioDAO dao = new DAO.Usu...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package utilidades; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * * @author acazares * http://www.apuntesdejava.com/2009/03/md5-en-java.html */ public class ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package DAO; import DTO.Aclaraciones; import DTO.CodigoFuente; import DTO.Concurso; import DTO.Dudas; import DTO.LenguajesConcurso; import DTO.Reactivo; import DTO.Rol; import DTO.Servidor; import DTO.Usua...
Java
package DAO; import DTO.Usuario; import java.util.Date; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package DAO; import DTO.Aclaraciones; import DTO.CodigoFuente; import DTO.Concurso; import DTO.Dudas; import DTO.LenguajesConcurso; import DTO.Reactivo; import DTO.Rol; import DTO.Servidor; import DTO.Usua...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package DAO; import DTO.*; import java.util.Date; import java.util.List; import org.hibernate.Query; /** * * @author acazares */ public class ConcursoDAO extends UtilDao{ protected String o...
Java
package com.example.myapplication; import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import de.i7m.api.APIClient; import de.i7m.api.API...
Java
package de.i7m.api; public enum APIState { OK, FAIL }
Java
package de.i7m.api; public class APIException extends RuntimeException { public APIException(String msg) { super(msg); } public APIException(String msg, Throwable cause) { super(msg,cause); } }
Java
package de.i7m.api; import android.util.Xml; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import org.apache.http.Header; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.ByteArrayInputStream; import java.io.IO...
Java
package de.i7m.api; public interface APIMessage { }
Java
package de.i7m.api; import org.xmlpull.v1.XmlPullParser; abstract class APIRequest<T extends APIMessage> { abstract public String getMethodName(); abstract public T parseXml(XmlPullParser parser); }
Java
package de.i7m.api.messages; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; import de.i7m.api.APIException; import de.i7m.api.APIMessage; public class APIBoolean implements APIMessage { private final boolean value; public APIBoolean(boolean va...
Java
package de.i7m.api; public interface APIResponseHandler<T extends APIMessage> { public void apiCallFailed(APIError e); public void apiCallSuccessful(T msg); public void apiFault(Throwable ex); }
Java
package de.i7m.api; class APIErrorException extends RuntimeException { private final APIError err; public APIErrorException(APIError err) { super("API call failed with state ["+err.getCode()+"] aka\""+err.getMessage()+"\""); this.err = err; } public APIError getError() { retur...
Java
package de.i7m.api; public class APIError extends RuntimeException { /* public static final int UNKNOWN_ERROR = -1; public static final int SERVICE_UNAVAILABLE = 100; public static final int AUTHENTICATION_REQUIRED = 101; public static final int AUTHENTICATION_FAILE...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 ...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 ...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.requests; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * U...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 ...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api.messages; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * Unl...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * U...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package de.i7m.api; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 requi...
Java
package com.astuetz.viewpager.extensions; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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-...
Java
package de.i7m.picshare.Fragment; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Fragment; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Fragment; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Fragment; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Adapter; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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-...
Java
package de.i7m.picshare.Adapter; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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-...
Java
package de.i7m.picshare.Activity; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Activity; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Activity; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Activity; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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...
Java
package de.i7m.picshare.Activity; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * ...
Java
package de.i7m.picshare.Utils; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * U...
Java
package de.i7m.picshare.Utils; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * U...
Java
package de.i7m.picshare.Utils; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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....
Java
package de.i7m.picshare.Utils; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * U...
Java
package de.i7m.picshare.Utils; /* * Copyright 2013 Marc Klein & Max Lohrmann * * 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 * * U...
Java
/* * Copyright (C) 2009 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...
Java
package com.ch_linghu.fanfoudroid.app; import java.util.HashMap; import android.graphics.Bitmap; public class MemoryImageCache implements ImageCache { private HashMap<String, Bitmap> mCache; public MemoryImageCache() { mCache = new HashMap<String, Bitmap>(); } @Override public Bitmap ...
Java
/* * Copyright (C) 2009 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...
Java
package com.ch_linghu.fanfoudroid.app; import android.text.Spannable; import android.text.method.LinkMovementMethod; import android.text.method.MovementMethod; import android.view.MotionEvent; import android.widget.TextView; public class TestMovementMethod extends LinkMovementMethod { private double mY...
Java
package com.ch_linghu.fanfoudroid.app; import android.app.Activity; import android.content.Intent; import android.widget.Toast; import com.ch_linghu.fanfoudroid.LoginActivity; import com.ch_linghu.fanfoudroid.R; import com.ch_linghu.fanfoudroid.fanfou.RefuseError; import com.ch_linghu.fanfoudroid.http.HttpAuthExcepti...
Java
/* * Copyright (C) 2009 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...
Java
package com.ch_linghu.fanfoudroid.app; import android.graphics.Bitmap; import android.widget.ImageView; import com.ch_linghu.fanfoudroid.TwitterApplication; import com.ch_linghu.fanfoudroid.app.LazyImageLoader.ImageLoaderCallback; public class SimpleImageLoader { public static void display(final ImageView i...
Java
package com.ch_linghu.fanfoudroid.app; import java.lang.Thread.State; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import android.graphi...
Java
package com.ch_linghu.fanfoudroid.app; import android.graphics.Bitmap; import com.ch_linghu.fanfoudroid.R; import com.ch_linghu.fanfoudroid.TwitterApplication; public interface ImageCache { public static Bitmap mDefaultBitmap = ImageManager.drawableToBitmap(TwitterApplication.mContext.getResources().getDraw...
Java
/* * Copyright (C) 2009 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...
Java
package com.ch_linghu.fanfoudroid.data; import android.database.Cursor; public interface BaseContent { long insert(); int delete(); int update(); Cursor select(); }
Java
package com.ch_linghu.fanfoudroid.data; import com.ch_linghu.fanfoudroid.fanfou.DirectMessage; import com.ch_linghu.fanfoudroid.fanfou.User; import com.ch_linghu.fanfoudroid.util.TextHelper; public class Dm extends Message { @SuppressWarnings("unused") private static final String TAG = "Dm"; public...
Java
package com.ch_linghu.fanfoudroid.data; import java.util.Date; import android.os.Parcel; import android.os.Parcelable; public class User implements Parcelable { public String id; public String name; public String screenName; public String location; public String description; public String profil...
Java
package com.ch_linghu.fanfoudroid.data; import java.util.Date; public class Message { public String id; public String screenName; public String text; public String profileImageUrl; public Date createdAt; public String userId; public String favorited; public String truncated; public St...
Java
package com.ch_linghu.fanfoudroid; import java.util.ArrayList; import java.util.List; import android.app.ActivityManager; import android.app.ActivityManager.RunningServiceInfo; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import and...
Java
package com.ch_linghu.fanfoudroid; import java.text.ParseException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.graphics.B...
Java
/* * Copyright (C) 2009 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 agree...
Java
package com.ch_linghu.fanfoudroid; import java.text.MessageFormat; import java.util.List; import android.content.Intent; import android.os.Bundle; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.View; import android.widget.AdapterView; import android.widget.Adapte...
Java
package com.ch_linghu.fanfoudroid; import java.text.MessageFormat; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; import android.app.ProgressDialog; import android.content.ContentValues; import android.content.DialogInterface; import android.content.Intent; import a...
Java
package com.ch_linghu.fanfoudroid.dao; import java.util.List; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.text.TextUtils; import android.util.Log; import com.ch_linghu.fanfoudroid.dao.SQLiteTemplat...
Java
package com.ch_linghu.fanfoudroid.dao; import java.util.ArrayList; import java.util.List; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** * Database Helper * * @see SQLiteDatabase */ public ...
Java
package com.ch_linghu.fanfoudroid.db2; import android.content.Context; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; import com.ch_linghu.fanfoudroid.db2.FanContent.*; public class FanDatabase { priva...
Java
package com.ch_linghu.fanfoudroid.db2; import java.util.zip.CheckedOutputStream; import android.R.color; public abstract class FanContent { /** * 消息表 消息表存放消息本身 * * @author phoenix * */ public static class StatusesTable { public static final String TABLE_NAME = "t_statuses"...
Java
package com.ch_linghu.fanfoudroid.db2; import java.util.ArrayList; import java.util.Arrays; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; /** * Wrapper of SQliteDatabse#query, OOP style. * * Usage: * ----------------...
Java
package com.ch_linghu.fanfoudroid.http; import java.util.HashMap; import java.util.Map; public class HTMLEntity { public static String escape(String original) { StringBuffer buf = new StringBuffer(original); escape(buf); return buf.toString(); } public static void escape(StringBuf...
Java
package com.ch_linghu.fanfoudroid.http; /** * HTTP StatusCode is not 200 */ public class HttpException extends Exception { private int statusCode = -1; public HttpException(String msg) { super(msg); } public HttpException(Exception cause) { super(cause); } public HttpE...
Java
package com.ch_linghu.fanfoudroid.http; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse...
Java
package com.ch_linghu.fanfoudroid.http; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.util.ArrayList; import java.util.zip.GZIPInputStream; impor...
Java
/* * Copyright (C) 2009 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 agree...
Java
/* * Copyright (C) 2009 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 agree...
Java
/* * Copyright (C) 2009 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 agree...
Java
package com.ch_linghu.fanfoudroid.ui.base; import android.app.ListActivity; /** * TODO: 准备重构现有的几个ListActivity * * 目前几个ListActivity存在的问题是 : * 1. 因为要实现[刷新]这些功能, 父类设定了子类继承时必须要实现的方法, * 而刷新/获取其实更多的时候可以理解成是ListView的层面, 这在于讨论到底是一个"可刷新的Activity" * 还是一个拥有"可刷新的ListView"的Activity, 如果改成后者, 则只要在父类拥有一个实现了可刷新接口的ListVi...
Java