在做unity3d的一个增强工具,用到了下有需要的朋友凑合看,go.name是string类型go.name = Selection.activeGameObject.name;Regex rex = new Regex(@"\d", RegexOptions.RightToLeft);var re...
分类:
其他好文 时间:
2015-04-29 16:32:04
阅读次数:
229
Rikka with string
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 937 Accepted Submission(s): 334
Problem Description
As we know...
分类:
其他好文 时间:
2015-04-29 15:11:03
阅读次数:
298
Longest Valid Parentheses
Given a string containing just the characters '(' and ')',
find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid pa...
分类:
其他好文 时间:
2015-04-29 15:06:06
阅读次数:
126
最近在给一个香港学生做毕设,要求生成随机繁体汉字。慕课网视频讲了如何生成简体汉字,其实繁体汉字也很简单。废话不说上代码
生成简体汉字
/**
* 生成随机简体汉字
*
* @return
*/
private char getRandomChar() {
String str = "";
int hightPos;
int lowPos;
Random ra...
分类:
其他好文 时间:
2015-04-29 13:35:23
阅读次数:
739
对于字符串变量:
1、如果使用的类重写了equals()方法,那么equals()比较的是字符串中包含的内容是否相同,否则equals()和==一样比较的是内存地址;
2、==始终比较的是两个变量的内存地址;public class Test1 {
public static void main(String[] args) {
String s1,s2,s3="abc",s4="abc...
分类:
其他好文 时间:
2015-04-29 13:34:34
阅读次数:
145
std::wstring StringToWString(const std::string &str) { std::wstring wstr(str.length(),L' '); std::copy(str.begin(), str.end(), wstr.begin()); ...
分类:
其他好文 时间:
2015-04-29 13:27:50
阅读次数:
134
/** * 获取IP * * @param context * @return */ public static String getIP(Context context) { String ip = "0.0.0.0"; ...
分类:
移动开发 时间:
2015-04-29 13:17:27
阅读次数:
132
题目思路这个题目是一个easy级别,算法本身没有难点,但是C++的语法有几点需要注意。下面分别说一下:LeetCode中给的C++函数原型是这样的string countAndSay(int n); 也就是说给一个n得到一个string类型的数字串,但是n和这个数字串似乎没有什么关系,这个数字串是....
分类:
其他好文 时间:
2015-04-29 13:07:25
阅读次数:
129
1.队列定义static final int QUEUELEN=15;class DATA3{ String name; int age;}class SQType{ DATA3[] data = new DATA3[QUEUELEN]; int head; int t...
分类:
其他好文 时间:
2015-04-29 13:07:04
阅读次数:
137
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
For example:
Given "25525511135",
return ["255.255.11.135", "255.255.111.35"]. (Order ...
分类:
其他好文 时间:
2015-04-29 11:51:16
阅读次数:
147