date (PHP 4, PHP 5) date — 格式化一个本地时间/日期 说明 ? string
date ( string $format [, int $timestamp ] ) 返回将整数 timestamp
按照给定的格式字串而产生的字符串。如果没有给出时间戳则使用本地当前时间。换句...
分类:
Web程序 时间:
2014-05-19 19:26:29
阅读次数:
448
【题目】
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not.
【题意】
判断给定的字符串是否是合法的...
分类:
其他好文 时间:
2014-05-18 10:08:11
阅读次数:
327
界面显示:
加密:
解密:
代码实现:
public string EncryptString(string str)
{
#region 加密程序
char[] Base64Code = new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', ...
1、
??
ZigZag Conversion
The string "PAYPALISHIRING" is
written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibili...
分类:
其他好文 时间:
2014-05-18 07:56:49
阅读次数:
407
【题目】
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit string "23"
Output: ["ad", "ae", "af", "bd", "be", "bf",...
分类:
其他好文 时间:
2014-05-18 07:30:12
阅读次数:
340
var db:NotesDatabase=session.getCurrentDatabase();
var doc:NotesDocument=db.getDocumentByUNID('80E2193C517E9B3A872578D90018D92E');
var valString:String = "";
if (doc.hasItem('BWImage')){
var nrt:Note...
分类:
其他好文 时间:
2014-05-18 06:26:33
阅读次数:
267
串“abcba”以字母“c”为中心左右对称;串“abba” 是另一种模式的左右对称。这两种情况我们都称这个串是镜像串。特别地,只含有1个字母的串,可以看成是第一种模式的镜像串。
一个串可以含有许多镜像子串。我们的目标是求一个串的最大镜像子串(最长的镜像子串),如果有多个最大镜像子串,对称中心靠左的优先选中。例如:“abcdeefghhgfeiieje444k444lmn”的最大镜像...
分类:
其他好文 时间:
2014-05-18 06:22:24
阅读次数:
169
怎样把数字转为字符串(与atoi相反)?有itoa函数吗?
用sprintf就可以了:
sprintf(string, "%d", number);同理,也可以同sprintf把long型或浮点型转换成字符串(使用%ld或%f),也就是说,可以把sprintf看成是atol或者atof的
反函数。
怎样在日期上加n天?怎样取得两个日期的时间间隔?
第一个问题,mktime接受没有...
分类:
编程语言 时间:
2014-05-18 06:20:21
阅读次数:
356
假如现在有一个Button按钮,Button按钮上有click和doubleclick事件。两个不同的事件需要进行不同的处理,这时候就需要为相应的事件注册Listener了。修改后的目录组织结构如下:1、事件基本类的编写如下:package com.event.test02;
public class Event {
public String action; // 事件名称
public...
分类:
编程语言 时间:
2014-05-18 06:17:22
阅读次数:
332
【题目】
Write a function to find the longest common prefix string amongst an array of strings.
【题意】
求一组字符串的最长公共前缀
【思路】
使用归并思想求解
要求字符串[1,2,..,k,k+1,...n]的最大公共前缀,先分别求[1,2,...k]和[k+1,...,n]的公共前缀...
分类:
其他好文 时间:
2014-05-18 05:17:53
阅读次数:
232