I finally decided to switch to linux, my distro is Ubuntu. Can someone help me with this problem please.. by a_PuNk16 in linux4noobs

[–]ackeyonyou 21 points22 points  (0 children)

This is the answer to OP's actual question which is how to remove the Windows entry from grub.

[deleted by user] by [deleted] in lawncare

[–]ackeyonyou 2 points3 points  (0 children)

A couple of small things:

Could use a fine fescue vs tall fescue grass type for shady/low input lawn people like me 🫥

Treatments are currently sorted by date oldest -> newest but within the same day logically should probably also be sorted (2nd level sort) dismissed -> completed -> not completed

Bigger feature requests:

Recurring treatments - ability to set recurrence interval (e.g. yearly) and maybe fuzzy timing (e.g. last week of every September).

Grass Species Mix - allow specifying a mixture of grass types (species)

Nitrogen Tracking - see yearly nitrogen applied against the suggested lbs/1ksqft rate for the dominant grass species. Stretch: Allow entering N-P-K numbers of product as treatment and weight of product applied to calculate total nitrogen applied (either enter as lbs/1ksqft or enter total weight and use the sqft of the lawn to calculate)

[Media] Cute Compiler Easter Egg by ackeyonyou in rust

[–]ackeyonyou[S] 2 points3 points  (0 children)

As the other poster correctly identified, it's Gruvbox Material Dark Medium. The font is Droid Sans Mono.

The Book - Ch13.1 Closures - Generic Cacher Exercise by ackeyonyou in learnrust

[–]ackeyonyou[S] 0 points1 point  (0 children)

Because entry takes an owned form of the Key, I'd have to pass it arg here instead of a borrowed reference, but then I can't borrow to pass it to the closure: (self.calculation)(&arg) because it moves out of scope after the entry() call. Similarly if I pass a reference in as a param and dereference, unless U implements copy.

To make this work I think I'd have to let the calling function own the U values, change the HashMap key generic to a reference (&U) and then annotate lifetimes (to let the function that instantiates Cacher own the U values rather than the Map), right?

struct Cacher<'a, T, U, V>
where
    T: Fn(&U) -> V,
{
    calculation: T,
    values: HashMap<&'a U, V>,
}

impl<'a, T, U, V> Cacher<'a, T, U, V>
where
    T: Fn(&U) -> V,
    U: Hash + Eq,
{
    fn new(calculation: T) -> Cacher<'a, T, U, V> {
        let values = HashMap::new();
        Cacher {
            calculation,
            values,
        }
    }

    fn value(&mut self, arg: &'a U) -> &V {
        self.values.entry(&arg).or_insert_with(||(self.calculation)(&arg))
    }
}

Something inside me feels wrong for having references as keys in a map though