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

标签:#m

找到 8630 篇相关文章

开发者

LLD Data Structures in Design Context: Trie — A Data Structure Designed for Prefix Search

"A Trie isn't designed to store words. It's designed to make finding everything that shares the same beginning incredibly efficient." In the previous article, we explored a different kind of software problem. Some systems don't search using complete values. Instead, users provide only part of the information they know. The system must immediately suggest possible matches. Once you recognize that requirement, another question naturally follows. How should the system organize data so prefix searches become fast and natural? This is exactly the problem a Trie solves. Think About a Dictionary Imagine opening a physical dictionary. Suppose you're looking for the word: Application Do you start reading from page one? Of course not. You first go to the words beginning with: A Then you narrow further. Ap Then: App Every additional letter reduces the search space. A Trie works in a very similar way. Instead of repeatedly searching through every word, it follows the characters one by one. What Is a Trie? A Trie is a tree-like data structure where each node represents a character. Words that begin with the same characters share the same path. Consider these words. car card care cart A Trie stores them like this. Root ↓ c ↓ a ↓ r ├── end ├── d → end ├── e → end └── t → end Notice something interesting. The prefix: car is stored only once. Every longer word simply continues from that shared path. Every Data Structure Answers a Different Question By now we've seen several data structures, each solving a different design problem. A HashMap asks: Where is this exact object? A Heap asks: Which item has the highest priority? A Queue asks: Which task should happen next? A Stack asks: What is the current working context? A Trie asks: What begins with these characters? Choosing the right data structure starts with identifying which question your software needs to answer. Inserting a Word Imagine inserting: cat The Trie creates a path. Root ↓ c ↓ a ↓ t Now insert: car The beginning alread

2026-08-05 原文 →
AI 资讯

Puzzle Corner

Ready for a fresh set of puzzles? Click here for the September/October 2026 Puzzle Corner, brought to you by Michael S. Branicky, ScD ’95, of the Puzzle Corner Puzzle Crew (aka PC2), which also includes Edward Faulkner ’03, MEng ’04, and Abe Kunin ’03. This column includes solutions to the May/June issue. Send problems, solutions (by October…

2026-08-05 原文 →
科技前沿

Gödel, Escher, Elisp: The Beauty of Macros

This post is a lover letter to Emacs Lisp macros. I've been a long time user as a lisp hacker, and my recent obsessions with Douglas Hofstadter's strange loop concepts and M.C. Escher's mind bending artwork have enhanced my appreciation of this language's most beautiful and thought provoking feature. This post can teach you about macros and what makes them useful, but I also hope it can instill a fascination with their concept. https://www.chiply.dev/post-elisp-macros-are-beautiful submitted by /u/misterchiply [link] [留言]

2026-08-05 原文 →
产品设计

Ring upgraded its peephole doorbell camera to 2K

Ring has debuted a new version of its smart doorbell camera that's designed to be easily installed as a replacement for a door's peephole without drilling or running wires. The Peephole Cam 2K is a replacement for the brand's Door View Cam that first debuted in 2019 and, alongside a sleeker design, it features a […]

2026-08-05 原文 →
产品设计

Disney says it’s ‘exploring’ adding a free tier to Disney Plus

Disney is looking into launching a free streaming option. When asked about Disney's plans for free, ad-supported streaming during an earnings call on Wednesday, Disney CEO Josh D'Amaro confirmed the company is "exploring a free product for consumers." D'Amaro added that a free tier will help drive growth and expand the streaming service's reach "to […]

2026-08-05 原文 →
AI 资讯

Google AI Plus Broadens Availability as Free Gemini Access Varies by Region

Google has broadened access to its Google AI Plus subscription in 35 new countries and territories, including the United States. The expansion strengthens Gemini's international footprint, but it does not establish that non-subscribers can use all Gemini capabilities worldwide. Free-tier access exists in some contexts, while location, feature eligibility, demand, and subscription status can still determine what users can access. The distinction matters for people evaluating Gemini as a personal productivity tool, as well as businesses considering how broadly an AI workflow can be deployed. Google's rollout is meaningful because it expands a lower-priced AI plan across more markets. Yet the available evidence points to a tiered, country-by-country model , not unconditional global access to Gemini's full feature set. What Google AI Plus expansion confirms In its official Google AI Plus availability announcement , Google said the plan became available in 35 new countries and territories. The company listed the United States among the new locations and gave a U.S. price of $7.99 per month . Google AI Plus is part of Google's paid AI-plan lineup. The announcement describes a broadening of paid-plan availability, while Google's Gemini Apps help and subscription information documents that access levels differ between free and paid users. That makes the expansion important for markets that previously had fewer Google AI subscription options, but it should not be read as a universal free Gemini rollout. Google also says its AI plans are available only in supported locations. Availability therefore remains connected to the countries and territories where Google has enabled the relevant plan and service, rather than being identical everywhere Gemini is known or marketed. Access route What the available research supports Key limitation Free Gemini access Available for certain uses and features in some contexts Feature access can vary by country, eligibility, demand, and usage l

2026-08-05 原文 →
AI 资讯

Mistral Releases Shieldstral, a 3B Open-Weight Model for On-Device Content Safety

Mistral AI has released Shieldstral , a 3B-parameter open-weight safety classifier designed to moderate text and images on-device. Announced on August 4, 2026, the model is built on Mistral's Ministral-3B base and is intended to let organizations evaluate content against their own natural-language policies without retraining a separate moderation model for every policy revision. The release is notable because it combines a relatively compact deployment target with an adaptable moderation approach . According to Mistral's official Shieldstral announcement , the model can run on a single 16GB NVIDIA GPU, and its weights are available under the Apache 2.0 license. That gives teams an option to download and run moderation infrastructure locally or offline rather than relying solely on a centrally hosted classification service. Shieldstral evaluates prompts, model responses, and prompt-response pairs. It supports both text and image inputs, positioning it as a multimodal safety component for applications that need to assess user submissions as well as AI-generated output. Mistral describes the release as an inaugural member of its broader Open Secure AI initiatives. How Shieldstral approaches policy-adaptive moderation Shieldstral frames content moderation as a plain-language, binary policy question. An operator provides a policy instruction at inference time, and the model determines whether the input should receive a yes or no outcome under that instruction. It then produces a continuous safety score by softmax-normalizing the logits for those two possible answers and applying a threshold. This matters because the policy is part of the inference prompt rather than a fixed rule set embedded through a new training cycle. A team can therefore alter the policy language to address a changed requirement, product context, or moderation category without retraining Shieldstral. The approach does not remove the need for policy design, threshold selection, and testing. It does, h

2026-08-05 原文 →
AI 资讯

My Tool-Calling Loop Worked Fine, Until Compliance Wanted a Second Model to Check It

Small ask, on paper. A clinician types something like "any allergy conflicts for this patient's current meds?", and before the model answers it needs to actually go get the medication list and the allergy list rather than guess at what's plausible. Two functions, both of which already existed. The interesting part was never the lookups, it was getting a model to decide when to call them and hand back arguments I could trust. Then compliance sat in on the review and asked the question I should have seen coming: "what checks this model's answer?" Fair question, this is going in front of a clinician. Their answer was a second model, from a different provider, running the same lookups independently and flagging if it disagreed. Reasonable. Also, as it turned out, the thing that broke my code. The first version worked. That was the problem. I had the OpenAI SDK already wired into this project, so version one was straightforward: define tools , send the request, read message.tool_calls , run whichever function it asked for, push a role: "tool" message back with the result, loop until it stops asking. Twenty minutes, maybe. It worked on the first real test and I remember thinking this was going to be a short ticket. It was a short ticket, right up until "second model, different provider" landed in the same sprint. I went to point the exact same loop at Claude and it just doesn't speak that dialect - Anthropic sends tool requests back as tool_use blocks sitting inside the message content, not a separate tool_calls array, and the result has to go back as a tool_result block inside a user message. There's no tool role at all on their side. Same idea, completely different shape, and I was about two minutes from just writing a second version of the loop and calling it a day. I'd already installed the thing that fixes this I only stopped because I already had @aviasole/shapecraft in this project for the FHIR schema work, and figured it was worth thirty seconds to check whether g

2026-08-05 原文 →
AI 资讯

Mistral Moderation API: What Its Documented Text Guardrails and Scores Actually Cover

Mistral AI's publicly documented moderation offering is a text-focused API for policy enforcement . It classifies content against defined safety categories, returns category-level scores and lets developers use thresholds or the underlying scores in their own guardrail workflows. The product is relevant to enterprises building content controls, but its documented scope is more specific than a general-purpose policy interpreter or a unified text-and-image moderation interface. Mistral's official Moderation announcement describes the service as a moderation API built to help developers identify potentially unsafe text. For teams evaluating the platform, the practical distinction matters: the available public materials center on predefined policy categories, text inputs and configurable enforcement logic. What Mistral Moderation documents Mistral Moderation is designed to return scores for a defined set of content categories. The published materials reference categories including Sexual, Hate, Violence, PII and Jailbreaking . Those scores can support an application decision, such as allowing content, routing it for review or blocking it when a category score passes a chosen threshold. This approach gives organizations a degree of implementation flexibility. A single threshold can make sense for a straightforward safety filter, while raw scores can be more useful when a business needs different handling for different risks. For example, a workflow may treat possible personal-information exposure differently from a possible jailbreak attempt, provided the organization has established its own policy and response process. Two endpoints for text workflows The public documentation describes two primary moderation paths: one for raw text and another for conversational content. The distinction is useful because an isolated text string and a multi-turn exchange can require different application handling, even when the underlying goal is content classification. Documented elemen

2026-08-05 原文 →
AI 资讯

Shieldstral Introduces Policy-Adaptive Multimodal Safety Classification in a 3B Model

Shieldstral is a 3B-parameter policy-adaptive multimodal safety classifier designed to assess text and image-containing inputs against criteria supplied in natural language. Presented in an arXiv preprint, the model frames moderation as a binary yes-or-no question-answering task, seeking to replace rigid category taxonomies with a single adaptable safety score. The central idea is significant for teams building moderation workflows across changing policies, products, and jurisdictions. Instead of requiring a separate fixed label for every type of prohibited or sensitive content, Shieldstral is designed to accept an operator's moderation criterion at inference time. The authors report that the system matches or exceeds much larger models on multimodal safety benchmarks, while also delivering strong text-safety results. The model and its evaluation are detailed in the Shieldstral arXiv preprint , published July 28, 2026. The paper describes Shieldstral as being built on Ministral-3B , from Mistral AI's Ministral 3 family, positioning the work around a relatively compact model architecture rather than the largest available multimodal systems. How Shieldstral approaches multimodal moderation Shieldstral's contribution is not simply another list of content categories. Its approach combines a unified safety representation, a large curated training corpus, and prompt-defined moderation criteria. The model is evaluated on both text-safety tasks and multimodal inputs that include images. The paper identifies three core elements: Policy adaptation at inference time: Operators can express a safety rule in natural language, allowing the moderation question to change without redefining a fixed label set. A unified safety score: The system is intended to answer whether an input satisfies a given moderation criterion, rather than only selecting from a predetermined taxonomy. Large-scale data curation: The training pipeline unifies 54.1 million samples drawn from diverse safety dat

2026-08-05 原文 →
AI 资讯

Grafana Agent vs Alloy: What Changed and Why

TL;DR: Grafana Agent reached End-of-Life on November 1, 2025 and has been replaced by Grafana Alloy. Alloy consolidates Agent's Static mode, Flow mode, and Kubernetes Operator into a single collector built on the OpenTelemetry Collector while maintaining native support for Prometheus and Loki. If you're using Flow mode, migration is relatively straightforward. If you're using Static mode, the migration process will involve reviewing and testing the converted configuration. Before switching over, verify relabeling rules, recheck resource usage, and confirm that Prometheus and Loki are receiving the same data and labels as before. If you're still running Promtail, it's worth migrating both to Alloy at the same time since Promtail is also End-of-Life. If you deployed Grafana Agent a couple of years ago, there's a good chance you haven't thought about it since. It quietly collects metrics, ships logs, and generally stays out of the way. What you may not realize is that Grafana Agent reached End-of-Life on November 1, 2025. That includes Static mode, Flow mode, and the Kubernetes Operator. Grafana Labs has stopped creating bug fixes, security patches, and official support. If you're still running it, your collection layer is probably still performing normally, but is now unsupported. That doesn't necessarily mean it will stop working tomorrow, plenty of unsupported software continues running for years. It does mean you're taking on the risk yourself, especially as the rest of your monitoring stack continues to evolve. This article covers why Grafana Labs replaced Agent with Alloy, what actually changes during the migration, and where people tend to run into problems. Why Grafana Agent was deprecated One of the biggest issues with Grafana Agent is that it was essentially three agents, not one product: Static mode, which used YAML and looked similar to Prometheus. Flow mode, which introduced a component-based configuration using River. The Kubernetes Operator, which manage

2026-08-05 原文 →
AI 资讯

Minimalist LaTeX + VSCode Setup (macOS)

LaTeX is a document preparation system for high-quality typesetting, perfect for academic papers and technical docs. Many people turn to Overleaf as their go-to online editor for LaTeX, but it comes with its own frustrations. If you are tired of Overleaf being costly and always hitting the compile timed out error, this guide is for you! The full MacTeX install weighs in at a massive ~6.4GB, most of which you'll never actually use. Setting up a minimalist LaTeX environment on macOS using BasicTeX and VSCode is a much better alternative that makes your setup ~8 times smaller. It saves storage and makes it much easier to collaborate with your teammates using GitHub as a combo. Install LaTeX via Homebrew We'll use Homebrew to keep things manageable. If you don't have it, grab it at brew.sh . 1. Install LaTeX BasicTeX is the "lean" version of MacTeX. It's only ~140MB initially. brew install --cask basictex 2. Refresh your path and verify Make the TeX binaries available in your current terminal session: eval " $( /usr/libexec/path_helper ) " The default LaTeX compiler pdflatex should be available now. Verify it's working: which pdflatex pdflatex --version 3. Update tlmgr and packages tlmgr is the TeX Live Manager. To update tlmgr and all packages, run the following commands: sudo tlmgr update --self sudo tlmgr update --all 4. Install latexmk (build manager) latexmk is the "build manager" that handles multiple runs of the compiler (necessary for bibliographies and tables of contents). sudo tlmgr install latexmk Verify latexmk version: which latexmk latexmk --version 5. Install essential package collections BasicTeX is too bare-bones for real projects. Since we went minimalist, we need to grab only the packages we actually use. These three collections will cover 90% of your needs while keeping storage down. sudo tlmgr install collection-latexrecommended sudo tlmgr install collection-fontsrecommended sudo tlmgr install collection-latexextra Note: If a build fails due to a mi

2026-08-05 原文 →