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

今日精选

HOT

最新资讯

共 37044 篇
第 1718/1853 页
AI 资讯 Dev.to

The Bolted Flange Joint: Why the Bolts Carry Far More Than the Pressure

A flanged pipe joint looks simple: two raised faces, a gasket between them, a ring of bolts pulling them together. Yet the gasketed bolted flange is one of the most common sources of leaks in process plants, and the reason is almost always the same — the bolts were not tightened to the right load. Too little and the joint weeps; too much and the gasket is crushed. The number that sits between those failures is the bolt preload, and it is not the same as the pressure load. This article explains how a bolted flange actually carries internal pressure, why the bolts must be preloaded well above the pressure end force, works a concrete example, and lists the mistakes that turn a sound joint into a leaking one. Why this calculation matters Bolted flange joints appear wherever a pipe or vessel has to be opened for maintenance: pump connections, valve bodies, heat exchanger shells, instrument tappings, and reactor manways. Unlike a welded joint, a flange is meant to be taken apart and reassembled, and every reassembly depends on the fitter applying the correct bolt load. The stakes are real. A leaking flange on a hazardous service can release flammable or toxic fluid. Even a benign leak wastes product and forces an unplanned shutdown. Design codes such as ASME Section VIII Appendix 2 set out a full method for sizing flange bolts, and at its heart is a comparison: the load the bolts can supply versus the load the joint demands in two distinct conditions — seating the gasket, and holding pressure. Understand the pressure end force and you understand the floor that the bolt load must clear. The core method When the line is pressurised, internal pressure acts on the fluid inside the flange and pushes the two flanges apart. The total separating force is the hydrostatic end force , the pressure acting over the area enclosed by the gasket sealing circle: H = p * (pi / 4) * G^2 Here p is the internal pressure and G is the gasket reaction (sealing) diameter — the effective circle on

NovaSolver 2026-06-01 08:17 10 原文
AI 资讯 Dev.to

SDXL Turbo for Pinterest at Scale: How I Cut NSFW False-Positives by 73% and Dodged Style-Copyright Strikes (Python + diffusers)

⚠️ この記事はアフィリエイト広告(プロモーション)を含みます。リンク先で発生した収益の一部が運営者に支払われますが、読者の購入価格には一切影響ありません。 By the end of this article you'll have two runnable Python scripts: a CLIP-based pre-filter that re-checks SDXL Turbo output before it ever hits Pinterest, and a prompt sanitizer that strips artist names + trademarked characters so you don't eat a DMCA. I ran this pipeline for 41 days, generated 6,180 images, and went from a 9.7% Pinterest rejection rate down to 2.6%. Here's exactly what broke and what fixed it. Why SDXL Turbo (1-step, ~0.3s on a 4090) beats SD 1.5 for Pinterest volume First, the conclusion: if you're mass-producing pins, SDXL Turbo's single-step guidance_scale=0.0 generation is the only thing that makes the unit economics work. On my RTX 4090 I clock 0.31s per 512x512 image with Turbo vs 4.8s for a 30-step SDXL base run. That's 15x. Over 6,180 images that's the difference between 32 minutes and 8.2 hours of GPU time. But Turbo has a nasty side effect nobody warns you about: because it's distilled and runs at low resolution by default, its built-in StableDiffusionXLPipeline safety checker (when enabled) throws far more false positives on perfectly benign images — beaches, lingerie-free fashion flatlays, even close-up food. In my first 600-image batch, 58 images came back as black squares from the NSFW checker. 51 of them were photos of latte art and knitted sweaters . So I ripped out the default checker and built my own two-stage gate. Stage 1: Replacing the diffusers safety_checker with a tunable CLIP gate in Python The default safety_checker in diffusers is a binary black box — you get a black image and zero signal about why . For a production loop you need a confidence score so you can set your own threshold. I use OpenCLIP's ViT-B-32 to score each output against a small set of NSFW concept prompts, then compare to a safe-concept baseline. This code actually runs (tested on diffusers==0.27.2 , open_clip_torch==2.24.0 ): import torch import open_clip from PIL import Ima

スシロー 2026-06-01 08:08 11 原文
AI 资讯 Dev.to

5 Anthropic Prompt Caching Patterns That Cut My API Bill 70%

System-prompt caching alone cut repeat-call costs by half Tool definitions cache separately, perfect for agent loops Conversation history caching pays off after turn three 1-hour TTL beats the default 5 minutes for batch jobs My Anthropic API bill dropped 70 percent last month and I did not change a single model. I changed where the cache breakpoints went. Here are the five patterns I now use on every Claude integration I ship. Pattern 1: Cache The System Prompt First The system prompt is the cheapest win and most people skip it. My agents run with a 4,000 token system prompt that explains the role, the output format, the safety rules, and a few examples. That prompt never changes inside a session. Before caching, I paid full input price for those 4,000 tokens on every single call. With an agent that loops 30 times to finish a task, that is 120,000 tokens of pure repetition. The fix is one parameter. I add a cache_control block with type: "ephemeral" to the last content item in the system prompt array. The first call writes the cache and costs slightly more (cache writes carry a small premium). Every call after that reads the cache at roughly one tenth the input price. Here is the rule I follow: the cached block has to be at least 1,024 tokens for Claude Sonnet, or it gets ignored silently. My 4,000 token prompt clears that easily. If your system prompt is short, this pattern does nothing, so do not bother adding the breakpoint to a 200 token instruction. The order matters more than people expect. The cache works as a prefix. Everything before the breakpoint gets stored. Everything after it is read fresh. So I put the stable stuff (role, rules, examples) up top and the volatile stuff (user query, current date) down below the breakpoint. Reorder this wrong and your cache hit rate collapses because the prefix changes on every call. One real number from my logs: a document-classification job that runs 2,000 times a day. The system prompt is 3,800 tokens. Caching it sav

RAXXO Studios 2026-06-01 08:07 9 原文
AI 资讯 Dev.to

Which AI should you choose in 2026? Claude, Perplexity, Gemini, or ChatGPT

Claude Code — My daily dev tool Claude Code by Anthropic is the one I use the most for development, by far. What sets it apart from the others: it integrates directly into the terminal and editor, it can read and modify files, navigate an entire codebase, and understand the global context of the project. Not just responding to a copy-pasted snippet in a chat window. In practice, when I have an idea, I ask it to structure the project and challenge my choices. And to be clear: I challenge it too. 😄 I sometimes disagree with its suggestions, and that's often where the conversation becomes interesting. It's a tool, not an oracle. Perplexity — My reference for research Perplexity is my main tool when I need a reliable and verifiable answer. It's a response engine that systematically cites its sources — you ask a question, it answers with excerpts from real web pages and direct links. No more hallucinations without references. However, I use it almost exclusively on desktop. On smartphone, it's flooded with messages pushing the paid version. Understandable from their side, but frankly annoying when you just want to do a quick search. 🙄 Gemini — For those in the Google ecosystem Gemini is Google's AI, and its main advantage is integration with Gmail, Docs, Drive, Sheets, and Google Search. I have a Google Pixel, and on that side, it does integrate very well with its own ecosystem. It's practical for analyzing documents or getting a quick summary without leaving the interface. That said, in terms of responses, it sometimes falters. 😬 Not systematically, but regularly enough that I stay on guard. And if privacy is a priority for you, it's worth thinking twice before entrusting it with your documents — I talk about this in my article on securing yourself on the Internet . ChatGPT — The natural entry point ChatGPT by OpenAI is the most known and most versatile AI. Writing, code, analysis, translation, summary, creativity... it does a bit of everything, often very well. The fre

Thomas Bnt 2026-06-01 08:07 9 原文
开发者 Dev.to

PostgreSQL 0A000 오류 원인과 해결 방법 완벽 가이드

0A000 feature not supported 는? PostgreSQL 에러 코드 0A000 은 현재 사용하려는 기능이 PostgreSQL에서 지원되지 않거나, 특정 컨텍스트에서는 사용할 수 없음을 의미합니다. 주로 트랜잭션 내부에서 허용되지 않는 명령을 실행하거나, 해당 버전의 PostgreSQL에서 아직 구현되지 않은 SQL 표준 문법을 사용할 때, 또는 복제(Replication) 환경의 제약으로 인해 발생합니다. 실무에서는 특히 CREATE DATABASE , VACUUM , CLUSTER 같은 명령을 트랜잭션 블록 안에서 실행하거나, Logical Replication 슬롯과 관련된 작업을 수행할 때 자주 마주치는 에러입니다. 주요 발생 원인 1. 트랜잭션 블록 내에서 허용되지 않는 DDL 명령 실행 PostgreSQL은 일부 DDL 명령을 트랜잭션 블록( BEGIN ... COMMIT ) 내에서 실행하는 것을 허용하지 않습니다. CREATE DATABASE , DROP DATABASE , CREATE TABLESPACE , DROP TABLESPACE , VACUUM , CLUSTER 등의 명령은 트랜잭션 컨텍스트 밖에서 단독으로 실행되어야 하며, 이를 무시하고 트랜잭션 내부에서 호출하면 0A000 에러가 발생합니다. 2. 특정 PostgreSQL 버전에서 지원하지 않는 문법 또는 기능 사용 SQL 표준에는 정의되어 있지만 PostgreSQL의 해당 버전에서 아직 구현되지 않은 기능을 사용할 때 이 에러가 발생합니다. 예를 들어, 구버전 PostgreSQL에서 LATERAL JOIN , MERGE 문, GENERATED ALWAYS AS (expression) STORED 컬럼 정의 등을 사용하거나, 특정 윈도우 함수 옵션 조합을 사용하는 경우 해당 에러를 만날 수 있습니다. 3. 논리 복제(Logical Replication) 또는 스트리밍 복제 환경에서의 제약 위반 Standby 서버나 Logical Replication 구독자(Subscriber) 측에서 쓰기 작업이나 특정 관리 명령을 실행하려 할 때 0A000 에러가 발생합니다. Hot Standby 상태의 서버에서 DDL을 실행하거나, Logical Replication 슬롯이 활성화된 상태에서 지원되지 않는 방식으로 복제 슬롯을 조작하려는 경우 이 에러를 마주치게 됩니다. 해결 방법 원인 1: 트랜잭션 블록 내 허용되지 않는 DDL 실행 트랜잭션 블록을 제거하고 해당 명령을 단독으로 실행하는 것이 핵심입니다. 아래는 잘못된 예제와 올바른 예제를 비교한 것입니다. ❌ 잘못된 예 (0A000 에러 발생) BEGIN ; CREATE DATABASE myapp_db WITH OWNER = myapp_user ENCODING = 'UTF8' LC_COLLATE = 'ko_KR.UTF-8' LC_CTYPE = 'ko_KR.UTF-8' ; COMMIT ; -- ERROR: 0A000: CREATE DATABASE cannot run inside a transaction block ✅ 올바른 예 (트랜잭션 블록 밖에서 실행) -- 트랜잭션 블록 없이 단독 실행 CREATE DATABASE myapp_db WITH OWNER = myapp_user ENCODING = 'UTF8' LC_COLLATE = 'ko_KR.UTF-8' LC_CTYPE = 'ko_KR.UTF-8' ; VACUUM 명령도 동일한 원칙이 적용됩니다. -- ❌ 잘못된 예 BEGIN ; VACUUM ANALYZE public . orders ; COMMIT ; -- ✅ 올바른 예: 트랜잭션 밖에서 단독 실행 VACUUM ANALYZE public . orders ; -- ✅ 특정 테이블만 선택적으로 VACUUM VACUUM ( VERBOSE , ANALYZE ) public . orders ; 애플리케이션 코드(예: Python psycopg2)에서 자동 커밋을 끈 상태로 VACUUM을 호출하는 경우도 흔한 실수입니다. import psycopg2 conn = psycopg2 . conn

umzzil nng 2026-06-01 08:02 12 原文
AI 资讯 Dev.to

public-apis: what 438k stars actually buy you, and what they don't

Repository: public-apis/public-apis What public-apis actually is public-apis is a community-curated directory of free and public APIs, maintained by contributors together with staff at APILayer. It is not a library, SDK, or gateway: there is no package to import and nothing to run in production. The repository is essentially one very large, structured README that catalogs APIs across roughly fifty categories, from Animals and Anime to Finance, Machine Learning, Security, and Weather. Each entry is a row in a table with five columns: the API, a short description, the authentication model ( apiKey , OAuth , or none), whether it serves over HTTPS, and whether it sets permissive CORS headers. That last detail is the part most engineers undervalue. Why engineers keep coming back to it The star count, now past 438,000, is less interesting than the metadata discipline. When you are prototyping and need a currency-exchange or geocoding endpoint, the Auth/HTTPS/CORS columns let you filter candidates before you ever open a browser tab. "No auth, HTTPS yes, CORS yes" tells you that you can call the endpoint directly from a front-end spike without standing up a proxy or registering for a key. For throwaway demos, hackathons, internal tools, and teaching material, that triage saves real time. The category index doubles as a map of what kinds of public data are actually available, which helps when you are scoping whether an idea is even feasible. How it is maintained Curation is manual and community-driven: changes arrive as pull requests against the README, governed by a contributing guide, with issues and PRs as the moderation surface. The project's primary language is Python, reflecting validation tooling that checks entries rather than any runtime you would consume. There is also a separate companion project that exposes the list itself as an API. The model is simple and has clearly scaled, but "manually curated" is both the strength and the weakness. Limitations worth statin

Reno Lu 2026-06-01 08:02 7 原文
AI 资讯 Reddit r/artificial

[ Removed by Reddit ]

[ Removed by Reddit on account of violating the content policy . ] submitted by /u/Street-Gate7322 [link] [留言]

/u/Street-Gate7322 2026-06-01 08:02 5 原文
AI 资讯 The Verge AI

AMD’s new pitch: our old tech is so good you should just keep using it

Computex 2026 is underway in Taiwan, and we're expecting all manner of flashy computers with jaw-dropping pricetags (or no pricetags at all) as the entire industry navigates RAMageddon. But for desktop PC gamers, AMD has a different pitch. It's relaunching three old components alongside a big new promise: you won't need to buy a new […]

Sean Hollister 2026-06-01 08:00 12 原文
开发者 Reddit r/webdev

Best way to build android app without learning java?

So i've been putting off this project for months but i really need to bu͏ild android a͏pp for this side business idea i have. Problem is i don't know java and honestly don't have time to learn it properly right now. I've heard there are ways to build apps without actually coding everything from scratch but not sure what's legit vs what's just marketing bs. I can handle basic web stuff but mobile development seems like a whole different beast. Anyone here successfully built an android app without going the traditional java route? What tools or platforms actually work and don't make your app look like garbage? submitted by /u/Significant_Law5994 [link] [留言]

/u/Significant_Law5994 2026-06-01 07:35 5 原文
AI 资讯 Reddit r/webdev

unpopular opinion: most ecommerce companies don't need headless or composable

If you're a fashion or DTC brand doing under €50M GMV, you'll get more out of a monolithic platform than a composable build, because the complexity tax for that flexibility runs higher than a year of performance marketing for most brands at that tier. Composable was sold as freedom, but for most brands at small-to-mid GMV it lands as engineering-org overhead you fund forever just to keep the lights on, while monolithic platforms ship 80% of what most brands need with one team and one contract. The exception is brands running multi-brand groups across countries or genuine enterprise peaks, where composable does pay off, but you want the platforms built by retailers rather than the ones built for analyst slides. Centra, NewStore, and SCAYLE land closer to that brief than commercetools or open-source MACH stacks. If a vendor opens their pitch with microservices and best-of-breed architecture, they're selling you an engineering project, and most brands just need a platform that ships things. submitted by /u/Majestic_Shoulder188 [link] [留言]

/u/Majestic_Shoulder188 2026-06-01 07:34 5 原文
产品设计 Product Hunt

Skylive

Never miss a celestial event, anywhere on Earth Discussion | Link

Samuel Angel Gallo Ocampo 2026-06-01 07:30 4 原文
AI 资讯 Product Hunt

CartAI

The AI agent that handles checkout. Discussion | Link

Rohan Chaubey 2026-06-01 07:18 1 原文
AI 资讯 The Verge AI

The QD-OLED gaming monitor that started it all got a big upgrade

Alienware is taking to this year's Computex 2026 in Taipei to announce some cool gaming monitors, most notably two exciting OLED options that are coming at different points this year. First off, the company is debuting the successor to its very first QD-OLED gaming monitor from 2022 with a refreshed design and high-end specs that's […]

Cameron Faulkner 2026-06-01 07:00 12 原文