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
int i = 3; | |
if (i<001) { | |
console.log("My fifth gist."); | |
} else { | |
console.log("My first gist."); | |
} |
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
#Quadratic formula import, Python 3.6 | |
#C272, 2018 | |
from math import * | |
def solveQuad(a,b,c): | |
a = float(a) | |
b = float(b) | |
c = float(c) | |
rootb = sqrt(b) |
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
# The shittiest sorting algorithm on planet earth. | |
# @Poltroon @C272 | |
from random import shuffle | |
arr = [0,12,99,13,17,19,6] | |
#Searching. | |
done = "false" | |
pnum = 0 | |
while (done=="false"): |
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
//Including SDL and standard headers. | |
//Note that you'll have to include all the libraries and include paths, | |
//and on Windows include a copy of SDL.dll and SDL_image.dll in the application directory. | |
#include <SDL.h> | |
#include <SDL_image.h> | |
#include <stdio.h> | |
#include <string> | |
//Predefining functions/variables. | |
SDL_Surface* loadPNGSurface(std::string); |
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
public static class StringExtensions { | |
//Returns the string, if JSON, as a pretty printed string. | |
public static string PrettyPrint(this string d) | |
{ | |
IList<string> actionLines = d.SplitAndKeepDelimiters('{', '}', ','); | |
string s = ""; | |
//Write per line, leave space between each action. | |
int tabDepth = 0; |
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(ctx, args) | |
{ | |
//ca = call arguments, r = response, ezs = ez index. | |
var ca={},r | |
var strs = "open unlock release 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97".split(" ") | |
//initially call func to get response. | |
function c() { | |
r = args.t.call(ca) | |
} |
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(ctx, args) | |
{ | |
//ca = call arguments, r = response, ezs = ez index. | |
var ca={},r,i | |
var ez = "open unlock release".split(" ") | |
, p = "2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97".split(' ') | |
//initially call func to get response. | |
function c() { | |
r = args.t.call(ca) |
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 JSON = "{someObj:{someNested:\"\"}}"; | |
dynamic arr = JObject.Parse(JSON); //JArray.Parse() for arrays | |
foreach (dynamic token in arr) | |
{ | |
JTokenType type = ((JToken)token.value).Type; | |
switch (type) | |
{ | |
case JTokenType.String: |
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
/// <summary> | |
/// Formats a given string into pretty print XML. | |
/// </summary> | |
private string FormatXml(string xml) | |
{ | |
try | |
{ | |
XDocument doc = XDocument.Parse(xml); | |
//Get the string representation out. |
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
TF2 MVM POP FILE KEYWORDS LIST | |
by sigsegv | |
accurate as of TF2 20171214a | |
note that some valid keywords listed in this document may be vestigial and do nothing in the current game | |
Base KeyValues Format "Directives" | |
================================== | |
#include "file" | |
#base "file" |
OlderNewer