This file contains 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.actforex.nst | |
import java.util.concurrent.{CancellationException, Executors, FutureTask, Callable} | |
import scala.concurrent.{ExecutionContext, Future} | |
import ExecutionContext.Implicits.global | |
trait CancelForFuture { | |
def cancel(mayInterruptIfRunning:Boolean):Boolean | |
} |
This file contains 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 android.app.Activity | |
import android.widget.TextView | |
import android.os.Bundle | |
import android.provider.ContactsContract | |
import android.content.ContentResolver | |
import android.database.Cursor | |
import android.util.Log | |
class MainActivity extends Activity { |
This file contains 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 sbt._ | |
import sbt.Keys._ | |
import android.Keys._ | |
object JavaAndroidBuild extends Build { | |
lazy val rootSettings = Seq( | |
packageT in Compile <<= packageT in Android in app3, | |
packageRelease <<= packageRelease in Android in app3, | |
packageDebug <<= packageDebug in Android in app3 |
This file contains 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.example.jeremybell.myapplication | |
import android.app.Activity | |
import android.os.Bundle | |
import android.view.Menu | |
import android.view.MenuItem | |
class MyActivity extends Activity { | |
override def onCreate(savedInstanceState: Bundle): Unit = { | |
super.onCreate(savedInstanceState) |
This file contains 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
/* | |
* to run from console: | |
* $scala DuplicatesFinder.scala /path/to/android/project | |
*/ | |
import java.io.File | |
import scala.xml._ | |
val folder = args(0) | |
val project = new File(folder) |
This file contains 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
apply plugin: 'java' | |
apply from: 'provided.gradle' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
provided group: 'org.projectlombok', name: 'lombok', version:'1.14.8' | |
} |
This file contains 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
brew install ivy | |
ivy -retrieve "lib/[artifact].[ext]" |
This file contains 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
#!/bin/bash | |
# prerequisites | |
apt-get install openjdk-7-jdk | |
NEXUS_DIR=/opt/nexus | |
mkdir -p $NEXUS_DIR | |
curl -L http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz | tar -xzv --strip 1 -C $NEXUS_DIR |
This file contains 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
//To compile: | |
//cc vlcsms.c -o vlcsms -lvlc | |
//This source is by Tim Sheerman-Chase and it is released as public domain. | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <inttypes.h> | |
#include <vlc/vlc.h> |
This file contains 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
/** | |
* Copyright 2013 John Smith | |
* | |
* This file is part of Jewelsea Tic-Tac-Toe. | |
* | |
* Jewelsea Tic-Tac-Toe is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |