摘要: Java实现杨辉三角 public static void main(String[] args) { int rows = 10; for (int i = 0; i < rows; i++) { int number = 1; // 打印空格字符串 System.out.format("%" + 阅读全文
posted @ 2021-05-29 09:12 彩虹掠夺者 阅读(58) 评论(0) 推荐(0)
摘要: int[] l1 = new int[6]; int[] l2 = new int[] {1,2,3,4}; int[] l3 = {1,2,3,4}; 阅读全文
posted @ 2021-04-14 09:34 彩虹掠夺者 阅读(57) 评论(0) 推荐(0)
摘要: 一、校验数字的表达式 数字:^[0-9]*$ n位的数字:^\d{n}$ 至少n位的数字:^\d{n,}$ m-n位的数字:^\d{m,n}$ 零和非零开头的数字:^(0|[1-9][0-9]*)$ 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(\.[0-9]{1,2})?$ 带1 阅读全文
posted @ 2021-04-07 17:14 彩虹掠夺者 阅读(46) 评论(0) 推荐(0)
摘要: 直接解决方法: 1、在命令行中输入:export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin 2、然后回车 阅读全文
posted @ 2021-04-01 18:23 彩虹掠夺者 阅读(359) 评论(0) 推荐(0)
摘要: 1、打开http://www.planetb.ca/syntax-highlight-word,(或者http://www.codeinword.com/)将需要转换格式的代码复制进输入框 2、左下角Language选择编程语言 3、点击Show Highlighted 4、弹出网页,复制即可,可粘 阅读全文
posted @ 2021-03-12 18:15 彩虹掠夺者 阅读(585) 评论(0) 推荐(0)