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 | |
include("mainstyle.php"); | |
include("links.php"); | |
mysql_connect ("localhost", "db","password") or die (mysql_error()); | |
mysql_select_db ("db"); | |
$term = $_POST['term']; | |
//$sql = mysql_query("SELECT 'firstname','lastname' FROM users WHERE | |
MATCH('firstname','lastname') AGAINST('%$term%')"); |
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
## Input - can be any length | |
input = 1234567890 | |
## Turn into a list of the input's digits (input should now be [1,2,3, n...]) | |
input = [int(i) for i in list(str(input))] | |
## 1: Generate index pairs that need to be added (i.e. [(0, 1), (1, 2), n...]). Chop off last input digit. | |
## 2: Once we have a list of index int tuples, add the two spots in the input number corresponding to those indexes (i, i+1). | |
## 3: Once we have a list of the added digit pairs, add those from left to right. |
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
## Sample data | |
simplelist = [1, 2, 3, 4, 5] | |
listsample = ['Sam', 'Tyler', 'David', 'AJ'] | |
people = [('Sam', 'Gammon'), ('Tyler', 'Porras'), ('David', 'Rekow'), ('Jackson', 'Harris')] | |
merchandise = { | |
'tshirts': ('SurviveSac T-Shirt', {'price': 5.99, 'orders': 15, 'options': ['small', 'large', 'xlarge']}), | |
'map': ('Field of Play Map', {'price': 3.0, 'orders': 28}), | |
'tickets': ('Ticket to Play', {'price': 5.0, 'orders': 1428}) |
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
import os | |
import logging | |
from mapreduce import context | |
from mapreduce import shuffler | |
from mapreduce import operation | |
from mapreduce import mapreduce_pipeline | |
from google.appengine.ext import db | |
from google.appengine.api import files | |
from google.appengine.ext import blobstore |
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
{ | |
"schema_version": "1.1", | |
"packages": [ | |
{ | |
"name": "AppTools for Sublime", | |
"description": "Run tools in AppEngine Toolkit directly from Sublime.", | |
"author": "Sam Gammon (sgammon)", | |
"homepage": "http://apptools.github.com/integration/sublime", | |
"last_modified": "2012-01-16 13:30:00", | |
"platforms": { |
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($) { | |
var config, cfg, | |
options, | |
methods = { | |
init : function(options) { | |
config = $.extend({ |
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($, window, document, undefined) { | |
// Feature tests shamelessly borrowed from Modernizr... unless Modernizr is available, in which case it is used | |
window._featureTests = {}; | |
prefixes = ' -webkit- -moz- -o- -ms- '.split(' '); | |
omPrefixes = 'Webkit Moz O ms'; | |
cssomPrefixes = omPrefixes.split(' '); | |
domPrefixes = omPrefixes.toLowerCase().split(' '); |
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
fs = require 'fs' | |
path = require 'path' | |
util = require 'util' | |
wrench = require 'wrench' | |
{exec, spawn} = require 'child_process' | |
fixpath = (fragments...) => | |
return path.normalize(path.join(fragments...)) | |
defaults = |
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
from protorpc import messages | |
class GetContentRequest(messages.Message): | |
''' Retrieve a content snippet. ''' | |
snippet_key = messages.StringField(1) | |
snippet_keyname = messages.StringField(2) |
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
import sys | |
if 'lib' not in sys.path: | |
# Add lib as primary libraries directory, with fallback to lib/dist | |
# and optionally to lib/dist.zip, loaded using zipimport. | |
sys.path[0:0] = ['lib', 'lib/dist', 'lib/dist.zip'] | |
class AppBootstrapper(object): |