crystal wasm.cr
php -S localhost:3000
- open your browser
- open dev tool js console
crystal.add(1, 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
describe('Handle changes on input text', () => { | |
it('should have...', async () => { | |
const itemAdder = await element(by.id('inputAdder')); | |
const touchableAdder = await element(by.id('touchableAdder')); | |
// Focus the input field | |
await itemAdder.tap(); | |
await itemAdder.typeText('Item'); | |
// expectations | |
}); |
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 m from 'mithril'; | |
import stream from 'mithril/stream'; | |
import {Button} from '../../ui'; | |
import {Account} from '../../models'; | |
export const FormAccountPublicPage = { | |
oninit(vnode) { | |
this.loading = true; | |
this.saving = false; | |
this.errors = false; |
How to import and indicate empty request or reply messages:
import "google/protobuf/empty.proto";
service SomeService {
rpc SomeOperation (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
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
$( function() { | |
$('form').find('input:text').val( function(i, val) { | |
return randomText(); | |
}); | |
$('form').find('input[type="number"]').val( function(i, val) { | |
return randomInt(); | |
}); |
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
<?php | |
namespace Helpers; // Optional | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ |
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 Component from './component'; | |
class Widget extends Component { | |
init(ctrl) { | |
var props = this.props; | |
ctrl.counter = props.initialValue; | |
ctrl.increment = function() { | |
ctrl.counter++; |
NewerOlder