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 java.util.ArrayList; | |
import java.util.List; | |
public class PossibleSums { | |
public static List<Sum> getSumsList(final int[] numbersArray) { | |
final List<Sum> returnSumsList = new ArrayList<>(); | |
final int numberOfSums = (int) Math.pow(2, numbersArray.length); | |
for (int i = 1; i < numberOfSums; i++) { | |
final Sum sum = new Sum(); |
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
public java.lang.String toString() { | |
#if ( $members.size() > 0 ) | |
#set ( $i = 0 ) | |
return "{\"$classname\":{" | |
#foreach( $member in $members ) | |
#if ( $i == 0 ) | |
+ "## | |
#else | |
+ ", ## | |
#end |
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
adb connect $(route -n get default | grep gateway | awk '{ print $2 }') |
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
private const val MIN_UPDATE_INTERVAL_MS: Long = 200 | |
private const val MAX_UPDATE_INTERVAL_MS: Long = 1000 | |
class PlayerPositionTracker { | |
private val handlerUpdatePosition = Handler() | |
private val runnableUpdatePosition = Runnable { updatePosition() } | |
var player: Player? = null | |
set(value) { |