(1)当所在类不使用HashSet、Hashtable、HashMap等散列集合进行存储的时候,可以不使用hashcode。 (2)当在HashSet、Hashtable、HashMap中使用该类时,hashcode和equals是有关系的,hashcode和equals需要同时重写才能保证元素的唯 ...
分类:
其他好文 时间:
2020-03-31 01:14:51
阅读次数:
108
题目 Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between and is a ...
分类:
其他好文 时间:
2020-03-31 01:13:11
阅读次数:
88
类型转换虽然很简单,但是还是有些小细节要多注意。 String转化为int: String转化为Integer,可以如下所示。 也适用于int转化为Integer: 注意:不管是使用Integer.parseInt(),还是使用Integer.valueOf()将字符串转换成数字, 如果是非数字的字 ...
分类:
编程语言 时间:
2020-03-31 00:58:02
阅读次数:
94
import tensorflow as tf FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string("job_name", " ", "启动服务的类型ps or worker") tf.app.flags.DEFINE_integer("tas ...
分类:
其他好文 时间:
2020-03-31 00:56:07
阅读次数:
82
1. eval() : the eval function evaluates the “String” like a python expression and returns the result as an integer Syntax: eval(expression, [globals[, ...
分类:
编程语言 时间:
2020-03-30 23:10:12
阅读次数:
84
LEFT 返回字符串中从左边开始指定个数的字符。 语法 LEFT ( character_expression , integer_expression ) character_expression 字符或二进制数据的表达式。 character_expression 可以是常量、变量或列 。 in ...
分类:
数据库 时间:
2020-03-30 23:04:57
阅读次数:
87
题目:0,1,,n 1这n个数字排成一个圆圈,从数字0开始,每次从这 个圆圈里删除第m个数字。求出这个圆圈里剩下的最后一个数字。 例如,0、1、2、3、4这5个数字组成一个圆圈,从数字0开始每次删除第3个数字,则删除的前4个数字依次是2、0、4、1,因此最后剩下的数字是3。 Code: ...
分类:
其他好文 时间:
2020-03-30 19:28:23
阅读次数:
72
写在前面的话: 多看书,整完论文,deadline驱动,加油。 做题时间: 2020年3月30日~2020年4月5日 记录: 总共道题,时间为min。 最近更新时间: 202003230 圆圈中最后剩下的数字 链接: https://leetcode cn.com/problems/yuan qua ...
分类:
其他好文 时间:
2020-03-30 16:39:42
阅读次数:
98
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi ...
分类:
其他好文 时间:
2020-03-30 12:40:30
阅读次数:
66
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the ...
分类:
其他好文 时间:
2020-03-29 21:16:05
阅读次数:
58