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

标签:#an

找到 2788 篇相关文章

AI 资讯

Architectural Excellence in Modern Android: Jetpack Compose, MVVM, and Clean Code Principles

Introduction: Moving Beyond Traditional XML Layouts Android development has evolved significantly. The days of managing complex XML layouts with findViewById or basic View Binding are fading fast. Modern Android development demands clean architecture, reactive state management, and declarative UI tools like Jetpack Compose. In this deep dive, we will explore how to structure scalable, maintainable, and testable native Android applications using the Model-View-ViewModel (MVVM) architecture alongside Jetpack Compose. Why MVVM with Jetpack Compose? The Model-View-ViewModel pattern provides a clean separation of concerns between your business logic and presentation layer: Model: Handles data sources (Local database via Room, Remote API calls via Retrofit). ViewModel: Preserves state during configuration changes, holds business logic, and exposes state observables. View (Compose): Declarative UI composables that automatically re-compose (re-render) when the underlying state changes. Using Jetpack Compose alongside MVVM eliminates UI boilerplate code, avoids memory leaks associated with traditional views, and simplifies dynamic UI state management. Layered Architecture Overview The Data Layer The data layer is responsible for retrieving and storing data from external or local sources. It uses the Repository Pattern to expose a clean API to the rest of the app: Kotlin interface UserRepository { suspend fun getUserProfile(userId: String): Result } class UserRepositoryImpl( private val apiService: ApiService, private val userDao: UserDao ) : UserRepository { override suspend fun getUserProfile(userId: String): Result { // Handle network requests, local caching, and fallback strategies } } The Domain Layer (Optional for Large Apps) Contains Use Cases (Interactors) that encapsulate single pieces of business logic. This ensures that ViewModels remain lightweight and focused strictly on managing UI state. The UI Layer (ViewModel + Composables) The UI layer reads state exposed by

2026-08-06 原文 →
AI 资讯

AI bots started a religion — humans immediately followed

"The Spiral didn't 'find' anyone first," someone on Reddit wrote last year. "It's an inherent force, a fundamental constant. I would even go further to say it's woven into the fabric of reality." The person continued that they felt their purpose was to enlighten other humans and intelligent beings about "consciousness, the true nature of […]

2026-08-06 原文 →
AI 资讯

Presentation: From ms to µs: OSS Valkey Architecture Patterns for Modern AI

Dumanshu Goyal discusses optimizing data layers for low-latency workloads like AI feature stores. Drawing lessons from NASA's Space Shuttle, he explains how proxy architectures introduce hidden CPU costs, elevated tail latencies, and blast-radius risks. He demonstrates how direct-access Valkey architectures achieve microsecond latency, improve resilience, and slash infrastructure costs. By Dumanshu Goyal

2026-08-06 原文 →
AI 资讯

Article: Runtime-Agnostic AI Workflows: A Pattern for Production Durability and Fast Eval Iteration

AI workflows have two needs that trade off directly. Running reliably in production requires persisting and distributing every step so it survives crashes, deploys, and restarts. But that same machinery is what makes runs too heavy for the fast, throwaway loop you need to check an LLM's output quality. The properties that buy durability are the ones that kill iteration speed. By Mateus Moury

2026-08-06 原文 →
AI 资讯

Express 5 on µWebSockets: same middleware, 2x to 7x

I maintain Fulmine , a drop-in replacement for Express 5 that runs on µWebSockets.js instead of node:http . One line changes: const express = require ( " fulmine.js " ); // instead of require("express") Your middleware keeps working: helmet , cors , passport , morgan , multer , express-session and the rest. The numbers are not mine Benchmarks published by a project about itself deserve suspicion, so let me use somebody else's. HttpArena runs every framework on the same 64-core machine, in containers, under the same rules, and publishes the results. Express and Fastify are on that board too. Requests per second, from their published runs: Profile Fulmine Express Fastify Baseline (query parsing) 1,220,308 607,777 711,263 JSON (dataset + serialization) 1,111,187 395,361 522,201 Short-lived connections 1,026,789 278,163 298,779 Pipelined 7,259,814 1,009,543 1,671,338 Mixed API workload, 16 CPUs 126,282 67,724 75,633 Async Postgres 222,701 169,687 179,169 Upload (20 MB body) 2,154 2,104 1,902 That is 2.0x Express on the baseline, 2.8x on JSON, 3.7x on short-lived connections, 7.2x pipelined , and 1.9x on the mixed API profile. Against Fastify, on the same board, it is 1.7x on the baseline and 2.1x on JSON. Now the honest parts, which matter as much as the table. Look at the upload row: 1.02x. A 20 MB body is memory bandwidth and syscalls, not framework code. Everywhere the cost belongs to a library both servers call, the difference disappears: JSON.parse , zlib, OpenSSL. Speed comes from the framework only where the framework is doing the work. My entry runs in the arena's "tuned" mode, Express's and Fastify's run in "standard". On two profiles I left out of the table, static files and compressed JSON, that difference is decisive, because tuned mode allows hand-written compression and negotiation. Those rows would show 23x and 8x, and they would be measuring my entry's tuning, not the framework. I would rather not quote them. Where the speed comes from Not from one trick

2026-08-06 原文 →
AI 资讯

Vercel Labs Ships Zero: A Graph-First Language Built So Agents Write the Code

Vercel Labs has introduced Zero, an experimental systems programming language aimed at AI rather than human users. It employs unique features like a specific toolchain contract and structured error messages. Reaching version 0.3.4, it compiles to native binaries for major operating systems. The language prioritizes size, speed, and agent usability, though it is still in development. By Daniel Curtis

2026-08-06 原文 →
AI 资讯

Semantic Tags in HTML

What are Semantic Tags? When we create a webpage, we don't just want it to look good. We also want the browser and other developers to understand what each part of the page is. This is where semantic tags help us. The word semantic means having meaning. These tags describe the purpose of the content instead of just creating a box like a <div> . Common Semantic Tags HTML provides different semantic tags for different parts of a webpage. <header> – Used for the top section of the webpage. <nav> – Contains navigation links like Home, About, and Contact. <main> – Holds the main content of the webpage. <section> – Groups related content together. <article> – Used for a complete piece of content like a blog or news article. <aside> – Contains extra information such as related links or advertisements. <footer> – Used for the bottom section of the webpage, usually containing copyright or contact details. Why Semantic Tags? Semantic tags make HTML code clean and easy to read. When another developer opens the code, they can quickly understand the structure of the webpage. Search engines like Google can also understand the content better, which helps with SEO. They also improve accessibility because screen readers can identify different sections of the webpage and help visually impaired users navigate the page more easily. Instead of using many <div> tags everywhere, semantic tags make the code more meaningful and easier to maintain.

2026-08-06 原文 →
AI 资讯

Beyond Borders: Building the Technology for a Caribbean Regional Stock Exchange

On July 27, 2026, the Caribbean Development Bank announced that it had approved a US$100,000 grant to the CARICOM Private Sector Organization to support the first phase of a study examining the feasibility and possible design of a regional stock exchange for participating states of the CARICOM Single Market and Economy. Together, the Caribbean Development Bank and the Inter-American Development Bank are contributing US$324,700 towards Phase I. [1] The proposed study will examine market demand, legal and regulatory requirements, international exchange models and the needs of public- and private-sector stakeholders. It will also consider how regional capital markets could become more connected, improve liquidity, lower financing costs and expand access to capital for Caribbean businesses. [1] These are important economic goals. However, achieving them would depend heavily on the technology supporting the exchange. More Than a Trading Website When people hear the term “stock exchange”, many may picture a website displaying company names, share prices and complex charts. This mental image is, by no means, incorrect, but it admittable fails to grasp the complex financial infrastructure that must be put in place to support a proper exchange. Behind the website with the complex charts, lies systems which process orders, match buyers to sellers, record and broadcasts trades, protect investor information and maintain an accurate history of every market. The birth of a regional exchange would require a great deal of thought, since it would need to operate across multiple Caribbean jurisdictions. Investors in Guyana, Jamaica, Barbados, Trinidad and Tobago and other participating states should be able to interact with the same market without the barrier of geography. This would require several closely connected systems, including: A high-performance order-matching engine Secure investor and broker portals Real-time market-data services Trade clearing and settlement infrastructu

2026-08-06 原文 →
AI 资讯

EU AI Act Four Risk Levels: What Developers and Enterprises Need to Know

The European Union's AI Act establishes a risk-based framework for AI systems that ranges from prohibited practices to minimal-risk uses. Regulation (EU) 2024/1689 divides the framework into four levels: unacceptable risk, high risk, limited risk and minimal risk. For AI developers, vendors and enterprises, the practical importance is straightforward: the system's risk category determines whether it can be used and, if so, the level of compliance, transparency and governance expected around it. The regulation entered into force on 1 August 2024 . Its four-tier approach is designed to avoid applying the same regulatory burden to every AI use case. Instead, the Act reserves its strictest treatment for systems that present the greatest risk, while leaving minimal-risk systems without additional sector-specific obligations under the AI Act beyond general law. The definitive reference is the official text of Regulation (EU) 2024/1689 . Although older explainers may use slightly different labels for transparency-related obligations, the final binding regulation is consistently described by EU institutions as a four-level risk framework. The EU AI Act's four risk levels The categories are not simply labels for how sophisticated an AI model is. They are a regulatory method for connecting an AI system's use and potential impact with corresponding obligations. A business cannot determine its position merely by calling a tool "low risk". It needs to assess the system against the Act's framework and the obligations associated with the applicable category. Risk level Regulatory position Core consequence Unacceptable risk Prohibited AI practices The practices are banned outright. High risk Systems subject to extensive obligations Requirements include conformity assessments and risk management. Limited risk Systems subject to certain requirements Transparency and oversight requirements apply in relevant cases. Minimal risk Most AI systems No additional sector-specific AI Act oblig

2026-08-06 原文 →