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

标签:#an

找到 2759 篇相关文章

开发者

A Practical Guide to React Performance

React is fast by default, until it isn't. The good news is that the vast majority of real-world performance issues trace back to a small set of patterns. Fix those, and you rarely need exotic optimizations. Measure before you optimize The first rule of performance work is to never guess. Use the React Profiler and the browser's performance panel to find what actually renders, and how often. Premature optimization Wrapping every component in memo and every value in useMemo adds complexity and can make things slower. Optimize the hot paths you have measured, not the ones you imagine. Avoid unnecessary re-renders A re-render isn't inherently bad, but cascading re-renders of expensive subtrees are. The most common culprit is passing a freshly-created object or function on every render. `// ❌ A new array + handler every render breaks memoized children function ProductList({ products }) { return ( - p.inStock)} onSelect={(id) => track(id)} /> ); } // ✅ Stabilize derived data and callbacks function ProductList({ products }) { const inStock = useMemo( () => products.filter((p) => p.inStock), [products], ); const handleSelect = useCallback((id) => track(id), []); return ; } ` Memoize the right things React.memo , useMemo and useCallback are tools for keeping referential identity stable across renders. Reach for them when: a child component is expensive to render, and it receives props that would otherwise change identity every render. Better still, let the React Compiler handle memoization for you. Adding it is a single dependency: npm install babel-plugin-react-compiler Ship less JavaScript The fastest code is the code you never send. Code-splitting and lazy loading keep the initial bundle small. `import { lazy, Suspense } from 'react'; const Editor = lazy(() => import('./Editor')); export function Panel() { return ( }> ); } ` Move work to the server With React Server Components, data fetching and heavy rendering can happen on the server, shipping only the resulting HTML an

2026-08-28 原文 →
开发者

Next.js SEO: An App Router Playbook That Ranks

Next.js gives you almost everything you need to rank well out of the box, and most teams still ship sites that Google struggles to read. The framework is not the problem. The problem is that SEO gets treated as a final checkbox instead of an architectural decision, so metadata ends up scattered, content renders on the client, and the structured data never gets written. The App Router changed how all of this works. The generateMetadata function, file-based conventions for sitemap.ts and robots.ts , and Server Components as the default each remove a class of SEO bug that used to be common in the Pages Router. But they only help if you use them deliberately. This is the playbook we follow when we build a Next.js site that has to rank, the same approach behind this site. It is opinionated and concrete: where to put metadata, which files to ship, how to handle structured data and multiple languages, and why Core Web Vitals is an SEO feature rather than a performance afterthought. None of it requires a plugin. Render on the server so Google sees real HTML The single biggest SEO win in Next.js is also the easiest to get wrong: make sure your indexable content is in the HTML on the first byte. Googlebot will execute JavaScript, but it does so on a delay and with no guarantees. Content that depends on a client-side fetch can be missed, indexed late, or indexed empty. Server Components are the default in the App Router, so this is mostly about not opting out. Keep 'use client' at the leaves of your tree, on the button that needs an onClick , not on the page that holds your copy. Fetch your data in the Server Component and pass the rendered result down. If you can view the page source and read your headline and body text without JavaScript, you are in good shape. Master the Metadata API instead of next/head In the App Router you never touch next/head . Every route exports either a static metadata object or a dynamic generateMetadata function, and Next.js merges and d

2026-08-28 原文 →
AI 资讯

Migrating to Next.js 16: A Practical Upgrade Guide

Next.js 16 is the biggest release since the App Router landed, and the upgrade is not a one-line bump. The caching model changed shape, params and searchParams are now promises everywhere, Turbopack runs your builds by default, and middleware.ts is on its way out in favour of proxy.ts . None of that is hard on its own. The trouble is that the changes touch almost every dynamic route in a real app at once, so a rushed upgrade tends to fail in a dozen small places rather than one obvious one. We run this site on Next.js 16, and we have moved client projects across the same gap. The pattern that works is boring and reliable: read the codemod output, fix the async APIs first, decide your caching strategy deliberately instead of letting the old implicit behaviour leak back in, then clean up the renamed files. This guide walks through that order, with the specific gotchas that cost the most time. If you are still on Next.js 13 or 14, the same steps apply, you just have more of them to work through. Run the codemod, then read what it could not fix Start with the official upgrade command. It pulls the right versions of next , react , and react-dom , and runs the codemods that handle the mechanical rewrites for you. npx @next/codemod@latest upgrade latest The codemod is good, but it is not magic. It will happily wrap your params access in await where the shape is obvious, and skip anything indirect, a params object passed into a helper, destructured two functions deep, or read inside a generateMetadata you wrote by hand. Treat the codemod as the first 80%, not the finish line. Once it has run, do a clean install and a type check before you touch anything else. With typescript.ignoreBuildErrors set, as it is on many projects, the build will not catch these for you, so run the type checker yourself. rm -rf node_modules .next && npm install && npx tsc --noEmit The errors that come back are your real to-do list. Most of them will be the async API change, which is the next sectio

2026-08-28 原文 →
AI 资讯

What is an AI Agent Phone?

An AI agent phone is a real, or cloud-hosted, smartphone that an LLM-powered agent can operate on its own. It sees the screen, taps, swipes, types, opens apps, and completes multi-step tasks the same way a person would. Instead of calling an API, the agent uses the phone directly, the same Instagram, banking, or delivery app you'd use, driven by a model instead of a thumb. The phrase gets used two ways in 2026. Some products sell phone numbers for AI agents, voice and SMS. That's not this. Here, an AI agent phone means the device itself as something an agent controls, a full Android or iOS handset that becomes an autonomous actor. If you've heard the pitch give your AI agent a phone, this is it. Why a phone, not a browser? Most agent tooling lives in the browser, or in desktop computer use. That misses where people actually are. The world is mobile-first, and a huge share of real workflows are app-only, ride-hailing, food delivery, mobile banking, two-factor prompts, creator tools, regional super-apps. A browser agent can't install an APK, respond to a push notification, read an SMS one-time code, use the camera, or drive a native app that never ships a web build. A phone can. And there's a second reason: fidelity. When an agent operates the same app a customer uses, you're automating the real thing, not a mock, not some undocumented internal endpoint that breaks next release. How it works A mobile AI agent runs a perception-decision-action (PDA) loop against the device. The agent builds its understanding from two sources. First, the accessibility tree, the structured hierarchy of on-screen elements the OS exposes for screen readers, which gives precise, machine-readable targets. Second, vision, a screenshot passed to a multimodal model for anything the tree misses, canvas UIs, games, custom widgets. Together, the tree gives coordinates and vision gives context. The agent gets a goal in natural language, reasons about the current screen, picks the next action, and e

2026-08-28 原文 →
AI 资讯

A TEMP Distribution Setup for My Ripper App

I’ve been working on a desktop utility called Ripper, a Python + CustomTkinter app that downloads video and audio from supported sites (starting with YouTube). The app itself has been a bit rough to build and maintain — but distributing it has been the annoying part. GitHub won’t host my repository, let alone the EXE, due to there size and I don’t want to rely on sketchy file hosts or temporary mirrors. So I finally figured out a temporary setup that’s stable and easy for users to follow. This post explains the distribution workflow and why I’m using it. Why I’m Using this Approach The EXE and source code are too large to push to GitHub, even when the ffmpeg EXE is zipped, and one of my main goals is that I don't want the user to have to hassle with getting ffmpeg. So, I set up a public Google Drive folder where users can get the zipped EXE file and use the app right away. But I want to emphasize that there’s nothing malicious. Google Drive Hosts the EXE Google Drive ended up being the simplest reliable host. It gives me: A clean public link No ads No expiration No weird redirects Instant updates when I replace the file Here’s the current download link: Download Ripper (Google Drive) https://drive.google.com/file/d/1w6rMgCAcSEteAssXIGJmYHrtyPHY99tC/view This is the only official download source. GitHub Pages Hosts Everything Else Since GitHub Pages can host static content, I built a simple project page that contains: https://codebunny20.github.io/ The official download link Feature list Tech stack Build instructions Planned features Version notes Development updates This page is now the “home base” for Ripper. Any time I push a new version, I update the Google Drive file and update the GitHub Pages site with the new version info. It keeps everything centralized without relying on GitHub Releases. Why This Setup Works Better It’s not fancy — but it’s reliable. I can update the EXE instantly I can update the GitHub Pages site just as fast Users always have one clean,

2026-08-28 原文 →
AI 资讯

XAIDA Uses AI to Explain Extreme Weather, Not Deliver a Business Forecast API

The EU-funded XAIDA project is using artificial intelligence to help researchers detect, analyze and attribute extreme weather events, including heatwaves, in a changing climate. Its work matters because better understanding of the link between climate change and individual extremes can support more informed decisions over time. But XAIDA is not launching a consumer weather app, a commercial forecasting service, or a ready-to-integrate API for businesses. XAIDA, short for eXtreme events: Artificial Intelligence for Detection and Attribution , began in 2021 under the EU's Horizon 2020 programme. The project brings together European research groups working on data-driven methods for extreme-weather science. Its official tools overview describes a collection of AI-enabled capabilities designed to support science, policy and decision-making. That distinction is important. A weather forecast estimates likely conditions at a particular place and time. XAIDA's work is focused more broadly on detecting extreme phenomena, examining their characteristics and quantifying the influence of climate change. These are related to prediction, but they are not the same as publishing a daily operational forecast for a business location. What XAIDA is building XAIDA's public materials describe the Artificial Intelligence for Disentangling Extremes , or AIDE, toolbox alongside related AI-based methods. The project also refers to stochastic weather generation and other analytical approaches. Together, these tools are intended to help researchers investigate complex extreme events and their climate context. The project has used AI techniques, including variational autoencoders, in case studies and research outputs concerning heatwaves and other extremes. A variational autoencoder is a machine-learning approach that can learn patterns in complex data and generate statistically plausible variations. In this context, such methods can help researchers examine how extreme events relate to under

2026-08-28 原文 →
产品设计

Article: Post-Quantum Cryptography in Spring Boot: Four Patterns You Can Ship This Sprint

There are four patterns that bring PQC into a Spring Boot fleet: encrypting payloads between services, locking down database fields, signing documents that need to hold up for decades, and moving service tokens off RS256. Along the way, we discuss why Harvest Now, Decrypt Later is already happening, and why none of this is production-safe until KMS or Vault is in place. By Pankaj Sharma

2026-08-28 原文 →
AI 资讯

Il rischio reale dell'AI enterprise non sono gli agenti autonomi. È la complessità tra di loro

Il rischio reale dell'AI enterprise non sono gli agenti autonomi. È la complessità tra di loro. Executive Briefing — Settembre 2026 Quando le aziende deployano fleet di agenti AI invece di sistemi singoli, il pericolo vero non è un agente che si mette a fare il matto da solo. È la complessità emergente delle loro interazioni: una ragnatela di chiamate a cascata, permessi dimenticati e gap di accountability che nessuna checklist può chiudere. 1. Il problema che nessuno vede arrivare Le aziende non deployano un agente e lo guardano girare. Deployano fleet: bot di supporto, agenti di retrieval, layer di orchestrazione, ognuno che chiama API, delega ad altri agenti, si infila in sistemi che non erano stati progettati per decisioni automatiche. Lo scenario che dovrebbe farvi perdere il sonno non è un singolo agente che combina un guaio. È cento agenti che fanno esattamente quello per cui sono stati costruiti, tutti insieme, in combinazioni che nessuno ha disegnato. La complessità non cresce linearmente col numero di agenti. Aggiungi un secondo agente e aggiungi una connessione. Aggiungi il decimo e potenzialmente aggiungi decine di connessioni, perché ora qualsiasi agente può chiamarne un altro, e ogni chiamata può scatenarne una terza altrove. Un ticket di supporto che prima toccava un solo sistema oggi può passare attraverso quattro agenti prima che un essere umano lo veda. E ogni passaggio è un punto decisionale non approvato. La maggior parte dei programmi AI enterprise si blocca quando gli umani responsabili perdono il filo. Chiedete a un team security quali agenti possono raggiungere quali sistemi, e otterrete silenzio. Chiedete quale agente ha triggered quale downstream action tre salti fa. Ancora silenzio. 2. Perché le checklist non funzionano L'istinto è trattarlo come compliance: approva l'agente, registralo, passa oltre. Ma una checklist valuta un singolo punto nel tempo. La complessità corre lungo una catena, e non puoi governare una catena con una pila di ap

2026-08-28 原文 →
AI 资讯

Enterprise AI's real risk isn't autonomous agents. It's the complexity between them

Enterprise AI's real risk isn't autonomous agents. It's the complexity between them. Executive Briefing — September 2026 When enterprises deploy fleets of AI agents instead of single systems, the real danger is not a rogue agent. It is the emergent complexity of their interactions — a web of cascading calls, forgotten permissions, and accountability gaps that no checklist can fix. 1. The problem nobody sees coming Enterprises do not deploy one agent and watch it run. They deploy fleets: support bots, retrieval agents, orchestration layers, each calling APIs, delegating to other agents, reaching into systems that were never designed for machine decision-makers. The failure mode that should keep you up at night is not a single agent doing something bad. It is a hundred agents doing exactly what they were built to do, all at once, in combinations nobody designed for. Complexity does not grow linearly with agent count. Add a second agent and you add one connection. Add a tenth and you potentially add dozens, because any agent might call any other, and each call can trigger another somewhere else. A support ticket that used to touch one system might now pass through four agents before a human ever sees it. Every handoff is an undocumented decision point. Most enterprise AI programs stall when the humans responsible lose the thread. Ask a security team which agents can reach which systems, and you get silence. Ask which agent triggered which downstream action three hops ago. More silence. 2. Why checklists fail The instinct is to treat this like a compliance checklist. Approve the agent. Log the agent. Move on. But a checklist checks a single point in time. Complexity runs across a chain, and you cannot govern a chain with a stack of one-time approvals any more than you can call a diet successful because you had a vegetable once. Two failure modes dominate. Permissions creep. Somebody builds an agent to summarize support tickets and grants it broad API access because scop

2026-08-28 原文 →
AI 资讯

Your Free AI Server Has a Ceiling. Measure It in 30 Minutes Before the Team Does

Tuesday, 10:47 AM. Fourteen developers open their IDE extensions at once, and the shared AI server starts returning timeouts. Nobody planned for the morning spike. The free tier was announced on Monday, the team adopted it by Tuesday, and the first capacity incident happened before lunch. This article is a 30-minute load-test workflow for teams that just received access to a free hosted AI server. The goal is not to benchmark model quality. The goal is to find the concurrency ceiling before your team does — the hard way. The Free Server Is a Shared Resource Now MonkeyCode is an open-source AI coding project that offers free models and a free server. The offer is attractive for the same reason it is dangerous: it removes the two usual adoption barriers — API billing and self-hosting operations — and turns the server into a shared team resource overnight. Disclosure: This article was prepared as part of MonkeyCode's product outreach. A shared resource without a measured ceiling behaves like a shared database without connection pooling. It works in the demo, degrades under load, and fails at the worst possible moment: the morning standup, the release freeze, the day before the demo. The failure mode is not what most teams expect. It is not the token quota. It is latency collapse. Requests queue, timeouts cascade, and the IDE extension retries, which adds more load. The server does not die; it just becomes unusable. The Math: Little's Law for AI Requests Before writing any test code, define the model. Little's Law states that the average number of requests in a system equals the arrival rate multiplied by the average service time: L = λ × W L — average requests in the system (concurrency) λ — arrival rate, requests per second W — average service time per request, in seconds For an AI server, W is dominated by model inference time. A single code-generation request can take 10 to 40 seconds on a shared free server, depending on the model and the prompt length. That change

2026-08-28 原文 →