This file contains 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
/* | |
* TrafficAnimation.java | |
* COMPSCI 121 Project 1: Traffic Animation | |
*/ | |
/** | |
* Animates two cars traveling at different speeds which wrap | |
* back around to their starting position. | |
* | |
* @author Me |
This file contains 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 file provides useful Kotlin tricks for common tasks | |
// that would be otherwise tedious to do in Java | |
/** | |
* Read from stdin line by line, halting when EOF is reached. | |
* Super useful for building a simple REPL or parsing a text file. | |
*/ | |
fun readLineByLine() { | |
System.`in`.reader().forEachLine { line -> | |
// Do your stuff here |
This file contains 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
*** Settings *** | |
Documentation A test suite with a single test for valid login. | |
... | |
... This test has a workflow that is created using keywords in | |
... the imported resource file. | |
Resource resource.txt | |
*** Test Cases *** | |
A User Can Create an Account and Log In | |
Create Valid User fred P4ssw0rd |
This file contains 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 LoginLibrary(object): | |
# Some setup logic | |
def __init__(self): | |
self._sut_path = os.path.join(os.path.dirname(__file__), | |
'..', 'sut', 'login.py') | |
self._status = '' | |
def _run_command(self, command, *args): | |
command = [sys.executable, self._sut_path, command] + list(args) | |
process = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, |
This file contains 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 Controller(object): | |
def __init__(self): | |
self._sut_path = os.path.join(os.path.dirname(__file__), | |
'..', 'sut', 'login.py') | |
self._status = '' | |
self.logger = logging.getLogger('localhost', 3456) | |
handler = logging.StreamHandler() | |
formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') |
This file contains 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
### Taken from https://github.com/Hyperparticle/hyperparticle.github.io/blob/2365749469b1eea3e8c4b18af24a4865fc426fd3/.circleci/config.yml | |
# Javascript Node CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
# | |
version: 2 | |
jobs: | |
build: | |
docker: |
This file contains 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
.rounded { | |
position: relative; | |
border-radius: 10px; /* Rounded corners */ | |
padding-bottom: 62.5%; /* 16:10 ratio */ | |
height: 0; | |
overflow: hidden; | |
} | |
.rounded .frame { | |
position: absolute; |
This file contains 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
public class TestPolygon : MonoBehaviour | |
{ | |
private void Start () { | |
// Create Vector2 vertices | |
var vertices2D = new Vector2[] { | |
new Vector2(0,0), | |
new Vector2(0,1), | |
new Vector2(1,1), | |
new Vector2(1,2), | |
new Vector2(0,2), |
This file contains 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
public class DrawController : MonoBehaviour | |
{ | |
public DrawRectangle RectanglePrefab; | |
private readonly List<DrawRectangle> _allShapes = new List<DrawRectangle>(); | |
private DrawRectangle CurrentShapeToDraw { get; set; } | |
private bool IsDrawingShape { get; set; } | |
private void Update() |
This file contains 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
public class DrawRectangle : MonoBehaviour | |
{ | |
public Color FillColor = Color.white; | |
private MeshFilter _meshFilter; | |
private LineRenderer _lineRenderer; | |
// Start and end vertices (in absolute coordinates) | |
private readonly List<Vector2> _vertices = new List<Vector2>(2); | |
OlderNewer