#NUM

Java Number & Math 类

一般地,当需要使用数字的时候,我们通常使用内置数据类型,如:byte、int、long、double 等。inta=5000;floatb=13.65f;bytec=0x4a;然而,在实际开发过程中,我们经常会遇到需要使用对象,而不是内置数据类型的情形。为了解决这个问题,Java语言为每一个内置数据类型提供了...
代码星球 代码星球·2021-02-11

PalindromeNumber

Determinewhetheranintegerisapalindrome.Aninteger is a palindromewhenit readsthesamebackwardasforward.查看整形数字是否是回文,例如121publicclassPalindromeN...
代码星球 代码星球·2021-02-09

算法笔记_093:蓝桥杯练习 Problem S4: Interesting Numbers 加强版(Java)

/目录1问题描述2解决方案ProblemDescription  Wecallanumber interesting,ifandonlyif:  1.Itsdigitsconsistsofonly0,1,2and3,andallthesedigitsoccurredatleastonce.  2.Inside...

Serializable and XmlEnum

Theeasiestwayistouse[XmlEnum]attributelikeso:[Serializable]publicenumEnumToSerialize{[XmlEnum("1")]One=1,[XmlEnum("2")]Two=2}ThiswillserializeintoXML(saythatthe...
代码星球 代码星球·2021-02-08

How does flyway sort version numbers?

https://stackoverflow.com/questions/19984397/how-does-flyway-sort-version-numbersInoneword:numerically.Aswouldbeexpectedforanumber. https://flywaydb.org/do...

NSwag enum

https://github.com/RSuter/NJsonSchema/wiki/JsonSchemaGenerator#integer-vs-string-enumerationsIntegervsstringenumerationsJSONSchemasupportsintegerandstringenumer...
代码星球 代码星球·2021-02-08

FileAttributes Enum

https://docs.microsoft.com/en-us/dotnet/api/system.io.fileattributes?view=netframework-4.7.2在桌面新建一个文件file-to-delete.txt,设置只读属性。先删除,然后从回收站还原[Test]publicvoidFileA...
代码星球 代码星球·2021-02-08

Why there is two completely different version of Reverse for List and IEnumerable?

https://stackoverflow.com/questions/12390971/why-there-is-two-completely-different-version-of-reverse-for-list-and-ienumerablItisworthnotingthatthelistmethodisa...

LeetCode:9. Palindromic Number(Medium)

原题链接:https://leetcode.com/problems/palindrome-number/description/1.题目要求:判断一个int类型整数是否是回文,空间复杂度O(1)2.注意:负数不是回文!!因为前面有负号!注意整数溢出问题。3.思路:依然采用取余取整的方法1packagecom.huiA...

LeetCode: 2.Add Two Numbers

题目要求:给定两个非空的链表,且链表里的元素都是非负整数,对这两个链表里的元素进行相加,返回一个新的链表。Input: (2->4->3)+(5->6->4)Output: 7->0->8思考过程:第二个元素进行相加:4+6=10,只保留了个位上的数,原本进位到十...
代码星球 代码星球·2021-02-08

eclipse 遇关键字enum编译问题解决

今天公司系统升级JDK1.4到JDK1.5,结果工程在eclipse中编译不能通过:Enumerationenum=………… 但是eclipse报错: Multiplemarkersatthisline -Enumerationcannotberesolved -Syntaxer...

在eclipse中使用枚举简单类型enum

在JAVA中终于可以使用枚举类型了,就像在C或C++使用的简单枚举。首先就在eclipse中试试它吧。没想到,却报了错误。我装了jdk1.5(5.0),也在eclipse中设置了,怎么会不认识enum(没有改变颜色,出现红叉)哪?郁闷了。看了好久,在eclipse的Preference中找到了解决办法。找到Prefer...

Vector类与Enumeration接口

Vector类用于保存一组对象,由于java不支持动态数组,Vector可以用于实现跟动态数组差不多的功能。如果要将一组对象存放在某种数据结构中,但是不能确定对象的个数时,Vector是一个不错的选择。例:将键盘上输入的一个数字序列的每位数字存储在vector对象中,然后在屏幕上打印出各位数字相加的结果。importj...

hadoop ha环境下的datanode启动报错java.lang.NumberFormatException: For input string: "10m"

hadoopha环境启动start-dfs.sh的时候datanode启动不了,并且报错。[hadoop@datanode2~]$cat/home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-datanode-datanode2.log2019-03-2418:40:46,422FAT...

python工具——NumPy

NumPy(NumericalPython)是Python中科学计算的基础包。它是一个Python库,提供多维数组对象,各种派生对象(如掩码数组和矩阵),以及用于数组快速操作的各种API,有包括数学、逻辑、形状操作、排序、选择、输入输出、离散傅立叶变换、基本线性代数,基本统计运算和随机模拟等等。NumPy的主要对象是同...
代码星球 代码星球·2021-02-01
首页上一页...343344345346347...下一页尾页