Skip to content

Instantly share code, notes, and snippets.

View bogoreh's full-sized avatar
🎯
Focusing

bogoreh

🎯
Focusing
View GitHub Profile
var recipe = {
title: "Banana Bread",
serving: 3,
ingredients: ["Flour","Water","Banana"]
};
background(41, 0, 0);
fill(255, 0, 255);
textSize(20);
text(recipe.title, 10, 23);
text("Servers: " +recipe.serving, 10, 55);
var movies = [
{
title: "Puff the Magic Dragon",
review: "Best movie ever!!"
},
{
title: "I Hate Chris+6+",
review:"Chris is Trash"
}
];
background(148, 92, 8);
var book = {
title: "Cinder",
stars: 5
};
// draw shelf
fill(173, 117, 33);
rect(0, 120, width, 10);
rect(0, 243, width, 10);
var Rainbow = function(radius,x,y){
this.radius=radius;
this.x=x;
this.y=y;
};
var drawRainbow = function(rainbow){
noFill();
strokeWeight(5);
stroke(255, 0, 0);
background(204, 243, 255);
//clouds
fill(255, 255, 255);
rect(20,42,75,55,465);
rect(201, 130, 75, 55, 465);
rect(336, 58, 75, 55, 465);
//textbubble
fill(255, 158, 158);
/*************
*OBJECT TYPES
**************/
/******************
*Flower Object Type
*******************/
var Flower = function(x,y, height) {
this.x=x;
this.y=y;
this.height=height;
/*
Challenge Box office hits database
This database contains an incomplete list of box office hits and their release year.
You're going to get results back out of the database in different ways!
*/
CREATE TABLE movies (id INTEGER PRIMARY KEY, name TEXT, release_year INTEGER);
INSERT INTO movies VALUES (1, "Avatar", 2009);
INSERT INTO movies VALUES (2, "Titanic", 1997);
INSERT INTO movies VALUES (3, "Star Wars: Episode IV - A New Hope", 1977);
/*Create a table named songs and enter your favorite songs*/
CREATE TABLE songs (
id INTEGER PRIMARY KEY,
title TEXT,
artist TEXT,
mood TEXT,
duration INTEGER,
released INTEGER);
INSERT INTO songs (title, artist, mood, duration, released)
/* Create a database of songs and artists */
CREATE TABLE artists (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
country TEXT,
genre TEXT);
INSERT INTO artists (name, country, genre)
VALUES ("Taylor Swift", "US", "Pop");
INSERT INTO artists (name, country, genre)
CREATE TABLE books (
id INTEGER PRIMARY KEY AUTOINCREMENT,
author TEXT,
title TEXT,
words INTEGER);
INSERT INTO books (author, title, words)
VALUES ("J.K. Rowling", "Harry Potter and the Philosopher's Stone", 79944);
INSERT INTO books (author, title, words)
VALUES ("J.K. Rowling", "Harry Potter and the Chamber of Secrets", 85141);