Skip to content

Instantly share code, notes, and snippets.

@mekhami
mekhami / rsvp.js
Last active February 27, 2016 19:28
/home/lvanderpool/Projects/angular-wedding/node_modules/mongoose/lib/utils.js:419
throw err;
^
TypeError: object is not a function
at model.RsvpSchema.virtual.set.unconfirmed (/home/lvanderpool/Projects/angular-wedding/models/rsvp.js:22:2)
at model.EventEmitter.emit (events.js:117:20)
at handleSave (/home/lvanderpool/Projects/angular-wedding/node_modules/mongoose/lib/model.js:129:10)
at /home/lvanderpool/Projects/angular-wedding/node_modules/mongoose/lib/utils.js:414:16
at /home/lvanderpool/Projects/angular-wedding/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js:347:9
at Server.Base._callHandler (/home/lvanderpool/Projects/angular-wedding/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
function RsvpDetailController ($scope, $routeParams, $location, rsvpDS) {
$scope.rsvp = {};
$scope.status;
getRsvp();
function getRsvp() {
rsvpDS.getRsvpById($routeParams.id)
.success(function(rsvp) {
angular.merge($scope.rsvp, rsvp);
.factory('rsvpDataService', ['$http', function($http) {
var service = {};
service.getAllRsvp = function() {
return $http.get('/api/rsvps/');
};
service.getRsvp = function(code) {
return $http.get('/api/rsvps/code/'+code.toUpperCase());
};
Dungeon Crawl Stone Soup version 0.17.0 (tiles) character file.
Mek the Nimble (Spriggan Enchanter) Turns: 25011, Time: 01:29:24
Health: 76/77 AC: 5 Str: 7 XL: 14 Next: 2%
Magic: 32/32 EV: 31 Int: 22 God: Ashenzari [*****.]
Gold: 758 SH: 8 Dex: 19 Spells: 4 memorised, 30 levels left
rFire . . . SeeInvis + F - +2 dagger "Hizyssor" {speed, rC+ Int+4} (curse)
rCold + . . Clarity + b - +2 robe (curse)
Dungeon Crawl Stone Soup version 0.17.0 (tiles) character file.
68296 Mek the Nimble (level 14, -1/71 HPs)
Began as a Spriggan Enchanter on Dec 14, 2015.
Was the Champion of Ashenzari.
Slain by a thrashing horror (9 damage)
... on level 1 of the Abyss on Dec 15, 2015.
The game lasted 02:00:49 (33131 turns).
Mek the Nimble (Spriggan Enchanter) Turns: 33131, Time: 02:00:49
def random_player():
if random.randint(0,1) == 0:
return 'x'
else:
return 'y'
player1 = random_player()
if player1 = 'x':
player2 = 'y'
else:
class Board():
def __init__(self):
self.board = self.create_board()
def is_finished(self):
return self.board.length == 9
def is_won(self):
return winner(self.board.length)
! Compile xft: Attempt to find a visual with the given bit depth; option -depth.
! URxvt*depth: bitdepth
! Compile xft: Turn on/off double-buffering for xft (default enabled). On some card/driver combination enabling it slightly decreases
! URxvt*buffered: boolean
! Create the window with the specified X window geometry [default 80x24]; option -geometry.
! URxvt*geometry: geom
! Use the specified colour as the windows background colour [default White]; option -bg.
from django.db import models
# Create your models here.
class Legislator(models.Model):
PARTIES = (
('R', 'Republican'),
('D', 'Democrat'),
('I', 'Independent'),
('G', 'Green'),
class Matrix(object):
def __init__(self, width, height):
self.width = width
self.height = height
self.matrix = []
for x in range(self.height):
self.matrix.append(['.'*self.width])
def __str__(self):
rows = [x for x in self.matrix]