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
#Description of JSON object | |
{hires:[ | |
{company:xxx1, employee:yyy1, salary:zzz1}, | |
{company:xxx2, employee:yyy2, salary:zzz2}, | |
{company:xxx3, employee:yyy3, salary:zzz3} | |
]} | |
to get the salary of employee#2 | |
GET /hires/1/salary |
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
angular.module('startup.directives.decision', []) | |
.directive('decisionMaker', ['simulatePushChannel', function (simulatePushChannel) { | |
return{ | |
restrict: 'E', | |
templateUrl: 'views/directives/decision.html', | |
scope: { | |
runId:"=", | |
roles:"=", | |
founderName:"=", |
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
var myModule = angular.module(...); | |
myModule.directive('namespaceDirectiveName', function factory(injectables) { | |
var directiveDefinitionObject = { | |
restrict: string, | |
priority: number, | |
template: string, | |
templateUrl: string, | |
replace: bool, | |
transclude: bool, |
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
'use strict'; | |
angular.module('simulateApp') | |
.controller('InstructorGameBoardCtrl', ['$scope', '$rootScope', 'NEWS', '$timeout', 'GameCharacter', 'Chat', 'gameBoardData', 'Data', 'players', '$location', 'DecisionsDataAnalyzer', 'Timer', 'GameStateManagement', '$route', function ($scope, $rootScope, NEWS, $timeout, GameCharacter, Chat, gameBoardData, Data, players, $location, DecisionsDataAnalyzer, Timer, GameStateManagement, $route) { | |
$rootScope._pageTitle = 'Gameboard'; | |
var newsToMerge; | |
var newestFirst = function (a, b) { | |
return b.date - a.date; |
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
var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], | |
today = new Date(), | |
msg = 'Today is ' + days[today.getDay()] + ', ' + today.getDate(); | |
alert(msg); | |
////////////////////////////////////////////////////////////////// | |
(function () { |
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
<w-accordion> | |
<w-accordion-group ng-repeat="(founder, founderData) in founders" is-open="$first"> | |
<w-accordion-heading> | |
<div class="pull-right"> | |
<span class="label label-success">{{founderData.counts.investment}} Investor(s)</span> | |
<span class="label label-success">{{founderData.counts.hire}} Employee(s)</span> | |
</div> | |
<img ng-src="{{founderData.roleDesc.avatar}}"> {{founder}} | |
</w-accordion-heading> |
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
Timer.prototype.start = function() { | |
var self = this; | |
(function countdown() { | |
if (self.count > 0) { | |
var m = Math.floor(self.count / 60); | |
var s = self.count % 60; | |
self.onTick(formatTime(m),formatTime(s)); | |
self.count = self.count - 1; | |
$timeout(countdown, 1000); | |
} |
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
'use strict'; | |
//make assumption that players S1-S6 exist | |
describe('Macrosim Homepage', function() { | |
beforeEach(function(){ | |
//login to macrosim | |
browser.get('http://localhost:4444/simulate/lldev/macrosim/simulation/#/login'); |
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
#! /usr/bin/python | |
__author__ = "Maarten Sap" | |
__email__ = "maartensap93@gmail.com" | |
__version__ = "0.3" | |
""" | |
TODOs: | |
pull retweeted message as well as original |
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 MySQLdb | |
import time | |
import sys | |
import logging | |
class MySQLdbSession: | |
def __init__(self, mysqldb_connect_params, max_reconnect_attempts=5, pause_between_attempts=1, is_ss=False): | |
self.mysqldb_connect_params = mysqldb_connect_params | |
self.reconnect_attempts = 0 |
OlderNewer