200 credits giveaway.
by QUBIT_MATRIX - Wednesday December 18, 2024 at 02:47 AM
#1
Hello,

I am doing a 200 credits giveaway. Name a beautiful function in C, C++ or Python. It can be either from an integrated library or from an external packet. 

I will start with an example. std:Confusedort() and for_each().

https://en.cppreference.com/w/cpp/algorithm/for_each
https://en.cppreference.com/w/cpp/algorithm/sort
Reply
#2
for me its find_if()
Reply
#3
(Dec 18, 2024, 02:55 AM)bumblebee123 Wrote: for me its find_if()

this is nice :3

for reference:
void example_predicate()
{
    for (const auto& haystack : {std::array{3, 1, 4}, {1, 3, 5}})
    {
        const auto it = std::find_if(haystack.begin(), haystack.end(), is_even);
        if (it != haystack.end())
            std::cout << "haystack contains an even number " << *it << '\n';
        else
            std::cout << "haystack does not contain even numbers\n";
    }
}

is_even can be any function. std::find_if returns an iterator.
Reply
#4
For me it would preferably be itertools.groupby()
Reply
#5
Im gonna go for

(@lru_cache):
"Universal appeal is poison masquerading as medicine. Horror is not meant to be universal. It's meant to be personal, private, animal"
Reply
#6
All you guys won. Everyone won 65 credits. Amounts transferred.
Reply
#7
I like it very much to swap

from itertools import permutations

items = [1, 2, 3]
for perm in permutations(items):
print(perm)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Largest Discord User History Archive - 10m+ Users Mega 334 44,799 8 hours ago
Last Post: MeteVegas
  CHATGPT jailbreak | cyber devils Abandoned 93 11,380 10 hours ago
Last Post: predictor777
  A collection of deepweb sites [2025] dg7ka 126 4,667 11 hours ago
Last Post: unconcided
  Hacking forums and their links 2026 onionlinks 2 476 Yesterday, 02:39 PM
Last Post: Sallyjones1981
  Black Basta internal chat logs Download lulagain 14 1,166 Yesterday, 08:28 AM
Last Post: ccdmle

Forum Jump:


 Users browsing this forum: 1 Guest(s)