Here N (N ≥ 3) rabbits are playing by the river. They are playing on a number line, each occupying a different integer. In a single move, one of the o ...
分类:
其他好文 时间:
2018-10-14 11:36:19
阅读次数:
363
"136. Single Number Easy" 解答 相同的数,XOR 等于 0,所以,将所有的数字 XOR 就可以得到只出现一次的数 c++ class Solution { public: int singleNumber(vector& nums) { int s = 0; for(int ...
分类:
编程语言 时间:
2018-10-13 16:47:26
阅读次数:
165
如何在Ubuntu上启动一个定时任务,使得可以定时删除机器上的日志 首先, #查看cron状态 service cron status 如果 ...
分类:
系统相关 时间:
2018-10-13 02:26:11
阅读次数:
316
这个真的是整死我了,还好看见了一篇博客提示了我, 解决方法: 在spring的bean配置中我没有设置action的作用域为prototype,也就是多例的,如果不设置则就会是默认的singleton。 也就是我们每次去调用action的时候都应该是一个新的action,而不是之前的action,所 ...
分类:
编程语言 时间:
2018-10-12 11:12:02
阅读次数:
150
## 1.单例模式> 单例模式,是指使用这种方式创建的对象实例唯一。类图: ### 1.1 懒汉模式```package com.asiainfo.test.singleTon; /** * 饱汉式单例模式 * @author hasee * */public class MySingleton2 ...
分类:
其他好文 时间:
2018-10-11 18:52:55
阅读次数:
133
转处:http://blog.csdn.net/pipisorry/article/details/39088003 NumPy提供了多种文件操作函数方便我们存取数组内容。 文件存取的格式:二进制和文本。二进制格式的文件又分为NumPy专用的格式化二进制类型和无格式类型。 Numpy binary ...
分类:
其他好文 时间:
2018-10-11 13:45:47
阅读次数:
277
一、题目 1、审题 2、分析 给出一个非空的只有一个元素出现一次其他元素均出现两次的整形数组,求出出现一次的该元素。 (不使用额外的空间,而且时间复杂度为线性) 二、解答 1、思路: 采用异或(^) 运算符。 1 ^ 1 = 0 ^ 0 = 0;1 ^ 0 = 1; 故,a ^ b ^ a = b ...
分类:
其他好文 时间:
2018-10-10 14:27:21
阅读次数:
125
CF995E Number Clicker 题目描述 Allen is playing Number Clicker on his phone. He starts with an integer u u on the screen. Every second, he can press one o ...
分类:
其他好文 时间:
2018-10-09 21:51:12
阅读次数:
331
Super Single Dog(超级单身狗)是区块链3.0时代加游戏的新型产物。
分类:
其他好文 时间:
2018-10-09 16:17:24
阅读次数:
127
一、maven的pom文件<?xmlversion="1.0"encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.
分类:
编程语言 时间:
2018-10-08 17:19:27
阅读次数:
183