代码如下,里面有注释,应该能看懂。function getFile(file_name) local f = assert(io.open(file_name, 'r')) local string = f:read("*all") f:close() return str...
分类:
系统相关 时间:
2014-08-12 18:51:24
阅读次数:
981
var imagesrcname='a',thissrolltop=300, lazyLoad=(function(){ var map_element = {}, element_obj = [], download_count = 0, last_offset =...
分类:
其他好文 时间:
2014-08-12 18:43:54
阅读次数:
205
lua 中处理cocos2dx 的button 事件 2014-05-08 09:44:32|分类: lua |举报 |字号订阅 1、引入这个类:require "GuiConstants"2、下面是回调函数的处理.local function menuZhuCeCallback(sender,ev...
分类:
其他好文 时间:
2014-08-12 18:43:14
阅读次数:
208
在model中定义public function rules(){ return array( array('Name,Email','required'), array('Email','unique','message'=>'{value...
分类:
其他好文 时间:
2014-08-12 18:31:14
阅读次数:
199
$('.F_box_2').hover( function(){ $(this).find(".make_reply").css({"color":"#c00","text-decoration":"underline","background-position":"12px -147px"}); ...
分类:
其他好文 时间:
2014-08-12 18:29:54
阅读次数:
189
1.为了使用如图效果(即将按钮放入行内http://www.datatables.net/examples/ajax/null_data_source.html)采用了另一个数据格式2.后台php,取表格数据变为:public function initable(){ $db = M('ya...
分类:
Web程序 时间:
2014-08-12 18:08:34
阅读次数:
631
function randomDate() { //echo date( "Y-m-d H:m:s", $newtime); //echo date("Y-m-d H:m:s", strtotime("+2 week 1 days 7 hours 5 seconds")); $b...
分类:
Web程序 时间:
2014-08-12 18:07:04
阅读次数:
178
#!/bin/bash
#unzip?zip&tar?file
function??untarfile(){
for?i?in?$(?ls?.?|grep?-v?.sh)
do
val=$(echo?$i?|?grep?".zip$"?|wc?-l)
if?[[?"$val"??-eq??1?]];then
dirname=$(echo?...
分类:
其他好文 时间:
2014-08-12 17:47:04
阅读次数:
237
WebSocket JavaScript API(client) <script>
var URL = "ws://localhost:8080/WebSocketChatRoom/chatRoomServer";
var websocket;
var userName;
function setConnected(connected) {
...
分类:
Web程序 时间:
2014-08-12 17:46:54
阅读次数:
304
function?getPageSize(){
????????var?xScroll,yScroll;
????????if?(window.innerHeight?&&?window.scrollMaxY){
????????????xScroll?=?window.innerWidth?+?win...
分类:
编程语言 时间:
2014-08-12 17:46:04
阅读次数:
226