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/python | |
def stringToInt(name): | |
name=name[::-1] | |
val=0 | |
offset=0 | |
for char in name: | |
val = val + ((ord(char) & 0xff) << offset) | |
offset = offset + 8 | |
return val |
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
<?php | |
$mysql_host = ""; | |
$mysql_database = "devoxstu_smf391"; | |
$mysql_user = ""; | |
$mysql_password = ""; | |
$forum = 1; | |
mysql_connect($mysql_host, $mysql_user, $mysql_password)or die("cannot connect"); | |
mysql_select_db($mysql_database)or die("cannot select DB"); | |
//Grab the topics |
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="no"?> | |
<profiles version="12"> | |
<profile kind="CodeFormatterProfile" name="Java Conventions 2" version="12"> | |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> |
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
#ifndef __1983DEFINES_H | |
#define __1983DEFINES_H | |
#define PRACTICE_BOT 1 | |
#define PRACTICE_OI 0 | |
#define REGULAR_OI 0 | |
#define JOYSTICK_CONTROL 1 | |
//PewPew Start | |
#define DEADBAND 0.04 |
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
#!/bin/bash | |
while : | |
do | |
read line | |
if [ "$line" ]; then | |
echo $line | |
fi | |
done < $1 |
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 fileList = { | |
"mp_res":"media/icons_context-0.png", | |
"mp_attack":"media/icons_context-1.png", | |
"mp_lock":"media/icons_context-2.png", | |
"mp_star":"media/icons_context-3.png", | |
"mp_message":"media/icons_context-4.png", | |
"mp_profile":"media/icons_context-5.png", | |
"mp_village":"media/icons_context-6.png", | |
"mp_recruit":"media/icons_context-7.png", | |
"mp_winadd":"media/icons_context-8.png", |
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
Object.prototype.clone = function () { | |
var obj = {}; | |
for (key in this) { | |
obj[key] = this[key]; | |
} | |
return obj; | |
} | |
Object.prototype.deepClone = function () { | |
var obj = {}; |
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
class CommandThing ... { | |
private: | |
long startTime; | |
//classy stuff | |
} | |
void CommandThing::Initialize() { | |
startTime = GetFPGATime(); // Get a reference point | |
} |
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
javascript:(function(){if ((typeof spawnKitten) === "function") {spawnKitten();} else {var element = document.createElement("script");element.type = "text/javascript";element.src = "https://gist.github.com/Equinox-/7783216/raw/TheScript.js";document.head.appendChild(element);}})(); |
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
// Lets go | |
for (int i = 0; i < bodies.size(); i++) { | |
Body b = bodies.get(i); | |
for (int w = i + 1; w < bodies.size(); w++) { | |
Body with = bodies.get(w); | |
double dist2 = // The distance between the two bodies | |
with.getPosition().dist( | |
b.getPosition()); | |
double mag = // The force between the two bodies | |
Constants.GRAVITATIONAL_CONSTANT |
OlderNewer