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 java.util.* | |
| import java.lang.reflect.* | |
| import java.lang.reflect.Method | |
| class ArrayHelper | |
| def self.inspect(l:List) | |
| '['+join(l, ',')+']' | |
| 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
| import java.util.HashMap | |
| import java.util.ArrayList | |
| import java.util.regex.Pattern | |
| class Element | |
| def self.select:Select | |
| Select.new |
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
| begin | |
| require 'ant' | |
| rescue LoadError | |
| puts 'This Rakefile requires JRuby. Please use jruby -S rake.' | |
| exit 1 | |
| end | |
| neighbor_mirah = File.expand_path '../mirah' |
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 ext.* | |
| import models.* | |
| import com.google.appengine.api.users.UserService | |
| import com.google.appengine.api.users.UserServiceFactory | |
| import java.net.* | |
| import javax.servlet.* | |
| import javax.servlet.http.* | |
| class ApplicationController < MyController | |
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
| require 'java' | |
| module Redcar | |
| module SyntaxCheck | |
| class MirahCheck < Checker | |
| supported_grammars "Ruby" | |
| require 'mirah-parser.jar' | |
| import 'mirah.impl.MirahParser' | |
| import 'jmeta.ErrorHandler' |
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
| /* | |
| Element.select. | |
| option("1", "one"). | |
| option("2", "two"). | |
| option("3", "three"). | |
| value("2").to_s | |
| produces: | |
| <select><option value="1">one</option><option selected="selected" value="2">two</option><option value="3">three</option></select> |
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 BasketWidget { | |
| public static function view(Perspective $perspective) { | |
| $b = Basket::current(); | |
| if ($b->isEmpty()) { | |
| $items = '<a href="'.Basket::url().'">Košík</a> je prázdný'; |
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
| def execute(e:RequestEvent) | |
| puts "I am #{self}" | |
| self.action = e.peek | |
| puts "I am #{self}" | |
| self.params = e | |
| this = self | |
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
| # too bad appengine doesn't honor png transparency in this case | |
| def image | |
| root = System.getProperty('user.dir') | |
| originalImage = ImagesServiceFactory.makeImage( | |
| read(root + '/voucher/test.png')) | |
| c = Composite(ImagesServiceFactory.makeComposite( | |
| originalImage, 0, 0, 1, Composite.Anchor.TOP_LEFT)) |