Intro to Relational Databases >> Elements of SQL >>More Join Practice
This website proved very helpful in explaining SQL joins:
http://www.sqlcourse2.com/joins.html
This website proved very helpful in explaining SQL joins:
http://www.sqlcourse2.com/joins.html
Here is a link to udacity’s reference notes on each course within Full Stack Nano Degree:
(it is not complete, meaning it only really starts notes at Project 3, but still helpful)
Here is a helpful link to explain the random module:
Don’t forget to update the line to match your new project’s pathname:
'/thepathname/toyour/projectsfoldername'
which resides within this line:
template_dir = os.path.join(os.path.dirname(__file__), '/thepathname/toyour/projectsfoldername')
which ultimately resides at the top of the page as you can see here in this code block:
import os import webapp2 import jinja2 from google.appengine.ext import db template_dir = os.path.join(os.path.dirname(__file__), '/thepathname/toyour/projectsfoldername') jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir), autoescape = True)
Okay. This was cool. Thanks Udacity. This example helped me to refocus and get excited about programming again!
Here is my explanation of how the line link = link(*link_tuple)
comes to be:
print query() def query() cursor = db.execute("select * from links") #when you iterate over each link in cursor, you are iterating over tuples. aka each link is a tuple. it comes that way from cursor for link_tuple in cursor: #we don't want tuples though. we want objects. so we turn each link_tuple into an object, each called link. but we also want each link to keep the parameters of each link_tuple, so we pass it in in the parenthesis link = link(*link_tuple) #now that each link is an object and not a tuple, we can call whatever parameter name we want to call on it and print it right out! print link.votes print query()
Intro to Backend >> Databases >> Quiz: Implementing Tables in Python
namedtuples
Confused? Click the link below and go down to the light yellow backgrounded text.
http://stackoverflow.com/questions/2970608/what-are-named-tuples-in-python