Log

2024-04-08 00: 05

2024-04-02 11: 17

2024-04-01 00: 23

2024-03-30 00: 40

2024-03-26 22: 05

2024-01-16 12: 52

2023-12-15 23: 33

2023-12-15 17: 45

The server virtual machine was accused of operating the printer and printing random things

2023-11-30 17: 37

Successfully implemented a writing machine based on Anycubic Chiron

2023-11-21 20: 40

Manual reloading of 3D printer without reloading mechanism was successfully realized through handwritten reloading G-Code

2023-11-04 12: 19

Yolov8 It’s really convenient to use right out of the box

2023-10-27 23: 06

The super simple wheat wheel car is finished and the code is placed gitea

2023-10-07 23: 14

Modify file and folder permissions in batches on Linux.

find * -type f -exec chmod 644 {} \;
find * -type d -exec chmod 755 {} \;

2023-08-31 20: 03

ASMB10-iKVM will ask to reset the password when it is started for the first time. Although the password limit is more than 8 characters, it will actually store a 16-byte password. If the password is less than 16 bytes, garbled characters will be appended, otherwise it will be truncated. Fortunately, I set 18 bytes, otherwise it would be stuck by ASUS's operation.

2023-08-27 03: 45

I was stuck on question C for two hours without thinking about it, and ended up finishing question D in five minutes. Then I discovered that C is just a simple binary decomposition.

Afterwards, if you get stuck while doing the questions, you must read the following ones first. This time, the 500 points were immediately lost.

2023-08-11 00: 27

Nvidia graphics card pass-through test on Linux virtual machine successful!

2023-08-06 02: 47

First there was a CF that dropped a lot of points, and then there was an earthquake, which was incredible.

2023-06-14 20: 18

After finishing the college entrance examination and participating in the comprehensive recruitment interview training, why were all the questions asked about history and politics?

2023-04-03 20: 33

When downloading something from GitHub fails, add it before the URL https://ghproxy.com/ .

2023-03-12 23: 05

Forget the past, forget the future, forget the present, stay out of trouble and be at ease.

2023-03-03 22: 47

Regarding the empty base class optimization in C++, in addition to the differences mentioned on 2022-11-18, there is another difference between MSVC and GCC. As we all know, the C++ standard requires that different objects of the same type must hold a single address, but MSVC is very lax. In complex object inheritance, different objects of the same type may have the same address due to empty base class optimization, and at the same time, the same address will be generated. GCC different effects.

struct A     {           };
struct B : A { uint64 V; };
struct C : A { B      V; };
struct A     {           };
struct B : A { uint64 V; };
struct C     { B      V; };

In these two pieces of code,sizeof(C) The results are quite different on GCC and MSVC. Among them, in GCC, the result of the former is 16 and the latter is 8, which strictly guarantees the condition that different objects of the same type must hold a single address. But in MSVC, the result of both is 8, which results in the former having two addresses with the same address. A Object,does not meet the standard.

2023-03-03 22: 37

Maybe it’s not AI that worries me at all.
I've lost interest in new technology, so I'm just worried about old technology becoming obsolete.
This is simply unhealthy thinking.

2023-03-02 17: 48

The essence of today's AI is almost "powerful and powerful", and there are almost no improved algorithms coupled with big data and high-performance GPUs. However, data and performance are completely monopolized by large companies, and the cost for individual enthusiasts has skyrocketed.

This is an example where probability theory is obviously stronger than analytical theory. The trained model is not interpretable at all, but the effect is countless times better than solutions from an analytical perspective. This can hardly be called science. It is like a mysterious and mysterious black box, with a sense of Chinese medicine and Western medicine. And in the foreseeable future, this black box will be ahead for a long time.

It is this black box based on probability theory that can already solve slightly complex drawings, basic mathematical problems, and preliminary emotions. Does this mean that the so-called human thinking is just a huge model?

Perhaps this is the case. Mutation and selection in nature seem to be somewhat similar to AI, in that they are all trained on huge samples. Current research on the human brain seems to be able to be simulated, but it is difficult to say that humans are also black boxes.

What is human intelligence? If probabilistic intelligence represents an individual's ability to summarize rules from an infinite sample set per unit time, then intelligence represents computing power, and the development of GPU will allow AI to possess human intelligence. If analytical intelligence refers to the ability of individuals to summarize patterns within a unit sample set, then it is different.

Maybe what really scares me is not that I will be replaced by AI, but that I lose the opportunity to think. When Big Brick Fei can solve all problems, thinking is like a joke. This is as if studying mathematics is a joke when all problems can be solved through exhaustive violence.

The castle of science was trampled down by the giant dragon of AI.

2023-02-28 22: 42

If you wait until you get out of the ivory tower and find that your major has been replaced by AI, will you regret not entering the society earlier?

2023-02-26 21: 57

It has been a long time since I could calm down and concentrate on one thing. There are always other thoughts interfering with me.

2023-02-15 23: 32

In C++20, if there is std::input_iterator rather than being satisfied std::forward_iterator type I and satisfy std::sentinel_for<I> type S , then assume std::sized_sentinel_for<S, I> invalid.

2023-02-04 18: 55

When VAX shading errors occur, you can synchronize VS shading with VAX, so that the VS default shading system will be used for parts that cannot be processed by VAX.

2023-02-03 19: 22

使用 size_t When using a type as a circular index for traversal in reverse order, be careful to avoid 0 Direction overflow, you can use != Make termination conditions.

2023-01-29 23: 22


2023-01-14 23: 19

In MSVC C++, __STDCPP_DEFAULT_NEW_ALIGNMENT__ The value is 16, which means using new Objects created by the operator are aligned to at least 16-byte boundaries, in overloads new This needs to be noted when using operators.

2023-01-11 19: 17

constexpr if cannot replace #if ,because constexpr if Symbols are looked up internally, causing compilation errors.

2023-01-08 12: 10

2023-01-07 11: 06

  • Used when permuting atomic types in loop attempts std::atomic<T>::compare_exchange_weak .
  • Used when permuting an atomic type in a single attempt std::atomic<T>::compare_exchange_strong .

2023-01-05 17: 17

For template types TUniquePtr<T> , member function operator=(TUniquePtr&&)operator=(TUniquePtr<U>&&) are different. The former is a move assignment and the latter is a conversion assignment. The latter cannot replace the former. This is when using MakeUnique<>() This can be clearly seen when assigning a value, because the latter will report an error.

2023-01-05 16: 32

special, new int versus new int() There are different semantics, the former is not initialized, and the latter is zero-initialized.

2023-01-05 16: 29

special, new int[N] The type of expression is not int(*)[] But int* .

2022-12-17 21: 59

In C++20, operator== Reversing parameters can occur, meaning that if operator== When appearing as a member function, it is possible that the pre-inversion and post-inversion overloads have similar conversions resulting in compilation errors, i.e. MSVC-C2666 . About this on discussion of issues .

  • When LHS and RHS are of the same type operator== Should be declared as a friend rather than a member function.
  • When LHS and RHS types are different operator== Can be declared as a member instead of a friend function.

2022-12-16 23: 15

When a function exceeds 4 lines of equivalently valid code, it should not be declared as FORCEINLINE .

2022-12-15 21: 56

Writing FAny When using non-member operator== , resulting in disruption of all operator== Operation. Because almost any type can be converted to FAny ,and so operator== Should be used as friend functions to avoid polluting external namespaces.

2022-12-13 23: 10

Shaped like FXXXRef A class whose behavior should mimic a reference type, e.g. = delete; Declare the assignment operator.
Shaped like FXXXRef Classes should imitate non-null pointers rather than imitating reference types.

2022-12-05 18: 37

When the function parameter is a universal reference, it will not be deduced as std::initializer_list .

When passing through a forwarding function, the compiler uses type inference system, but C++ stipulates that when the function template parameter is not defined as std::initializer_list When passing a type, the curly brace type will not be deduced as std::initializer_list . (This situation is called non-derivative context ,but auto The derivation of std::initializer_list

2022-11-20 20: 58

In C++, a derived class will not inherit the declaration cycle functions (constructor, assignment operator, etc.) of the base class. You need to use using Keywords are introduced manually. The assignment operator is not that it cannot be inherited by the derived class, but it is overridden by the default assignment operator of the derived class, so it cannot be inherited.

#define STRONG_INHERIT(...) /* BaseClass */        \
    /* struct DerivedClass : */ public __VA_ARGS__ \
    {                                              \
    private:                                       \
                                                   \
        using BaseClassTypedef = __VA_ARGS__;      \
                                                   \
    public:                                        \
                                                   \
        using BaseClassTypedef::BaseClassTypedef;  \
        using BaseClassTypedef::operator=;         \
                                                   \
    }

2022-11-18 22: 03

For empty base class optimization in C++, if multiple inheritance occurs, the specific optimization measures are compiler-specific. In MSVC, only the last empty base class applies empty base class optimization, and the other empty base classes do not apply empty base class optimization and allocate one byte. In GCC, no matter how many empty base classes exist, empty base class optimization is applied and no space is allocated. The address of the empty base class is the same as the first address of the derived class object.

2022-11-14 22: 20

The Nvidia driver will be bound to listen on port 1090, please be informed.

2022-11-11 21: 06

I don’t really understand the iSCSI design of Windows, and there are various metaphysical errors, such as Disconnect iSCSI gracefully All are difficult.

2022-10-31 21: 10

I have to say that foreigners speak very formally. from Github Issue #507 .

2022-10-29 21: 01

Complete Git library organization and self-build gitea versus GitHub auto-sync settings.

2022-10-12 21: 05

2022-10-06 19: 32

If you encounter injustice in society, be sure not to stand up and speak out. Otherwise, the problem will be blamed on you, and you may even be accused of being a reactionary. If you meet someone who has been wronged or falsely accused, even if you know that he is a good person, you must not step forward to explain or defend him. Otherwise, you will be said to be his relative or have received bribes from him. If he is a woman, he will be suspected of being her lover; if he is more famous, he will be a party member. For example, if I write a preface to a collection of letters to an unrelated lady, people will say she is my aunt; if I introduce some scientific literary theory, people will say she is worth the Soviet ruble. Relatives and money are really closely related in China today. Facts have taught us a lesson. People are used to it and think that everyone is inseparable from this relationship. It is not surprising at all.

2022-09-24 00: 04

Human Social Condition I – Prioritize identification with each other in discussions of subjective issues.

If the issue being discussed has nothing to do with you, fully agree with the other person.
Otherwise, if the issue discussed is about yourself, try to belittle yourself.
In addition, if you intend to push the other party, be careful not to become theHave fun.

2022-09-22 23: 12

Articles are embedded into web pages via Advanced iFrame and will be redirected to the Google PDF viewer if the URL ends in .pdf.

https://xxx.top/pdfjs/web/viewer.html?file=/PDFs/XXX.pdf

This URL should load a PDF file named XXX.pdf through pdf.js, but it actually redirects to the following URL.

https://docs.google.com/gview?url=https://xxx.top/pdfjs/web/viewer.html?file=/PDFs/XXX.pdf

This causes the iFrame to behave incorrectly. Although I don't know the reason, I found that this problem can be solved by adding invalid parameters at the end.

https://xxx.top/pdfjs/web/viewer.html?file=/PDFs/XXX.pdf&fuck=google

2022-09-11 18: 30

2022-09-10 19: 17

The website's MD support is moved from the WP-Editor.md plugin to the WP Githuber MD plugin.
solved \KaTeX Unusable problem. However, the code highlighting-prism.js module of this plug-in conflicts with the Mermaid-mermaid.js module, so I had to use the code highlighting-highlight.js module instead. The problem is that the display quality is not good, and the highlight of the Prismatic plug-in is enabled at the same time. js can alleviate this problem.

2022-09-06 22: 04

Complete the conversion of home network from TP-LINK to iKuai soft routing.
After successfully upgrading the network speed from 800Mbps to 100Mbps, Synology's performance is really poor.

2022-08-14 11: 30

Save a suspected scriptable method of logging into TP-LINK for later use. - Portal -

2022-06-30 22: 21

No one can understand me now, not even me in the future or past.

2022-06-25 18: 02

2022-06-10 23: 16

static_assert in C++ will be triggered unconditionally if the conditional expression is false at compile time.
Therefore, when you need to use static_assert that is triggered upon instantiation in a template class, you need to include template parameters in the conditional expression.
As shown in the code below, the former will always trigger even if the template is not instantiated, while the latter will only trigger when instantiated (T is the template parameter).

static_assert(false, "Non-existent types in tuple");
static_assert(!CSameAs<T, T>, "Non-existent types in tuple");

2022-05-30 22: 36

For the first time in my life, I submitted a PR to an open source project, and it was merged by the author!jeessy2/ddns-go #289

2022-05-08 23: 24

MSVC generates a C1001 internal compiler error when comparing two function types using the ternary comparison operator.

2022-05-03 21: 06

For a class that holds object references, we should not accept rvalue references as bound objects because they usually have temporary lifetime.

2022-04-30 22: 09

Discovered a feature of MSVC and GCC again!

using T = const int(&)[16];

auto& A = typeid(T);
auto& B = typeid(decltype(std::declval<T>()));
auto& C = typeid(typename std::remove_cvref<T>::type);

std::cout << A.name() << std::endl;
std::cout << B.name() << std::endl;
std::cout << C.name() << std::endl;
std::cout << (A == B && B == C) << std::endl;

For the above code, the execution result of MSVC is.

int const [16]
int const [16]
int [16]
false

But the execution result of GCC is.

A16_i
A16_i
A16_i
true

It can be seen that MSVC will not ignore the top-level const in some cases, which is consistent with typeid operator Doesn’t match.

2022-04-28 00: 00

Here comes an adult, yay!

2022-04-23 23: 16

The Lambda implementation of TFunction is 10% slower than the template function implementation on the Win platform. It is the same on Linux, which is not very understandable.

2022-03-30 10: 56

document: structured binding declaration

Case 2: Binding tuple type

First i variable initializer

  • If in E for identifiers in the scope of get In the search by class member access, at least one declaration is found that is a function template whose first template parameter is a non-type parameter, then e.get<i>()
  • Otherwise get<i>(e), where get Only perform actual parameter dependency lookups and ignore other lookups..

It should be noted here that although tuple_sizetuple_element Request to be placed in std namespaces as specializations, but get Functions should be placed in the same namespace as the custom type. MSVC and ICC check this laxly, while GCC enforces it.

reference: Why can I create user defined structured bindings for glm::vec in MSVC and icc, but not Clang and GCC?

2022-03-18 22: 53

How to make every step meaningful and not waste time.

2022-03-17 10: 32

VS folding function shortcut keys
Ctrl + M + O – Collapse all
Ctrl + M + M – Collapse and expand current
Ctrl + M + L – Expand all

2022-03-13 17: 45

The move semantics in C++ require that the state change of the moved object is only to be destructed normally, but not to return to the null state. When writing classes that require move semantics, more attention should be paid to the performance of the move. in STD std::vector After being moved, an object with a length of 0 will be left, and std::optional Retains its value after being moved instead of being reset.

2022-03-12 16: 10

Successfully embedded Synology VideoStation videos through iFrame.
iFrame display 发送了无效的响应 , and the console reports iframe frame-ancestors 'self' , which was finally solved by disabling the CSP function in Synology’s security options. use simultaneously allowfullscreen="true" The parameter allows the web page within the iFrame to be displayed in full screen.
Sample page

2022-03-09 22: 22

2022-03-07 22: 32

2022-03-05 19: 40

"Can you still call yourself a young man if you are not full of energy?" — "Conquest"

2022-02-28 23: 24

While you are still debating whether or not to study, others are debating whether or not to study. life .

2022-02-17 22: 59

I saw an ancient story today. It was really scary. Fortunately, this kind of thing doesn’t happen anymore.

2022-02-14 22: 38

How can there be any feelings between people?
People can only use each other
But I am willing to indulge in nihilistic romance

2022-02-13 09: 50

Strict legislation and selective law enforcement for widespread violations

2022-02-11 12: 33

Strong Amway"The Legend of the Great Wall", Ono is so handsome, the best Furry animation I have ever seen.

2022-01-10 23: 07

Crash issues in World of Warships and Rainbow Six have been resolved. I went home last Saturday and wanted to play "World of Warships", but within 4 minutes of entering the game, the "A critical error has occurred" pop-up window crashed (and I was scolded by teammates with QwQ).

Through "World of Warships" customer service, I learned that the problem was caused by a conflict between the Nahimic service and the game. The problem was solved by disabling the service. Attached is the work order record. I have to say that Maozi’s customer service efficiency is really high.

2022-01-06 23: 16

2021-12-26 11: 51

The results of sizeof and typeid will ignore the CVRef modification of the type. For example, the result of const int& is the same as int.

2021-12-26 11: 31

on MSVC std::invoke_result<char(&())[2]>::type The result is char[2]
on GCC std::invoke_result<char(&())[2]>::type The result is char(&)[2]
MSVC wrote the standard library wrong, so you need to implement it yourself.

2021-11-15 22: 37

"Network Data Security Management Regulations (Draft for Comments)"

Article XNUMX The state has established a cross-border data security gateway to block the dissemination of information originating outside the People's Republic of China and prohibited by laws and administrative regulations from being released or transmitted.

No individual or organization may provide programs, tools, lines, etc. for penetrating or bypassing the cross-border data security gateway, and shall not provide Internet access, server hosting, technical support, or dissemination for penetrating or bypassing the cross-border data security gateway. Promotion, payment settlement, application download and other services.

When domestic users access domestic networks, their traffic must not be routed overseas.

2021-11-13 22: 03

Just now, bilibili CDN exploded, the second Bilibili crash recorded on this site.

2021-11-13 19: 35

The first interactive one on this site 页面 Completed, produced based on Unreal Engine and embedded into the website.

2021-11-07 12: 54

A few days ago, there was an incident of abnormal CPU usage of Synology, which is recorded here.


  • 10-31 14:51 – Modify shared folder name and permissions.
  • 10-31 14:51 – Synology CPU suddenly surged to 100%, caused by DSM internal service postgres.
  • 10-31 17:31 – CPU utilization dropped to 50%.
  • 11-01 22:50 – Send a ticket to Synology.
  • 11-03 10:51 – CPU utilization returns to normal levels.
  • 11-03 11:13 – Synology ticket response.

Result: Usually the postgres process may be related to processes such as indexing of multimedia files.

2021-11-07 12: 49

Synology's Docker will have hundreds of problems whether it is exported from the DSM GUI or backed up through SSH commands, so use it with caution.

2021-10-23 23: 23

The first wave of level 61 fantasy club activities, 50+ people signed up for the club, 12 people passed the simple assessment, and there were 6 people left during the live broadcast today, of which only 2 people listened carefully and wanted to learn, and the others were closed. Water, only one of them has a computer with sufficient configuration, and the other one has a computer with 1GB RAM level. It seems that there are still few high school students who can actually learn extracurricular technologies, and the penetration rate of game-level computers is still low.

2021-10-05 18: 27

Compared with MSVC, GCC will check the syntax of all code, even inline functions or templates that are not used, which is great for troubleshooting.

2021-10-02 23: 32

Great wisdom is like foolishness.

2021-09-22 23: 46

Maybe sleeping in bed from 00:30 to 05:30, plus sleeping for two or three classes during the day, is a better schedule for sophomore year.

2021-08-23 20: 28

Leave a record for yourself 4 years ago, just in case Youku disappears one day. wxya

2021-08-20 20: 29

FCriticalSection The critical section can be entered multiple times by the same thread, and only different threads will block and wait.

2021-08-16 17: 08

UE4.26.2 actually enables 106 plug-ins by default, which is too disgraceful.

2021-08-15 17: 42

Start refactoring Redcraft to implement octree-based voxels.

2021-08-03 13: 11

For some reason, the 100GB traffic in Westworld disappeared and turned directly into 0GB as soon as it was turned on, so I recently switched to Panda. However, Panda uses a special client, and the solution using Docker fails (Docker only has one core and does not allow GUI programs). Therefore, a virtual machine is used instead (it takes up a lot of resources). Panda's Http port cannot be used for some reason. Here I choose to use Privoxy to convert Socks5 to Http. The remaining problem is that Panda cannot start completely after Privoxy starts up, resulting in Privoxy Panda cannot be recognized and you need to manually enter the command to restart Privoxy.

systemctl restart privoxy

Update: Automatic restart of Privoxy has been implemented using Cron scheduled tasks.
Update: Due to too many bugs, I ended up using a Win virtual machine.

2021-08-01 09: 03

MyRedstone successfully upgraded from HTTP to HTTPS

2021-07-25 17: 50

Record a Docker-Trojan failure:
I just upgraded DSM 7.0 to Synology a few days ago. First, I couldn’t log in with my Synology account. Today I found that Trojan failed on Docker and the error was SSL handshake failed. According to Google, it was a problem with the SSL verification file on Linux. You need to manually specify the verification. File Directory.

"cert": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"

After all, it has been used before without any problem. I guess it is most likely useless. The fact is that the file cannot be found and the Docker container crashes directly.
Finally, choose to turn off SSL verification to solve the problem.

"verify": false

Although this is not officially recommended, there is no other way.

2021-07-23 21: 45

The ball based on the MarchingCubes algorithm is finally made.

Strange objects generated due to bugs caused by forgetting to clear the inner layer of the nested For loop.

2021-07-23 20: 32

World aligned textures/normals can solve the UV stretching problem of cliff terrain

2021-07-14 22: 35

Just last night, bilibili Exploded, hereby recorded.

2021-07-10 22: 27

Q: What is your favorite subject?
A: Studying is difficult. I don’t have any subjects that I am good at.

2021-07-05 23: 26

Recently, Synology's storage space has taken up 100% of the card's memory for no apparent reason. When viewing it through the resource manager, it is mainly occupied by the DSM Log service.
In the Log Manager, I found some connections from 127.0.0.1, and I kept trying to log in to the mail server with different user names.
It is speculated that someone is trying to use the email server to crack the Synology administrator account.
Finally, the Synology mail server had to be shut down, and the storage space usage returned to normal.


2021-07-04 23: 14

In order to make procedural voxel components.
I've been studying Unreal's rendering system recently.
Found a more systematic one article .

2021-07-02 22: 14

Synology has been running stably for 100 days.

2021-06-17 22: 38

The first period of evening self-study is to overcome the tribulation. After the first period of evening self-study, you will not be sleepy.

2021-05-03 17: 52

Unreal or Unity? C++ or C#?

Language Lawyer

2021-04-24 20: 58

When you start showing off something, you are not far away from losing it.

2021-04-15 22: 24

Is it really possible to finish the homework for the first year of high school? QwQ

2021-03-10 22: 52

Day 3 of stuck with cross Dll memory allocation and deallocation issue
Related information-0 Related information-1 Related information-2 Related information-3 Related information-4

2021-03-02 22: 15

Progress achieved [Redcraft Material]

2021-02-28 22: 39

Progress achieved [Redcraft Section]

2021-02-27 19: 37

Progress achieved [Redcraft Block]

2021-01-27 13: 59

Progress achieved [The first winter vacation in high school] , this page was renamed log to record some activities.

2021-01-03 19: 13

[RSHW] Network is basically completed and KCP + UDP communication is implemented.

2020-12-27 19: 03

[RSHW] Network plug-in started.

2020-11-25 22: 54

2020-11-15 08: 51

GitHub is a great place

2020-11-14 12: 06

1 << k;
1ull << k;

The number of left shifts depends on the type of the left operand. Failure to pay attention will lead to the above errors. The suggestions are as follows:

const lli one = 1;
one << k;
(lli)1 << k;

Step on the trap in (CSP-S-T2) and get the score reduction effect.

2020-11-05 22: 46

If you can't change other people's code, don't change it. If you can use the interface provided by others, don't change the plug-in, or merge it into your own project.

2020-11-02 10: 44

The main path problem during packaging comes from the processing mechanism during packaging. UnrealPak will try to extract a common directory as the root directory from all files to be packaged.

2020-10-25 01: 00

CF competition The ranking is historically low and I am torn.

of this page inspiration .