如何将一个字符串转换成大写或者小写?这是字符串匹配中经常需要做的事情,然而C++的Standard Library并没有提供将std::string转成大写和小写的功能,只有在提供将char转成大写(toupper)和小写(tolower)的功能而已。 但我们可以利用STL的transform配合t...
分类:
编程语言 时间:
2014-12-18 00:06:35
阅读次数:
239
根据Unicode/ASCII字符集的定义,小写字母与大写字母的区别只是前者比后者整整大32。因此…… 1 class UpCase { 2 public static void main(String[] args) { 3 char ch; 4 5 ...
分类:
其他好文 时间:
2014-12-18 00:01:52
阅读次数:
462
1 package com.java7; 2 // A simple automated telephone directory. 3 class Phone { 4 public static void main(String[] args) { 5 String num...
分类:
其他好文 时间:
2014-12-17 23:54:54
阅读次数:
193
Fraction to Recurring DecimalGiven two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the ...
分类:
其他好文 时间:
2014-12-17 23:53:01
阅读次数:
220
发现Indy9和Indy10(10.0.52版本)里的IdFTP.Size()返回值的类型都是Integer的,也就是说文件最大不能超过2G,需要进入IdFTP.Pas里修改, 声明的地方: function?Size(const?AFileName:?String):?Integer;?/...
分类:
其他好文 时间:
2014-12-17 22:48:41
阅读次数:
342
Spring也是一个开源框架,我在学习Spring的时候,觉得最重要的几点是:IOC(控制反转)、AOP(面向切面)和容器概念。
具体的教程还请大家去看网上的视频,这里贴一个小Demo以供学习。(前提是大家把该导入的jar包都导入了)
1、Student类和Teacher类
public class Student {
private String name;
public Stri...
分类:
编程语言 时间:
2014-12-17 22:45:15
阅读次数:
238
快乐虾http://blog.csdn.net/lights_joy/欢迎转载,但请保留作者信息1.1 加载调试引擎由于我们无法干预VC的调试引擎加载,但可以侦听VC的调试引擎加载事件,在此事件处理中可以调用自己的调试引擎: publicvoid LaunchDebugTarget(string filePath, string env) {...
分类:
数据库 时间:
2014-12-17 22:44:41
阅读次数:
342
Cocos2d-x 常用类名改变下面的表格中的类名的转换方式主要是直接删除了 CC 前缀。Cocos2d-x 类名改变下面表格中的类名的转换就比较大了。CCString 用法改变之前:1CCString* str = CCString::createWithFormat("%s.png","picture");现在:1std::string str = StringUtils::format("%...
分类:
其他好文 时间:
2014-12-17 22:39:39
阅读次数:
345
测试方式:Stopwatch sw = new Stopwatch();sw.Start();string tmp = "";StringBuilder sb = new StringBuilder();for (int i = 0; i < 10000; i++){ //tmp += "|"...
分类:
其他好文 时间:
2014-12-17 22:28:33
阅读次数:
231
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,...
分类:
其他好文 时间:
2014-12-17 22:27:05
阅读次数:
241