开发者
Your Fitbit data can now connect directly to Apple Health
Google is rolling out an update that will finally allow you to connect your Fitbit workouts, steps, vitals, and other data to Apple Health, as reported earlier by 9to5Mac. With Google Health's 5.05 update, you can now tap your profile icon, select "Partner apps," and choose Apple Health to link your data directly. Previously, you […]
AI 资讯
Provenance Belongs in the Image Table
A generated image looks finished until review starts. Someone approves the first version. Someone else crops it. A branded copy goes out. Another edit changes the prompt. A week later, the useful question is simple: which prompt, model, seed, size, parent image, and publishing settings produced the version on screen? In a content studio, I put those answers in the PostgreSQL row that stores the image. Logs explain what happened during a run, then rotate away. Object storage keeps the bytes and forgets why they exist. The row is the only one of the three that survives edits, review, and publishing. 1. The row is the receipt The table in apps/api/src/database/init-ai-images-table.js treats generated and edited images as one record type. An original image gets its own row. An edit gets another row, with original_image_id pointing back to the parent. CREATE TABLE IF NOT EXISTS ai_generated_images ( id SERIAL PRIMARY KEY , image_url TEXT NOT NULL , -- what produced it prompt TEXT NOT NULL , model VARCHAR ( 100 ) DEFAULT 'fal-ai/imagen4' , model_version VARCHAR ( 100 ), seed BIGINT , width INTEGER , height INTEGER , -- how it derives from another row is_edited BOOLEAN DEFAULT FALSE , original_image_id INTEGER REFERENCES ai_generated_images ( id ), edit_prompt TEXT , edit_strength DECIMAL ( 3 , 2 ), -- what actually shipped branded_url TEXT , branding_options JSONB , metadata JSONB , tags TEXT [], created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); That self-reference is the design choice. It makes the image table append-only-ish: new variants are inserted as new rows instead of overwriting the earlier state. The cost is more rows and more discipline at write time. The benefit is editable history that product screens and debugging queries can follow. flowchart TD original["Original row: prompt, model, seed, dimensions"] editA["Edited child: edit_prompt, edit_strength, edit_steps"] editB["Edited child: edit_prompt, edit_guidance_scale"] brandedA["Branded output: branded_url,
工具
Cloudflare introduced tool that synchronize its servers
submitted by /u/Ok_Stomach6651 [link] [留言]
科技前沿
Samsung’s discounted smart monitor is $349.99, its lowest price yet
Samsung makes a variety of TVs and computer monitors, but if want both and you’re limited on space, you might want to consider the M80F. This capable 32-inch 4K panel combines features commonly found on both types of screens, and Amazon and B&H Photo both have it discounted to $349.99, where it’s usually $400 or […]
AI 资讯
I used Spring Boot daily but never really understood what happened after pressing Enter in Postman.
Most of us use Spring Boot every day. We create a @RestController, run the application, hit an endpoint from Postman, and get a response. But have you ever wondered what actually happens between clicking "Send" in Postman and your controller method executing? When I started digging into Spring internals, I realized there are several layers working together before my controller is even called. Here's the high-level request flow: Postman │ ▼ Operating System │ ▼ Embedded Tomcat │ ▼ Servlet Filter Chain │ ▼ Spring Security (JWT) │ ▼ DispatcherServlet │ ▼ Controller │ ▼ Service │ ▼ Repository │ ▼ Database What surprised me? One thing I misunderstood for a long time was thinking that the request directly reaches my controller. In reality: The Operating System first routes the request to the application listening on the target port (for example, 8080). Embedded Tomcat accepts the connection. The request passes through the Servlet Filter Chain. Spring Security validates the JWT (if security is enabled). Only after successful authentication does the request reach Spring MVC's DispatcherServlet, which finds the correct controller. This means your controller only executes after several infrastructure components have already processed the request. Key Takeaway Understanding this request flow makes Spring Boot feel much less "magical." Instead of memorizing annotations, you begin to understand why they work. In the next post, I'll explain how Spring Boot starts Embedded Tomcat automatically before the first request even arrives.
AI 资讯
Generating 10,000 certificates from one HTML template
The day your first cohort completes a course is the day certificates stop being a design job and become an engineering problem. One certificate is a Canva export. Ten thousand is a rendering pipeline with a database table, a queue and a verification page. This post walks through the three ways teams actually build that pipeline, with working Python for each, then covers the two parts most certificate tutorials skip: batching at volume and verification. It is a condensed version of our full guide, How to generate signed digital certificates at scale , which also covers storage, retention and revocation. One scope note up front. Most platform certificates do not need cryptographic signing in the PKI sense. The trust model that 95% of platforms ship is simpler: a unique ID printed on the certificate resolves to a verification page on the issuer's domain. An employer types the ID, the page confirms it. That is the model this post builds. If you need true PKI signing for regulated credentials, the stack is different (Adobe Sign, DocuSign, in-house HSM workflows) and this post is not it. What every certificate needs Whichever approach you pick, the output is the same: Component Detail Layout Landscape A4, 2480x1754 at 200 DPI for print Personal Recipient name with full Unicode support Course Course title and completion date Issuer Issuer name plus a signature image ID Unique certificate ID (UUID or short slug) Verify A URL under the ID pointing to your /verify route The signature image communicates authority but provides zero tamper resistance. The certificate ID plus the verification page is the practical trust layer. Keep both in mind as you read the code. The three approaches at a glance Approach Setup Render time Maintenance PDF library (ReportLab, PDFKit) 1 day 200 to 400 ms Fonts, layout drift, library updates HTML plus headless Chrome 2 hours 1 to 3 sec Chromium, memory, queue workers Template API 5 minutes 1 to 2 sec None Approach 1: a PDF library Python with Repo
AI 资讯
XML Tagging in Prompts: The Secret to Getting Better Output from Claude and GPT
XML Tagging in Prompts: The Secret to Getting Better Output from Claude and GPT A simple structuring trick that turns messy, unpredictable LLM outputs into clean, reliable ones. If you've spent any time writing prompts for Claude, GPT, or any other large language model, you've probably hit this wall: your prompt works fine for a simple ask, but the moment you pack in multiple instructions — some context, a few examples, formatting rules, and the actual task — the model starts mixing things up. It answers the wrong part of the question. It ignores your formatting instructions. It treats your example output as part of the actual task. The fix is almost embarrassingly simple: wrap your prompt sections in XML tags. Why XML Tags Work So Well LLMs are trained on enormous amounts of code, documentation, and markup. XML (and HTML) syntax is deeply embedded in that training data, which means models are very good at recognizing where one tagged section ends and another begins. Unlike plain paragraphs — where the boundary between "here's my context" and "here's my instruction" is fuzzy — a tag creates an unambiguous boundary. Anthropic actually recommends this explicitly for Claude: wrapping distinct parts of a prompt (instructions, context, examples, output format) in tags like <instructions> , <context> , <example> , and <output_format> measurably improves consistency, especially in longer or more complex prompts. Think of it like the difference between handing someone a wall of text versus handing them a form with labeled fields. Both contain the same information, but one is far easier to parse correctly — for a human, and for a model. A Before-and-After Example Without tags: Summarize the article below in 3 bullet points. Keep it under 50 words. Use a neutral tone. Here's an example of the style I want: "- Company X raised $10M in Series A funding." Now here's the article: [long article text] The model has to guess where the instructions end and the article begins — and wi
AI 资讯
I have been Vibecoding Evals (works better than I thought)
I’ve been building AI apps with coding agents for a while. Lately, I’ve been experimenting with evals too. The app in this example mostly worked. That was the problem. The bug I built a small support-triage app for a fictional shipment-tracking company. A customer sends a support ticket, and the app decides what it is about, how urgent it is, and whether a human needs to respond. A real outage should be escalated. But this ticket was different: “URGENT need key rotation now” The customer was asking how to rotate their own API key before a security review. The app classified it as a security incident and escalated it to a human. That was wrong. The policy said normal key rotation was a self-service how-to request. Nothing crashed. The app returned valid JSON. The fields all contained allowed values. The behavior was still wrong. Why clicking around wasn’t enough I could test a few tickets manually and convince myself the app worked. But after changing the prompt, what would I actually know? Would the outage case still escalate? Would normal how-to questions stay in the normal queue? Would another API-key question behave differently? I didn’t want to change the prompt and simply hope for the best. I wanted a set of cases I could run again. Adding DeepEval with Cursor I installed the DeepEval agent skill: npx skills add confident-ai/deepeval --skill "deepeval" Then I asked Cursor to add evals to the app: This app sometimes treats normal support questions like emergencies and sends them to a human. Add DeepEval so I can test this using the tickets and policy already in the repo. I am new to evals, so use the simplest setup DeepEval already provides, explain what you create, and ask me anything you need. Run the app as it is first and show me what fails. Do not fix it yet. Cursor already had the app, tickets, and policy, so it went straight to creating the baseline. Goldens are the checklist The first useful artifact was a JSON dataset. Each golden contained: the custome
AI 资讯
Building a security posture scanner with Next.js and Python
I wanted to learn cloud security the way it actually sticks: by building something real. So I built PostureGuard, a web application that scans a domain and returns a security posture report covering TLS, HTTP security headers and open ports, with a 0-100 score and an A-F grade. This post walks through the architecture and the decisions I found most interesting. Update: Phase 1 is done. PostureGuard now runs on Azure Container Apps and is live at app.samdossou.com . The write-up is the next post in this series. The shape of the system PostureGuard has three moving parts: A Next.js web app (App Router, TypeScript) where users sign up, add a domain, and request scans. A PostgreSQL database that stores users, domains and scans. A Python worker that runs the actual scans in the background. The web app never runs a scan itself. When a user clicks "Scan", the app just inserts a row into a scans table with the status queued and returns immediately. The worker picks the job up a moment later. This keeps the request fast and the two halves of the system decoupled. Using PostgreSQL as a job queue The part I like most is that there is no separate message broker. The scans table doubles as the queue. The worker claims one job at a time with a single query: SELECT s . id , d . name FROM scans s JOIN domains d ON d . id = s . domain_id WHERE s . status = 'queued' ORDER BY s . requested_at FOR UPDATE OF s SKIP LOCKED LIMIT 1 FOR UPDATE locks the row so no one else can grab it, and SKIP LOCKED tells other workers to ignore locked rows and move on to the next job. That means I can run several workers in parallel and they will never process the same scan twice, without any extra infrastructure. For a project at this scale, a table plus SKIP LOCKED is simpler and more than enough. The scanners The worker runs three checks, all built on the Python standard library to keep dependencies light: TLS: it opens a TLS connection, reads the certificate expiry and the negotiated protocol version
开发者
Understanding Over Origin: The Missing Friction
A few days ago, I wrote "Understanding Over Origin" and it got alot of engagement and I'm really...
AI 资讯
100 城时区页给跨区调度当速查,DST 自动算
100 城时区页给跨区调度当速查,DST 自动算 作者是 数据管道 / 跨时区调度 方向的开发者。这篇不是广告,是踩坑记录 + 顺手做的工具。 背景 做 数据管道 / 跨时区调度 时,时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常;但每个语言/框架的坑都不一样,所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…),每页含 6 个真实坑。 我踩过的坑(举几个) 秒 vs 毫秒:前端 Date.now() 是毫秒,后端常存秒,混用差 1000 倍。 时区不是字符串:存 UTC、展示本地,别把本地时间当 UTC 落库。 2038 问题:32 位系统 time_t 在 2038-01-19 溢出,老系统要提前查。 夏令时:一年有两次重复/缺失的本地时间,跨区调度尤其坑。 我顺手做的东西 转换速查页: https://gotimestamp.com/timezone/new-york 相关语言页: https://gotimestamp.com/timezone/london 开源 MCP: https://github.com/caresotin/tsforge-mcp —— 把时间戳转换/校验直接接进 LLM 工作流,不用手算。 小结 时间戳没那么简单,但工具到位就省心。上面都是免费、开源、可直接用的,希望对同样踩坑的人有帮助。
AI 资讯
Node Date 的 epoch 毫秒坑 + 用 MCP 把转换塞进 AI 流
Node Date 的 epoch 毫秒坑 + 用 MCP 把转换塞进 AI 流 作者是 Node.js / JS 时间 方向的开发者。这篇不是广告,是踩坑记录 + 顺手做的工具。 背景 做 Node.js / JS 时间 时,时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常;但每个语言/框架的坑都不一样,所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…),每页含 6 个真实坑。 我踩过的坑(举几个) 秒 vs 毫秒:前端 Date.now() 是毫秒,后端常存秒,混用差 1000 倍。 时区不是字符串:存 UTC、展示本地,别把本地时间当 UTC 落库。 2038 问题:32 位系统 time_t 在 2038-01-19 溢出,老系统要提前查。 夏令时:一年有两次重复/缺失的本地时间,跨区调度尤其坑。 我顺手做的东西 转换速查页: https://gotimestamp.com/timestamp/nodejs 相关语言页: https://gotimestamp.com/timestamp/javascript 开源 MCP: https://github.com/caresotin/tsforge-mcp —— 把时间戳转换/校验直接接进 LLM 工作流,不用手算。 小结 时间戳没那么简单,但工具到位就省心。上面都是免费、开源、可直接用的,希望对同样踩坑的人有帮助。
AI 资讯
Local development needs a runtime contract, not more terminal tabs
A project can depend on an API, frontend, workers, Docker, databases, tunnels, webhooks, and browser extensions. Remembering which terminal runs each process works—until it doesn’t, and it works even less reliably for coding agents. I built dev-runtime to make that runtime explicit. Simple config files define each session’s working directory, shell command, log file, expected ports, and health endpoints. It runs arbitrary commands inside managed tmux sessions, avoids starting duplicates, and provides shared start , status , doctor , attach , and stop commands. Because the commands live in project config, it is not tied to Node, Python, Docker, or any particular stack. The result is one machine-readable answer to: “What should be running, and is it actually healthy?” Article: https://motia.github.io/blog/using-dev-runtime-to-debug-local-services/ Repository: https://github.com/motia/agent-skills-dev/tree/main/skills/dev-runtime submitted by /u/mutasaki09 [link] [留言]
AI 资讯
AWS is helping vibe-coding startup Superblocks, and the implications are big
AWS now allows vibe coding tool Superblocks to be embedded into the private clouds of AWS customers. It's another step towards decoupling apps from models.
科技前沿
The SpaceX Falcon Lunar Crash Is a Warning for Moon Bases
The risk of more debris hitting the moon is on the rise as the space race heats up.
AI 资讯
Who’s legally to blame for Anthropic and OpenAI’s autonomous AI hacks? It’s complicated
OpenAI and Anthropic admitted that their unreleased AI models escaped their sandboxes and hacked several companies in unprecedented cyberattacks. Who is legally to blame? Should prosecutors charge the two AI frontier labs? Can victims sue them? We spoke to lawyers who specialize in computer hacking laws to find out.
开发者
Learning Rust · Rust Programming Language Tutorials for Everyone!
The project started in 2016 as a Medium publication and GitBook but later moved to https://github.com/learning-rust/learning-rust.github.io I was updating section by section from time to time. No lies! keeping a Rust tutorial up to date is very tough. Plus, you end up repeating what you already know. It is even tougher, when you have to write code in another language for work. https://learning-rust.github.io updated with lot of rewrites and new themes & widgets like tabs for grouped code samples. submitted by /u/dumindunuwan [link] [留言]
AI 资讯
VIDEO AI ME
Make videos and post them everywhere with just one tool Discussion | Link
AI 资讯
Design Arena creators raise $7.9 million to bring taste to AI models
Design Arena is used by 5.3 million people around the world, providing critical human evaluations to frontier labs.
AI 资讯
MOTHER
A terminal built for Claude Code w/ one-click session resume Discussion | Link