This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 后台JS操作对象 | |
*/ | |
var admin = {}; | |
/** | |
* 注意表格外围必须有一个input为list的标签 | |
* 获取选中的数据批量操作 | |
*/ | |
admin.getChecked = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* zhoumengkang < i@zhoumengkang.com > | |
* NBA数据采集 | |
*/ | |
set_time_limit(0); | |
//定义数据库常量(换成你的数据库帐号密码) | |
define(HOST, 'localhost'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* curl实例 | |
* 第一步:存储cookie | |
* 第二步:使用cookie,模拟提交查询 | |
*/ | |
set_time_limit(0);//页面的超时限制 | |
date_default_timezone_set("PRC"); | |
define('TIMEOUT',5); | |
//存cookie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="{:THEME_PUBLIC_URL}/js/jquery.js"></script> | |
<form action="{:U('news/Index/doJoin')}" method="post" name="join"> | |
<input type="text" name="username" id="username" ><span class="username"></span> | |
<input type="email" name="email" id="email"><span class="email"></span> | |
<input type="text" name="company" id="company"><span class="company"></span> | |
<input type="text" name="job" id="job"><span class="job"></span> | |
<input type="text" name="tel" id="tel"><span class="tel"></span> | |
<input type="text" name="qq" id="qq"><span class="qq"></span> | |
<input type="text" name="weixin" id="weixin"> | |
<input type="text" name="verify" id="verify"><img src="__ROOT__/public/captcha.php" id="verifyimg" alt="{:L('PUBLIC_CHANGE_ONE')}" style="vertical-align:middle;padding:0 5px 0 0" onclick="changeverify()"/></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 系统变量名称设置 */ | |
'VAR_GROUP' => 'g', // 默认分组获取变量 | |
'VAR_MODULE' => 'm', // 默认模块获取变量 | |
'VAR_ACTION' => 'a', // 默认操作获取变量 | |
当前方法里面的分组名,模型名,方法名 | |
echo ACTION_NAME; | |
echo MODULE_NAME; | |
echo GROUP_NAME; | |
控制url的访问方式和U函数的构造 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 朋友分享的闭包的坑,我保存一份学习 | |
// closure caveat | |
// case 1 | |
;(function (window, $, undefined) { | |
var $target; | |
function howdy() { | |
var x = 'foo'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************** | |
* * | |
* Sociax HTML 标签关联模型 * | |
* * | |
****************************************************/ | |
/** | |
* HTML 标签关联模型 | |
* @model-node 模型节点的标签属性标记 | |
* @event-node 模型下事件节点的标签属性标记 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
'写了一个简单的支持中文的正向最大匹配的机械分词,其它不用解释了,就几十行代码' | |
'搜狗词库下载地址:http://vdisk.weibo.com/s/7RlE5' | |
import string | |
__dict = {} | |
def load_dict(dict_file='words.dic'): | |
'加载词库,把词库加载成一个key为首字符,value为相关词的列表的字典' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Format Tree | |
**/ | |
class FORMATTREE | |
{ | |
function formatTree($arr,$child_key='id',$parent_key='parent_id') { | |
$tree = array(); | |
foreach ($arr as $val) { | |
if ( isset($arr[$val[$parent_key]]) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include '../../nb.php'; | |
include '../../config.php'; | |
include 'config.php'; | |
include 'do.php'; | |
$db=\publish\obj::db(); | |
$year = $_GET['year']; | |
$sql = 'select a.year,a.guid,a.description,b.description as pic_des,c.year as pic_year ,c.month as pic_month,c.day as pic_day,c.file as pic_file from m_honor2_honor2 a, m_honor2_pics b, sys_file c where a.year = '.$year.' and b.honor2_guid = a.guid and b.image= c.guid order by a.order_is asc'; |
NewerOlder