#Code Readability
Explore tagged Tumblr posts
arifinfrds-blog · 9 days ago
Text
Simplifying Logic with Swift: From if-else to switch Pattern Matching
Switch pattern matching improves readability by replacing if-else statements with clear logic. Check this article if you’re interested in refactoring with switch patterns!
When working with conditional logic in Swift, you often encounter scenarios that require checking multiple conditions. Traditionally, developers rely on if-else statements for such tasks. However, Swift’s powerful switch statement with pattern matching offers a cleaner and more elegant way to handle these situations. In this article, we’ll demonstrate how to transition from a…
0 notes
coralkashri · 2 years ago
Text
The View of The String
std::string_view can optimize both performance and code readability in code sections which handle strings. However it can also lead to UB and to memory issues if used incorrectly. #cpp #cppsenioreas #string_view #performance #readability #ub
Communication is a powerful tool of the humanity. It allows us to transfer ideas and thoughts from one to another. There are many ways of communications, and one of them is words. In order to communicate using words, we need the ability to understand each word in a sentence and to understand the way the words connect with each other. Words analysis today became a major topic in development, and a…
View On WordPress
0 notes
endlesslytired · 9 months ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
558 notes · View notes
missus-paint · 9 months ago
Text
call it hope
Tumblr media
230 notes · View notes
generalsdiary · 4 months ago
Text
Moze x Jiaoqiu
warnings: none
word count: 900~
description: just them being domestic (pre-2.5 events)
moze is the type of husband who always cleans, keeps everything neat, he will run (quite literally) anywhere and do any errand without complaint, nothing is too hard or difficult for him. he is v protective, „I promise I will bring him back“, nothing is stopping him from getting his husband back, he is confident in his abilities, to the point he isn't even worrying. he always attentively listens to jiaoqiu’s ramblings, his full attention on the foxian. he will eat anything jiaoqiu puts before him, no matter his preferences. uttering simple praises after the meal and never letting his husband clean up.
at night he cuddles with him, being the big spoon, holding his husband close, face buried in the orangey pink hair. like a touch starved kitten, he gravitates to him during the day, always hugging him- backhugs are his favorite. jiaoqiu always smiles, a sparkle in his eyes with each embrace. moze is often quiet, very thoughtful- usually ending up blunt in his words but not cold, never cold. the care and love for each other shown in the soft words, gentle embraces and lingering gazes. moze doesn’t do causal touches, his hands don’t wander to jiaoqiu’s soft tail, or even softer ears, or to caress him. he doesn’t want to overwhelm his husband or make him uncomfortable. yet when they stand close he bumps his nose against his. and when he is so so tired he rests his forehead on the shorter man’s. recharging, seeking comfort, love. luckily for him, his husband knows his main love language is physical touch. jiaoqiu bringing his hands to cup his cheeks, thumbs caressing the rough skin. he misses the smile that brightens the foxian’s face, his eyes shut relishing in the sensations. such a sensitive and responsive man. jiaoqiu is the only person moze allows to touch him, to drag those soft fingers across his scars, through the silver hair, to see him shirtless. he is the only one with whom he makes and keeps eye contact. moze is the type of husband that even without being close jiaoqiu can feel his touch on him. sitting across him, over a hotpot. lilac eyes on him. full of love. as if he is caressing his husband’s cheek at that moment. making jiaoqiu’s chest feel warm from the feeling of such a silent expression of admiration.
on the days jiaoqiu voices that he feels tired a quick response is given in turn “I can carry you.” a blunt, straightforward, and the same offer every time. he is more than happy to carry him + he enjoys showing off for his hubby. not caring for the public opinion or any observers; it doesn’t even cross his mind, jiaoqiu’s happiness the only thing on his mind. sadly, he is always rejected (occasionally making him pout). moze doesn’t even know why (painfully obvious why, the rare blushed jiaoqiu further confirming it). shadows are his safe haven, but jiaoqiu is his peace. they fill each other's needs, like puzzles fitting together, completely domestic in their behaviors; perfect for general feixiao’s safety and well-being. despite working together they don’t get tired of each other. work is work and their house is home.
coriander is not allowed under this roof and no big lights are ever on. when they have guests, jiaoqiu compensates with many small lamps, fairy lights, and a bunch of candles. unscented ones. otherwise, they would clash with the meal. sometimes, jiaoqiu will light a scented candle, but it won’t be lit for longer than an hour, otherwise, he would get overwhelmed due to how sensitive his nose is to smells. moze being the clean freak, and insistent on maintaining really good hygiene and not strong perfumes so he can do his job perfectly would just make jiaoqiu purr if he could. type of husband truly only for him. jiaoqiu is quite a social butterfly and he drags his husband with him, who will grumble a bit and then go along, and behave politely to the best of his capabilities. moze cannot read a room to save his life, short in his sentences and straight to the point despite pondering his words prior, they end up always coming off blunt. he means no harm and what he says is usually of little matter, and none of it holds any weight to him when all he needs is to hear his darling chuckle or gaze at him and all is well in his world. the only result he could possibly ever wish for.
and when they kiss? the lighting and shadow with fire and spice? the I talk a lot, flirtatious, rarely flustered with I listen to you with heart eyes, mainly unaffected but you make me smile. well… they keep it private. such actions feel too personal and intimate for them to be shown in public and given for anyone to see on display. they hold it too close to their hearts, it matters in a different way to them. something near and dear. they won’t be caught showing pda, not even holding hands- well they rarely hold hands either way. it is behind closed doors and in the privacy of their home that their lips meet, and hands wander, leaving soft touches in intimate places that they’d never do in public (unlike many others). it means too much to them.
57 notes · View notes
kiruamon · 9 months ago
Text
Grey World AU - Visit from the Moon 2
Part eight of the Grey World AU comic. And second part of the current events. Things are escalating this time. Please, be prepared.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
... Writing this part was haaaaard (for all kinds of reasons). Thankfully, things will slowly calming down from now on.
75 notes · View notes
duchesskatriel · 9 months ago
Text
The difference between Chronos Jonathan/CJ and Harmonia
I got bored and just like
Yes this is related to my Omori inspired au
90 notes · View notes
ominous-feychild · 2 months ago
Text
Btw, in case anyone was wondering...
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
It can be difficult to get the colors for characters!
Especially because I like giving families similar colours, or align colors with people's magic! 👀
(Also, the middle color for Algernon was selected, haha)
Taglist under "read more"!
@honeybewrites @the-golden-comet @illarian-rambling @ashirisu @urnumber1star
@the-letterbox-archives @48lexr @aalinaaaaaa @thecomfywriter @an-indecisive-nerd
16 notes · View notes
elkitot · 6 months ago
Text
Tumblr media
‼️ CONTAINS SPOILERS. ‼️ I hope I don’t spoil this for anyone 😭
Shout to the people who are currently decoding the book of bill, i filled this page with the stuff the decoded and theories I have because why not, idk how they do it tbh but their doing great, my theories might be wrong and I might be thinking too much into this questioning everything TBH but this was fun to do ngl
My handwriting is shit and whoever sees this I hope this is readable also if this is cringey or something just act like i didn’t post this 💀
26 notes · View notes
tntduopolls · 7 months ago
Text
hi! Im @addlepater, I run this blog.
this blog contains nsft themes, questions, and options.
most of it is blockable by blocking: "cw suggestive" "suggestive" "nsft" or "nsft tntduo polls" and if I forget, please remind me.
ive done some polls on it, and decided that unless its super duper explicit like "what colour is c!wilburs asshole" or sm then im not gonna put a content label on it UNLESS someone directly asks me to on that poll. dont be shy to.
for any asks that are NOT poll suggestions, please send them over to my main :)
poll response time, and poll submission:
I am slow, very, very slow, please keep that in mind, I am sorry if I dont get to your poll quick enough :,) that being said, here's a list of options for submitting polls, from least likely wating time, to most:
submit a poll through the submit a post system on Tumblr, which is different from asks!
make a poll and tag this account, so I can reblog it
send in an ask with all options wanted in the poll specified
send in a question, without specified responses
send in a vague suggestion
I appriciate all the asks and suggestions, dont be shy, this is not a complaint, more so a guide on how to minimise wait time :)
the polls I make don't have any right answers, thats why its a poll. i'm not asking about whats most right according to canon, I'm asking about what YOU think. canon is my bitch and I believe thats the community spirit too these days.
if you make a tntduo related poll and want some more reach, feel free to @ me and I'll be more than happy to reblog it
or, if you wanna make your own poll account for tntduo, go ahead! the more the merrier! (please please plea)
unless stated otherwise, my polls can be answered under the assumption that im talking about late Las Nevadas era, whatever that looks like to you.
generally its easiest to do and will be out fastest if you include options in your ask, but If you just have a question, I can add in options. that being said, I can add them in for you, its no problem.
dont know what to submit? here's some ideas: - name two or more songs, and ask which is more tntduo? - name one song, and ask if its tntduo - a hot take! ask if based/not based - a less hot take, just an opinion. based/not based. - a head cannon, based, or not? - a fic rec: have you read it?
things you may submit:
you may submit nsft asks
you may submit controversial asks
submit asks relating to only wil or Q, not them as a duo
things not entirely related to tntduo, if its like close ish, I dont care
you may do anything not in the do not section
submit asks about the community
do not
send in any polls in direct support of William gold
send in polls that relate to genuine feuds in the community, if there are any.
thats it! :) have fun
24 notes · View notes
dragon-subway · 9 months ago
Text
maybe what I’m looking forward to the most is when all my current Star Wars ocs have rough designs to them so I can make a proper little diagram of how they all connect to each other and canon
38 notes · View notes
tryslat · 4 months ago
Text
How to Use Our AI to Human Text Converter?
Are you struggling with AI-generated content that sounds robotic and needs human refinement? Our AI To Human Text converter is the perfect tool to transform AI-generated text into human-like content easily. Follow these simple steps to start converting your AI text for free:
Step 1: Visit Our Website
First, head over to our official website at aitohumantextconverter.in. No need to log in or sign up—just visit and start converting instantly.
Step 2: Paste Your AI-Generated Content
Once you’re on the site, paste your AI-generated content into the designated text box. This is the content you want to humanize using our converter.
Step 3: Select Language and Fill the Captcha
After pasting your content, select the language of the text and complete the image captcha code. This step ensures secure and spam-free usage.
Step 4: Click the Convert Button
Now, simply click the Convert button. Our AI text converter will start working on transforming your AI-generated text into a human-like format.
Step 5: Get Your Humanized Text
In just a few moments, your AI-generated content will be converted into a human-readable format. The tool uses advanced algorithms to make the content sound natural and fluent.
Step 6: Enjoy Unlimited Conversions
That's it! You can use our AI To Human Text converter as many times as you like without any restrictions. Enjoy the convenience of free, unlimited text conversion.
4 notes · View notes
keirosims · 11 months ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
All Panels | Previous | Next
13 notes · View notes
lycanwlf · 1 month ago
Text
making web pages mobile friendly is the most vile task known to man
4 notes · View notes
c-official · 2 months ago
Text
Whenever i try to write a binary search the usual way i always get a bit confused if i made an off by one error or made an infinite loop on some inputs. The usual way for reference"
int bin_search1() {
int lower = LOWER_BOUND;
int upper = UPPER_BOUND+1;
while(lower+1 < upper) {
int mid = (upper+lower)/2;
if(predicate(mid)) lower = mid;
else upper = mid;
}
return lower;
}
So let me present to you my preffered binary search!
int bin_search2() {
int guess = LOWER_BOUND;
for(int i = 30; i >= 0; i--) {
int new_guess = guess + (1<<i);
if (new_guess <= UPPER_BOUND && predicate(new_guess)) guess = new_guess;
}
return guess;
}
I guess it's just a matter of preference but i make way less mistakes writing this one.
3 notes · View notes
ufoofy · 1 year ago
Text
Let's talk about filtering and mapping! 🤓
I'm working on the menu page for a restaurant, and as someone with very little frontend experience I wasn't sure how to go about parsing through a JSON file to return certain objects.
After some searching, procrastinating, going through this course, and then more searching - I finally came across the documentation I needed here!
So what is filtering and mapping? .filter() and .map() are JavaScript methods.
filter allows you to filter through an array of objects given some logic (want to find all the items with an id greater than 7? filter. Want to find all the items where the name is equal to "burger" that works too, want to add multiple conditions to find all the items with and id greater than 7 AND the name is "burger" well filter has got your back).
map is used to iterate through an array and call a function on every element in it. I used it to map each item to a list.
Here's an example: We have a JSON file of some food items.
Tumblr media
We want to grab all the desserts from our menu and display them on the desserts page of our website. It's time to filter!
Tumblr media
Keep in mind that the filter method returns a new array with all the objects that we want. In this case when we filter we will get an array with all the desserts.
First we import our JSON file so we can access it.
Next, we create a constant called dessertFilter which will hold our filtered array. dessertFilter will hold all items that have the type equal to dessert. In our example it will hold the chocolate cake object.
Next, we map each item from the new array to a list. This is the list that we'll see displayed on the page. You can choose which properties you want to map. We only map the name, description and price since there's no need for the user to see the item type or id.
Lastly, our return statement contains everything we will see on the page. In our return we have a header and the list of items - we wrap our list, dessertItems in an unordered list since list items need to be wrapped in either an ordered or unordered list.
Here's our result! We can style this with css later.
Tumblr media
Cool! so we filtered for dessert but what about our other menu items? Time to make a reusable component.
Tumblr media
The code is almost the same, but to make this component reusable we create an interface. Interfaces define objects and specify their properties. We specify an object called filterSearch that will act as a placeholder - we set it as a string since the item "types" in our JSON file are strings. (I'm using typescript which accepts interfaces but i believe vanilla javascript does not).
Now lets see the component in action
Tumblr media
Import the component so we can call it.
When we call FilterMenu we have to include filterSearch from our interface. The component needs to know what we're looking for. Here we can set it to any valid type like "dessert", "drink", or "appetizer" and it will display them.
Woo! now we're filtering and mapping with one line of code! and we can reuse it for our other pages too.
Last thing, these methods are chainable! you can connect them and have the same logic in one constant.
Tumblr media
Before reading the documentation, I had seperate JSON files for each menu category and was reusing the same code to map each file on each individual menu page. It was a lot of duplicate code, not great. Now, I have a single JSON file and a reusable component. It's satisying how clean it is!
Learning on your own can be frustrating sometimes, it can be hard to search for solutions when you don't know where to begin. I had never heard of filtering or mapping before this. If you're ever stuck keep pushing! there's so many resources and communities out there.
p.s. I'm open to any suggestions!
10 notes · View notes