06 2020 档案
摘要:public class Hello{ public static void main(String[] args) { System.out.println("Hello World!"); for (int i = 0; i < 10; i++) { for (int k = 0; k < i;
阅读全文
摘要:What is the sum of the digits of the number 21000 public static int sumDigits(int n) { int int_retVal = 0; int int_pow = (int) Math.pow(2, n); String
阅读全文
摘要:LocalDateTime <=> String //时间转字符串格式化 DateTimeFormatter df1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); String dateTime = LocalDateTime.n
阅读全文
摘要:已知 a^2+b^2=c^2(a,b,c 为自然数,a<b<c),且a+b+c=1000,求abc的值? public static int getABC() { int resVal = 1; for (int a = 0; a <= 1000; a++) { for (int b = 1; b
阅读全文
摘要:*公共汽车上的人数 *城市里有一辆公共汽车在行驶,每一个公共汽车站都要接送一些人。 *将为您提供整数数组(或元组)的列表(或数组)。每个整数数组有两个项,分别表示公共汽车站上车人数(第一项)和下车人数(第二项)。 *您的任务是返回最后一个公共汽车站(最后一个数组之后)之后仍在公共汽车上的人数。即使这
阅读全文
摘要:从数字字符串中找到最大值和最小值 /** * find the max and min from String */ public static String highAndLow(String numbers) { String retStr = ""; String[] strAry = num
阅读全文
摘要:*售票员 *新的《复仇者》电影刚刚上映!电影院售票处有很多人排起了长队。他们每人有一张100、50或25美元的钞票(每人只有一张纸币)。一张“复仇者”的票要25美元。 *瓦西娅目前是一名职员。他想把票卖给这一行的每一个人。 *如果瓦西娅一开始没有钱,而且严格按照人们排队的顺序售票,他能不能给每个人一
阅读全文
摘要:* 通过列出前六个质数:2,3,5,7,11和13,我们可以看到第六个质数是13。* * (输出第n个质数)第10001个质数是什么? public static int findPrime(int n) { int prime = 2, i = 1; while (true) { i++; if
阅读全文
摘要:已知:* The sum of the squares of the first ten natural numbers is, * 1^2+2^2+...+10^2=385 * The square of the sum of the first ten natural numbers is, *
阅读全文
摘要:已知:2520是可以被1到10中的每一个数除而没有任何余数的最小数。求:能被1到20之间的所有数字整除的最小正数是多少? 232792560 public static int getMinPositiveNum(int in_num) { for (int n = in_num; ; n++) {
阅读全文
摘要:给出:斐波那契数列:1、1、2、3、5、8、13、21、34...输入几(n),输出对应位上的数值 public static int feibonaqie2(int n) { int n1 = 1; int n2 = 1; int n3 = 2; if (n <= 0) { return 0; }
阅读全文
摘要:[mysqld] # 设置3306端口 port=3306 # 设置mysql的安装目录 basedir=D:\DevSoftware\MySql\mysql-8.0.18-winx64 # 设置mysql数据库的数据的存放目录 datadir=D:\DevSoftware\MySql\mysql-
阅读全文
摘要:mysql 8 windows 版本zip方式安装步骤 下载地址:https://dev.mysql.com/downloads/mysql/ 1,解压ZIP文件到指定目录下:如D:\mysql-8.0.11-winx64 2,新建 my.ini配置文件 并粘贴修改如下内容:(1)basedir路径
阅读全文
摘要:ELK ELK是Elasticsearch、Logstash、Kibana三大开源框架首字母大写简称。市面上也被成为Elastic Stack。 Elasticsearch是一个基于Lucene、分布式、通过Restful方式进行交互的近实时搜索平台框架。像类似百度、谷歌这种大数据全文搜索引擎的场景
阅读全文
摘要:PHP:超文本预处理器 PHP原名 Personal Home Page的缩写,已经正式更名为 "PHP: Hypertext Preprocessor"。 PHP即“超文本预处理器”,是一种创建动态交互性站点的强有力的服务器端脚本语言。 PHP是常用的网站编程语言,与C语言类似。 PHP独特的语法
阅读全文