This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.traviswyatt.example.helpers.terrain; | |
import com.badlogic.gdx.files.FileHandle; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.Pixmap; | |
import com.traviswyatt.example.models.Heightmap; | |
public class HeightmapUtils { | |
public static Heightmap load(FileHandle file) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.traviswyatt.example.models; | |
public class Heightmap { | |
public final int width; | |
public final int height; | |
public final float[] elevations; | |
public final boolean flipY; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-optimizationpasses 5 | |
-dontusemixedcaseclassnames | |
-dontskipnonpubliclibraryclasses | |
-dontpreverify | |
-verbose | |
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | |
-renamesourcefileattribute SourceFile | |
-keepattributes SourceFile,LineNumberTable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.application.Application; | |
import javafx.event.EventHandler; | |
import javafx.print.PrinterJob; | |
import javafx.scene.Scene; | |
import javafx.scene.input.MouseEvent; | |
import javafx.scene.layout.Pane; | |
import javafx.scene.shape.Rectangle; | |
import javafx.stage.Stage; | |
public class PrintTest extends Application { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parse command line arguments for flags (i.e. help and output filename) | |
for (i = 1; i < argc; i++) { | |
if (argv[i][0] == '-') { /* flag */ | |
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) { | |
usage(argv[0]); | |
exit(EXIT_SUCCESS); | |
} | |
if (strcmp(argv[i], "-o") == 0) { | |
if (i >= argc - 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=IF(A1>89,"A",IF(A1>79,"B",IF(A1>69,"C",IF(A1>59,"D","F")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typealias ColorFunction = (currentTimeMillis: Long) -> Int | |
class CustomView : View { | |
val paint = Paint() | |
var colorFunction: ColorFunction? = null | |
override fun onDraw(canvas: Canvas) { | |
super.onDraw(canvas) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.observers.DisposableObserver | |
import io.reactivex.schedulers.Schedulers | |
fun main(args: Array<String>) { | |
val list = listOf(3, 2, 1) | |
val list2 = listOf(1f, 7f, 8f) | |
Observable.fromIterable(list) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Travis Wyatt | |
email = <REDACTED> | |
[alias] | |
co = checkout | |
br = branch | |
st = status | |
wip = !git add --verbose --all && git commit --all --verbose --message='wip' | |
history = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.coroutines.experimental.channels.actor | |
import kotlinx.coroutines.experimental.channels.consumeEach | |
import kotlinx.coroutines.experimental.newSingleThreadContext | |
import kotlinx.coroutines.experimental.runBlocking | |
val threads: Set<Thread> | |
get() = Thread.getAllStackTraces().keys | |
val threadNames: List<String> | |
get() = threads.map { it.name } |
OlderNewer