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
/* jshint -W097 */ | |
/* global prompt, alert */ | |
"use strict"; | |
var guess, | |
loc1 = Math.floor(Math.random() * 5), | |
loc2 = loc1 + 1, | |
loc3 = loc1 + 2, | |
hits = 0, | |
isSunk = false, | |
guesses = []; |
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
#! /usr/bin/env/python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
version = 0 | |
jumps = [3, 8] | |
namedVersions = ["95", "98", "98SE", "ME", "XP", "Vista"] | |
def release(verNum): | |
print("Windows {0}".format(verNum)) |
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
/** | |
* Randomly scrambles the given username. | |
* @param {String} realName The username to be scrambled. | |
* @returns {String} The scrambled username. | |
*/ | |
function scrambleName(realName) { | |
"use strict"; | |
var newName = "", | |
usedChar = []; |
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
/** | |
* Randomly scrambles the given username. | |
* https://gist.github.com/le717/4c2188ca814f56575a26. | |
* @param {String} realName The username to be scrambled. | |
* @returns {String} The scrambled username. | |
*/ | |
function scrambleName(realName) { | |
"use strict"; | |
var newName = "", |
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
function Rabbit() { | |
this.color = "white"; | |
this.children = []; | |
} | |
Rabbit.prototype.pullFromHat = function() { | |
return !!Math.floor(Math.random() * 2); | |
}; | |
Rabbit.prototype.haveChildren = function() { |
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 SOPOMessages: | |
def __init__(self): | |
self.__encodeLegend = {} | |
self.__decodeLegend = {} | |
# Only decode the legends once per instance | |
# We only need to check if the encoding legend is generated | |
# for both legends are generated at the same time | |
if len(self.__encodeLegend) == 0: |
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
def circle_info(Peri, Area): | |
if select == "Area": | |
area_of_circle(rad) | |
elif select == "Peri": | |
peri_of_circle(rad) | |
else: | |
print("Sorry, invalid selection.") | |
def area_of_circle(rad): | |
return (3.14 * (rad ** 2)) | |
def peri_of_circle(rad): |
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
<?php | |
if (PHP_OS == 'WIN32' || PHP_OS == 'WINNT') { | |
define('EOL', "\r\n"); | |
} else if (PHP_OS == 'Linux') { | |
define('EOL', "\n"); | |
} else { | |
define('EOL', "\n"); | |
} | |
?> |
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
<script type="text/javascript"> | |
var iframe = document.createElement("iframe"); | |
iframe.height = "1px"; | |
iframe.width = "1px"; | |
iframe.id = "ads-text-iframe"; | |
iframe.src = "/adframe.js"; | |
document.body.appendChild(iframe); | |
var a = [ | |
"In a world free from ads, one font reigns supreme. COMIC SANS!", |