|
Main Paineframe posted:or remove the video. Removing an element isn't guaranteed to stop playback And that's not just me being all well technically, it's a reply I got to a bug report I submitted to Microsoft some years ago.
|
# ? Oct 24, 2017 16:02 |
|
|
# ? Jun 5, 2024 07:22 |
|
McGlockenshire posted:Are those numbers in concurrent connections, concurrent users, or just some number pulled out of a hat? 500 concurrent users engaging in normal ecommerce activity is going to average out to a few requests a second, and if you're struggling to serve that on a CPU-heavy enough VPS with Wordpress then something has gone very wrong, especially if you're running it under PHP7. On the other hand, if you're expecting 500 concurrent connections, what are you doing hosting that kind of Wordpress site on only one VPS? Would agree with most of this, except for the recco on WP Super Cache. I've tried several caching plugins with WooCommerce and so far, all of them break it in some way. The way Woo injects HTML and other content into serialized arrays gets messed up something fierce by most auto-minify stuff, and that's just the start. In my situation where I'm in at HostGator (not my decision) I'd move up to the top tier of their VPS, which would quadruple my my RAM and double my cores and if that didn't work get into dedicated. But as McGlockenshire says you should identify where bottlenecks are occurring, which off the top of my head would be: - MySQL - RAM/Disc throughput - Processes/CPU - Bandwidth saturation You should have tools to check each of those. For a relatively light load like 500-1000 I'm not sure if I'd get into static pages and Cloudflare/proxy server stuff.
|
# ? Oct 24, 2017 19:07 |
|
Main Paineframe posted:That snippet just gives you the ability to control the video by triggering the YouTube API. You still need to add the actual Javascript to invoke the YT API to tell the video to stop; go look at Youtube's documentation for what exactly to do there. melon cat fucked around with this message at 01:05 on Oct 25, 2017 |
# ? Oct 24, 2017 23:06 |
|
melon cat posted:I see what you're saying. I've checked the YouTube iFrame API guide (I've read it from start to finish about 4 times, now) but it doesn't include any parameters relating to my modal window issue. And all solutions I've found online apply to people having modal window issues with their Bootstrap sites (mine isn't a Bootstrap). I hate to throw in the towel, but I'll probably just end up hyperlinking an image to the actual video source. Which is a drat shame, because it's going to pull visitors away from my site each time they click a link. Really? You can't see anything on that page that would allow you to pause the currently playing Video?
|
# ? Oct 25, 2017 01:12 |
|
Jabor posted:Really? You can't see anything on that page that would allow you to pause the currently playing Video? Let's pretend that this never happened. This is my first time really working with JavaScript/APIs so... we'll see how this goes. melon cat fucked around with this message at 01:55 on Oct 25, 2017 |
# ? Oct 25, 2017 01:30 |
|
Look at me, I made a thing! https://github.com/wanderrful/membercount-scraper It's a worker bot that persistently scrapes a given steam group's main page, recording how many people are online and stores it into a database with a timestamp for analysis purposes. I made it so that I can figure out when the best times to host events might be. You can specify the steam group to monitor and how often to monitor it via environment variables. Used TypeScript, PostgreSQL (my first time ever doing anything database-related), and node-scrapy. Took me about 8 hours of effort. Hopefully one day I'll have enough stuff on my Github page to be able to get an interview and switch to the tech industry. Love Stole the Day fucked around with this message at 06:29 on Oct 25, 2017 |
# ? Oct 25, 2017 06:25 |
|
The best part about open source software are all the wonderful feature requests you receive. Therefore allow me to contribute the idea, not code mind you, that I be able to monitor multiple groups at the same time with the same process.
|
# ? Oct 25, 2017 14:39 |
|
Nolgthorn posted:The best part about open source software are all the wonderful feature requests you receive. Therefore allow me to contribute the idea, not code mind you, that I be able to monitor multiple groups at the same time with the same process. ... a new GitHub Issue appears: "I need your software to do ___, when will you add it?" "Pull requests are welcome!" "I thought this project would be helpful, but I guess not." - Every open source thing I have made.
|
# ? Oct 25, 2017 15:26 |
|
what if you're not good enough to contribute
|
# ? Oct 26, 2017 03:35 |
|
qsvui posted:what if you're not good enough to contribute If you're not an entitled rear end in a top hat nobody should mind.
|
# ? Oct 26, 2017 03:46 |
|
porksmash posted:If you're not an entitled rear end in a top hat nobody should mind. Yep. Asking for a new feature is fine. Demanding it and giving a deadline for it... not so much.
|
# ? Oct 26, 2017 04:08 |
|
Lumpy posted:... a new GitHub Issue appears: Don't get too down on yourself. Your posts are sometimes useful!
|
# ? Oct 26, 2017 04:40 |
|
qsvui posted:what if you're not good enough to contribute Open a PR and ask what needs to be done. If they're a good maintainer, they'll walk you through what needs to be done.
|
# ? Oct 26, 2017 07:37 |
That would be a strange pull request
|
|
# ? Oct 26, 2017 11:32 |
|
I made a open source game engine modification, and some dude governed over a retexturing project over the game. It happens that some textures where inverted by a mistake of the original developers. I was too concerned about that. He submitted a request to fix it, and I had no idea how to fix it, so he submitted the actual code, and I merged it wrong so it did not fixed the mistake, until he told me how to merge it. I wish I where better programmer, sometimes. Anyway this was the only time somebody had a actual feature request that deserve that name. My engine was experimental and I completely changed the look and feel of the particle engine many times, and sometimes people hate them, sometimes love these changes. I made lots of features for developers, that few or nobody used. I think when comes to open source usability and documentation is actually more important than features (for users). This was before Youtube was important, and before Github existed. So it was a different world. Tei fucked around with this message at 11:50 on Oct 26, 2017 |
# ? Oct 26, 2017 11:47 |
|
Newf posted:Don't get too down on yourself. Your posts are sometimes useful! Only sometimes??
|
# ? Oct 26, 2017 16:05 |
|
Lumpy posted:Only sometimes?? Best one yet!
|
# ? Oct 26, 2017 16:30 |
|
McGlockenshire posted:Are those numbers in concurrent connections, concurrent users, or just some number pulled out of a hat? 500 concurrent users engaging in normal ecommerce activity is going to average out to a few requests a second, and if you're struggling to serve that on a CPU-heavy enough VPS with Wordpress then something has gone very wrong, especially if you're running it under PHP7. On the other hand, if you're expecting 500 concurrent connections, what are you doing hosting that kind of Wordpress site on only one VPS? Scaramouche posted:Would agree with most of this, except for the recco on WP Super Cache. I've tried several caching plugins with WooCommerce and so far, all of them break it in some way. The way Woo injects HTML and other content into serialized arrays gets messed up something fierce by most auto-minify stuff, and that's just the start. Thanks y'all, this is very helpful! The 500 - 1000 number was basically pulled out of a hat ostensibly based on past product launches, so I was rather concerned that the site couldn't handle that many people just visiting it; turns out it is almost definitely a MySQL issue because yeah, trying to have WooCommerce create that many sessions at once does not play nice with a single VPS. It's a situation where the site doesn't need to handle near that amount of stuff 99% of the time, just every once in a while, so hopefully my host has some options for scaling upwards during those times. To elaborate, WooCommerce creates a new wp_woocommerce_sessions row every time the 'Add to Cart' button is clicked, if it doesn't have one from the source already, so having hundreds of these trying to 'Add to Cart' at once does not work with my current setup. my bony fealty fucked around with this message at 18:53 on Oct 26, 2017 |
# ? Oct 26, 2017 18:13 |
|
I'm assuming the "rush" hasn't hit yet, maybe clear out some existing transients? It might be that creating new sessions is slow because there are already a heckuva load of old sessions that haven't been cleared properly.
|
# ? Oct 26, 2017 20:02 |
|
Creating a row in a table is a trivial event. Creating a thousand rows in a table in a few seconds is a non-trivial but still pretty small event. You may have misidentified your problem. Are you sure that it's the actual insert that's the problem, or is it the code running that leads to the insert that's the problem?
|
# ? Oct 26, 2017 21:14 |
|
McGlockenshire posted:Creating a row in a table is a trivial event. Creating a thousand rows in a table in a few seconds is a non-trivial but still pretty small event. You may have misidentified your problem. Also, if you’re inserting data via a stored procedure (you should be), make sure you don’t have any crazy logic in there. Inserting a bunch of records in a table should take almost no time, but it’s quite possible the stored proc does a bunch of poorly optimized validation. Also if you’re working with databases you ought to read up on table / row locking. Generally speaking you can’t concurrently read from and write to a table. You can get around this with stuff like NOLOCK hints that lead to dirty reads, or SNAPSHOT ISOLATION which tells select statements to look at the state of the db at the last fully committed transaction, but there are caveats involved there too. In your example, this might mean that inserting rows into your table is being blocked by another unrelated operation that is also touching the table. This becomes a bigger problem as you scale.
|
# ? Oct 27, 2017 16:04 |
|
Ruggan posted:Also, if you’re inserting data via a stored procedure (you should be) Well we're talking about wordpress + woocommerce on mysql in this case so there's a 0% chance of this or most of the other stuff in your otherwise correct post applying.
|
# ? Oct 27, 2017 16:54 |
|
Who wants to see the worst job description ever? https://careers-comcastspectacor.ic...jun1offset=-240 quote:Responsibilities
|
# ? Oct 27, 2017 19:13 |
|
Looks basically like the job description of a professional blogger, there's tons of people who do that kind of work. I bet many would enjoy $17/hr to do it too.
|
# ? Oct 27, 2017 19:16 |
|
The Dave posted:Who wants to see the worst job description ever? melon cat fucked around with this message at 06:23 on Jan 10, 2024 |
# ? Oct 27, 2017 19:39 |
|
Nolgthorn posted:Looks basically like the job description of a professional blogger, there's tons of people who do that kind of work. I bet many would enjoy $17/hr to do it too. If you expect a blogger to know front end dev, graphic design, ux design, marketing, and have around the clock availability, AND you want to only pay them $17/hr... you are only going to get candidates that are not good at any of those things. I get that it's really just a problem with a lovely job description and they just need someone to manage social media accounts and generate memes.
|
# ? Oct 27, 2017 19:45 |
|
Anyone know any good guides for html/css that prints well straight from the browser?
|
# ? Oct 28, 2017 17:47 |
|
Newf posted:Anyone know any good guides for html/css that prints well straight from the browser? The Shay Howe material seems to print just fine (judging from a quick print preview) and that's easily the best guide on HTML/CSS I've seen as of the moment.
|
# ? Oct 29, 2017 00:53 |
|
A bit stuck here with an attempt at a portfolio project and was hoping my problem is a common one you guys have run into when you were newer to this stuff. Hoping to get a bit of advice: I completed making the back-end for a simple "video game server browser" project. Problem is, I cannot find a "good" way to reliably communicate the results of a "get rows of server data from the database" function from the back-end to the front-end. Here are the relevant code bits:
I'm trying to think of how to go about this in a better way. This is my first project involving databases and every tutorial I've seen or done so far have revolved around the storing and manipulating of data... but never with actually querying and rendering the results for front-end display, which is what I'm trying to do here. I'm sure that I'm going about this in the absolute dumbest way possible.
|
# ? Oct 29, 2017 07:10 |
|
One way to do this would be to have three components. 1. Server side, queries steam and stores the data in a database for caching 2. Server side, provides a REST api interface to the database 3. Front end, queries your api and displays the results to the user There is very likely a simpler way do to this, but this is how I would put it together.
|
# ? Oct 29, 2017 07:34 |
|
React newbie here, playing around with the Bungie API as practice. App has a state called characters, which is passed as a prop to my CharacterList component: <CharacterList characters={this.state.characters}/> Now, when the character state gets updated, the CharacterList html doesn't render with the new information even though, it is correctly logging the updated prop in the console. I have a dummy button in App that just merely sets the character state to itself and voila, the html in CharacterList gets rendered. FWIW, here is what's getting logged. The first array is when character state gets updated naturally (but the html isn't rendered)), the second is when I hit my dummy button to set character state to itself and is correctly rendered. I notice the 2nd array (3 objects) is slightly different than the 1st, even though the contents are the same.
|
# ? Oct 31, 2017 22:35 |
|
Accessibility: Is there a way to announce when visibility changes on a page? aria-live works when the actual content changes, but it's less helpful when I just toggle visibility on the same set of elements, without actually changing anything.
|
# ? Oct 31, 2017 23:55 |
|
Boosh! posted:React newbie here, playing around with the Bungie API as practice. App has a state called characters, which is passed as a prop to my CharacterList component: <CharacterList characters={this.state.characters}/> Are you mutating this.state or are you using this.setState({characters: newCharactersList})? Because the former won't trigger react to do anything.
|
# ? Oct 31, 2017 23:58 |
|
darthbob88 posted:Accessibility: Is there a way to announce when visibility changes on a page? aria-live works when the actual content changes, but it's less helpful when I just toggle visibility on the same set of elements, without actually changing anything. Can you stick the live region on whatever contains the stuff you're toggling?
|
# ? Nov 1, 2017 03:36 |
|
Jabor posted:Can you stick the live region on whatever contains the stuff you're toggling? E: I can't easily test it right now, but on this Codepen, a screen reader would happily announce "0, 1, 2, 3, etc", while ignoring the "Foo"/"Bar" down below. It just occurred to me that I can just change it from toggling which div is visible, to toggling which content element is displayed in the div. The only reason I didn't do that in the first place was that I was concerned about the cost of re-rendering everything, but that's not so big an issue anymore, is it? darthbob88 fucked around with this message at 04:31 on Nov 1, 2017 |
# ? Nov 1, 2017 04:20 |
|
Maluco Marinero posted:Are you mutating this.state or are you using this.setState({characters: newCharactersList})? Because the former won't trigger react to do anything. The latter. I think my data isn't getting to setState quickly enough. I looked up why the first array in the image is empty (but had values if I expanded) and it seems like logged data in console is "live" but not available at the time of console.log (also when setState is supposed to execute). It looks like I should read up on component life cycles before I continue.
|
# ? Nov 1, 2017 15:09 |
|
Boosh! posted:I think my data isn't getting to setState quickly enough. I looked up why the first array in the image is empty (but had values if I expanded) and it seems like logged data in console is "live" but not available at the time of console.log (also when setState is supposed to execute). As a tip, data logged to console via something like console.log(someObj); points to a reference to that object. When you expand it later and there are values you weren't expecting within, it's because that object was updated from the time it was logged - you end up viewing the "live" version of that object, not what it was at the time it was logged. A simple way to log a "snapshot" of an Object is to do something like console.log(Object.assign({}, someObj)); instead. That'll output what someObj looked like at the time the console.log() was executed. IAmKale fucked around with this message at 18:04 on Nov 1, 2017 |
# ? Nov 1, 2017 18:02 |
|
That was extremely helpful, thank you.
|
# ? Nov 1, 2017 18:12 |
|
darthbob88 posted:That was the first thing I tried. The problem is that it only fires when you have new content, not when you just change the visibility attributes on current content. Coding horror thread answer: add to the div every time you toggle it
|
# ? Nov 1, 2017 20:01 |
|
|
# ? Jun 5, 2024 07:22 |
|
Scaramouche posted:Coding horror thread answer: add to the div every time you toggle it code:
code:
|
# ? Nov 3, 2017 00:27 |