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

今日精选

HOT

最新资讯

共 31547 篇
第 1088/1578 页
AI 资讯 Dev.to

How to Build a WordPress Plugin Licensing System from Scratch (Without Freemius)

If you're shipping a commercial WordPress plugin, sooner or later you'll need a licensing system. Something that lets paying customers activate the plugin on their site, locks it to that domain, and stops people from sharing the same key across fifty sites. The default answer in the WordPress world is Freemius or EDD Software Licensing. They're great. They're also a revenue share, a third-party dependency, and a black box you don't control. When we built RideCab WP , a commercial WooCommerce taxi booking plugin, we decided to build our own. Here's the architecture, the code, and the gotchas we hit along the way. What a Licensing System Actually Needs to Do Before writing any code, get clear on the requirements. A real plugin licensing system needs to: Generate unique license keys when someone buys Let the customer activate the key on their site Bind that key to one (or N) domains Validate the key periodically so revoked or expired keys stop working Handle deactivation when a customer moves to a new domain Fail gracefully — never lock a paying customer out because your license server hiccuped Optionally: deliver plugin updates only to valid license holders We'll cover 1 through 6 in this post. Update delivery is a separate beast and I'll write it up next. The Architecture The system has two halves that live in two different places. The license server runs on your own infrastructure — for us, it's a WordPress must-use plugin (mu-plugin) on the same WordPress install that powers our marketing site. It: Stores license keys in a custom database table Exposes a small REST API for activate, deactivate, and validate calls Provides an admin dashboard to view, create, and revoke keys The client is a PHP class shipped inside the commercial plugin (RideCab WP, in our case). It: Adds a license settings page to the plugin Calls home on activation Caches the validation result Re-validates quietly in the background Two pieces, talking over HTTPS, with the customer's domain as the b

Canopus agency 2026-06-17 17:53 14 原文
AI 资讯 Dev.to

The two causes of your token bill

Originally published on the Sieve blog . Sieve is an open-source (Apache 2.0) context-reduction proxy — I work on it, and I've tried to keep this post about the problem rather than the tool. If you run an LLM agent for real work, the bill is the part nobody warned you about. It starts small, it grows with use, and the worst of it is invisible — most of what you pay for on any given turn is text the model has already seen, or text you never meant to send. There's a temptation to treat this as one problem with one fix. It isn't. An agent's token bill has two distinct causes, and they need two genuinely different kinds of tool. This post is about telling them apart — because once you can, the question stops being "which tool wins" and becomes "which of my two problems am I looking at right now." The bill is mostly things you didn't choose Start with where the tokens actually go, because it's rarely where people assume. When your agent calls a tool, the model doesn't just pay for your request — it pays for the machinery of asking. Anthropic's own pricing documentation spells this out: the tools parameter alone adds hundreds of tokens of schema to every request, the bash tool adds a fixed overhead, and a single web fetch pulls the fetched page straight into your context — "Average web page (10 kB): ~2,500 tokens... Research paper PDF (500 kB): ~125,000 tokens". A tool result you glance at once and never need again can cost more than the entire conversation around it. Now add the part that repeats. On every turn, a typical agent re-sends its system prompt, its full tool catalogue, its persona, and the conversation so far. The variable part of the request — what you actually typed — is often the smallest thing in the payload. The fixed overhead, multiplied across every turn of a long session, is the bill. So the cost has two shapes, and they're not the same shape: Verbose machine output — JSON tool results, logs, search dumps, fetched pages, code listings. Big, one-off, an

Azard Tennant-Hosein 2026-06-17 17:49 6 原文
AI 资讯 Dev.to

A password and a PIN aren't multifactor: the Security+ authentication trap

If you have spent any time on SY0-701 practice questions, you have hit at least one that looks trivial and then quietly fails you. Authentication factor questions are a favorite for this. The scenario sounds secure, the answer feels obvious, and the obvious answer is wrong. Here is the version that catches people. A login asks for your password, then a PIN, then your mother's maiden name. Three prompts, three steps. Is that multifactor authentication? No. It is single-factor wearing a costume. Factors are categories, not steps The exam wants you thinking about authentication in terms of categories , not how many boxes you fill in. There are three classic factors: Something you know (knowledge): a password, a PIN, a security question, a passphrase. Something you have (possession): a phone running an authenticator app, a hardware token, a smart card, a code texted to a device you are holding. Something you are (inherence): a fingerprint, a face scan, an iris pattern, a voiceprint. Multifactor authentication means pulling from different categories. A password (know) plus a code from your authenticator app (have) is two factors. A password plus a PIN plus a security question is still one factor, because all three are things you know. Stacking more knowledge on top of knowledge never changes the category. That is the entire trick. The question piles on prompts so it feels layered, and the count baits you into answering "three things, must be multifactor." Read for the category, not the quantity. The two factors people forget SY0-701 also expects you to recognize two more that sit just outside the classic three: Somewhere you are (location): access is allowed or blocked based on geolocation or which network you are on. A login permitted only from inside the corporate IP range leans on this. Something you do (behavioral): how you type, your gait, the rhythm of your swipe. This is the fuzziest one, and the exam treats it as a real but supporting signal. You will not see the

TiltedLunar123 2026-06-17 17:47 7 原文
AI 资讯 The Verge AI

The next humanoid robot might not look human at all

The next humanoid robot might not have a head. It might not have legs. It might even sit on a wheeled base and fold down like a deck chair. But, as Genesis AI puts it, "humanoid robots don't need to look human." That explains the look of Eno, the new robot from the French startup […]

Robert Hart 2026-06-17 17:46 9 原文
AI 资讯 Dev.to

Day 37 of Learning MERN Stack

Hello Dev Community! 👋 It is officially Day 37 of my continuous streak toward mastering the MERN stack! Yesterday, I configured clean structural routing to map pages like /about or /contact . Today, I advanced further into Prashant Sir's (Complete Coding) backend roadmap to tackle an essential data communication concept: URL Parsing and Query Parameters . When a user searches for something or filters products on an e-commerce platform, that data is passed directly inside the URL string. Today, I learned how to intercept and decode that data natively! 🧠 Key Learnings From Node.js Lecture 5 (The URL Module) An incoming URL is much more than just a text path; it is a complex structured object. Here is the technical breakdown of how I dissected it today: 1. Ingesting the Native url Module I explored Node's legacy and modern URL parsing engines. By passing the raw req.url string into the parser, Node breaks down the web address into a fully accessible metadata object. 2. Dissecting Pathname vs Query String I learned the difference between the structural endpoint location and the dynamic data payload: Pathname: The core location path (e.g., /search or /api/products ). Query: The actual data key-value strings attached after the question mark ? (e.g., ?name=ali&id=7 ). javascript const http = require("http"); const url = require("url"); const server = http.createServer((req, res) => { // Parsing the URL path and query parameters together cleanly let parsedUrl = url.parse(req.url, true); let pathname = parsedUrl.pathname; let queryData = parsedUrl.query; // Converts query text into a clean JS Object! if (pathname === "/search") { res.writeHead(200, { "Content-Type": "text/plain" }); res.end(`Searching logs for user: ${queryData.name} with ID: ${queryData.id}`); } else { res.end("Standard Endpoint View"); } }); server.listen(8000);

Ali Hamza 2026-06-17 17:46 9 原文
开发者 Dev.to

What I Learned Building My First Go Project (go-reloaded)

During my first week at Zone01 Kisumu, I worked on a project called go-reloaded . It was my first real hands-on experience using Go, and it helped me understand not just the language, but also how to think like a developer. In this article, I’ll share what I learned, the challenges I faced, and the key concepts that made everything click. What the Project Was About The goal of the project was to build a small Go program that works with command-line arguments and processes input using Go’s standard libraries. This was my first time interacting deeply with: os package command-line arguments (os.Args) basic Go program structure At first, it felt confusing, but step by step, things started to make sense. What I Learned How command-line arguments work in Go I learned that Go provides access to raw input from the terminal using: os.Args This returns a slice of strings where: os.Args[0] is the program name os.Args[1:] are the actual inputs Working with the os package The os package became one of the most important parts of the project. I used it to: Read input arguments Handle program execution flow Understand how programs interact with the system This helped me realize that Go is very close to the system level compared to JavaScript. Breaking problems into smaller steps One of the biggest lessons wasn’t about code—it was about thinking. Instead of trying to solve everything at once, I learned to: Understand the problem first Break it into smaller tasks Solve each part step by step This made debugging much easier. Challenges I Faced At the beginning, I struggled with: Understanding how os.Args works Knowing where to start in the code Handling errors when inputs were missing Sometimes I would get stuck just trying to figure out what the program was actually receiving. But debugging helped me a lot. Printing values at each step made things clearer. Key Takeaways Go is very explicit compared to JavaScript The os package is powerful for system-level interaction Command-line ar

Collins Kipruto 2026-06-17 17:42 7 原文
AI 资讯 Dev.to

Mavka and the June Solstice: A Magical Forest Energy Quest

This is a submission for the June Solstice Game Jam What I Built Perfume Calendar: June is a small atmospheric adventure game inspired by nature, folklore, and the changing moods of June. Players take on the role of Mavka , a forest spirit, and travel across a calendar-shaped map representing the 30 days of the month. Each day has a different nature element—forest, sun, water, or mist—that affects the player's energy. The goal is to make strategic movement choices, gather enough energy from beneficial days, and reach June 21st , the summer solstice, with at least 10 energy points. If successful, Mavka awakens the forest and completes her journey. My intended goal was to create a simple but thematic experience where a calendar becomes an interactive game board rather than just a way to track dates. I wanted players to feel like they were moving through a living month, with each day offering different opportunities and risks. The game relates to the challenge theme by transforming a calendar into the core gameplay mechanic. Instead of simply displaying dates, the days themselves become locations that influence the player's progress. The June setting, seasonal energy, and the solstice objective reinforce the idea of time, nature, and progression through a month in a playful and interactive way. Video Demo Code wailixi / Mavka Game How I Built It I built the game using HTML, CSS, and JavaScript without any external libraries. The 30 days of June are displayed as a 6×5 grid , where each day has a terrain type (forest, sun, water, or mist) that affects the player's energy. A key design choice was turning the calendar into a navigable map. Players move Mavka between days, collect energy, and plan their route to reach June 21st with enough energy to win. Movement restrictions add a simple strategy element, while color-coded terrain helps communicate each day's effect. My goal was to create a small, atmospheric game that transforms a calendar into an interactive adventure in

Anton Krasko 2026-06-17 17:39 9 原文
AI 资讯 Dev.to

I've Been Trying to Build Something Online Since 2020. Still Not There. Looking for Advice.

In 2020, I discovered the idea that people could make money online by building things. Since then, I've tried almost everything. I started websites. I learned design. I learned marketing. I built digital products. I launched projects that nobody used. I launched projects that got almost no traffic. Every year I thought: "Maybe this is the year it finally works." But somehow I always ended up back at zero. The frustrating part is that I didn't quit. For 5 years I've been consistently learning new skills: Graphic design Website building Digital products Content marketing SEO Social media Yet I still haven't reached the point where I can say: "Yes, this business is working." Recently I spent weeks building a library of 500+ Notion templates. I launched it. The result? Almost nothing. No viral launch. No overnight success. Just another reminder that building is easier than distribution. That's the lesson that keeps hitting me: Building isn't my problem anymore. Getting attention is. I can create products. I can design landing pages. I can write content. But distribution still feels like a puzzle I'm trying to solve. So I'm asking developers, founders, and creators who are further ahead: If you were starting again today with no audience and no reputation, what would you focus on? Would you: Double down on content? Build more products? Focus entirely on one distribution channel? Spend more time networking? I'm genuinely curious because after 5 years of trying different things, I'm convinced the answer isn't "work harder." It's probably "work differently." I'd love to hear your advice.

Jaabir Yusuf 2026-06-17 17:39 8 原文
AI 资讯 HackerNews

Show HN: High-Res Neural Cellular Automata

Neural CAs model self-organizing pattern formation. Now they can generate patterns at HD resolution in real-time, enabled by turning each CA cell into a Neural Field. Try 3 demos: grow a pattern from a seed (and damage it, it heals), synthesize PBR textures that can regenerate, or create 3D textures like clouds.

esychology 2026-06-17 17:28 4 原文
AI 资讯 MIT Technology Review

Entrepreneurs in Nairobi make the case for going solar

Most of Kenya’s power grid runs on renewables. But with 25% of communities lacking centralized electricity, the nation is looking to off-grid solar to hit its goal of delivering universal electricity access by 2030 without driving up emissions. The ever-­improving economics of solar technology have helped. A couple of years ago, a panel cost about…

Geoffrey Kamadi 2026-06-17 17:00 10 原文
AI 资讯 MIT Technology Review

Hacking the atmosphere: Geoengineering gets a reality check

Jim Franke pulls away the cover page of a presentation on the wraparound desk in his office, revealing an illustration of an odd-­looking aircraft with massive wings stretching out from a stubby fuselage. The uncrewed plane is soaring thousands of meters higher than commercial jets fly—so high you can see the curvature of the Earth.…

James Temple 2026-06-17 17:00 10 原文
AI 资讯 InfoQ

GitHub Copilot Desktop App Targets Parallel Agentic Workflows

GitHub has introduced the GitHub Copilot app, a desktop control centre for agent-native development that aims to keep engineers in charge while AI agents handle more coding work. Mario Rodriguez writes on the GitHub blog that the recent wave of coding agents has brought faster delivery but also "disjointed workflows, more context switching, and too much time spent reviewing agent-generated code". By Matt Saunders

Matt Saunders 2026-06-17 16:00 11 原文