一.String1.String:字符串常量,字符串长度不可变。Java中String是immutable(不可变)的.String类是被final修饰2.String str="hello world"和String str=new String("hello world")的区别publiccl...
分类:
编程语言 时间:
2015-02-06 18:23:55
阅读次数:
108
用#宏,见代码#include #define enum_to_string(x) #xenum sex{ boy, girl,};int main(){ std::cout << enum_to_string(sex::boy) << std::endl; system("...
分类:
编程语言 时间:
2015-02-06 18:21:19
阅读次数:
194
1. Ext.Msg.alert(String title,String msg)[Ext.MsssageBox.alert(Sting title,Sting msg,fn)]与javascript标准alert()的区别:?前者是异步执行的,不会影响到后面程序的执行,(把程序段放到回调函数里面去...
分类:
Web程序 时间:
2015-02-06 18:08:52
阅读次数:
207
trait?Double?{
????fn?double(self)?->?usize;
}
impl<‘a>?Double?for?&‘a?String?{
????fn?double(self)?->?usize?{?self.len()}
}
impl<‘a,?‘b,?‘c>?Double?for?&‘a?&‘b?&‘c...
分类:
其他好文 时间:
2015-02-06 17:03:34
阅读次数:
144
#后面写注释加上.0则自动作为float处理输出int:print"He‘s%dpoundsheavy."%my_weight输出String:print"He‘sgot%seyesand%shair."%(my_eyes,my_hair)Usethe%rfordebugging,sinceitdisplaysthe"raw"dataofthevariable,buttheothersareusedfordisplayingtousers.单引号和双引号都..
分类:
编程语言 时间:
2015-02-06 16:56:40
阅读次数:
130
一、资源文件的读取 1 String res = ""; 2 try{ 3 4 //得到资源中的Raw数据流 5 InputStream in = getResources().openRawResource(R.raw.test); 6 7 //得到数据的大小 ...
分类:
移动开发 时间:
2015-02-06 16:38:26
阅读次数:
209
private void SetAutoStart() { try { string regPath = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"; ...
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain lead...
分类:
其他好文 时间:
2015-02-06 16:36:03
阅读次数:
104
UndefinedNullBooleanNumberStringjavascript有5种简单数据类型(也称基本数据类型)Undefined、Null、Boolean、Number和String用typeof操作符可以检测给定变量的数据类型:var message="some thing";aler...
分类:
其他好文 时间:
2015-02-06 16:30:20
阅读次数:
211
http://www.cnblogs.com/catch/p/3251937.htmlC++中的临时变量指的是那些由编译器根据需要在栈上产生的,没有名字的变量。主要的用途主要有两类:1) 函数的返回值, 如: 1 string proc() 2 3 { 4 5 return string...
分类:
编程语言 时间:
2015-02-06 16:29:37
阅读次数:
194