Skip to content

Instantly share code, notes, and snippets.

View brapse's full-sized avatar

Sean Braithwaite brapse

View GitHub Profile
var path = require('path'),
sys = require('sys'),
assert = require('assert'),
events = require('events'),
http = require('http'),
fs = require('fs');
require.paths.unshift(path.join(__dirname, '..', 'lib'));
var vows = require('vows');
aanand: Sean: I am replacing some floated divs with a table. Cool? Cool.
Sean: why?
Sean: jpalardy: what kind of shit are you trying to pull?
aanand: Because the event calendar on the homepage *is* a table. I will admit I withheld this information in the hope that you would have a nervous breakdown.
Sean: yes, thats a table.
jpalardy: tables!Sean: (cap lock)
Sean: PAGINATION IS NOT FUCKING TABULAR
jpalardy: if they created a new tag �~@� let's say <awesome> �~@� which did EXACTLY what <table> does �~@� it would be awesome
jpalardy: without the stigma of <table>, of course
jpalardy: inline (as opposed to block), vertical-centering that works �~@� too good to be true?aanand: You'd need new <tr> and <td> elements too.
Environment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.1.1
Python Version: 2.5.4
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
/Users/brapse/.rvm/gems/ruby-1.9.1-p378/gems/wordnet-0.0.5/lib/wordnet/lexicon.rb:112: [BUG] unknown type 0x22 (0xc given)
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin9.8.0]
-- control frame ----------
c:0007 p:---- s:0028 b:0028 l:000027 d:000027 CFUNC :new
c:0006 p:0183 s:0022 b:0022 l:000021 d:000021 METHOD /Users/brapse/.rvm/gems/ruby-1.9.1-p378/gems/wordnet-0.0.5/lib/wordnet/lexicon.rb:112
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :new
c:0003 p:0041 s:0008 b:0008 l:002604 d:0015ac EVAL build.rb:5
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
"Many puzzle-based adventures suffer from the imbalance of providing more material affordances than
formal affordances. This results in the feeling of having many things to do (places to go, objects to
fiddle with) without having any sense of why any one action would be preferable to another. For
example, Zork Grand Inquisitor offers a rich world to navigate and many objects to collect and
manipulate. Yet, since there is no unity of action, there is no way to relate current actions to the
eventual goal of defeating the Grand Inquisitor. This leaves the player in the position of randomly
wandering about trying strange juxtapositions of objects. This destracts from the sense of agency ..."
Michael Mateas: A preliminary poetics for Interactive Drama and games
var html = function(t_func){
var t = {};
var tag_function = function(tag){
return function(attrs, contents){
var tag_attributes = [];
if(typeof(attrs) == 'object'){
for(var prop in attrs){
if (attrs.hasOwnProperty(prop)){
tag_attributes.push(prop + '="' + attrs[prop] + '"');
htmlizers.merchant = function(product) {
var reviews = product.merchant.review.count;
var ratingValue = product.merchant.review.average;
return $R().td({class: "search_results_bank_summary"}).
table().
tr().
td({width: 25px}).
img({width: 22, height: 22, src: product.merchant.logo}).end();
end().
aanand: Sean: I am replacing some floated divs with a table. Cool? Cool.
Sean: why?
Sean: jpalardy: what kind of shit are you trying to pull?
aanand: Because the event calendar on the homepage *is* a table. I will admit I withheld this information in the hope that you would have a nervous breakdown.
Sean: yes, thats a table.
jpalardy: tables!
Sean: (cap lock)
Sean: PAGINATION IS NOT FUCKING TABULAR
jpalardy: if they created a new tag … let's say <awesome> … which did EXACTLY what <table> does … it would be awesome
jpalardy: without the stigma of <table>, of course
product_format = /(FIXED|ARM)-(\d{1,2})(?:-(REFINANCE|PURCHASE))?(?:-(FHA))?(?:-(JUMBO))?/
product_format_mapping = {:interest_type => 1, :term => 2, :mortgage_type => 3, :fha => 4, :jumbo => 5 }
product_hash = {}
product_format_mapping.map do |field, index|
product_hash[field] = product_string.match(product_format)[index]
end
uniques, duplicates = results.inject([[],[]]) do |buckets, res|
buckets[res['occurrences'] == '1' ? 0 : 1].push(res['id'])
end