text
stringlengths
3
1.18M
package com.totsp.androidexamples; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteStatement; import android.util.Log; import java.util.ArrayList; import java.util.List;...
package org.cyrano.bcol.base; import android.graphics.Canvas; /** * @author Demián Gutierrez */ public interface Box { public int getW(); public int getH(); // ---------------------------------------- public int minX(); public int minY(); // ---------------------------------------- public int m...
package org.cyrano.bcol.base; import java.util.List; import org.cyrano.bcol.base.CollisionDetector.CollisionInfo; /** * @author Demián Gutierrez */ public class UniverseCollisionDetector { private UniverseCollisionDetector() { // Empty } // --------------------------------------------------------------...
package org.cyrano.bcol.base; import android.graphics.Point; import android.graphics.PointF; /** * @author Demián Gutierrez */ public class CollisionDetector { private enum Mark { BEGX, ENDX, BEGY, ENDY } public enum Side { LFT, RGH, TOP, BOT } public enum BoxP { B1_OO_B2, // B1_B2_OO, ...
package org.cyrano.bcol; import java.lang.reflect.Method; /** * @author Demián Gutierrez */ public class Hwh { public static int getW(Object obj) { Class<?> clazz = obj.getClass(); try { Method method = clazz.getMethod("getWidth", new Class<?>[0]); return ((Number) method.invoke(obj, new Obj...
package org.cyrano.bcol; import java.util.ArrayList; import java.util.List; import org.cyrano.bcol.base.CollisionDetector; import org.cyrano.bcol.base.CollisionDetector.CollisionInfo; import org.cyrano.bcol.base.CollisionDetector.Side; import android.content.Context; import android.graphics.Canvas; import android.gr...
package org.cyrano.bcol; import org.cyrano.bcol.base.Box; import android.graphics.Canvas; import android.graphics.Color; /** * @author Demián Gutierrez */ public class BoxImpl implements Box { public boolean/**/mv; public int/* */cx; public int/* */cy; public int/* */bw; public int/* */bh; public i...
package org.cyrano.bcol; import android.app.Activity; import android.os.Bundle; /** * @author Demián Gutierrez */ public class BoxCollisionActivity extends Activity { private CustomDrawView customDrawView; // -------------------------------------------------------------------------------- public void onCre...
package llc.ufwa.unlimitedlist; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import llc.ufwa.activities.injecting.InitilizationAwareApplication; import llc.ufwa.concurrency.DaemonThreadFactory; imp...
package llc.ufwa.unlimitedlist.activities.list; import llc.ufwa.activities.injecting.InjectingDisplay; public interface ListDisplay extends InjectingDisplay { }
package llc.ufwa.unlimitedlist.activities.list; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import llc.ufwa.activities.injecting.AbstractInjectingActivity; import llc.ufwa.activities.inj...
package llc.ufwa.unlimitedlist.activities.list; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executor; import llc.ufwa.concurrency.Callback; import llc.ufwa.concurrency.CallbackFinalizer; import llc.ufwa.concurrency.DefaultCallbackFinalizer; import llc.ufwa.concurrency.WeakC...
package llc.ufwa.unlimitedlist.activities.list; import llc.ufwa.data.beans.IDEqualable; public class ListKey extends IDEqualable { private static final long serialVersionUID = 3356617258566741744L; public ListKey(long id) { super(id); } }
package llc.ufwa.unlimitedlist.activities.list; import java.util.concurrent.Executor; import llc.ufwa.activities.injecting.InjectableController; import llc.ufwa.concurrency.SerialExecutor; public class ListController extends InjectableController<ListDisplay> { public ListController( final Class<List...
package llc.ufwa.unlimitedlist.activities.list; import llc.ufwa.data.exception.ResourceException; import llc.ufwa.data.resource.Converter; import llc.ufwa.unlimitedlist.data.UnlimitedListItem; public class UnlimitedItemSizeConverter implements Converter<UnlimitedListItem, Integer> { @Override p...
package llc.ufwa.unlimitedlist.data; import llc.ufwa.data.beans.IDEqualable; public class UnlimitedListItem extends IDEqualable { private static final long serialVersionUID = -4449706054731910482L; private final byte[] data; public UnlimitedListItem(long id, final byte [] data) { super(id); ...
package llc.ufwa.unlimitedlist; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.conc...
package llc.ufwa.unlimitedlist.loader; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.List; import java.util.Random; import llc.ufwa.data.exception.ResourceException; import llc.ufwa.data.resource.loader.DefaultResourceLoader; import llc.ufwa.unlimitedlist.R; import llc.u...
/** Automatically generated file. DO NOT MODIFY */ package llc.ufwa.unlimitedlist; public final class BuildConfig { public final static boolean DEBUG = true; }
/* * Copyright (C) 2011 The Android Open Source Project * * 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 app...
// // package notorious.rascal.variometer; public interface DataSource { public double getValue(); }
package notorious.rascal.variometer; import android.os.Bundle; import android.os.Handler; import android.os.ParcelFileDescriptor; import android.os.Message; import android.os.SystemClock; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.app.Activity; import android.app.PendingInt...
// // // package notorious.rascal.variometer.audio; import android.content.Context; import android.content.SharedPreferences; import android.media.AudioManager; import android.media.SoundPool; import android.preference.PreferenceManager; import android.util.Log; import notorious.rascal.variometer.*; im...
// // // package notorious.rascal.variometer.util; import java.util.ArrayList; public class PiecewiseLinearFunction { private ArrayList<Point2d> points; private double posInfValue; private double negInfValue; /** * Creates a piecewise linear function from an ArrayList of * j...
// // // package notorious.rascal.variometer.util; import android.graphics.PointF; public class Point2d { public double x; public double y; public Point2d(double x, double y) { this.x = x; this.y = y; } public Point2d(PointF p) { this.x = p.x; ...
// // // package notorious.rascal.variometer.util; public class RegressionSlope { /** * sum of x values */ private double sumX = 0d; /** * total variation in x (sum of squared deviations from xbar) */ private double sumXX = 0d; /** * sum of y values ...
// // // package notorious.rascal.variometer.model; import notorious.rascal.variometer.*; import java.util.ArrayList; import android.util.Log; public class KalmanFilteredVario implements DataSource { public static int KALMAN_VARIO = 1; public static int DAMPED_VARIO = 2; private double mVa...
// // // package notorious.rascal.variometer.model; /** * This class is developed from code released in the public domain here: * https://code.google.com/p/pressure-altimeter/ */ public class KalmanFilter { // The state we are tracking, namely: private double x_abs; // The absolute value of ...
// // // package notorious.rascal.variometer.model; import notorious.rascal.variometer.*; import android.util.Log; public class KalmanFilteredAltitude implements DataSource { public static double STANDARD_SEA_LEVEL_PRESSURE = 101325; //in pascals private double mSeaLevelPressure; private d...
// // // package notorious.rascal.variometer; public interface VarioChangeListener { public void varioChanged(double newVar); }
package is.hi.translator.tests; import is.hi.translator.SimpleTranslator; import is.hi.translator.Translator; import junit.framework.TestCase; public class SimpleTranslatorTest extends TestCase { Translator translator; public void setUp() { translator = new SimpleTranslator(); } public void testWordFound() { ...
package is.hi.translator.tests; import is.hi.translator.R; import is.hi.translator.TranslatorActivity; import android.content.Intent; import android.test.ActivityUnitTestCase; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class TranslatorActivityTest extends Acti...
package is.hi.translator.tests; import android.test.suitebuilder.TestSuiteBuilder; import junit.framework.Test; import junit.framework.TestSuite; public class AllTests extends TestSuite { public static Test suite() { return new TestSuiteBuilder(AllTests.class).includeAllPackagesUnderHere().build(); } }
package is.hi.translator; public interface Translator { public String translate(String word); }
package is.hi.translator; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import org.json.JSONObject; import android.util.Log; public class WebTranslator implements Translator { @Override public String translate(String word) { return urlConnec...
package is.hi.translator; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; import android.os.Bundle; import android.view.View; import android.view.View.OnCli...
package is.hi.translator; import android.app.Application; public class TranslatorApplication extends Application { public static final String tag = "Translator"; }
package is.hi.translator; public class SimpleTranslator implements Translator { public String translate(String word) { if (word.equals("hestur")) { return "horse"; } else { return null; } } }
/** Automatically generated file. DO NOT MODIFY */ package com.sfsucsc780.triviatastic; public final class BuildConfig { public final static boolean DEBUG = true; }
/* * I have used this code to handle shake event detection. I am not the author. * * A working copy was found here, but I have found it throughout the web on many web sites. * https://code.google.com/p/voice-receptor/source/browse/trunk/motorboat/src/dnd/motorboat/shake/ShakeEventListener.java?spec=svn4&r=4 */ ...
/* * This activity is the core of the application. * * A quiz is loaded based on the .putExtra() that is received from * the quiz-selection activity's intent. The activity iterates through all * the questions of the selected quiz until the end is reached. * Once the end is reached, a result is displayed. An "ex...
package com.sfsucsc780.triviatastic; import java.util.Timer; import java.util.TimerTask; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.app.Activity; import android.graphics.Typeface; import android.os.Bundle; import android.os.Handler; import android.os.Message; im...
/* * This database helper class is heavily based on a tutorial found online. * http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ * * I have utilized their basic open/copy/close operations * The content access and adapters are original code, specific to triviatastic's database...
/* * This activity class is simply the intro screen seen * when launching the app. It can either redirect the user * to the quiz selection activity, or the question creation * activity. */ package com.sfsucsc780.triviatastic; import java.io.IOException; import android.app.Activity; import android.content.Intent;...
/* * This activity is the quiz selection screen. * It is responsible for launching the correct quiz by populating * the appropriate data into an intent via .putExtra() * and the handling of unlocking quizzes. * */ package com.sfsucsc780.triviatastic; import android.app.Activity; import java.lang.reflect.Field;...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** Copyright (C) 2011 tiklerx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in t...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** Copyright (C) 2011 tiklerx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in t...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** Copyright (C) 2011 tiklerx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in t...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * See...
package org.example.video; import android.app.Activity; import android.os.Bundle; import android.widget.VideoView; public class Video extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...
package com.TIEmulator; public class Data { public int i; public String s; public Data() { } public Data(int paramInt, String paramString) { this.i = paramInt; this.s = paramString; } }
package com.TIEmulator; import android.content.DialogInterface; import android.content.DialogInterface.OnDismissListener; import android.content.Intent; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.view.View; import android.widget.AdapterView; import androi...
package com.TIEmulator; public class CheckBoxifiedText implements Comparable<CheckBoxifiedText> { private boolean mChecked; private String mText = ""; public CheckBoxifiedText(String paramString, boolean paramBoolean) { this.mText = paramString; this.mChecked = paramBoolean; } pub...
package com.TIEmulator; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.util.Log; import ...
package com.TIEmulator; import android.app.Activity; import java.io.Closeable; import java.io.IOException; class AssetHTMLView { protected static void closeStream(Closeable paramCloseable) { if (paramCloseable != null); try { paramCloseable.close(); return; } catch ...
package com.TIEmulator; public class ModifierKey { private static final int LOCKED = 4; private static final int PRESSED = 1; private static final int RELEASED = 2; private static final int UNPRESSED = 0; private static final int USED = 3; private int mState = 0; public void adjustAfterKeypre...
package com.TIEmulator; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.content.SharedPreferences; import android.con...
package com.TIEmulator.JNI; import java.nio.ByteBuffer; public final class NLib { private static boolean is_shutdown = 0; private static final String lib = "TIEmulator"; private static Object listener = null; public static boolean LoadLib() { int i; try { System.loadLibrary...
package com.TIEmulator.JNI; import java.nio.ByteBuffer; public final class NLib { private static boolean is_shutdown = 0; private static final String lib = "TIEmulator"; private static Object listener = null; public static boolean LoadLib() { int i; try { System.loadLibrary...
package com.TIEmulator.JNI; public abstract interface BaseInterface { public abstract void OnFatalError(String paramString); public abstract void OnPostMessage(String paramString); }
package com.TIEmulator.JNI; public abstract interface NativeEvents extends BaseInterface { public abstract void OnImageUpdate(); public abstract void OnTIEmuStopped(); }
package com.TIEmulator.JNI; public final class CannotBindNLibInterfaceException extends RuntimeException { private static final long serialVersionUID = 1L; public CannotBindNLibInterfaceException(Object paramObject) { super("Cannot bind Object: " + paramObject.toString() + "to any internal Interface...