文章内容有知识点提示时: 提示:111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111。 提示:如果需要处理的算法比较简单的话,可以直接写进委托中,不需要另外写方法啦。 提示: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx…

2020年4月12日 0条评论 3816点热度 0人点赞 痴者工良 阅读全文

Reimage Repair is a very powerful tool that can diagnose system issues and repair the system. It can easily fix various errors encountered during Windows 10 updates. Open cmd with administrator privileges and enter SFC/scannow to scan the system. You can use d…

2020年4月4日 0条评论 1016点热度 5人点赞 痴者工良 阅读全文

Reimage Repair 是一个非常强大的工具,能够诊断系统问题,修复系统。 对于 windows 10 更新时碰到的各种错误,使用此软件可以很容易地修复系统。 以管理员权限打开cmd,输入 SFC/scannow 也可以扫描系统。 使用 dism /online /cleanup-image /restorehealth 可以修复系统。 [......] 继续阅读

2020年4月4日 0条评论 6897点热度 5人点赞 痴者工良 阅读全文

[5 Minutes] Rookie Study on Design Patterns: Six Design Principles [TOC] As a rookie, the author will attempt to explain the characteristics and application scenarios of these principles in simple code and easy-to-understand language. The six principles are th…

2020年4月4日 0条评论 1126点热度 1人点赞 痴者工良 阅读全文

[5分钟]菜鸟修研之设计模式:六大设计原则 [TOC] 笔者作为一个菜鸟,会尝试以简单的代码和容易理解的语句去解释这几种原则的特性和应用场景。 这六种原则分别为单一职责原则、接口隔离原则、里氏替换原则、迪米特法则、依赖倒置原则、开闭原则。 单一职责原则 单一职责原则(SRP:Single responsibility principle),规定一个类中应该只有一个原因引起类的变化。 单一职责原则的核心就是解耦和增强内聚性。 问题: // 假设此类是数据库上下文 public class DatabaseContex…

2020年4月4日 0条评论 4016点热度 2人点赞 痴者工良 阅读全文

readonly string ganweiCosr = "AllowSpecificOrigins"; Startup.ConfigureServices 中,添加服务 #if CORS services.AddCors(options => { options.AddPolicy(ganweiCosr, builder => builder.AllowAnyHeader() .AllowAnyMet[......]继续阅读

2020年4月3日 0条评论 7036点热度 7人点赞 痴者工良 阅读全文

Startup 中,添加一个变量 readonly string ganweiCosr = "AllowSpecificOrigins"; Startup.ConfigureServices 中,添加服务 #if CORS services.AddCors(options => { options.AddPolicy(ganweiCosr, builder => builder.AllowAnyHeader()[......]继续阅读

2020年4月3日 0条评论 6950点热度 7人点赞 痴者工良 阅读全文

Create a static class to inject Dapper services. /// <summary> /// Inject Dapper /// </summary> public static class DapperService { /// <summary> /// Inject Dapper /// </summary> public static IServiceCollection AddDapperCon[......]继续阅读

2020年4月3日 0条评论 1156点热度 6人点赞 痴者工良 阅读全文

新建一个静态类吗,注入 dapper 服务。 /// <summary> /// 注入dapper /// </summary> public static class DapperService { /// <summary> /// 注入dapper /// </summary> public static IServiceCollection AddDapperContext(this IServiceCollection service[......]继续阅读

2020年4月3日 0条评论 6161点热度 6人点赞 痴者工良 阅读全文

可以在容器中执行命令,查看到信息 /egrep '^1:.+(docker|lxc|kubepods)' /proc/1/cgroup 那么我们可以通过读取文件的方法,去分析是否在容器中运行。 代码如下 /// <summary> /// 是否在容器中运行 /// </summary> /// <returns></returns> private static async Task<bool> IsRunAtD[......]继续阅读

2020年4月1日 0条评论 4492点热度 0人点赞 痴者工良 阅读全文

可以在容器中执行命令,查看到信息 /egrep '^1:.+(docker|lxc|kubepods)' /proc/1/cgroup 那么我们可以通过读取文件的方法,去分析是否在容器中运行。 代码如下 /// <summary> /// 是否在容器中运行 /// </summary> /// <returns></returns> private static async Task<bool>[......]继续阅读

2020年4月1日 0条评论 4448点热度 0人点赞 痴者工良 阅读全文

SQLite does not actually delete data; instead, it moves the data to free pages. This can cause the database size to increase over time. The vacuum command copies the contents of the main database into a temporary database file, then clears the main database an…

2020年4月1日 0条评论 1142点热度 4人点赞 痴者工良 阅读全文

SQLite 删除数据不会真正删除,而是移动到空闲页中。这样会导致体积越来越大。 vacuum 命令通过复制主数据库中的内容到一个临时数据库文件,然后清空主数据库,并从副本中重新载入原始的数据库文件。这消除了空闲页,把表中的数据排列为连续的,另外会清理数据库文件结构。 意思是,体积太大,就执行 vacuum 命令(SQL)命令,这样就可以清楚缓存,整理碎片。 https://www.runoob.com/sqlite/sqlite-vacuum.html [......] 继续阅读

2020年4月1日 0条评论 4762点热度 4人点赞 痴者工良 阅读全文

1. Knowledge Scope Basics of Java Language Operations and Statements Basics of Object-Oriented Programming Arrays and Strings Graphical User Interface (GUI) Graphics and Multimedia Multithreading Input and Output Streams Network and Database Programming Among …

2020年3月29日 0条评论 1000点热度 0人点赞 痴者工良 阅读全文

1,知识范围 Java 语言基础 运算和语句 面向对象编程基础 数组和字符串 图像界面(GUI) 图形图像多媒体 多线程 输出输入流 网络和数据库编程 这些知识中,GUI、和图像、多线程、输出输入流、网络数据库,时间较紧的情况下,没那么多时间学习(不想学Java)。 一张试卷 100 分,60 及格,75 良好。 那么,要求达到 75 分,需要在合理时间内大概学习浏览一下 Java 的知识。 2,考试题型和分值 题序 题型 总分值 单题分值 题数 一 选择 10 1 10 二 填空 20 2 10 三 简答题 20…

2020年3月29日 0条评论 4080点热度 0人点赞 痴者工良 阅读全文

The previous article mainly focused on basic syntax, while this one focuses on GUI-related topics. GUI is very old, and I wouldn't learn it if it weren't for exams. 1. What models are used to detect and respond to events in the java.awt.event package? Answer: …

2020年3月28日 0条评论 3988点热度 0人点赞 痴者工良 阅读全文

上一篇主要是基础语法,这一篇主要是 GUI 方面的题目。 GUI 非常老啦,如果不是为了考试,才不学这个。 1,在 java.awt.event 包中用来检测并对事件做出反应的模型有哪些? 答:源对象(Source)、监视器对象(Eventlistener)、事件对象(EventObject) 监视器对象 -> 注册监视某动作 -> 源对象动作触发事件 -> 产生信息(事件对象) -> 传递 模型中不包含事件方法。 2,Java 中, JPanel 是一种通用容器,它的默认布局为 FlowL…

2020年3月28日 0条评论 3960点热度 0人点赞 痴者工良 阅读全文

The author is proficient in C#, and is learning JAVA solely for an exam in April. How to learn the basic syntax of JAVA and pass the exam in the shortest time possible? To cope with the exam, the sections on conditions and loops are similar in C, C++, C#, and …

2020年3月28日 0条评论 1032点热度 0人点赞 痴者工良 阅读全文

笔者擅长 C# 语言,4月份要考试,学习 JAVA 是为了考试罢了。 如何在最短时间内学习 JAVA 基础语法和通过考试考核呢~ 学习 JAVA ,要为了应付考试,判断、循环这部分,C、C++、C#、JAVA 都是一样的,不需要重复学习。 基础语法上,C++ 跟 C# 接近,例如命名空间(namespace)、继承(:)。 高级语法 JAVA 跟 C# 接近,很多 API 甚至名字都一样。 笔者在学习和完成试卷练习时,将具有代表性的 JAVA 题目抽取出来,集中复习和了解习题的套类,这样最短时间能够通过考试,并且拿…

2020年3月28日 0条评论 5822点热度 0人点赞 痴者工良 阅读全文

刚学 C++ 时(为了考试),里面有很多关于内存,流的函数或类,记起来比较伤脑。C++ 中,命名空间,类,函数和字段的层次关系比较散,有时很难记全某些功能的函数如果使用。 这里介绍的是 C++ 中的流。 此图来自中国农业大学阚道宏的 C++课程。老师的课程地址:https://www.icourse163.org/u/828041496?userId=9557378&trace_c_p_k2=65c0410da50e4f8196ed498a433292ee C++ 中,流 分为 标准流,文件流,字符流。 i…

2020年3月28日 0条评论 1032点热度 0人点赞 痴者工良 阅读全文
1333435363754