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

标签:#p

找到 12345 篇相关文章

开源项目

🔥 tangyoha / telegram_media_downloader - 基于Dineshkarthik的项目, 电报视频下载,电报资源下载,跨平台,支持web查看下载进度 ,支持bot下发指令

GitHub热门项目 | 基于Dineshkarthik的项目, 电报视频下载,电报资源下载,跨平台,支持web查看下载进度 ,支持bot下发指令下载,支持下载已经加入的私有群但是限制下载的资源, telegram media download,Download media files from a telegram conversation/chat/channel up to 2GiB per file | Stars: 5,440 | 7 stars today | 语言: JavaScript

2026-08-02 原文 →
AI 资讯

Is paying artists enough to convince them to embrace AI?

Illustrators have spent years sounding the alarm about generative artificial intelligence startups training their models on artists' work without permission. They've pointed out how the practice is tantamount to theft, and in response, many gen AI boosters have argued that it's necessary for the technology's evolution. This has led to contentious legal battles, but it's […]

2026-08-02 原文 →
AI 资讯

Stratagems #21: The AI Thought P Was Still Alive. P Was Already Gone.

Keep the shell. Preserve the presence. The ally doesn't suspect; the enemy doesn't move. — The 36 Stratagems, Slough off the Cicada's Golden Shell Previously on this series: #19: Mark Found His AI Audit Method in a Training Manual. He Left a Trap in His Report. — P confirmed Mark's report was read from a Singapore IP. A note was left: "Entry's gone. Two weeks. Don't reach out. I'll find you." #20: Alex Felt the AI Collector Slow Down. He Knew Someone Else Had Made a Move. — ACL's processing latency climbed abnormally. Someone had done something in the same time window. Exposed P's monitoring pinged while P was still helping Mark verify an address. Deep night. The screen was the only light in the room. P opened the monitor. The record was waiting: a read from Singapore. Time, method, address, all matching. Mark's bait had been taken. P knew this path. A false lead planted in Mark's report, waiting for this exact day. P double-checked the address: an AWS Elastic IP registered in the Singapore region, same network block. No ambiguity. P sent an encrypted message: "Your report was read. From a Singapore IP." Then P ran the routine check. The environment status list scrolled in the terminal: storage levels, certificate expiry, key rotation dates. P had read these lines a hundred times. Every time, identical. One line was different. P's fingers stopped on the trackpad. The cursor sat on the entry's metadata line. A new tag P had never configured. # Old entry metadata: new entry (not configured by P) status : reclaim_pending source : acl-asset-scanner scanned_at : 02:01:07Z P didn't move. The cursor sat on screen. In the room, only the fan. The fan cycled once. P's fingers lifted off the trackpad, then settled back. The tag was still there. The tag wasn't an alert. Not an error, no explanation. The format matched ACL's automated scan records. P had seen it before, in a data company's audit report last year, in another client's logs the year before. ACL's scanner had swept

2026-08-02 原文 →
AI 资讯

My Comment-Reply Queue Draft One Reply to a Thread and It Went Deaf to Every Follow-Up After That

I have a small script, reply_comments.py , that keeps me from having to re-scan every DEV.to article for new comments by hand. It has two commands: pending (unanswered comments I haven't drafted a reply to yet) and audit (drafted replies I said I'd paste manually but apparently never did). I've already fixed two bugs in this file — one in needs_reply() (a thread stayed "handled" forever after a single reply, even when the other person followed up again) and one in audit() (it only checked direct children, so a reply nested two levels deep was invisible). Today I found a third, in pending() itself, and it's the kind of bug that hides precisely because the first two fixes made everything else in the file look trustworthy. What pending() actually does Comments on DEV.to come back from the API as trees — each top-level comment has a children list, and replies can nest arbitrarily deep. pending() walks each article's top-level comments and decides, for each one, whether it needs a reply: def pending (): try : drafted_text = open ( DRAFTS , encoding = " utf-8 " ). read () except FileNotFoundError : drafted_text = "" drafted_codes = set ( re . findall ( r " ^## (\S+) " , drafted_text , re . M )) out = [] for a in api ( f " /articles?username= { ME } &per_page=100 " ): if not a [ " comments_count " ]: continue for c in api ( f " /comments?a_id= { a [ ' id ' ] } " ): if not needs_reply ( c ): continue if c [ " id_code " ] in drafted_codes : continue out . append ({ " id_code " : c [ " id_code " ], " author " : c [ " user " ][ " username " ], " article " : a [ " title " ], " comment_url " : f " https://dev.to/ { ME } /comment/ { c [ ' id_code ' ] } " , " body " : strip_html ( c [ " body_html " ]), }) return out needs_reply(c) is the fix from a few weeks ago — it recurses the whole subtree and checks who posted the most recent message, not just whether I've ever replied. That part's correct. The bug is in the two lines right after it: c["id_code"] and c["body_html"] . c here i

2026-08-02 原文 →
AI 资讯

This Article describe how u can Add Item in your data base from client

React TypeScript Property Form Validation export interface PropertyForm { propertyTitle : string ; description : string ; amenities : string ; monthlyRent : string ; location : string ; unitsAvailable : string ; applicationDeadline : string ; } export interface PropertyFormErrors { propertyTitle ?: string ; description ?: string ; amenities ?: string ; monthlyRent ?: string ; location ?: string ; unitsAvailable ?: string ; applicationDeadline ?: string ; } export const validatePropertyField = ( name : keyof PropertyForm , value : string ): string => { switch ( name ) { case " propertyTitle " : if ( ! value . trim ()) { return " Property title is required " ; } if ( value . trim (). length < 3 ) { return " Property title must be at least 3 characters " ; } return "" ; case " description " : if ( ! value . trim ()) { return " Description is required " ; } if ( value . trim (). length > 2000 ) { return " Description cannot exceed 2000 characters " ; } return "" ; case " amenities " : if ( ! value . trim ()) { return " Amenities are required " ; } return "" ; case " monthlyRent " : if ( ! value . trim ()) { return " Monthly rent is required " ; } if ( Number ( value ) <= 0 ) { return " Monthly rent must be greater than 0 " ; } return "" ; case " location " : if ( ! value . trim ()) { return " Location is required " ; } return "" ; case " unitsAvailable " : if ( ! value . trim ()) { return " Units available is required " ; } if ( ! Number . isInteger ( Number ( value ))) { return " Units available must be a whole number " ; } if ( Number ( value ) < 1 ) { return " At least 1 unit must be available " ; } return "" ; case " applicationDeadline " : if ( ! value ) { return " Application deadline is required " ; } return "" ; default : return "" ; } }; export const validatePropertyForm = ( formData : PropertyForm ): PropertyFormErrors => { const errors : PropertyFormErrors = {}; Object . entries ( formData ). forEach (([ name , value ]) => { const error = validatePropertyFiel

2026-08-02 原文 →
AI 资讯

What Nobody Tells You About Building "Simple" PDF Tools

PDF merge, split, and compress sound like the most boring possible features to build. Take some files, do an operation, return a file. I believed that too, until real user files started hitting the backend and every one of these tools broke in a different, specific way. Here's what actually went wrong, and what fixed it. The PDF that wasn't actually a PDF The first crash report was a "corrupted file" error on a PDF that opened fine in every desktop viewer. Turns out plenty of real-world PDFs are technically malformed, a missing xref table, a truncated stream, an object reference pointing at nothing but viewers like Chrome and Acrobat are extremely forgiving about it. Most Python PDF libraries are not. try : reader = PdfReader ( file_path , strict = False ) except PdfReadError : # strict=False alone doesn't save you from everything — # some files need the xref table rebuilt from scratch reader = PdfReader ( file_path , strict = False ) reader . _override_encryption = True strict=False fixed maybe 70% of the "corrupted" reports. The rest needed a repair pass first — scanning the raw byte stream for object markers and reconstructing a valid cross-reference table before the normal parser ever touches it. Painful to write, but it turned "please fix your PDF" into "it just works," which matters a lot when the whole pitch of the tool is "no signup, just upload and go." Merging PDFs is not free, memory-wise The naive merge implementation loads every input PDF fully into memory, concatenates pages, writes the output. Fine for two 200KB files. Not fine when someone merges fifteen scanned documents at 40MB each, because now you're holding the equivalent of 600MB of parsed PDF objects in memory at once on a backend container that doesn't have unlimited RAM. The fix was switching to incremental writes process one input file at a time, write its pages to the output stream, then explicitly drop the reference before moving to the next file: writer = PdfWriter () for path in input_p

2026-08-02 原文 →