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
import 'dart:html' as html; | |
import 'dart:math'; | |
import 'package:stagexl/stagexl.dart'; | |
Stage stage = null; | |
RenderLoop renderLoop; | |
/** | |
* Tracks all of the glyphs and can create new ones on demand. | |
*/ |
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
@angular.module('HelloApp', ['components']) | |
@angular.module('components', []) | |
.directive('testElem', -> | |
restrict: 'A' | |
template: '<div class="my-directive-class"><h1>Hello...</h1><p ng-repeat="obj in arr">{{obj}}</p></div>' | |
link: (scope, iterStartElement, attr) -> | |
$(".my-directive-class").css({ 'background-color': 'yellow'}) | |
scope.arr = ["Steve", 'is', 'the', 'beast'] | |
) |
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
// Sudoku Generator For Scala | |
// Pretty efficient, can create a puzzle in under a millisecond on my machine. | |
abstract class Difficulty { def revealCount: Int } | |
case class Easy() extends Difficulty { val revealCount = 41 } | |
case class Medium() extends Difficulty { val revealCount = 35 } | |
case class Hard() extends Difficulty { val revealCount = 31 } | |
class SudokuPuzzle(difficulty: Difficulty) { | |
private val possible: Set[Int] = Set(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) |