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

标签:#t

找到 11514 篇相关文章

AI 资讯

Why I Built Yet Another JavaScript Date Picker

Every developer has had this moment. You need a date picker, so you start searching. You find one that's perfect... until you realize it requires React. Or Vue. Or jQuery. Or an entire date library just to select a few dates. After trying several solutions, I kept asking myself: Why is such a common UI component often more complicated than it needs to be? So I decided to build my own. Meet RollDate . The Goal I didn't want to create "another date picker." I wanted to build something that I would actually enjoy using in my own projects. The goals were simple: Infinite scroll Zero framework dependencies Simple API Modern UI Mobile-friendly scrolling TypeScript support Easy customization Good documentation Why Scrolling? Most date pickers rely on clicking tiny arrows or dropdowns. On mobile devices, this often feels awkward. I wanted something closer to native mobile pickers, where changing the month or year is just a smooth scroll. That became one of RollDate's core ideas. More Than Just Picking a Date While building the component, I realized different projects need different selection modes. So instead of maintaining separate components, RollDate supports: Single date selection Date range selection Multiple date selection The API stays the same regardless of the mode. new RollDate ( " #date " , { selectType : " range " }); Optional Time Picker Many date pickers force you to install another plugin if you need time selection. I wanted it built in. RollDate supports: 24-hour mode 12-hour AM/PM mode Configurable minute steps Enable it with one option. new RollDate ( " #date " , { enableTime : true }); Dependency-Free One of the main design goals was keeping the library independent. No React. No Vue. No jQuery. No Moment.js. No Day.js. Just plain JavaScript. That means it works almost anywhere: Vanilla JavaScript React Vue Angular Svelte Astro ...or any framework capable of using DOM components. A Better Developer Experience I care a lot about developer experience. That's

2026-07-23 原文 →
AI 资讯

Building a Zero-Dependency CSV-to-JSON Converter

Sometimes you export a spreadsheet and the next tool in your pipeline wants JSON instead. Pulling in pandas for that feels like overkill — Python's standard library already has everything needed. Here's a small converter that does it in a handful of lines, no third-party packages required. 1. Reading the CSV csv.DictReader turns each row into a dictionary keyed by the header row automatically — no manual header parsing needed. import csv def read_csv ( csv_path ): with open ( csv_path , newline = "" , encoding = " utf-8 " ) as f : reader = csv . DictReader ( f ) return list ( reader ) Wrapping the result in list() consumes the whole reader up front, which is fine for small-to-medium files and much simpler to reason about than lazily iterating later. 2. Writing the JSON import json def write_json ( rows , json_path ): with open ( json_path , " w " , encoding = " utf-8 " ) as f : json . dump ( rows , f , indent = 2 ) indent=2 keeps the output human-readable, which matters if anyone will actually open the file to sanity-check it. 3. Wiring it together def csv_to_json ( csv_path , json_path ): rows = read_csv ( csv_path ) write_json ( rows , json_path ) return len ( rows ) Returning the row count gives a quick sanity check — if you expected 500 contacts and it says 3, something upstream went wrong before you even open the output file. 4. The full script, start to end import csv import json def read_csv ( csv_path ): with open ( csv_path , newline = "" , encoding = " utf-8 " ) as f : reader = csv . DictReader ( f ) return list ( reader ) def write_json ( rows , json_path ): with open ( json_path , " w " , encoding = " utf-8 " ) as f : json . dump ( rows , f , indent = 2 ) def csv_to_json ( csv_path , json_path ): rows = read_csv ( csv_path ) write_json ( rows , json_path ) return len ( rows ) if __name__ == " __main__ " : count = csv_to_json ( " contacts.csv " , " contacts.json " ) print ( f " Converted { count } rows -> contacts.json " ) 5. Trying it out Given a contact

2026-07-23 原文 →
AI 资讯

The AWS Cleanup We Keep Putting Off (I Let an Agent Do It)

It started with a billing alert. Estimated charges had crossed $250. Not scary money, but enough to make me look. And what actually caught my attention wasn't the number, it was the alert itself. I'd clearly set this up at some point, and the threshold felt stale. So I went looking for where the alert lived. It came from a BillingAlerts CloudFormation stack I created back in 2014 and completely forgot about. So a thing I forgot about was warning me about all the other things I'd forgotten about. I opened my stack list and that's when I saw it wasn't alone. It was sitting in a lineup of stacks, and I didn't recognise half of them. Years of leftovers, just sitting there. The stuff you forget about doesn't break anything. It doesn't page you at 2am. It just sits there, quietly billing, until you glance at the invoice and can't remember what half of it is for. Forgotten, still-running resources are one of the biggest sources of wasted cloud spend, by some estimates around a quarter of the average cloud budget . I came to update one alert and I found a mess. To be clear, these stacks weren't really costing me much. Stopped instances, a few half-deleted leftovers. If they'd been the $252, the alert would've tripped every month. But that's the point. You can't tell what's actually costing you until the clutter is gone. So the alert could wait. I wanted these stale stacks gone first. Normally this is a chore. Open the console, find each stack, click delete, wait, refresh, check if it worked, OR write out CLI commands. It's not hard, just tedious. The kind of task I keep putting off. And that's exactly how this started. ClickOps through the console. I'd just finished deleting an old Directory Service directory over in the Mumbai region by hand, clicking through the screens and waiting out the spinner, when it hit me. Barely ten minutes of manual clicking, and I still had a pile of stacks to go. I didn't have to do any of this myself. Why was I still clicking? I opened Kiro ,

2026-07-23 原文 →
开发者

Slices Beyond the Basics

Hey Techie! 🌸 Welcome to my Go series! I'll be sharing what I'm learning in ways that make sense to me, the mistakes I make and the "aha!" moments that help everything click. Whether you're learning Go too or just curious about it, I hope you'll pick up something along the way. Feel free to add any insights or experiences in the comments. Today's topic is... drumroll, please! Slices . Let's dive in! So, what exactly is a slice? When I first came across slices in Go, I thought they were another name for arrays. Turns out, they're not! A slice is internally represented by a small data structure called a slice header . Instead of storing the elements themselves, the slice header stores a pointer to the underlying array, along with its length and capacity . This realization helped me understand why modifying a slice can also modify the original array. Another interesting and convenient thing is how flexible slices are compared to arrays which are fixed size. Slices can grow using functions like append() or be resliced to work with a smaller portion of the underlying array. This flexibility is one of the reasons slices are used so frequently in Go.

2026-07-23 原文 →
AI 资讯

HELIX-Artificial Intelligence Isn't Separate from Enterprise Architecture

If you've been in tech over the last year, you've probably noticed that almost every conversation eventually ends up talking about AI. LLMs, AI Agents, RAG, MCP, prompt engineering...there's something new every week. Like many of you, I've been spending time learning these technologies, experimenting with different tools, and trying to understand where everything is heading. But while learning AI, one question kept coming back to me. Whre does AI actually fit within Enterprise Architecture? Most conversations start with the model. I think they should start with the enterprise. Looking Back Over the last two decades, I've worked through several technology shifts. Physical infrastructure → Virtualization Virtualization → Cloud Cloud → Platform Engineering Automation → Everything Every transition introduced new tools, new platforms, and new buzzwords. But something interesting never changed. Successful enterprise systems still depended on the same fundamentals: Business goals Enterprise Architecture Reliable platforms Security Data Governance Operations Technology changed. Engineering principles didn't. That's one of the reasons I don't see AI as something completely separate. AI Is Just Another Enterprise Capability Today, AI is often treated like its own universe. Dedicated AI teams. AI platforms. AI roadmaps. AI strategies. That all makes sense. But I think there's a risk if we start treating AI as something that sits outside Enterprise Architecture. AI doesn't work in isolation. It needs good data. It needs infrastructure. It needs platforms. It needs security. It needs governance. It needs integration with business applications. And, most importantly, it needs to solve a real business problem. From an architect's point of view, AI isn't an island. It's another enterprise capability. Just like databases, APIs, messaging platforms, Kubernetes, and cloud services became part of our enterprise landscape, AI is becoming another capability that needs to be architected—n

2026-07-23 原文 →
AI 资讯

Introducing Angular support for CopilotKit: bring any Agent into your app

Angular apps can now run any agent, with the streaming, tool calls, and shared state already handled. Today we're releasing Angular support for CopilotKit , an open source client that brings any AG-UI agent into your Angular app. It's built with Angular's own patterns, standalone components, dependency injection and signals. You get the building blocks for agent-native apps in Angular: pre-built chat components or a fully headless setup, generative UI, shared state, human-in-the-loop, multimodal attachments, threads and more. Use the CLI to scaffold a full starter Angular app with a Google ADK agent. npx copilotkit@latest init --framework adk-angular Let's see how to set everything up, then go through each of the pieces and give your agent the context. Quickstart docs are on docs.copilotkit.ai/angular . Rainer Hahnekamp (Angular GDE, NgRx core) and Murat Sari helped build the integration and are now taking on its ongoing maintenance. How everything fits together Everything runs on Agent-User Interaction Protocol (AG-UI) , the open protocol that connects agents to user-facing apps. It streams an agent's entire lifecycle as events, the messages, the tool calls, the state changes, which is what keeps your Angular app and the agent in sync. That matters because the agent becomes a choice you can change. The runtime can point at a BuiltInAgent , LangGraph, Google ADK, Mastra, Pydantic AI, Claude Agents SDK or any framework that speaks AG-UI and your Angular code doesn't change. Here's the architecture. ┌──────────────────────────┐ ┌──────────────────────────┐ │ ANGULAR APP │ │ COPILOT RUNTIME (Node) │ │ │ │ │ │ provideCopilotKit() │ ─────► │ holds your model keys │ │ <copilot-chat /> │ AG-UI │ connects to your agent │ │ tools · context · state │ ◄───── │ streams events back │ └──────────────────────────┘ └──────────────┬───────────┘ │ ▼ ┌───────────────────────────┐ │ YOUR AGENT + MODEL │ │ LangGraph · ADK · Mastra │ │ OpenAI or a local model │ └─────────────────────────

2026-07-23 原文 →
AI 资讯

Why Most Web Change Monitors Fail: Solving DOM Mutations and False Positives

If you have ever tried building a website change detection system or visual testing tool, you’ve likely stumbled into the "False Positive Trap." You configure a cron job to monitor a target URL, take snapshots every 15 minutes, and compare them. But within hours, your inbox is flooded with alerts for: Tailwind CSS dynamic hash class mutations (e.g. class="bg-blue-500_a3f9" turning into class="bg-blue-500_b81c" after a deployment) Lazy-loaded images rendering at offset offsets Anti-bot verification scripts altering invisible DOM nodes Hydration mismatches in React/Vue single-page applications At PageWatch.tech , solving these exact edge cases was the primary focus of our engineering roadmap. In this article, I’ll share the 3 core algorithmic fixes we implemented to achieve reliable, noise-free website change monitoring. 🛑 Problem 1: Structural Hash Instability in Modern Frameworks Modern frontend frameworks like Next.js, Nuxt, and Remix insert dynamic build IDs, hydration keys, and inline CSS chunk hashes into the HTML structure. For example, a innocent paragraph tag might look like this today: <p class= "text-gray-700 css-1a2b3c" data-reactroot= "" > Product Price: $99 </p> And like this tomorrow after a routine production deployment: <p class= "text-gray-700 css-9x8y7z" data-reactroot= "" > Product Price: $99 </p> A standard raw string comparison flags this as a critical change even though zero user-facing content changed . The Solution: Attribute Normalization & CSS Class Sanitization Before computing DOM structural hashes, we run a normalize pass that strips generated hashes and framework-specific attributes: import * as htmlparser2 from " htmlparser2 " ; /** * Normalizes dynamic framework attributes and hashed CSS classes * before running DOM diff calculations. */ export function normalizeDOMNode ( node : any ): void { if ( node . attribs ) { // 1. Remove hydration and framework metadata const volatileAttrs = [ " data-reactroot " , " data-reactid " , " data-hydr

2026-07-23 原文 →
AI 资讯

Deep Learning & Computer Vision in Web Diffing: Solving Layout Shifts with Neural Embeddings and SSIM

When engineers talk about visual regression or website change monitoring, pixel-level diffing algorithms (like pixelmatch or Euclidean RGB distance) are usually the default solution. However, in real-world web environments, pixel-by-pixel comparisons fundamentally fail under normal user interactions and dynamic rendering conditions: Elastic Layout Shifts: A single 20px dynamic banner inserted at the top of a page pushes every subsequent DOM element down, causing 100% of the downstream pixels to fail a pixelmatch test, even if the content itself hasn't changed. Sub-Pixel Anti-Aliasing Jitter: Operating systems (macOS vs. Linux vs. Windows) render font glyphs with subtle sub-pixel anti-aliasing variations, creating thousands of false-positive pixel deltas. Semantic vs. Cosmetic Changes: Changing a single word in a paragraph should trigger a localized alert, but a minor color gradient shift in a hero image shouldn't trigger an emergency notification. At PageWatch.tech , we solved this by combining classical Structural Similarity (SSIM) , ORB Feature Alignment , and Siamese Neural Networks (SNN) for latent-space semantic comparison. In this article, I will dive into the mathematics, neural network architectures, and TypeScript implementation of our computer vision diff pipeline. 🧮 1. Beyond Pixel Comparison: Structural Similarity Index (SSIM) Unlike raw Mean Squared Error (MSE), SSIM measures visual change based on human perception across three dimensions: Luminance , Contrast , and Structure . Mathematically, the SSIM between two image windows $x$ and $y$ is defined as: $$\text{SSIM}(x, y) = \frac{(2\mu_x\mu_y + C_1)(2\sigma_{xy} + C_2)}{(\mu_x^2 + \mu_y^2 + C_1)(\sigma_x^2 + \sigma_y^2 + C_2)}$$ Where: $\mu_x, \mu_y$ are the local pixel mean intensities. $\sigma_x^2, \sigma_y^2$ are the local variances. $\sigma_{xy}$ is the covariance between $x$ and $y$. $C_1, C_2$ are stabilization constants. TypeScript Implementation of SSIM Window Sliding Below is a snippet of how

2026-07-23 原文 →
AI 资讯

Your mobile release setup belongs in Terraform: Expo EAS + App Store Connect

If you ship a React Native / Expo app to the App Store, you know the ritual. Open the Apple Developer portal, create a bundle identifier, tick the capability checkboxes, generate a provisioning profile, pick the right certificate. Then hop over to the Expo dashboard, create the EAS app, wire up credentials, add your environment variables one screen at a time. It works, until you have to do it again for a second app, or a second environment, or a teammate needs to know why a capability is enabled. None of it is written down. It drifts. And the usual mobile tooling doesn't help much here: fastlane and the EAS CLI are great, but they're imperative — scripts that do things — not a declarative description of what your release setup should be . That's the gap these two providers fill: elevenode/appstore — App Store Connect: bundle identifiers, provisioning profiles, certificates. elevenode/expo — Expo Application Services (EAS): apps, credentials, environment variables, update channels. Both are open source (Apache 2.0) and published on the Terraform Registry. Let's use them together to describe a mobile app's release setup as code. What you'll need Terraform (or OpenTofu) An App Store Connect API key (Users and Access → Integrations → App Store Connect API): the key, its key ID, and your issuer ID An Expo access token (expo.dev → account settings → Access Tokens) and your Expo account name Export the credentials as environment variables so nothing sensitive lands in your config: export APPSTORE_KEY = " $( cat AuthKey_XXXX.p8 ) " export APPSTORE_KEY_ID = "XXXXXXXXXX" export APPSTORE_KEY_ISSUER_ID = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" export EXPO_TOKEN = "your-expo-access-token" export EXPO_ACCOUNT_NAME = "your-account-name" Wiring up both providers terraform { required_providers { appstore = { source = "elevenode/appstore" } expo = { source = "elevenode/expo" } } } # Reads APPSTORE_KEY / APPSTORE_KEY_ID / APPSTORE_KEY_ISSUER_ID from the env. provider "appstore" {} # Re

2026-07-23 原文 →
AI 资讯

QGIS: l'extension Universal xy converter qui convertit vos coordonnées en une seconde

Universal XY Converter est un plugin QGIS pratique qui simplifie la conversion, la manipulation et le traitement rapide de coordonnées géographiques et projetées directement au sein de votre environnement de travail. 🎥 Tutoriel vidéo Découvrez la prise en main pas à pas en vidéo : 📖 Documentation complète Consultez le manuel d'utilisation officiel sur GitHub : 👉 User Manual - QGIS Plugin Universal XY Converter 🌟 Fonctionnalités clés Conversion rapide de coordonnées : Transformez facilement des paires de coordonnées (X, Y) entre différents systèmes de référence spatiales (CRS). Import & Traitement par lot : Prise en charge fluide de listes de points pour accélérer le traitement de vos relevés de terrain. Gain de temps au quotidien : Évite les manipulations manuelles complexes ou l'utilisation d'outils externes pour vérifier et convertir vos données de géolocalisation. 🚀 Comment les installer et démarrer ? Ouvrez QGIS . Allez dans le menu Extensions > Installer/Gérer les extensions . Dans la barre de recherche, tapez XY Converter (ou Universal Map2web ). Sélectionnez l'extension puis cliquez sur Installer l'extension . 💬 Vos retours m'intéressent ! Avez-vous testé ces outils ? N'hésitez pas à laisser un commentaire ci-dessous avec vos retours, vos questions ou vos idées d'amélioration !

2026-07-23 原文 →
AI 资讯

Understanding Monads in TypeScript: A Practical Guide

You have read five blog posts about monads. Each one started with category theory, mentioned burritos, and left you more confused than before. Let's skip all of that. Here is the short version: a monad is a container that supports three operations. You already use two monads every day in TypeScript — Promise and Array . Once you see the pattern, every monad in @oofp/core will feel familiar. The Three Operations Every monad has three things: of(a) — Put a value into the container. map(f) — Transform the value inside, keep the container shape. chain(f) — Transform the value into a new container, then flatten. That's it. If a type supports these three operations and follows a few simple laws, it's a monad. Let's see this with types you already know. Promise — a monad you use daily // of — wrap a value const p = Promise . resolve ( 42 ); // map — transform the inside (then with a plain return) const doubled = p . then (( x ) => x * 2 ); // Promise<number> // chain — transform into a new Promise (then with an async return) const fetched = p . then (( id ) => fetch ( `/api/users/ ${ id } ` )); // Promise<Response> Promise.resolve is of . .then acts as both map and chain — JavaScript conflates them. When your callback returns a plain value, it's map . When it returns a Promise , it's chain . The runtime flattens the nested Promise<Promise<T>> into Promise<T> automatically. Array — another monad hiding in plain sight // of — wrap a value const arr = [ 42 ]; // map — transform each element const doubled = arr . map (( x ) => x * 2 ); // [84] // chain — transform each element into an array, then flatten const expanded = arr . flatMap (( x ) => [ x , x * 10 ]); // [42, 420] Array.of (or just [value] ) is of . .map is map . .flatMap is chain . Same pattern, different container. The insight is: chain is map followed by flatten . That's why it's also called flatMap or bind . You apply a function that returns a new container, then flatten the nested result. Maybe: Eliminating null

2026-07-23 原文 →
AI 资讯

Amazon’s best 4K streaming sticks are up to 40 percent off

There’s no shortage of great shows and movies to watch, but discovering something new isn’t always easy. Amazon’s Fire TV Stick 4K Plus and Fire TV Stick 4K Max come with redesigned software that aims to make it easier to finding something you’ll like, and both 4K-ready streaming sticks are back to their lowest prices […]

2026-07-23 原文 →