Hongmu Notes
Home Summary of pitfalls

Summary of pitfalls

A summary of common mistakes encountered when building websites... This list isn't exhaustive; it merely records the issues I faced during my own development projects.

Linux replaces multiple line breaks with a single line break.

Linux replaces multiple line breaks with a single line break. Summary of pitfalls

I ran into this annoying guy who wanted 80 yuan for just a single code change—and he insisted on doing it remotely via Suning. The issue turned out to be a simple PHP backend call problem, so I figured, 'Alright, let's just fix it. 'But after watching me resolve it in just a few minutes, he suddenly demanded that I also modify the frontend page— leaving me completely speechless! Charging for every single issue he raised, yet he insisted on paying for a whole bunch of problems for just one? Does he really think he's some kind of 'tech novice'? I've dealt with this guy many times before; every time I needed to make a change, he'd keep negotiating the price— and I'd...
👁 154
Uncaught ReferenceError: jQuery is not defined

Uncaught ReferenceError: jQuery is not defined Summary of pitfalls

This error usually indicates that the jQuery library has not been loaded correctly; you need to ensure that the jQuery library is properly included in your HTML file. You can add the following code within the <head> tag of your HTML file to include jQuery: <script src="https://code.jquery.com/jquery-...>
👁 280
Linux command to query a large file directory on a server

Linux command to query a large file directory on a server Summary of pitfalls

You can use the `du` command to check the size of each folder in a Linux file system and identify the largest folders among them. Enter the following command in your terminal to find all folders larger than 1 GB and sort them in descending order by size: `du-h / | grep '[0-9\.]\+G' | sort-rh`. Here, `/` is the root directory you want to search, and `-h` specifies...
👁 282
Linux: Query large files on a server

Linux: Query large files on a server Summary of pitfalls

You can use the `find` command to search for large files in a Linux file system. Enter the following command in your terminal to locate all files larger than 100 MB: `find / -type f-size +100M-exec ls-lh {} \;` Here, `/` represents the root directory to search within; `-type f` specifies that only files (not directories) should be searched;...
👁 194
How to make the content within an iFrame framework expand both horizontally and vertically?

How to make the content within an iFrame framework expand both horizontally and vertically? Summary of pitfalls

To make the content within an iframe expand both in height and width, set the `scrolling= "no" ` and ` frameborder= "0" ` attributes on the iframe tag to disable the scrollbar and border. Then, add a `<div>` element after the iframe tag and apply the following style to this `<div>` element: `position: relative; width...`
👁 202
What are the regular expression matching modifiers?

What are the regular expression matching modifiers? Summary of pitfalls

Various modifiers can be used in regular expressions to modify the behavior of matching. Here are some commonly used modifiers and their usage: ^: Matches the beginning of a string. For example, "^a" matches "a". $: Matches the end of a string. For example, "$b" matches "b". \n: Matches any newline character. For example, "\n" matches "\n". \t: Matches any tab character. For example, "\t" matches "...".
👁 154
How can you limit the size of the ibtmp1 file in MySQL so that it doesn't keep growing indefinitely?

How can you limit the size of the ibtmp1 file in MySQL so that it doesn't keep growing indefinitely? Summary of pitfalls

In MySQL, the temporary tablespace file `ibtmp1` is a dynamically evolving file whose actual size is determined on the fly based on actual usage requirements. If this file is not properly managed or constrained, it may continuously grow in size and eventually consume a significant amount of disk space. Therefore, you can use the following method to limit the size of the `ibtmp1` file: add `innodb_temp_data_file` to the `my.cnf` file...
👁 379
What is the function of the ibtmp1 file, and what are the effects of deleting it?

What is the function of the ibtmp1 file, and what are the effects of deleting it? Summary of pitfalls

The ibtmp1 file is one of the temporary table space files of the InnoDB storage engine in MySQL. It is used to store temporary tables and sorted data created by the InnoDB storage engine. A temporary table is a table used to store result sets or intermediate results when performing temporary calculations or processing large amounts of data. Sort data is used to store intermediate results in sort operations and disk temporary files. If you accidentally delete ibtmp1 files,…
👁 395
Can the mysql-bin.000001 file be deleted?

Can the mysql-bin.000001 file be deleted? Summary of pitfalls

Generally, it is not recommended to manually delete the MySQL binary log file (mysql-bin.000001) or other corresponding binary log files. Binary logs are binary files used by the MySQL database to record all modification operations; manually deleting these files could lead to the following consequences: Log backup – if you need to perform data recovery on MySQL, you may need to use these binary logs...
👁 358
What does the `mysql-bin.000001` file mean?

What does the `mysql-bin.000001` file mean? Summary of pitfalls

`mysql-bin.000001` is MySQL's binary log file. It is a binary file used by the MySQL server to record all modification operations performed on the database. When the database executes statements such as `INSERT`, `UPDATE`, or `DELETE`, the server writes these operations to the binary log file; these operations are recorded in binary format, rather than in SQL...
👁 338
1 4 5 6 7 8 14