Join chat rooms and explore programming content on Chat-to.dev.
Many thumbnail programs exist that will take a large image and reduce it to a thumbnail for you, often supporting working in batches. But what about turning user-uploaded images into thumbnails? Obviously, you don’t want to simply send a large image to the browser and have HTML resize it, because the quality wouldn’t be great, and your bandwidth would go through the roof. So you need something to handle this process on the fly, which is where this recipe comes in handy.
Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is. - GitHub - peterheinrich/InternetOverSpaghetti: Transmitting IP packages over a pair of spag...
A few months ago I saw a funny story about a guy who added generics/templates to JavaScript (or maybe TypeScript?) by using runic characters that look like angle brackets to enclose the template parameter, then using a preprocessor to convert the runes, etc. to actual, legal types before compilation. I can't seem to find it anywhere; hoping someone knows what I'm talking about.
Edit: so im done with my preliminary research into this codebase.
Our corporate SSO provider is changing, so I've been updating our tools to take advantage of the new badges. I found this in a web application that I started on today. The original developer is long gone, and according to our PaaS, this app has been running for just under 3 years without an update.
There is no CI/CD, blue-green deployment, or back ups. The database is an H2 db with ddl-auto set to create-drop on startup, meaning that this database will delete itself if the app is restaged but thanks to this guys code, it won't populate itself. 🤷
From the Apollo 11 github repo: https://github.com/chrislgarry/Apollo-11/blob/b56b8c3d03e810a6ceb69e1c0874d4c89d2c32f6/Luminary099/LUNAR_LANDING_GUIDANCE_EQUATIONS.agc#L666C1-L667C1
// We play this game because we want this to be callable even from places that // don't have access to CallFrame* or the VM, and we only allocate so little // memory here that it's not necessary to trigger a GC - just accounting what // we have done is good enough. The sort of bizarre exception to the "allocating // little memory" is when we transfer a backing buffer into the C heap; this // will temporarily get counted towards heap footprint (incorrectly, in the case // of adopting an oversize typed array) but we don't GC here anyway. That's // almost certainly fine. The worst case is if you created a ton of fast typed // arrays, and did nothing but caused all of them to slow down and waste memory. // In that case, your memory footprint will double before the GC realizes what's // up. But if you do *anything* to trigger a GC watermark check, it will know // that you *had* done those allocations and it will GC appropriately.