Link: https://www.linkinstars.com Foreword FastDFS is an open source lightweight distributed file system that manages files. Its functions include: file storage, file synchronization, file access (file upload, file download), etc., solving the problems of large-capacity storage and load balancing. It is especially suitable for online services based on files, such as photo album websites, video websites, […]
Tag: std
Use of std::string_view in C++17
In order to solve the problem of high cost of initialization (or copying) of std::string, C++17 introduced std::string_view. std::string_view provides read-only access to an existing string (C-style string, std::string, or another std::string_view) without copying. std::string_view is typically used when you want to handle and manipulate strings efficiently without modifying them. int test_string_view_copy() { std::string str1{ […]
day11-fastdfs and minio managed files, Alipay payment secondary encapsulation, payment related table analysis, order interface, front-end payment function, payment success front desk (configuring routing and Alipay callback address), payment success callback interface (two)
0 fastdfs and minio hosting files 0.1 fastdfs 0.2 minio 1 Alipay payment secondary packaging 1.1 General test 1.2 Secondary packaging 2 Analysis of payment related tables 3 Order interface 4 Front-end payment function 5 Payment success front desk (configure routing and Alipay callback address) 6 Payment success callback interface (two) 0 fastdfs and minio […]
Dynamic memory allocation (stdlib.h must be included when using)
1. Dynamic memory function-malloc void malloc(size_t size); The malloc function applies for a continuous available space in memory and returns a pointer to this space. ① If the space is successfully opened, a pointer to the opened space will be returned. ② If the space opening fails, a NULL pointer will be returned, so the […]
Installation and testing of FastDFS [CentOS]
Installation and use of FastDFS [CentOS] The image upload function uses FastDFS. After the image is uploaded successfully, we generally use Nginx for subsequent image access, so three software packages need to be installed. Tracker installation Storage installation nginx installation Download FastDFS and other dependent libraries Download the required dependent libraries in advance and upload […]
Generic empty class with dynamic property support: stdClass
Article directory refer to environment stdClass container Convert array to object Parse JSON data Dynamic properties concept \_\_set() Default behavior of \_\_set() Restore the default behavior of __set() PHP8.2 Deprecated #[\AllowDynamicProperties] annotation Natural dynamic property supporter stdClass stdClass derived class Reference Project Description Search Engine Bing, Google AI large model Wen Xinyiyan< /strong>, Tongyi Qianwen, […]
Linux standard C library <stdio.h> file operations
C standard library URL link 1. The difference between open and fopen Concepts 2. Standard C library man manual 3. Standard C library API code implementation 4. Standard C library writes structure to file 5. Standard C library fputc(), fputs() function API 6. Standard C library fgetc(), feof() and ferror() function API 1. Concept of […]
C language standard library–<stdlib.h>
Table of Contents 1. Library variables 2. Kuhong 3. Library functions 3.1 free() 3.2 malloc() 3.3 calloc() 3.4 atoi() 3.5 atol() 3.6 rand() 3.7 exit() 3.8 getenv() The stdlib .h header file defines four variable types, some macros and various general utility functions. 1. Library variables variable describe size_t This is an unsigned integer type, […]
rvalue references, reference folding, std::move and std::forward
1. Rvalue reference Before understanding rvalue references, we need to first understand what rvalues are. An rvalue (RValue) refers to a temporary variable that exists in memory, but we cannot access modified temporary variables through symbols (or aliases). e.g. int k = 5; // k = LValue, 5 = RValue int m = k + […]
FastDFS+Nginx builds a local file server
FastDFS is an open source lightweight distributed file system that manages files. Its functions include: file storage, file synchronization, file access (file upload, file download), etc., solving the problems of large-capacity storage and load balancing. It is especially suitable for online services based on files, such as photo album websites, video websites, etc. FastDFS is […]