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
''' | |
1 -> 2 -> 4 | |
/ | |
3 | |
2 is a direct edge to 3. | |
''' | |
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 arrayOfObjects = [ | |
{ | |
name: 'Diana', | |
born: 1373925600000, // Mon, Jul 15 2013 | |
num: 4, | |
sex: 'female' | |
}, | |
{ | |
name: 'Doris', | |
born: 1354412087000, // Sat, Dec 1 2012 |
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
app.controller('HomeController', ['$scope', 'emails', function($scope, emails) { | |
emails.success(function(data) { | |
$scope.emails = data; | |
}); | |
// $scope.emails = [ | |
// { | |
// from: "Shawn Carter", | |
// datetime: 1420816800000, | |
// subject: "Current state of mind", |
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
app.controller('HomeController', ['$scope', function($scope) { | |
$scope.emails = [ | |
{ | |
from: "Shawn Carter", | |
datetime: 1420816800000, | |
subject: "Current state of mind", | |
message: "Yeah I'm out that Brooklyn, now I'm down in Tribeca. Want to check out that new bistro?", | |
unread: 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
app.factory('emails', [function() { | |
var stuff = [ | |
{ | |
from: "Shawn Carter", | |
datetime: 1420816800000, | |
subject: "Current state of mind", | |
message: "Yeah I'm out that Brooklyn, now I'm down in Tribeca. Want to check out that new bistro?", | |
unread: 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
app.controller('MainController', ['$scope', function($scope) { | |
$scope.program = { | |
series: "Sherlock", | |
series_img: "http://placehold.it/300x300", | |
genre: "Crime drama", | |
season: 3, | |
episode: "The Empty Hearse", | |
description: "Two years after his reported Reichenback Fall demise", | |
datetime: new Date(2014, 11, 31, 21, 00, 00) | |
} |
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
varA=input() | |
varB=input() | |
if (type(varA) == str) or (type(varB) == str): | |
print( "string involved") | |
# else: | |
try: | |
varA=int(varA) | |
varB=int(varB) |
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
varA=input() | |
varB=input() | |
if (type(varA) == str) or (type(varB) == str): | |
print( "string involved") | |
else: | |
varA=int(varA) | |
varB=int(varB) | |
if varA>varB: | |
print ("bigger") |
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
varA=input() | |
varB=input() | |
if (type(varA) == str) or (type(varB) == str): | |
print( "string involved") | |
varA=int(varA) | |
varB=int(varB) | |
if type(varA) and type(varB) == int: | |
if varA>varB: |
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
varA=int(input()) | |
varB=int(input()) | |
if (type(varA) == str) or (type(varB) == str): | |
print( "string involved") | |
elif (type(varA) == int) and (type(varB) == int): | |
if varA>varB: | |
print ("bigger") | |
elif varA< varB: | |
print ("smaller") | |
else: |
NewerOlder