Feed aggregator
Microsoft Concern Over Google's Lead Drove OpenAI Investment
Read more of this story at Slashdot.
Global Debt Hasn't Been This Bad Since the Napoleonic Wars, Says WEF President
Read more of this story at Slashdot.
LinkedIn Now Has Wordle-style Games You Can Play Every Day
Read more of this story at Slashdot.
Star Scientist's Claim of 'Reverse Aging' Draws Hail of Criticism
Read more of this story at Slashdot.
Mysterious 'gpt2-chatbot' AI Model Appears Suddenly, Confuses Experts
Read more of this story at Slashdot.
China Launches World's Largest Electric Container Ship
Read more of this story at Slashdot.
Satellite Operator SES Acquiring Intelsat In $3.1 Billion Deal
Read more of this story at Slashdot.
CodeSOD: Metaception
Meta-programming- programs which generate programs- is a delightful hobby, but usually shouldn't be used in production code. Usually. I mean, if you're working in LISP, 90% of your program is going to be macros.
But if you're using PHP and JavaScript, there's good odds that someone you work with has decided to combine these two tastes together to create something nobody wants to taste.
This is a depressingly common anti-pattern, usually seen in the form of JavaScript code which looks like: if (1 == 2)- once upon a time one or both of those values were PHP variables, but we only see the resulting generated code.
A more extreme version happened to our anonymous submitter.
<div class="w-box-content"> <? table(array( //... 'options'=> array( <script type="text/javascript"> {if $doc_status=="edit"} $("#doc-{$id}").closest("tr").find("td,a").addClass("text-danger"); {/if} </script>' ) )); ?> </div>We start with some HTML which wraps some PHP code. The PHP code embeds an HTML tag for JavaScript into an array, and inside that JavaScript embeds a Smarty Template, which wraps some JavaScript code that modifies a CSS class.
"text-danger", indeed. It's an impressively nested system of different languages and tools.
As an aside, I was unfamiliar with Smarty templates, so I looked them up. I won't comment on the technology, but for a PHP library framework, they also have a slew of "partners" for monetization- mostly online casinos and scams that'll invest your IRA into gold. I won't link them, but at first I thought their page had been hacked and turned into a link farm. No, they're still updating (as of mid 2023).
[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.America's Wind Power Production Drops For the First Time In 25 Years
Read more of this story at Slashdot.
Is Self Hosting Going Mainstream?
Read more of this story at Slashdot.
13.4 Million Kaiser Insurance Members Affected by Data Leak to Online Advertisers
Read more of this story at Slashdot.
Google Removes RISC-V Support From Android Common Kernel, Denies Abandoning Its Efforts
Read more of this story at Slashdot.
Dave & Buster's To Allow Customers To Bet On Arcade Games
Read more of this story at Slashdot.
Systemd Announces 'run0' Sudo Alternative
Read more of this story at Slashdot.
Binance Founder Changpeng Zhao Sentenced To 4 Months In Prison
Read more of this story at Slashdot.
Bruce Perens Emits Draft Post-Open Zero Cost License
Read more of this story at Slashdot.
Change Healthcare Hackers Broke In Using Stolen Credentials, No MFA
Read more of this story at Slashdot.
Extreme Heat Continues To Scorch Large Parts of Asia
Read more of this story at Slashdot.
Supreme Court Declines To Block Texas Porn Restriction
Read more of this story at Slashdot.
How an Empty S3 Bucket Can Make Your AWS Bill Explode
Read more of this story at Slashdot.