- 博客(2619)
- 收藏
- 关注
原创 学以致用——Java applet小程序求两个整数的最大公约数
今天基于2008年(15年前)自己所写的求最大公约数applet小程序进行了以下主要优化:1. 添加异常处理功能,让程序更为健壮2. 并使用辗转相除法求最大公约数,大幅提高程序性能3. 使用Long型数据类型替换int型,大幅扩大数据输入范围参考文档:1.2.
2023-02-17 19:10:57
417
1
原创 学以致用——Java验证身份证号码是否正确(带校验算法)
验证身份证号码是否正确(带校验算法)题目内容:输入一个字符串,请判断是否满足身份证基本要求,并返回具体的生日yyyy-mm-dd。如果输入数据有误,请输出0000-00-00。基本要求是:a)必须是18位;b) 前面位数必须是数字,最后一位可以是数字或小写字母;c) 日期是存在的;d)最后一位校验码检查。
2023-02-17 11:56:02
1921
原创 调试经验——控制台中需要用户重复输入时,BufferedReader类相比Scanner类更为好用
控制台中需要用户重复输入时,BufferedReader类相比Scanner类更为好用。可见,编程时面对类库中众多的类,如何选择合适的类非常重要。选对了,事半功倍,选不对,可能事倍功半,甚或劳而无功!
2023-02-16 22:03:14
365
原创 学以致用——命令行中使用Java模块化技术编译、打包、运行iKb知识库应用
这个问题随JDK版本和Eclipse版本时隐时现,让人抓狂。在学习Java核心技术(高阶)的过程中,正好学到了相关知识,现决定在CMD命令行中编译、打包、运行该程序,来解决上述问题。说明:编译、打包、运行均有两段代码,第一段适用于JDK8至JDK11,第二段适用于JDK17。也就是说,我的iKb程序目前最高可运行于JDK17中。
2023-02-11 00:17:57
198
原创 Java流计算中并行计算性能测试数据
在学习Java流计算的过程中,发现并行流计算(parallel)的执行速度大概是非并行计算的3倍以上,测试代码及测试结果如下。
2023-02-09 15:49:54
190
原创 调试经验——Java Double计算“误差“
今天学习Java流计算时发现1.1*1.1不等于1.21,疑似出现误差,原因尚待明确,在此标记一下。
2023-02-09 14:31:33
213
原创 自动生成Java类
昨天在学习中国大学Mooc《Java核心技术》(高阶)的Java的注解——注解的解析一节时,遇到一个比较有趣的示例程序。想自己改一改,没想到七八个小时就这么没了。Java的学习之路竟然是如此漫长!个中辛酸只有经历过一次次的代码调试的自己知道。
2023-02-03 01:20:45
283
原创 经典的生产者消费者模型Java实现结果分析
经典的生产者消费者模型: 生产者不断的往仓库中存放产品,消费者从仓库中消费产品。 其中生产者和消费者都可以有若干个。 仓库规则:容量有限,库满时不能存放,库空时不能取产品 。本实现中,有2个生产者P1和P2,3个消费者C1, C2和C3,仓库容量10。运行结果分析:Seq.Activity DescriptionProductIDC1C2C3P1P2ProduceConsumeStorage1consumer waitNNNNNNN2consumer waitNNNNNNN3consumer waitNN
2023-01-18 14:59:00
212
原创 Java多线程执行时间比较(Executor vs Fork-join)
任务:将1到10亿之间的数进行累加求和。执行结果:TypeuptoThreadsSumTimeUsedSingleThread1BN/A500000000500000000286078400nsExecutor1B850000000050000000085126500nsFork-join1B85000000005000000008545500ns结果分析:Fork-join比Executor用时更少,效率更高。并发计算比单线程最快可提高30倍(286078400/8545500≈33)。
2023-01-18 14:48:43
249
原创 计算机系统与网络安全技术——第一章——信息安全概述——1.1-网络安全定义——什么是信息?
关于可共享性信息是有密级的(confidentiality),机密信息需严格保密而不是可共享的;关于无限性信息是一种资源,有价值的信息是稀缺资源;关于价值性不是所有信息都有价值,大部分信息是毫无价值的,过量信息甚至是有害的(如,刷一天抖音是很浪费时间的);虽然不是现实事物,但他是对现实事物的一种模拟和映射,可作为虚拟事物来理解。备注这里的物理介质应当是不包含大脑的。大脑对信息的收集、加工、处理、储存、输出与电脑毕竟不是同一范畴内的事情。我的理解信息是一种对主、客观事物的一种表述(如,5W1H)...
2022-07-31 15:25:30
628
1
原创 大学英语精读第二版(第五册)复习笔记——文章内容摘要
文章标题 作者 链接 文章内容摘录 B5U1 - A Kind of Sermon(权进一言) W. S. Fowler 大学英语(第五册)复习(原文及全文翻译)——Unit 1 - A Kind of Sermon(权进一言)_预见未来to50的专栏-CSDN博客 It may not seem much consolation to point out that the teacher, too, becomes frustrated when his effo.
2022-02-18 16:45:39
2027
原创 大学英语精读第三版(第五册)复习笔记——文章内容摘要
文章标题 作者 链接 文章内容摘录 B5U1B - First Day: Give Us 15 Minutes a Day(第一天:每天给我们15分钟) Wilfred Funk & Norman Lewis 大学英语精读第三版(第五册)学习笔记(原文及全文翻译)——1B - First Day: Give Us 15 Minutes a Day(第一天:每天给我们15分钟)_预见未来to50的专栏-CSDN博客 Your words are your key
2022-02-18 16:20:58
1529
原创 大学英语精读第三版(第四册)复习笔记——文章内容摘要
文章标题 链接 文章内容摘录 B4U1B - Winter Ice-cream Man(冬天卖冰淇淋的人) 大学英语精读第三版(第四册)学习笔记(原文及全文翻译)——1B - Winter Ice-cream Man(冬天卖冰淇淋的人)_预见未来to50的专栏-CSDN博客 My tutor, the previous driver, had declared several times that those who really like ice-cream would go
2022-02-16 17:42:46
1231
原创 资料:《大学英语》精读第三版(全六册)原文及全文翻译
温故而知新,可以为师矣!有道理!B1U1 - How to Improve Your Study Habits(怎样改进你的学习习惯) B1U1B - Some Strategies for Learning English(学习英语的几种策略) B1U2 - Sailing Round the World(环球航行) B1U2B - To Swim the English Channel at 58(58岁时横渡英吉利海峡) B1U3 - The Present(礼物) B1...
2022-01-21 16:31:51
5811
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——10 - My Graduation Speech(毕业演说)
Unit 10 - My Graduation Speech(毕业演说)My Graduation SpeechNeil PostmanAuthor's Note: Having sat through two dozen or so graduation speeches, I have naturally wondered why they are so often so bad. One reason, of course, is that the speakers are chosen
2022-01-10 17:07:21
1149
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——9 - The West‘s Debt to China(西方国家得益于中国之处)
Unit 9 - The West's Debt to China(西方国家得益于中国之处)The West's Debt to ChinaRobert TempleOne of the greatest untold secrets of history is that the "modern world" in which we live is a unique synthesis of Chinese and Western ingredients. Possibly more than
2022-01-10 16:52:55
892
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——8 - My Father‘s Son(我父亲的儿子)
Unit 8 - My Father's Son(我父亲的儿子)My Father's SonBill HeavyWhen my father rings, I hurry down to the front door of my condo. There he is, in corduroy pants, the tread worn off the knees, and a shirt I outgrew in tenth grade. He's come to help me put in
2022-01-10 16:30:54
1522
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——7 - Ten Rules for Running a Successful Company(成功经营公司的十条基本原则)
Unit 7 - Running a Successful Company: Ten Rules that Worked for Me(成功经营公司的十条基本原则)Running a Successful Company: Ten Rules that Worked for MeSam WaltonA whole lot has changed about the retailing business in the forty-seven years we've been in it—inclu
2022-01-10 15:39:42
744
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——6 - The EQ Factor(情商因素)
Unit 6 - The EQ Factor(情商因素)The EQ FactorNancy GibbsIt turns out that a scientist can see the future by watching four-year-olds interact with a marshmallow. The researcher invites the children, one by one, into a plain room and begins the gentle torm
2022-01-10 15:14:00
1268
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——5 - Prison Studies(狱中学习)
Unit 5 - Prison Studies(狱中学习)Prison StudiesMalcolm XMany who today hear me somewhere in person, or on television, or those who read something I've said, will think I went to school far beyond the eighth grade. This impression is due entirely to my pr
2022-01-10 12:18:28
1080
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——3 - How to Change Your Point of View(如何改变你的观点)
Unit 3 - How to Change Your Point of View(如何改变你的观点)How to Change Your Point of ViewCaroline SeebohmDr. Edward Jenner was busy trying to solve the problem of smallpox. After studying case after case, he still found no possible cure. He had reached an
2022-01-10 11:51:33
1248
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——2 - The Gratitude We Need(我们所需要的感激)
Unit 2 - The Gratitude We Need(我们所需要的感激)The Gratitude We NeedA.J. CroninOn a fine afternoon in New York, I got into a taxi. From the driver's expression and the way he slammed in his gears, I could tell that he was upset. I asked him what was the tro
2022-01-10 11:28:43
1594
原创 二十一世纪大学英语读写教程(第四册)学习笔记(原文)——1 - Who Is Great?(谁是伟人?)
Unit 1 - Who Is Great?(谁是伟人?)Who Is Great?Michael RyanAs a young boy, Albert Einstein did so poorly in school that teachers thought he was slow. The young Napoleon Bonaparte was just one of hundreds of artillery lieutenants in the French Army. And th
2022-01-10 10:42:08
1615
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——10 - Plain Talk About Handling Stress(浅谈如何缓解压力)
Unit 10 - Plain Talk About Handling Stress(浅谈如何缓解压力)Plain Talk About Handling StressLouis E. Kopolow, M.D.You need stress in your life! Does that surprise you? Perhaps so, but it is quite true. Without stress, life would be dull and unexciting. Stres
2022-01-07 15:05:27
768
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——9 - Space Politics(空间政治)
Unit 9 - Space Politics(空间政治)Space PoliticsIt is expected that the discovery of possible life-forms from the planet Mars will revive public interest in space exploration. But is public support for the international space effort necessary, given that...
2022-01-07 12:26:08
1331
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——8 - The Highs of Low Technology(“低”科技的优点)
Unit 8 - The Highs of Low Technology(“低”科技的优点)The Highs of Low TechnologyJohanne MednickI have a wonderful bicycle. My family refers to it as "that piece of junk" —an ancient piece of metal, the likes of which can be found in the dump or, if you're l
2022-01-06 16:40:33
409
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——7 - So What‘s So Bad About Being So-So(水平一般又何妨)
Unit 7 - So What's So Bad About Being So-So?(水平一般又何妨?)So What's So Bad About Being So-So?Lisa Wilson StrickThe other afternoon I was playing the piano when my seven-year-old walked in. He stopped and listened for a while, then said: "You don't play t
2022-01-06 16:22:03
788
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——6 - Every 23 Minutes(每隔二十三分钟)
Unit 6 - Every 23 Minutes(每隔二十三分钟)Every 23 MinutesLinda WeltnerMy husband and I went to a funeral a few weeks ago. The man we honored had not been ill and will never grow old. He was killed in his car on a Sunday night, driving home along a divided h
2022-01-06 16:05:28
713
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——5 - America Seen with European Eyes(概说美国——欧洲人眼中的美国)
Unit 5 - The ABCs of the U.S.A.: America Seen with European Eyes(概说美国——欧洲人眼中的美国)The ABCs of the U.S.A.: America Seen with European EyesMichael DobbsAmerica can be a strange experience for a foreigner. My wife and I arrived in the United States in Jan
2022-01-06 15:23:45
1703
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——4 - College Pressures(大学生的压力)
Unit 4 - College Pressures(大学生的压力)College PressuresWilliam ZinsserI am master of Branford College at Yale. I live on the campus and know the students well. (We have 485 of them.) I listen to their hopes and fears — and also to their stereo music and
2022-01-06 14:57:04
3185
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——3 - The Sense of Wonder(好奇感)
Unit 3 - The Sense of Wonder(好奇感)The Sense of WonderRachel CarsonA child's world is fresh and new and beautiful, full of wonder and excitement. It is our misfortune that, for most of us, that clear-eyed vision — that true instinct for what is beautif
2022-01-06 14:30:26
1983
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——2 - The Titanic Puzzle(泰坦尼克难题——女权主义者应该接受优先坐上救生艇吗)
Unit 2 - The Titanic Puzzle - Should a good feminist accept priority seating on a lifeboat?(泰坦尼克难题——女权主义者会接受优先坐上救生艇吗?)The Titanic Puzzle - Should a good feminist accept priority seating on a lifeboat?Charles KrauthammerYou're on the Titanic II. It ha
2022-01-06 12:16:27
2720
原创 二十一世纪大学英语读写教程(第三册)学习笔记(原文)——1 - How I Got Smart(我是如何变聪明的)
Unit 1 - How I Got Smart(我是如何变聪明的)How I Got SmartSteve BrodyA common misconception among youngsters attending school is that their teachers were child prodigies. Who else but a bookworm, with none of the normal kid's tendency to play rather than stud
2022-01-06 11:49:10
2067
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——10 - The Next 30 years(今后三十年)
Unit 10 - The Next 30 years(今后三十年)The Next 30 yearsEdward CornishIn less than three years the world will reach the outstanding year 2000, and in less than four — on January 1, 2001, to be precise — a new millennium will begin. I am encouraged to offe
2022-01-06 10:30:58
988
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——9 - Get Ready for Some Wild Weather(准备应对厄尔尼诺)
Unit 9 - Get Ready for Some Wild Weather(准备应对厄尔尼诺)Get Ready for Some Wild WeatherPer Ola, Emily D'aulaireIn March of 1997, Stephen Zebiak stared at his computer screen in alarm. The veteran climate researcher saw indications of a worldwide weather ev
2022-01-06 10:21:22
698
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——8 - Unwritten Rules(不成文的规矩)
Unit 8 - Unwritten Rules(不成文的规矩)Unwritten RulesBob GreeneThe restaurant was almost full. A steady hum of conversation hung over the room; people spoke with each other and worked on their meals.Suddenly, from a table near the center of the room, cam
2022-01-05 16:17:47
1463
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——7 - Thinking: A Neglected Art(思考——被忽视的艺术)
Unit 7 - Thinking: A Neglected Art(思考——被忽视的艺术)Thinking: A Neglected ArtCarolyn KaneIt is generally agreed that the American education system is in deep trouble. Everyone is aware of the horrible facts: school systems are running out of money, teacher
2022-01-05 15:05:05
1735
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——6 - A Brief History of Stephen Hawking(斯蒂夫·霍金简传)
Unit 6 - A Brief History of Stephen Hawking(斯蒂夫·霍金简传)A Brief History of Stephen HawkingMichael White, John GribbinHe has been proclaimed "the finest mind alive", "the greatest genius of the late 20th century", and "Einstein's heir". Known to millions
2022-01-05 14:45:08
1448
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——5 - Holding Onto a Dream(坚持梦想)
Unit 5 - Holding Onto a Dream(坚持梦想)Holding Onto a DreamWhile preparing to graduate from high school in 1987, Priscilla Vazquez waited anxiously for her letter from the University of Washington, hoping she would be the first person in her family to atte
2022-01-05 14:24:20
1607
原创 二十一世纪大学英语读写教程(第二册)学习笔记(原文)——4 - Turning failure into Success(反败为胜)
Unit 4 - Turning failure into Success(反败为胜)Turning failure into SuccessFredelle MaynardVicky — beautiful, talented, very bright, voted "Most Likely to Succeed" in college — got a promising job with a large company after graduation. Then, after two ye
2022-01-05 14:12:25
2152
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人