Skip to content

Instantly share code, notes, and snippets.

// Creating a local scope
(function() {
"use strict";
// ------------- START OBJECT --------------
// ------ Constructor method to create a game cell ------
function gameSquare (correct, starting) {
// Private variables to hold the possible colors and the index of the current color
var colors = ["#666", "#09f", "#fff"];
var colorIndex = starting;
"use strict";
$(document).ready(function () {
// Input fields
var originInput = $("#origin");
var destinationInput = $("#destination");
var travelMode = $("#method");
// Create a DirectionsService object to communicate to the Google Directions API
var directionsService = new google.maps.DirectionsService();
@w0300133
w0300133 / countries.py
Created February 28, 2017 03:02
Countries of the World Python GUI application
import sys
import csv
from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox
from PyQt5.QtGui import QPixmap
#ADD IMPORT STATEMENT FOR YOUR GENERATED UI.PY FILE HERE
import worldCountriesLIB
#CHANGE THE SECOND PARAMETER HERE TO MATCH YOUR GENERATED UI.PY FILE
@w0300133
w0300133 / battleships.py
Created February 28, 2017 02:53
Battleships Code in Python
# --- Import needed data libraries ---
import csv
# --- Function definition for generateStartMap ---
# Will take in the size of the map to be made and produce an empty starting map for the game.
def generateStartMap(size):
startingMap = []
for counter in range(size):
currentLine = []
for counter in range(size):
@w0300133
w0300133 / sudoku-puzzle.js
Created February 28, 2017 02:39
JavaScript for Sudoku Puzzle
function enterNumber(targetCell) {
'use strict';
targetCell.style.color = "#090";
var rowContentArray = [],
colContentArray = [],
boxContentArray = [];
var cellRow = targetCell.className.slice(0, 4),
@w0300133
w0300133 / form-mock.html
Created February 28, 2017 02:14
Registration Form Mock-up
<!DOCTYPE html>
<html lang="en">
<head>
<!--
Author: Brian Baker
Date: 2017.02.24
Page content for the Canadian Competitive Eating Registration Form mock-up.
Filename: registration.html