Skip to content

Instantly share code, notes, and snippets.

View a613's full-sized avatar

Adam T a613

  • Calgary, AB, Canada
  • 00:23 (UTC -06:00)
View GitHub Profile
@a613
a613 / AutoDestruct
Last active August 29, 2015 14:02
Renewable timer
import java.util.Timer;
import java.util.TimerTask;
/**
* This is a renewable timer. Begin by calling {@link #arm()}, renew it by
* calling {@link #rearm()}, and cancel it by calling {@link #disarm()}.
*
* @param <T>
* type of object stored and passed to listener.
*/
@a613
a613 / copyright.txt
Last active November 26, 2023 16:41
Maze Solver in Python
@a613
a613 / LocaleSwitchActivity.java
Last active September 14, 2022 08:13
Android activity that uses a custom locale for its duration
public class LocaleSwitchActivity extends Activity {
private static final String LOG_TAG = LocaleSwitchActivity.class.getSimpleName();
private static final String LOCALE_EXTRA = "locale";
private Locale customLocale;
private boolean restartingForLocaleChangeFlag;
protected void useLocale(Locale locale) {
Intent intent = getIntent();