欢迎来到 艾瑞可erik 的魔法世界 🧙‍♂️

给我一个需求,还你一个项目——别管它是什么。这就是全栈。

📚 291 篇文章 🏷️ 504 个标签 📂 90 个分类

🔥 最新文章

PHP Serial Port Development

To use an external device and send and receive data over a serial port, you need some serial port handling code on the PHP side.
PHP’s dio extension (Direct I/O) provides access to low-level I/O operations, including serial port communication. Through the dio extension, you can directly operate serial port device files (such as /dev/ttyUSB0 or COM1) to implement serial port communication.

maven内网库

1. 搭建 Maven 私有仓库

首先,需要在内网环境中搭建一个 Maven 仓库,常用的私有 Maven 仓库工具有:

  • Nexus Repository:Sonatype Nexus 是最流行的私有 Maven 仓库管理工具。
  • Artifactory:JFrog Artifactory 是另一种流行的构建管理工具,提供了私有仓库的支持。
  • Apache Archiva:Apache Archiva 也是一个支持 Maven 的仓库管理工具。

以下是搭建 Nexus Repository 的简单步骤:

Maven internal repository

1. Set Up a Private Maven Repository

First, you need to set up a Maven repository in the internal network environment. Common private Maven repository tools are:

  • Nexus Repository: Sonatype Nexus is the most popular private Maven repository management tool.
  • Artifactory: JFrog Artifactory is another popular build management tool that provides support for private repositories.
  • Apache Archiva: Apache Archiva is also a repository management tool that supports Maven.

The following are the simple steps to set up Nexus Repository:

spring boot内网部署

1. 准备环境

确保内网中的服务器或机器具备运行 Spring Boot 应用的基本环境:

  • JDK:确保服务器安装了合适版本的 JDK(通常建议使用 Java 8 及以上版本)。
  • Maven/Gradle:根据项目使用的构建工具安装 Maven 或 Gradle。
  • 数据库:如果应用需要连接数据库,确保数据库在内网中可访问,且连接配置正确。

Deploying Spring Boot on an Intranet

1. Prepare the environment

Make sure the server or machine on the intranet has the basic environment needed to run a Spring Boot application:

  • JDK: make sure the server has a suitable version of the JDK installed (Java 8 or above is usually recommended).
  • Maven/Gradle: install Maven or Gradle depending on the build tool your project uses.
  • Database: if the application needs to connect to a database, make sure the database is reachable from the intranet and that the connection configuration is correct.

deepin fails to log in with emergency mode error

After the system restarted, the freshly installed WeChat kept popping up dialog boxes and got stuck there, which was unbearable. I force-restarted right away, and after booting it kept showing “You are in emergency mode……” and a pile of stuff, meaning it wanted me to log in as root, check the error and fix it.

Kind of a headache.

System commands would display, but the graphical interface would not.

如何下保证MySQL数据库与Redis缓存数据一致性?

有时候感觉MySQL我们懂了,Redis我们懂了,但是面试的时候一直答不好,经常被难住,问题在哪呢?

答案是:面试官考的不是专项能力,而是多项技术结合应用能力。

就拿并发场景下如何保证MySQL与Redis缓存一致性?这个面试官常见的拷打考点举例。

对于读多写少并且要求高性能的业务逻辑,我们通常在应用服务器访问MySQL数据库的中间加上一层Redis缓存层,以提高数据的查询效率,减轻MySQL数据库的压力,避免在MySQL出现性能瓶颈。

How Do You Guarantee Data Consistency Between MySQL and Redis Cache?

Sometimes it feels like we understand MySQL, and we understand Redis, yet in interviews we never answer well and are constantly stumped. Where is the problem?

The answer is: what the interviewer is testing is not a single-area skill, but the ability to apply several technologies in combination.

Take the interviewer’s classic torture-test question — how do you guarantee MySQL and Redis cache consistency in a concurrent scenario? — as an example.

For business logic that reads a lot, writes little and demands high performance, we usually add a Redis cache layer between the application server and the MySQL database, to improve query efficiency, relieve the pressure on MySQL, and avoid a performance bottleneck in MySQL.

Disabling Video Playback, Pausing, Fast-Forwarding and Other Actions in Mobile Browsers

1. Disabling pausing, fast-forwarding and other actions

You can remove the controls attribute from the <video> element to stop users from operating it via the control bar. Then use JavaScript to force the video’s playback state, not allowing the user to pause or fast-forward.

史上最详细的互联网项目管理实战图解

erik.xyz

如何系统的掌握互联网项目管理知识和经验,我搜罗世面上基本没有介绍这方面的图书,为此咱们去年年初,组织咱们前沿社区的众多大咖联合电子工业出版社出版了这本新书《互联网项目管理实战指南》希望可以助大家一臂之力!今天把文章的思维导图干货一起分享给大家!

The Most Detailed Illustrated Guide to Internet Project Management in Practice

erik.xyz

How do you systematically master the knowledge and experience of internet project management? I searched the market and found basically no books covering this area, so early last year we organized a group of experts from our Frontline community to jointly publish this new book, A Practical Guide to Internet Project Management, with the Publishing House of Electronics Industry, hoping it can give everyone a helping hand! Today I’m sharing the mind map takeaways from the article with you all!

清理c盘

1. 使用磁盘清理工具

Windows 10自带了一个磁盘清理工具,可以用来删除临时文件、系统文件和其他不必要的文件。

  1. 打开磁盘清理工具:
    • 点击开始菜单,输入“磁盘清理”,并选择搜索结果中的“磁盘清理”。
  • 选择要清理的驱动器:
    • 在弹出的窗口中,选择C盘(通常为系统盘),然后点击“确定”。
  • 选择要删除的文件类型:
    • 在磁盘清理窗口中,系统会列出可以删除的文件类型(如临时文件、系统缓存、回收站等)。你可以选择你想清理的文件类型。
      点击“清理系统文件”按钮,允许清理更多系统文件(如Windows更新文件)。
  • 确认删除:
    • 点击“确定”后,系统将开始清理这些文件,清理完成后C盘的空间将得到释放。

2. 删除临时文件

Cleaning Up the C Drive

1. Use the Disk Cleanup tool

Windows 10 ships with a Disk Cleanup tool that you can use to delete temporary files, system files and other unnecessary files.

  1. Open Disk Cleanup:
    • Click the Start menu, type “Disk Cleanup”, and pick “Disk Cleanup” from the search results.
  • Choose the drive to clean:
    • In the window that pops up, select the C drive (usually the system drive), then click “OK”.
  • Choose the file types to delete:
    • In the Disk Cleanup window, the system lists the file types you can delete (temporary files, system cache, Recycle Bin and so on). You can pick the file types you want to clean up.
      Click the “Clean up system files” button to allow cleaning up more system files (such as Windows Update files).
  • Confirm the deletion:
    • After you click “OK”, the system starts cleaning those files, and once it finishes, space on the C drive is freed up.

2. Delete temporary files

SQL性能优化的47个小技巧,果断收藏!

1、先了解MySQL的执行过程

了解了MySQL的执行过程,我们才知道如何进行sql优化。

1.客户端发送一条查询语句到服务器;

2.服务器先查询缓存,如果命中缓存,则立即返回存储在缓存中的数据;

3.未命中缓存后,MySQL通过关键字将SQL语句进行解析,并生成一颗对应的解析树,MySQL解析器将使用MySQL语法进行验证和解析。例如,验证是否使用了错误的关键字,或者关键字的使用是否正确;

4.预处理是根据一些MySQL规则检查解析树是否合理,比如检查表和列是否存在,还会解析名字和别名,然后预处理器会验证权限;

5.根据执行计划查询执行引擎,调用API接口调用存储引擎来查询数据;

6.将结果返回客户端,并进行缓存;

47 Little Tips for SQL Performance Optimization, Bookmark Them Right Away!

1. Understand MySQL’s Execution Process First

Only once we understand MySQL’s execution process do we know how to optimize SQL.

  1. The client sends a query statement to the server;

  2. The server checks the query cache first; if the cache is hit, the data stored in the cache is returned immediately;

  3. If the cache is not hit, MySQL parses the SQL statement by keyword and generates a corresponding parse tree; the MySQL parser validates and parses it using MySQL syntax. For example, it verifies whether a wrong keyword was used, or whether keywords are used correctly;

  4. Preprocessing checks whether the parse tree is reasonable according to certain MySQL rules, such as checking whether tables and columns exist; it also resolves names and aliases, and then the preprocessor verifies permissions;

  5. Based on the execution plan, it queries the execution engine, which calls the API to call the storage engine to query the data;

  6. The result is returned to the client and cached;

使用懒加载 + 零拷贝后,程序的秒开率提升至99.99%

一、5秒钟加载一个页面的真相

今天在修改前端页面的时候,发现程序中有一个页面的加载速度很慢,差不多需要5秒,这其实是难以接受的,我也不知道为什么上线这么长时间了,没人提过这个事儿。

我记得有一个词儿,叫秒开率。

After Lazy Loading + Zero-Copy, the Instant-Open Rate Reached 99.99%

1. The truth behind a page that takes 5 seconds to load

Today while modifying the front-end pages, I found that one page in the program loads very slowly, taking about 5 seconds. That’s really hard to accept, and I don’t know why nobody has brought this up in all the time it’s been live.

I remember there’s a term for this: the instant-open rate.