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
static String func(int n){ | |
int k = n /2 + 10; | |
int f = 1 - ( n % 2); | |
int s = n %2; | |
int result = (k * f) / 10 + (k * s) % 10; | |
return String.valueOf(result); | |
} |
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
interface Loggable { | |
val logTag: String | |
fun debug(message: String) = Log.d(logTag, message) | |
fun debug(message: String, vararg args: String) = Log.d(logTag, message, args) | |
fun debug(function: () -> String) = logIfEnabled(Log.DEBUG, function) { | |
Log.d(logTag, it) |
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
class Foo { | |
private int mBarHeigh; | |
void foo(){ | |
int d = 0; | |
System.out.println(mBarHeight); | |
} | |
} |