this post was submitted on 29 Sep 2023
55 points (83.1% liked)

Programmer Humor

32380 readers
425 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] lelgenio@lemmy.ml 48 points 1 year ago* (last edited 1 year ago) (2 children)
CREATE TABLE display (
    id INT PRIMARY KEY,
    display_property TEXT
);

INSERT INTO display (id, display_property)
VALUES
(1, 'block'),
(2, 'inline-block'),
(3, 'flex');

CREATE TABLE divs (
    id INT PRIMARY KEY,
    inner_html TEXT,
    display INT REFERENCES display(id)
);

INSERT INTO divs (id, inner_html , display)
VALUES
(1, 'div1', 1),
(2, 'div2', 2),
(3, 'div3', 3);
[–] lelgenio@lemmy.ml 44 points 1 year ago (2 children)
.users {
  id: int !primary-key;
  name: text;
}

.users::insert {
  id: 1;
  name: "John doe";
}

@query (max: 10) {
  .user {
    display: table;
  }
  .users id {
    display: none;
  }
}
[–] __init__@programming.dev 18 points 1 year ago

Thanks, I hate it.

[–] moebius@feddit.de 15 points 1 year ago (1 children)

They both feel so wrong, I love it.

[–] Karfkengrumble@lemmings.world 8 points 1 year ago

I think I need to lie down.