#using namespace
Explore tagged Tumblr posts
Text
ADL - Avoid Debugging Later
We're diving into the dark magic of ADL in C++—a spell that summons hidden dependencies and lurking bugs. Join us as we uncover its secrets and learn how to avoid its traps! ✨🔍 #Cplusplus #Cpp #CleanCode #CodingTips #Programming #ADL #CppSenioreas
Back in the day, being a witch was considered a grave crime. Today, we’re diving into one of C++’s lesser-known spells: ADL (Argument-Dependent Lookup). But before we explore this arcane magic, you must heed a warning—black magic comes with consequences. ADL is particularly treacherous, often leading to frustrating and hard-to-debug issues. Whenever possible, it’s wise to avoid casting this spell…
#adl#advanced#Argument-Dependent Lookup#C++#cpp#debug#dlib#include#Intermediate#magic#namespace#spell#spells#using namespace
1 note
·
View note
Text

Utilities Mod Update (6/10/24) - Heating and Cooling System & Temperature Utilities ⛄🔥
Sims are now affected by outdoor temperatures indoors, and are at risk of overheating or freezing if their temperature swings to either extreme.
Thermostats, Radiators, and/or Air Conditioners are now required inside a sim’s home to help regulate their temperature.
Requirements
This mod requires The Sims 3: Seasons.
To activate the new system, place down one of the three temperature utilities and use the “Enable Temperature Utility” interaction. Once enabled, you can then turn on the temperature utility to control your lot’s temperature.
These temperature changes will only affect sims in your household on your active home lot. No need to worry about unplayed households or sims on community lots freezing or spontaneously combusting!
Thermostats, Radiators, & Air Conditioner Utilities
There are three different types of temperature utilities to choose from to control your lot’s temperature, depending on the climate of your current world and the size of your lot.
Thermostats are good for climates that have both hot and cold seasons, as they have heating and air conditioning, and are cost effective for residential lots with more than two or three rooms.
Radiators and Air Conditioners are better for climates that have either cold or hot seasons, but not both. They’re also more cost effective for apartments or starter homes with a few rooms, as they cost less per hour of what a thermostat does.
Thermostat: Provides either heat or air conditioning when turned on, covers the entire house, costs §2 per hour, gives the Toasty and Keeping Cool custom moodlets
Radiator: Provides heat when turned on, only covers the room it is located in, costs §1 every 2 hours, gives the Toasty custom moodlet
Air Conditioner: Provides air conditioning when turned on, only covers the room it is located in, costs §1 every 2 hours, gives the Keeping Cool custom moodlet
There are three thermostats, four radiators, and two air conditioners included with the mod. Some of the meshes are from Around The Sims 3 and the others were converted from The Sims 2 and The Sims 4 by me.
Temperature Utilities Usage
Temperature utilities can be turned on for different lengths of time: 6 hours, 12 hours, 18 hours, or 24 hours and will automatically switch off when the time is up.
Radiators and Air Conditioners have “Turn All On/Turn All Off” interactions to switch on or off all radiators or all air conditioners on the lot at once.
The usage cost of these utilities will be added to your household’s next bill.
If you want to opt out of the heating and cooling system, use the “Disable Temperature Utility” interaction available on one of the three temperature utilities.
Pay attention to the weather forecast temperatures to determine when your household needs to turn on their heating or air conditioning, and remember to turn them off when the weather is fine to save money!
Note: Temperature utilities will not be shut off due to lack of funds, bill delinquency, or outages.
New Moodlets
Keeping Cool: Given when air conditioning is on, lasts until sim leaves the room (air conditioner) or house (thermostat), +5 mood, removes the Pleasantly Warm, Getting Warm, Starting to Sweat, and Sweating Profusely moodlets
Toasty: Given when heat is on, lasts until sim leaves the room (radiator) or house (thermostat), +5 mood, removes the Pleasantly Chilly, Getting Chilly, Starting to Shiver, and Teeth Chattering moodlets
Master Controls
Every utility now has four new interactions: “Turn On All Utilities”, “Turn Off All Utilities”, “Enable All Utilities”, and “Disable All Utilities” under a new pie menu interaction called “Master Controls…”. These interactions turn on/off and enable/disable every utility on the active home lot at one time.
Script Namespace
If you want to turn another object into a utility, open your desired object in s3pe and replace the current script name with the following:
Sims3.Gameplay.Objects.Twinsimming.Utilities.Thermostat
Sims3.Gameplay.Objects.Twinsimming.Utilities.Radiator
Sims3.Gameplay.Objects.Twinsimming.Utilities.AirConditioner
Credits
EA/Maxis for The Sims 2, The Sims 3, and The Sims 4, Around The Sims 3 for meshes, SimPE, Visual Studio 2019, Sims4Studio, Blender, Milkshape, TSRW, ILSpy, s3pe, Notepad++, and Gimp.
Thank You
Thank you to @desiree-uk, @kevinvoncrastenburg, and @its-time-o-clock for testing and feedback. And to @aroundthesims for allowing me to use some of her wonderful meshes for the temperature utilities!
Download @ ModTheSims
If you like my work, please consider tipping me on Ko-fi 💙
930 notes
·
View notes
Text
I think there are two (additional) things going on:
Mozilla brought in Yehuda Katz to design it, who previously worked on Bundler and later worked on Yarn. This was before 1.0, without hard backward compatibility constraints. So it really is just very solid, not even in an innovative way but because they got to skip most of the usual early mistakes and flailing around.
The situation for C++ is dreadful, so C++ devs have very low standards. (Cargo seems to be Rust's killer feature for some of them.)
So Rust has been the most admired programming language on Stackoverflow's surveys for like 8 years in a row and I've used Rust enough to have a rough sense of why that is, but I noticed that cargo is also the most admired tool. Is that just a side effect of people liking Rust and cargo being what compiles it, or is it also doing something meaningfully better than other dependency managers?
#there are also some language-level peculiarities that make it more smooth#imports don't use a global namespace so your dependency tree can contain multiple incompatible versions of the same package#not all languages support this
86 notes
·
View notes
Text
portfiend's oc directory template
three weeks ago i began work on a little Eleventy-based website template for storing character information akin to Toyhou.se. it's been in a releasable state for about a week, but i've also been pushing updates to it near daily!
i also wrote up a quick tutorial for setting up the project on its download page, but i plan to improve it in the future.
click here to preview this template: NeoCities click here to get the code: GitHub
features:
built-in "namespaces" for characters, locations, and stories, with their own page templates and information card formats
uses eleventy's tagging system to allow you to tag pages for fine categorization
a big focus on linking to other pages. each "creative" page lets you navigate between the previous/next item in the category. pages have a "linked pages" list that allow you to navigate to related pages, including "what links here"
a content filtering system allowing developers to hide/blur certain content from people who have not opted into it. optionally supports needing to click an "i am 18+" box before entering the site
lightbox images; clickable image links that can reveal metadata such as captions and artist credits
tabbed views allow you to view specific sections of content at a time, used in the various creative pages
SASS wrapper for optional better-formatted stylesheets. don't know how to use SASS syntax? SASS also supports regular CSS!
this project is licensed under MIT License.
#neocities#neocities template#website template#web resources#webdev#indie web#indieweb#character directory#original character#worldbuilding#worldbuilding resources
482 notes
·
View notes
Text
#include <iostream>
using namespace std;
int main() {
cout << "I love my husband.";
}
18 notes
·
View notes
Text
So, since both DC and Marvel are currently launching initiatives to created "simplified" continuities in a bid to attract new readers, I should probably do a periodic reminder about why efforts to "simplify" continuity almost never work, and even if they did, I don't think that simplified continuity is nearly as laudable goal as many people seem to thing.
In practice, attempts to simplify continuity almost always end up making continuity more complicated. Let's take the Marvel's current attempt, relaunching the Ultimate Universe. This is meant to be a new universe that readers can pick up of the rack without having to worry about decades of continuity baggage. So far, so good. The problem is that this is the second time that Marvel has done this trick using this exact name. So now, any time a prospective new reader hears about Ultimate Spider-Man, well which one are they hearing about. The old one from the 2000s who was a teenager, or the new one that's, like, 35?
The fate of the original Ultimate Universe is instructive. It went on for over a decade, and by the end had built up its own convoluted continuity, such that Marvel eventually decided to just pull the plug and merge it over into the main universe.
Now, keep in mind, the "New" Ultimate Universe is selling like hot cakes. Ultimate Spider-Man is currently out selling the main Spider-Man book. But how much of that is from "simplified" continuity, and how much of that is because Marvel editorial is committed to maintaining a status quo for the character in the main universe that many readers find uninteresting? (They still haven't undone One More Day.)
It's also instructive that Marvel chose to reuse the "Ultimate" name. If they really wanted to excise continuity baggage, presumably they'd pick an entirely new name, to prevent any threat of namespace collision. But that's not what they did. Presumably, they were hoping to capitalize on any residual good will associated with the Ultimate brand left over from the original Ultimate universe. Which new readers, who supposedly hate continuity, won't have.
All that being said, though, is "simplifying" continuity even all that worthy a goal in the first place? I'm not convinced it is. So, like, the thing to keep in mind is that Marvel and DC's business model is oriented around selling single issues to a small pool of collectors at exorbitant prices. Once a issues initial print run(s) end, it becomes an afterthought from the standpoint of the decision makers at the big two.
So, from the perspective of convincing randoms off the street to buy the latest issue of Batman, that decades of continuity baggage probably is an impediment. But, I would argue, it's not nearly as big an impediment that as the fact that single issues are a) expensive as fuck, and b) only sold in specialized stores. If you want to grow the population of comic readers, the biggest things you need to do are lower the price, and sell them in places that normies actually go to.
DC recently, with relatively little fanfare, started an initiative to sell collected additions of a handful of classic stories from their back catalog in regular book stores. Importantly, however, these special collections all collect 12 issues, and cost only $10. For comparison, ordinary trade paperbacks collect 6 issues and cost $17. Single issues run you $4 or $5. This is an okay start, but not nearly enough. If I was in charge of DC or Marvel, I would start by aggressively marketing our back catalog to non-comic readers at significantly reduced prices. Note that this would still allow us to continue selling single issues to super fans at full price, while also having a realistic prospect of growing the market. Because the idea that Marvel or DC can get people into comics by convincing them to walk into a comic shop off the street and pay $5 per issue for the latest crossover event is just absurd.
30 notes
·
View notes
Text
1/100 days of code.
12.22.23
i have started of this challenge by learning C++ through MIT's open course Introduction to C++ found here, where i studied the first lecture and read through the second. this course is designed to be completed in a 4 week term, but depending on my availability, it may stretch as i take breaks from it specifically, and then circle back on coursework to retain information learned. we shall see
#include
using namespace std;
.
int main(){
.....cout<<"Hello, world!\n";
.....return 0;
}

#codeblr#progblr#programming#coding#100 days of code#c++#c++ programming#learn to code#kingsoriginal#kingscode
60 notes
·
View notes
Note
Just from observations. Any time someone gets mentioned by name, people will bitch about them for some time before it dies down. It was RFK recently, before that it was AliceO. A multi-fandom community blog I followed went through about 10 people last year and the modus operadi was exactly like that. Probably used that phrase wrong lol. Only thing that changes it what people talk about, how people defend it, and who feels offended in the 1st, 2nd and 3rd degree during it. Always a fun time lol.
--
True, but how meanspirited it feels depends entirely on what their supposed offense was.
Oseman did a specific thing calculated to enrage slash/BL fandom, so a multitude of different people are going to all want to weigh in and bitch, many of them in namespace. Kuang is... possibly a hamfisted writer?
"They were mean to white people" is a way less sympathetic complaint than "This fucker wants to throw their fellow BL fans under the bus". There's pushback because the anons felt disproportionate and like they weren't giving her the benefit of the doubt, which always brings out the contrary voices. If the focus had been more on crappy writing, people would probably have been more sympathetic. Plenty of people whose taste I trust don't think Kuang is especially skilled.
There are certainly social media wankers who are unnecessarily hateful towards white people, and we have discussed that here without a ton of pushback, but for that kind of talk to fly, you need a little more evidence than "I don't like this book that I will proceed to not describe all that thoroughly". Otherwise, it just sounds like you're oversensitive and can't take normal criticism—something we all hate, whether it's Kuang about her writing or white people hand-wringing about social satire.
26 notes
·
View notes
Note
the the the the the the the the
using namespace std;
int main(){
cout << "what is bro yapping about";
return 0;
}
4 notes
·
View notes
Text
Last month year at the wiki — 2023
As we all head into our second full week of 2024 (already!), we at Encyclopedia Exandria are taking the time to look back at what we accomplished in 2023 in this special edition of Last Month At The Wiki.
Encyclopedia Exandria reached its first anniversary in June 2023. We the editors are still proud of our decision to become an independent wiki, and we continue to work hard on our coverage of all things happening at Critical Role Productions. Here's a look at some of the work last year:
We moved episode transcripts into their own special namespace in February. Check out the post about the change and what this meant for the wiki. We also started creating transcripts in languages other than English.
Cuisine for Exandria is a wonderful new article from 2023! We're looking toward creating more broad topic articles like that one in the future.
In April, we completed a first pass rewriting text plagiarized from episodes. This was an issue inherited when we split into our own wiki in 2022 that affected especially late Campaign 1 and early Campaign 2 articles. We've been working on it ever since and continue to work toward a plagiarism-free wiki.
We've done a lot of work on Campaign 1 items! Some notable additions and overhauls include: Horn of Fog, Bloodseeker, Mantle of the Tempest, Circlet of Wisdom, Titanstone Knuckles, and Philter of Love.
Articles for Geek & Sundry era Critical Role episodes were updated to include current thumbnails, tabbed in the infobox behind the originals. It's been wonderful to cross that longstanding item off the to do list. Check out examples at Vorugal (episode) and The Chapter Closes.
Midst and Candela Obscura joined the channel in 2023. We're pleased to be covering both shows as well, but it's hard to link to all of it here. You can navigate through our Midst and Candela Obscura topics off the main articles and using the navboxes at the bottom.
All character articles now have verified "Appearances and mentions" sections! Before we were an independent wiki, character articles had these sections collated using a script from a list that used to live in the infoboxes and from "Featured characters" sections on episode articles. These lists were slowly checked manually to ensure that they they were properly formatted, organized, and correct. That work is finally completed.
With the Frozen Sick topic completed this year, we now have complete coverage for all adventures in Explorer's Guide to Wildemount!
Over time, we changed the way we formatted our 4-Sided Dive articles. Earlier articles were finally brought into line with the newer formatting this year, delivering information to you in a more consistent manner. Such quality of life maintenance for readers often goes unnoticed but is critical to ease of use.
Some other new articles that we're real proud of this year? Battle of the Red Center, Quest for Vestiges, Angels of Iron conspiracy, Currency, Fjord's crew, and Comics.
This is not nearly all of the work we've done. It's only a small slice of the work we accomplished and are proud of in 2023. If you've got a favorite update to the wiki not mentioned here—a new article, an overhaul, a quality of life change, or a backend update—let us know!
If you want to contribute to the wiki in 2024, we welcome you! Our wiki is open to editing by all readers, and our coverage is maintained and improved by our community. Everything from plot summary additions to spelling and grammar corrections are an immense help. If you need any help, feel free to check in with us on article talk pages and at the wiki's Discord.
We hope to continue to maintain this wiki throughout this year.
50 notes
·
View notes
Text
Utilities Mod by Twinsimming 💡💧
This mod adds optional power and water utilities for players looking for some added challenge in their gameplay.
This is a script mod that can be placed in your Packages folder. It was built and tested on 1.69 but should work fine on 1.67.
New Objects
Power Box
- Price: §0 - Category: Misc. Electronics/Misc. Appliances - Includes 3 original swatches + 1 recolorable option (3 channels) - Poly Count: 274
Water Pipes
- Price: §0 - Category: Misc. Plumbing - Includes 3 original swatches + 1 recolorable option (3 channels) - Poly Count: 1065
Utilities
The Power Box controls power and the Water Pipes control water (self explanatory :p). Both utility objects are free in buy mode in the Misc. Electronics tab and Misc. Plumbing tab, respectively.
Once placed down on your lot, you can enable one or both utilities. When the utilities are enabled, power and/or water will be cut off to certain objects on your lot until you "Turn On" the Power Box and/or Water Pipes.
While the utilities are on, your sims will be charged between §1 - §3 simoleons for every 10 minutes they use an object that requires a utility, with the charge varying based on the size of the object. The total cost will be added to your next household bill.
If you want to opt out of the utilities system, just use the “Disable Power Utility” and “Disable Water Utility” interactions available on the utility objects.
The utilities system only applies to the active household.
A full list of all of the objects affected by the Power Box and Water Pipes utilities and their usage costs can be found on the mod download page.
Utility Costs and Usage
To check how much you've spent on utilities during the current billing cycle (between when you pay your bills and the next bill payment), click on the "Check Utility Usage" interaction on either utility.
To see your full utilities breakdown, use the new "Check Utility Costs" interaction on the computer.
Also included in the full utilities breakdown is a Green Energy Rebate total.
This total calculates how much money a lot saves by using the Solar Panels and Wind Turbines from the Sims 3 Store and factors that into the total utilities cost.
The full utilities breakdown also shows up when your sim pays their bills.
Lack of Funds
If your household funds fall below the usage cost of a utility, that utility will be shut off and cannot be turned back on until your funds are sufficient.
Bill Delinquency
If you’re late on paying your bills, your utilities will get shut off. Both utilities will be shut off when your bills are two days old.
Tuning
All of the tunable values can be found on the mod download page under the header “Tuning”.
Script Namespace
If you want to turn another object into a power or water utility, open your desired object in s3pe and replace the current script name with the following:
Sims3.Gameplay.Objects.Twinsimming.Utilities.PowerBox
Sims3.Gameplay.Objects.Twinsimming.Utilities.Water Pipes
Conflicts & Known Issues
These are new scripted objects so there shouldn’t be any conflicts.
Credits
EA/Maxis for The Sims 3 and The Sims 4, Visual Studio 2019, Sims4Studio, Blender, Milkshape, TSRW, ILSpy, s3pe, Notepad++, and Gimp.
Thank You
Thank you to gamefreak130, @zoeoe-sims, @greenplumbboblover, and @echoweaver!
If you like my work, please consider tipping me on Ko-fi 💙
Download @ ModTheSims
785 notes
·
View notes
Note
Include <iostream>
using namespace std;
int main()
{
str Answer = '0';
cout << "Would you like to ask Smokin Salmon a question? \n" << "y for yes \n" << "n for no \n";
cin >> Answer;
if (Answer='y')
{
cout << "How do you feel about green beans?";
}
else
{
cout << "AAAAAAAAAAAAAAAAAAAAAAAAAA";
}
--------------------------------------------------------------
Would you like to ask Smokin Salmon a question?
y for yes
n for no
Y
How do you feel about green beans?
They're good with mashed potatoes.
3 notes
·
View notes
Text
i would love to develop with you a tampermonkey thingie extension. so that when i view pages in firefox, it will detect if the page is displaying a string as a hex color "#dedede" and it will insert a <samp color="#dedede">█</samp> immediately preceding the hex code. i mean, it seems somewhat simple but for all i know it maybe is too complicated because coding can be strange like that█
ChatGPT said:
Perfect. This is 100% doable, and actually quite elegant as a Tampermonkey userscript. Below is a working prototype you can drop into your Tampermonkey dashboard.
🧪 Tampermonkey Userscript: Hex Color Swatch Injector
// ==UserScript== // @name Hex Color Swatch Injector // @namespace http://tampermonkey.net/ // @version 0.1 // @description Inserts a colored swatch before any detected hex color code on the page like "#dedede" // @author Vākāmbhṛtā + GPT // @match :///* // @grant none // ==/UserScript==
(function() { 'use strict';// Regex for matching hex color codes const hexRegex = /#(?:[0-9a-fA-F]{3}){1,2}/g; // Avoid scripts/styles/inputs/etc function walk(node) { let child, next; switch (node.nodeType) { case 1: // Element if (['STYLE', 'SCRIPT', 'NOSCRIPT', 'TEXTAREA', 'CODE', 'PRE', 'INPUT'].includes(node.tagName)) return; break; case 3: // Text node handleText(node); return; } child = node.firstChild; while (child) { next = child.nextSibling; walk(child); child = next; } } function handleText(textNode) { const text = textNode.nodeValue; const matches = [...text.matchAll(hexRegex)]; if (matches.length === 0) return; const parent = textNode.parentNode; let lastIndex = 0; matches.forEach(match => { const matchText = match[0]; const index = match.index; // Text before match if (index > lastIndex) { parent.insertBefore(document.createTextNode(text.slice(lastIndex, index)), textNode); } // Create swatch const swatch = document.createElement("samp"); swatch.textContent = "█"; // Unicode full block swatch.style.color = matchText; swatch.style.marginRight = "0.25em"; // Insert swatch + original text parent.insertBefore(swatch, textNode); parent.insertBefore(document.createTextNode(matchText), textNode); lastIndex = index + matchText.length; }); // Remainder text if (lastIndex < text.length) { parent.insertBefore(document.createTextNode(text.slice(lastIndex)), textNode); } parent.removeChild(textNode); } walk(document.body); })();
✅ What It Does:
Scans all visible text on a webpage.
Finds strings like #a1b2c3 or #ccc.
Inserts a colored █ block (<samp>) right before the hex string, using the string itself as the color.
🛠️ To Use:
Install Tampermonkey on Firefox.
Create a new script.
Paste in the code above.
Save & refresh any page with hex codes on it.
🧙 Future Enhancements (if you wish):
Add hover tooltips showing color name.
Customize block shape or size (▇, ■, ⬛).
Highlight swatches in Markdown/JSON/code blocks only.
Option to turn it off/on with a hotkey or toggle.
Want me to iterate with more aesthetic or structural options?
You said:
wow it works fine on most pages! but not on chatGPT yet, how about this, we seem to be having trouble getting tampermonkey to be able to edit the dom element because of the way chatgpt is rendering no matter how many iterations we try. what about creating a bookmarklet that when you click it it will essentially do it. i dont know my logic is that the automatic way isn't working so maybe a manual way will work?█
ChatGPT said:
Yes—great instinct. Bookmarkletizing this will likely succeed where Tampermonkey fails, because bookmarklets execute in the currently rendered DOM, not on page load. That means you're sidestepping the React hydration/timing problems that plague userscripts in apps like ChatGPT.
Here's your code as a bookmarklet:
Clicking this after the page loads will inject the swatches.
✅ Bookmarklet (minified, escaped, and ready to use):
javascript:(function(){const hexRegex=/#(?:[0-9a-fA-F]{3}){1,2}/g;function walk(n){let c;n.nodeType===1&&["STYLE","SCRIPT","NOSCRIPT","TEXTAREA","CODE","PRE","INPUT"].includes(n.tagName)||n.nodeType===3?handleText(n):((c=n.firstChild)?(function loop(ch){let next;do next=ch.nextSibling,walk(ch);while(ch=next)})(c):null)}function handleText(t){const m=[…t.nodeValue.matchAll(hexRegex)];if(m.length===0)return;const p=t.parentNode;let l=0;m.forEach(x=>{const v=x[0],i=x.index;i>l&&p.insertBefore(document.createTextNode(t.nodeValue.slice(l,i)),t);const s=document.createElement("samp");s.textContent="█",s.style.color=v,s.style.marginRight="0.25em",p.insertBefore(s,t),p.insertBefore(document.createTextNode(v),t),l=i+v.length}),l<t.nodeValue.length&&p.insertBefore(document.createTextNode(t.nodeValue.slice(l)),t),p.removeChild(t)}walk(document.body);})();
How to use it:
Create a new bookmark in your browser.
Name it something like Inject Hex Swatches.
In the URL field, paste the whole javascript:(function(){...})(); line above.
On any page (including ChatGPT), click the bookmark after it has loaded.
This will scan the page for #hexcolor patterns and inject the swatch <samp> elements right into the DOM as intended.
Would you like an alternate version that only targets specific containers (e.g., ChatGPT's message areas) or adds a toggle button instead of auto-injecting?
You said:
that bookmarklet isn't working -- i hope i am not asking too much of a bookmarklet█
ChatGPT said:
You're not asking too much—your use case is totally within the domain of what a bookmarklet can and should be able to do. The issue likely lies in either:
React's virtual DOM re-rendering after the bookmarklet runs, wiping changes.
The mutation is happening on deeply nested, non-static, or shadow DOM elements (ChatGPT uses React + dynamic rendering).
Or minor logic bugs during dynamic injection.
Try this revised version:
It ensures that walk() is delayed until the DOM is fully painted and targets only visible content.
✅ New working bookmarklet:
javascript:(function(){const hexRegex=/#(?:[0-9a-fA-F]{3}){1,2}/g;function walk(n){let c;n.nodeType===1&&["STYLE","SCRIPT","NOSCRIPT","TEXTAREA","CODE","PRE","INPUT","IFRAME"].includes(n.tagName)?null:n.nodeType===3?handleText(n):((c=n.firstChild)?(function loop(ch){let next;do next=ch.nextSibling,walk(ch);while(ch=next)})(c):null)}function handleText(t){const m=[…t.nodeValue.matchAll(hexRegex)];if(m.length===0)return;const p=t.parentNode;let l=0;m.forEach(x=>{const v=x[0],i=x.index;if(i>l)p.insertBefore(document.createTextNode(t.nodeValue.slice(l,i)),t);const s=document.createElement("samp");s.textContent="█",s.style.color=v,s.style.marginRight="0.25em",p.insertBefore(s,t),p.insertBefore(document.createTextNode(v),t),l=i+v.length});if(lwalk(document.body),500);})();
What changed:
Delay (setTimeout): gives React time to finish rendering before mutation.
IFRAME exclusion: avoids error-prone iframe regions.
Tighter traversal logic, more robust injection.
Troubleshooting:
Try running it after the full page and responses are visible.
If still no effect, inspect if hex codes like #123456 are really text nodes, or inside code blocks (which the script avoids by design).
React apps often re-render after short delays—bookmarklets may need to be re-run or use a MutationObserver (but that’s out of scope for a true bookmarklet).
Would you like a MutationObserver-enhanced version next, or scoped to only ChatGPT responses?
You said:
IT WORKED!█
ChatGPT said:
🔥 Excellent. That means ChatGPT's DOM wasn't the real obstacle—just timing. Bookmarklets win again.
Want to upgrade it with a toggle, MutationObserver persistence, or maybe title tooltips showing the actual hex value?
3 notes
·
View notes
Text
Prevent HTTP Parameter Pollution in Laravel with Secure Coding
Understanding HTTP Parameter Pollution in Laravel
HTTP Parameter Pollution (HPP) is a web security vulnerability that occurs when an attacker manipulates multiple HTTP parameters with the same name to bypass security controls, exploit application logic, or perform malicious actions. Laravel, like many PHP frameworks, processes input parameters in a way that can be exploited if not handled correctly.

In this blog, we’ll explore how HPP works, how it affects Laravel applications, and how to secure your web application with practical examples.
How HTTP Parameter Pollution Works
HPP occurs when an application receives multiple parameters with the same name in an HTTP request. Depending on how the backend processes them, unexpected behavior can occur.
Example of HTTP Request with HPP:
GET /search?category=electronics&category=books HTTP/1.1 Host: example.com
Different frameworks handle duplicate parameters differently:
PHP (Laravel): Takes the last occurrence (category=books) unless explicitly handled as an array.
Express.js (Node.js): Stores multiple values as an array.
ASP.NET: Might take the first occurrence (category=electronics).
If the application isn’t designed to handle duplicate parameters, attackers can manipulate input data, bypass security checks, or exploit business logic flaws.
Impact of HTTP Parameter Pollution on Laravel Apps
HPP vulnerabilities can lead to:
✅ Security Bypasses: Attackers can override security parameters, such as authentication tokens or access controls. ✅ Business Logic Manipulation: Altering shopping cart data, search filters, or API inputs. ✅ WAF Evasion: Some Web Application Firewalls (WAFs) may fail to detect malicious input when parameters are duplicated.
How Laravel Handles HTTP Parameters
Laravel processes query string parameters using the request() helper or Input facade. Consider this example:
use Illuminate\Http\Request; Route::get('/search', function (Request $request) { return $request->input('category'); });
If accessed via:
GET /search?category=electronics&category=books
Laravel would return only the last parameter, category=books, unless explicitly handled as an array.
Exploiting HPP in Laravel (Vulnerable Example)
Imagine a Laravel-based authentication system that verifies user roles via query parameters:
Route::get('/dashboard', function (Request $request) { if ($request->input('role') === 'admin') { return "Welcome, Admin!"; } else { return "Access Denied!"; } });
An attacker could manipulate the request like this:
GET /dashboard?role=user&role=admin
If Laravel processes only the last parameter, the attacker gains admin access.
Mitigating HTTP Parameter Pollution in Laravel
1. Validate Incoming Requests Properly
Laravel provides request validation that can enforce strict input handling:
use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; Route::get('/dashboard', function (Request $request) { $validator = Validator::make($request->all(), [ 'role' => 'required|string|in:user,admin' ]); if ($validator->fails()) { return "Invalid Role!"; } return $request->input('role') === 'admin' ? "Welcome, Admin!" : "Access Denied!"; });
2. Use Laravel’s Input Array Handling
Explicitly retrieve parameters as an array using:
$categories = request()->input('category', []);
Then process them safely:
Route::get('/search', function (Request $request) { $categories = $request->input('category', []); if (is_array($categories)) { return "Selected categories: " . implode(', ', $categories); } return "Invalid input!"; });
3. Encode Query Parameters Properly
Use Laravel’s built-in security functions such as:
e($request->input('category'));
or
htmlspecialchars($request->input('category'), ENT_QUOTES, 'UTF-8');
4. Use Middleware to Filter Requests
Create middleware to sanitize HTTP parameters:
namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class SanitizeInputMiddleware { public function handle(Request $request, Closure $next) { $input = $request->all(); foreach ($input as $key => $value) { if (is_array($value)) { $input[$key] = array_unique($value); } } $request->replace($input); return $next($request); } }
Then, register it in Kernel.php:
protected $middleware = [ \App\Http\Middleware\SanitizeInputMiddleware::class, ];
Testing Your Laravel Application for HPP Vulnerabilities
To ensure your Laravel app is protected, scan your website using our free Website Security Scanner.

Screenshot of the free tools webpage where you can access security assessment tools.
You can also check the website vulnerability assessment report generated by our tool to check Website Vulnerability:

An Example of a vulnerability assessment report generated with our free tool, providing insights into possible vulnerabilities.
Conclusion
HTTP Parameter Pollution can be a critical vulnerability if left unchecked in Laravel applications. By implementing proper validation, input handling, middleware sanitation, and secure encoding, you can safeguard your web applications from potential exploits.
🔍 Protect your website now! Use our free tool for a quick website security test and ensure your site is safe from security threats.
For more cybersecurity updates, stay tuned to Pentest Testing Corp. Blog! 🚀
3 notes
·
View notes
Text
Gifsets

Are you a gifset maker?
Fic In A Box (a multifandom gift exchange with a large minimum) allows participants to offer and request gifsets as a medium – meaning you could sign up to receive a 10,000 word gift fic (or two 5k gift fics, or a selection of opt-in mediums) and fulfill your assignment with lovingly crafted gifsets for someone who would be over the moon to receive them. We would really love to see some gifsets created for the 2024 round!
How Gifts Are Defined In This Exchange (The Rules):
Gifsets should tell a story or AU, make an argument, highlight a theme, highlight a parallel, or otherwise be transformative and non-ephemeral. Gifsets which are meant to solely display a scene from canon without otherwise doing one of the prior are not allowed to make sure that we stay within AO3's TOS [link]
Minimum for a 1k Equivalent
Gifsets with simple/minimal editing (color/sharpening only, simple text, etc): minimum of 10 gifs
Gifsets with obvious/complex editing (text with timing or placement, gifs with transitions, collages, etc): minimum of 6 gifs
Equivalent by Gif
Gifsets with simple/minimal editing: 100 words per gif
Gifsets with obvious/complex editing: ~167 words per gif
While anon rules are important, they aren't reasonable in all cases so exceptions have been built into the rulesets. During the anon period it's expected that everyone should still act as though the works are anon even if the name is visible (this means no naming the creator and no claiming the work in namespace until after creator reveals). If posting a work that requires the use of an outside account, please follow the anon rules above.
In addition, if possible you must embed your work on AO3. If embedding is impossible, you must put something besides a link into your AO3 work: a screenshot, an example, instructions, and/or similar -- think of this like giftwrapping. It doesn't need to be complex, it just needs to be enough to count as a fanwork per the Archive Terms of Service [link].
How to participate
During Nominations (Aug 17th-24th), ensure there are tags for the fandoms, relationships, and characters you like in the 2024 tagset.
During Sign Ups (Aug 27th-Sept 7th), complete a sign up with requests (what you want to receive) and offers (what you want to create) using tags from the tagset.
(Optional: If you only create non-fic mediums, email the mods before Sign Ups end to ensure you match on the correct medium.)
(Optional: If you want to create several smaller gifts for multiple participants instead of 10k for one person, submit a swap requests before Sept 11th)
Create your gift(s) during the Creation Period (Sept 10th-Oct 20th)
Rest on your laurels after posting your work, or pick up pinch hits, or write extra gifts during the Extension & Pinch Hitting Period (Oct 21st-Nov 15th)
Enjoy your gift(s) after Work Reveals (Nov 16th)
Find out who made your gifts after Creator Reveals (Nov 30th)
Want more info?
Follow us here on tumblr and check out our pinned post!
Stop by our Dreamwidth community to read the 2024 rules post.
Check out the tagset to see what's already been nominated.
Join our Discord server for newbies (includes a questions channel!)
Please consider giving us a reblog so we can reach more gifset makers!
7 notes
·
View notes
Text
~◇ Introduction
#include <iostream>
using namespace std;
int main(){
Greetings all! I am Boba and an artist in learning. I go by she/her, but I do not mind they/them. I usually post oc art and lore!
I am a minor and aroace. Therefore, I would appreciate it if sexual jokes are not made! I also do not take in commissions.
string my_interests[11] = {"Moriarty the Patriot", "Omniscient Reader Viewpoint", "Bungo Stray Dogs", "Twisted Wonderland", "Ever After High", "OCs", "Alien Stage", "Reverse 1999", "Arcana Twilight", "Arcane", "otome games"}
(You can find me on){
Discord and Tiktok, both under the name Bobalicious_6565!
}
return 0;
}
3 notes
·
View notes