Skip to content

Instantly share code, notes, and snippets.

View ShainaR's full-sized avatar

Shaina Read ShainaR

View GitHub Profile
@ShainaR
ShainaR / animals-database
Created May 13, 2017 22:19
Animals database created in Oracle AJAX
1.
CREATE TABLE animals
 (animal_id NUMBER(6),
  name VARCHAR2(25),
  license_tag_number NUMBER(10), 
  admit_date DATE CONSTRAINT animals_admit_date_nn NOT NULL,
  adoption_id NUMBER(5),
  vaccination_date DATE CONSTRAINT animals_vaccination_date_nn NOT NULL,
  CONSTRAINT animals_animal_id_pk PRIMARY KEY (animal_id),
  CONSTRAINT animals_license_tag_number_uk UNIQUE (license_tag_number));
<!DOCTYPE html>
<html>
<head>
<title>Message</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<h1 onmouseover="updateMessage()">TravelWorthy</h1>
<div id="message">Welcome to our site!</div>
<script src="js/basic-function.js"></script>
@ShainaR
ShainaR / update-message
Created May 13, 2017 21:18
Updates message on website when mouse moves
var msg = 'Sign up to receive our newsletter for 10% off!';
function updateMessage() {
var el = document.getElementById('message');
el.textContent = msg;
}
@ShainaR
ShainaR / fresh-tomatoes.py
Created May 13, 2017 21:00
Creates movie trailer website and dynamically creates content based on python objects
import webbrowser
import os
import re
# Styles and scripting for the page
main_page_head = '''
<head>
<meta charset="utf-8">
<title>Fresh Tomatoes!</title>
@ShainaR
ShainaR / entertainment-center.py
Created May 13, 2017 20:59
Defines object arguments for movie trailer website in python
import fresh_tomatoes
import media
#Toy Story instance
toy_story = media.Movie("Toy Story",
"Andy's toys come to life",
"81 minutes",
"http://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg",
"https://www.youtube.com/watch?v=vwyZH85NQC4")
@ShainaR
ShainaR / media.py
Created May 13, 2017 20:58
Python object definitions for movie trailer website
import webbrowser
class Movie():
"""This class provides a way to store movie related information"""
VALID_RATINGS = ["G", "PG", "PG-13", "R"]
def __init__(self, movie_title, movie_storyline, movie_duration, poster_image, trailer_youtube):
self.title = movie_title
self.storyline = movie_storyline
@ShainaR
ShainaR / battleship.java
Created May 13, 2017 20:54
Main file to run battleship game in java
package battleshipgame;
public class battleship {
public static void main(String[] args) {
actiongame playGame = new actiongame();
playGame.startGame();
@ShainaR
ShainaR / actiongame.java
Created May 13, 2017 20:53
Instantiates objects from gameboard.java for battleship game
package battleshipgame;
import java.util.Scanner;
import java.util.Scanner;
public class actiongame {
Gameboard gameboard1 = new Gameboard();
Scanner input = new Scanner(System.in);
public void startGame(){
@ShainaR
ShainaR / sticky-header
Created May 13, 2017 20:50
Sticky header for websites
jQuery(document).ready(function($)) {
/* Stick navigation to the top of the page */
var stickyNavTop = $('.main-head-wrap').offset().top;
$(window).scroll(function(){
var scrollTop = $(window).scrollTop();
if (scrollTop > stickyNavTop) {
$('.main-head-wrap').addClass('sticky-header');
@ShainaR
ShainaR / ample-child-theme
Created May 13, 2017 20:47
Wordpress child theme for Blue Thistle Cakery website
/*
Theme Name: Ample Child Theme
Template: ample
*/
@import url("./ample/style.css");
@import url('https://fonts.googleapis.com/css?family=Dancing+Script|Parisienne|Pinyon+Script|Tangerine');
header#masthead.site-header