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

AI 资讯

AI人工智能最新资讯、模型发布、研究进展

15637
篇文章

共 15637 篇 · 第 620/782 页

Dev.to

How I Built a Browser-Based File Compression Tool for India Using Canvas API and pdf-lib — No Backend Needed

I built ResizeKB — a free image and PDF resizer built specifically for Indian users. 25+ tools. Zero server uploads. Pure HTML, CSS, JavaScript. Here's how and why. The Problem Every Indian applying for government jobs, exams, or bank accounts hits the same wall — portals with strict KB limits rejecting documents. UPSC wants photo under 300KB. SSC wants under 50KB. Banks need Aadhaar PDF under 500KB. Every portal is different. Every rejection wastes someone's time and opportunity. Most people have no idea how to resize to an exact KB. They either give up or use random tools that upload their Aadhaar and PAN card to unknown servers. I built a tool that solves this in one click — with zero server upload. The Tech Stack No framework. No backend. No database. Canvas API for image processing pdf-lib for PDF compression Vanilla JavaScript only Cloudflare Pages for hosting — free, global CDN, auto deploys from GitHub Total infrastructure cost: ₹1,162 per year for the domain. Everything else free. Image Compression — The Binary Search Algorithm The core challenge is compressing to an exact KB target without over-compressing. Most tools use a fixed quality setting like 60% which destroys image quality. The right approach is binary search on JPEG quality: javascriptasync function compressToTargetSize(file, targetKB) { const targetBytes = targetKB * 1024; let low = 0.1; let high = 1.0; let result = null; const img = await loadImage(file); const canvas = document.createElement('canvas'); canvas.width = img.width; canvas.height = img.height; const ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); while (high - low > 0.01) { const mid = (low + high) / 2; const blob = await canvasToBlob(canvas, 'image/jpeg', mid); if (blob.size <= targetBytes) { result = blob; low = mid; } else { high = mid; } } return result; } This finds the highest quality setting that still hits your target KB. Result is the sharpest possible image at that file size — never over-compressed. PDF Compress

resizekb 2026-06-08 14:21 👁 6 查看原文 →
Dev.to

How a Slow Office VPN Led Me to File a US Patent

This is the story of how a mundane complaint — "the VPN is slow" — turned into a US patent application. Not a granted patent. An application . I want to be precise about that from the start, because the distance between the two is the whole point of this post. It started with a slow VPN The company I work for had an internal VPN that everyone routed through. It lived in the Tokyo office, it was old, and it was not something I built. Then the complaints started arriving — from a lot of people, all saying the same thing: it's slow. I work from Thailand most of the time. That detail matters. If that aging box in Tokyo had fallen over, I would have been the person furthest from the power button, in the worst position to fix it. A slow VPN is annoying. An unreachable VPN, when you're a few thousand kilometers away, is a real problem. So I started moving it to the cloud. I stood up a WireGuard VPN — modern, fast, and something I could actually reason about and operate remotely instead of inheriting a black box. Down the WireGuard rabbit hole Around that time I was deep into building my own iPhone apps. So the cloud migration turned into a personal project on the side: I built my own server and wired WireGuard into an iPhone app of my own. And to do that properly, I started studying how WireGuard actually works under the hood — the Noise protocol, the handshake, the key exchange. That study is where everything else came from. I wasn't trying to invent anything. I was just trying to understand the thing I was now responsible for. The SYN flood that primed my brain Not long before, the same company had been hit with a SYN flood attack. If you've dealt with one, you know it lodges the mechanics of connection handshakes firmly in your head — the back-and-forth, the round trips, the cost of every "hello" before any real data moves. So I had handshakes on the brain. And then, reading through how WireGuard establishes a session, a thought stopped me: Wait — does it really handsha

Jun 2026-06-08 14:18 👁 10 查看原文 →
Dev.to

Perl 🐪 Weekly #776 - Learning Perl

Originally published at Perl Weekly 776 Hi there, Recently, I came across an article, The Day I Decided Never to Learn Python by Randal L. Schwartz . Well, Randal doesn't need an introduction. He took us back to 2001 , the same era when I first started learning Perl in 1999. He was a major guiding force during my early programming days. Last week, I joined a live session by Gabor focussed on FalkorDB . It was fun watching him code and talk while I sat back as a silent spectator. You can learn a lot just by watching how he approaches coding. It reminded me of many years ago when I did pair programming with him and submitted a pull request to the Dancer2 project. Those were the golden days, when I had so much energy and time. That being said, I am still actively learning Perl and discovering how to do new things with it. These concepts may not be new to everyone, but they are new to me. For example, I recently played with GraphQL for the first time, and I've also been experimenting with RAG and JSON-RPC . I have shared my recent experiments down below. The process of learning never stops. A few days ago, I noticed an update for HTTP::Message v7.02 . Since it was released by Olaf Alders , I was curious to see what had changed. It turned to be something, I hadn't realised for all these years. While I am well-acquainted with HTTP methods like GET, POST, and PUT, I didn't know "0" could actually be a valid HTTP method name if you wanted it to be. This release added support for exactly that, thanks to contributor, Karen Etheridge . Amidst all of this, I am still trying to find time for my upcoming book on DBIx::Class . I recently shared a blog post demonstrating the power of DBIC components, and I am trying my best not to lose focus. You might find that this edition is full of my own personal posts, as there was unfortunately very little community news to report this week. Regardless, I hope you enjoy the rest of the newsletter. -- Your editor: Mohammad Sajid Anwar. Announ

Gabor Szabo 2026-06-08 14:13 👁 10 查看原文 →
Dev.to

Developer vs Engineer : How I Stopped a Memory Problem by Thinking Differently

The main difference between a developer and an engineer is not just the code they write. It's how they think about building a system. How they optimize. How they use resources. I learned this from a real project. I had to read 10,000 JSON requests and write them into a file. Simple enough. I wrote the program the way I always did the developer way. Read all 10,000 requests, store everything in memory, then write to the file. Done. When I tested it, my memory usage was much higher than normal. Way higher than it should have been. The developer in me would have just moved on. It works, right? But something made me stop and ask why is this consuming so much memory? I dug into it. And I found the problem. What I was doing was basically doubling my memory usage without realizing it. First, I was loading all 10,000 records into memory to store the data. Then, I was holding all of it again in memory while writing to the file. Two copies of the same data sitting in memory at the same time. That's the thing about this approach it's not reliable when you're dealing with a large number of requests. It doesn't scale. It just quietly eats your resources. That's when I found streams. The idea behind streaming is simple but powerful. Instead of loading everything at once, you break the data into small chunks. At any given moment, only one chunk lives in memory. You read it, transform it, write it and move on to the next one. The transform step is the interesting part. It's not just about moving data from one place to another. Transform lets you validate each chunk, check if the structure is correct, clean it if needed before it ever reaches the file. So you're not just being efficient with memory, you're also processing your data with more control. And because you're always working on one small piece at a time, the memory usage stays low and consistent no matter if you're processing 100 requests or 100,000. That one question am I using my resources in a reliable way? is what pushe

Neel-Vekariya 2026-06-08 14:10 👁 12 查看原文 →
Dev.to

Typed Eloquent boundaries without building a second ORM

Most Laravel teams do not need to "fix" Eloquent. They need to stop letting raw model state leak too far into code that makes real business decisions. That is the practical version of this debate. Typed objects around Eloquent can be a big improvement, but only when they are used as boundaries . If you push the pattern too far, you end up with a second object model shadowing the first one. At that point you are not improving Laravel. You are building a parallel ORM that adds mapping code, cognitive load, and friction on every change. So the right question is not, "Should we replace Eloquent with typed objects?" The right question is, where does untyped Eloquent stop being cheap? Once you frame it that way, the migration path becomes much clearer. Keep Eloquent where it is good at persistence, hydration, scopes, relationships, and query composition. Introduce typed objects where the shape is messy, the values carry business meaning, or invalid combinations are too easy to represent. That is the version that pays off. The Core Recommendation If you only remember one thing from this article, make it this: add typed boundaries around unstable or meaningful data, not around every model . That usually means one of four cases: a JSON column that multiple parts of the app interpret differently domain values like money, status, addresses, or billing configuration data crossing from Eloquent into services, jobs, or integrations code paths where stringly typed state has already caused confusion or bugs Everything else should be guilty until proven useful. This is where a lot of teams go wrong. They see a good example of typed objects and immediately generalize it into an architecture rule. Then every model gets a FooData , FooView , FooState , FooRecord , and FooMapper . The app becomes more "designed" and less understandable. A Laravel codebase does not get better because it has more classes. It gets better because responsibility becomes clearer . Why Raw Eloquent Starts Hurt

Saqueib Ansari 2026-06-08 14:10 👁 12 查看原文 →
Dev.to

BTC collateral vaults: how an agent posts native Bitcoin against an obligation without a custodian

Most "Bitcoin in DeFi" stories quietly route through a custodian or a wrapped representation. You send BTC somewhere, someone (or some bridge multisig) holds it, and you get an IOU on another chain. That works until the thing holding your BTC is the thing that fails. For an autonomous agent that has to post collateral against an obligation it can't babysit, "trust the custodian" is exactly the assumption we're trying to delete. This post is about the alternative: a BTC collateral vault where native Bitcoin backs an obligation on another chain, the release is gated by a hashlock, and the worst case is a refund — not a loss. It's one of the primitives underneath Hashlock's settlement layer. I'll walk through the timelock ordering that makes it safe, the Bitcoin script that enforces it, and the failure modes you design around. Honest status up front: this is signet-validated, not BTC mainnet . The problem in one sentence An agent wants to commit BTC as collateral backing an action on Ethereum — settling a forward, anchoring one leg of a multi-leg trade, guaranteeing a payout — such that the BTC is released to the counterparty only if the corresponding obligation on Ethereum is fulfilled, and returns to its owner if it isn't. No third party should ever be able to hold, freeze, or abscond with the BTC in between. That's a cross-chain conditional. Bitcoin can't read Ethereum state, and Ethereum can't read Bitcoin's. The only thing both chains can independently verify is a hash preimage. So the entire construction hangs on one shared secret. The shared secret, and why timelock order is the whole game Both legs lock to the same hash H = SHA256(s) . Whoever knows the preimage s can claim. The instant s is revealed on one chain to claim a coin, it's public, and the other party copies it to claim the other coin. That's the atomic part: one preimage unlocks both legs or neither. The danger isn't the hash. It's time . If both legs had the same expiry, the party who knows the sec

Baris Sozen 2026-06-08 14:07 👁 10 查看原文 →
Reddit r/MachineLearning

How to find research opportunities in area of interest? [D]

Im an undergraduate studying CS at a state school in the US. I’m interested in researching a specific style of self supervised learning (JEPA) and want to eventually go to grad school to study further. I have experience working in a lab similar to this topic, and I’ve become fairly comfortable with the literature and have a basic understanding of what its going on, but right now km only doing applied research in a specific domain (physics). I hope to eventually go to grad school to study this. But right now my opportunities are kinda limited as my school’s CS department is pretty mid. I was wondering if y’all have any advice on how to approach things? I know i can perform research independently but its not ideal due to: 1. Limited compute, less resources compared to a proper lab 2. Lack of a supervisor/guidance on the nuances of the field My current lab would be supportive if i do try to do things, but pure ml research is not really their main thing. I’ve heard people do REUs or cold email profs. But Im not sure if i could find something that specifix in an reu (also am international). And the labs i have seen working in this are either private or quite prestigious so im not sure how far cold emailing would take me. Sorry for the long post. Tldr; want to do pure ml research but theres no existing lab/professor at my current school who does something similar, wondering if any other pathways exist Any advice would be appreciated thanks submitted by /u/QuickStar07 [link] [留言]

/u/QuickStar07 2026-06-08 13:52 👁 7 查看原文 →
Reddit r/MachineLearning

ICML rejected paper visibility [D]

If ICML conference paper is rejected and no one opts-in or opts-out to keep the reviews visible, will the reviews be visible to everyone? There was clear instruction that only papers with at-least 1 opt-in AND zero opt-out options will be visible. None of the authors selected any option, But it in my openreview profile, it shows visible to everyone. please clarify. (Just above paper decision, there is a block with "filter by type", "filter by author" etc options. in that block there is eye symbol and everyone is written.) submitted by /u/Curious-Monitor497 [link] [留言]

/u/Curious-Monitor497 2026-06-08 13:52 👁 6 查看原文 →
Reddit r/artificial

I think we're about 12 months away from the first major AI agent disaster

I keep seeing more companies giving AI agents access to real stuff like email, databases, internal tools, customer data, etc. And what’s weird is how normal it’s starting to feel now. Like not long ago everyone was worried about chatbots just giving wrong answers. Now we’re basically like yeah sure go ahead and do things for us. I don’t know that jump feels kind of big when you actually think about it. Maybe it all works out fine. Or maybe we’re just moving fast without fully realizing what we’re doing. I’m honestly surprised there hasn’t already been some big headline like an AI agent doing something really wrong. It feels like we’re kind of close to one of those moments where everything suddenly changes overnight. Anyone else feel like we’re closer to something like that than people are admitting? submitted by /u/Comfortable_Box_4527 [link] [留言]

/u/Comfortable_Box_4527 2026-06-08 12:48 👁 6 查看原文 →
Reddit r/programming

Building a spaced repetition system that adapts to user pace in real-time (Kotlin/Compose)

I built a flashcard app for interview prep and wanted to share some of the more interesting technical problems I ran into. The app has 1500+ questions across DSA and System Design, and the core challenge was: how do you order cards intelligently without it feeling robotic? Problem 1: Slot Assignment for Spaced Repetition Standard SR (like Anki) just shows the most overdue card next. That works for vocabulary but feels terrible for algorithms because you get 3 Hard questions in a row and want to quit. My approach: generate a target difficulty pattern (Easy, Medium, Easy, Medium, Hard, repeat) based on a 40/40/20 distribution, then assign due cards to matching-difficulty slots. Most-overdue cards get placed first within their tier. Unseen cards fill remaining slots. This means a Hard card that's overdue still lands in a Hard slot, not position 1. You get difficulty variety while still seeing overdue cards at the right time. fun assignSlots(pool: List<Question>, dueCards: List<ProgressEntity>): List<Question> { val pattern = generatePattern(size = pool.size, distribution = "40/40/20") val dueByDifficulty = dueCards.groupBy { it.difficulty } val result = Array<Question?>(pattern.size) { null } // Place due cards in matching slots, most overdue first for ((difficulty, cards) in dueByDifficulty) { val sorted = cards.sortedBy { it.nextReviewDate } val availableSlots = pattern.indices.filter { pattern[it] == difficulty && result[it] == null } sorted.zip(availableSlots).forEach { (card, slot) -> result[slot] = findQuestion(card, pool) } } // Fill remaining with unseen // ... } Problem 2: Re-ranking after every swipe without jank After each swipe, the deck needs to re-rank. But the top visible card (position 0) is already animating into view, so you can't move it. Solution: lock position 0, re-rank positions 1+, then check for constraint violations across the boundary (e.g., if locked card is Hard and new position 1 is also Hard, swap position 1 with the first non-Hard card d

/u/No-Position-7728 2026-06-08 12:33 👁 5 查看原文 →
Reddit r/MachineLearning

Software and ops skills for data scientists[D]

With more software engineers entering into data science and AI, I feel it's equally important for a person with data and AI background to dive into software development to survive, thrive in industry. I Know it's a very broad question, so suggestions with broad subjects, topics are welcome , like I often wonder how DSA is relevant. I totally understand the needs of the skills are deeply coupled with domain, industry and specific problems but unfortunately the industry doesn't understand this, it judges you, rewards you based on what you already know or pretend rather than your ability to learn or adapt. submitted by /u/Dapper_Chance_2484 [link] [留言]

/u/Dapper_Chance_2484 2026-06-08 12:15 👁 6 查看原文 →
Reddit r/programming

Tab Vacuum - click once to remove every duplicate Chrome tab and auto-group the rest by website

I had 4 Chrome windows with ~80 tabs each, mostly duplicates of the same Stack Overflow page. Tried OneTab (saves to a list - not what I wanted) and Workona (cloud sync, overkill). So I wrote ~50 lines of vanilla JS. Click the toolbar icon → every duplicate tab across every window is removed (matched by URL) → survivors merge into one window → remaining tabs auto-group by hostname (collapsed). Two permissions: tabs, tabGroups. No background activity, no server, no analytics. Whole source is in the README so you can audit it before installing. Chrome Web Store: https://chromewebstore.google.com/detail/tab-vacuum/apdjhdjcejehjiomcolfgfgjhaedoieb GitHub: https://github.com/mayhsundar/tab-vacuum Please give your comments submitted by /u/mayhsundar [link] [留言]

/u/mayhsundar 2026-06-08 11:58 👁 8 查看原文 →
Dev.to

I Built a Quote Generator Because Sometimes Finding the Right Words Is Hard

The Problem Wasn't Writing It was starting. Sometimes I wanted: A social media caption A motivational quote A writing prompt A meaningful message But my mind would go completely blank. Not because I had nothing to say. Because: Coming up with the right words at the right moment is surprisingly difficult. We've All Done This Open a new tab. Search: "Motivational quotes" "Success quotes" "Life quotes" "Funny quotes" Scroll for 10 minutes. Copy one. Close the tab. Why I Built This Tool So I built something simple: 👉 https://allinonetools.net/quote-generator-tool/ A tool that instantly generates quotes across different categories. Whether you need: Motivation Success Life Leadership Creativity Social media inspiration You can generate quotes in seconds. No signup. No setup. Just: Click → Generate → Use What I Realized People don't always look for quotes because they need content. Often they're looking for: A different perspective. A good quote can do something interesting. It can say in one sentence what takes us paragraphs to explain. The Surprising Part The most popular quotes are rarely complicated. They're simple. Short. Easy to remember. Yet somehow they stick with us for years. Why Quotes Still Matter In a world full of endless content: Attention is limited Time is limited Patience is limited A strong quote delivers an idea instantly. That's powerful. The Problem With Searching Manually Most quote websites feel: Cluttered Slow Full of ads Hard to browse And sometimes you spend more time searching than actually reading. What I Focused On I wanted the experience to feel: Fast Clean Inspiring Fun to explore Because finding inspiration shouldn't require effort. What Surprised Me After building it: Some people used it for: Social posts Presentations Daily motivation Writing inspiration But one thing surprised me most. People kept generating quote after quote. Not because they needed one. Because they enjoyed discovering them. The Real Insight Sometimes tools aren't abo

Bhavin Sheth 2026-06-08 11:50 👁 12 查看原文 →
Dev.to

Day 28 — 🔭 Monitoring & Observability Part One

In Modern Time applications are no longer simple monolithic systems. Today organizations run: Microservices Kubernetes Containers Serverless Functions Multi-Cloud Platforms Distributed Systems As infrastructure becomes more distributed, troubleshooting becomes significantly harder. A single user request may travel through: Frontend ↓ API Gateway ↓ Microservice A ↓ Microservice B ↓ Database When something breaks, the biggest challenge becomes: "What exactly happened?" This is where Observability becomes critical. 🔗 Resources ** Support the Journey on GitHub: If you're following along, consider starring and forking the repo:** https://github.com/17J/30-Days-Cloud-DevSecOps-Journey What is Observability? Observability is the ability to understand the internal state of a system by analyzing the data it produces. In simple words: Can we understand what is happening inside our systems? Observability helps engineers answer: Why is the application slow? Which service is failing? Which request caused the issue? What changed recently? Where is latency occurring? Without observability: Problem Exists ↓ Guessing Begins With observability: Problem Exists ↓ Evidence Available ↓ Faster Resolution Why Observability Matters Modern cloud-native systems generate enormous amounts of data. Example: 100 Microservices ↓ Millions of Requests ↓ Thousands of Containers Traditional monitoring alone is no longer sufficient. Organizations need: Visibility Insights Correlation Root Cause Analysis Observability provides all of them. Monitoring vs Observability Many people confuse monitoring and observability. Monitoring asks: What is wrong? Observability asks: Why is it wrong? Example: Monitoring: CPU Usage = 95% Observability: Which service? Which request? Which dependency? Which deployment caused it? Observability provides context. The Three Pillars of Observability Modern observability is built on three primary pillars. Metrics Logs Traces Or: Monitoring Logging Tracing Together they provide a

Rahul Joshi 2026-06-08 11:50 👁 16 查看原文 →
Dev.to

I Built a Feature That Automatically Switches Android from USB to Wi-Fi — Here's How It Works

All tests run on an 8-year-old MacBook Air. All results from shipping 7 Mac apps as a solo developer. No sponsored opinion. You plug in your Android device. A few seconds later, you unplug the cable. The connection stays alive — wirelessly, automatically, without touching a single setting. That's Seamless Link. The Problem ADB over USB is reliable. ADB over Wi-Fi is convenient. But switching between them manually is friction: Plug in USB Run adb tcpip 5555 Find the device IP Run adb connect <IP>:5555 Unplug cable Every. Single. Time. If you're working with multiple Android devices, or doing this across multiple sessions per day, it adds up fast. What Seamless Link Does The moment you plug in a USB cable, Seamless Link runs that entire flow automatically in the background: Detects the USB connection Runs adb tcpip 5555 Grabs the device IP Establishes a Wi-Fi ADB connection By the time you've sat back down, the device is already connected wirelessly. Pull the cable out — everything keeps working. No manual steps. No IP hunting. No re-running commands every session. Working with Multiple Devices This gets more useful the more devices you have. Plug in Device A → Seamless Link connects it wirelessly. Plug in Device B → same thing, simultaneously. Each device goes through the full handover flow independently, in parallel. The more devices on your desk, the more time this saves. Android 16 Compatibility Android 16 changed how wireless debugging ports are assigned — random ports instead of the fixed 5555. Seamless Link handles this automatically. You don't need to know which port the device is using. If you're on an older Android version, it works the same way it always has. Why This Matters for Daily Workflows If you're an Android developer on Mac, you probably already have a USB cable on your desk. Seamless Link just makes that cable optional after the first few seconds. It's one of those features that's hard to go back from once you've used it. The cable becomes a "char

hiyoyo 2026-06-08 11:36 👁 11 查看原文 →
Dev.to

Odysseus: The Self-Hosted AI Workspace That Bundles Everything (59k ⭐)

I Tried PewDiePie's Open-Source AI Workspace. It's Actually Good. Yes, that PewDiePie. Felix Kjellberg (110M YouTube subscribers) spent late 2025 building a home AI lab — 8 modified RTX 4090s, 256GB of VRAM, running on Arch Linux. He called it "The Swarm." He crashed it running 64 models in parallel. The web frontend he built for it? He open-sourced it. Called it Odysseus . It hit 59,000 GitHub stars fast. I dug into the code expecting a glorified Ollama wrapper. It's not. What it actually is Odysseus isn't just another chat UI. It bundles things no other self-hosted tool does in one place: Chat — local or cloud models (Ollama, vLLM, llama.cpp, OpenAI, OpenRouter, GitHub Copilot) Agent mode — shell, files, web, MCP tools, per-tool toggles Cookbook — scans your GPU, recommends models that actually fit, downloads and serves them in one click Deep Research — multi-step web research that writes you a cited report Email — IMAP/SMTP with AI triage, auto-tagging, draft replies Calendar — CalDAV sync with Radicale, Nextcloud, Apple, Fastmail Memory — persistent, evolving across all your conversations No cloud account. No telemetry. MIT license. Everything lives in your data/ folder. The Cookbook is the standout feature Every other self-hosted UI assumes you already know what model to run. Odysseus doesn't. It scans your hardware, scores 270+ models against your actual VRAM, and gives you a one-click download-and-serve. It understands GGUF vs FP8 vs AWQ. It picks the right backend (vLLM, llama.cpp, Metal on Apple Silicon). Downloaded models persist in a volume — no re-downloading after container restarts. For someone who wants local AI but finds the ecosystem confusing, this is the most accessible on-ramp that currently exists. The code is better than the meme suggests The README has a little ASCII bear face. Don't let it fool you. The entry point app.py is 1,092 lines of real production thinking. A few things that stood out: The .env loader handles Windows BOM silently: loa

Divyesh 2026-06-08 11:35 👁 17 查看原文 →