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
| %{ | |
| #include <stdio.h> /* printf() */ | |
| #include <stdlib.h> /* atoi() */ | |
| int vars[26]; | |
| %} | |
| Stmt = - e:Expr EOL { printf("%d\n", e); } | |
| | ( !EOL . )* EOL { printf("error\n"); } | |
| Expr = i:ID ASSIGN s:Sum { printf("%s = %d\n", i, s); $$ = vars[i] = s; } |
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
| # YYSTYPE is char * | |
| Attribute = '[' n:Id | |
| ( '=' v:Value { printf("%s %s\n", n, v) } | |
| | '~=' v:Value | |
| | '^=' v:Value | |
| | '$=' v:Value | |
| | '*=' v:Value | |
| )? ']' |
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($){ | |
| $('#datepicker1').datepicker('onSelect', function(dateText, inst){ | |
| $('#datepicker2').datepicker('setDate', dateText) | |
| }) | |
| })(jQuery) |
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($){ | |
| $('#datepicker1').change(function(){ | |
| $('#datepicker2').val($(this).val()) | |
| }) | |
| })(jQuery) |
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
| var update = function(id, prev) { | |
| return function(dateText, date) { | |
| $(id).val(dateText.replace(/\/(\d{1,2})\//, function(_, day){ | |
| return '/' + (prev ? --day : ++day) + '/' | |
| })) | |
| } | |
| } | |
| $("#datepicker1").datepicker({ onSelect : update('#datepicker2') }) | |
| $("#datepicker2").datepicker({ onSelect : update('#datepicker1', true) }) |
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
| if defined? Growl | |
| method = failures.to_i > 0 ? :notify_error : :notify_ok | |
| Growl.send method, "passes: #{passes} failures: #{failures}", :title => browser.to_s.capitalize | |
| end |
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 Tags | |
| def tag name, contents = nil, attrs = {}, &block | |
| contents, attrs = nil, contents if contents.is_a? Hash | |
| create_tag name, contents, attrs, &block | |
| end | |
| def create_tag name, contents, attrs, &block | |
| "<#{name} #{attrs.map { |k,v| %(#{k}="#{v}") }.join(' ') }>#{contents}</#{name}>\n" | |
| end |
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
| JSpec.include({ | |
| afterSpec : function(spec) { | |
| JSpec.fail('something broke') | |
| } | |
| }) |
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
| load('/Library/Ruby/Gems/1.8/gems/visionmedia-jspec-2.4.2/lib/jspec.js') | |
| load('lib/express.core.js') | |
| load('lib/express.mime.js') | |
| load('lib/express.view.js') | |
| JSpec | |
| .exec('spec/spec.core.js') | |
| .exec('spec/spec.routing.js') | |
| .exec('spec/spec.mime.js') |
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
| load('lib/jspec.js') | |
| load('spec/modules.js') | |
| load('spec/spec.grammar-less.js') | |
| JSpec | |
| .exec('spec/spec.grammar.js') | |
| .exec('spec/spec.js') | |
| .exec('spec/spec.matchers.js') | |
| .exec('spec/spec.utils.js') | |
| .exec('spec/spec.shared-behaviors.js') |