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

标签:#us

找到 1030 篇相关文章

AI 资讯

SELECT FINAL and OPTIMIZE FINAL Are Not the Same Thing

One thing that confused me when I first started learning ClickHouse was the word FINAL . Because eventually you'll come across both: SELECT * FROM events FINAL ; and: OPTIMIZE TABLE events FINAL ; At first glance, they sound like they should do roughly the same thing. After all, both contain the word FINAL . But they actually solve two completely different problems. One affects query results. The other affects how data is physically stored. Understanding this distinction can save a lot of confusion when working with MergeTree tables. Why This Confusion Happens Most people encounter FINAL while working with engines like: ReplacingMergeTree SummingMergeTree AggregatingMergeTree Sooner or later they notice something like: SELECT * FROM users ; returns duplicate versions of rows. Then they discover: SELECT * FROM users FINAL ; and suddenly the results look correct. Naturally, many people assume: FINAL merges the table. But that's not exactly what is happening. What SELECT FINAL Actually Does When you run: SELECT * FROM users FINAL ; ClickHouse applies merge logic during query execution. Think of it as: "Show me what the table would look like if all relevant merges had already happened." The important part: It only affects the query result. After the query finishes: parts remain unchanged storage remains unchanged nothing is rewritten on disk The merge logic happens temporarily while the query is running. Once the query completes, the table is exactly as it was before. What OPTIMIZE FINAL Actually Does Now let's look at: OPTIMIZE TABLE users FINAL ; This is a completely different operation. Instead of modifying query results, ClickHouse physically merges parts on disk. The operation: rewrites data merges eligible parts removes obsolete versions creates larger merged parts Unlike SELECT FINAL , the effects remain after the command completes. This is a storage operation, not a query operation. The Simplest Way to Remember It Whenever I think about these commands, I use a v

2026-06-13 原文 →
AI 资讯

Is it possible overload a AI as a Service with multiples requests ?

I was thinking about some tests for a service that uses language models; there are several, even prompt injection. A question came to mind: is it possible to make multiple requests asking for any text like Lorem Ipsum, generating many unnecessary tokens and incurring costs? But creating a test where there are multiple accounts making the same request to generate 10,000 Lorem Ipsum tokens simultaneously, could that cause a service outage? Because most of the infrastructure I see doesn't use any queuing method when the chat is free of tasks involving an agent or even heavier functionalities. I didn't actually generate anything, I just wanted to start a discussion on this topic.

2026-06-13 原文 →
AI 资讯

Tauri v2 Cheatsheet — The Commands I Use on Every Project

All tests run on an 8-year-old MacBook Air. All results from shipping 7 Mac apps as a solo developer. No sponsored opinion. After 7 Tauri apps, I type the same commands constantly. Here's the reference I wish existed when I started. Project setup # New project npm create tauri-app@latest # Add to existing project npm install --save-dev @tauri-apps/cli npx tauri init Development # Dev mode (hot reload) npm run tauri dev # Dev with specific log level RUST_LOG = debug npm run tauri dev # Dev with backend logs visible npm run tauri dev 2>&1 | grep -v "^$" Building # Standard build npm run tauri build # Universal binary (Intel + Apple Silicon) npm run tauri build -- --target universal-apple-darwin # Debug build (faster, no optimization) npm run tauri build -- --debug Plugins npm run tauri add global-shortcut npm run tauri add fs npm run tauri add shell npm run tauri add notification This updates both Cargo.toml and the plugin registration. Faster than doing it manually. Permissions (tauri.conf.json) { "app" : { "security" : { "capabilities" : [ { "identifier" : "main-capability" , "description" : "Main window capabilities" , "windows" : [ "main" ], "permissions" : [ "fs:read-all" , "fs:write-all" , "shell:execute" , "global-shortcut:allow-register" ] } ] } } } Tauri v2 requires explicit permission declarations. If a command silently does nothing, check permissions first. Common Rust patterns // Get app data directory let data_dir = app .path () .app_data_dir () .unwrap (); // Emit event to frontend app_handle .emit ( "event-name" , payload ) .ok (); // Get window let window = app .get_webview_window ( "main" ) .unwrap (); // App state app .manage ( MyState :: new ()); let state = app .state :: < MyState > (); Notarization (macOS) # Submit for notarization xcrun notarytool submit app.dmg \ --apple-id YOUR_APPLE_ID \ --team-id YOUR_TEAM_ID \ --password YOUR_APP_PASSWORD \ --wait # Staple after notarization xcrun stapler staple app.dmg Debugging # Check what's in the bundle

2026-06-13 原文 →
AI 资讯

I Turned Off AI Coding Tools for a Week. Here's What I Learned.

I've been writing about AI coding tools for months here on Dev.to. Comparisons, benchmarks, tutorials on how to squeeze the most out of Claude Code, Cursor, and the rest. And I do use them. Every single day. But last week I tried something that surprised even me. I turned them off completely. For an entire week, no AI-generated code, no autocomplete suggestions, no "explain this function" prompts. Just me, my editor, and a blinking cursor. Here's what actually happened. The First Few Days Were Rough Day one was humbling. My output dropped by maybe half. What normally took 15 minutes stretched to 40. I found myself reaching for the Cmd+K shortcut out of muscle memory half a dozen times. But somewhere around day three, something shifted. I started reading source code instead of asking for summaries. I traced through execution paths instead of having the LLM walk me through them. I caught a subtle race condition that Claude Code had confidently dismissed as "not an issue" in the same codebase two weeks prior. That moment stuck with me. The Code Was Cleaner Here's the part I didn't expect. By day five, my code was noticeably simpler. Not because an LLM optimized it, but because I actually understood the problem well enough to keep it simple. AI-generated code often over-engineers. It adds abstractions for scenarios that don't exist. It writes defensive checks for edge cases that don't apply to your use case. It looks professional but carries unnecessary complexity. When you write it yourself, you stop at the simplest working solution because you know when you're done. An LLM doesn't know when you're done. It just keeps going until the context window runs out. The Real Cost of Productivity This is the part I've been thinking about most. AI tools remove friction. That's their superpower. But friction isn't always bad. The struggle of debugging your own code is how you learn a codebase. The effort of designing an API is how you develop taste for what makes a good one. If y

2026-06-13 原文 →
AI 资讯

The world’s first trillionaire is a killer

Elon Musk's SpaceX IPO will probably make him the richest person to ever walk the planet. And while his mountain of horrible personal conduct could fill multiple books, one fact in particular stands out: A year ago, Musk's actions directly led to the deaths of hundreds of thousands of people. He did it knowingly. And, […]

2026-06-13 原文 →