Ruibus###

摘要: width: 100px; height: 100px; top: 50%; left: 50%; transform: translate(-50%, -50%); 阅读全文
posted @ 2022-08-22 15:24 Ruibus 阅读(93) 评论(0) 推荐(0) 编辑
摘要: This article is meant as an extension to Angie Jones’ “IntelliJ – Error:java: release version 5 not supported”. Angie在她的文章中建议IntelliJ IDEA解决方案,其中显示错误消 阅读全文
posted @ 2022-07-02 08:46 Ruibus 阅读(62) 评论(0) 推荐(0) 编辑
摘要: Partten表单验证 1 匹配首尾空格的正则表达式:(^\s*)|(\s*$) 2 整数或者小数:^[0-9]+\.{0,1}[0-9]{0,2}$ 3 只能输入数字:"^[0-9]*$"。 4 只能输入n位的数字:"^\d{n}$"。 5 只能输入至少n位的数字:"^\d{n,}$"。 6 只能 阅读全文
posted @ 2022-06-28 16:34 Ruibus 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 浮点数输出 // 第一种 DecimalFormat df = new DecimalFormat("#0.00"); float data;data = sc.nextFloat(); System.out.println(df.format(data)); // 第二种,模仿c语言的输出方式 S 阅读全文
posted @ 2022-06-15 23:30 Ruibus 阅读(23) 评论(0) 推荐(0) 编辑
摘要: PriorityQueue PriorityQueue是优先队列,作用是保证每次取出的元素都是队列中权值最小的,这里涉及到了大小关系,元素大小的评判可以通过元素自身的自然顺序(使用默认的比较器),也可以通过构造时传入的比较器。 用法 package DP; import java.util.Comp 阅读全文
posted @ 2022-06-12 11:56 Ruibus 阅读(114) 评论(0) 推荐(0) 编辑
摘要: CSS 为定位提供了一些属性,利用这些属性,可以建立列式布局。 css定位的几种方式: 1、static(静态定位): 1、static(静态定位):默认值。没有定位,当我们没有指定定位方式的时候,这时默认的定位方式就是static, 也就是按照文档的书写布局自动分配在一个合适的地方,这种定位方式用 阅读全文
posted @ 2022-05-31 11:03 Ruibus 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 杨辉三角形 public class TestYang1 { public static void main(String[] args) { int len = 10;//定义数组长度,也就是杨辉三角的长度 int[][] arr = new int[len][len];//定义6行6列的二维数组 阅读全文
posted @ 2022-05-22 08:28 Ruibus 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 常用Ascii码 小写字母65-90 大写字母97-122 阅读全文
posted @ 2022-05-21 22:44 Ruibus 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 筛法求素数 先建立一个判定数组a[]记录结果长度为n ,初始全为false,为素数 遍历数组,a[i] for(int i=0;i<n;i++){ if(!a[i]){//如果这个数为素数那么他的倍数一定不是素数 for(int j=2*i;j<=n;j=j+i){ a[j]=true; } }} 阅读全文
posted @ 2022-05-21 22:26 Ruibus 阅读(8) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示