SlideShare uma empresa Scribd logo
1 de 57
Baixar para ler offline
Groovy


2009.12.12 DevLOVE 2009 Fusion
   takuma.watabiki@jggug.org
JGGUG            Grails/Groovy


twitter id : bikisuke
Groovy
10
Groovy
Groovy
Groovy
• JVM
Groovy
• JVM
•
Groovy
• JVM
•
•
Groovy
• JVM
•
•
• Java
Groovy
• JVM
•
•
• Java
• Ruby   Python, Smalltalk
Java
Java




       C)
Java        Groovy




       C)
Groovy     Java
         Java
Groovy     Java
         Java
ERROR


 Java
Groovy
import java.io.*;
import java.util.regex.*;
public class ErrorExtractor {
	

  public static void main(String[] args) {
	

  	

  BufferedReader br = null;
	

  	

  BufferedWriter bw = null;
	

  	

  try {
	

  	

  	

   br = new BufferedReader(new InputStreamReader(
	

  	

  	

   	

   	

  new FileInputStream(new File("/work/server.log"))));
	

  	

  	

   bw = new BufferedWriter(new OutputStreamWriter(
	

  	

  	

   	

   	

  new FileOutputStream("/work/errorlist.log")));
	

  	

  	

   String line = null;
	

  	

  	

   Pattern p = Pattern.compile(".*ERROR.*");
	

  	

  	

   while((line = br.readLine()) != null) {
	

  	

  	

   	

   Matcher m = p.matcher(line);
	

  	

  	

   	

   if(m.matches())
	

  	

  	

   	

   	

  bw.write(line + "¥n");
	

  	

  	

   }
	

  	

  } catch (Exception e) {
	

  	

  } finally {
	

  	

  	

   try {
	

  	

  	

   	

   br.close();
	

  	

  	

   	

   bw.close();
	

  	

  	

   } catch(Exception e) {}                                       Java
	

  	

  }
	

  }
}
import java.io.*;
import java.util.regex.*;
public class ErrorExtractor {
	

  public static void main(String[] args) {
	

  	

  BufferedReader br = null;
	

  	

  BufferedWriter bw = null;
	

  	

  try {
	

  	

  	

   br = new BufferedReader(new InputStreamReader(
	

  	

  	

   	

   	

  new FileInputStream(new File("/work/server.log"))));
	

  	

  	

   bw = new BufferedWriter(new OutputStreamWriter(
	

  	

  	

   	

   	

  new FileOutputStream("/work/errorlist.log")));
	

  	

  	

   String line = null;
	

  	

  	

   Pattern p = Pattern.compile(".*ERROR.*");
	

  	

  	

   while((line = br.readLine()) != null) {
	

  	

  	

   	

   Matcher m = p.matcher(line);
	

  	

  	

   	

   if(m.matches())
	

  	

  	

   	

   	

  bw.write(line + "¥n");
	

  	

  	

   }
	

  	

  } catch (Exception e) {
	

  	

  } finally {
	

  	

  	

   try {
	

  	

  	

   	

   br.close();
	

  	

  	

   	

   bw.close();                                                 .groovy
	

  	

  	

   } catch(Exception e) {}
	

  	

  }
	

  }
}
import java.util.regex.*;

BufferedReader br = null;
BufferedWriter bw = null;
try {
	

   br = new BufferedReader(new InputStreamReader(
	

   	

   	

  new FileInputStream(new File("/work/server.log"))));
	

   bw = new BufferedWriter(new OutputStreamWriter(
	

   	

   	

  new FileOutputStream("/work/errorlist.log")));
	

   String line = null;
	

   Pattern p = Pattern.compile(".*ERROR.*");
	

   while((line = br.readLine()) != null) {
	

   	

   Matcher m = p.matcher(line);
	

   	

   if(m.matches())
	

   	

   	

  bw.write(line + "¥n");
	

   }
} catch (Exception e) {
} finally {
	

   try {
	

   	

   br.close();
	

   	

   bw.close();
                                                                        main
	

   } catch(Exception e) {}
}
import java.util.regex.*;

BufferedReader br = new BufferedReader(new InputStreamReader(
	

  	

   new FileInputStream(new File("/work/server.log"))));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
	

  	

   new FileOutputStream("/work/errorlist.log")));
String line = null;
Pattern p = Pattern.compile(".*ERROR.*");
while((line = br.readLine()) != null) {
	

  Matcher m = p.matcher(line);
	

  if(m.matches())
	

  	

   bw.write(line + "¥n");
}
br.close();
bw.close();



                                                                  try-catch
File f = new File("/work/errorlist.log")
new File("/work/server.log").eachLine { line ->
   if(line =~ ".*ERROR.*") {
       f.append(line + "¥n")
   }
}




                                                  Groovy
import java.io.*;
import java.util.regex.*;
public class ErrorExtractor {
	

  public static void main(String[] args) {
	

  	

  BufferedReader br = null;
	

  	

  BufferedWriter bw = null;
	

  	

  try {
	

  	

  	

   br = new BufferedReader(new InputStreamReader(
	

  	

  	

   	

   	

  new FileInputStream(new File("/work/server.log"))));
	

  	

  	

   bw = new BufferedWriter(new OutputStreamWriter(
	

  	

  	

   	

   	

  new FileOutputStream("/work/errorlist.log")));
	

  	

  	

   String line = null;
	

  	

  	

   Pattern p = Pattern.compile(".*ERROR.*");
	

  	

  	

   while((line = br.readLine()) != null) {
	

  	

  	

   	

   Matcher m = p.matcher(line);
	

  	

  	

   	

   if(m.matches())
	

  	

  	

   	

   	

  bw.write(line + "¥n");
	

  	

  	

   }
	

  	

  } catch (Exception e) {
	

  	

  } finally {
	

  	

  	

   try {
	

  	

  	

   	

   br.close();
	

  	

  	

   	

   bw.close();
	

  	

  	

   } catch(Exception e) {}
	

  	

  }
	

  }
}
File f = new File("/work/errorlist.log")
new File("/work/server.log").eachLine { line ->
   if(line =~ ".*ERROR.*") {
       f.append(line + "¥n")
   }
}
•
• Expando Meta Class
• Grape
• Mixin
• AST
•                ...
Groovy
Groovy
Groovy
Groovy
Hudson
  kkawa



Groovy    ※
Hudson
  kkawa



Groovy                   ※




          ※2008   SDC SQUARE
Groovy Q&A
Q.
A. Hudson




CLI        groovy
groovysh
Q.   Scala
A.
     Groovy
Q.
A.
 Groovy
          !




     Groovy   @torazuka
Q. Groovy
A.


                     Groovy




              JOJO
     Groovy
A.


                     Groovy




              JOJO
     Groovy
Q. Groovy
A.
Groovy
Groovy




         JGGUG
Groovy




         JGGUG
Groovy   JVM
Java
Groovyノススメ
Groovyノススメ

Mais conteúdo relacionado

Mais procurados

Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Sumant Tambe
 
Facilite a vida com guava
Facilite a vida com guavaFacilite a vida com guava
Facilite a vida com guavaRomualdo Andre
 
JavaScript for Web Analysts
JavaScript for Web AnalystsJavaScript for Web Analysts
JavaScript for Web AnalystsLukáš Čech
 
Let's talks about string operations in C++17
Let's talks about string operations in C++17Let's talks about string operations in C++17
Let's talks about string operations in C++17Bartlomiej Filipek
 
Javascript3
Javascript3Javascript3
Javascript3mozks
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 Sumant Tambe
 
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascriptBoris Burdiliak
 
Quicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of RustQuicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of RustDamien Castelltort
 
งานPop pornapa
งานPop pornapaงานPop pornapa
งานPop pornapaPw Mlp
 
GoLightly: A Go Library For Building Virtual Machines
GoLightly: A Go Library For Building Virtual MachinesGoLightly: A Go Library For Building Virtual Machines
GoLightly: A Go Library For Building Virtual MachinesEleanor McHugh
 
Reactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftReactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftFlorent Pillet
 
Easily mockingdependenciesinc++ 2
Easily mockingdependenciesinc++ 2Easily mockingdependenciesinc++ 2
Easily mockingdependenciesinc++ 2drewz lin
 
第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディングnobu_k
 
Thinking in Sequences - Streams in Node.js & IO.js
Thinking in Sequences - Streams in Node.js & IO.jsThinking in Sequences - Streams in Node.js & IO.js
Thinking in Sequences - Streams in Node.js & IO.jsArtur Skowroński
 
Ruby on Rails Intro
Ruby on Rails IntroRuby on Rails Intro
Ruby on Rails Introzhang tao
 
2018 cosup-delete unused python code safely - english
2018 cosup-delete unused python code safely - english2018 cosup-delete unused python code safely - english
2018 cosup-delete unused python code safely - englishJen Yee Hong
 

Mais procurados (19)

Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)
 
Facilite a vida com guava
Facilite a vida com guavaFacilite a vida com guava
Facilite a vida com guava
 
JavaScript for Web Analysts
JavaScript for Web AnalystsJavaScript for Web Analysts
JavaScript for Web Analysts
 
Java 7
Java 7Java 7
Java 7
 
Let's talks about string operations in C++17
Let's talks about string operations in C++17Let's talks about string operations in C++17
Let's talks about string operations in C++17
 
Javascript3
Javascript3Javascript3
Javascript3
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012
 
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascript
 
Quicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of RustQuicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of Rust
 
งานPop pornapa
งานPop pornapaงานPop pornapa
งานPop pornapa
 
GoLightly: A Go Library For Building Virtual Machines
GoLightly: A Go Library For Building Virtual MachinesGoLightly: A Go Library For Building Virtual Machines
GoLightly: A Go Library For Building Virtual Machines
 
Vocabulary Types in C++17
Vocabulary Types in C++17Vocabulary Types in C++17
Vocabulary Types in C++17
 
Reactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftReactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwift
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
Easily mockingdependenciesinc++ 2
Easily mockingdependenciesinc++ 2Easily mockingdependenciesinc++ 2
Easily mockingdependenciesinc++ 2
 
第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング
 
Thinking in Sequences - Streams in Node.js & IO.js
Thinking in Sequences - Streams in Node.js & IO.jsThinking in Sequences - Streams in Node.js & IO.js
Thinking in Sequences - Streams in Node.js & IO.js
 
Ruby on Rails Intro
Ruby on Rails IntroRuby on Rails Intro
Ruby on Rails Intro
 
2018 cosup-delete unused python code safely - english
2018 cosup-delete unused python code safely - english2018 cosup-delete unused python code safely - english
2018 cosup-delete unused python code safely - english
 

Semelhante a Groovyノススメ

Groovy for java developers
Groovy for java developersGroovy for java developers
Groovy for java developersPuneet Behl
 
Understanding java streams
Understanding java streamsUnderstanding java streams
Understanding java streamsShahjahan Samoon
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системеDEVTYPE
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with itFlavien Raynaud
 
2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Ws2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Wsloffenauer
 
Groovy 1.8の新機能について
Groovy 1.8の新機能についてGroovy 1.8の新機能について
Groovy 1.8の新機能についてUehara Junji
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyYasuharu Nakano
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5arajivmordani
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Tsuyoshi Yamamoto
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in GroovyGanesh Samarthyam
 
ekb.py - Python VS ...
ekb.py - Python VS ...ekb.py - Python VS ...
ekb.py - Python VS ...it-people
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습DoHyun Jung
 
Tips and Tricks of Developing .NET Application
Tips and Tricks of Developing .NET ApplicationTips and Tricks of Developing .NET Application
Tips and Tricks of Developing .NET ApplicationJoni
 
Java 7 at SoftShake 2011
Java 7 at SoftShake 2011Java 7 at SoftShake 2011
Java 7 at SoftShake 2011julien.ponge
 

Semelhante a Groovyノススメ (20)

Groovy for java developers
Groovy for java developersGroovy for java developers
Groovy for java developers
 
Understanding java streams
Understanding java streamsUnderstanding java streams
Understanding java streams
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with it
 
サイ本 文
サイ本 文サイ本 文
サイ本 文
 
2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Ws2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Ws
 
Java 7 & 8 New Features
Java 7 & 8 New FeaturesJava 7 & 8 New Features
Java 7 & 8 New Features
 
Java 7 LavaJUG
Java 7 LavaJUGJava 7 LavaJUG
Java 7 LavaJUG
 
Groovy 1.8の新機能について
Groovy 1.8の新機能についてGroovy 1.8の新機能について
Groovy 1.8の新機能について
 
Groovy Basics
Groovy BasicsGroovy Basics
Groovy Basics
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
 
The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5a
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in Groovy
 
ekb.py - Python VS ...
ekb.py - Python VS ...ekb.py - Python VS ...
ekb.py - Python VS ...
 
Sbaw091006
Sbaw091006Sbaw091006
Sbaw091006
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습
 
Tips and Tricks of Developing .NET Application
Tips and Tricks of Developing .NET ApplicationTips and Tricks of Developing .NET Application
Tips and Tricks of Developing .NET Application
 
Java 7 at SoftShake 2011
Java 7 at SoftShake 2011Java 7 at SoftShake 2011
Java 7 at SoftShake 2011
 

Mais de Takuma Watabiki

「普通の設計」をするということ
「普通の設計」をするということ「普通の設計」をするということ
「普通の設計」をするということTakuma Watabiki
 
バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -
バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -
バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -Takuma Watabiki
 
『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?
『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?
『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?Takuma Watabiki
 
Grailsでドメイン駆動設計を実践する時の勘所
Grailsでドメイン駆動設計を実践する時の勘所Grailsでドメイン駆動設計を実践する時の勘所
Grailsでドメイン駆動設計を実践する時の勘所Takuma Watabiki
 
Spring in-summer-gradle-hands on-withanswers
Spring in-summer-gradle-hands on-withanswersSpring in-summer-gradle-hands on-withanswers
Spring in-summer-gradle-hands on-withanswersTakuma Watabiki
 
システム開発を前進させるためのGradle導入法
システム開発を前進させるためのGradle導入法システム開発を前進させるためのGradle導入法
システム開発を前進させるためのGradle導入法Takuma Watabiki
 
Gradleどうでしょう
GradleどうでしょうGradleどうでしょう
GradleどうでしょうTakuma Watabiki
 
Jjug 20140430 gradle_basic
Jjug 20140430 gradle_basicJjug 20140430 gradle_basic
Jjug 20140430 gradle_basicTakuma Watabiki
 
スーパー戦隊進化論
スーパー戦隊進化論スーパー戦隊進化論
スーパー戦隊進化論Takuma Watabiki
 
G*におけるソフトウェアテスト・シーズンIII
G*におけるソフトウェアテスト・シーズンIIIG*におけるソフトウェアテスト・シーズンIII
G*におけるソフトウェアテスト・シーズンIIITakuma Watabiki
 

Mais de Takuma Watabiki (16)

「普通の設計」をするということ
「普通の設計」をするということ「普通の設計」をするということ
「普通の設計」をするということ
 
バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -
バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -
バックエンドのエンジニアがiOSアプリ開発をやってみて思うこと - フロントエンドのアーキテクチャの考察 -
 
『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?
『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?
『現場で役立つシステム設計の原則』は一般的なSI現場で役立つのか?
 
Grailsでドメイン駆動設計を実践する時の勘所
Grailsでドメイン駆動設計を実践する時の勘所Grailsでドメイン駆動設計を実践する時の勘所
Grailsでドメイン駆動設計を実践する時の勘所
 
JGGUG Community LT 2016
JGGUG Community LT 2016JGGUG Community LT 2016
JGGUG Community LT 2016
 
Spring in-summer-gradle-hands on-withanswers
Spring in-summer-gradle-hands on-withanswersSpring in-summer-gradle-hands on-withanswers
Spring in-summer-gradle-hands on-withanswers
 
システム開発を前進させるためのGradle導入法
システム開発を前進させるためのGradle導入法システム開発を前進させるためのGradle導入法
システム開発を前進させるためのGradle導入法
 
Gradleどうでしょう
GradleどうでしょうGradleどうでしょう
Gradleどうでしょう
 
Jjug 20140430 gradle_basic
Jjug 20140430 gradle_basicJjug 20140430 gradle_basic
Jjug 20140430 gradle_basic
 
Spock's world
Spock's worldSpock's world
Spock's world
 
スーパー戦隊進化論
スーパー戦隊進化論スーパー戦隊進化論
スーパー戦隊進化論
 
Gws in fukuoka
Gws in fukuokaGws in fukuoka
Gws in fukuoka
 
Devsumi2012 JGGUG LT
Devsumi2012 JGGUG LTDevsumi2012 JGGUG LT
Devsumi2012 JGGUG LT
 
Spockを使おう!
Spockを使おう!Spockを使おう!
Spockを使おう!
 
G*Magazineを読もう
G*Magazineを読もうG*Magazineを読もう
G*Magazineを読もう
 
G*におけるソフトウェアテスト・シーズンIII
G*におけるソフトウェアテスト・シーズンIIIG*におけるソフトウェアテスト・シーズンIII
G*におけるソフトウェアテスト・シーズンIII
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Groovyノススメ

  • 1. Groovy 2009.12.12 DevLOVE 2009 Fusion takuma.watabiki@jggug.org
  • 2. JGGUG Grails/Groovy twitter id : bikisuke
  • 10. Groovy • JVM • • • Java • Ruby Python, Smalltalk
  • 11. Java
  • 12.
  • 13. Java C)
  • 14. Java Groovy C)
  • 15. Groovy Java Java
  • 16. Groovy Java Java
  • 17.
  • 19. import java.io.*; import java.util.regex.*; public class ErrorExtractor { public static void main(String[] args) { BufferedReader br = null; BufferedWriter bw = null; try { br = new BufferedReader(new InputStreamReader( new FileInputStream(new File("/work/server.log")))); bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream("/work/errorlist.log"))); String line = null; Pattern p = Pattern.compile(".*ERROR.*"); while((line = br.readLine()) != null) { Matcher m = p.matcher(line); if(m.matches()) bw.write(line + "¥n"); } } catch (Exception e) { } finally { try { br.close(); bw.close(); } catch(Exception e) {} Java } } }
  • 20. import java.io.*; import java.util.regex.*; public class ErrorExtractor { public static void main(String[] args) { BufferedReader br = null; BufferedWriter bw = null; try { br = new BufferedReader(new InputStreamReader( new FileInputStream(new File("/work/server.log")))); bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream("/work/errorlist.log"))); String line = null; Pattern p = Pattern.compile(".*ERROR.*"); while((line = br.readLine()) != null) { Matcher m = p.matcher(line); if(m.matches()) bw.write(line + "¥n"); } } catch (Exception e) { } finally { try { br.close(); bw.close(); .groovy } catch(Exception e) {} } } }
  • 21. import java.util.regex.*; BufferedReader br = null; BufferedWriter bw = null; try { br = new BufferedReader(new InputStreamReader( new FileInputStream(new File("/work/server.log")))); bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream("/work/errorlist.log"))); String line = null; Pattern p = Pattern.compile(".*ERROR.*"); while((line = br.readLine()) != null) { Matcher m = p.matcher(line); if(m.matches()) bw.write(line + "¥n"); } } catch (Exception e) { } finally { try { br.close(); bw.close(); main } catch(Exception e) {} }
  • 22. import java.util.regex.*; BufferedReader br = new BufferedReader(new InputStreamReader( new FileInputStream(new File("/work/server.log")))); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream("/work/errorlist.log"))); String line = null; Pattern p = Pattern.compile(".*ERROR.*"); while((line = br.readLine()) != null) { Matcher m = p.matcher(line); if(m.matches()) bw.write(line + "¥n"); } br.close(); bw.close(); try-catch
  • 23. File f = new File("/work/errorlist.log") new File("/work/server.log").eachLine { line -> if(line =~ ".*ERROR.*") { f.append(line + "¥n") } } Groovy
  • 24.
  • 25. import java.io.*; import java.util.regex.*; public class ErrorExtractor { public static void main(String[] args) { BufferedReader br = null; BufferedWriter bw = null; try { br = new BufferedReader(new InputStreamReader( new FileInputStream(new File("/work/server.log")))); bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream("/work/errorlist.log"))); String line = null; Pattern p = Pattern.compile(".*ERROR.*"); while((line = br.readLine()) != null) { Matcher m = p.matcher(line); if(m.matches()) bw.write(line + "¥n"); } } catch (Exception e) { } finally { try { br.close(); bw.close(); } catch(Exception e) {} } } }
  • 26. File f = new File("/work/errorlist.log") new File("/work/server.log").eachLine { line -> if(line =~ ".*ERROR.*") { f.append(line + "¥n") } }
  • 27.
  • 28. • • Expando Meta Class • Grape • Mixin • AST • ...
  • 30.
  • 34.
  • 36. Hudson kkawa Groovy ※ ※2008 SDC SQUARE
  • 38. Q.
  • 39. A. Hudson CLI groovy groovysh
  • 40. Q. Scala
  • 41. A. Groovy
  • 42. Q.
  • 43. A. Groovy ! Groovy @torazuka
  • 45. A. Groovy JOJO Groovy
  • 46. A. Groovy JOJO Groovy
  • 48. A.
  • 50. Groovy JGGUG
  • 51. Groovy JGGUG
  • 52.
  • 53.
  • 54.
  • 55. Groovy JVM Java