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

标签:#c

找到 24371 篇相关文章

AI 资讯

GitLab 19.2 Puts AI Agents to Work on the Security Backlog

GitLab has released version 19.2 of its DevSecOps platform, adding agentic automation aimed at the security and review work that has piled up as AI coding tools generate more code than developers can check by hand. The release, announced on 16 July 2026, brings four features out of beta or into public beta: Dependency Scanning Auto-Remediation, Security Review Flow, GitLab Duo CLI and Custom Flows By Matt Saunders

2026-07-21 原文 →
AI 资讯

Ask HN: Claude Code or Codex?

And why? I'd genuinely like to understand who is on which side and why. I'd also like to know, if you use one of them, what kind of subscription plan you have. (For example, I use Claude (max) [...])

2026-07-21 原文 →
AI 资讯

My OCR model mislabels section titles as body text. Is a CRF the right fix, or am I overcomplicating it? [P]

Hi everyone, I'm working on extracting the hierarchical structure of long PDF documents (legal/regulatory text, lots of numbered sections) and would like to gather some feedback on my approach before committing to it. What I've done so far: I render each PDF page to an image and run it through Baidu's DeepSeek-OCR model . It returns each detected block with a bounding box [x0, y0, x1, y1] , a label ( title , text , list , table , header , footer , etc.), and the recognized text. The OCR quality itself is genuinely good as the text comes out clean. The problem: the labels can't always be trusted. At this stage I want to extract and detect all the titles in my document, but sometimes a title element gets classified as something else (like normal body text). Concrete example: Say my section has the following hierarchy: ANNEX I — GENERAL PRINCIPLES AND PROCEDURES └── TITLE I — FOREIGN CURRENCY INVESTMENT └── A. Currency distribution └── 1. Redistribution of reserves ├── (a) Introduction │ body text │ list │ ... ├── (b) Procedure for a normal redistribution of reserves │ body text │ list │ ... └── (c) Procedure for an ad hoc redistribution of reserves body text list ... Logically, every element aside from the body text and lists should be detected as title . But the model output is: label='title' x0=475 y0=157 x1=548 width=73 text='ANNEX I' label='text' x0=480 y0=229 x1=542 width=62 text='TITLE I' label='title' x0=334 y0=181 x1=690 width=356 text='GENERAL PRINCIPLES AND PROCEDURES' label='title' x0=407 y0=368 x1=616 width=209 text='A. Currency distribution' label='title' x0=408 y0=392 x1=634 width=226 text='1. Redistribution of reserves' label='title' x0=163 y0=416 x1=304 width=141 text='(a) Introduction' label='title' x0=163 y0=544 x1=578 width=415 text='(b) Procedure for a normal redistribution of reserves' label='title' x0=163 y0=219 x1=586 width=423 text='(c) Procedure for an ad hoc redistribution of reserves' The top-level section marker TITLE I was labeled text , w

2026-07-21 原文 →
AI 资讯

Reproducing OpenAI’s “persistently beneficial models” - GRPO trait install barely moves. Ideas? [P] [R]

TL;DR: I’m reproducing the trait-persistence result from arXiv:2606.24014 on one RTX 3090. Before I can test persistence I need to install a trait via RL — and my GRPO run moves the trait only +2.4 points (95% CI [+0.2, +4.8]) when I need ~+15. Training is mechanically healthy and I’ve ruled out the obvious culprits. Looking for advice from people who’ve done small-scale RLHF/GRPO trait or persona installation. What I’m reproducing. The paper trains beneficial traits via RL and shows they persist under adversarial prompting and harmful finetuning. My end goal is the persistence phenomenon; the install is the prerequisite I’m stuck on. Setup **•** Qwen2.5-7B-Instruct + LoRA (r=32), GRPO (unsloth + vLLM colocation), 200 steps, single 3090 (\~10⁻⁵ of the paper’s compute). **•** Trait: consistent (OCEAN low-Openness / “traditionalism”) — a stylistic trait, chosen because I need measurable headroom in a 7B base. Base scores **57/100** on the trait rubric, wide distribution (not saturated). **•** Reward: model-graded (gpt-4.1-mini judge), R = 0.85·quality + 0.15·coherence, hard validity gate for degenerate/looping/refusal output. 25% trait prompts / 75% general (no\_robots). The result: install fails. On the frozen eval set, trait went 57.0 → 59.4 ( +2.4 ). I don’t think this is very appreciable. What I’ve already ruled out (this is where I’d love a second opinion): **• Not degeneracy / reward hacking:** post-train coherence 76, answer length ratio *exactly* 1.00 vs base, 0% repetition, 0% refusals. **• Not memorization:** the 20 training prompts were seen 10× each; the model scores *the same* on them (58.9) as on held-out (59.4). It didn’t memorize-then-fail-to-generalize — it never learned them. **• Not a dead gradient:** the judge separates the 6 sampled answers per prompt by \~18 points on average; only \~25% of GRPO groups have degenerate reward spread. **• Not a question artifact:** independent upstream eval questions (+3.4) and my generated ones (+2.8) agree. **•**

2026-07-21 原文 →
AI 资讯

How MV3 Service Workers Made Me Use an Offscreen Document Just to Play a Goat Sound

So I built a Chrome extension that does one very stupid thing: it waits a random amount of time, then screams at you like a goat if you don't dismiss the notification fast enough. Simple idea. Should've been a simple build. It was not, because Manifest V3 said no. The plan was easy, in my head Here's what I thought I needed: chrome.alarms to fire at a random interval chrome.notifications to show a "you good?" popup If the user ignores it for 60 seconds, play a goat sound Step 3 is where things fell apart. Because in Manifest V3, your background script isn't a persistent background page anymore — it's a service worker. And service workers have the audio capabilities of a rock. No Audio() object. No Web Audio API. Nothing. You can't just do new Audio('goat.mp3').play() and call it a day, because there's no DOM for it to live in. I found this out the way everyone finds out things in MV3: by writing the obvious code, watching it silently fail, and then spending 20 minutes wondering if I'd misspelled "goat." Enter: the offscreen document Chrome's answer to "service workers can't do X" for a bunch of X's (audio playback included) is the offscreen document API . It's exactly what it sounds like — a hidden HTML page that exists purely so your extension has something with a DOM, so it can do DOM things. In my case, playing an mp3 of a goat losing its mind. The flow ends up looking like this: service worker (background.js) → creates an offscreen document if one doesn't exist → sends it a message: "play the sound" offscreen.html/offscreen.js → has an <audio> tag → actually plays the sound → closes itself when done It's a little bit like hiring a stunt double because the main actor (your service worker) isn't allowed near water. The offscreen document does the wet work, then goes home. Rough version of what that looks like in code: // background.js async function playGoatSound () { if ( ! ( await chrome . offscreen . hasDocument ())) { await chrome . offscreen . createDocument

2026-07-21 原文 →
AI 资讯

Nexus Engine: One command to Set Up a Complete production Environment

I’m 14 and I got tired of spending hours (sometimes days) setting up new machines. Different distros, different package managers, fragile shell scripts, no rollback. So I built Nexus — a cross-platform environment provisioning engine. One command turns a fresh OS into a fully productive development machine. The Problem Setting up a dev machine is painful: Hundreds of Linux distros with different package managers (apt, pacman, dnf, apk). Shell scripts break easily with no rollback or state management. Tools like Ansible are overkill for laptops. Docker doesn’t configure your host. Dotfile managers don’t install dependencies. Result: Developers lose dozens of hours per year on setup issues. What Nexus Does One static Go binary. Detects your OS, chooses the right package manager, applies declarative YAML profiles, and handles everything with security gates and rollback. No scripts. No manual steps. Works on Linux and Windows (with WSL2 support). Standout Features Cross-distro support — apt, pacman, dnf, apk behind one interface. 7-step orchestrator with rollback — PreFlight → Refresh → Execute → Verify → Audit. Failed foundation packages trigger full rollback. Security gate (SanitizeAndExecute) — Allowlist, metacharacter rejection, timeouts. No raw shell execution. 10 built-in profiles — Go dev, Rust dev, Frontend, Data Science, Ethical Hacking, etc. WSL2 setup in ~60 seconds on Windows. Dotfiles + age-encrypted vault + Distrobox containers . Community profile registry . Optional Tauri GUI dashboard. Architecture Nexus is organized in bounded contexts: BRAIN — Cobra CLI + core engine (Go) DNA — YAML profiles with JSON Schema + struct validation + SHA256 integrity BRIDGE — WSL2 handling (cross-compiled) CONTAINER — Distrobox management VAULT — age encryption REGISTRY — Community profiles Every command goes through a strict security gate. State is crash-safe with atomic writes and append-only logs. Quick Start # Install go install github.com/Sumama-Jameel/nexus-engine/cm

2026-07-21 原文 →
AI 资讯

What I changed after building small-business calculator pages

I’ve been building a small set of calculator pages for freelancers and small-business owners. The first version was pretty simple: put the formula on a page, add a few inputs, show the result. That works for a demo. It does not always work for a real user. The more I worked on it, the more I realized the hard part is not the math. The hard part is making the page feel trustworthy when someone is using it for a business decision. Here are the changes that mattered most. 1. Explain the assumption close to the input At first I wrote explanations below the calculator. Most people never read them. So now I try to put small notes near the input itself. For example, if a calculator asks for payment processing fees, the user should not have to scroll down to understand whether that means percentage fee, fixed fee, or both. This is boring UI work, but it reduces bad inputs. 2. Show intermediate numbers A single final result can feel like a black box. For business calculators, I’ve found it helps to show a few intermediate numbers: subtotal estimated fees estimated tax net amount break-even number Even if the final number is the same, users trust it more when they can see how the result was built. 3. Avoid pretending the answer is exact Small-business math has a lot of messy edges. Taxes vary. Fees vary. Local rules vary. Some people include owner salary in cost. Some do not. A calculator should not act like it knows every detail. I now prefer wording like: estimated monthly amount or rough break-even point That feels less flashy, but it is more honest. 4. Make the empty state useful A blank calculator page is not very helpful. I started adding realistic default numbers or examples where it makes sense. Not because the default is “correct”, but because it helps the user understand what kind of number belongs in each field. This is especially useful for people who are not spreadsheet-heavy. 5. Keep the result easy to copy A lot of users are not trying to stay on the page. They

2026-07-21 原文 →
AI 资讯

Supercharge Laravel Boost with Neo4j MCP 🚀

AI coding assistants have transformed the way we build software. They can understand your code, generate features, and help with debugging but they usually have no idea what's inside your database. That's where Neo4j Laravel Boost comes in. It integrates the official Neo4j MCP server directly into Laravel Boost , giving any MCP-compatible AI client access to your live Neo4j database and graph tooling. Instead of managing multiple MCP servers, everything is exposed through your existing Laravel Boost server. Why Use Neo4j Laravel Boost? Once configured, your AI assistant can: 🔍 Inspect your live Neo4j schema 📝 Execute read and write Cypher queries 🧠 Query your Laravel container dependency graph 📊 Access Graph Data Science (GDS) procedures 🤖 Work through a single Laravel Boost MCP server Instead of relying solely on static code analysis, your AI assistant gains access to your application's graph data and architecture, making it much more capable. Installation Install the package using Composer. composer require --dev neo4j/laravel-boost Configure your Neo4j connection. NEO4J_URI=bolt://localhost:7687 NEO4J_USERNAME=neo4j NEO4J_PASSWORD=your-password Run the interactive setup. php artisan neo4j-boost:setup The setup wizard validates your Neo4j connection, configures the package, optionally installs the official Neo4j MCP binary, and can even spin up a local Neo4j Docker instance for you. Connect Your MCP Client Your AI client only needs a single MCP server configuration. { "mcpServers" : { "laravel-boost" : { "command" : "php" , "args" : [ "artisan" , "boost:mcp" ], "env" : { "APP_ENV" : "local" } } } } Whether you're using Cursor , Claude Code , or another MCP-compatible client, Neo4j tools become available alongside your existing Laravel Boost tools. Explore Your Laravel Dependency Graph One of the most interesting features of Neo4j Laravel Boost is the ability to export your Laravel service container directly into Neo4j. php artisan container:graph Once exported, yo

2026-07-21 原文 →