文章发布实例这个例子,因为前两章是字符串处理和正则表达式,所以重点也就用了这些内容。
首先,进的事post.php这个文件
发表文章演示
选项
删除HTML标签
转换HTML标签为实体
使用UBB代码
开启URL识别
<li title="可用的表情:
【:), /wx, 微笑】【:@, /fn, 发...
分类:
Web程序 时间:
2014-06-29 07:19:34
阅读次数:
227
各位小盆友使用前记得打开 GD 库的支持哦,附上代码。
<?php
/**
* 生成缩略图函数(支持图片格式:gif、jpeg、png和bmp)
* @author ruxing.li
* @param string $src 源图片路径
* @param int $width 缩略图宽度(只指定高度时进行等比缩放)
* @param int $wid...
分类:
Web程序 时间:
2014-06-20 10:20:32
阅读次数:
307
题目
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
方法
和有序数组的思想基本一样,将链表进行二分。
TreeNode getBST(ListNode head, int len) {
i...
分类:
其他好文 时间:
2014-06-20 09:46:33
阅读次数:
267
代码清单:
<?php
/**
* 获取当前页面的完整 url
* @author ruxing.li
* @return string
*/
function getPageUrl(){
$url = (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') ? 'https://' : 'http...
分类:
Web程序 时间:
2014-06-07 13:16:27
阅读次数:
250
【题目】
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
1
2
3
4
\...
分类:
其他好文 时间:
2014-06-07 11:37:00
阅读次数:
153
Partition ListGiven a linked list and a valuex,
partition it such that all nodes less thanxcome before nodes greater than or
equal tox.You should pres...
分类:
其他好文 时间:
2014-06-07 06:24:57
阅读次数:
179
Given a linked list, reverse the nodes of a
linked list k at a time and return its modified list. If the number of nodes is
not a multiple of k then l...
分类:
其他好文 时间:
2014-06-05 22:13:19
阅读次数:
391
简单题。 1 #include 2 3 #define MAXN 100005 4 5 int
wi[MAXN], li[MAXN]; 6 int diff[MAXN=0 || total+diff[i]>=0) {20 total +=
diff[i];21 ...
分类:
其他好文 时间:
2014-06-05 20:08:55
阅读次数:
355
1、打开或编辑CSS,用UltraEdit2、Content(内容)web
developer(组件扩展),学习CSS的工具14、W3C,最官方的CSS,www.w3.org/TB/CSS2115、列表项:li元素,有序列表:ol元素,标题元素:h1->h6,段落:p元素16、表单不可能在各种浏览器...
分类:
Web程序 时间:
2014-06-05 18:09:45
阅读次数:
283
Given a linked list, swap every two adjacent
nodes and return its head.For example,Given1->2->3->4, you should
return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-06-05 13:41:44
阅读次数:
231