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 Node { | |
public int value; | |
public Node left, right; | |
public Node(int value, Node left, Node right) { | |
this.value = value; | |
this.left = left; | |
this.right = right; | |
} | |
} |
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
<html> | |
<body> | |
<div id="container01"></div> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/16.4.0/umd/react.production.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.4.0/umd/react-dom.production.min.js"></script> | |
<script> | |
/*! | |
* MonthSelector v1.0.0 | |
* MIT Licensed | |
*/ |
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
var options = { | |
style: { | |
container: { | |
background: 'rgb(236, 240, 241)', | |
padding: 10, | |
borderRadius: 10 | |
}, | |
weekContainer: { | |
marginTop: 10, | |
borderRadius: 10 |
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
const options = jsyaml.load(` | |
--- | |
style: | |
container: | |
background: rgb(236, 240, 241) | |
padding: 10 | |
borderRadius: 10 | |
weekContainer: | |
marginTop: 10 | |
borderRadius: 10 |
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
String.prototype.swap = function() { return this.replace(/0/g, 'x').replace(/1/g, '0').replace(/x/g, '1'); }; | |
Usage: "00110011".swap(); // Returns output 11001100 |
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
var xor = (a, b) => Boolean(a ^ b); | |
var one = (a, b) => [a && b, xor(a, b), a || b, !(a && !b)]; | |
var two = (a, b, c) => [!((a && b) && (b || c)), xor(a && b, !(b || c))]; | |
var thr = (a, b, c) => [xor(a, !b), !(xor(a, !b) || c), !c && !(xor(a, !b) || c)]; | |
console.log('1.1', one(false, false)); | |
console.log('1.2', one(false, true)); | |
console.log('1.3', one(true, false)); | |
console.log('1.4', one(true, true)); |
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.stanley.nesemu; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
public class CPU { | |
private Rom rom; | |
private Ram ramObj; |
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 xyz.saboteur.pokemongo; | |
import java.util.HashMap; | |
import java.util.Map; | |
import com.pokegoapi.api.pokemon.PokemonType; | |
public enum Type { | |
NORMAL(PokemonType.ROCK, 0.5, | |
PokemonType.GHOST, 0.5, |
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 xyz.saboteur.spigot.util; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import org.bukkit.Bukkit; | |
import org.bukkit.entity.Player; | |
public class ActionBar { | |