Groovy ネタ NGK 忘年会2009 ライトニングトーク

1,518 views

Published on

NGK 忘年会2009(昼の部)
みんなでライトニングトーク!
「Groovy ネタ」
NGK=名古屋合同懇親会

http://groups.google.co.jp/group/dstokai/

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,518
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Groovy ネタ NGK 忘年会2009 ライトニングトーク

  1. 1. JGGUG japan grails/groovy user group
  2. 2. Japan Grails Groovy Users Group
  3. 3. public class HelloWorld { String name; public void setName(String name){ this.name = name; } public String getName(){ return name; } public String greet(){ return "Hello "+name; } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld(); helloWorld.setName("Groovy"); System.out.println(helloWorld.greet()); } }
  4. 4. public class HelloWorld { String name; public void setName(String name){ this.name = name; } public String getName(){ return name; } public String greet(){ return "Hello "+name; } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld(); helloWorld.setName("Groovy"); System.out.println(helloWorld.greet()); } }
  5. 5. public class HelloWorld { String name public void setName(String name){ this.name = name } public String getName(){ return name } public String greet(){ return "Hello "+name } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld() helloWorld.setName("Groovy") System.out.println(helloWorld.greet()) } }
  6. 6. public class HelloWorld { String name public String greet(){ return "Hello "+name } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld() helloWorld.setName("Groovy") System.out.println(helloWorld.greet()) } }
  7. 7. public class HelloWorld { String name public String greet(){ return "Hello "+name } } HelloWorld helloWorld = new HelloWorld() helloWorld.setName("Groovy") System.out.println(helloWorld.greet())
  8. 8. class HelloWorld { String name def greet(){ return "Hello "+name } } def helloWorld = new HelloWorld() helloWorld.setName("Groovy") println(helloWorld.greet())
  9. 9. class HelloWorld { String name def greet(){ return "Hello "+name } } def helloWorld = new HelloWorld() helloWorld.name = "Groovy" println helloWorld.greet()
  10. 10. class HelloWorld { String name def greet(){ "Hello $name"} } def helloWorld = new HelloWorld() helloWorld.name = "Groovy" println helloWorld.greet()
  11. 11. class HelloWorld { String name def greet(){ "Hello $name"} } def helloWorld = new HelloWorld(name: "Groovy") println helloWorld.greet()
  12. 12. def arr = [1,2,3,'hoge'] def map = [a:1,b:2,c:'hoge']
  13. 13. @Grab('net.homeip.yusuke:twitter4j:[2.0,)') import twitter4j.* def user="username",pass="pass" new Twitter(user,pass).friendsTimeline.each { println "${it.user.name}: ${it.text}" } maven
  14. 14. mailService.send to: 'foobar@gmail.com', subject: 'Hello World', htmlBody: '<bold>Hello</bold>'
  15. 15. import com.google.appengine.api.datastore.Entity def person = new Entity("person") person['name'] = " " person.age = 18 println person.name person.save() def q = new Query('person') def list = datastoreService.prepare(q).asList( Builder.withLimit(20).offset(0) ) person.delete()

×