public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); Button btn = new Button(this);
btn.setText("测试ndk"); btn.setOnCl...
分类:
移动开发 时间:
2014-05-14 02:33:36
阅读次数:
488
1、自定义类 public class MyClass { public string Name {
get; set; } public int Corners { get; set; } }2、查询数据并转换 var config = new M...
分类:
其他好文 时间:
2014-05-14 02:21:23
阅读次数:
253
public String BufferedReaderDemo(String path)
throws IOException...{File file=new
File(path);if(!file.exists()||file.isDirectory())throw new FileNotFo...
分类:
其他好文 时间:
2014-05-14 02:16:11
阅读次数:
199
一、日期转换为字符串1.日期以特定的格式输出: // 创建日期并转换为yyyy-mm-dd格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String datestr =
sdf.format(new Date()...
分类:
编程语言 时间:
2014-05-13 20:58:54
阅读次数:
261
1)创建一个android项目填写项目信息2)创建一个新Activity右键点击Eclipse左边(默认)你要加入Activity的包,比如,我的包是com.INdroid.layout。然后选New->Class,输入类名后(注意首字母大写),在Superclass的Browse那里点击。最后在C...
分类:
移动开发 时间:
2014-05-13 20:56:51
阅读次数:
473
代码片段(假设只有3个key=value):public static void
main(String[] args) throws IOException { BufferedReader br = new BufferedReader(
new In...
分类:
其他好文 时间:
2014-05-13 19:48:10
阅读次数:
485
public class BubbleSort{ public static void
main(String[] args){ int[] sortArray = new int[]{5,7,4,2,9,8,3,6};
System.out.println("before sorting ,t.....
分类:
编程语言 时间:
2014-05-13 19:45:04
阅读次数:
366
ext4.2需求:清空store1的数据,并把store2的数据加载到store1中。速度太慢,需要优化。原始代码:varstart1=newDate().getTime();
anlyGridStore.removeAll();
varstart2=newDate().getTime();
console.log(start2-start1);//614
analyses.each(function(record){
data.push..
分类:
其他好文 时间:
2014-05-13 03:54:42
阅读次数:
255
#!/usr/bin/envpython#coding:utf8importos,sysimportdatetime,shutil,subprocessfromconfig.configimportslow_configclasscut_mysql(object):mysql_user,mysql_pass,date_day,slow_log_name,slow_log_path,mysqlsla_log_name,mysqldumpslow_log_name,new_log_path,new_log_nam..
分类:
数据库 时间:
2014-05-13 02:39:47
阅读次数:
482
1.Heap与stack的差别
Heap是堆,stack是栈。
Stack的空间由操作系统自动分配/释放,Heap上的空间手动分配/释放。
Stack空间有限,Heap是很大的自由存储区
C中的malloc函数分配的内存空间即在堆上,C++中对应的是new操作符。
程序在编译期对变量和函数分配内存都在栈上进行,且程序运行过程中函数调用时参数的传递也在栈上进行。
2...
分类:
编程语言 时间:
2014-05-12 23:21:25
阅读次数:
653