Using percentage values with background-position on a linear-gradient

TL;DR All the percentage values used with background-position are equivalent when using a gradient as background, so you won’t see any difference. You need to specify a background-size different from the container size: body { display: flex; flex-direction: column; justify-content: space-around; align-items: center; min-height:90vh; } .button { text-decoration: none; color: white; font-weight: bold; width: 350px; … Read more

Use of eval in Python

eval and exec are handy quick-and-dirty way to get some source code dynamically, maybe munge it a bit, and then execute it — but they’re hardly ever the best way, especially in production code as opposed to “quick-and-dirty” prototypes &c. For example, if I had to deal with such dynamic Python sources, I’d reach for … Read more

How should I implement this schema in MongoDB?

OK, I think you need to break this out into the basic “varieties”. You have two “entity”-style objects: User Campaign You have one “mapping”-style object: UserCampaign You have one “transactional”-style object: Click Step 1: entity Let’s start with the easy ones: User & Campaign. These are truly two separate objects, neither one really depends on … Read more