`
bishen
  • 浏览: 11648 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表

iconv_test.go

package iconv import ( "testing" ) type iconvTest struct { description string input string inputEncoding string output string outputEncoding string bytesRead int bytesWritten int err Error } var iconvTests = []iconvTest { iconvTest{ "simple utf-8 to la ...
/* Wraps the iconv API present on most systems, which allows for conversion of bytes from one encoding to another. This package additionally provides some convenient interface implementations like a Reader and Writer. */ package iconv /* #include <errno.h> */ import "C" im ...
c下面有个著名的curl,libcurl与lua绑在一起就是luacurl,在lua包里例子程序里有curltest.lua测试程序。抓取网页程序得依靠这个库。下面是搜的一段程序,注释是我加的。 curl = require "luacurl" function get_html(url, c)     local result = { }     if c == nil then         c = curl.new()     end     c:setopt(curl.OPT_URL, url)     c:setopt(curl.OPT_WRITEDATA, ...
1.单击事件___onclick 用户单击鼠标按键时产生的事件.同时onclick指定的事件处理程序或代码将被调用执行. 如:<input type="button" value="打开页面" onlick="window.open('xxxx.html','newwindow','width=456,height=230,toolbar=no,menubar=no,scrollbars=yes');"> 2.改变事件___onchange 当text或textarea元素内的字符值改变或select表格选项状态改变里发 ...
/* * MAP对象,实现MAP功能 * * 接口: * size()     获取MAP元素个数 * isEmpty()    判断MAP是否为空 * clear()     删除MAP所有元素 * put(key, value)   向MAP中增加元素(key, value) * remove(key)    删除指定KEY的元素,成功返回True,失败返回False * get(key)    获取指定KEY的元素值VALUE,失败返回NULL * element(index)   获取指定索引的元素(使用element.key,element.value获取KEY和 ...
//原创作者:bishen //转载注明:http://www.bishen.org 貌似在网上还没有用groovy连接池的文章 首先在tomcat/lib放入数据库驱动 tomcat/config/content.xml 配置连接池名为jdbc/admin <Resource name="jdbc/admin" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" username="root" passwo ...
<script> function $(id) {   return document.getElementById(id); } var LoginUI = !!window.LoginUI || {}; LoginUI.getViewportWidth = function(){     var width=0;     if(document.documentElement && document.documentElement.clientWidth){     width=document.documentElement.clientWidth;}     ...
Global site tag (gtag.js) - Google Analytics