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
#include<stdlib.h> | |
#include<stdio.h> | |
#include<string.h> | |
struct list_node { | |
char* name; | |
int age; | |
struct list_node* previous; | |
struct list_node* next; | |
}; |
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
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
/* List Node: */ | |
template <class T> | |
class MyNode { |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Linked List</title> | |
<script type="text/javascript"><!-- | |
function ListNode(data) { | |
this.data = data; | |
this.next = null; | |
this.previous = null; |
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
#!/usr/bin/env lua | |
function february(year) | |
if year == nil or year == "context" then year = os.date("%Y"); end | |
if year%4==0 and (year%100~=0 or year%400==0) then | |
return 29 | |
else | |
return 28 | |
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
Array.prototype.reduce = function (c) { | |
if(null === this || void 0 === this) { | |
throw new TypeError("O is null or undefined"); | |
} | |
var a = 0, | |
d = this.length >> 0, | |
b; | |
if("function" !== typeof c) { | |
throw new TypeError("1st arg is not callable"); | |
} |
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
String.prototype.enlolcrypt2 = function () { | |
var cipher = "aeoiubcdfghjklmnpqrstvwxyz"; | |
return this.split("").map(function (T) { | |
var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
if (/[^a-z]/.test(T)) { return T; } | |
if (/[aeoiu]/.test(T)) { | |
T = cipher[(i+2)%5]; | |
} else { | |
T = cipher[(i+5)%21+5]; |
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
String.prototype.enlolcrypt2 = function () { | |
var cipher = "aeoiubcdfghjklmnpqrstvwxyz"; | |
return this.split("").map(function (T) { | |
var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
if (/[^a-z]/.test(T)) { return T; } | |
if (/[aeoiu]/.test(T)) { | |
T = cipher[(i+2)%5]; | |
} else { | |
T = cipher[(i+5)%21+5]; |
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
String.prototype.enlolcrypt2 = function () { | |
var cipher = "aeoiubcdfghjklmnpqrstvwxyz"; | |
return this.split("").map(function (T) { | |
var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
if (/[^a-z]/.test(T)) { return T; } | |
if (/[aeoiu]/.test(T)) { | |
T = cipher[(i+2)%5]; | |
} else { | |
T = cipher[(i+5)%21+5]; |
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 attack = function (to) { | |
var user = to || Object.keys(bot.users)[Math.floor(Object.keys(bot.users).length * Math.random())]; | |
var attack = attacks[Math.floor(attacks.length * Math.random())]; | |
return attack.replace(/\{defender\}/g, user) | |
.replace(/\{attacker\}/g, bot.caller) | |
.replace(/{year}/g, Math.round(Math.random() * 10000) + (Math.random() * 100 < 35 ? "BC" : "")); | |
}; |
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 ghetto = function(str, part) { | |
var gTable = ghettoTable; | |
return str.split(" ").map(function(T) { | |
function tr(U) { | |
return gTable[U.toLowerCase()] || U | |
} | |
if(part === true) { | |
return T.length < 5 ? T : T.substring(0, Math.ceil(T.length * 0.75)) + "-" + T.substring(Math.ceil(T.length * 0.75)).split("").map(tr).join("") | |
}else { | |
return T.split("").map(tr).join("") |
OlderNewer