• 6 Posts
  • 103 Comments
Joined 1 year ago
cake
Cake day: June 25th, 2023

help-circle



  • lnxtx@feddit.nlto196@lemmy.blahaj.zoneRule
    link
    fedilink
    English
    arrow-up
    23
    arrow-down
    1
    ·
    17 days ago

    Ask AI:

    public static boolean isEven(int number) {
        // Handle negative numbers
        if (number < 0) {
            number = -number; // Convert to positive
        }
        
        // Subtract 2 until we reach 0 or 1
        while (number > 1) {
            number -= 2;
        }
        
        // If we reach 0, it's even; if we reach 1, it's odd
        return number == 0;
    }
    












  • lnxtx@feddit.nltoSelfhosted@lemmy.worldUPS Recommendations
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 month ago

    I have 5 300 VA units, 2x cheap brand, 2x CyberPower, 1x Eaton.
    I think 2 of them don’t have a transformer.

    Does it matter? All have a 9 Ah 12 V battery.
    It will last few to 20 minutes maybe.
    No issues so far (battery capacity loss excluded).

    Recently, as someone recommends, all batteries are outside of UPS enclosure,
    lower temperature. Which could affect battery lifetime.

    More power, more money 👀