标签:#ha
找到 10874 篇相关文章
OpenJDK Interim Policy on Generative AI
Congrats to the DEV Weekend Challenge: Passion Edition Winners!
We are excited to announce the winners of our DEV Weekend Challenge: Passion Edition! The prompt was...
Is Samsung Pioneering Mass Adoption of USDC?
Why Don't People Use Formal Methods? (2019)
Register deprivation: spills and runtime under forced register scarcity
The 300px Canvas Bug That Shrunk My React Image Editor
This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry . Project Overview I am building a browser-based text removal workspace where a user uploads an image, paints over unwanted text or objects, and sends the resulting mask to an image-editing pipeline. The mask editor uses three stacked <canvas> elements: a base canvas for the uploaded image; an overlay canvas for the painted mask; a cursor canvas for the brush preview and pointer events. All three canvases must have identical dimensions. The pointer coordinates must also map back to the same bitmap coordinate system, or the generated mask will not match the part of the image the user selected. Bug Fix On desktop, the editor had plenty of horizontal space but the uploaded image appeared inside a narrow strip surrounded by a large empty area. The result preview used the available width correctly, so the two sides of the same workspace looked unrelated. The visible symptom was a tiny image editor. The actual failure started before the image was drawn. The initialization code measured the width of the canvas wrapper: const container = canvas . parentElement if ( ! container ) return const containerWidth = container . clientWidth || 1 const containerHeight = 600 It then calculated the largest canvas size that would preserve the uploaded image's aspect ratio: const imgAspectRatio = img . width / img . height const containerAspectRatio = containerWidth / containerHeight let canvasWidth : number let canvasHeight : number if ( imgAspectRatio > containerAspectRatio ) { canvasWidth = containerWidth canvasHeight = containerWidth / imgAspectRatio } else { canvasHeight = containerHeight canvasWidth = containerHeight * imgAspectRatio } The aspect-ratio calculation was correct. The measurement it received was not. Root Cause: The Canvas Measured Itself The wrapper was a relatively positioned element with no declared width: < div className = "relative transition-all duration-500 ease-out" style = { {
How Old Is Ann?
What it means for an API to be RESTful
CosmosEscape: Taking over Every Database in Azure Cosmos DB
Steam Client Adds HDR Streaming on Steam Deck OLED, AV1 Video Streaming
How to Catch AI Hallucinations: A Copy-Paste Hallucination Checker Prompt (Tested)
You ask an AI a question. It answers in fluent, confident prose — complete with a study, a percentage, and a name. Some of it is wrong, and nothing about the wording tells you which part. That's the whole problem with hallucinations: the errors wear the same suit as the facts. The fix is not "trust it less" in some vague way. The fix is a repeatable audit step between AI wrote it and I used it . Below is a short hallucination checker prompt you can copy right now, a test run showing what it catches and what slips past it, and an honest account of where a one-liner stops being enough. What counts as an AI hallucination? Not every mistake is a hallucination. A useful working definition: a hallucination is a claim the model states as fact that has no grounding in reality or in your source material. The common shapes: Fabricated citations — a named study, expert, or paper that doesn't exist. Often dressed with a year and an institution. Plausible-but-wrong specifics — dates, version numbers, statistics that are almost right, which makes them worse. Confident category errors — mixing up two similar things (a library and a framework, one company's product and another's). Invented consensus — "experts widely agree that…" with no experts attached. The dangerous ones are the middle two. Obvious nonsense filters itself; a wrong year in a fluent paragraph does not. The copy-paste hallucination checker prompt Here is the short version, free, no strings. It works on ChatGPT, Claude, or any capable model — paste it into a fresh chat, then paste the answer you want audited: Audit the text below for hallucinations. Do not add new information. 1. Extract every factual claim as a separate numbered line. 2. Label each claim: VERIFIABLE (state how to check it), SUSPECT (state what makes it doubtful), or FABRICATION-PATTERN (named source/study/number with no citation). 3. Flag every name, number, date, and citation for manual checking. 4. Finish with the 3 claims most likely to be wrong
How to Earn $10k+/Year from Bug Bounties
How to Earn $10k+/Year from Bug Bounties tags: security, bugbounty, money, hacking How to Earn $10k+/Year from Bug Bounties: A Practical Roadmap You’ve seen the headlines: hackers finding critical flaws in billion-dollar companies and getting paid $50,000 for a single report. It looks like a magic trick, but it’s actually a skill you can build. The truth is, earning $10,000+ per year from bug bounties isn’t about being a genius coder; it’s about being consistent , strategic , and actionable . If you’re willing to treat this like a part-time job rather than a lucky gamble, hitting that $10k mark is a realistic goal within 12–18 months. Let’s cut through the noise and build a roadmap that works in 2026. The Math Behind $10k/Year Before you hunt, understand the numbers. Most beginners expect to find a critical bug worth $10,000 in their first month. That rarely happens. Instead, focus on the volume of valid findings . Low severity bugs : $100–$500 each [5] Medium severity bugs : $500–$2,000 each [5][7] High/Critical bugs : $5,000–$50,000+ [5] To hit $10,000/year , you don’t need a single critical find. You could: Find 20 medium bugs at $500 each Find 10 medium bugs ($500) + 2 critical bugs ($2,500 each) Find 40 low bugs at $250 each The key is consistency . A researcher with one year of focused hunting can realistically earn several thousand dollars annually, potentially matching a part-time income [5]. The ceiling rises steeply as you gain access to private programs , which offer higher payouts and less competition [5]. Build Your Foundation (Weeks 1–4) Don’t jump into hunting yet. You need to understand how the web actually works. Master Web Fundamentals Learn HTTP/HTTPS protocols : request/response structure, headers, cookies, session management [1] Understand client-side tech : HTML, CSS, JavaScript basics [1] Study common vulnerabilities : SQL injection, XSS, IDOR, CSRF, SSRF [1][6] Start with Free Learning Resources HackTheBox Academy (free modules) [1] TryHackMe