开发者
编程技术、框架工具、最佳实践
共 7452 篇 · 第 309/373 页
Open-source gamification UI library
The shadcn registry directory is pretty stacked, but there isn't currently any depth in the gamification space. So I decided to build a library of 17 components across the major features you see in most consumer platforms. Things like streaks, achievements, leaderboards, points etc. Trophy UI is fully open-source, and while it seamlessly integrates with Trophy itself, the UI components just accept regular props and so can be used with any backend. Most interesting components: Streak calendar - weekly, monthly or yearly (git-style) view of streak history, with support for streak freezes which are pretty common in consumer apps like Duolingo. Leaderboard rankings - flat list of rankings each with support for avatars, bylines and change indicators. Also supports pagination and collapsed rows to focus rankings around a particular position i.e. show users to top three users above and below them. Achievement badge - a simple badge with support for locked/unlocked states plus features like percentage completion and rarity (the share of users who have unlocked the badge). Points levels timeline - progression path for points levels with support for sub-levels (Bronze I, II, III, Silver I, II, III etc) plus anchoring to a particular users current progress. Every component is installable via shadcn CLI: npx shadcn@latest add https://ui.trophy.so/<component> Once installed you own the code, customize and modify as you see fit. Also very happy to accept contributions for new components or features for existing components. Would love to hear what people think, and would very much appreciate a star on GH if you think its valuable! submitted by /u/CBRIN13 [link] [留言]
Anti-Vax Dating Apps Are Going IRL. People Are Mad as Hell About It
Unjected and PureBlood.Dating are hosting in-person meetups—and have transformed the dating landscape into a political battleground over bodily autonomy.
Introduction – Rust for Python Programmers
Do women’s mate preferences change across the ovulatory cycle? (2014) [pdf]
Stop Using Conventional Commits
submitted by /u/f311a [link] [留言]
In these tempestuous times, is it worth learning .NET?
I am a senior full stack dev with 7+ YOE and I think we can all agree the market sucks right now! Primarily I have been applying to full stack roles but I am backend leaning (PHP/Laravel) I seem to be seeing a lot of .NET/C# roles for backend-only roles. Is the market for those devs less chaotic? I'm considering learning .NET anyway, but would like to know if it's worth fully investing my time into it if things are better. submitted by /u/EthanCPP [link] [留言]
I led the U.S. CDC response to the 2014 Ebola epidemic
Zig Zen Update
Understanding Consistent Hashing Correct Me If I'm Wrong
Why we need it ? Suppose we have multiple databases and want to distribute data among them. Instead of searching every database when we need some data, we use a rule that tells us exactly which database should store a particular record. Method 1: Modulo Based Distribution Imagine we have 3 databases DB-A , DB-B , DB-C Each record has a unique ID. Now We decide the database using ID % Number_of_Databases for e.g. 16 % 3 = 1 So record 16 goes to database index 1 (DB-B). This works fine until we add another database. The same record becomes 16 % 4 = 0 Now record 16 should be stored in DB-A instead of DB-B. The problem is that when the number of databases changes, a huge amount of data gets remapped to different databases. This can cause Massive data migration , Increased CPU and network usage Method 2: Consistent Hashing Instead of using modulo, imagine a circular ring numbered from 0 to 99. We place our databases on the ring: DB-A -> 0 DB-B -> 25 DB-C -> 50 DB-D -> 75 Now we pass the data unique id through a hash function and it will give the location of that data on the ring for e.g. User ID = 12345 hash(12345) = 42 now we get the position we Move clockwise. Store the data in the first database you encounter This means we store the 42 position data at the DB-C Now What Happens When We Add a New Database? Suppose we add DB-E -> 37 now only the data between 26 to 37 needs to move from DB-C to DB-E. The rest of the data stays exactly where it was. This is the biggest advantage of Consistent Hashing much less data migration , easier scaling , lower operational cost Now there is one more thing in this method which is Virtual Nodes One issue is that some databases may receive much more traffic than others. To balance the load, the same database can appear multiple times on the ring. DB-A -> 0, 40, 80 DB-B -> 25, 65 DB-C -> 13, 50, 90 DB-D -> 75 These extra positions are called virtual nodes. Any corrections? Is there anything else I should know about this topic? Please let
"Bricks & minifigs can stuff it" – Patreon CEO [video]
I built a black-and-white e-ink display so I'd stop checking my phone 60 times a day
I was unlocking my phone 60 times a day just to see my todos, calendar, and unread counts. Every unlock pulled me out of whatever I was doing. So I built a black-and-white display that shows it all at a glance. It sits on my desk like a picture frame. No backlight. No notifications. No sounds. How it works: Raspberry Pi driving a 7.5" Waveshare e-ink panel Server renders the whole screen as an 800×480 1-bit PNG with node-canvas The Pi just fetches the image and draws it (e-ink hates fast refreshes, so this keeps it sipping power) Pulls from Todoist, Google Calendar, weather, and RSS Updates every 30 minutes Now, phone unlocks dropped from 60 a day to about 15. The info didn't go anywhere, it just stopped living behind a lock screen. It is completely free and open-source (still in wip) https://quietdash.com EDIT: wrong title, I didn't build the eink display, I built the dashboard that lives on it submitted by /u/InnerPhilosophy4897 [link] [留言]
stripeek: A TUI to record and inspect Stripe API traffic in real time
If you ever worked with complex Stripe integrations, this will save you hours of your life spent combing through multi-storey JSON payloads and tracing sequences of requests that Stripe libraries make. Works with any backend, no changes to application code needed. Webhook support is on the way! submitted by /u/progapandist [link] [留言]
Running Python code in a sandbox with MicroPython and WASM
OpenCV 5 Is Here: The Biggest Leap in Years for Computer Vision
Alan Kay on "Should web browsers have stuck to being document viewers?"
Is This Hate Speech?
Updated imagor 1.9.1 benchmark results for dynamic image processing
I’ve been improving imagor’s handling of streamed image sources and its libvips image loading path, and updated the benchmark page with current releases. If you work on image delivery, dynamic resizing, or URL-based image processing in web stacks, the updated benchmark summary is here: Benchmark page: https://docs.imagor.net/benchmarks imagor repo: https://github.com/cshum/imagor These results use released versions of imagor, imgproxy, and thumbor. The benchmark page includes summary charts, and the benchmark repo includes committed result summaries for anyone who wants to inspect the setup more closely. Happy to discuss the implementation changes, benchmark setup, or what additional scenarios would be useful to measure. submitted by /u/cshum [link] [留言]
I Finally Finished Schedio: Turning a 5-Day Hackathon MVP Into a Live Product
Created a Google Chrome extension that instantly turns any highlighted text on a webpage into a Google Calendar event
Cloudflare Identifies Query Planning Bottleneck in ClickHouse
Cloudflare recently described how a slowdown in its billing pipeline was traced to contention inside the query planning stage of ClickHouse. The team profiled the bottleneck and patched ClickHouse to replace an exclusive lock with a shared lock, drop the per-query copy of the parts list, and improve part filtering. By Renato Losio