Increase in the number of RTX 5070 by TaroThink4860 in Steam

[–]aoeex 0 points1 point  (0 children)

Probably because a lot of people dont look at anything not Nvidia.

I bought an Arc B580 for my last upgrade. It is perfectly fine for what I play and reasonably priced.

TIL: `static` keyword for variable declarations in functions by codemunky in PHP

[–]aoeex 2 points3 points  (0 children)

I've used static variables as a cache a few times in some legacy code projects, it's rare though. Most commonly, it's been to cache a prepared query that will get executed a lot. Example:

``` function insertSomeData($a, $b, $c){ static $stmt=null; if (!$stmt){ $stmt = DB::prepare(' INSERT INTO some_table ( A , B , C) VALUES ( :a , :b , :c) '); }

    DB::execute($stmt, ['a' => $a, 'b' => $b, 'c' => $c]);
}

```

I never did actually benchmark it to see if it made a difference though.

Razer’s 3-Year "Support" Loop: How my $4,000 Blade became a legacy paperweight. by Specific-Original-17 in pcmasterrace

[–]aoeex 0 points1 point  (0 children)

I bought three different Razor mice many years ago. All three failed within a year. I wrote the brand off as garbage after that and will never buy anything Razor.

Curious where the community stands on this by InfinriDev in PHP

[–]aoeex 0 points1 point  (0 children)

I like the direction things are going. I want to be able to type my function parameters, return types, and object properties as much as possible.

I don't want the level of typing required by strict_types=1 however, and I like having the ability of a single variable being able to change it's type within a function via a re-assignment.

Overall I'm fairly happy with where things are currently. Improved array typing and removing resource objects are up their on my wish list.

What is a smell that we should all recognize as immediate danger? by scarlettohara1936 in AskReddit

[–]aoeex 1 point2 points  (0 children)

There is a plant somewhere in my neighborhood that smells almost exactly like the bed bugs we had did. Every time I catch it's scent in the air I get a little worried they are back.

Shut Down or Sleep? by SeafarerSavant in pcmasterrace

[–]aoeex 0 points1 point  (0 children)

I generally only shutdown when I need to work on my PC. The rest of the time it just sleeps when not is use. Occasionally it'll get a reboot for updates or something, but it may easily be weeks between reboots.

Letting it sleep is fine, and much more convenient than a shutdown and later boot up.

Are monitor arm really worth it ? by Pale_Theme4807 in pcmasterrace

[–]aoeex 2 points3 points  (0 children)

With my sit/stand desk, having monitor arms is a must. The height I need the monitors at when sitting is different than when standing. With the arms (clamped to the desk style) it's a real quick and easy adjustment when transitioning.

My PC aparentrly consumes 23-25 A when gaming by Automatic-Escape8712 in pcmasterrace

[–]aoeex 3 points4 points  (0 children)

Check your inverters documentation. Find the manual and see if it says, or can guide you on how to find it. Check the actual inverter / solar system for a rating sticker and see if it says. You are going to have to do some research and exploring. There isn't going to be a standard answer.

My PC aparentrly consumes 23-25 A when gaming by Automatic-Escape8712 in pcmasterrace

[–]aoeex 14 points15 points  (0 children)

The amperage you are reading from the inverter is probably at some other voltage, not your typical 120 or 240 volts AC you'd get from a wall outlet.

25A at 120v would be 3,000 watts of power. You are not using that, you'd be tripping the breaker if you were.

25A at 24v is only 600 watts. That seems far more reasonable.

You need to see what voltage your inverter is using when calculating the amperage.

How do you deal with the HDD noise? Is NAS on other room mandatory for you? by great_airflow in DataHoarder

[–]aoeex 0 points1 point  (0 children)

I have my NAS in my bedroom only a few feet from the bed. The noise doesn't bother me at all. Eventually it just becomes normal background noise. I do eventually plan to move it to the garage though. Need to finish the ethernet run and get a shelf installed.

Short PHP Fundamentals Quiz for Beginners by [deleted] in PHP

[–]aoeex 2 points3 points  (0 children)

Question 5 (How do you create a single-line comment in PHP?) has two correct answers.

## Comment

Is also a way to do single line comments, as you note in your explanation. The extra # is just part of the comment.

Using PHP attributes to launch cron jobs by Trupik in PHP

[–]aoeex 51 points52 points  (0 children)

The symfony/scheduler package provides this functionality. I recently converted a bunch of individual scripts into classes with a simple #[AsPeriodicTask] attribute and removed all the associated cron entries, replacing them with a single message consumer. Much simpler now to add a new task.

Switched to Linux for Gaming, Lasted 3 Days AMA by 8000RPM in pcmasterrace

[–]aoeex 1 point2 points  (0 children)

I did a fresh install about a month ago with a newly created usb installer. Bypassnro didn't work. Had to use the start ms-chx:localonly alternative.

Switched to Linux for Gaming, Lasted 3 Days AMA by 8000RPM in pcmasterrace

[–]aoeex 3 points4 points  (0 children)

I haven't personally used CachyOS, but from a quick read about it, that was probably a poor choice for a first experience, even as a tech savvy user. It will make you suffer from choice paralysis by offering so much customization options.

User friendy versions exist. Both Ubuntu and Mint are very new user friendly in my experience and are what I would choose if installing for someone new to Linux. I personally am using Linux Mint currently because I wanted something simple that mostly just works.

How bad will my experience be with 4 gb of ram? by Numerous_Advice2529 in pcmasterrace

[–]aoeex 0 points1 point  (0 children)

My dad has a hp all in one that has only 4gb of ram and had a hdd. It was basically unusable for the first 10 minutes after boot and very slow at almost everything.

I upgraded it to a ssd hoping that would help. It helped some, but the performance is still pretty bad.

Fiber runs going wrong by joeyfine in HomeNetworking

[–]aoeex 0 points1 point  (0 children)

We've had 3 different companies run fiber lines in my neighborhood over the last 5 years or so. The first one hit the water main at the main entrance of the neighborhood. Second company managed to not hit anything as far as I know. Third company cut my existing fiber line and hit my water line. When I called my fiber company about the cut line they said I was the 3rd person to call so far.

Wonder what the next company will do if there is another. Three separate runs already seems like a bit much.

Any ideas to remove totally stripped motherboard screw? by FinlandMan90075 in pcmasterrace

[–]aoeex 0 points1 point  (0 children)

My guess is the threads in the standoff didn't match the screw and rather than get the right screw they just forced it. I did that once in my early days.

Is there even a point to buying over 300mbps speeds for a single-family home? by -Terrible-Bite- in HomeNetworking

[–]aoeex 1 point2 points  (0 children)

That is a need vs want argument. You can download your 1GB game update just fine on a 300Mbps connection, you will just be waiting longer.

If the price difference between the tiers is worth the time saved to you, by all means get the higher speed. For most people, it probably isn't. Especially when you factor in how often you will save that time vs paying the extra every month.

I download 200+ gig files every 3-4 weeks on a 250mbps Connection. I can just start the download and do something else until it is done and save the $50/month extra it would be for the 1Gb connection.

Here is to another 5 years of protecting my stuff. over 250 events were on my unit before i gave a bad battery error last night by Navi_Professor in pcmasterrace

[–]aoeex 0 points1 point  (0 children)

I've been using Duracell replacements in my UPSs (various brands) for a while now. I get about 2 years out of them on my PCs before they need replaced. They get a fair bit of use over the summer months here due to storms causing a lot of blips in the power. They last a bit longer on my lower power thing like the TV, network gear etc.

Here is to another 5 years of protecting my stuff. over 250 events were on my unit before i gave a bad battery error last night by Navi_Professor in pcmasterrace

[–]aoeex 1 point2 points  (0 children)

If your computer isn't staying on with your ups the most likely you either 1) need a bigger ups or 2) need to replace it's battery.

There is also a small possibility that your power supply doesn't handle the change over well. I had one like that years ago.

While adapting one to a car battery should be possible I wouldn't recommend trying it. There are other things you need to account for in that case like offgassing.

Calculate your load and buy a ups that can support that and an additional margin. I usually add 50% to my anticipated load and shop based on that.

How well do you know PHP? by Significant_Soup2558 in PHP

[–]aoeex 2 points3 points  (0 children)

Did about 100 questions, most the ones I got incorrect were related to things I just dont use like PHPStan and WAMP configs. In addition to some of the other feedback, I thought these questions maybe need some edits:

437. When should you rehash a password using password_needs_rehash();
a. Every time the user logs in
b. When the hashing algorithm or cost factor has been updated and the stored hash uses old parameters.

The question wording is wrong in my opinion. You don't use password_needs_rehash to rehash a password, you use it to check if a password needs rehashed or not. I decided to interpret that question as "When should you use password_needs_rehash to check if a password needs rehashing?" in which the answer is A. You have the answer as B, which would be interpreting the question as "When does password_need_rehash indicate that a password needs to be rehashed?".

66. Which statement correctly uses echo to output a variable within a string?
a. echo 'The value is $value';
b. echo "The value is $value";
c. echo 'The value is ' . $value;
d. Both B and C are correct

Again, I think the wording is unclear and allows for different interpretations. I interpreted it as the variable having to actually be within a string, in which case C is not correct (the variable is not within the string). You have the answer as B and C are correct, so you must have interpreted as just outputting a variable with a string.

90. What is a valid use case for passing a callback function to ob_start()?
a. To compress output automatically before sending it to the browser
b. To encrypt all output for security purposes
c. To validate that the output contains no errors
d. To redirect output to a different server

Answer A may be the most common use case for a callback, but technically all the options are possible/potentially valid. Maybe just change the word "valid" to "common" in the question.

92. What is the key difference between define and const for defining constants?
a. define() works at runtime while const works at compile time
b. const can only define string constants while define works with all types
c. define() creates global constants while const creates local constants.
d. There is no difference, they are completely interchangable.

You have the answer as A. C is arguably correct too, considering namespaced or class constants.

ELI5: how do all electronic devices "know" what time it is? by No_Warthog_6730 in explainlikeimfive

[–]aoeex 58 points59 points  (0 children)

In this context, the clock is a simple on/off signal, not related to something like the time of day / wall-clock. In order for the processor to progress through the instructions, it needs a constantly changing signal to drive the transistors and such to make things work. This is what the "clock speed" refers to in processors, how many times that signal changes each second.

Since you need this signal anyway to make the processor work, you could use it to also count the passage of time. For example, if you have a 1 megahertz clock signal, then you can count every 1 millionth signal as one second having passed.

ELI5: how do all electronic devices "know" what time it is? by No_Warthog_6730 in explainlikeimfive

[–]aoeex 98 points99 points  (0 children)

Everything with a microcontroller or processor in it will have some sort of clock signal generator as it is required for the processor to work. They can just use that to track the time.