Frytea | 宋天轮

Career Guidance 2022 – Occupation Rankings “In Short Supply”

Original link: https://blog.frytea.com/archives/642/ Recently, the China Employment Training Technical Guidance Center released the “Top 100 Occupational Rankings in the Third Quarter of 2022 with Recruitment Greater Than Job Searches” . This table is very meaningful for job selection, employment and career. Major mainstream media There are reposts, but most of them are in the form

Career Guidance 2022 – Occupation Rankings “In Short Supply” Read More »

Fundamentally solve the C program ignoring return value of ‘***’

Original link: https://blog.frytea.com/archives/641/ Recently, the following error occurred when porting a C project: xxxxxx.c:990:4: error: ignoring return value of ‘chroot’, declared with attribute warn_unused_result [-Werror=unused-result] 990 | chroot(“/”); The reason why the error level is Error is because GCC compiles with the parameter -Werror , which treats warnings as errors: gcc -std=gnu99 -Wall -Werror -Wno-unknown-pragmas

Fundamentally solve the C program ignoring return value of ‘***’ Read More »

Linux USB Device Fundamentals

Original link: https://blog.frytea.com/archives/633/ Get all the USB devices of the physical node by scanning the following directories: /sys/bus/usb/devices/usb* /sys/bus/usb/devices/usb*/$busnum-* The main information collected for a device from this file system is as follows: { “busnum”: 1, “class”: 0, “devnum”: 2, “level”: 1, “manufacturer”: “QEMU”, “port”: 0, “prodid”: “0001”, “product”: “QEMU USB Tablet”, “speed”: “12”, “usbpath”:

Linux USB Device Fundamentals Read More »

Unsafe dependencies of Perl features

Original link: https://blog.frytea.com/archives/630/ I recently encountered a very strange problem when writing a Perl program: Insecure dependency in unlink while running with -T switch at ../tmpfile.pl line 44. After inspection, it was found that this is a feature of the Perl language, and using -w or -T at runtime means the “foolproof” flag. The -T

Unsafe dependencies of Perl features Read More »

Formatted json string in shell

Sometimes it is necessary to view json data in the terminal environment, such as when using the curl debugging interface. The directly seen json data is similar to this: $ echo ‘{“foo”: “lorem”, “bar”: “ipsum”}’ {“foo”: “lorem”, “bar”: “ipsum”} If you want to format and display json data in a more intuitive way, you can

Formatted json string in shell Read More »