#using namespace
Explore tagged Tumblr posts
coralkashri · 6 months ago
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…
1 note · View note
twinsimming · 1 year ago
Text
Tumblr media
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.
Tumblr media
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 💙
963 notes · View notes
hymneminium · 1 year ago
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?
86 notes · View notes
plentyeyes · 2 years ago
Text
Tumblr media Tumblr media Tumblr media
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.
503 notes · View notes
mommygyno · 2 months ago
Text
#include <iostream>
using namespace std;
int main() {
cout << "I love my husband.";
}
18 notes · View notes
meteorcrit · 1 month ago
Note
As much as I dislike AI, even saying that Chimera AI generates colors is too kind. Even generating a random pallet on coolors gives better results. Chimera has absolutely no algorithm/thought process like any real AI or computer program made for color palettes would have. It is simply pure randomness. Behold, Chimera's code for generating colors! Real and leaked!! /j (This is a real, functional and tested C++ program because why not. I have nothing better to do.)
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
int NoColors;
cout << "How many colors do you want?\n";
cin >> NoColors;
for (int i = 0; i < NoColors; i++) {
cout << "color " << i+1 << ": (" << rand() % 255 << ", " << rand() % 255 << ", " << rand() % 255 << ")\n";
}
return 0;
}
colors so bad even ai could do better, how does he manage to fuck that up so bad -🕶✨
11 notes · View notes
sploon-fic-fan · 21 days ago
Text
you know, the TVTropes page for Chonny Jash feels like it could really use some more development, Imo. I don't have an account and for personal reasons don't really want to make many new online accounts, but I thought I'd call that into attention
by the way, if it comes up for like, a Characters page or something, I suggest you make another page, under the Fanfic namespace, named Jashverse Fandom. you don't have to do that, I just thought I'd adress it because it might be a problem
8 notes · View notes
kiyomitakada · 2 months ago
Text
i do check all the urls i use to make sure nobody real is behind them btw and it consistently surprises me how many good urls simply have not been grabbed. i know at least some of them are because tumblr won't let go of the namespace for some reason but still. how does tumblr user makeconservativeswoof not exist
8 notes · View notes
theaudientvoid · 1 year ago
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
king-fae · 1 year ago
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;
}
Tumblr media
60 notes · View notes
olderthannetfic · 1 year ago
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
twinsimming · 1 year ago
Text
Tumblr media
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.
Tumblr media Tumblr media Tumblr media Tumblr media
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.
Tumblr media Tumblr media
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.
Tumblr media
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
803 notes · View notes
sleptawake · 3 months ago
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
encyclopediacr · 1 year ago
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
smokin-salmon · 2 months ago
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.
4 notes · View notes
pentesttestingcorp · 1 month ago
Text
Symfony Clickjacking Prevention Guide
Clickjacking is a deceptive technique where attackers trick users into clicking on hidden elements, potentially leading to unauthorized actions. As a Symfony developer, it's crucial to implement measures to prevent such vulnerabilities.
Tumblr media
🔍 Understanding Clickjacking
Clickjacking involves embedding a transparent iframe over a legitimate webpage, deceiving users into interacting with hidden content. This can lead to unauthorized actions, such as changing account settings or initiating transactions.
🛠️ Implementing X-Frame-Options in Symfony
The X-Frame-Options HTTP header is a primary defense against clickjacking. It controls whether a browser should be allowed to render a page in a <frame>, <iframe>, <embed>, or <object> tag.
Method 1: Using an Event Subscriber
Create an event subscriber to add the X-Frame-Options header to all responses:
// src/EventSubscriber/ClickjackingProtectionSubscriber.php namespace App\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; class ClickjackingProtectionSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents() { return [ KernelEvents::RESPONSE => 'onKernelResponse', ]; } public function onKernelResponse(ResponseEvent $event) { $response = $event->getResponse(); $response->headers->set('X-Frame-Options', 'DENY'); } }
This approach ensures that all responses include the X-Frame-Options header, preventing the page from being embedded in frames or iframes.
Method 2: Using NelmioSecurityBundle
The NelmioSecurityBundle provides additional security features for Symfony applications, including clickjacking protection.
Install the bundle:
composer require nelmio/security-bundle
Configure the bundle in config/packages/nelmio_security.yaml:
nelmio_security: clickjacking: paths: '^/.*': DENY
This configuration adds the X-Frame-Options: DENY header to all responses, preventing the site from being embedded in frames or iframes.
🧪 Testing Your Application
To ensure your application is protected against clickjacking, use our Website Vulnerability Scanner. This tool scans your website for common vulnerabilities, including missing or misconfigured X-Frame-Options headers.
Tumblr media
Screenshot of the free tools webpage where you can access security assessment tools.
After scanning for a Website Security check, you'll receive a detailed report highlighting any security issues:
Tumblr media
An Example of a vulnerability assessment report generated with our free tool, providing insights into possible vulnerabilities.
🔒 Enhancing Security with Content Security Policy (CSP)
While X-Frame-Options is effective, modern browsers support the more flexible Content-Security-Policy (CSP) header, which provides granular control over framing.
Add the following header to your responses:
$response->headers->set('Content-Security-Policy', "frame-ancestors 'none';");
This directive prevents any domain from embedding your content, offering robust protection against clickjacking.
🧰 Additional Security Measures
CSRF Protection: Ensure that all forms include CSRF tokens to prevent cross-site request forgery attacks.
Regular Updates: Keep Symfony and all dependencies up to date to patch known vulnerabilities.
Security Audits: Conduct regular security audits to identify and address potential vulnerabilities.
📢 Explore More on Our Blog
For more insights into securing your Symfony applications, visit our Pentest Testing Blog. We cover a range of topics, including:
Preventing clickjacking in Laravel
Securing API endpoints
Mitigating SQL injection attacks
🛡️ Our Web Application Penetration Testing Services
Looking for a comprehensive security assessment? Our Web Application Penetration Testing Services offer:
Manual Testing: In-depth analysis by security experts.
Affordable Pricing: Services starting at $25/hr.
Detailed Reports: Actionable insights with remediation steps.
Contact us today for a free consultation and enhance your application's security posture.
3 notes · View notes