1 /* 2 1.获取系统当前时间 3 2.Date-->String 4 3.String-->Date 5 */ 6 import java.util.Date; 7 import java.text.SimpleDateFormat; 8 9 public clas...
分类:
其他好文 时间:
2015-04-29 23:04:05
阅读次数:
132
二叉树,后续遍历
#include
using namespace std;
string ans;
int n;
void build(int l,int r)
{
int mid=(r+l)/2;
if(l!=r)
{
build(l,mid);
build(mid+1,r);
}
int num0=0,num1=0;
for(int i=l;i<=r;i++)
{
...
分类:
其他好文 时间:
2015-04-29 21:47:03
阅读次数:
127
原文地址:http://rsljdkt.iteye.com/blog/774188 1 #include "stdafx.h" 2 #include "stdlib.h" 3 #include 4 using namespace std; 5 6 class String ...
分类:
其他好文 时间:
2015-04-29 21:31:00
阅读次数:
110
Python内置了一些非常有趣但非常有用的函数,充分体现了Python的语言魅力!filter(function, sequence):对sequence中的item依次执行function(item),将执行结果为True的item组成一个List/String/Tuple(取决于sequence...
分类:
编程语言 时间:
2015-04-29 21:30:14
阅读次数:
172
js代码 /** 获取UTC格式的字符串,参数必须是*/var solrDateFormat = function (o){ var date; if(typeof o == 'string'){ date = new Date(o); }else if(o instanceof Date){ .....
分类:
Web程序 时间:
2015-04-29 21:29:31
阅读次数:
225
/*
*copyright(c) 2015,烟台大学计算机学院
*All rights reserved。
*文件名称:第八周(字符串类)
*作者:王忠
*完成日期:2015.4.29
*版本号:v1.0
*
*问题描述:构造String类的加、减运算。其中,s1 + s2将两个字符串的连接起来;s1 - s2是将s1的尾部空格和s2的前导空格去除后的连接。
提示:有指针成员,设...
分类:
其他好文 时间:
2015-04-29 19:57:06
阅读次数:
196
转载自:http://www.phpernote.com/php-function/633.html/*** 多个连续空格只保留一个** @param string $string 待转换的字符串* @return string $string 转换后的字符串*/function merge_spa...
分类:
Web程序 时间:
2015-04-29 19:31:47
阅读次数:
141
C#九九乘法表 1 static void Main(string[] args) 2 { 3 for (int i = 1; i < 10; i++) 4 { 5 for (int j = 1; j <= i; j++) 6 ...
分类:
编程语言 时间:
2015-04-29 19:27:57
阅读次数:
147
#include #include using namespace std;namespace strtool{string trim(const string& str){ string::size_type pos = str.find_first_not_of(' '); if (...
分类:
编程语言 时间:
2015-04-29 19:18:09
阅读次数:
191