- 博客(5)
- 资源 (7)
- 收藏
- 关注
原创 对c语言指针的理解
对于下面这一段常见的代码:#includevoid swap(int u, int v){ int temp; temp = u; u = v; v = temp; }int main(){ int x = 2, y = 3; printf("Originally x = %d and y = %d.\n", x, y); s
2014-12-31 09:52:02 632
原创 整型数在做除法时整型和浮点型的转换
#includeint main(int argc, const char *argv[]){ //两个整数相除,得到的还是整数;后面的小数部分会被直接舍去 float answer = 17 / 13; printf("%.2f\n", answer); return 0;}运行结果:浮点数的转换:#includeint main(i
2014-12-29 13:25:28 17779
原创 关于正则表达式分组的一个问题
先来看一段php代码:<?php$pattern = '/(\d+\.?)+/'; //regular expression$string = '192.168.210';if (preg_match_all($pattern, $string, $arr)){ echo 'Matching well'; echo ''; print_r($arr);
2014-12-18 21:00:27 822
原创 PHP中数据库抽象层PDO获取数据表字段名的方法
当我在使用PHP数据库抽象层PDO的时候,由于在我的项目中要用到一个数据表的字段名,比如:+----+-----------+------------------------------------+-----------+| id | catename | intro |parent_id|+----+------
2014-12-13 20:25:01 4517
原创 php中函数 isset(), empty(), is_null() 的区别
先来看看php的 PHP type comparison tables:可参考http://php.net/manual/en/types.comparisons.phpNULL:当你在你的脚本中写下这样一行代码$myvariable; //此处你想定义一个变量,但未赋值。会有Notice: Undefined variableecho $myvari
2014-12-08 19:01:49 21327
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人