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
function Hello_world_enterprise_edition_version_1_0_1 () { | |
class Enum { | |
constructor(enumeration) { | |
Object.keys(enumeration).forEach(function (enum_key) { | |
this[enum_key] = enumeration[enum_key]; | |
}.bind(this)); | |
} | |
} | |
const types = new Enum({ |
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 (min <= max) { | |
int randNum; | |
if (checkEven.isChecked()){ | |
randNum = RandomNumber.generateEven(max, min); | |
} else if (checkOdd.isChecked()){ | |
randNum = RandomNumber.generateOdd(max, min); | |
} else { | |
randNum = RandomNumber.generate(max, min); | |
} | |
generatedText.setText(randNum + ""); |
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.Random; | |
public class RandomNumbers{ | |
public static int generateOdd(int max, int min) { | |
Random random = new Random(); | |
int num = min / 2 + random.nextInt((max + 1) / 2 - min / 2); | |
return num + 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
o="rps";p o[c=rand(3)],%w{Draw Win Lose}[c.-o.index$_] |
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
n"Draw" |
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 math | |
def f(a): | |
s="KMGT " | |
b=math.floor((len(str(a))-1)/3) | |
return "{0}".format(a/1024**b)+s[b-1]+"B" |
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
function f($a) { | |
$s="KMGT"; | |
$b=floor((strlen($a)-1)/3); | |
return sprintf("%2f",$a/pow(1024, $b)).@$s[$b-1]."B"; | |
} |
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
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
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
def main(): | |
print 0.7 | |
if __name__ == '__main__': | |
main() |