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

AI 资讯

AI人工智能最新资讯、模型发布、研究进展

13154
篇文章

共 13154 篇 · 第 122/658 页

Dev.to

O(N) Manacher's Algorithm with Mirror Boundary Optimization

Intuition Manacher's Algorithm leverages the symmetry of palindromes to avoid redundant comparisons. Instead of treating odd- and even-length palindromes separately, the input string is transformed by inserting a special character (#) between every character and adding sentinel characters (^ and $) at both ends. This allows every palindrome to be treated as an odd-length palindrome. While traversing the transformed string, the algorithm maintains the center and right boundary of the rightmost palindrome found so far. For each position, it uses the palindrome information from its mirror position (with respect to the current center) to initialize the palindrome radius, significantly reducing unnecessary expansions. Only when the palindrome reaches beyond the current right boundary is additional expansion performed. This optimization ensures that every character is expanded at most a constant number of times, resulting in linear time complexity. Approach Handle the edge case by returning an empty string if the input string is empty. Transform the input string by inserting # between every character and adding sentinel characters (^ and $) at both ends to treat odd- and even-length palindromes uniformly. Create a palindrome radius array p, where p[i] stores the radius of the palindrome centered at index i in the transformed string. Initialize the variables center and right to represent the center and right boundary of the current rightmost palindrome. Initialize max_len and center_index to keep track of the longest palindrome found during traversal. Traverse the transformed string from left to right, ignoring the sentinel characters. Compute the mirror index of the current position using the current palindrome's center. If the current index lies within the current right boundary, initialize its palindrome radius using the previously computed mirror information. Expand around the current center while the characters on both sides are equal, increasing the palindrome radius

Dipaditya Das 2026-07-16 02:36 👁 7 查看原文 →
Dev.to

A diagram is data, not a drawing

I gave one model the same 44-node architecture twice. The first time I asked for raw SVG — place every box, route every edge, hand me the coordinates. The second time I asked it to describe the same system as typed JSON and let a layout engine draw it. Same model, same session, same brief. The only thing I changed was the output boundary. The boxes are fine in both. I want to be upfront about that, because the usual version of this pitch is out of date. Models place labeled boxes well now. If you ask a current frontier model for a six-box flowchart as SVG you get a clean six-box flowchart, and if that's what you need, go do that — it's the right tool and I'm not going to pretend otherwise. What broke was the edges. With no routing algorithm the model just drew long diagonals straight through unrelated boxes. Not a few — everywhere the graph got dense. And when I changed one node, the entire hand-placed coordinate layout had to be regenerated, and came back different. That second part is the one that actually annoyed me. It's not a rendering bug you can squint past. The picture is a dead artifact: you can't diff it, you can't edit one box, you can't get the same one twice. Every change is a full regeneration and a fresh roll of the dice. This isn't a "wait for a better model" problem Here's the part I'd push back on if someone else wrote it, so let me make the case. Routing a connector around obstacles across a nested graph is global constraint optimization. It's the specific thing layout engines like ELK exist to solve. A model emitting SVG has to commit to an x/y for every point, in order, with no way to backtrack once it sees the whole picture — it's predicting the next token, not solving a layout. So a better model gives you nicer boxes, not untangled edges . The failure is structural, and I'd expect it to reproduce across models past a couple dozen nodes. If you don't buy that, the honest move is to test it: throw a 40-node architecture at whatever model you tru

Siva Teja 2026-07-16 02:35 👁 6 查看原文 →
Dev.to

pinto: A Git-Native Scrum Backlog and Kanban Board for Your Terminal

pinto lets teams manage Scrum backlogs as plain text. Every backlog change can be inspected with git diff , carried across a branch, merged, and reviewed in a pull request—just like source code. The backlog follows the same lifecycle as the product it describes. pinto is local-first: no server, account, or hosted database is required. It works with AI agents, but never depends on them. And unlike a generic CLI to-do list, its core model is Scrum: Product Backlog Items (PBIs), Sprints, Kanban, and the metrics teams use to inspect and adapt. Why pinto exists Jira, Asana, and Notion are capable products. But as more features accumulate, the process can start serving the tool instead of the other way around: Creating one ticket means navigating required fields and workflow settings. Running a Sprint begins with configuring permissions, automations, or dashboards. Even a small status change feels expensive when the tool is slow to open. Scrum is meant to be a lightweight framework for rapid inspection and adaptation . When maintaining the board becomes work in its own right, the tooling has lost sight of that goal. The name pinto comes from the Japanese word ピント “focus.” That is also the design intent: keep the team's attention on the Product Backlog, the Sprint, and the work flowing across the board. pinto deliberately stays small. It starts quickly, keeps dependencies and vocabulary limited, stores durable data as readable files, and excludes project-suite features such as Gantt charts and CRM. Your backlog belongs in the repository Running pinto init creates a .pinto/ directory beside your code. Each PBI is a Markdown file with TOML frontmatter. Here is a real item from pinto's own backlog: +++ id = "P-2" title = "Investigate and fix Windows CI while retaining Windows support" status = "done" rank = "j" labels = ["ci", "windows"] created = "2026-07-15T06:24:58.731847Z" updated = "2026-07-15T09:34:50.653786Z" +++ # Summary Investigate, verify, and fix the current Windo

Henrique Sasaki Yuya 2026-07-16 02:35 👁 6 查看原文 →
Dev.to

How I saved over ₹50,000 in taxes as a freelance dev using Section 44ADA (and templates that helped me do it)

Freelancing in software development sounds like the ultimate dream: Work from anywhere 🌴 Choose your own projects 💻 Set your own rates 💰 But for developers in India, the reality often looks like this: A client requests "just one small change" for the 15th time. You deliver the code, and the client suddenly goes ghost. You get your payment but realize 10% was deducted, and you have no idea how to file your taxes. You realize you are charging ₹500/hour but spending half your time on unpaid admin work. I've been there. Most Indian developers start freelancing with great coding skills but zero business systems. Here is a step-by-step guide on how to protect yourself, price your work correctly, and handle Indian taxes (GST/TDS) like a professional. Stop Doing Unpaid Requirements Gathering (Use a Questionnaire) When a client says: "I want an e-commerce website, how much will it cost?" If you jump on a call and spend 2 hours discussing it without any commitment, you are losing money. The Fix: Before scheduling a call, send them a structured Project Intake Questionnaire. Ask about: Business model and target audience. Tech stack preferences & required integrations (Stripe, Twilio, WhatsApp API). Brand assets and Figma designs (Do they have them, or do you need to design too?). Budget range & expected timeline. If a client refuses to fill out a 10-minute form, they aren't serious about hiring you. Eliminate "Scope Creep" with a Scope Document "Scope Creep" is when a client keeps adding features without paying extra. It kills developer profit margins. The Fix: Always draft a Project Scope Document before signing a contract. It must have two clear sections: Included in Scope: Detailed feature list (e.g., "User login via Google, 3 database models, responsive UI"). EXPLICITLY OUT OF SCOPE: Things you will NOT do (e.g., "Logo design, copywriting, free server maintenance post-launch"). Include a Change Request (CR) clause: "Any feature requested outside Section 1 will be billed at

Hemant A 2026-07-16 02:35 👁 7 查看原文 →
Dev.to

DPDP compliance costs for Indian startups: what to budget before 13 May 2027

DPDP compliance costs for Indian startups: what to budget before 13 May 2027 Summary. Full compliance with India's Digital Personal Data Protection Act is due on 13 May 2027. That is the date consent, notice, security safeguards, breach intimation and data-principal rights all become enforceable, and it is roughly 10 months away. The DPDP Rules 2025 were notified on 13 November 2025 and land in three phases: the Data Protection Board of India stood up immediately, penalties and Consent Manager registration begin on 13 November 2026, and everything else bites on 13 May 2027. The penalty schedule is not proportionate to your size: up to ₹250 crore for failing reasonable security safeguards, ₹200 crore for failing to notify a breach, and ₹150 crore for missing Significant Data Fiduciary obligations. There is no revenue or headcount exemption. The cost gap is where founders get hurt. Vendors routinely quote ₹15 lakh to ₹2 crore for DPDPA compliance, while a startup under 10,000 users can be substantively compliant for under ₹50,000 a year. India's privacy and data governance market is worth roughly $1 billion to $1.5 billion today, per IDfy founder Ashok Hariharan speaking to Inc42 in April 2026, and a lot of that revenue depends on you not reading the rules yourself. This is a budgeting guide, not a legal opinion. The rules are short. Read them, then price the work. The deadline that actually matters There are three dates, and only one of them is a real deadline for most startups. Phase Date What switches on Does it affect a typical startup? Phase 1 13 November 2025 Data Protection Board of India established, Rules notified No direct obligation, but the Board can already receive complaints Phase 2 13 November 2026 Consent Manager registration opens, penalty framework and enforcement powers begin Only if you intend to register as a Consent Manager Phase 3 13 May 2027 Notice, consent, security safeguards, breach intimation, retention, children's data, data-principal righ

Manu Shukla 2026-07-16 02:34 👁 7 查看原文 →
HackerNews

Ask HN: Are AWS Certs worth getting for experienced Devs?

I worked for big tech out of undergrad (mostly frontend/mobile for a few years) moved on to work at a few startups where I naturally switched to do more backend/cloud infrastructure work. I never got a 'formal' education in terms of masters or any kind of certs. Would it be worth it for me to start getting some Certs (like AWS solutions architect - associate/professional) if I want to switch my career towards more solutions design/consultation? I don't know many people personally that went this

Gold-Ask-lx 2026-07-16 02:30 👁 1 查看原文 →
The Verge AI

Suno snatched millions of songs from YouTube, Genius, and Deezer

Suno data obtained in a hacking incident has exposed that the AI music generator was trained by scraping millions of songs and lyrics from online audio platforms, including YouTube Music, Deezer, and Genius, 404 Media reports. Given that Suno has avoided revealing what's in its training datasets and how they were acquired, this a rare […]

Jess Weatherbed 2026-07-16 01:48 👁 6 查看原文 →