文章列表
 
您正在查看 "Groovy" 分类下的文章

2011-08-05 14:41

We are staying in front of new world - all major browsers either support already or plan to support in next major version HTML5 (not in scope of this article) & WebSockets (main subject of the article). In 6 to 9 months we as application developers will have in our hands extremely powerful client side tools to build new generation of the Web. But are we ready on server side? And if not, what the point in having powerful and reliable communication channel between browser and server a

 
2009-12-03 23:58

实战 Groovy 系列

developerWorks
 
2009-10-18 14:42
following modules and contributions are currently available:
 
2009-10-18 14:16
推荐文章
Groovy简介 Groovy解惑系列
 
2009-10-18 1:06

We can pad and center strings:

assert 'hello'.padRight(8,'+').padLeft(10,'+') == '++hello+++'
assert 'hello'.padLeft(7).padRight(10) == '  hello   '
assert 'hello'.center(10, '+')
 
2009-10-17 21:07

import java.lang.annotation.*

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@interface Anno {
   
String value() default ""
}

class Foo {
   
@Anno("A cool method!")
   
void method() {}
}

def f = new Foo()

def method = Foo.getMethod("method", [] as Class[])
assert method.isAnnotationPresent(Anno)
assert me

 
2009-10-17 15:30

import groovy.xml.*


def out = new StringWriter()
def xml = new MarkupBuilder(out)


data = [[type: 'dog', name: 'fido', barkVolume: 'loud'],
      
[type: 'cat', name: 'moggy', remainingLives: 9],
      
[type: 'budgie', wingSpan: 3]]


xml.pets() {

data.each {item ->

pet() {
   
item.each { attributes ->

 
 
   
 
 
文章分类
 
   
 
文章存档
 
     
 
最新文章评论
  

gss
 

学习了
 

很精辟,希望有时间能跟楼主讨论学习。
 

苦难中的中国?苦难中的中国人民? 在这里记录。。。
 

那悲剧了。。。。
   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu