Skip to content

Instantly share code, notes, and snippets.

View jpelgrim's full-sized avatar

Johan Pelgrim jpelgrim

View GitHub Profile
@jpelgrim
jpelgrim / main.dart
Last active December 12, 2021 00:04
// Copyright 2019 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
import 'package:flutter/material.dart';
const initialMatrix = [
[4, 6, 5, 8, 1, 3, 7, 6, 3, 7],
[3, 2, 7, 7, 8, 7, 4, 3, 5, 5],
[4, 5, 2, 5, 6, 1, 1, 1, 8, 3],
[3, 1, 2, 8, 1, 2, 5, 8, 8, 8],
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ListFragment;
import android.view.View;
import android.widget.AbsListView;
public class FrozenListFragment extends ListFragment {
private static final String ARG_Y = "y";
@jpelgrim
jpelgrim / new_gist_file
Created September 9, 2013 05:01
Singleton with an init method taking an Android Application object
public class MySingleton {
static final Object mLock = new Object();
static MySingleton mInstance;
private Context mContext;
// Private constructor prevents instantiation from other classes
private MySingleton() { }