题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What co...
分类:
其他好文 时间:
2014-12-25 22:06:30
阅读次数:
276
找到最多含有两个不同字符的子串的最长长度。例如:eoeabc,最长的是eoe为3,其他都为2.思路:用p1,p2表示两种字符串的最后一个出现的下标位置。初始p1为0. p2为-1.start初始化为0,表示两种字符串的开头。只要遍历一次string就可以得到结果了。首先我们要确定p2的值,那么i要一...
分类:
其他好文 时间:
2014-12-25 21:47:44
阅读次数:
150
简单JSP代码图片加水银文字try { String path = request.getRealPath("images\\01.jpg"); out.print(path); BufferedImage img = ImageIO.read(new Fi...
分类:
其他好文 时间:
2014-12-25 21:45:50
阅读次数:
180
Lua是一种动态类型的语言。 ????????在Lua中有8种基础类型:nil(空)、boolean(布尔)、number(数字)、string(字符串)、userdata(自定义类型)、function(函数)、thread(线程...
分类:
其他好文 时间:
2014-12-25 20:40:31
阅读次数:
236
题目:
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the tot...
分类:
编程语言 时间:
2014-12-25 20:35:04
阅读次数:
197
private static byte hexValueOf(String hex) {
byte result = 0;
if (hex.charAt(0) == '0'
&& (hex.charAt(1) == 'X' || hex.charAt(1) == 'x')) {
for (int i = 2; i < hex.length(); i++) {
char...
分类:
编程语言 时间:
2014-12-25 20:34:11
阅读次数:
115
一、编写第一个C#程序、注释:1、编写程序static void Main(string[] args)//在Mian方法下编写代码输出数据 { Console.WriteLine("Hello World!");//输出“Hello World!” Console.Rea...
曾经遇到过需要下载服务器内文件到客户机上的情况(ps:服务器机器也是普通的pc),特意查了N多资料,发帖问了很多前辈WebClient wc = new WebClient();public void Download(string Add, string savePath){ try{ wc.do...
分类:
其他好文 时间:
2014-12-25 20:12:42
阅读次数:
155
(1)在win32编程中,如何使用string类型#include using namespace std;LPTSTR lpCmdLine = L"hello world";string cmd = lpCmdLine;(2)字符格式基础: 传统的ansi字符在C语言中用char数据类型表示(.....
var versionInfo = FileVersionInfo.GetVersionInfo(filePath); String productVersion = versionInfo.ProductVersion; String fileVersion = versio...