This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <!-- | |
| Babylon.js Demo by Peter Kwak and Christopher Pedersen at theCoderSchool | |
| in Flower Mound, TX for use teaching our introductory programming students. | |
| This tutorial was created to demonstrate how our students favorite game, | |
| www.ShellShock.io was created using JavaScript and the Babylon.js library. | |
| This is free and unencumbered software released into the public domain. | |
| For more information, please refer to <http://unlicense.org/> | |
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Super Simple Magic 8 Ball | |
| # https://bit.ly/2LGEDnh | |
| # Greet User | |
| print("Welcome to Magic 8 Ball!") | |
| # Prompt User to Ask a Question | |
| question = raw_input("What is your question?") | |
| # Generate Random Number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tic Tac Toe by Snigdha Chalapalli, a rockstar programming student at | |
| # theCoderSchool in Flower Mound, TX <https://thecoderschool.com> | |
| # This is free and unencumbered software released into the public domain. | |
| # For more information, please refer to <http://unlicense.org/> | |
| # TODO: Need to add code that detects when a game ends in a tie/draw. | |
| from time import sleep | |
| import random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This gist is comprised of two files demonstrating how to do simple networking | |
| // in swift using the HTTP GET method. The first file is ViewController.swift, | |
| // and the other is Info.plist. The Info.plist was added to this gist because | |
| // it must be modified in order to use HTTP instead of the more secure HTTPS. | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Dismiss Keyboard | |
| // Drag 'Tap Gesture Recognizer' from Object Library onto Background. | |
| // Control-Drag from 'Tap Gesture Recognizer' to ViewController.swift | |
| // to add dismissKeyboard() @IBAction. Call .resignFirstResponder() | |
| // method from within the dismissKeyboard function to then dismiss | |
| // the keyboard. | |
| @IBAction func dismissKeyboard(_ sender: UITapGestureRecognizer) { | |
| textField.resignFirstResponder() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -------------------------------------------------------------------------------------> | |
| // This example is comprised of three swift files demonstrating how to implement an MVC | |
| // architecture using the singleton pattern in iOS. By using a singleton pattern one can | |
| // create a simple class (or classes) to serve as the model for an application | |
| // and ensure that only one instance of that class is created and that it is accessible | |
| // globally. We do this by creating a 'shared' property to make access to the single | |
| // instance global, and initialize the class privately to ensure that only one instance | |
| // is ever created. While creating this simple app/gist I used the following blog post | |
| // from Bart Jacobs at cocoacasts.com for guidance (Thanks Bart!): | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This gist demonstrates how to build a multi-view application in iOS | |
| // with Swift using a simple MVC architecture. The application is comprised | |
| // of three main files: Model.swift, ViewController.swift, and NewViewController.swift. | |
| // The application allows a user to click a button which then programmatically | |
| // changes a value in our model and then presents a new view. The first view | |
| // displays the initial state of the value in our model, and the new view | |
| // displays the updated value of the model. While building this app I | |
| // consulted 1 blog post regarding how to implement an MVC architecture | |
| // in iOS using a singleton pattern, and also consulted a forum post from | |
| // the programming forum StackOverflow.com. (Both resources are in the public domain) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10 PRINT TAB(21);"GAME OF ROCK, SCISSORS, PAPER" | |
| 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" | |
| 25 PRINT:PRINT:PRINT | |
| 30 INPUT "HOW MANY GAMES";Q | |
| 40 IF Q<11 THEN 60 | |
| 50 PRINT "SORRY, BUT WE AREN'T ALLOWED TO PLAY THAT MANY.": GOTO 30 | |
| 60 FOR G=1 TO Q | |
| 70 PRINT: PRINT "GAME NUMBER";G | |
| 80 X=INT(RND(1)*3+1) | |
| 90 PRINT "3=ROCK...2=SCISSORS...1=PAPER" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // (WORK IN PROGRESS) | |
| // Rock, Scissors, Paper by Shruthik-- a rockstar | |
| // programming student at theCoderSchool in Flower Mound, TX | |
| import Foundation | |
| print(" GAME OF ROCK, SCISSORS, PAPER") | |
| print(" CREATIVE COMPUTING MORRISTOWN, NEW JERSEY") | |
| print(" ") | |
| print(" ") | |
| print("HOW MANY GAMES") |