摘要: 网络获取资料所得:运行eclipse执行android应用,控制台报错:The connection to adb is down, and a severe error has occured.You must restart adb and Eclipse.Please ensure that adb is correctly located at 'E:\setups\android\android-2.1_r01-windows\tools\adb.exe' and can be executed.关掉eclipse,查看任务管理器,关闭tabd.exe,重启即可 阅读全文
posted @ 2013-12-29 19:56 qgweizhan 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGEPlease check logcat output for more details. Launch canceled!如果真机调试过程中出现如上错误,一般是空间不足引起的 阅读全文
posted @ 2013-10-10 15:36 qgweizhan 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 希尔排序原理讲述:在前面我们利用直接插入排序的时候,可以发现如果记录是基本有序的,那么效率的相当高。伟大的希尔也发现这个问题,但我们知道在实际中,基本有序的记录是相当少。如果没有,那我们就给他创造。如果让大量的记录呈现一种有序的状态呢?最简单的思路是分组。怎么分呢才能基本有序呢?显然直接分组,组采用直接插入排序,然后再合并不是不行的。例如:{3,5,22,9,4,6,22,3,34}分成{3,5,2}、{9,4,6}、{22,3,34};排序后是{3,5,22},{4,6,9},{3,22,34}合并后{3,5,22,4,6,9,3,22,34}显然不说我们所说的基本有序,基本有序是指小中大这 阅读全文
posted @ 2013-08-02 15:29 qgweizhan 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 直接插入排序算法:将一个记录插入到已经排好序的有序表中,从而得到一个新的、记录数增1的有序表。public class InsertSort { public static void Sort(int[] L) { int i; int j; for (i = 2; i L[0]; j -- ) L[j + 1] = L[j ]; L[j + 1] = L[0] ; } } } /** ... 阅读全文
posted @ 2013-08-02 14:53 qgweizhan 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 冒泡的基本思想是不断的比较,而选择排序的简单思路是在每一趟中记录最小或者最大,依次往下选择,实现代码如下:public class SelectSort { public static void selectSort(int[] a) { int min; for (int i = 0; i < a.length; i++) { min = i; for (int j = i + 1; j < a.length - 1; j++) { if (a[j] < a[min]) { ... 阅读全文
posted @ 2013-07-31 10:44 qgweizhan 阅读(226) 评论(0) 推荐(0) 编辑
摘要: xml错误: A pseudo attribute name is expecte在执行xsl转换的时候,报: A pseudo attribute name is expected一般这种情况,都是由于xml文件不规范引起的,查起来比较困难最后发现是xml数据文件的第一行中,有全角的字符出现,引发了这个问题 阅读全文
posted @ 2013-07-29 15:01 qgweizhan 阅读(2905) 评论(0) 推荐(0) 编辑
摘要: 1.什么是接口,什么是抽象类 接口: 在java中我们,用关健字interface定义接口。如下面所示: public interface Example {} 实际上,接口定义了一系列的行为,一组方法声明或者我们称之为签名,如下面所示:public interface Example { public void method1(); public int method2(int a, int b); public double method3();} 从上面可以看出,接口什么都实现不了,只是作为一种规范。 每个实现接口的方法都必须实现接口中每个方法,包括个修饰... 阅读全文
posted @ 2013-07-22 11:41 qgweizhan 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 在spring in action 的第四章aop在建议观众类时出现如下错误- The hierarchy of the type AudienceAdvice is inconsistent- The type org.aopalliance.aop.Advice cannot be resolved. It is indirectly referenced fromrequired .class files原因是缺少aopalliance-1.0.jar file下载导入即可。 阅读全文
posted @ 2013-07-08 18:51 qgweizhan 阅读(1727) 评论(0) 推荐(0) 编辑
摘要: 转载:http://zhaowenbinmail.blog.163.com/blog/static/3908086201143134428201/spring配置文件出错解决办法spring配置文件,出错会报“nested exception is org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明。”,原因:因为引用的spring的jar包文件版本不同导致的。解决办法:两个不同版本的spring配置文件的头格式如下两种,如果你已经是其中一种,则改成另一种即可。第一种:......第二种: 阅读全文
posted @ 2013-07-02 15:46 qgweizhan 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 废话小说,看代码:import java.util.Date;public class BubbleSort { // 冒泡排序正常做法 static void bubbleSort1(int a[]) { int temp; for (int i = 0; i < a.length; i++) for (int j = 1; j < a.length - i; j++) if (a[j - 1] > a[j]) { temp = a[j]; ... 阅读全文
posted @ 2013-06-05 15:09 qgweizhan 阅读(563) 评论(0) 推荐(0) 编辑