Answer the question
In order to leave comments, you need to log in
Occasional laptop freezes?
Hello. Rarely, once or twice a day, the laptop freezes for a second (Lenovo Legion 5 Pro 16ACH6H, Windows 10). Hangups happen quite randomly. It happens in games, sometimes with normal surfing. I tried to catch through the event viewer and the stability log - nothing. When testing the RAM through mdsched, the result is the same. I checked the SSD - also to no avail. I'm thinking of putting another RAM for testing, but maybe someone had such a problem and a solution was found?
Usually the laptop is in hybrid mode, but when you turn it off, nothing changes, freezes still happen
Answer the question
In order to leave comments, you need to log in
I consider this approach logically incorrect, in which promotional codes are represented by a simple number and, accordingly, one field of the whole pit. I would design the system differently: Each individual promo code is a separate entity with its own unique ID, foreign key to the "Customers" table and foreign key to the "Payments" table, a NULL value in this field means that the promo code has not yet been used. It is easy to write a (sub)query that returns the number of unspent promo codes for a client, you can even make a view (readonly) in the database with clients and the number of unspent promo codes for them. The promotional code will be spent by comparing it with an entry in the "Payments" table.
Um, accept a callback from payment systems and make it as a condition?
If true returned (I don't know what they have there): executes
Otherwise:
Displays an error
There are many options, 2 obvious -
1)
the user can create an order, use a promo code, but the payment is not made. In this case, the use (counter -1) is counted.. The user is an evil Pinocchio himself, warn about "hung" transactions with promo tickets, see the topic "conversion of abandoned carts" in Google.
The simplest thing is to add a second counter and build logic on two counters.
The problem was solved by disabling the AMD Platform Security Processor.
I also have a very short frieze, usually I determine this by sound. And it doesn't matter what load on the laptop.
I have an ASUS G513QR-HN110T Strix Ryzen™ R7 5800H/32G/1T SSD/15.6" FHD 144Hz/GeForce RTX™ 3070 8G/Win1 model. Have you tried to catch the MSI Afterburner freeze? in the settings there is monitoring of many characteristics. I had it short-term frequency jump on CPU core 1. But I'm not sure about it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question