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
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="https://gist.githubusercontent.com/sujoyu/d3a187ee3b30a2f2009f/raw/5a1e111f77ae49c8173fc8574738eb9e8c3cd312/balloon-annotation.css"> | |
</head> | |
<body> | |
<br /> | |
<div class="balloon-annotation"> | |
annotation legend. | |
<p class="balloon-annotation-body">annotation body! FOOOOOOOO!!</p> | |
</div> |
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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.EventSystems; | |
using System.Linq; | |
public class Closer : MonoBehaviour, IPointerClickHandler { | |
public int ancestorLevel = 0; | |
public void OnPointerClick(PointerEventData data) { |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
// Static singleton class. | |
// There is no necessary to access this class directly. | |
public class EventManager { | |
private static Dictionary<GameEvent, List<WeakReference>> listeners = | |
new Dictionary<GameEvent, List<WeakReference>>(); |
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
using System; | |
public class EnumLikeJava { | |
public static readonly EnumLikeJava enum1 = new EnumLikeJava("enum1", (s) => s + "foo"); | |
public static readonly EnumLikeJava enum2 = new EnumLikeJava("enum2", (s) => s + "bar"); | |
public static readonly EnumLikeJava enum3 = new EnumLikeJava("enum3", (s) => s + "baz"); | |
public readonly string Field; | |
public readonly Func<string, string> _method; |
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
object Main { | |
def main(args:Array[String]) = { | |
val sc = new java.util.Scanner(System.in) | |
val n, a = sc.nextInt | |
val x = List.fill(n)(sc.nextInt) | |
val nx = (a :: x).max * n | |
val dpMemo = collection.mutable.ArrayBuffer.fill(n + 1, n + 1, nx + 1)(-1L) | |
def dp(j: Int, k: Int, s: Int): Long = { |
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 scala.util.parsing.combinator._ | |
import scala.language.postfixOps | |
object Main { | |
def main(args:Array[String]) = { | |
val sc = new java.util.Scanner(System.in) | |
val input = collection.mutable.ListBuffer[String]() | |
while(sc.hasNextLine) { | |
input += sc.nextLine |
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
WIN_USER=john | |
LINUX_ROOT="C:\\Users\\$WIN_USER\\AppData\\Local\\lxss\\" | |
alias wcmd=to_win_path | |
to_win_path() { | |
join_by() { local IFS="$1"; shift; echo "$*"; } | |
local IFS narg arg dirnames | |
narg=() |
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
var reader = new Reader(10); | |
var input = {}; | |
reader.read(function(line) { | |
var vars = line.split(' ') | |
input.m = parseInt(vars[0]); | |
input.n = parseInt(vars[1]); | |
}).then(reader.read(function(line) { | |
input.o = line; | |
})).then(function() { | |
input.xs = []; |
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() { | |
function ios_ver (){ | |
var ios_ua = navigator.userAgent; | |
if( ios_ua.indexOf("iPhone") > 0 ) { | |
ios_ua.match(/iPhone OS (\w+)/g); | |
var version = RegExp.$1.split("_")[0]; | |
return version; | |
} | |
} | |
if (ios_ver() === '10') { |
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
package poc | |
import org.scalajs.dom | |
import scala.scalajs.js | |
import scala.scalajs.js.annotation.JSExport | |
@js.native | |
object WorkerGlobal extends js.GlobalScope { | |
def addEventListener(`type`: String, f: js.Function): Unit = js.native |
OlderNewer