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
| module.exports = (grunt) -> | |
| #################################################### | |
| # diagnostic | |
| #################################################### | |
| # use if `--time` is present | |
| require('time-grunt')(grunt) if grunt.option 'time' | |
| #################################################### |
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
| -module(greeter). | |
| -export([say_hi/1]). | |
| say_hi({bored}) -> "Sup..."; | |
| say_hi({polite}) -> "Welcome sir."; | |
| say_hi({friendly}) -> "Hey...". | |
| % erl | |
| % c(greeter). | |
| % greeter:say_hi({polite}). |
Work is done within a feature branch created from master. You've incrementally gotten the feature branch working as expected; however, you'd prefer to re-organize your commits so that you can better reason about the changes.
% mkdir repo
% cd repo
% git init
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
| less-than-100.rs:1:128: 1:136 error: mismatched types: expected `&fn<no-bounds>(&&<VI5>) -> bool` but found `()` (expected fn but found ()) | |
| } assert_eq!(out, ~[5, 50, 35]);(100));ro; }; | |
| ^~~~~~~~ | |
| <std-macros>:89:22: 89:47 error: binary operation == cannot be applied to type `std::iter::Filter<,&<VI5>,std::vec::VecIterator<,<VI5>>>` | |
| <std-macros>:89 if !((given_val == expected_val) && (expected_val == given_val)) { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~ | |
| <std-macros>:83:4: 94:5 note: in expansion of assert_eq! | |
| less-than-100.rs:1:141: 1:171 note: expansion site | |
| <std-macros>:89:69: 89:78 error: mismatched types: expected `~[<VI9>]` but found `std::iter::Filter<,&<VI5>,std::vec::VecIterator<,<VI5>>>` (expected vector but found struct std::iter::Filter) | |
| <std-macros>:89 if !((given_val == expected_val) && (expected_va |
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
| try { | |
| throw { name: 'error', message: 'hello' } | |
| } catch (e) { | |
| console.log('caught this:', e.message) | |
| } | |
| //=> caught this: hello |
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
| // does anyone like this API | |
| $.ajax({ | |
| type: "POST", | |
| url: url, | |
| data: data, | |
| success: success, | |
| dataType: dataType | |
| }); |
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
| <?php | |
| class WordProblem { | |
| /** | |
| * sorry, but this won't work | |
| */ | |
| private $BINARY_OPERATORS = [ | |
| 'plus' => function($l, $r) { return $l + $r; }, |
⪼ Made with 💜 by Polyglot.
