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
angular.module('atlasApp').service('MapsService', function( | |
$scope, | |
$http, | |
LocationProvider, | |
BusInfoProvider) { | |
var MapsService = {}; | |
MapsService.initMap = function() { | |
console.log('Initializing'); | |
var mapOptions = { |
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
curl -X GET \ | |
-H "X-Parse-Application-Id: FpiNAPH6LROJqpuYHyIG7X1xgQiLcGjECxWZU2ys" \ | |
-H "X-Parse-REST-API-Key: 6Elt7uJH5nG7U4Yc6TKUdxyDjYqfvOKUPtxw2Qbx" \ | |
-G \ | |
--data-urlencode 'where={"term":"201401"}' \ | |
https://api.parse.com/1/classes/Course |
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
curl -X GET \ | |
-H "X-Parse-Application-Id: FpiNAPH6LROJqpuYHyIG7X1xgQiLcGjECxWZU2ys" \ | |
-H "X-Parse-REST-API-Key: 6Elt7uJH5nG7U4Yc6TKUdxyDjYqfvOKUPtxw2Qbx" \ | |
-G \ | |
--data-urlencode 'where={"symbol":"DCH"}' \ | |
https://api.parse.com/1/classes/Place |
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 setPin = function(digits) { | |
for (var i in digits) { | |
document.getElementById("yin"+i).value = digits[i]; | |
} | |
}; | |
setPin([1,2,3,4]); |
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
function selectAllFriendsInInviteDialog() { | |
var people = document.getElementsByClassName('checkbox'); | |
for (var i = 0; i < people.length; i++) | |
people[i].checked = true; | |
} |
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 serveryFilters = angular.module('serveryFilters', []) | |
serveryFilters.filter('dayofweek', function() { | |
return function(input) { | |
// Change this so that it return 'Sun' for input = 0 , 'Mon' for input = 1, .... , 'Sat' for input = 6 | |
// Use the javascript switch statement to do this: http://www.w3schools.com/js/js_switch.asp | |
return input ? '\u2713' : '\u2718'; | |
}; | |
}); |
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
""" | |
Given an input node that connects to a graph, return a deep copy of the node. | |
""" | |
class Node(object): | |
def __init__(self, item): | |
self.item = item | |
self.neighbors = [] |
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
/// <summary> | |
/// Wraps the message in a data packet and delegates to the data retrieval system. | |
/// This command processes all messages intended for the data retrieval system. | |
/// </summary> | |
/// <typeparam name="TMessage">The message type.</typeparam> | |
/// <returns>True upon success.</returns> | |
private VisitorCmd<Boolean, String, Object, ABrokeredMessageHost> DataRetrievalCmd<TMessage>() | |
{ | |
return delegate(ABrokeredMessageHost host, string idx, Object[] inps) | |
{ |
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
if (ModelState.IsValid) | |
{ | |
// Insert a new user into the database | |
using (UsersContext db = new UsersContext()) | |
{ | |
UserProfile user = db.UserProfiles.FirstOrDefault(u => u.UserName.ToLower() == model.UserName.ToLower()); | |
// Check if user already exists | |
if (user == null) | |
{ | |
// Insert name into the profile table |
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
import scala.io.Source | |
object lab1 { | |
def main(args: Array[String]) { | |
val argsInstruction = "Please provide the following 3 arguments: \n" + | |
"\t1. a flag t or b for top down or bottom up allocator respectively\n" + | |
"\t2. an integer >= 2 which specifies the number of registers to use\n" + | |
"\t3. an input file name" | |
if (args.length != 3) |
NewerOlder