- 博客(10)
- 资源 (9)
- 收藏
- 关注
原创 Thinkphp分页时查询条件保存方法
web应用中经常要根据用户提交的查询条件进行过滤,再以列表方式显示在浏览器上.如果这种查询是多种条件的组合,并要进行分页显示,则如何在分页导航中保持查询条件,是必须解决的问题.在Thinkphp中, 已有分页类"ORG.Util.Page",并且可以用$page->parameter保存查询参数, 但可能是受示例程序的影响,很多tper纠结于$page->parameter不能保存一些复杂条件
2013-08-04 20:17:54 2134
原创 CentOS设置防火墙只允许内网用户访问服务器
用户环境是一个局域网,adsl连接internet,有10多台pc,1台服务器.这台服务器安装的是CentOS5.8,主要运行一个特殊软件,工程人员在各自pc上用XManager登录服务器使用该软件,另外开放ftp功能以便传递工程文件.现在用户的要求是服务器需要与internet隔离,以保护数据,但不能影响其他pc正常上网,也不能影响其他pc访问该服务器思路: 用centos自
2012-10-23 18:08:04 9753
原创 PHP实现提取一个图像文件并显示在浏览器上
去年做过一个项目,要把用户上传的图像文件列出文字清单,当用户点击一个文件名后,就可以显示这个图像.因为要考虑兼容各种不同的图像格式, 我使用了GD库, 判断出具体是那种图像文件(MINE),再调用相应的image生成函数imagecreatefromXXX(),生成一个img,再将这个img以jpeg格式输出至浏览器,虽然做出来了,但总觉得不满意.今天有机会重新考虑这个功能,在php手册中
2012-09-02 23:13:26 595
原创 php生成"局部唯一识别码"LUID
UUID(Universally Unique Identifier),GUID都是希望在整个时空范围内能产生唯一识别码,这在分布式计算环境下是必要的. 然而,如果仅仅是想在一个受限定的局部环境下,想生成一个"局部唯一识别码",使用UUID就是杀鸡用牛刀,这个"局部唯一识别码",我称之为LUID(Local Unique Identifier) 比如我在用php开发网站程序时,为避免用户同时多
2012-08-10 15:52:22 815
原创 在PHP开发中使用ReportAll报表控件
前段时间做一个web项目,需要打印证照功能,一开始是采用生成pdf文件再发到本地打印的方法,在客户实际使用中发现不太灵活,主要是在不同打印机环境下,偏移量不太好设定,另外客户想自行调整打印内容,比如字体大小,这个用pdf就比较麻烦了,于是在网上找了一下,看有没有好的web打印方案,发现了reportall这个软件,试用了一下,感觉还不错,而且普通版是免费使用的.现在就和大家分享一下使用心得一.
2012-06-17 10:01:35 5927
原创 PHP中3种生成XML文件方法的速度比较
有3种方法,分别是直接写;使用DomDocument;使用SimpleXML;其实还有第4种:使用XMLWriter,不过我没用过,也懒得试了.主要是想看看这3种方式哪个速度要快些直接上代码:private function directWriteXml(&$data){ $xmltext=''; $xmltext .=''; $xmltext .='';
2012-01-01 23:41:11 954
原创 PHP面向对象学习笔记之二:生成对象的设计模式
一. 单例模式(Singleton) 如果应用程序每次包含且仅包含一个对象,那么这个对象就是一单例. 用来替代全局变量.<?phprequire_once("DB.php");class DatabaseConnection{ public static function get(){ static $db = null; if ( $db == null
2011-12-25 01:21:02 688
原创 PHP面向对象学习笔记之一:基础概念
1> if( "false" ) 等效于 if( true), 因为非空字符串是true2> 检查数据类型: is_array(); is_object(); is_string(); is_null(); is_integer();3> PHP5 引入类的类型提示(type hint),用来约束一个方法的参数类型(不是基本数据类型,而
2011-12-24 22:05:58 428
原创 Thinking In UML学习笔记一
一.Modeling:建模通过对客观事物建立一种抽象的方法用以表征事物并获得对事物本身的理解,同时把这种理解概念化,将这些逻辑概念组织起来,构成一种对所观察的对象的内部结构和工作原理的便于理解的表达.首先要确定抽象的角度 人(actor),事(use case),物(entity),规则二. 版型stereotype三.参与者actor,主角在系统之外与系统
2011-12-23 01:21:23 793
原创 Firebug:调试PHP ajax程序的好工具
最近一直被ajax程序的错误所困扰. 为了查找定位bug费了很大的力气. 今天学了几个调试技巧和工具,觉得对我帮助很大. 总结一下,与大家分享.首先是在firefox下使用firebug发现和定位ajax服务器端的错误.因为ajax的特点, 在服务器端不能直接向页面输出,
2011-09-14 10:53:14 2200 1
tensorflow 在计算机图形学方面的应用
2022-02-09
CRF教程(An Introduction to crf for relation learnig).pdf
2020-01-27
大牛写的CRF教程-经典!
2020-01-27
Netflix Prize 完整数据集
2018-12-03
最新版simpleGraph2.7.2源码
2010-07-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人