1.1Implement an algorithm to determine if a
string has all unique characters. What if you cannot use additional data
structures?字符串问题,需要先确定是不是只有ASCII码...
分类:
其他好文 时间:
2014-06-11 12:27:53
阅读次数:
247
JavaScript对类型错误出奇的宽容 3 + true; // 4 null + 3; // 3
## 运算符+(加号)的重载运算符+既重载了数字相加,又重载了字符串连接操作。具体是数字相加还是字符串连接,取决于其参数的类型 2 + 3; ...
分类:
Web程序 时间:
2014-06-11 12:20:34
阅读次数:
285
Ext JS消息提示框主要包括:alert、confirm、prompt、show
1、Ext.MessageBox.alert() 调用格式: alert( String title, String msg, [Function fn],
[Object scope] ) 参数说明: t...
分类:
其他好文 时间:
2014-06-11 12:16:46
阅读次数:
323
在项目中有无遇到过这样一种程况,例如文字"王明今年10岁了",
但是数字10是从网络返回的数据, 而你又想把这个文字写在xml中, 过往我的做法是分成3个TextView,
实现愚蠢。今天遇到一种解决办法。在string.xml中设置王明今年 %1$d 岁然后设置的时候就可以:textView.se...
分类:
移动开发 时间:
2014-06-11 12:12:22
阅读次数:
244
// 生成订单号 public static String setRandomChar() {
String str = ""; for (int i = 0; i < 10; i++) { int ch = (int) (10 * (Math...
分类:
其他好文 时间:
2014-06-11 12:07:04
阅读次数:
262
一段清理缓存的代码如下:dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0),
^{ NSString*cachPath = [NSSearchPathForDirectoriesInD...
分类:
其他好文 时间:
2014-06-11 12:04:30
阅读次数:
183
/// /// 读取xml中的指定节点的值 /// private string
ReadXmlNode(string filename) { string result = "-1"; ...
分类:
其他好文 时间:
2014-06-11 12:01:25
阅读次数:
224
感谢ZYF神犇的耐心解答……如果这题只要求最小代价……那就是一个比较明显的拆点最小割,对于所有\(j
11 #include 12 #include 13 #include 14 using namespace std; 15 typedef long long
LL; 16 const in...
分类:
其他好文 时间:
2014-06-11 12:00:44
阅读次数:
290
/** * 打水印 Imagename_biao是水印文件 ImgName是原图 * @param
Imagename_biao * @param ImgName */ public static void imgYin(String
Imagename_b...
分类:
其他好文 时间:
2014-06-11 11:57:29
阅读次数:
227
/** * 得到中文第一个字的第一个字每 * @param first * @return */
public static String getFirstKeyChar(String first) { String result=""; ...
分类:
其他好文 时间:
2014-06-11 11:55:27
阅读次数:
221