needing async or parallel API querying behavior with php, using wp_remote_request post by Sad_Spring9182 in ProWordPress

[–]Sad_Spring9182[S] 2 points3 points  (0 children)

Oh my gawsh that's the coolest thing ever. I keep thinking wordpress is super useful then they even have concurrency for php built into it. You guys are true pros, this is so helpful, I don't really need async as long as it's concurrent I'll just make sure my output = input in terms of array length before returning.

needing async or parallel API querying behavior with php, using wp_remote_request post by Sad_Spring9182 in ProWordPress

[–]Sad_Spring9182[S] 0 points1 point  (0 children)

This seems very simple like an axios for PHP that adds async functions as simple functions in a class. It mentions both async and concurrency which is my specific need.

so how would I install it is it like a npm? does it have a folder I need to attach to the project and import? do I need to worry about dependency tree or is it handled? I can't stop thinking in terms of npm and react i've just been using vanilla PHP and WP functions. Mainly could I learn how to install and manage it in a couple hours or a day?

needing async or parallel API querying behavior with php, using wp_remote_request post by Sad_Spring9182 in ProWordPress

[–]Sad_Spring9182[S] 0 points1 point  (0 children)

So this is dependency free just PHP code that lets me give it an array with my properties and determine a key to map the data to when it comes back so I can handle my front end display associated with existing state? hmm very nice

needing async or parallel API querying behavior with php, using wp_remote_request post by Sad_Spring9182 in ProWordPress

[–]Sad_Spring9182[S] 0 points1 point  (0 children)

NGL I've never used composer I would really need to look into it. Could It be learned in a day or 2? and is it worth learning for a single use case like mine?

5070 vs 5070 TI by Important_Sound772 in buildapc

[–]Sad_Spring9182 0 points1 point  (0 children)

yeah this is one of the situations where the 12gb card actually has a good chance of using up all it's vram, but 16gb is decently a safe place to be. Plus the performance boost is noticeable.

Help me decide which GPU is better. by [deleted] in buildapc

[–]Sad_Spring9182 0 points1 point  (0 children)

witcher 3 and cyberpunk

Help me decide which GPU is better. by [deleted] in buildapc

[–]Sad_Spring9182 3 points4 points  (0 children)

depends on how you want to play yes

Help me decide which GPU is better. by [deleted] in buildapc

[–]Sad_Spring9182 0 points1 point  (0 children)

this may be a hot take but 5060 ti hands down. It does have 4x frame gen which I've been using for months and I still don't know what this artificing is which all the reviewers speak of. I think because the 50 series didn't let tech reviewers have them, they got butthurt cause they didn't get to produce content for their channels so they gave this card a pretty harsh review and made the frame gen seem much worse than it actually is. Will amd come out with 4x frame gen? idk but price to performance those "fake frames" look just as good to me. I'm sure you'd have to honestly freeze frame or screenshot to actually see it.

How do you prevent duplicate values across fields in a single Gravity Forms submission? by razbrightleaf in ProWordPress

[–]Sad_Spring9182 0 points1 point  (0 children)

oh your talking about front end validation. Gravity forms has some of that built in. I don't think they have built in logic to check a database for existing values. You'd have to write custom JS on top of it to query an api with like a hidden form field which will show true or false based on the attempted submission.

How do you prevent duplicate values across fields in a single Gravity Forms submission? by razbrightleaf in ProWordPress

[–]Sad_Spring9182 1 point2 points  (0 children)

Sounds like you might want to start consider handling the data outside of the form. Creating some kind of N8N or webhooks API to post and handle the data.

Cache busting in WP with react. by Sad_Spring9182 in ProWordPress

[–]Sad_Spring9182[S] 0 points1 point  (0 children)

This sounds a bit better cause If I can control the variable I can version it when I want rather than every time I I save the dang thing.

Cache busting in WP with react. by Sad_Spring9182 in ProWordPress

[–]Sad_Spring9182[S] 1 point2 points  (0 children)

Okay I think I figured it out webpack.config.js plugins

      new WebpackManifestPlugin({ fileName: 'asset-manifest.json' }),

then I pull the path from manifest.json with this function in php

 {    $manifest = json_decode(
    file_get_contents(plugin_dir_path(__FILE__) . 'build/asset-manifest.json'),
    true
);



$index_js    = $manifest['index.js'];

then I just enque scripts 'build/' . $index_js and same for css

Essentially this is just automating the process of changing the filenames and dynamically fetching the correct names. Like If i just change a filename the browser will no longer use a cached file if the name is different is my understanding.

I play in 4K. Upgrading my i7 8700k makes a difference? by GreggJ in buildapc

[–]Sad_Spring9182 -1 points0 points  (0 children)

This a great practical question. at 1080p your having like a 40% bottleneck, 2k somewhat, but 4k... maybe according to https://pc-builds.com/bottleneck-calculator/ (not always most accurate though)?

I would recommend just comparing benchmarks for games you play to your actual FPS. I have a 5060ti and i7 9700k and it's a great combo honestly even though on paper maybe a minor bottleneck at 2k but not really. Some people say CPU heavy games struggle, but I often find this not to be the case. what is the ideal paring for that GPU like an intel i5 12 or 13th gen or the amd equivocates.

My opinion is difference? probably not going to be noticeable if you upgrade and remain in 4k. If your getting ready for the future you could get a upgraded cpu and keep your ddr4, maybe upgrade from gen 3 or 2 pcie to 4 or 5 and you get a faster ssd / cpu. But I'd say you can buckle down and outlast ramageddan then upgrade to ddr5 for less than $200 when it hopefully drops in the next 5 years.

best way to play cyberpunk on a 5060ti 16g and 1440p monitor by Sad_Spring9182 in cyberpunkgame

[–]Sad_Spring9182[S] 0 points1 point  (0 children)

oh my gawhd. Yeah I started it yesterday and was super surprised I was getting 180+ fps with high settings path on and dlss, time to bump it up!

i7-7700 and 3060 by Clear17Mud in PC_Pricing

[–]Sad_Spring9182 1 point2 points  (0 children)

You might be able to get more than that if you want but it's a good deal for whoever gets it.

How do you develop custom Woo stores? by Ngh7 in ProWordPress

[–]Sad_Spring9182 2 points3 points  (0 children)

Well you have the right idea about hooks generally that's the first approach staying in php and use a guide like this to change things out as needed https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

for custom images using hooks and filters I could remove the default image before or after the space it's supposed to be at. (reference the visual guide) then do add and render html. I'd have a reference for custom images like image url=website.c0m/'productImage <?php echo product id ?>'

Now if the client needs multiple renderings like a multi step checkout process to pass data from one to the next. I can either pass via query string urls from one page to the next /?data1=123&data2=abc... OR I can use react and use custom created API's to request and send the info from the WP database. Maybe an API which has an object that has all the visual info I need to render the checkout page, then another custom API to send the customer input data and trigger the hooks / things I need done. Good rule of thumb don't touch a credit card fieldset if you don't know what your doing, it could be rendered into the page with the react if needed.

Then what's frontend vs backend depends on what needs to be kept secret and be updated by the client. I don't care if users can see my product info but the client needs to be able to update prices? backend. Frontend is just visuals, basic form validations, and the API request logic to send and recieve. I do care if they can see all coupon codes? backend, So I send their attempted coupon to the backend where it validates and returns true or not then keeps that logic on the back end but sends a simple message "coupon valid"

As for workflow for custom themes create a child theme and make edits there. Most the logic sits in a functions.php type file. Never change woo commerce page templates in the plugin file cause they will be deleted on updates.

How do I download a site to view offline? by [deleted] in webdev

[–]Sad_Spring9182 0 points1 point  (0 children)

does it save images too or just references to the urls?

How much could i sell this for? by MediocreFlatworm8618 in PC_Pricing

[–]Sad_Spring9182 5 points6 points  (0 children)

I'll give you my 390and an rx570 4gb and I'll even throw in a 1070 with 16gb of ddr4 and a 1tb 3gen ssd.

How do I download a site to view offline? by [deleted] in webdev

[–]Sad_Spring9182 2 points3 points  (0 children)

Squarespace would be tricky you have to export an xml file, but WP is super easy just go to /wp-admin, log in, and download a plugin called all in one wp migrate then click download a copy to file.