Skip to content

Instantly share code, notes, and snippets.


Alex K a613

View GitHub Profile
a613 /
Last active Sep 11, 2015
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();
a613 / copyright.txt
Last active May 20, 2022
Maze Solver in Python
View copyright.txt
a613 / AutoDestruct
Last active Aug 29, 2015
Renewable timer
View AutoDestruct
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.