会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小蜗牛
健身运动、持续改进;想,都是问题,做,才有答案;携亮前行,照亮未来。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
40
41
42
43
44
45
46
下一页
2019年5月3日
单例模式之懒汉式和饿汉式
摘要: 一、单例模式定义 单例模式确保某个类只有一个实例,而且自行实例化并向整个系统提供这个实例。在计算机系统中,线程池、缓存、日志对象、对话框、打印机、显卡的驱动程序对象常被设计成单例。这些应用都或多或少具有资源管理器的功能。每台计算机可以有若干个打印机,但只能有一个Printer Spooler,以避免
阅读全文
posted @ 2019-05-03 20:10 jason小蜗牛
阅读(4076)
评论(0)
推荐(0)
2019年4月28日
折半查找
摘要: //二分查找的前提是有序的数。public class BinarySearch { public static void main(String[] args) { int[] arr = {1, 2, 4, 5, 6, 8, 9, 10}; System.out.println(binarySe
阅读全文
posted @ 2019-04-28 15:33 jason小蜗牛
阅读(184)
评论(0)
推荐(0)
选择排序
摘要: //选择排序//基本思想:从原始数组中寻找最小的那个数,然后与第一个数交换,依次类推public class SelectionSort { public static void main(String[] args) { int[] arr = {1, 4, 15, 63, 33, -1, 0,
阅读全文
posted @ 2019-04-28 14:56 jason小蜗牛
阅读(225)
评论(0)
推荐(0)
插入排序
摘要: //插入排序//从第一个元素开始,每个数往前插入,后一个数与前一个数相比较,如果后一个数小于前一个数,则将后一个数往前移位。public class InsertSort { public static void main(String[] args) { int[] arr = {-2, 52,
阅读全文
posted @ 2019-04-28 14:50 jason小蜗牛
阅读(206)
评论(0)
推荐(0)
2019年4月27日
两数交换不用中间变量
摘要: //两数交换不用中间变量public class TwoChange { public static void main(String[] args) { int a = 3, b = 5; //第一种方式采用加减法实现 /* a = a + b; b = a - b; a = a - b;*/ /
阅读全文
posted @ 2019-04-27 16:32 jason小蜗牛
阅读(325)
评论(0)
推荐(0)
快速排序
摘要: 快速排序是冒泡排序的改进,效率比较高,基本思想也是两两相比较。
阅读全文
posted @ 2019-04-27 16:24 jason小蜗牛
阅读(205)
评论(0)
推荐(0)
冒泡排序
摘要: //冒泡排序//冒泡排序要经过N-1步的中间排序才能排完,效率较低public class BublleSort { public static void main(String[] args) { int[] arr = {1, 56, 36, 74, 2, 6, 3, 21, 5}; bubbl
阅读全文
posted @ 2019-04-27 14:57 jason小蜗牛
阅读(190)
评论(0)
推荐(0)
2019年4月16日
Unknown system variable 'query_cache_size'] with root cause
摘要: Unknown system variable 'query_cache_size'] with root cause 出现这个错误是因为mysql连接数据库的版本不对,
阅读全文
posted @ 2019-04-16 20:43 jason小蜗牛
阅读(449)
评论(0)
推荐(0)
通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明
摘要: 通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明 错误原因是springmvc中的约束信息不对
阅读全文
posted @ 2019-04-16 20:41 jason小蜗牛
阅读(1667)
评论(0)
推荐(0)
2019年4月9日
熟悉的404错误,但就是找不出问题所在
摘要: 常见的404 not found资源路径不存在,遇到了路径没有错,但老是报404,错误,检查了好几遍都不知道错在哪儿。 分析原因有以下几种: 1.资源路径有可能真的错了,注意相对路径和绝对路径,./和../的区别,一个是当前目录,一个上一级目录,/是根目录。 2.重新启动服务器。再试试看访问 3.如
阅读全文
posted @ 2019-04-09 08:22 jason小蜗牛
阅读(282)
评论(0)
推荐(0)
上一页
1
···
40
41
42
43
44
45
46
下一页
公告