ITeye博客

y雨打沙滩点点滴!!!

afeifqh · 共 41 篇文章

go资料汇总

Go官方 http://golang.org/ Go代码 http://code.google.com/p/go/ http://code.google.com/p/gomingw/downloads/list Go 语言中文翻译项目 http://code.google.com/p/golang-china/ Go语言中文论坛 http://bbs.golang-china.org/ 在线学习 http://go-tour-zh.appsp0t.com/#1 http://www.mikespook.com/learning-go/comment-page-1/#comment-4000 …

2012-11-13 14:51 · go · go · 评论(0)

2012年末计划

go php python

2012-11-05 21:23 · 评论(0)

go学习总结2-控制结构

go语言的控制结构有 if switch for if例子: func IfFunc(i int, b bool) int { // 此函数参数为int类型的i 布尔类型b 返回int类型 var k int k = 1 if b { //if 条件判断是这种形式,后面加{号 此{号必须与if同一行,放入下一行go编译出错 if i > 10 { k = 5 } else { k = 10 } } else { k = 0 } return k //返回k } func IfFunc2(i int, b bool) (n, j int) { //注意此返回值 跟 返回的形式。go特殊的命名返…

2012-11-03 19:02 · go · 评论(0)

go笔记1-helloWorld!

有一次听一个沙龙技术演讲,讲师说go是互联网时代的c,听了详细介绍以后感觉很赞,尤其是并行层面真正在语言层面上做了控制及特殊的内存管理机制等。。。 好吧,下面上先上helloWorld代码。(以后系列的博客也是以代码为主) package main //这个是必须的,所有的go文件必须以 package开头 import "fmt" // ”fmt“是go必须要引入格式化I/O的库。如果要引入多个库import用( )号包裹所有的库。例如 import ( “fmt” “strconv”) func main() { //这是主函数 fmt.Printf("hello world!")// …

2012-10-28 21:51 · go · 评论(0)

jquery select选择器初始化指定值

$("#selectId").find("option").attr("selected",true); $("#selectId").find("option").attr("selected",true);

2012-08-21 11:39 · query选择器 · 评论(0)

Quartz中时间表达式的设置-----corn表达式

Quartz中时间表达式的设置-----corn表达式 时间格式: , 分别对应: 秒>分>小时>日>月>周>年, 举例: 1.每天什么时候执行: <value>0 59 23 * * ?</value>: 如下为每天23:59:00开始执行 <value>0 1,2,3 11,12 * * ? </value>: 每天11:01,11:02,11:03; 12:01,12:02,12:03分执行任务 2.每隔多久执行: 汇总说明: Cron表达式的时间字段除允许设置数值外,还可使用一些特殊的字符,提供列表、范围、通配符等功能,细说如下: ●星号(*):可用在所有字段中,表示对应时间域的每一…

2012-07-22 20:40 · javaEE · spring定时器 Quartz · 评论(0)

js返回上一页 两种写法的区别

history.back(-1):直接返回当前页的上一页,数据全部消息,是个新页面 history.go(-1):也是返回当前页的上一页,不过表单里的数据全部还在

2012-07-05 15:15 · jsp href="javaScript:void(0);" · 评论(0)

jquery times定时器插件详细介绍

Jquery已封装JS的setTimeout 和 setInterval 方法,下面看下应用例子: JS Code $("#close-button").click(function() { $(this).oneTime(1000, function() { $(this).parent(".main-window").hide(); }); }); $("#cancel-button").click(function() { $("#close-button").stopTime(); }); jQuery Timers插件地址: http://plugins.jquery.com/pr…

2012-06-26 17:34 · jquery定时器 times · 评论(0)

freemarker list size问题

取得list的长度:${fields?size}。 而使用判断其长度的时候, <#if fields?size>0 > </#if> 竟抛出错了,说不是boolean类型, Java backtrace for programmers: ---------- freemarker.core.NonBooleanException: Error on line 132, column 22 in viewEntity_js.ftl Expecting a boolean (true/false) expression here Expression fields?size does not e…

2012-06-04 14:03 · freemarker · 评论(4)

ant 生产hibernater配置文件跟映射文件 mysql为例

<?xml version="1.0" encoding="GBK"?> <!-- default 默认的target basedir表示路径--> <project name="OA系统构建脚本" default="生成Hibernate配置文件" basedir="."> <property name="src.dir" value="${basedir}/src"/> <property name="build.dir" value="${basedir}/bin"/> <property name="xdoclet.home" value="G:\java\ant\xdoclet-p…

2012-03-01 16:31 · hibernater ant x · 评论(0)

,转--.xdoclet生成hibernate映射文件,property标签里多了access="field"问题?

打开xdoclet-plugins-1.0.3/plugins/xdoclet-plugin-hibernate-1.0.3.jar winrar打开并找到 org/xdoclet/plugin/hibernate/property.jelly文件 将其解压后将property标签中的access="${property.access}"去掉 将修改好的property.jelly 覆盖掉原来位置上的property.jelly 生成hibernate映射文件,property标签里就没有access="field"了 转自 http://blog.csdn.net/wangjun_pfc/…

2012-03-01 16:23 · javaEE · struts2 · eclipse · 评论(0)

android textview滚动条【转】

本来是想做一个显示文字信息的,当文字很多时View的高度不能超过一个固定的值,当文字很少时View的高度小于那个固定值时,按View的高度显示。因为ScrollView没有maxHeight,无法满足需求,只好另找方法了。 View本身是可以设置ScrollBar,这样就不一定需要依赖ScrollView了。TextView有个属性maxLine,这样也就满足了需求了,只要设置一个TextView带ScrollBar的,然后设置maxLine就可以了。 Xml代码 <TextView Android:id="@+id/text_view" android:layout_width="fill…

2012-02-20 16:35 · android textview 滚动条 · 评论(0)

android, contentProvider 获取通讯录

1.6获取方法 ContentResolver resolver = getContentResolver(); Cursor cursorPhone = resolver.query(People.CONTENT_URI, null,null , null,null); 2.1 获取方法 ContentResolver resolver = getContentResolver(); Cursor cursorPhone = resolver.query(ContactsContract.Contacts.CONTENT_URI null,null , null,null); 1.6将电话…

2012-02-17 17:40 · android · 评论(0)

java各种驱动 备份

java数据库连接: Access 数据库连接: 1.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); 2.DriverManager.getConnection("jdbc:odbc:"); 注:dsn为数据源 MySql 数据库连接: 1.Class.forName("com.mysql.jdbc.Driver"); 2.DriverManager.getConnection("jdbc:mysql://localhost/?user=root&password=yuyang") Oracle(thin)数据库连接: 1.Class.forNa…

2012-01-05 10:05 · javaEE · 数据库类 · 评论(0)

json 自留

new JSONObject(str) 客户端字符串转换对象的函数 JSON.stringify(object) 服务器端对象转化成字符串的函数 toString() 客户端对象转换字符串的函数 JSON.parse(str) 服务器端字符串转化成对象的函数

2011-12-01 10:45 · json · 评论(0)