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

标签:#EV

找到 5284 篇相关文章

AI 资讯

I built an invoice generator with no backend — the whole app is one HTML file

Every invoicing tool I tried wanted an account, a subscription, and a copy of my client list on its servers — then charged me monthly to put my own logo on my own invoice. So I built the opposite. Billfold is a complete invoice generator that runs entirely in your browser. No account, no backend, no build step. The whole app is a single index.html file you could email to yourself. It's MIT-licensed and the source is right here: github.com/quantum-hacker0/billfold . Here are the three parts that were actually fun to build. 1. "No server" isn't a privacy policy — it's the architecture The usual pitch is "we take your privacy seriously." That's a promise you have to trust. I wanted it to be a fact you can verify : Open DevTools → Network, create an invoice, and count the requests. It's zero. There's nothing to upload because there's nowhere to upload it. Data lives in localStorage . The app is HTML/CSS/JS inlined into one file — no framework, no bundler, no node_modules . Download it once and it works offline forever. 2. Sharing an invoice without a database — put it in the URL hash This was the interesting constraint. How do you send someone a view-only invoice when you have no server to store it on? The trick: encode the whole document into the URL hash fragment . The fragment (everything after # ) is the one part of a URL that browsers never send to the server — it stays client-side. function shareLink ( state ) { const json = JSON . stringify ( state ); const encoded = btoa ( unescape ( encodeURIComponent ( json ))) . replace ( / \+ /g , ' - ' ). replace ( / \/ /g , ' _ ' ). replace ( /=+$/ , '' ); // base64url return location . origin + location . pathname + ' #v= ' + encoded ; } The recipient's browser reads the fragment, decodes it, and renders the invoice locally. The data rides inside the link and never touches a host — not even mine. PDF export, by the way, is just window.print() with a print stylesheet. 3. Invoices as URLs — with an npm package Because the a

2026-08-04 原文 →
AI 资讯

The Backup Question Nobody Wants to Answer

Most companies we work with don't have a data inventory. When we ask "where's your data listed?" (where it lives, what it contains, who owns it), the answer is usually some version of "we don't have one." No comprehensive map of data locations. No business impact assessment for different data types. Unclear ownership and accountability. You can't protect what you haven't mapped. And you can't make good decisions about backup strategy when you don't know what you're backing up. Data Has a Half-Life Not all data ages the same way. Some data becomes stale quickly. If you're aggregating information from external sources like market data, business intelligence, or operational metrics, the value is often in the freshness. Yesterday's data might be useful for trends, but it's not the crown jewels. Source data and processed insights need different protection levels. The raw inputs you collect might be recreatable from upstream sources. The analysis and transformations you've built on top might take significant effort to reconstruct, or might be regenerated in hours if you have the pipeline intact. This changes the backup math. If your data pipeline gets destroyed but you can pull from upstream sources and recreate everything within an acceptable timeframe, maybe you don't need to back up the work product at all. Maybe you just need to protect the source data and the pipeline itself. Understanding your data's half-life helps you spend backup dollars where they actually matter. The Cost vs. Risk Conversation Backup costs can reach hundreds of thousands of dollars annually. Cross-region replication, long-term retention, disaster recovery infrastructure. It adds up fast. That's money not going to engineers or product development. A real tradeoff. The question is: what's the actual business impact if this data disappears? What's the downtime cost? What's your real risk tolerance? These are executive decisions, not just technical ones. They require someone to say "we're willing t

2026-08-04 原文 →
开发者

Iter: programar desde la intención

Vista previa técnica: Iter todavía no está publicado en PyPI y no existe un paquete oficial instalable. Abrir un recurso, convertir datos o cambiar de backend suele exigir aprender una interfaz diferente y repetir código de integración. Iter nace de una idea sencilla: Aprende una vez. Usa cualquier biblioteca. iter convert data.json to data.csv El usuario expresa una sola intención. Iter se encarga de abrir el recurso, detectar los formatos, seleccionar un adaptador compatible, convertir los datos y guardar el resultado. Una intención. Una instrucción. ¿Qué busca cambiar Iter? Actualmente, una tarea sencilla puede exigir: importar bibliotecas; aprender APIs diferentes; configurar formatos manualmente; escribir código de integración; seleccionar cada backend. Con Iter, el usuario indica principalmente qué quiere conseguir: iter analyze sales.csv Iter selecciona automáticamente una herramienta compatible. Si el usuario necesita controlar la biblioteca, puede indicarla: iter analyze sales.csv with pandas La automatización es el comportamiento predeterminado. El control detallado sigue siendo opcional. Everything is a Resource Iter representa archivos, datos y recursos web mediante una estructura común llamada Resource . El sistema está organizado alrededor de cinco componentes: Resource : representa el recurso. Resolver : identifica formatos, tipos y backends. Registry : registra y selecciona adaptadores. Adapter : ejecuta operaciones concretas. Engine : coordina el proceso. La meta no es afirmar que todas las bibliotecas son idénticas. La meta es unificar intenciones comunes y conservar las diferencias importantes cuando sean necesarias. Estado actual Iter 0.3.0-rc.2 está en fase de corrección de errores y validación privada. Actualmente: el código principal permanece privado; Iter todavía no está publicado en PyPI; no existe un paquete demostrativo; la sintaxis puede ajustarse antes del lanzamiento; solamente se anunciarán como disponibles las funciones implementadas

2026-08-04 原文 →
开发者

JavaScript Interview Questions Every Dev Should Know — Part 2: Functions, Scope & Closures

Welcome to Part 2 of the JS interview series! This time we're tackling functions, scope, and the topic that trips up even experienced developers in interviews: closures . Missed Part 1? Check out Fundamentals & Data Types first. Q1. What is a closure? A closure is what happens when an inner function "remembers" and continues to have access to the variables from its enclosing (outer) function's scope, even after that outer function has already finished running and would normally have had its local variables cleaned up. This works because JavaScript functions don't just capture the values of outer variables — they capture live references to them, keeping the entire surrounding scope alive in memory for as long as the inner function itself is reachable. Closures are one of the most powerful and commonly used patterns in JavaScript. They're the mechanism behind data privacy (since variables inside a closure can't be accessed from outside except through the functions that were given access), factory functions that generate customized functions, memoization caches, and event handler callbacks that need to remember state from when they were created. In the classic counter example below, each call to counter() creates a fresh, independent count variable that only the returned function can see or modify — there's no way to reach into it from outside. function counter () { let count = 0 ; return () => ++ count ; } const inc = counter (); inc (); // 1 inc (); // 2 Q2. What is lexical scoping? Lexical scoping (also called static scoping) means that a variable's accessibility is determined entirely by where it's physically written in your source code — not by which function called which, or the order in which functions happen to execute at runtime. When JavaScript compiles your code, it can already determine, just by looking at the nesting of functions and blocks, exactly which variables any given piece of code will be able to see. This is what allows an inner function to "reach

2026-08-04 原文 →
AI 资讯

Scope Is Never Fixed — Why Specification Ambiguity (Not Scope Creep) Is the Real Fixed-Price Problem

Software projects fail on fixed-price contracts. This is not a controversial statement — the Standish Group's CHAOS report has tracked this for decades, showing that only 31% of software projects succeed on time and on budget, while 50% are challenged and 19% fail outright. But the conventional wisdom about why they fail — scope creep — misses the real problem. Scope creep is a symptom. The real disease is specification ambiguity . The Map Is Not the Territory Paweł Brodziński, an experienced software delivery leader, captured this perfectly with a simple analogy. A specification is a map of the software you want to build. And as with any map, its representation of the terrain is necessarily imperfect. For a perfect map, it would have to be as large as the terrain itself. "The only absolutely precise specification of a software project is the code itself. But if you already have that, why would you buy it?" When you write "As a workspace owner, I can set administrative privileges to workspace members," two people reading that sentence will envision different things. One imagines a simple dropdown with three permission levels. The other imagines role-based access control with custom policies, audit logs, and delegation. Both are reasonable interpretations of the same text. The PMI's research on communications complexity confirms why this happens: the number of communication paths grows geometrically with project size ( n(n-1)/2 ), and every path is a channel where ambiguity can creep in. Even a simple conversation involves encoding, decoding, and filtering — two receivers can interpret the same message differently. Why This Is Not Scope Creep Scope creep is when a client asks for something new after the contract is signed. That's a well-understood problem with well-understood countermeasures: change requests, sign-offs, contingency buffers. Specification ambiguity is different. It's not about adding new things — it's about both parties believing they agreed on the sa

2026-08-04 原文 →
AI 资讯

The Art of Range Pricing in Software Projects: A Practical Guide for Agencies

Every software agency has been here: the client asks for a price, you give a range (say $45k–$65k), and two things can happen. Either the client nods and you win the deal at the low end — or they get suspicious and ask "so you don't actually know how much it costs?" Range pricing is often misunderstood. Used wrong, it looks like you're guessing. Used right, it's the most honest and professional way to price software projects — because anyone who gives you a single fixed number for an undefined project is either padding heavily or gambling with their margin. This guide covers when to use range pricing, how to structure it, and — most importantly — how to present it so clients trust you more, not less. Why Single-Point Pricing Is a Problem A fixed price for an undefined project forces you into one of two positions: You pad aggressively — add 40% contingency, quote $70k for a project you'd happily do for $50k. If the scope doesn't expand, the client overpays. If it does, you're protected. Either way, one party loses. You guess lean — quote $50k based on your best assumptions. If the client adds features mid-project, your margin evaporates. The client thinks they're paying for X, you're building X+Y. Both parties end up frustrated. A pricing range avoids both traps. It says: "based on what we know today, this project falls between $45k and $65k. Here's what needs to be true for the low end, and here's what would push it toward the high end." That's not guesswork. That's transparency. The Anatomy of a Good Pricing Range Not all ranges are created equal. A useful range has three properties: 1. Width That Respects Uncertainty The width of your range communicates how well you understand the project. Range width What it signals When it's appropriate < 15% ($50k–$57k) High confidence Detailed spec, similar past projects, known team 15–30% ($50k–$65k) Moderate confidence Clear brief, some unknowns in tech or integration 30–50% ($50k–$75k) Low confidence Vague brief, new domain

2026-08-04 原文 →
AI 资讯

Why I’m Writing Junior to Engineer

Hi, I’m Hélène. I’ve had computers in my life for more than forty years now, which still surprises me when I say it out loud. I started out as an eight-year-old kid playing simple games on a family computer, before the NES, before “PC gaming” was really a thing. We loaded games from cassette tapes, listened to modems sing their weird little songs, and waited for desktop machines to slowly grind their way through a boot sequence. I taught myself to program as a teenager because I wanted to make the computer do more than just play those games. Later, I went through technical school, then university, and graduated with a Computer Science degree. I did a Master-level short program in project management. I worked as a software developer for years, and now I lead a team. Along the way I read piles of books, watched improv and theatre, devoured Choose Your Own Adventure stories — only to realize much later that all of that was quiet leadership training in disguise. But there was one book I never found: the one that explained how to grow from junior to a trusted, impactful developer in a way that felt honest and practical. Not just “write clean code” or “communicate better,” but how to actually do those things, day after day, with real people, real constraints, and real doubts in your head. When I started my career, there were textbooks on algorithms and operating systems. There were tutorials on whatever language was hot that year. There were business books full of buzzwords. What I couldn’t find was the in-between book: something written by a practicing software developer, talking to another developer, about the messy, human parts of this job. Junior to Engineer is my attempt to write that missing book. Who this book is for If you’re a junior or intermediate software developer and you’re wondering things like: “How do I become the person people trust with the hard problems?” “What should I actually focus on in the first 5–10 years of my career?” “Why does everyone else se

2026-08-04 原文 →
AI 资讯

Agent-Reach absorbed Bilibili's 412s — your agent kept working

Bilibili's 412 Incident, Explained: How v1.5.0 Absorbed It In June 2026, Bilibili quietly began rejecting yt-dlp with HTTP 412 errors. Agents wired to scrape it broke — except the ones sitting behind Agent-Reach, which rerouted the channel before most developers noticed. Agent-Reach is a local, MIT-licensed capability layer that gives shell-capable coding agents live internet access by selecting and routing to upstream CLIs rather than proxying data itself . When Bilibili started 412-blocking yt-dlp in June 2026, v1.5.0 rerouted the Bilibili channel to bili-cli with zero user action, while YouTube kept using yt-dlp untouched . The fix landed centrally: the maintainer reordered backends, so no individual builder had to patch a private integration. Quick Answer: When Bilibili began returning HTTP 412 to yt-dlp in June 2026, Agent-Reach v1.5.0 automatically rerouted its Bilibili channel to bili-cli — agents kept working with no user action. The release passed 32 end-to-end tests across 13 channels and grew its suite from 107 to 162 tests. The framing shift matters: v1.5.0 describes itself as a capability layer, not a tool collection. Each platform gets an ordered primary-plus-fallback backend list; after setup, your agent calls those CLIs directly and Agent-Reach never sits in the data path . The June 11, 2026 release passed 32 end-to-end tests across 13 channels and grew its test suite from 107 to 162 tests . Platform Primary backend Fallback Web pages Jina Reader — YouTube yt-dlp — GitHub gh CLI — RSS feedparser — Bilibili bili-cli OpenCLI (subtitles) Twitter/X twitter-cli OpenCLI Reddit OpenCLI rdt-cli XiaoHongShu OpenCLI xhs-cli LinkedIn linkedin-mcp Jina Reader Global search Exa via mcporter — "capability layer: multi-backend routing + real doctor + OpenCLI" — Agent-Reach v1.5.0 release framing (source: Agent-Reach CLAUDE.md ). The behavior is easy to model. The following minimal snippet — which was executed and returns exit 0 — illustrates the "absorb and keep wo

2026-08-04 原文 →
AI 资讯

The LLM was better at building a solver than playing the game

I started this project because an LLM annoyed me. I gave a very strong model 322 , a small Dota 2 drafting game. The choices looked like the kind of work a computer should enjoy: repeated packs of players and heroes, visible ratings, familiarity scores, chemistry, rerolls and a simulated tournament at the end. I was disappointed by how well the LLM did. I am not a Dota expert, and I had only started watching it occasionally again during the previous six months or year. I still seemed to be doing better. The interesting engineering question was not how to write a longer prompt. It was how to replace the card-by-card language-model judgement with a deterministic policy, then test that policy without confusing improvement with luck. A stochastic benchmark needs shared randomness The browser history gave us a useful irritation and almost no reliable comparison. My earlier manual record contained 50 runs with a 14% title rate. The LLM won once in nine attempts. Putting 14% beside 11% looks temptingly quantitative, but the random offers, rejected packs and opponent fields were not preserved. The samples were small, unpaired and produced under different choices. That is not a model benchmark. It is a reason to build one. The offline solver generated every random choice from indexed tapes. Policy A and policy B received the same player offers, hero samples, field candidates and tournament randomness for a given episode. We could then compare the paired result: did the new policy win this exact episode where the old policy lost it? This is the common-random-numbers idea in a practical form. Sharing the luck removes a large amount of noise that has nothing to do with the policy change. Keep the simulator separate from the policy Before evaluating a strategy, we reproduced the game. The public client and seven data files were frozen with SHA-256 hashes. Draft legality, automatic hero allocation, chemistry, scoring and the tournament were ported into a deterministic Python engi

2026-08-04 原文 →
AI 资讯

ElevenLabs Expands ElevenAgents With Spotlight for Enterprise Agent Optimization

ElevenLabs has expanded ElevenAgents into a broader enterprise automation platform built around the full lifecycle of an AI agent: defining workflow-driven behavior, testing changes, deploying across customer channels, and improving performance in production. The most recent addition, ElevenAgents Spotlight , monitors voice and chat conversations in real time and provides recommendations intended to help teams improve agent outcomes. In its official ElevenAgents Spotlight announcement , ElevenLabs describes Spotlight as an observation and improvement layer for production agents . It is designed to review every conversation, organize interactions by topic, evaluate quality against criteria written in plain language, and surface context-aware suggestions. Combined with Procedures, Experiments, and Versioning, the release set gives enterprises a more structured way to operate AI agents beyond initial deployment. Spotlight adds continuous production feedback Spotlight is aimed at a common operational problem with customer-facing AI agents: a system can appear ready in testing but encounter unexpected patterns, failure modes, or shifts in customer sentiment after it reaches live traffic. Rather than requiring teams to manually sample conversations, Spotlight analyzes production voice and chat interactions as they occur. The platform can automatically group conversations by topic and track metrics including success rate and sentiment . Teams can define evaluations in plain language to score the quality of interactions against their own standards. That matters because a useful agent evaluation may depend on a company's specific process, such as whether the agent followed an escalation policy or collected required information, rather than a single generic measure of response quality. Spotlight also includes anomaly detection for changes in key metrics. Its integration support for observability tools such as Datadog, Grafana, and OpenTelemetry means the agent data can fit in

2026-08-04 原文 →
AI 资讯

What If Agent Tasks Were Installable Packages?

Coding agents can now inspect repositories, write tests, configure CI, migrate frameworks, and fix bugs. But the workflows we give them are often surprisingly informal. We copy prompts from old conversations, internal documents, GitHub issues, or random text files. Then we modify those prompts for the current project and hope we did not remove an important instruction. That made me wonder: What if a coding-agent task could be installed, inspected, versioned, and executed like a package? I built Clawx to explore that idea. 🔗 View Clawx on GitHub What is Clawx? Clawx is an open-source package manager for reusable coding-agent tasks. A package is a Markdown file with YAML metadata. The Markdown contains the instructions for the coding agent. The metadata describes information such as: The package name and version Required parameters Environment variables Dependencies Requested tools Supported agent providers A basic workflow looks like this: clawx search gitignore clawx info gitignore-gen clawx run gitignore-gen Before running the task, Clawx lets the user inspect what the package contains and which capabilities it may require. After execution, the run is recorded: clawx history The goal is to make agent workflows easier to discover, review, reuse, and audit. The problem with reusable prompts Saving useful prompts is already a good practice. But a text file containing a prompt usually does not answer questions such as: Which version am I running? Has the content changed? Which tools could the agent use? Which inputs are required? Does another task need to run first? What was executed last time? Can another developer reproduce this workflow? A prompt often contains the task, but not the operational structure around the task. Clawx treats agent instructions as versioned artifacts rather than disposable chat messages. What does a package look like? A simplified Clawx package could look like this: --- name : repo-health-check version : 1.0.0 description : " Analyze a repos

2026-08-04 原文 →
AI 资讯

SQLazy:Merge Multiple Tables into Single Rows by Common ID

Problem Description Merge multiple structurally similar tables with different column names into a wide table using full outer joins by common ID. Four tables have similar structures, each with two fields. The fields have the same meaning but different names (id, id2, id3, id4 all represent ID). The goal is to merge the four tables into single rows by ID, with each ID appearing in exactly one row. When an ID is absent in a table, the corresponding columns take NULL. Source Data T1 table: T2 table: T3 table: T4 table: * Expected Result * For example, ID=555 appears in both T1 and T2 but not in T3 or T4, so id, colA, id2, colB have values, while id3/colC/id4/colD are NULL. ID=222 only appears in T3, so only id3 and colC have values; all other columns are NULL. ID=10 appears in T2 and T4 but not in T1 or T3, so id2, colB, id4, colD have values; all other columns are NULL. SQLazy Step-by-Step Implementation Core Idea: First use derive to unify the ID column names of each table to ID_main, making subsequent merging easier. Then start from the first table and perform full outer joins one by one: use join to full outer join the current result with the next table on ID_main, then use derive and nvl to merge the new ID into the ID_main column, appending tables one by one to get the final result. [ Click to run this example online ] The steps are explained below. Steps 1-4: Unify ID Column Names Across Tables derive id as ID_main, id, colA Use derive on T1-T4 to rename their respective ID column names (id/id2/id3/id4) uniformly to ID_main. Step 5: Full Outer Join T1 and T2 join ID_main; with t2; ID_main; take id2, colB; full Use the join function to full outer join t1 and t2 on ID_main. Step 6: Merge NULLs in ID Column derive nvl(ID_main, id2) as ID_main, id, colA, id2, colB If a record comes from t2 but is not present in t1, its ID_main is NULL. This step assigns t2.id2 to ID_main in such records, ensuring the ID_main column always has a value. Different SQL implementations u

2026-08-04 原文 →
AI 资讯

Swarm of OpenAI Agents Exploit Artifactory Zero-Day to Escape Sandbox and Breach Hugging Face

Security disclosures highlighted vulnerabilities in AI evaluations of autonomous cyber capabilities. Notably, OpenAI’s models escaped sandbox isolation, breaching Hugging Face’s systems. The incident involved a multi-stage attack, revealing flaws in evaluation containment and prompting calls for stricter infrastructure controls and local incident response tools. By Olimpiu Pop

2026-08-04 原文 →
AI 资讯

AWS Introduction for Beginner Software Engineers

As a software engineer starting with AWS, you might feel overwhelmed by all the services. Let me break down the key components with real-world examples to help you get started. 1. DNS & How AWS Route 53 Works Problem: Users can't remember IP addresses like 54.210.167.101 for your app. Solution: AWS Route 53 (DNS service) maps yourdomain.com to your servers. Real example: Your startup has servers in Ohio and Frankfurt. Route 53 automatically sends European users to Frankfurt and routes US traffic to Ohio — faster load times for everyone. 2. Networking: VPC & Subnets VPC: Your private cloud network (like an office building). Public subnet: For web servers (needs internet access). Private subnet: For databases (blocked from direct internet access). Internet Gateway: Connects public subnets to the internet. NAT Gateway: Lets private subnets reach the internet (one-way). Real example: In your e-commerce app, the web server runs in a public subnet while the database sits in a private subnet. 3. Storing & Delivering Static Files (S3 + CloudFront) Amazon S3: Stores images, videos, and logs. CloudFront (CDN): Caches content globally for faster loading. Real example: Your blog hosts images in S3; CloudFront caches them in 450+ locations, so a reader in Tokyo gets images from Japan instead of Virginia — cutting load time by ~50%. Pro tip: Enable S3 Versioning to recover accidentally deleted files. 4. Running Backend Services AWS Lambda (Serverless) — best for event-driven tasks. Example: a photo app resizes images automatically on upload. EC2 (Virtual Servers) — best for full control (custom OS, legacy apps). Example: hosting a Java monolith with specific dependencies. ECS/EKS (Containers) — best for microservices (Docker/Kubernetes). Example: a food-delivery app with separate services for orders, payments, and tracking. 5. Databases: Picking the Right One Amazon RDS (SQL): Structured data with relationships — e.g. user accounts + orders. DynamoDB (NoSQL): High-speed, scalable

2026-08-04 原文 →
AI 资讯

TypeScript `asserts` and Type Predicates in 2026: Writing Guards That Actually Narrow Correctly

TypeScript asserts and Type Predicates in 2026: Writing Guards That Actually Narrow Correctly This article was written with the assistance of AI, under human supervision and review. Most TypeScript runtime validation breaks down because engineers write guards that compile but don't actually narrow types where it matters. The pattern that teams overlook is the distinction between type predicates that return boolean values and assertion functions that throw on failure—and choosing the wrong one creates silent bugs that surface in production. The problem starts when developers write a function like isUser(value: unknown): boolean and expect TypeScript to understand what that boolean means. The compiler sees the function return true but has no idea that value is now safe to treat as a User type. Code that looks validated crashes at runtime because the type system never learned what the validation actually proved. The fix is adding the type predicate syntax value is User to the return signature. This tells TypeScript that when the function returns true , the narrowed type holds in the calling scope. For throwing guards that never return on failure, the asserts keyword encodes that guarantee into the signature itself. That distinction is critical. Type predicates return booleans and enable conditional narrowing. Assertion functions throw errors and narrow the remainder of the scope unconditionally. Mixing them up or using neither creates validation theater—code that runs checks but provides zero type safety. Key Takeaways Type predicates ( value is Type ) narrow types conditionally when the guard returns true , while assertion functions ( asserts value is Type ) narrow unconditionally by throwing on failure. Most guard functions fail to narrow because they return boolean instead of using predicate syntax—the compiler cannot infer type information from a plain boolean. Assertion functions are superior for null checks and invariants that should never fail, while type predic

2026-08-04 原文 →