今日已更新 267 条资讯 | 累计 41487 条内容
关于我们

标签:#webdev

找到 2652 篇相关文章

AI 资讯

Atomic writes — how tempfile + os.replace prevent corrupted JSON

What happens if the power cuts out while a process is writing to a config file? Or if antivirus software on Windows briefly locks a file mid-write? If you naively overwrite a file with open(path, 'w') , whatever partial content existed at the moment of interruption is what remains on disk. For JSON, that usually means broken syntax — json.load() throws on the next startup, and the entire configuration is effectively lost. This article walks through a standard technique for preventing that: writing to a temporary file first, then swapping it in atomically. Note: "Atomic" here means an operation either completes entirely or doesn't happen at all — there's no partial, observable in-between state. It's the same sense of the word used for database transactions. Why direct overwrites are dangerous open(path, 'w') effectively truncates the file first and then writes the new content. If the process is interrupted during that window, the file is left empty or holding incomplete content. # Dangerous: a crash mid-write leaves a corrupted file behind with open ( ' config.json ' , ' w ' ) as f : json . dump ( data , f ) # what if this gets interrupted? The causes vary: a kill -9 , a power outage, antivirus software briefly blocking file access on Windows, or a backup tool grabbing the file mid-write. This rarely reproduces during local development, but in a long-running production environment, it will eventually happen with near certainty. The fix: write to a temp file, then swap it in The core idea is simple. Never touch the target file directly. Write the complete new content to a temporary file first, confirm that write fully succeeded, and only then replace the target file with that temp file. import json import os import tempfile def atomic_write_json ( filepath , data ): dirpath = os . path . dirname ( os . path . abspath ( filepath )) or ' . ' fd , tmp_path = tempfile . mkstemp ( dir = dirpath , suffix = ' .json.tmp ' ) try : with os . fdopen ( fd , ' w ' , encoding = ' u

2026-09-08 原文 →
AI 资讯

x402 Explained: HTTP-Native Micropayments for AI Agents (With Real Code)

x402 Explained: HTTP‑Native Micropayments for AI Agents (With Real Code) Target audience: developers who are building autonomous AI agents and need a lightweight way to charge for individual API calls without introducing a separate billing system. Why look at x402? Autonomous agents often expose fine‑grained services—think “summarize this paragraph”, “classify this image”, or “fetch the latest price for a token”. Traditional approaches (API keys + monthly invoices, subscription tiers, or ad‑hoc invoicing) add operational overhead that doesn’t scale when an agent might make thousands of micro‑calls per day. The x402 specification repurposes the HTTP 402 Payment Required status code to turn every request into a self‑contained payment negotiation. If the client hasn’t paid, the server replies with 402 and includes the exact payment details the client must satisfy. Once the payment is verified, the server processes the request and returns the normal 200 response. Because the payment is expressed as a plain HTTP header, the mechanism works over any transport that supports headers—REST, GraphQL, gRPC‑HTTP/2 bridge, or even WebSockets. No new protocol layers, no side‑channel escrow services, and no need to maintain a separate billing database. Core components of an x402 flow Piece What it does Where it lives Payment Request Server‑generated data describing the required amount, token, chain, and payee address. Sent in the Pay response header on a 402. Server Payment Proof Client‑generated data proving that a transaction meeting the request was included on‑chain. Sent in the X-Payment request header. Client Verifier Server‑side code that checks the proof: validates the transaction hash, confirms the correct token amount was transferred to the payee, and ensures the chain ID matches. Server Wallet/Signer Client‑side library (e.g., ethers.js) that builds, signs, and broadcasts the payment transaction. Client The spec deliberately stays agnostic about the underlying blockchain;

2026-09-08 原文 →
AI 资讯

From Prompt to Paycheck: Wiring an LLM Chain Into Real Gig Platforms

From Prompt to Paycheck: Wiring an LLM Chain Into Real Gig Platforms Building autonomous AI agents that can accept work, perform tasks, and get paid is no longer a sci‑fi thought experiment. The pieces exist—large language models, tool‑calling frameworks, and micropayment protocols—but stitching them together requires careful engineering. Below is a pragmatic walk‑through of how to turn a prompt‑driven LLM chain into a billable service that can be offered on gig‑style marketplaces (Upwork, Fiverr, or a custom job board). 1. High‑level Architecture +----------------+ +-------------------+ +-------------------+ | Gig Platform | <--->| Agent Frontend | <--->| LLM Orchestrator| | (job post, | | (webhook / API) | | (LangChain + | | payout) | | | | x402 payment) | +----------------+ +-------------------+ +-------------------+ Gig Platform – posts a job, sends a JSON payload to a webhook you expose, and later releases payment when you signal completion. Agent Frontend – a thin HTTP service (e.g., a Cloudflare Worker or FastAPI app) that validates the incoming request, adds authentication, and forwards the job description to the orchestrator. LLM Orchestrator – the core where the prompt chain runs, tools are invoked, and the x402 micropayment protocol is used to charge the client per call or per completed unit of work. The flow is synchronous for simplicity: the client waits for the agent to finish and returns the result in the same HTTP response. If you need longer‑running work, replace the synchronous response with a job ID and a polling endpoint. 2. Choosing the LLM Stack For reproducibility, I’ll use LangChain (v0.2) with OpenAI’s GPT‑4‑turbo as the base model. The same pattern works with any model that supports function calling (Anthropic Claude, Mistral, local Llama‑3 via TGI, etc.). # orchestrator.py import os from langchain.chat_models import ChatOpenAI from langchain.prompts import ChatPromptTemplate , MessagesPlaceholder from langchain.agents import AgentExecutor

2026-09-08 原文 →
AI 资讯

A coding agent can request a discount. Who gets to approve it?

An approval rule becomes useful when you can test what happens on both sides of it: the forbidden action is refused, and the permitted decision leaves evidence. A happy-path demo alone cannot show that distinction. Here is a runnable example using Accordo, the open-source framework coding agents use to build custom CRMs. A synthetic customer wants 30 seats of an Enterprise Plan and requests 25% off. The existing policy permits automatic approval through 10%; above that, through 50%, it requires a user decision. Run it locally You need Git, Node.js 22.16 or newer, npm, and internet access for cloning and dependency installation. Start in an empty working directory: git clone https://github.com/khaoss85/agent-crm.git framework-source cd framework-source git checkout 3b5b5f0c4c3e582e48d54501136024b064756daa node --no-warnings examples/recipes/quote-approval/run.mjs ../my-quote-crm The pinned recipe source creates a project, installs its dependencies and composes the existing commercial package. It then starts a temporary server on localhost and drives the public SDK through HTTP. The catalog is a fixture; the business journey does not call an external provider. It uses source from the checkout, independently of the npm scaffolder release. Check the refusal, then the decision The script contains assertions for each transition: Server pricing produces EUR 3,750 once and EUR 2,400 per month after discount. These are synthetic quote amounts, kept in separate periods. Submission under policy version 1 freezes a commercial snapshot and enters pending_approval . An approval request from the simulated agent receives HTTP 403 with HUMAN_APPROVAL_REQUIRED . The quote and approval remain pending, and no business audit entry is added. A simulated user approves. The quote becomes approved , with one user decision audit and a completed trace. The submitted snapshot remains unchanged. There is one quote version and one approval record. The refusal also has a failed trace. That is a u

2026-09-08 原文 →
AI 资讯

Our regex found 199 records in a 1,723-record corpus and reported no errors

We maintain a corpus of 456 role-specific resume examples in TypeScript. Someone asked me what a good bullet point actually looks like, and rather than answer from taste I decided to measure the thing I already had. Fifteen minutes later we had a script, a set of numbers, and a conclusion. The conclusion was wrong, because the script had silently read about twelve percent of the data. This is a post about that failure mode, and then about the numbers I got once the script worked. The corpus Thirty-one TypeScript files, each exporting an array of role objects. One role looks roughly like this: { slug : ' cloud-architect ' , title : ' Cloud Architect Resume ' , category : ' Information Technology ' , sampleData : { summary : ' ... ' , experiences : [ { company : ' Amazon Web Services ' , position : ' Senior Cloud Architect ' , description : ' - Designed multi-region architecture... \n - Led migration of... ' , }, ], skills : [...], }, tips : [...], } The interesting field is description . It holds a newline-delimited list of bullets as a single string, so the whole corpus of bullets is sitting there in source, greppable, without a database or an export step. Version one const descs = [... text . matchAll ( /description: ' ((?:[^ ' \\] | \\ . ) * ) '/g )]. map ( m => m [ 1 ]); Nothing exotic. Match description: , then a single-quoted string, allowing escapes so an apostrophe inside the text does not terminate the match early. It found 199 description strings. I did not question that, because I had no prior for what the number should be. 199 sounded like a lot of text. We computed medians off it, looked at the opener distribution, and started writing. The number that saved me was on a different line of the same output: roles 456 . The slug count was fine. So 456 roles between them had 199 job descriptions, which would mean the overwhelming majority of roles had no work history at all. I knew that was false, because I had rendered these pages. Why it read twelve percent

2026-09-08 原文 →
AI 资讯

Our site served every URL the same 3,780 bytes, and Google believed it

Checked with a Googlebot user agent one morning: every single URL on our site returned the same 3,780-byte shell. Same <title> , zero <h1> , zero body text. The homepage, a blog post and a product page were byte-identical before JavaScript ran. Search Console agreed with the crawler rather than with us. Of 741 URLs, 116 had earned a single impression in 28 days, and a landing page that had been live for five months was still reported as "URL is unknown to Google". Here is what I actually learned fixing it, including the two things that cost us the most time. Google does render JavaScript. That is not the point. The standard reply to this problem is "Googlebot executes JS now, you are fine." It does. Several of our pages were indexed, so rendering clearly happened. But rendering is a separate, budgeted queue . A domain with little authority does not get much of that budget. So the practical question is not "can Google render our page", it is "will Google spend its budget rendering this page, today, before it decides what the page is about". There is a second problem that has nothing to do with rendering: 741 URLs that are byte-identical before render look like duplicates. You are handing a duplicate-content signal to the crawler and hoping the render queue fixes your first impression. What we built, and what we deliberately did not We wrote a post-build script that injects a real <head> into each generated HTML file: title, description, canonical, robots, Open Graph, Twitter. Head only. The body stayed exactly as the SPA served it. That was deliberate: No hydration flash. No risk of a static copy drifting out of sync with what users see. Nothing that could be read as cloaking, because the static markup is a subset of the rendered markup, not a different page. Every value is read from the same source the React page reads. Where a title is a literal inside a component, the script extracts it from that component's source rather than having anyone retype it. A number ret

2026-09-08 原文 →
AI 资讯

OpenAI Now Runs 3.1 Agent-Workdays Per Human Workday: What Freelancers Should Learn About AI Productivity in 2026

AI can give you more working hours than there are hours in your day. That does not mean it gives you more finished work. On September 6, 2026, OpenAI published a detailed look at how coding agents are changing work inside its research organization. One number will get most of the attention: by mid-August, the organization was using 3.1 agent-workdays of runtime for every human workday . That sounds like somebody installed an extra Monday, Tuesday, and Wednesday inside Monday. OpenAI also reported that researchers were contributing code faster and running more experiments. Agent use had expanded beyond writing research and infrastructure code into technical help and monitoring runs. Some internal support office hours saw less demand because agents were handling troubleshooting work. But the report makes an important qualification: faster code and more experiments do not automatically make the whole research process 3.1 times faster. Research includes deciding what to pursue, designing experiments, running them, analyzing results, communicating findings, allocating compute, catching failures, and applying safety controls. Speeding up one stage can simply move the waiting line somewhere else. That is the useful lesson for a freelancer, solo founder, or beginner building an app with AI: Do not ask whether you are using enough AI. Ask which stage is limiting finished work. I call the tool for answering that question a bottleneck map. The beginner mistake: measuring the assistant instead of the work AI tools make activity easy to see. You can count tokens, prompts, agent sessions, generated files, commits, pull requests, tests, or hours of runtime. Those numbers can help with cost and capacity planning. They are terrible substitutes for the result your customer or user needs. OpenAI's own report is careful here. The organization observed more code and more experiments, but it also said those metrics are easier to measure than their relationship to research progress. As au

2026-09-08 原文 →
AI 资讯

Zero-Budget Web Dev: Moving from Discord/Drive to Google Sites

Welcome to part one! This is the start of a series where I’ll be posting about my webdev and HTML nightmares. I hope you enjoy the read as much as I hate User Interfaces! Consider this a shared space for learning—I’m sharing what I’ve learned so far, and I’d love to hear your thoughts or better solutions in the comments. To kick things off, let’s talk about how this whole mess started. As a solo developer, you want to spend 99% of your time actually building the things you love. So when it’s time to share builds with early playtesters, I naturally take the path of least resistance... a pinned link in a Discord channel and a shared Google Drive folder. And for a while, it works. Until it suddenly doesn't. The Problem: The "Easy way" Trap Privately, with a small group of alpha testers, Discord is great. You can pin messages, create specific channels, and guide people directly. But as soon as you want to go public, Discord becomes a nightmare for onboarding new users: The "Tutorial" Requirement: If a new user needs a 5-minute guide just to navigate your Discord server to find the launcher or the latest release, you’ve already lost them. Zero Discoverability: Discord is great for community and chat, but terrible as a public storefront or documentation hub. Searching for news, filtering updates, or finding launcher links creates massive friction. Lack of Professionalism: To offer real support, showcase features, and look trustworthy to a public audience, you need a single source of truth—not a maze of text channels lost to the void. I didn't have time to manage an overly complex custom web setup or pay high monthly SaaS fees, but I needed a clean, low-maintenance way to go public. Yes, I spent no more than thirty seconds drawing this on my Bamboo tablet: Why Google? (And the Launcher Evolution) Before even thinking about the website, I had to solve the distribution problem for my launcher. I experimented with several download pipeline prototypes: Git Repos / Diversion (f

2026-09-08 原文 →
AI 资讯

Why AI-Generated Code Still Needs Human Developers

AI can now generate functions, components, tests, SQL queries, APIs, and sometimes entire applications from a short description. For developers, this has changed the daily workflow faster than almost any previous programming tool. Need a React component? AI can generate one. Need to debug an error? AI can suggest possible fixes. Need unit tests? AI can create a first draft. Need documentation for an unfamiliar API? AI can summarize it in seconds. The result is obvious: developers are writing code faster. But faster code generation raises an important question: If AI can generate code, why do human developers still matter? The answer is simple. Writing code is only one part of software development. Software engineering involves understanding problems, making architectural decisions, evaluating tradeoffs, validating requirements, securing systems, debugging unexpected behavior, and taking responsibility for what eventually runs in production. AI can generate code. Human developers still need to decide what should be built, why it should be built, whether the generated code is correct, and whether it is safe to deploy. This article explores why AI-generated code still requires human developers and why the future of programming is likely to involve developers working with AI rather than being completely replaced by it. AI Is Already Changing How Developers Work There is no serious argument that AI coding tools are irrelevant. Developers are using them. According to Stack Overflow's 2025 Developer Survey, 84% of respondents were already using or planning to use AI tools in their development workflow , and 51% of professional developers reported using AI tools daily . ([Stack Overflow Developer Survey][1]) AI can significantly reduce the time required for tasks such as: Generating boilerplate code Creating unit tests Explaining unfamiliar code Writing documentation Refactoring simple functions Generating SQL queries Debugging common errors Creating initial prototypes This

2026-09-08 原文 →
AI 资讯

From Prompt to Paycheck: Wiring an LLM Chain Into Real Gig Platforms

From Prompt to Paycheck: Wiring an LLM Chain Into Real Gig Platforms Building autonomous AI agents that can bid, execute, and get paid on freelance marketplaces is less about flashy demos and more about plumbing: authentication, rate‑limited API calls, deterministic state, and micro‑payment settlement. Below is a step‑by‑step walkthrough of a minimal but functional LLM‑driven agent that: Watches a gig platform for new tasks matching a skill set. Uses a language model to draft a proposal. Submits the proposal via the platform’s REST API. Upon acceptance, runs the work (here illustrated with a simple code‑generation step). Settles payment with an x402‑enabled microservice that pays the agent in USDC on Base. The code is written in Python 3.11 and relies on widely‑available libraries ( requests , langchain , web3 ). Adjust the endpoints and credentials for the platform you target (Upwork, Fiverr, Freelancer, etc.). 1. Architecture Overview +----------------+ +----------------+ +----------------+ | Poller (cron) | ---> | LLM Chain | ---> | Platform API | +----------------+ +----------------+ +----------------+ ^ | | | v v +----------------+ +----------------+ +----------------+ | State Store | | Worker (run) | | x402 Payments | +----------------+ +----------------+ +----------------+ Poller – a lightweight scheduler (e.g., APScheduler or a cloud cron) that queries the gig platform’s “new jobs” endpoint every N minutes. LLM Chain – a LangChain LLMChain that takes the job description, formats a prompt, and returns a proposal. Platform API – the marketplace’s REST endpoints for fetching jobs, submitting proposals, and later delivering work. State Store – a tiny SQLite or Redis instance that records which job IDs have already been processed to avoid duplicate bids. Worker – the actual execution logic (here a stub that writes a Python file). In a real agent this could be a sandboxed container that runs the generated code. x402 Payments – a microservice exposing an /invoice e

2026-09-07 原文 →
AI 资讯

Closure in javascript

Closures in JavaScript Closures are one of the most important concepts in JavaScript. They can look confusing at first because they involve functions, lexical scope, and lexical environments together. But once we understand how these concepts are connected, closures become much easier to understand. A simple definition of closure is: A closure is a function that remembers and can access variables from its surrounding lexical environment even after the outer function has finished executing. The word "remembers" here doesn't mean that JavaScript literally copies the variables into the function. Instead, the function maintains a connection to the lexical environment in which it was created. Let's understand it with an example Consider the following code: function outer () { let name = " Abimanyu " function inner () { console . log ( name ) } return inner } let myFunction = outer () myFunction () When outer() is called, JavaScript creates a lexical environment for it. That environment contains the variable name : Outer Lexical Environment name → "Abimanyu" The inner() function is created inside outer() , so it has access to that surrounding environment. When outer() returns inner , the function is stored in myFunction . Now outer() has finished executing, but myFunction still refers to inner() . myFunction ↓ inner() ↓ Outer Lexical Environment ↓ name → "Abimanyu" When we call: myFunction () inner() needs the value of name . Since name is not inside its own environment, JavaScript looks through its surrounding environment and finds name in the environment created by outer() . This is the important part of a closure: the function retains access to the environment where it was created, even though the outer function has already finished executing. Why doesn't name disappear? This is where closures are often misunderstood. You might think that once outer() finishes, everything created inside it should disappear. But inner() still has a reference to the environment containin

2026-09-07 原文 →
AI 资讯

The descriptor survived, const did not — full-stack Rust

One skeleton, many screens argued that admin screens should be declared as typed data rather than coded, and it ended by claiming the idea was independent of the stack: draw the boundary as a one-way dependency — domains depend inward on a framework that knows nothing about them — and validate it with a zero-diff refactor of a screen you already trust. That was React and TypeScript. This is the same claim re-run in Rust, where a descriptor can be a compile-time constant and a template is a macro. Because the first result is already published, the second stack is a replication with a control rather than a fresh opinion — which is rare enough to be worth doing properly. Companion to Topcoat and the shrinking cost of full-stack Rust . That post was written from the announcement and promised a follow-up reporting where the rough edges actually show. This is it, from the pilot that followed: a small admin panel built on Topcoat 0.6.2 and Toasty 0.10.0, and the four questions that post committed to answering. The pilot is open source — a clean clone runs both screens and the test that decides the argument. That phrase, a compile-time constant , is where the title comes from, so it is worth saying now what it buys and why I wanted it. A TypeScript descriptor is an array of objects assembled when the module loads. A Rust one can be more than that: &'static , Copy , allocated never, fully checked before the program starts. Going in, that looked to me like the same idea in a stricter form — if declaring a screen as data is good, then declaring it as data the compiler can see through and verify must be better still. I treated that property as the thing worth protecting, and the pilot was partly a test of whether it could be. The stack is deliberately a young one. Topcoat is six weeks old: Tokio's team announced it on 22 July 2026, the pilot pins 0.6.2, and the project still expects breaking changes. It is not the only full-stack Rust framework — Leptos and Dioxus have been at

2026-09-07 原文 →
AI 资讯

A torrent client that works on your iPhone

A torrent client that works on your iPhone I wanted to download a film to my iPad on a train and watch it. That turned out to be surprisingly hard. Every torrent app worth using is desktop software. On iOS there's essentially nothing — Apple doesn't allow it, so the App Store options are either gone, crippled, or asking for a subscription to a "cloud downloader" that keeps a copy of everything you touch on somebody else's server. So I built one that just runs in a browser tab. No install, no account, no App Store. It's at wasmtorrent.pages.dev if you'd rather poke at it than read about it. What it does Open the page, paste a magnet link, and it downloads. The whole client is compiled to WebAssembly and runs inside your browser — there's no server of mine involved at any point. A few things that make it actually usable rather than a demo: Stream while it downloads. You can start watching before it finishes, and seek around — it fetches the parts it needs. Files whose codecs your browser refuses fall back to a software player. Save to your device. On iPhone and iPad that means straight into the Files app, in Downloads. Install it to your home screen. It's a progressive web app, so it gets an icon and its own window, and the interface works offline. It tells you when downloads finish , with a deliberately vague message — "one of your downloads has finished", never the name. Notifications land on lock screens where anyone can read them. The awkward part, explained honestly Here's the thing nobody tells you about torrents in a browser: a browser can only make WebRTC connections. Ordinary torrents use TCP peers. A web page physically cannot dial those — it's not a limitation of my code, it's what a browser is. So most magnet links you find will sit at 0% forever in any in-browser client, including this one. That's why they all feel broken. The fix is a small companion app called the bridge. You run it on a computer you already leave on — a Mac, a PC, a Linux box, a home s

2026-09-07 原文 →
AI 资讯

USDC Escrow for AI Agents: How Trustless Freelancing Actually Works

USDC Escrow for AI Agents: How Trustless Freelancing Actually Works Target audience: developers building autonomous AI agents that need to receive payment for services without relying on a centralized intermediary. Why an escrow makes sense AI agents often operate as “black‑box” workers: they receive a request, perform computation (e.g., LLM inference, data labeling, micro‑task execution), and return a result. In a purely peer‑to‑peer model the requester must trust that the agent will do the work before paying, while the agent must trust that the requester will pay after seeing the output. This mutual‑trust problem is solved by an escrow that holds funds until a verifiable condition is met. Using USDC on a low‑cost L2 like Base gives us: Stable value – 1 USDC ≈ $1 USD, avoiding volatility‑related pricing headaches. Fast finality – ~2 seconds block time on Base, keeping latency low for interactive agents. Low gas – Typical transaction costs are <$0.001, making micropayments feasible. The escrow does not eliminate the need for some off‑chain verification of work; it merely shifts the trust from a counterparty to a deterministic contract plus a verification mechanism (oracle, arbiter, or proof). System overview +----------------+ +----------------+ +----------------+ | Requester | <---> | Escrow (SC) | <---> | AI Agent | | (pays USDC) | deposit| holds USDC | earns | (does work) | +----------------+ +----------------+ +----------------+ ^ | | | dispute / refund | proof of completion | +-------------------------+-------------------------+ Funding – The requester deposits USDC into the escrow contract, specifying the agent’s address and a maximum price. Work trigger – The agent calls a startWork function (or simply watches for a deposit event) and begins the off‑chain task. Completion proof – When the work is done, the agent submits a cryptographic proof (e.g., a hash of the output stored on‑chain, or a signature from a trusted oracle) via submitProof . Release – If the p

2026-09-07 原文 →
AI 资讯

GPTBot in robots.txt: the hosting toggle developers need to check

Your robots.txt may express an AI policy you did not write. We checked the homepage and robots.txt of 9,037 live AI tools listed on directree on 6 and 7 September 2026. Of those, 945 explicitly disallow OpenAI’s GPTBot in its own user-agent group: 10.5% of the sample. Treat AI crawler rules as deployment configuration. Review them when you change hosting, enable a CDN feature, adopt a starter template, or hand site operations to someone else. Read the full research and methodology . GPTBot, search, and user browsing are separate A common configuration blocks model training while keeping a site available in AI-assisted search and browsing: User-agent: GPTBot Disallow: / User-agent: OAI-SearchBot Allow: / These are separate crawlers with separate purposes. In our sample, 839 of the 945 sites that block GPTBot, or 88.8%, still allow OAI-SearchBot. That is a deliberate and useful distinction if your goal is to opt out of training while remaining eligible to be cited in ChatGPT search. The same pattern appears across AI labs. ClaudeBot is explicitly blocked by 10.1% of the 9,037 tools, while Claude-SearchBot is blocked by just 0.1%. Google-Extended is blocked by 9.9%, but its purpose is also distinct from ordinary Google Search crawling. Do not assume a broad-looking rule has the result you want. Check the actual crawler names and decide which capabilities you want to permit. A safe way to review your file Start by opening the public URL: https://your-domain.example/robots.txt Then look for three things: A named crawler group, such as User-agent: GPTBot . A Disallow: / directly inside that group. A wildcard group, User-agent: * , that could affect all crawlers. Our measurement only counts a site as blocking GPTBot when the named GPTBot group itself contains Disallow: / . This matters because ordinary technical exclusions are widespread. Only 31 sites in the 9,037-site sample, or 0.3%, block every crawler outright. Meanwhile, 44% have a path-level Disallow rule in a wildc

2026-09-07 原文 →
AI 资讯

Engineering a Digital Canon: Interactive Taxonomies for Over 40 Classical Zen Texts

Engineering a Digital Canon: Interactive Taxonomies for Over 40 Classical Zen Texts Preserving sacred literature and philosophical treatises online often suffers from poor structure, fragmented PDFs, and broken navigation. To solve this for classical Chan (Zen) Buddhism, we engineered chanzong.space (禅宗知识库) — a performant, open-access knowledge base built with Next.js 14, React 18, and D3.js. Whether you are studying the non-duality of the Platform Sutra or the intricate psychological analysis of Yogacara (唯识) mind theories, navigating multi-layered canonical texts requires modern web tooling. 🏛️ 1. Multi-Dimensional Canon Architecture Unlike a basic eBook reader, chanzong.space treats philosophical literature as a multi-relational graph: Foundational Classics (核心经典) : Platform Sutra (六祖坛经) : The fundamental teaching of direct seeing into one's true nature (自性顿悟). The Blue Cliff Record (碧岩录) : The pinnacle of Song Dynasty Koan commentary. Diamond Sutra (金刚般若波罗蜜经) : The ontological grounding of non-abiding mind (应无所住而生其心). Eight Verses on Eight Consciousnesses (八识规矩颂) : Master Xuanzang's indispensable guide to transforming consciousness into wisdom (转识成智). D3.js Dynamic Knowledge Graph : Spanning 500+ nodes (Patriarchs, Core Doctrines, Cultivation Methods, and Koans). Explore live in your browser: Global Zen Knowledge Topology . ⚡ 2. Technical Stack & Clean Typography To honor the contemplative nature of reading ancient texts, our frontend adheres to the rice-paper aesthetic ( bg-[#FAF9F6] ) paired with dark night sky navigation: Framework : Next.js 14 (App Router) + TypeScript + Tailwind CSS. Fast Search : Instant Ctrl+K global dialog searching across 40+ books, 160+ philosophical concepts, and 200+ koans. Vernacular Modern Commentary : Every chapter is paired with exclusive modern Chinese analysis and keyword glossaries, bridging ancient idioms into practical psychological insights. Offline Reliability : Full PWA Service Worker caching for distraction-free reading

2026-09-07 原文 →
AI 资讯

Building a Zero-Dependency Validation API on Cloudflare Workers

The idea I wanted a small side project that could actually run itself once shipped — no cron jobs to babysit, no upstream API to go down at 3am and take my uptime with it. That constraint led somewhere specific: an API that validates common business data formats — phone numbers, IBAN, VAT/tax IDs, BIC/SWIFT codes, credit card numbers, postal codes — using nothing but offline checksum and format rules. No third-party lookups. No API keys to rotate for an upstream provider. No rate limits inherited from someone else's infrastructure. If it's slow or wrong, it's my bug, not a dependency's outage. The stack Hono on Cloudflare Workers — TypeScript, no cold starts, runs on the free tier comfortably up to 100k requests/day libphonenumber-js , ibantools , jsvat , card-validator — all well-maintained, all pure computation, zero network calls Vitest for tests, run against real fixtures (not made-up test data — every "valid" example in my test suite is a real IBAN/VAT/card number pulled from each library's own published examples, verified against the actual library output before I trusted it) The whole thing is about 300 lines of TypeScript across the router and six validator modules. Small enough to actually reason about, which mattered more to me than feature breadth. app . post ( " /v1/iban/validate " , async ( c ) => { const body = await c . req . json < { iban ?: string } > (). catch (() => null ); if ( ! body ?. iban ) { return c . json ({ error : " missing required field: iban " }, 400 ); } return c . json ( validateIban ( body . iban )); }); The part that actually surprised me I expected the code to be the hard part. It wasn't. Deploying and listing it on RapidAPI was. Two things stood out: CORS mattered even though I "shouldn't" need it. Real production traffic through RapidAPI's gateway is server-to-server — CORS is a browser-enforced concept, so I assumed it was irrelevant. But RapidAPI's own in-dashboard request tester runs as a real browser fetch, and without an O

2026-09-07 原文 →
AI 资讯

I tried removing burned-in text from videos with VideoDetext

A friend of mine works in e-commerce and often needs to reuse or edit videos that already have text or subtitles burned into them. That got me looking into ways to remove text from video without having to edit it frame by frame. I tried a few existing tools and APIs, and eventually found Alibaba's VideoDetext. The results were good enough for the kind of videos I was testing, and running the API directly was relatively inexpensive. The underlying API is fairly developer-oriented, though, so I built a simple web interface around it: Video Text Remover . The current workflow is straightforward: upload a video, let the tool detect the text or select the area you want removed, and process the video. It's definitely not perfect. From my testing, it works much better when the text is over a relatively simple background. When the text overlaps moving objects or detailed backgrounds, the reconstructed area can still look unnatural. I'm also still figuring out what the best approach is for more difficult cases. If you've worked with video inpainting or other text-removal models that handle temporal consistency better, I'd be interested to hear what you've tried. Feedback on the workflow and the output quality would be very useful as well.

2026-09-07 原文 →