Comment on
Proton Pass open source password manager is now available on F-Droid
Reply in thread
Same, staying with bitwarden for now
Comment on
Proton Pass open source password manager is now available on F-Droid
Reply in thread
Same, staying with bitwarden for now
Comment on
What is your least favourite acronym?
FTW. For years I thought it meant "Fuck The What". Even now that's the first thing that comes to mind and have a hard time remembering the actual meaning.
Comment on
Alternative open source frontend for Instagram?
I saved and older post where this was mentioned: https://imginn.com/ Seems like it's still working and comments are available
Comment on
Proton Pass open source password manager is now available on F-Droid
Reply in thread
Correct, they announced it two months ago: https://www.androidpolice.com/bitwarden-app-about-prettier/
Comment on
*Permanently Deleted*
Anya Taylor-Joy
Comment on
First boat trip of the season. This time we took Sisu, Mimi & Roo (pictured)
Uhm... Are two of them in that pot?
Comment on
Making a mark
Tiny Darkhounds?
Comment on
The full source code for GTA 5 has apparently been publicly leaked
Reply in thread
Nice username! Stormlight right?
Comment on
Age of Empires 2 is more vital than ever in 2024
Love this game, both playing it and watching it being streamed, there is a great tournament happening at the moment.
Comment on
Introducing Dark Web Monitoring for credential leaks
Coming in the future for custom domains as well, amazing!
Comment on
Would be nice to get everyone into the same Bitcoin community
I haven't been able to find an active community on bitcoin or crypto in general, unfortunately. Got the feeling there is no big overlap in Lemmy users and Crypto enthusiasts. Feeling also supported by the other comment on this post 😅
Comment on
[Help] [2023 Day #1 (Part 2)] Attempted solution - answer not accepted
I think it's related to the replacement of words with digits. There are some overlapping words, for example in "eightwothree" the "t" is used for both "eighT" and "Two". In this case the order of replacement differs your result. It either becomes "8wo3" or "eigh23".
Comment on
Big Tech passkey implementations are a trap
Interesting read. Does anyone have experience with the Bitwarden implementation of passkeys? Already on the Proton suite, but still using BW for passwords at the moment since I like the app and extension, but might switch
Comment on
They don't want you to know
Reply in thread
Comment on
Adding Ecosia to Firefox Android without the App
Thanks! It didn't work for me directly, I needed to use: https://www.ecosia.org/search?q=%s
So ?q instead of &q in the search URL, maybe depends on device?
Comment on
What do you think most dinosaurs sounded like?
Jacha-chacha-chacha-chow!
Comment on
The full source code for GTA 5 has apparently been publicly leaked
Reply in thread
Fantasy book series by Brandon Sanderson!
Comment on
What is the right way to have your toilet paper?
Reply in thread
Is your husband my girlfriend?
Comment on
🌟 - 2023 DAY 6 SOLUTIONS -🌟
Feedback welcome! Feel like I'm getting the hand of Rust more and more.
use regex::Regex;
pub fn part_1(input: &str) {
let lines: Vec<&str> = input.lines().collect();
let time_data = number_string_to_vec(lines[0]);
let distance_data = number_string_to_vec(lines[1]);
// Zip time and distance into a single iterator
let data_iterator = time_data.iter().zip(distance_data.iter());
let mut total_possible_wins = 1;
for (time, dist_req) in data_iterator {
total_possible_wins *= calc_possible_wins(*time, *dist_req)
}
println!("part possible wins: {:?}", total_possible_wins);
}
pub fn part_2(input: &str) {
let lines: Vec<&str> = input.lines().collect();
let time_data = number_string_to_vec(&lines[0].replace(" ", ""));
let distance_data = number_string_to_vec(&lines[1].replace(" ", ""));
let total_possible_wins = calc_possible_wins(time_data[0], distance_data[0]);
println!("part 2 possible wins: {:?}", total_possible_wins);
}
pub fn calc_possible_wins(time: u64, dist_req: u64) -> u64 {
let mut ways_to_win: u64 = 0;
// Second half is a mirror of the first half, so only calculate first part
for push_time in 1..=time / 2 {
// If a push_time crosses threshold the following ones will too so break loop
if push_time * (time - push_time) > dist_req {
// There are (time+1) options (including 0).
// Subtract twice the minimum required push time, also removing the longest push times
ways_to_win += time + 1 - 2 * push_time;
break;
}
}
ways_to_win
}
fn number_string_to_vec(input: &str) -> Vec {
let regex_number = Regex::new(r"\d+").unwrap();
let numbers: Vec = regex_number
.find_iter(input)
.filter_map(|m| m.as_str().parse().ok())
.collect();
numbers
}
Comment on
What have you been reading this month?
I started on the Tawny Man triology by Robin Hobb, love it so far!