Tag Archive

Simple_html_dom.php常用方法

Published on 2010年10月11日 By pangyt

创建 $html = new simple_html_dom(); $html->load(‘<html><body>Hello!</body></html>’); $html->load_file(‘http://www.google.com/’); $html->load_file(‘test.htm’); $html->clear();  unset($html);   // 销毁 定位 $ret = $html->find(‘a‘, 0); $ret = $html->find(‘div[id=foo]‘); $ret = $html->find(‘div[id]‘); $ret = $html->find(‘[id]‘); $ret = $html->find(‘#foo‘); $ret = $html->find(‘.foo‘); $ret = $html->find(‘a[title], img[title]‘); $es = $html->find(”table td[align=center]‘); $e = $html->find(‘ul‘, 0)->find(‘li‘, 0); [attribute] [attribute=value] [attribute!=value] [attribute^=value] [attribute$=value] [attribute*=value] $es = $html->find(‘text‘); $es [...]

valgrind笔记

Published on 2010年10月11日 By pangyt

Valgrind 作用 使用未初始化的内存 (Use of uninitialised memory) 使用已经释放了的内存 (Reading/writing memory after it has been free’d) 使用超过 malloc分配的内存空间(Reading/writing off the end of malloc’d blocks) 对堆栈的非法访问 (Reading/writing inappropriate areas on the stack) 申请的空间是否有释放 (Memory leaks — where pointers to malloc’d blocks are lost forever) malloc/free/new/delete申请和释放内存的匹配(Mismatched use of malloc/new/new [] vs free/delete/delete []) src和dst的重叠(Overlapping src and dst pointers [...]

理解JpGraph中的术语

Published on 2010年10月11日 By pangyt

Graph 图表 曲线图 Square 正方形 Bar 条 块 Plot 平面图 图表 Margin 页面空白 Legend 图例 Stroke 击打 Area 区域 Field 字段 栏 Accelerate 累加;增速; Shadow 阴影 Odogragh 里程表 Scale 刻度 度数;规模; Needle 针 Pie 饼 Label 标签 Angle 角度 Format 格式;版式; Interval 间隔; Theme 主题; Base 出发点; Band 带 条纹 Axis 轴 Step 步 Tick [...]