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

标签:#an

找到 1799 篇相关文章

AI 资讯

Building RecipeHub: My Experience Developing and Deploying a Modern Recipe Sharing Platform with Django

As part of my learning journey with Django, I wanted to build a project that would challenge me beyond the basics. I decided to create RecipeHub, a web application where users can create, manage, and share recipes while exploring recipes from other users. The project started from a Django starter template, but I customized it by adding new features, redesigning the interface, and deploying it online. Features RecipeHub allows users to: Register and log in Create, edit, and delete recipes Browse recipes by category Save favourite recipes Upload recipe images Access a personal dashboard Use the application in both light and dark mode The application is fully responsive, making it easy to use on both desktop and mobile devices. Technologies Used I built the project using: Python Django Django Allauth PostgreSQL Tailwind CSS DaisyUI HTMX Vite Gunicorn Render GitHub was used for version control throughout the project. Challenges One of the biggest challenges was deployment. While everything worked locally, deploying to Render required configuring PostgreSQL, environment variables, and static files correctly. I also encountered an issue with uploaded recipe images. Since the application is hosted on Render's free tier, uploaded media is stored on an ephemeral filesystem, meaning uploaded images are lost after redeployment. Learning why this happens gave me a better understanding of the difference between development and production environments. Another challenge was redesigning the dashboards. I wanted them to feel clean and modern instead of looking like a default Django application, so I spent time improving the layout, spacing, and responsiveness. What I Learned This project helped me improve my understanding of: Django project structure Authentication and user management CRUD operations Database relationships Responsive UI design Git and GitHub workflows Deploying Django applications Debugging real-world issues More importantly, it taught me how to troubleshoot proble

2026-07-24 原文 →
AI 资讯

Article: The Self-Building Agent: A LangChain4j Experiment

The article discusses an experiment where a code assistant had to design an agentic system using LangChain4j documentation. The assistant created a coding framework capable of writing, testing, and debugging code autonomously. Results showed that two architectural patterns—supervisor and workflow—offered different trade-offs between flexibility and execution speed during debugging tasks. By Kevin Dubois, Mario Fusco

2026-07-24 原文 →
AI 资讯

We Spent Months Cleaning SEC EDGAR 13F Data So You Don't Have To

The data isn't the hard part. Cleaning it is. SEC EDGAR is public, free, and a mess. Every quarter, 13,000+ institutional investment managers file Form 13F, disclosing their U.S. equity holdings. In theory that's a beautiful dataset — every hedge fund, every pension fund, every bank, all in one place. In practice, the raw filings actively fight you: The same institution files under different names, sometimes even in the same quarter. In our own database right now: BlackRock, Inc. and BlackRock Inc. are two distinct CIK registrations for what most people would call "one" institution. Multiply that across 13,000+ filers and you get a long tail of near-duplicate names that break any naive GROUP BY institution_name . CUSIPs don't map cleanly to tickers. Foreign issuers frequently use CUSIP prefixes that don't resolve through the usual reference data — we ended up building a fallback resolution path (Yahoo Finance lookups plus manual validation rules) just to keep ticker coverage from silently degrading over time. Quarters arrive gradually, not all at once. The SEC gives managers up to 45 days after quarter-end to file. If you naively take "the latest quarter with any data" as your reporting period, you'll rank a barely-started quarter — where only a handful of small filers have reported so far — ahead of the real, complete prior quarter. We learned this the hard way: an unclamped "most recent quarter" query once let 115 newly-onboarded institutions' entire existing portfolios get counted as "new inflow" with nothing to offset them, because a first-time filer has no prior-quarter row to diff against. That's the kind of bug that doesn't throw an error — it just quietly produces a chart that looks plausible and is wrong. Amendments (13F-A) revise, replace, or partially restate earlier filings , and the XML schema itself has shifted over the years, so parsing "just the latest 13F" isn't a fixed target. None of this is exotic — it's the normal cost of working with real-world

2026-07-24 原文 →
AI 资讯

FireViston TV: Android App & Streaming Server for the Living Room

Live Project: tv.cadnative.com What Is FireViston TV? FireViston TV is a full-stack streaming solution designed for the modern living room. It consists of two parts that work in tight coordination: FireViston TV Android App — a native Android/Android TV application that delivers a polished, remote-friendly viewing experience. https://github.com/akshaynikhare/FireVisionIPTV/releases FireViston TV Server — the backend streaming infrastructure that powers content delivery, user management, and playback control hosted at tv.cadnative.com Together, they form a complete, self-contained streaming platform. The Android App Built for the 10-Foot Experience The FireViston Android app is designed for television screens — large fonts, d-pad navigation, and a layout that works from across the room. No pinching, no scrolling hunts, no mobile-style UI crammed onto a 55-inch display. Smooth Playback Video streaming requires more than just playing a file. FireViston handles adaptive bitrate streaming, buffer management, and codec compatibility to ensure smooth playback across the broadest range of Android TV devices — from budget sticks to high-end smart TVs. Content Discovery A clean, browsable content grid lets users find what they want quickly. Categories, search, and a "continue watching" row reduce friction from intent to playback. The Server Backend Reliable Infrastructure The FireViston server at tv.cadnative.com manages content ingestion, transcoding pipelines, and delivery. It's built to handle concurrent streams without degrading quality for any individual viewer. API-Driven Architecture The Android app communicates with the server through a REST API, making the backend flexible enough to support additional clients — web players, other mobile platforms — without rewriting core logic. User & Session Management Account creation, authentication, playback progress sync, and device management all happen server-side. Users can pick up on any device exactly where they left off. W

2026-07-24 原文 →
AI 资讯

The x-tenant-id Pattern: Multi-Tenant API Without Multi-Tenant Complexity

When you're building a multi-tenant SaaS, the first architectural question is usually: how do you keep tenant data isolated? The options range from separate databases per tenant (maximum isolation, maximum cost) to a shared database with row-level filtering (minimum cost, more careful coding required). But there's an equally important question that gets less attention: how does your API know which tenant context a request belongs to? This post covers a pattern we've used in production: a custom request header for tenant scoping, combined with JWT authentication. Simple to implement, easy to audit, and flexible enough to support multi-tenant access from a single user account. The Three Common Approaches 1. Subdomain-based ( tenant.yourdomain.com ) The tenant is encoded in the hostname. Each subdomain routes to the same backend, which extracts the tenant from the Host header. Good: Intuitive, visible in the URL. Bad: Requires wildcard TLS certs, more complex DNS setup, awkward in development, doesn't work for mobile API clients the same way. 2. URL path-based ( /api/tenants/{tenantId}/... ) The tenant identifier is part of every route path. Good: RESTful, self-documenting. Bad: Bloats all route definitions, requires every endpoint to include the tenant segment, makes API versioning messier. 3. Header-based ( x-tenant-id: <id> ) A custom header carries the tenant context. Routes stay clean. The tenant scope is resolved in middleware before the handler runs. Good: Routes stay simple, middleware handles scoping uniformly, works well with JWT auth, easy to test. Bad: Less visible (the tenant isn't in the URL), requires clients to always include the header. We use the header approach. The Implementation The API accepts two forms of auth: A JWT token in the Authorization header — identifies who is making the request A tenant ID in the x-tenant-id header — identifies on behalf of which tenant POST /api/v1/members Authorization: Bearer eyJhbGciOiJIUzI1NiIs... x-tenant-id: ten

2026-07-24 原文 →
AI 资讯

onPreviewKeyEvent vs onKeyEvent on Android TV: A Subtle D-Pad Bug

The bug report was simple: long-pressing the d-pad center button on a channel card should toggle the favorite — it wasn't working reliably. On some devices it fired once and stopped. On others it didn't fire at all on long-press. The fix was changing onKeyEvent to onPreviewKeyEvent in one Composable. The reason why is worth understanding. Background: Two Event Handlers in Compose Jetpack Compose exposes two modifier-level hooks for key input: Modifier . onKeyEvent { keyEvent -> .. . } Modifier . onPreviewKeyEvent { keyEvent -> .. . } They sound equivalent. They're not. The difference is where they sit in the event propagation chain . How Android TV Routes D-Pad Events When a user presses a key on a TV remote, Android routes the event through a dispatch tree: Activity └─ ViewGroup (root) └─ FocusedComposable └─ Child Composables The event travels down first (capture phase), then up (bubble phase): Capture (top → focused node): onPreviewKeyEvent handlers fire here, outermost first. Bubble (focused node → top): onKeyEvent handlers fire here, innermost first. onPreviewKeyEvent is the capture phase. onKeyEvent is the bubble phase. Why This Matters for Long-Press Android TV handles long-press recognition at the framework level. When you hold the d-pad center button: A KeyEvent.ACTION_DOWN fires immediately. If the key is held, the framework generates repeated ACTION_DOWN events at the key repeat rate. ACTION_UP fires when the button is released. The long-press callback that Compose's focus system uses for "confirm" actions (select, activate) consumes ACTION_DOWN during the bubble phase — specifically to prevent the holding action from also triggering the tap action. When the ChannelCard had a click handler wired for the primary action and onKeyEvent for the long-press toggle, the click handler's bubble-phase consumption of ACTION_DOWN was racing with the long-press handler. On some devices the click handler won, swallowing the event before the long-press code ran. The Fix

2026-07-24 原文 →
AI 资讯

GoCardless Bank Account Data Alternatives: What to Use When Signups Are Disabled

If you've been building on GoCardless Bank Account Data (formerly Nordigen's free tier), you may have noticed something concerning: new signups are disabled. The official page at bankaccountdata.gocardless.com/new-signups-disabled now blocks all new integrations. Existing users can continue, but if you're starting a new project or evaluating options, you need alternatives — today. What happened GoCardless acquired Nordigen in 2023 and integrated its free bank-data API as "Bank Account Data." The free tier was hugely popular with indie developers, hobbyist projects, and small fintech tools — it offered EU PSD2 coverage without the upfront cost of enterprise providers. Now that door is closing for new users. This mirrors a broader pattern: free open banking tiers are disappearing across the industry. Plaid tightened its free tier, Tink went enterprise-only under Visa, and now Nordigen's free legacy is being sunset for new signups. The question isn't just "what's the alternative" — it's "what alternative doesn't lock me into the same cycle?" The alternatives compared Provider eIDAS cert required? Pricing model EU coverage Best for open-banking.io ❌ No Free tier + paid plans EU (PSD2) Devs who want no certificate hassle Tink (Visa) ✅ Yes Enterprise pricing EU + global Large-scale production Plaid ✅ Yes (EU) Pay-per-call Global US-first teams needing EU too Yapily ✅ Yes Custom pricing EU Enterprise integrations Enable Banking ✅ Yes Custom pricing EU Budget-conscious teams The key differentiator isn't coverage or pricing — it's the certificate requirement . Most providers require you to hold an eIDAS QWAC/QSeal certificate to call their APIs directly. Why certificate-free matters more than you think An eIDAS qualified certificate costs €2,000–10,000 per year , depending on the issuer and type. You need to renew every 1–2 years, maintain audit trails, and handle the operational overhead of certificate rotation. For an indie developer or small SMB tool, the certificate cost

2026-07-24 原文 →
AI 资讯

Quantum Information Processing: Foundations - Part 3

Introduction Having laid out some mathematical foundations in the [previous part][1], we will proceed to discuss quantum gates and circuits in depth here. As usual, we will drive home the theories with worked examples from [@Rieffel2011] and check their accuracy with qiskit and/or cirq code. Prerequisite Understanding quantum gates and circuits will be greatly aided by the knowledge of classical gates (AND, OR, NOT, XOR and the universal gates: NAND and NOR). Also, some familiarity with the Python programming language will help you understand qiskit and/or cirq code. Classical & Quantum gates A classical computer, possibly the one you're reading this with, is a sophisticated engineering piece, no doubt. However, the underlying "magic" comprises logic gates. The National Institute of Standards and Technology (NIST) gives this incredible analogical description of classical computers in relation to logic gates [@NISTQGATE2026]: Traditional computers are like microscopic cities. The roads of these cities are wires with electricity coursing through them. These roads have lots of gates, known as logic gates, which enable computers to do their job. Like physical gates that allow or block cars, logic gates allow or block electricity. Electricity that goes through the gates represents a “1” of digital data, and blocked electricity is a “0.” When you pick up a motherboard, for instance, you may not see the said gates as they are made of tiny transistors (in modern systems, MOSFETs) in specific combinations. Also, the $0$ and $1$ referred to in the analogy mean low and high voltage ranges, respectively. Their actual voltage values depend on the hardware. :::note All schematics were written in and rendered by @schemd/core . Check it out. ::: Logic Gates refresher Since we will be realizing some classical circuits using quantum gates, it's necessary to get familiar with common logic gates. NOT ($\neg$) Gate This gate takes a single classical bit and flips it. For instance, if $0

2026-07-24 原文 →
AI 资讯

What Redis Is and When to Use It

Redis gets reached for reflexively, "just add Redis," as if it were a single fix for slowness. It's genuinely one of the most useful tools in a backend engineer's kit, but using it well starts with understanding what it actually is: an in-memory data structure store, not just a cache. Once you see it as a fast, versatile store of real data structures, the range of problems it solves cleanly (caching, rate limiting, queues, sessions, leaderboards, locks) stops looking like a grab bag and starts looking like one idea applied many ways. This is the opening article of the Redis Masterclass, and it builds on the PostgreSQL series : Redis usually sits alongside a primary database like Postgres, not instead of it. In-memory is the whole point Redis keeps its data in RAM. That single fact explains most of its character. Reading from memory is orders of magnitude faster than reading from disk, so Redis operations typically complete in well under a millisecond, and a single instance handles a very high request rate. That speed is why it's the default choice for anything on the hot path, where a database round trip would be too slow. The tradeoff is that RAM is smaller and more expensive than disk, and volatile. Redis addresses durability with persistence options we'll cover later, but the mental model to start with is: Redis is fast because it's in memory, and you use it for data that benefits from being fast to access, not as the permanent home for everything. It's a data structure store, not a key-value blob The common misconception is that Redis is a simple key-value store, strings in and strings out. It's much more. Redis stores real data structures as values, each with its own commands: Strings for simple values, counters, and cached blobs. Hashes for objects with fields, like a user record. Lists for ordered sequences and simple queues. Sets for unique collections and membership checks. Sorted sets for ranked data like leaderboards and priority queues. Plus streams, bit

2026-07-24 原文 →
AI 资讯

Why I Built OpenAgentFlow: Decoupling Multi-Agent Workflows from Framework Boilerplate

Hey everyone, my name is AbdulRahman Elzahaby ( @egyjs ), a software engineer from Egypt who’s recently fallen down the rabbit hole of LLMs. Like so many of us, you’ll find me in the thick of automation, bots, and making AI work for fast-tracking features and workflows. As I started diving into complex, multi-agent workflow automation, I experimented with… everything. I fiddled with n8n, played with OpenClaw, tinkered with Hermes Agent, andspent what felt like ages manually chaining together Python scripts with LangChain and LangGraph. Every tool showed promise, but my work became increasingly complex and every single workflow somehow felt... Unfinished. The way the industry seems to approach building these kinds of agents revealed a massive, structural gap in tool design. On one hand, we have intuitive, visual workflow tools like n8n. The drag-and-drop interface is great for a bird’s eye view of higher-level logic. But when you need more advanced concepts, like complex looping with conditional logic, custom state reduction, or a system that integrates properly with code review and versioning, these low-code boxes quickly hit limitations. On the other hand, we have powerful code-first frameworks like LangGraph. They provide incredible flexibility and raw execution power, but as soon as you start to build even a simple three-agent triage workflow, the boilerplate code starts to pile up. You have to write custom state schemas (TypedDict), initialize every node function individually, define custom logic for how to route between agents, set up the graph checkpointer, and grapple with environment and dependency management. What seemed missing was a sweet spot - a seamless bridge between the design intuition of visual workflows and the production-ready execution power of code-based frameworks. I wanted a tool that allowed me to simply design a workflow, and then run it efficiently without getting tangled in repetitive boilerplate code. Ultimately, I concluded that what we

2026-07-24 原文 →
开发者

I Spent 3 Weeks Debugging Rate Limits Before I Realized the Problem Wasn't My Code

Ever chased a bug for days, only to discover the "bug" was actually the platform working exactly as designed? That happened to me building a client reporting pipeline. The lesson stuck. Here's what nobody tells you about pulling marketing data from multiple ad platforms: the hard part was never the dashboard. It was everything underneath it. The Setup That Looked Simple on Paper The brief sounded easy. Pull spend, clicks, and conversions from Google Ads and Meta. Store it. Display it in a chart. A junior dev could knock this out in a sprint, I figured. Reality disagreed. Google Ads API enforces operation quotas per developer token, and those quotas scale differently depending on account tier. Meanwhile, Meta's Marketing API throttles based on a rolling usage score tied to the ad account itself, not your app. Two platforms. Two completely different throttling philosophies. Neither documented in a way that made the actual limits obvious until you hit them in production. Where Things Actually Broke My first version polled every client account every hour. Fine for three clients. Then we onboarded client number twelve, and Meta started returning 429s intermittently. Not consistently — intermittently. That's the worst kind of bug. I initially assumed it was a code issue. Retry logic, maybe a race condition in my job scheduler. I spent three weeks going down that path. Eventually, I found the real cause: cumulative API call volume across all client accounts was tripping Meta's app-level rate limit, not the individual account limit. The fix wasn't more retries. It was a request queue with exponential backoff, plus a priority system so active dashboards refreshed before idle ones. Simple in hindsight. Expensive in dev hours. The Real Architecture Behind Multi-Platform Reporting If you're building this yourself, here's what a production-grade pipeline actually needs, based on what broke for me. A Queue, Not a Cron Job Don't just fire off API calls on a schedule and hope for t

2026-07-24 原文 →
AI 资讯

Why I Chose Slot Hashes Over VRF for Fair Random Selection on Solana

When I set out to build a provably-fair random selection system on Solana, the obvious choice for randomness was a VRF (Verifiable Random Function). Instead, I built the system around Solana's SlotHashes sysvar with a commit-reveal scheme. Here's why, and what I gave up to get there. The problem A fair-selection system needs a winner (or set of winners) chosen in a way that's fair, and just as important that participants can check for themselves without taking anyone's word for it. VRF services (Switchboard, ORAO, etc.) solve the fairness part well: they produce randomness that's unpredictable in advance and cryptographically provable after the fact. But they come with a dependency on an oracle, a fee per request, and a proof that most users will never actually verify they'll trust it because the crypto math says they can, not because they did. I wanted something a participant with no crypto background could check in a browser console. The approach: commit-reveal with slot hashes The core idea: commit to the participant list before you know the randomness, then derive the randomness from a slot hash you couldn't have predicted at commit time. rust fn derive_randomness(target_hash: &[u8; 32], participant_root: &[u8; 32]) -> [u8; 32] { let mut combined_seed = [0u8; 64]; combined_seed[..32].copy_from_slice(target_hash); // slot hash at reveal combined_seed[32..].copy_from_slice(participant_root); // Merkle root, locked at commit solana_keccak_hasher::hash(&combined_seed).to_bytes() } The flow: Commit: participant list is finalized and hashed into a Merkle root; this is written on-chain. Wait: a target slot in the future is chosen as the reveal point. Reveal: once that slot passes, its hash is pulled from SlotHashes and combined with the committed root to derive the randomness. Select: the randomness deterministically picks winners from the participant set; winners get their own Merkle root and proofs. Every draw ends up with an audit record like: rust pub struct AuditR

2026-07-24 原文 →
AI 资讯

Claude’s voice mode is now available for Opus and Sonnet

Until now, voice mode has only been available on Claude Haiku, Anthropic's faster but less powerful model. Now the company is making its Opus and Sonnet models available in voice mode, and extending its reach into apps like Gmail, Slack, and Canva. When Anthropic launched voice mode earlier this year, it was primarily focused on […]

2026-07-24 原文 →