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
fn select_u32<'a>(a: &'a u32, b: &'a u32, select_a: &'a bool) -> &'a u32 { | |
if *select_a { a } else { b } | |
} | |
const STR_A: &'static str = "A"; | |
const STR_B: &'static str = "B"; | |
fn select_str(s: &str) -> &str { | |
if s.is_empty() { STR_A } else { STR_B } | |
} |
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
window.loadlevel({ | |
name: "Help each other", | |
maxtime: 25, | |
goldtime: 17, | |
map: [ | |
w, w, w, w, w, w, w, w, w, | |
w, w, w, w, w, w, w, w, w, | |
w, o, o, o, c, o, o, o, w, | |
w, o, w, w, U, w, w, w, w, | |
P, o, w, w, o, w, o, o, Z, |
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
#If GetKeyState("CapsLock", "T") = 1 | |
w::SendInput {Ctrl Down}{Shift Down}{Tab Down} | |
w up::SendInput {Ctrl Up}{Shift Up}{Tab Up} | |
r::SendInput {Ctrl Down}{Tab Down} | |
r up::SendInput {Ctrl Up}{Tab Up} | |
a::SendInput {Blind}{Home Down} | |
a up::SendInput {Blind}{Home Up} | |
g::SendInput {Blind}{End Down} | |
g up::SendInput {Blind}{End Up} |
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
/* | |
* Simple script for running emcc on ARToolKit | |
* @author zz85 github.com/zz85 | |
*/ | |
var | |
exec = require('child_process').exec, | |
path = require('path'), | |
fs = require('fs'), |
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
1 CppCon 2015: Bjarne Stroustrup “Writing Good C++14” | |
2 CppCon 2015: Herb Sutter "Writing Good C++14... By Default" | |
3 CppCon 2015: Sean Parent "Better Code: Data Structures" | |
4 CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!" | |
5 CppCon 2015: Eric Niebler "Ranges for the Standard Library" | |
6 CppCon 2015: Vittorio Romeo “Implementation of a component-based entity system in modern C++” | |
7 CppCon 2015: Joel Falcou PART 1 “Expression Templates - Past, Present, Future” | |
8 CppCon 2015: Scott Wardle “Memory and C++ debugging at Electronic Arts” | |
9 CppCon 2015: André Bergner “Faster Complex Numbers” | |
10 CppCon 2015: Louis Dionne “C++ Metaprogramming: A Paradigm Shift" |
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
//https://github.com/drewnoakes/metadata-extractor | |
public class JpegExif { | |
public static void main(String[] args) throws ImageProcessingException, IOException { | |
File file = new File("E:/org_3e1fa47a903c1ccb_1470295646000.jpg"); | |
int w = 4; | |
int h = 3; | |
double rw = 1.0 * w / Math.hypot(w, h); | |
double rh = 1.0 * h / Math.hypot(w, h); |
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
public final static T get(int value) { | |
for (int i = 0; i < values().length; i++) { | |
if (values()[i].value == value) { | |
return values()[i]; | |
} | |
} | |
return null; | |
} |
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
<!DOCTYPE html> | |
<html><head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF8"> | |
<meta name="description" content="URL selfhosting content"> | |
<meta name="keywords" content="self hosting web pages by abusing the url"> | |
<meta name="author" content="MJS 2016-02-25"> | |
<script> | |
LZString=function(){function o(o,r){if(!t[o]){t[o]={};for(var n=0;n<o.length;n++)t[o][o.charAt(n)]=n}return t[o][r]}var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",t={},i={compressToBase64:function(o){if(null==o)return"";var r=i._compress(o,6,function(o){return n.charAt(o)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(e){return o(n,r.charAt(e))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompress |
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
64bit JVM 32bit JVM | |
16 8 new Object() | |
216 216 new char[100] | |
16 16 new Integer(1) | |
24 16 new Long(1) | |
24 16 new Double(1) | |
40 40 new ArrayList() |
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
boolean[] r = new boolean[500]; | |
Arrays.fill(r, false); | |
r[2] = r[3] = r[5] = true; | |
for (int i = 2; i != 100; i++) { | |
if(r[i]) { | |
r[i*2] = r[i*3] = r[i*5] = true; | |
System.out.println(i); | |
} | |
} |
NewerOlder