Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title>Challenge: A picture-perfect trip</title>
<meta charset="utf-8">
</head>
<body>
<h1>The perfect trip</h1>
<p>I would see scenes like...</p>
@ohiofi
ohiofi / colorfulTables.html
Last active October 3, 2018 03:13
some html tables that need some color and style
<!DOCTYPE html>
<html>
<head>
<title>ColorfulTables</title>
<style>
</style>
</head>
<body>
/*global TWO_PI,vertex,CLOSE,abs,angleMode,append,background,beginShape,bezier,box,camera,ceil,CENTER,color,cone,cos,createCanvas,createCanvas,createGraphics,curveVertex,cylinder,DEGREES,displayHeight,displayWidth,dist,div,DOWN_ARROW,ellipse,endShape,fill,floor,frameCount,frameRate,height,image,key,keyCode,keyIsDown,keyIsPressed,keyIsPressed,keyPressed,LEFT,LEFT_ARROW,lerpColor,line,loadImage,loadJSON,loadSound,map,mouseIsPressed,mouseX,mouseY,noFill,noLoop,normalMaterial,noStroke,p5,plane,point,pointLight,pop,push,push,RADIANS,radians,random,rect,resizeCanvas,resizeCanvas,RIGHT,RIGHT_ARROW,rotate,rotateX,rotateY,rotateZ,round,round,scale,shuffle,sin,sphere,stroke,strokeWeight,text,textAlign,textFont,textSize,texture,textWidth,torus,translate,triangle,UP_ARROW,WEBGL,width,windowHeight,windowHeight,windowWidth,world */
/*global currentLocation,room,item,currentLocation*/
/*Create an HTML div and give it id="mymap"*/
let myCanvas;
let mappy;
function setup(){ // only when game loads
myCanvas = createCanvas(
public class Coin
{
//These are constants that are provided for your use. For example, using the constant "TAILS" is the same as typing a 1.
private final static int HEADS = 0;
private final static int TAILS = 1;
private final static int UNKNOWN = -1;
//ADD: private instance variables, type (String), year (int), face (int)
/* Prompt the user for the number of coin flips.
Flip the count the designated number of times - displaying the number of the coin flip and the result
Display the number of coin heads and number of tails!
How many flips would you like? 4
1. heads
2. tails
3. heads
4. heads
// <First Name> <Last Name>
// <Class period>
// Directions: Fill in the missing variables and methods to create the Store class.
// Their will only be 3 pieces of data for each store: the type of store (pet or grocery), the time the store opens and the time the store closes.
// To simplify the opening and closing times, our stores will only open and close on the hour. The times will be stored in 24-hour format, so we will not be
// storing am or pm. For example, 7 am will be stored as 7. 7pm will be stored as 19 (because 12 + 7 = 19).
// If a store has been created, you can assume that the closing time is after the opening time (and no stores are open 24 hours a day).
public class StoreTester
{
public static void main(String[] args)
{
//1. First Constructor and toString
Store store1 = new Store("grocery");
System.out.println("1. \nOUTPUT: Grocery store is open from 10am to 9pm");
System.out.println("YOUR OUTPUT: "+store1);
System.out.println();
@ohiofi
ohiofi / pygamewall.py
Last active March 8, 2019 19:07
Wall class for Pygame Zero
"""
Mr. Riley's PygameWall class v1.20190308
3/8/2019
How to use this Wall class
1) from pygamewall import *
2) Instanciate a wall by passing x, y, width, and height. Like this:
mywall = Wall(400,400,100,10)
3) Draw the wall inside of the draw() loop. Like this:
mywall.draw(screen)
4) Use the touching method to determine if an actor is touching the wall.
// At the bottom of override func didMove()
// add this below the tapGestureRecognizer
let leftSwipe = UISwipeGestureRecognizer(target: self, action: #selector(handleSwipes(_:)))
let rightSwipe = UISwipeGestureRecognizer(target: self, action: #selector(handleSwipes(_:)))
leftSwipe.direction = .left
rightSwipe.direction = .right
view.addGestureRecognizer(leftSwipe)
view.addGestureRecognizer(rightSwipe)
}
@objc func handleSwipes(_ sender:UISwipeGestureRecognizer) {
#AvengersEndgame a4 a4leak a4leaked a4spoiler a4spoilers Ameenah Kaplan ant man Ant Man ant-man Anthony Mackie antman Ariana Greenblatt Aunt May avengers Avengers Avengers 4 Avengers: Endgame avengersendgame AvengersEndgame avengersendgameleak avengersendgameleaked avengersendgamespoiler avengersendgamespoilers avispa Ayo Benedict Cumberbatch Benedict Wong Benicio Del Toro black panther Black Panther black widow Black Widow box office Box Office Bradley Cooper Brie Larson Bruce Banner bucky Bucky Barnes Cap capitán america capitana marvel Captain captain america Captain America captain marvel carol danvers Carol Danvers Carrie Coon Chadwick Boseman characters Chris Evans Chris Hemsworth Chris Pratt Clark Gregg Collector Corvus Glaive Cull Obsidian Danai Gurira Dave Bautista doctor strange Doctor Strange Don Cheadle Dr Strange Drax Ebony Maw Eitri Elizabeth Olsen end game End Game End-game End-Game endgame Endgame endgameleak endgameleaked endgamespoiler endgamespoilers Ethan Dizon Falcon far from home Far Fro