https://oj.leetcode.com/problems/reverse-nodes-in-k-group/http://fisherlei.blogspot.com/2012/12/leetcode-reverse-nodes-in-k-group.html/**
*Definitionforsingly-linkedlist.
*publicclassListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
..
分类:
其他好文 时间:
2015-01-02 16:12:00
阅读次数:
238
https://oj.leetcode.com/problems/binary-tree-postorder-traversal/http://blog.csdn.net/ljphhj/article/details/21369053/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolution..
分类:
其他好文 时间:
2015-01-02 07:33:36
阅读次数:
132
https://oj.leetcode.com/problems/path-sum-ii/http://fisherlei.blogspot.com/search?q=Path+Sum+II+/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolution{
publicList<List&..
分类:
其他好文 时间:
2015-01-02 07:33:25
阅读次数:
151
if (isset ($page) && intval($page) == 1) { header('HTTP/1.1 301 Moved Permanently'); header('Location: viewthread.php?tid=' . $tid); exit ();}
分类:
其他好文 时间:
2014-12-08 10:35:47
阅读次数:
194
学习《Linux编程第四版》时遇到问题:报错:错误:‘sem_union’的存储大小未知原因:Linux2.6版内核unionsem_union联合体已被注释解决方法:重新定义sem_unionunionsemun{intval;structsemid_ds*buf;unsignedshort*array;structseminfo*__buf;};
分类:
系统相关 时间:
2014-12-07 06:44:34
阅读次数:
223
4){$num = intval($num/10000).'万';}echo $num;?> boos要求,想了下 怕忘了记一下
分类:
其他好文 时间:
2014-11-28 06:09:54
阅读次数:
148
<?php
class MY_Controller extends CI_Controller {
public function __construct() {
parent::__construct();
if(intval($this->session->userdata(‘id‘)) == 0)
redirect(site_url(‘login/index‘));...
分类:
其他好文 时间:
2014-11-26 11:41:42
阅读次数:
138
Php安全Sql注入,脚本注入,Session劫持,命令注入攻击Sql注入:数据进行转义,数据类型要转换判断,如id,要强制转换为整形。mysql语句中值要加上单引号$username=addslashes($_GET[‘username‘]);$id=intval($_GET[‘id‘]);$sql="updatemembersetusername=‘$username‘whereid=‘..
分类:
Web程序 时间:
2014-10-15 05:15:20
阅读次数:
242
如果用php的+-*/计算浮点数的时候,可能会遇到一些计算结果错误的问题,比如echo intval( 0.58*100 );会打印57,而不是58,这个其实是计算机底层二进制无法精确表示浮点数的一个bug,是跨语言的,我用python也遇到这个问题。所以基本上大部分语言都提供了精准计算的类库或函数...
分类:
Web程序 时间:
2014-09-24 15:38:26
阅读次数:
192
$filename = intval ( $_GET ['id'] ) . '.jpg'; $xmlstr = $GLOBALS ['HTTP_RAW_POST_DATA']; if (empty ( $xmlstr )) { $xmlstr = file_get_contents ...
分类:
Web程序 时间:
2014-09-16 01:32:09
阅读次数:
166