摘要:
常见排序算法介绍 冒泡排序 代码: public class BubbleSort { public static void sort(int[] array) { int tValue; for (int i = 0; i < array.length; i++) { for (int j = i 阅读全文
posted @ 2017-08-02 21:55
zhchoutai
阅读(166)
评论(0)
推荐(0)
摘要:
多行 字符串默认仅仅能写在一行内。分成多行将会报错。 能够使用连接运算符(+)连接多个单行字符串,用来模拟多行字符串。 var str= 'Hello' + 'world' + 'I\'m' + 'coming'; // "Hello world I'm coming" 也能够在每一行的尾部使用反斜 阅读全文
posted @ 2017-08-02 20:56
zhchoutai
阅读(156)
评论(0)
推荐(0)
摘要:
作用域:在一定的空间范围内可以使用。 生存周期:在一定的时间范围内存在。 example: int f(int x){ static int k=0; x+=k++; return x; } 求f(f(2)); 这个结果是2。当中上例中k是一个静态局部变量。它的作用域就是本函数体内部。而它的生存周期 阅读全文
posted @ 2017-08-02 19:21
zhchoutai
阅读(359)
评论(0)
推荐(0)
摘要:
过滤器,刚看到这个概念的时候,让小编想到刚刚给家里买的净水器,由于妈妈陪读的地方水质比較差,所以就买了一个净水器。那么什么是过滤器呢?结合我们生活中的知识,我们知道,过滤器是输送介质管道上必不可少的一种装置,通常安装在减压阀、泄压阀、定水位阀 ,方工过滤器其他设备的进口端设备。过滤器有一定规格滤网的 阅读全文
posted @ 2017-08-02 18:57
zhchoutai
阅读(202)
评论(0)
推荐(0)
摘要:
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such p 阅读全文
posted @ 2017-08-02 17:09
zhchoutai
阅读(216)
评论(0)
推荐(0)
摘要:
Description Berland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no mor 阅读全文
posted @ 2017-08-02 15:49
zhchoutai
阅读(247)
评论(0)
推荐(0)
摘要:
Description 农民约翰被选为他们镇的镇长!他当中一个竞选承诺就是在镇上建立起互联网。并连接到全部的农场。当然,他须要你的帮助。约翰已经给他的农场安排了一条快速的网络线路。他想把这条线路共享给其它农场。为了使花费最少。他想铺设最短的光纤去连接全部的农场。你将得到一份各农场之间连接费用的列表。 阅读全文
posted @ 2017-08-02 14:12
zhchoutai
阅读(212)
评论(0)
推荐(0)
摘要:
项目生命周期 清理 初始化 编译 測试 打包 部署 三套生命周期 1、clean pre-clean 运行一些须要在clean之前完毕的工作 clean 移除全部上一次构建生成的文件 post-clean 运行一些须要在clean之后立马完毕的工作 2、compile validate genera 阅读全文
posted @ 2017-08-02 13:36
zhchoutai
阅读(139)
评论(0)
推荐(0)
摘要:
Link: https://leetcode.com/problems/remove-nth-node-from-end-of-list/ Given a linked list, remove the nth node from the end of list and return its hea 阅读全文
posted @ 2017-08-02 13:18
zhchoutai
阅读(188)
评论(0)
推荐(0)
摘要:
XMLHttpRequest对象。能够让ajax程序在不又一次载入的页面的情况下更新页面数据,页面载入完毕后从server接受发生数据。这样既减轻了server负担又回顾了响应速度,缩短了用户的等待时间,让web程序更类似于传统的桌面应用。 XMLHttpRequest对象4步用法: 1.建立XML 阅读全文
posted @ 2017-08-02 12:09
zhchoutai
阅读(167)
评论(0)
推荐(0)
摘要:
转载请注明出处:http://blog.csdn.net/lhy_ycu/article/details/40027109 中介者模式(Mediator):主要用来减少类与类之间的耦合的,由于假设类与类之间有依赖关系的话。不利于功能的拓展和维护,由于仅仅要改动一个对象,其他关联的对象都得进行改动。 阅读全文
posted @ 2017-08-02 11:13
zhchoutai
阅读(159)
评论(0)
推荐(0)
摘要:
解题思路: 分治法求平面近期点对。点分成两部分,加个标记就好了。 #include <iostream> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <vector> #inclu 阅读全文
posted @ 2017-08-02 10:05
zhchoutai
阅读(182)
评论(0)
推荐(0)
摘要:
Java程序常常也会遇到进程挂掉的情况。一些状态没有正确的保存下来,这时候就须要在JVM关掉的时候运行一些清理现场的代码。JAVA中的ShutdownHook提供了比較好的方案。 JDK提供了Java.Runtime.addShutdownHook(Thread hook)方法。能够注冊一个JVM关 阅读全文
posted @ 2017-08-02 08:55
zhchoutai
阅读(3816)
评论(0)
推荐(0)

浙公网安备 33010602011771号