<?php
function replace_url ($content) {
if (empty($content)) return;
//给URL地址加上 链接
$preg = '/(?:http:\/\/)?([\w.]+[\w\/]*\.[\w.]+[\w\/]*\??[\w=\&\+\%]*)/is';
$content = preg_replace($preg, '\1',...
分类:
其他好文 时间:
2014-05-12 07:17:12
阅读次数:
316
自己写的一段://goolchar* str_replace(char* source,
const char* find, const char* replace){ if (source == NULL || find == NULL ||
find == "") return strdup.....
分类:
其他好文 时间:
2014-05-12 02:42:20
阅读次数:
418
/*1、线性表练习(1)从给定顺序表A中删除元素值在x到y(x=x&&A[i]max)
max=A[i]; else if(A[i]data=e; L->next=NULL; } else { if(i==1) ...
分类:
其他好文 时间:
2014-05-11 23:26:26
阅读次数:
384
public class ThreadTest implements Callable {
public String call() throws Exception {
// TODO Auto-generated method stub
wait(10000);
return "hello";
}
}调用代码:
public static void main(Stri...
分类:
编程语言 时间:
2014-05-11 21:27:24
阅读次数:
533
引用和指针有如下三种区别:1 引用必须在声明时初始化,而指针不用;2
对于NULL不能引用,而指针可以指向NULL;3
引用一旦声明,引用的对象不能改变(但对象的值可以改变);而指针可以随时改变指向的对象。引用能做到的,指针也可以,但指针更危险;(1)引用被创建的同时必须被初始化(指针则可以在任何时...
分类:
其他好文 时间:
2014-05-11 18:17:18
阅读次数:
339
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-11 18:15:52
阅读次数:
300
通过getcwd()可以获取当前工作目录。1 #include 2 3 char
*getcwd(char *cwdbuf, size_t
size);成功调用返回指向cwdbuf的指针,失败返回NULL。getcwd()的实现是《Linux/Unix系统编程手册》的练习18.5,题目如下:实现一个...
分类:
其他好文 时间:
2014-05-11 17:56:54
阅读次数:
263
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-11 16:03:43
阅读次数:
327
Search Insert Position
Total Accepted: 14091 Total
Submissions: 41005My Submissions
Given a sorted array and a target value, return the index if the target is found. If not, return the in...
分类:
其他好文 时间:
2014-05-11 05:53:03
阅读次数:
241
public class TestA {
private String ta="我是类TestA"; public String fiall() {//System.out.println(this.ta);return ta; }}
上面第一个类,作为父类
------------------------------------------------------------------...
分类:
编程语言 时间:
2014-05-11 03:37:10
阅读次数:
358