码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
leetcode之倒转一句话单词
题目: 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
leetcode Longest Substring with At Most Two Distinct Characters
找到最多含有两个不同字符的子串的最长长度。例如:eoeabc,最长的是eoe为3,其他都为2.思路:用p1,p2表示两种字符串的最后一个出现的下标位置。初始p1为0. p2为-1.start初始化为0,表示两种字符串的开头。只要遍历一次string就可以得到结果了。首先我们要确定p2的值,那么i要一...
分类:其他好文   时间:2014-12-25 21:47:44    阅读次数:150
图片加水印文字,logo。生成缩略图
简单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是一种动态类型的语言。 ????????在Lua中有8种基础类型:nil(空)、boolean(布尔)、number(数字)、string(字符串)、userdata(自定义类型)、function(函数)、thread(线程...
分类:其他好文   时间:2014-12-25 20:40:31    阅读次数:236
[C++]LeetCode: 55 Decode Ways
题目: 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
Java 字符串类型16进制字面值转成字面值字节数据工具类
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#程序结构
一、编写第一个C#程序、注释:1、编写程序static void Main(string[] args)//在Mian方法下编写代码输出数据 { Console.WriteLine("Hello World!");//输出“Hello World!” Console.Rea...
分类:Windows程序   时间:2014-12-25 20:16:39    阅读次数:198
访问局域网内指定电脑,下载文件,读取数据
曾经遇到过需要下载服务器内文件到客户机上的情况(ps:服务器机器也是普通的pc),特意查了N多资料,发帖问了很多前辈WebClient wc = new WebClient();public void Download(string Add, string savePath){ try{ wc.do...
分类:其他好文   时间:2014-12-25 20:12:42    阅读次数:155
Windows 编 程中的字符串
(1)在win32编程中,如何使用string类型#include using namespace std;LPTSTR lpCmdLine = L"hello world";string cmd = lpCmdLine;(2)字符格式基础: 传统的ansi字符在C语言中用char数据类型表示(.....
分类:Windows程序   时间:2014-12-25 20:09:03    阅读次数:289
C# 获取文件版本
var versionInfo = FileVersionInfo.GetVersionInfo(filePath); String productVersion = versionInfo.ProductVersion; String fileVersion = versio...
分类:Windows程序   时间:2014-12-25 20:06:57    阅读次数:211
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!