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
| /* | |
| 2.2.x added Implicit closure coercion | |
| */ | |
| interface StringFilter{ | |
| def filter(String source); | |
| } | |
| class SemicollonRemover{ | |
| static String remove(String source,StringFilter filter){ |
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
| package jp.eiya.aya.geb.practice | |
| @Grab('org.gebish:geb-core') | |
| import geb.Page | |
| class CorrectedGoogleTopPage extends Page{ | |
| static url = 'https://www.bing.com' // fail | |
| static at = { | |
| title == 'Google' | |
| searchBox.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
| def instDir = "$buildDir/instrumented_classes" | |
| task setInstResources(){ | |
| dependsOn 'testClasses' | |
| } | |
| setInstResources << { | |
| copy{ | |
| from sourceSets.test.output.resourcesDir | |
| into instDir | |
| } | |
| } |
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 func = { | |
| try{ | |
| return {print('a');0}() | |
| }finally{ | |
| return {print('b');1}() | |
| } | |
| } | |
| println func() // ab1 |
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
| <!DOCTYPE html> | |
| <html lang="ja"><head><meta charset="utf-8" /></head> | |
| <body> | |
| <div ng-app="app" ng-controller="confirmCtrl"> | |
| <form name="form" novalidate> | |
| <div> | |
| <input type="text" ng-model="target" name="target" /> | |
| <input type="text" ng-model="targetConfirm" name="targetConfirm" | |
| confirm="target" | |
| /> |
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
| <!DOCTYPE html> | |
| <html lang="ja"><head><meta charset="utf-8" /></head> | |
| <body> | |
| <div ng-app="app" ng-controller="scrollCtrl"> | |
| <form name="form" novalidate> | |
| <h1 id="top">TOP</h1> | |
| <div> | |
| <ul> | |
| <li><a href="" ng-click="innerLink('name1')">name1</a></li> | |
| <li><a href="" ng-click="innerLink('id1')">id1</a></li> |
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
| <!DOCTYPE html> | |
| <html lang="ja"><head><meta charset="utf-8" /></head> | |
| <body> | |
| <div ng-app="app" ng-controller="validCtrl"> | |
| <form name="form" novalidate> | |
| <input ng-model="default" ng-minlength="7" id="invalidDefault" name="default"/>{{ form.default.$error }} | |
| <p>default:{{ default }}</p> | |
| <p>invalidDefault.value:<span id="output"></span></p> | |
| <script> | |
| setInterval(function(){output.innerHTML = invalidDefault.value},5); |
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 geb.driver.DriverRegistry | |
| import geb.driver.NameBasedDriverFactory | |
| driver = (Settings.gebDriver)?Settings.gebDriver:'firefox' | |
| if(driver=='htmlunit'){ | |
| driver = { | |
| def htmlunitDriver = new NameBasedDriverFactory(classLoader,'htmlunit').getDriver() | |
| htmlunitDriver.webClient.options.setJavaScriptEnabled(true) | |
| htmlunitDriver.webClient.options.setThrowExceptionOnScriptError(false) |
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
| package jp.eiya.aya.grails.sample | |
| class AsyncController { | |
| def fooService | |
| def index() { | |
| log.info 'start index' | |
| fooService.sayFoo(Hero.get(params.id?:1)) | |
| log.info 'end index' | |
| return 'foo' | |
| } |
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
| $ nginx -V 2>&1 | sed -e 's/--/\n--/g' | grep -e '\(version\|stream\|mail\)' | |
| nginx version: nginx/1.11.9 | |
| --with-stream=dynamic | |
| --with-stream_ssl_module | |
| --with-mail=dynamic | |
| --with-mail_ssl_module |