其他
1、在jdk源码中,hashcode和equal是怎么定义的
public native int hashCode();public boolean equals(Object obj) {
return (this == obj);
}
由上面可知:
hashCode()调用的是一个native方法,这个方法具体做了什么,不知道。而equal方法是用==来比较两个对象的引用,也就...
注意精度问题,不要用强转。
#include
#include
#include
#include
#include
#include
#define N 1010
#define INF 0x3f3f3f3f
using namespace std;
int n;
double x[N],y[N];
double dis[N][N];
doub...
这个所谓的try-with-resources,是个语法糖。实际上就是自动调用资源的close()函数。和Python里的with语句差不多。
例如:
static String readFirstLineFromFile(String path) throws IOException {
try (BufferedReader br = new BufferedReader(new ...
求区间的最大值,最小值的差值。
RMQ问题
1、Sparse-Table算法,预处理时间O(nlogn),查询时间O(1)
2、线段树(略)
ST算法
#include
#include
#include
using namespace std;
const int maxn = 50005;
int ST_min[maxn][30], ST_max[maxn][30];...
原文地址:http://xmodulo.com/2013/12/set-password-policy-linux.html
由于本人水平有限,如有疑问,可以留言讨论或者发邮件给我,谢谢!
对于用户账户的管理是系统管理员最重要的工作之一。尤其是,对于任何自称安全的linux系统,最受关心的应该是密码安全问题。在本教程中,我将介绍如何在linux上设置严密的密码策...
翻译自Coding Standards的1-9小节
缩进和行的长度
使用4个空格的缩进,且不含制表符。这有助于避免差别、补丁、SVN历史和注释带来的问题。为了增强代码的可读性,特别推荐每一行大约占75-85个字符长。 Paul M. Jones有关于这个限制的一些想法。...
给你初始坐标,标记为'#'的格子不能走,求你能走的所有格子的个数(能走的为‘.’,初始坐标用‘@’表示)...
/**
* @Title:JavaFile.java
* @Package:com.yhd.chart.model
* @Description:File类测试
* @author:Youhaidong(游海东)
* @date:2014-1-18 下午7:51:39
* @version V1.0
*/
package com.yhd.chart.model;
import ja...