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
//The Recipe Card | |
var recipeCard = { | |
"title": "Mac 'n Cheese", | |
"servings": 8, | |
"ingredients": ["cheese", "pasta", "butter", "flour", "pepper", "broccoli"] | |
} | |
// console.log(recipeCard.title); | |
// console.log('Serves: '+ recipeCard.servings); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>My Book List</title> | |
</head> | |
<body> | |
<h1>My Book List</h1> | |
</body> |
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
class IfTheConditionTok(Token): | |
"""If the condition x>4 is equal to true, follow these instructions:{}. | |
Else if the condition x<4 is equal to true, follow these instructions:{}. | |
Else, follow these instructions: {}.""" | |
def __init__(self, value = 0): | |
self.value = value | |
self.labelno = None | |
self.condition = None | |
self.true_block = None |
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
def parse(): | |
global scope | |
scope = Scope() | |
advance() #to put the first token in | |
p = Program() | |
p.statementd() | |
return p | |
class Program: | |
def statementd(self): |
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
fancy_echo() { | |
local fmt="$1"; shift | |
# shellcheck disable=SC2059 | |
printf "\n$fmt\n" "$@" | |
} | |
append_to_bash_profile() { | |
echo "$1" >> ~/.bash_profile | |
} |