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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="SomeFunkyNameHere" type="win32"/> | |
<dependency> | |
<dependentAssembly> | |
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/> | |
</dependentAssembly> | |
</dependency> | |
</assembly> |
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
top ::= "?"? line | "" | |
line ::= (ident "=")? line | expr | |
expr ::= term (("+" | "-") term)* | |
term ::= fact (("*" | "/") fact)* | |
fact ::= "(" expr ")" | |
| ("+" | "-") fact | |
| number | |
| ident | |
number :::= [0-9]+ |
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
/** | |
* オブジェクトのkeyとvalueを反転させる | |
* @param {Object} obj 反転させるオブジェクト | |
* @param {Boolean} [keyIsNumber=false] keyが数値であるか?(数値ならkeyを反転させるとき数値に変換する) | |
* @return {Object} keyとvalueの反転したオブジェクト | |
*/ | |
function inverseObject (obj, keyIsNumber) { | |
return Object.keys(obj).reduceRight(function (ret, k) { | |
return (ret[obj[k]] = keyIsNumber ? parseInt(k, 10) : k, ret); | |
}, {}); |
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
/* | |
PL/0 Compiler for JavaScript v0.1.0 | |
copyright 2013 alucky0707 | |
licensed by http://opensource.org/licenses/MIT | |
*/ | |
/* | |
BNF | |
program = block "." . |
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
// TODO: コメント書け! | |
(function(exports) { | |
var | |
debug = false; | |
function extend(trait, target) { | |
var | |
p; | |
for(p in trait) { | |
target[p] = trait[p]; |
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 | |
async = require('async'), | |
ideone = require('./jsonrpc').createClient('http://ideone.com/api/1/service.json'); | |
var | |
user = 'your user', | |
pass = 'your pass', | |
lang = {'python': 4, 'ruby': 17}['ruby'], | |
src = 'puts "Hello, World!"', | |
input = ''; |
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
module.exports = (function() { | |
/* constructor */ | |
function Search(arr){ | |
if(!(this instanceof Search)) return new Search(arr); | |
this._arr = arr; | |
this._createTable(); | |
} | |
var |
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 main() { | |
var | |
i, j, n, m, x, | |
len = input.length; | |
for(i = 0; i < len; i++) { | |
n = parseInt(input[i], 10); | |
if(n === 0) break; | |
m = ~~(n / 2); | |
for(x = 0, j = 0; primes[j] <= m; j++) { | |
if(primesTable[n - primes[j]]) x++; |
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
@defined_patterns = File.read("defined_patterns.dat", encoding: Encoding::UTF_8).split("\n").map{|s|s.split(":#")} | |
@default_messages = File.read("default_messages.dat", encoding: Encoding::UTF_8).split("\n") | |
def generateReply(inputMessage) | |
matched = [@default_messages[rand @default_messages.length]] | |
@defined_patterns.each do|pattern, result| | |
if inputMessage.index(pattern) | |
matched << result | |
end | |
end |
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
$ node tak.js simple 13 7 0 |