今日精选
HOT最新资讯
共 27419 篇Catbot: Custom Grammar Problem Fixed
This is a submission for DEV's Summer Bug Smash: Smash Stories powered by Sentry. ...
Ten advances in mathematics and theoretical computer science
submitted by /u/alphacolony21 [link] [留言]
Marketing teams have more data than ever but still wait days for real insights, anyone using AI differently?
Marketing teams sit on more data than ever, yet many still spend a large part of the week just assembling reports. By the time the numbers are clean and explained, the window to act has already narrowed. A more practical use of AI in this space focuses on detection and explanation rather than another dashboard. The system watches for unusual movements, surfaces the likely drivers, and presents them in plain language. Analysts spend less time pulling the same weekly views and more time deciding what to do next. The useful part is speed. When something shifts in performance, the team hears about it earlier instead of discovering it during a scheduled review. Of course this only works if the underlying data is reliable, otherwise the explanations become noise. Is anyone here already using AI this way for marketing performance, or are most teams still in the experimental stage? submitted by /u/Cloudy_Day912 [link] [留言]
Autocomplete in vscode
Hey guys, What is currently the best tool for autocomplete in vscode given the recent changes to GitHub copilot free tier usage limits? Thanks in advance! submitted by /u/TalkHot2112 [link] [留言]
Judge denies request by Elon Musk's xAI to pause Minnesota nudification ban
submitted by /u/Fcking_Chuck [link] [留言]
🔥 ulsklyc / yuvomi - Self-hosted family planner - tasks, calendars, shopping, mea
GitHub热门项目 | Self-hosted family planner - tasks, calendars, shopping, meals, budget. Your data, your server. | Stars: 1,205 | 25 stars today | 语言: JavaScript
How to add country icons to an Angular app
Angular is well served for icons. Material Symbols alone runs to thousands of glyphs, and the community wrappers pull in dozens of other sets on top. Geography is where the shelf runs out. You get globes and map pins, sometimes a set of flags, rarely the outline of Japan and almost never the six states of the GCC. GeoIcons ships country and area icons as Angular standalone components, 422 of them at the time of writing. Adding one takes three steps: install the package, import the component by its ISO code, and render its selector. npm i @geoicons/angular import { Component } from ' @angular/core ' ; import { Us } from ' @geoicons/angular/countries ' ; @ Component ({ selector : ' app-root ' , imports : [ Us ], template : `<geoicon-us aria-label="United States" />` , }) export class App {} See it live on geoicons.io → That is the whole path. Below: inputs, styling, accessibility, and picking an icon when you only know the country at runtime. Key takeaways Install @geoicons/angular , import each country by its ISO 3166 alpha-2 code in PascalCase, and add it to the component's imports array. The class is Us ; the selector you write in the template is <geoicon-us /> . Styling props are explicit inputs, because Angular has no rest spread. Everything else goes on the host element. Icons render as decorative unless you name them, so reach for aria-label only where no adjacent text says the country. Step 1: Install the Angular package Add the package to your project: npm i @geoicons/angular It needs @angular/core and @angular/common 15.1 or newer, plus rxjs 7 or newer. That 15.1 floor comes from hostDirectives , which the icons use to share their styling inputs and which landed in that release alongside standalone components . The package sets "sideEffects": false , so the CLI can drop what you never import. List three icons in a component and you ship three. Why that matters for icon libraries . Step 2: Import by ISO code Every country ships as a named export under its ISO
Building a Custom MFA and Secure Session Handoff Platform for Shared In-Store Devices
This article describes an anonymized enterprise implementation. Company names, internal domains, repository identifiers, ticket numbers, and proprietary control names have been intentionally removed or generalized. Multi-factor authentication is often described as a login problem: enter a password, receive a code, confirm identity. That model was not enough for the system described in this case study. The product ran in an in-store environment where the same tablet could be used by several people during a transaction: an employee initiating the process; a manager approving or supporting it; a customer reviewing and signing on their own device. The challenge was not simply to prove that a user knew a six-digit code. We needed to create a secure, short-lived handoff between a shared in-store session and the customer’s personal phone, without leaking the downstream signing session or allowing multiple devices to claim the same transaction. This post explains the architecture, the security model, the trade-offs, and the production practices behind that platform. The actual problem: secure device handoff The workflow started on a shared tablet. At a certain point, the customer needed to continue part of the process on their own phone. The platform therefore had to answer several questions: How does the phone prove that it belongs to the customer currently standing in front of the employee? How does the shared tablet know that the correct phone claimed the correct session? What happens if the QR code is scanned twice? How do we prevent session identifiers and tokens from appearing in URLs, browser history, logs, or referrer headers? How do we notify the phone immediately when verification succeeds? How do we ensure that a single-use signing URL is never exposed before verification? Those constraints turned a seemingly small MFA feature into a distributed-system problem involving identity, real-time communication, concurrency, edge delivery, infrastructure, and operational
Day 166 of Learning MERN Stack
Hello Dev Community! 👋 It is officially Day 166 of my full-stack engineering track! Today, I designed and implemented the active messaging canvas component ( ChatContainer.jsx ) for my messaging app, QuickChat ! 💬📷⚡ Focusing on dynamic chat alignment, text bubble rendering, image attachments, and input controls was today's core milestone. Here is how I structured the component. 🛠️ Technical Breakdown: ChatContainer & Attachment Pipeline As captured in my UI and VS Code setup ( Screenshots ): 1. Dynamic Alignment & Sender Detection Conditioned flexbox directions based on authentication state so sender messages lock to the right while recipient messages render on the left: javascript
OpenAI's work on Git for large repositories
Article URL: https://openai-git-upstream.openai.chatgpt.site/ Comments URL: https://news.ycombinator.com/item?id=49131737 Points: 9 # Comments: 1
I stopped reviewing my own code. Here's what had to be true first.
Most days now, I merge pull requests without reading the diff. That sentence used to describe someone I would not have hired. So let me be precise about what changed, because it isn't confidence and it isn't recklessness. It's that I moved the things review was catching to somewhere that catches them earlier. Here's the honest version of how that happened. The problem was arithmetic, not philosophy I run several coding agents in parallel. That produces more diff per day than I can read. Not "more than I feel like reading" — genuinely more than fits in a working day. When that happens you have exactly two options: Generate less, so it fits what you can read. Make it safe to not read. I picked the second one. Not because I'm brave, but because option 1 means throwing away the reason I set this up. The uncomfortable part: option 2 is not a mindset. It's a list of specific things that have to be true. Here's mine. 1. The rules live in a file, not in review comments Every code review I've ever done, the majority of my comments were mechanical. This function is too long. This nesting is too deep. Why is this any ? Machines can say all of that. So I made them say it, as errors : " max-lines-per-function " : [ " error " , { max : 60 , skipBlankLines : true }], complexity : [ " error " , 20 ], " max-depth " : [ " error " , 4 ], " max-nested-callbacks " : [ " error " , 4 ], Plus eslint-plugin-sonarjs with cognitive-complexity as an error, and @typescript-eslint 's strict preset — any banned, non-null assertions banned. Nothing here is novel. What's different is the next part. 2. The rules are stricter than a human team would tolerate This is the part I find genuinely interesting. If you put those thresholds on a human team, you get a PR relaxing them within a week. Not because engineers are lazy — because "this function is 63 lines and splitting it makes it worse" is sometimes true , and arguing about it every time is exhausting. Lint strictness has always been a trade-off be
Turn Off the Lights: a CSS-only Salvadoran Pupusa Table
This is a submission for Frontend Challenge - Comfort Food Edition, CSS Art . Inspiration I'm from El Salvador, and here comfort food has one name: pupusas . Thick corn tortillas stuffed with cheese, beans and chicharrón, served with curtido (pickled cabbage slaw) and tomato salsa. It's our national dish, but more than that — it's the food you eat at a plastic table at night, under one warm light, with the comal hissing somewhere behind you. That last image is what I wanted to capture. Not just the plate: the moment . So the piece has a light switch. Demo Two things to try: "Bañar en salsa" — pours salsa over each pupusa with a staggered cascade. "Apagar la luz" — turns the whole scene into a night pupusería, lit only by a flickering candle (veladora). Journey Everything is CSS: gradients, border-radius , box-shadow and blend modes. No images, no SVG, no libraries. JavaScript is 15 lines — two class toggles. The tablecloth is the flex. The blue-and-white geometric mantel is five bands built entirely with repeating-conic-gradient and repeating-linear-gradient — chained diamonds, sawtooth rows, chevrons. Zero background images. This was the part I rewrote the most until the patterns locked together. The night is one single element. When you turn off the light, I'm not repainting anything. A single overlay div with mix-blend-mode: multiply holds two stacked radial gradients: near-white around the candle (multiplying by white changes nothing — so that IS the light), falling off to deep blue at the edges. The steam even turns moonlit-blue for free, because that's just what multiply does to white pixels. One div, one blend mode, full day/night mood shift. Corn kernels are two offset dot grids. The mazorca's kernels are two radial-gradient grids shifted by half a cell — which is exactly how kernels interlock on a real cob. That half-cell offset is the difference between "corn" and "polka dots". The curtido is seven crossed stripe layers. White and purple cabbage, carrot, c
Demystifying React Hooks: A Streamlined Guide for Developers
React Hooks have revolutionized how we write React components, offering a powerful way to manage state and side effects directly within functional components. This paradigm shift has led to cleaner, more readable, and often more maintainable codebases by moving away from the complexities of class components. Why the Shift to Hooks? Before Hooks, managing stateful logic and side effects often meant relying on class components. This approach could introduce several challenges: understanding this binding, managing complex lifecycle methods across different phases of a component's life, and dealing with "wrapper hell" – deeply nested component structures resulting from Higher-Order Components (HOCs) and render props when trying to reuse logic. Hooks solve these problems by allowing developers to "hook into" React features directly from functional components. This makes logic reuse more straightforward and components inherently easier to understand and test. Essential React Hooks at a Glance Let's explore the core Hooks that form the backbone of modern React development: 1. useState : Adding State to Functional Components The useState Hook is the most fundamental. It allows you to declare state variables in functional components. Instead of dealing with this.state and a separate this.setState() method, useState provides a direct variable for your state and a dedicated function to update it. This simplifies local component state management significantly, making it more intuitive and less prone to errors. 2. useEffect : Handling Side Effects The useEffect Hook is designed for performing side effects in functional components. Side effects encompass operations like data fetching from an API, setting up event listeners or subscriptions, or directly manipulating the DOM. This Hook consolidates logic that was previously spread across multiple lifecycle methods like componentDidMount , componentDidUpdate , and componentWillUnmount in class components. A key aspect of useEffect i