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
import 'dart:math'; | |
void main() { | |
Chord chord = genChord(); | |
print(chordToRussian(chord)); | |
} | |
Chord genChord() { | |
final keyIdx = Random().nextInt(12); |
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
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
#!/usr/bin/env bash | |
check_update () { | |
local HGSTATUS=`hg status` | |
if [[ HGSTATUS = "M res/tags.csv" ]]; then | |
hg commit -m "tags.csv updated" | |
# hg push | |
return | |
fi |
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
import 'package:polymer/polymer.dart'; | |
@CustomTag('numeric-input') | |
class NumericInput extends PolymerElement { | |
num _value; | |
@published | |
num get value => _value; |
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
//... your project imports and mongoose | |
var mongoose = require('mongoose'); | |
//... your application code | |
// start mongoose: | |
mongoose.connect(getMongodbURL(), function(error) { | |
// your initial code like bellow | |
if (error) { | |
console.log('Mongoose.connect error: ' + error); |
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
<?xml version="1.0"?> | |
<!-- | |
Created with IntelliJ IDEA. | |
User: kelegorm | |
Date: 25.03.13 | |
Time: 11:17 | |
--> | |
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" | |
close="closeHandler(event)" | |
skinClass="skins.MyWindowSkin" |