`
Javabengou
  • 浏览: 170612 次
  • 性别: Icon_minigender_1
  • 来自: 郴州
社区版块
存档分类
最新评论
文章列表
Qt 4 C++ GUI 编程 不知道谁有???
如果大家碰到什么关于Groovy&&Grails的问题,可以发帖到此处http://groups.google.com/group/grailsdoc?hl=zh-CN   也希望大家能帮助别人,同时也会得到别人的帮助
N久没写东西,今天突发想法,写下来,废话少说,干活,先看几段代码:  求和   def sum(n) { total = 0 for(int i = 2; i <= n; i += 2) { total += i } total } println "Sum of even numbers from 1 to 10 is ${sum(10)}"    乘法   def product(n) { prod = 1 for(int i = 2; i <= n; i += 2) { prod *= i } ...
最近弄了个grails tinymce下的代码高亮插件: 界面图: 对话框: 渲染代码: 对文本的处理: 输入文本: 当然这个可能存在很多问题,不过如果大家有这个需要,可以联系我,打包给大家,让大家一起来完善。    
网上已经有用dreamweaver 8打开gsp文件 。那么这里我就介绍下用dreamweaver CS3打开gsp文件 基本原理还是一样的,只是修改的文件的位置不同: 1 打开dw CS3安装时的目录   \Documents and Settings\username\Application Data\Adobe\Dreamweaver 8\Configuration, 在其中的extenstion.txt文件中的第一行,有很多文件后缀的,加入gsp 在最后一行,加入 gsp:grails文件。   这样以后dw8里,打开的设置里,可以选出gsp的文件来打开 2 打开DW CS3安装路径\ ...
经过我们大家的努力Grails中文文档终于面试了 下载抵制 beta版的url: http://www.chinagroovy.org/grails-doc/index.html ,beta 版下载: http://wiki.redsaga.com/confluence/download/attachments/2458/grails-doc-1.0-beta1.tar.gz
正則表達式就像一把瑞士軍刀。 "potatoe" ==~ /potatoe/  假如你在groovyConsole運行它,將返回true.這裡有兩件需要注意的事情: 1.==~操作符。它類似于==操作符,但是用於匹配模式而不是計算相等性。 2.正則表達式包含在 '/'中.它會告訴Groovy這是個正則表達式而不是String. "potatoe" ==~ /potatoe?/ "potato" ==~ /potatoe?/  這裡?表達的意思是'e'是可選的。 "motato" ==~ /potatoe?/ 沒有 ...
(-)变量 你可以给变量赋值. 像下面: x = 1 println x x = new java.util.Date() println x x = -3.1499392 println x x = false println x x = "Hi" println x  (二)Lists and Maps Groovy已经内置支持两种重要的数据类型, lists 和maps((Lists就像java中的数组一样来操作))Lists用来存储有序集合数据,例如: myList = [1776, -1, 33, 99, 0, 928734928763]  你可以使用[]来存取给 ...
关于Grails乱码的问题 个人测试了以后 还是属于编辑器的问题 对于IDEA来说安装后,默认的使用系统编码(GB2312),我们最好是设置成UTF-8 其实挺简单的 按照下面图中的步骤,就可以在IDEA中解决Grails乱码的问题     选择Settings-->General修改下图的编码设置就OK了!         对于其他网站说的修改文件,在这里就没有必要了,不需要修改任何文件 如果你把grails.views.gsp.encoding="UTF-8"修改成GBK的话,编辑器里不会出现乱码,但是网页中显示的将会是乱码,毕竟你设置了两个不同的编码! ...
h4. Returning the Modelh4. 返回模型(Model)A model is essentially a map that the view uses when rendering. The keys within that map translate to variable names accessible by the view. There are a couple of ways to return a model, the first way is to explicitly return a map instance:模型(Model)本质上是个map类型,当视图 ...
h4. Available Scopesh4.可用范围(Scopes)Scopes are essentially hash like objects that allow you to store variables. The following scopes are available to controllers:范围(Scopes)本质上就像hash对象,允许你存储变量。下列为controllers(控制器)可用范围(Scopes):* [servletContext|controllers] - Also known as application scope, this scope a ...
h4. Creating a controllerh4. 创建控制器(Controllers)Controllers can be created with the [create-controller|commandLine] target. For example try running the following command from the root of a Grails project:控制器(Controllers)可以使用[create-controller|commandLine]目标来创建.作为示例可以在Grails根目录下尝试运行下列命令。{code:java}grai ...
A controller handles requests and creates or prepares the response and is request-scoped.  In other words a new instance is created for each [request|controllers]. A controller can generate the response or delegate to a view. To create a controller simply create a class whose name ends with @Controll ...
翻译自《Groovy in action》,如有不准确之处,希望指教! closures(闭包)很重要,非常的重要!!!可以被认为是Groovy中一个非常有用的特性。同时,在你没有完全了解它之前会是一个陌生的概念。为了发挥Groovy最大功效,或者 ...
h4. Using the render method to output XML h4. 使用render输出XML Grails' supports a few different ways to produce XML and JSON responses. The first one covered is via the [render|controllers] method. Grails提供一些不同的方法来产生XML和JSON响应。第一个是隐式的通过[render|controllers]方法。 The @render@ method can be passed a block o ...
Global site tag (gtag.js) - Google Analytics