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
| package com.tenderowls.xml176; | |
| import flash.utils.Namespace; | |
| import haxe.io.Input; | |
| import haxe.PosInfos; | |
| enum XML176Document { | |
| Node(name:QName, children:List<XML176Document>, pos:PosInfos); | |
| Attr(name:QName, value:String, pos:PosInfos); | |
| Comment(value:Input, pos:PosInfos); |
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
| package com.tenderowls.geom; | |
| import com.tenderowls.errors.RangeError; | |
| class BezierCurve { | |
| var points:Array<Point<Float>>; | |
| var step:Float; |
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
| package sys; | |
| @:coreApi | |
| class FileSystem { | |
| public static function exists( path : String ) : Bool { | |
| return new flash.filesystem.File(path).exists; | |
| } | |
| public static function rename( path : String, newpath : String ) : Void { |
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
| package com.tenderowls.opensource.match3 | |
| import scala.annotation.tailrec | |
| /** | |
| * @author Aleksey Fomkin <[email protected]> | |
| */ | |
| object Board { | |
| sealed trait Direction |
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
| function processData(data) { | |
| for(var i = 0; i < data.length; i++) { | |
| var row = $('<tr></tr>') | |
| .append($('<td>' + data[i].id + '</td>')) | |
| .append($('<td>' + data[i].firstName + '</td>')) | |
| .append($('<td>' + data[i].secondName + '</td>')); | |
| if ($('showCountryCheckbox').checked) { | |
| row.append($('<td>' + data[i].country + '</td>')); | |
| } | |
| $('table').append(row); |
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
| object HelloWorld extends Application with MKML { | |
| val message = Var("Hello world") | |
| def start() = { | |
| div( | |
| input(`value` =:= message), | |
| span(message) | |
| ) | |
| } | |
| } |
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
| object Sum extends Application with MKML { | |
| val a = Var("0") | |
| val b = Var("0") | |
| def start() = { | |
| div( | |
| input(`value` =:= a), | |
| span(" + "), | |
| input(`value` =:= b), |
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
| object ProgrammersBehaviorTestSuite extends TestSuite { // "Success" | |
| val tests = TestSuite { | |
| "When weather is fine it should" - { // "Success" | |
| "go for a walk" - { assert(false) } // "Failure" | |
| "go to ride a bike" - { assert(false) } // "Failure" | |
| "drink tea on a terrace" - { assert(true) } // "Success" | |
| } | |
| } | |
| } |
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
| val input = Vector("стационар", "соратница", "ватерполистка", "равновесие", "спаниель", | |
| "кильватер", "полковник", "нерасторжимость", "Вениамин", "австралопитек", "своенравие", | |
| "внимание", "апельсин", "вертикаль", "старорежимность", "клоповник", | |
| "пенсионерка", "покраснение") | |
| def anagrams(xs: Seq[String]): Seq[Seq[String]] = { | |
| def wSum(s: String) = { | |
| val ls = s.toLowerCase | |
| val l = ls.length | |
| (0 until l).map(ls.charAt).sum | l << 16 |
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
| val utestSettings = Seq( | |
| scalaJSStage in Test := FastOptStage, | |
| persistLauncher in Test := false, | |
| testFrameworks += new TestFramework("utest.runner.Framework"), | |
| libraryDependencies += "com.lihaoyi" %%% "utest" % "0.3.1" % "test" | |
| ) | |
| lazy val frontend = project.settings(utestSettings:_*) |
OlderNewer