For fun, I recreated a subset of Flutter that is enough to build a tiny Minesweeper application for the terminal.
Here is how it looks:
+----------------------+
|Minesweeper 3/12|
| |
/** | |
* Helper class for handling ISO 8601 strings of the following format: | |
* "2008-03-01T13:00:00+01:00". It also supports parsing the "Z" timezone. | |
*/ | |
public final class Iso8601 { | |
/** Transform Calendar to ISO 8601 string. */ | |
public static String fromCalendar(final Calendar calendar) { | |
Date date = calendar.getTime(); | |
String formatted = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") | |
.format(date); |
import retrofit.Call | |
import retrofit.Callback | |
import retrofit.Response | |
import retrofit.Retrofit | |
/** | |
* @author Alex Facciorusso | |
* @since 06/11/15 | |
*/ |
mkdir source | |
mkdir bin | |
# clone source | |
cd source | |
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/libselinux | |
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/core | |
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/zlib | |
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/extras |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
public class FlipPageViewTransformer implements ViewPager.PageTransformer { | |
@Override | |
public void transformPage(View page, float position) { | |
float percentage = 1 - Math.abs(position); | |
page.setCameraDistance(12000); | |
setVisibility(page, position); | |
setTranslation(page); |
// Copyright 2014 The Flutter 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 'dart:math' as math; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
// For testing |
Remove osxfuse if installed via homebrew: | |
> brew uninstall osxfuse | |
Install osxfuse binary and choose to install the MacFUSE compatibility layer: | |
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files | |
Reboot (optional but recommended by osxfuse) | |
Install ntfs-3g via homebrew: | |
> brew update && brew install ntfs-3g |
matrix: | |
include: | |
- os: linux | |
language: android | |
licenses: | |
- 'android-sdk-preview-license-.+' | |
- 'android-sdk-license-.+' | |
- 'google-gdk-license-.+' | |
android: | |
components: |
package net.kristopherjohnson.util; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; | |
import java.util.TimeZone; | |
/** | |
* Methods for dealing with timestamps |