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
properties = { | |
prop1: String, | |
prop2: { | |
type: 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
library component.ajax; | |
import "package:angular2/angular2.dart"; | |
import "dart:html"; | |
import 'dart:convert'; | |
@Component(selector: "ajax-data") | |
@View( | |
template: "<p>{{ data | json }}</p><button (click)='getData()'>Get data.json</button>") | |
class AjaxComponent { |
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
library component.ajax; | |
import "package:angular2/angular2.dart"; | |
import "dart:html"; | |
@Component(selector: "ajax-data") | |
@View( | |
template: "<p>{{ data }}</p><button (click)='getData()'>Get data.json</button>") | |
class AjaxComponent { | |
String data; |
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
library component.ajax; | |
import "package:angular2/angular2.dart"; | |
import "dart:html"; | |
import 'dart:async'; | |
@Component( | |
selector: "ajax-data" | |
) | |
@View( |
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
void main() { | |
var today = new DateTime.now(); | |
var calendar = new List.generate(6, (i) => new List.filled(7, " ")); | |
for (var i = 1, week = 0; i <= new DateTime(today.year, today.month + 1, 0).day; i++) { | |
var day = new DateTime(today.year, today.month, i); | |
calendar[week][day.weekday % 7] += i.toString(); | |
if (day.weekday == DateTime.SATURDAY) week++; | |
} | |
print(calendar.where((w) => w.any((d) => d.trim() != "")).map( | |
(w) => w.map((d) => d.substring(d.length - 2)).join(" ")).join("\r\n")); |
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 la0c | |
import ( | |
"strings" | |
"testing" | |
) | |
func TestCalcMatchCount(t *testing.T) { | |
noMatch := "レ,ド,ッ,ビ,ビ,ッ,レ,・,レ,ビ,ビ,ー,ド,ン" | |
if CalcMatchCount(strings.Split(noMatch, ",")) != 0 { |
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 la0c | |
import ( | |
"math/rand" | |
"strconv" | |
"strings" | |
) | |
const ( | |
ANSWER = "ビ,ビ,ッ,ド,レ,ッ,ド,・,オ,ペ,レ,ー,ショ,ン" |
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 'package:unittest/unittest.dart'; | |
main() { | |
/// NoSuchMethodError: method not found 'get:obj' | |
test("undefined", () { | |
if (obj) { | |
expect(true, isFalse); | |
} else { | |
expect(false, isFalse); |
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> | |
<html ng-app="app"> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="bower_components/angular/angular.min.js"></script> | |
<script> | |
var main = angular.module("app", []); | |
main.controller("mainCtrl", function ($scope) { | |
$scope.inputText = ""; |