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
| set nocompatible " choose no compatibility with legacy vi | |
| set number | |
| set tabstop=2 | |
| set background=light | |
| syntax enable | |
| set encoding=utf-8 | |
| set showcmd " display incomplete commands | |
| filetype plugin indent on " load file type plugins + indentation | |
| "" Whitespace |
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
| // Count to a hundred | |
| // For every multiple of 3 PRINT "FIZZ" | |
| // For every multiple of 5 PRINT "BUZZ" | |
| // For every multiple of 15 PRINT "FIZZBUZZ" | |
| console.log("Welcome to Fizz Buzz"); | |
| function fizzBuzz(number){ | |
| for (var i = 1; i <= number; i++) { | |
| if (i%5==0 && i%3==0) // i%15 |
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
| #include <opencv2/highgui/highgui.hpp> | |
| #include <opencv2/imgproc/imgproc.hpp> | |
| #include <iostream> | |
| using namespace cv; | |
| using namespace std; | |
| int main() { | |
| // Defining VideoCapture Objects | |
| VideoCapture stream1(0); //0 is default, -1 = any camera, 1-99 range of cameras |
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
| # A simple text based JRPG Battle System. My biggest obstacle is getting the 2 counters to work properly. | |
| # 1st counter tracks the HP of the Enemy and Hero class. 2nd counter tracks the Atk power of the Hero class. | |
| # The Hero needs to defeat the Orc before either his HP or Atk power reaches 0. | |
| # Whenever the Hero attacks he loses Atk power, and whenever the Orc attacks the Hero loses HP. | |
| class Enemy | |
| def initialize(hp) | |
| @hp = hp #instance variables | |
| end |
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
| class Car | |
| @@WHEELS = 4 | |
| def initialize(args) | |
| @color = args[:color] | |
| @wheels = @@WHEELS | |
| end | |
| def drive | |
| @status = :driving | |
| end | |
| def brake |