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
| a = "xxx" | |
| c = { | |
| a = it | |
| b = it | |
| println a | |
| } | |
| c("o_o") |
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 com.e2info.groovy; | |
| import groovy.util.GroovyTestCase; | |
| import com.e2info.groovy.Groovy; | |
| class GroovyTest extends GroovyTestCase { | |
| void testPlay() { | |
| Groovy groovy = new Groovy() | |
| assertEquals(groovy.play(), "check it!") | |
| } |
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 com.e2info.groovy | |
| String play(){ | |
| return "check it!" | |
| } |
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 echo "Hello world!"; ?> | |
| //↓ | |
| <?php echo "Hello world!!!"; ?> |
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 | |
| // (*´・ω・)(・ω・`*)< イマイチ! | |
| include_once('Net/SmartIRC.php'); | |
| if(count($argv) != 4){ | |
| die("error! invalid argment [php xxx.php 'author' 'log' 'changes']"); | |
| } | |
| class mybot |
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 | |
| /* | |
| Deploy | |
| > ROOT/app/Plugin/CakeSmarty/Controller/Component/CakeSmartyComponent.php | |
| ROOT/lib/Cake/Controller/AppController.php | |
| > public $components = array('CakeSmarty.CakeSmarty'); | |
| ROOT/app/Config/bootstrap.php | |
| > CakePlugin::load('CakeSmarty'); |
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
| // タイマーの実行 | |
| $(document).everyTime(1000, "timer-name", function(){ | |
| // タイマーのストップ | |
| $(document).stopTime("timer-name"); | |
| } |
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(){ | |
| $("#check-all").click(function(){ | |
| $(".deleteCheckbox").attr('checked', true); | |
| return false; | |
| }); | |
| $("#uncheck-all").click(function(){ | |
| $(".deleteCheckbox").attr('checked', false); | |
| return 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
| // 明示的な実装 | |
| public boolean between(Date date, Date minDate, Date maxDate){ | |
| return date.after(minDate) && date.before(maxDate); | |
| } | |
| // 合理的(?)な実装 | |
| public boolean between(Date date, Date minDate, Date maxDate){ | |
| return minDate.compareTo(date) * date.compareTo(maxDate) > 0; | |
| } |
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
| List<String> strList = Arrays.asList("data1", "data2", "data3"); | |
| String[] itemSpecArray = strList.toArray(new String[0]); |