1080
Always try sudo (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] Fades@lemmy.world 186 points 2 months ago* (last edited 2 months ago)

WHY IS THE HEALTH INPUT PARAMETER A GODDAMN STRING?????????????

Why are you passing ‘%’ inside said goddamn string?!?! Not to mention the static reference instead of the actual instance.

Shame on you

[-] veganpizza69@lemmy.world 6 points 2 months ago

The high level setter function should be made to handle both string and numeric values.

If it contains "%" it's a percentage value.

If it's a string without a "%" it's an absolute value and needs to be normalized.

If it's a numeric value, it's an absolute value.

If it's a numeric 100, it's 100%.

If it's a subunitary numeric value, it's a percentage.

[-] NTripleOne@lemmy.world 13 points 2 months ago

If it’s a numeric 100, it’s 100%.

absolute lunacy

[-] veganpizza69@lemmy.world 3 points 2 months ago* (last edited 2 months ago)

Absolute (cm)

adding one 0:

100%, automatically changes unit to %

(Word table properties)

load more comments (12 replies)
load more comments (26 replies)
this post was submitted on 10 Jul 2024
1080 points (93.8% liked)

Programmer Humor

19197 readers
1704 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS