05 2011 档案
摘要:private Node resverse(Node node) { if(node == null || node.next == null) { return node; } Node tmpNode = resverse(node.next); node.next.next = node; node.next=null; return tmpNode; }
阅读全文
摘要:100元钱要买100只鸡公鸡的价格为:5元/只母鸡的价格为:3元/只小鸡的价格为1元/3只问有几种组合可以正好100元钱买100只鸡:int groups = 0; int a,b,c;int total = 100; for(a = 0; a <= 19 ; a++) { for(b = 100 - a; b >0; b--) { c = 100 - a - b; if((a * 5 + b * 3 + c / 3.0) == 100) { // 注:3.0 groups++; Log.v("公鸡5元共有:"+ a+ "个, 母鸡3元共有: &quo
阅读全文
摘要:Feature Preview Only: The Traceview and dmtracedumputilities will be available in an upcoming release of the SDK.提示:The Traceview及dmtracedump工具要在即将发布的下一版本SDK中才能使用。Traceview is a graphical viewer for execution logs saved by your application. The sections below describe how to use the program.Tracevie
阅读全文
摘要:1.mksdcard -l sdcard 512M /root/.android/sdcard.img2.在应用程序中加入trace 的开始和结束函数(详细说明参考开发文档) // start tracing to "/sdcard/calc.trace" Debug . startMethodTracing ( "calc" ); --------calc是你要生成的.trace文件的名字 // .. // stop tracing Log.d("lizhenghui","NNNNNNN stop traceview de
阅读全文
摘要:1. 查看当前堆栈1) 功能:在程序中加入代码,使可以在logcat中看到打印出的当前函数调用关系2) 方法:new Exception(“print trace”).printStackTrace();2. MethodTracing1) 功能:用于热点分析和性能优化,分析每个函数占用的CPU时间,调用次数,函数调用关系等2) 方法:a) 在程序代码中加入追踪开关importandroid.os.Debug; …… android.os.Debug.startMethodTracing(“/data/tmp/test”);//先建/data/tmp目录 ……//被追踪的程序段 android
阅读全文
浙公网安备 33010602011771号