AI 资讯
How to Generate Verifiable PDF Certificates in Laravel
When a learner finishes a course they want a certificate that behaves like a document: something they can print at full quality, attach to a job application and that an employer can check is genuine. In this tutorial you'll build exactly that in Laravel: a Blade-designed certificate rendered as a vector PDF, with a QR code that resolves to a verification page and an email that delivers it automatically. This post originally appeared on Accreditly as How to generate verifiable PDF certificates in Laravel . Keep the design in Blade The certificate is an ordinary Blade view. Everything lives in one file, styles inline, so the markup you preview in the browser is exactly what gets rendered. If you want a designed starting point rather than a blank page, the certificate of completion template is a good base to adapt. {{-- resources/views/certificates/template.blade.php --}} <!doctype html> <html> <head> <meta charset="utf-8"> <style> body { font-family: Georgia, serif; color: #1a2233; margin: 0; } .certificate { padding: 60px; border: 6px double #b28a2f; margin: 24px; text-align: center; } .heading { font-size: 15px; letter-spacing: 4px; text-transform: uppercase; color: #b28a2f; } h1 { font-size: 44px; margin: 24px 0 8px; } .course { font-size: 22px; margin: 4px 0 28px; } .issued { font-size: 15px; color: #5a6478; } .qr { margin-top: 36px; } .verify-url { font-size: 12px; color: #5a6478; } </style> </head> <body> <div class="certificate"> <p class="heading">Certificate of Completion</p> <h1>{{ $certificate->user->name }}</h1> <p class="course">has completed {{ $certificate->course }}</p> <p class="issued">Issued {{ $certificate->issued_at->format('j F Y') }}</p> <div class="qr"> {!! QrCode::size(110)->generate(route('certificates.verify', $certificate)) !!} </div> <p class="verify-url">{{ route('certificates.verify', $certificate) }}</p> </div> </body> </html> Two things are doing quiet work here. The design flows like a document rather than being pinned to fixed pixel
AI 资讯
How to Use Kimi K3 with Claude Code, Cursor, and Cline
Kimi K3 took first place in Arena's Frontend Code evaluation the week it launched, and it holds a 1M-token context — but Moonshot doesn't ship a coding agent, and your coding agent doesn't ship Kimi K3. Claude Code is locked to Anthropic's API by default, Cursor to its own backend, Cline to whatever key you hand it. LLM Gateway bridges that gap. It speaks both the Anthropic and OpenAI API formats, so the tools you already use can run Kimi K3 — or any of 200+ models — with a base-URL change. Here is the exact setup for each tool. Kimi K3 in Claude Code Claude Code talks to any endpoint that speaks Anthropic's /v1/messages format, which LLM Gateway does natively. Three environment variables: export ANTHROPIC_BASE_URL = https://api.llmgateway.io export ANTHROPIC_AUTH_TOKEN = $LLM_GATEWAY_API_KEY export ANTHROPIC_MODEL = kimi-k3 claude That's the whole migration. Every request now routes through LLM Gateway to Kimi K3, and every request shows up in your dashboard with its exact cost, token counts, and cache-hit rate. One refinement worth adding: Claude Code uses a second, smaller model for routine background work, and you can point it at something cheap — or free: export ANTHROPIC_SMALL_FAST_MODEL = glm-4.7-flash-free That puts K3 on the hard reasoning and a $0 model on the housekeeping. Kimi K3 in Cursor Cursor routes its chat / plan panel (Cmd/Ctrl + L) through a custom OpenAI-compatible endpoint. Setup: Open Cursor Settings → Models Add your LLM Gateway key under OpenAI API Key Enable Override OpenAI Base URL and set it to https://api.llmgateway.io/v1 Add kimi-k3 as a custom model and select it Be aware of the boundary: Cursor's Composer, inline edit (Cmd/Ctrl + K), and autocomplete are locked to Cursor's own backend and will not route through any external endpoint. Plan and chat with K3's full 1M context in Cursor; if you want K3 driving the actual agent loop, use Claude Code or Cline instead. Kimi K3 in Cline Cline is the straightforward one — it's built to bring y
AI 资讯
Best Free AI Video Generators: Sora vs. LTX Desktop
The short answer is: while OpenAI Sora offers unmatched visual quality and physics rendering, it remains restricted behind a paid subscription structure. For creators who want a completely free, unlimited AI video generator, the newly released open-source LTX Desktop app by Lightricks allows you to run the LTX-2.3 video model locally on your own computer with zero usage costs or filters. The AI Video Paywall Frustration If you have tried building AI video content for YouTube, TikTok, or social marketing, you know how expensive it is. Platforms like Runway Gen-3 and Luma Dream Machine charge by the second. A simple five-second clip can cost up to fifty cents in API credits, making creative experimentation almost impossible for solo developers. OpenAI Sora is a powerhouse, but its high computational overhead means it will likely remain a premium, paid tool for the foreseeable future. To bypass this, our dev team set up the new open-source LTX Desktop application on our local workbench to see if local video generation is actually viable for production. Here is our hands-on review. |---|---|---|---| | OpenAI Sora | Closed Cloud | None (Paid Plan) | Cloud-Only | Cinema-grade physics, long multi-action shots. | | Runway Gen-3 | Closed Cloud | Daily Free Credits | Cloud-Only | Cinematic camera pans, high texturing quality. | | Wan2.1 | Open Weights | Free Hugging Face Spaces | 16GB VRAM (Local) | Photorealistic human movement, natural lighting. | | LTX-2.3 | Open Weights | LTX Desktop (Free) | 8GB VRAM (Local) | Fast generation speeds, local desktop interface. | Running Video Models Locally: The LTX Desktop Solution LTX Desktop, developed by Lightricks, is a standalone, open-source desktop application that lets you run their LTX-2.3 video generation model on consumer-grade graphics cards. Why LTX Desktop is a Game-Changer Low VRAM Footprint: Unlike HunyuanVideo or Wan2.1 which require massive 16GB-24GB VRAM cards to compile locally, LTX-2.3 is highly optimized and runs com
AI 资讯
The Simplex Method, Explained Like an Algorithm (with a Free Step-by-Step Solver)
If you have written any optimization code, you have met linear programming even if nobody called it that. "Maximize output without blowing the resource budget" is an LP problem, and the classic algorithm that solves it is the simplex method. It is worth understanding not because you will hand-code it (you'll usually call a solver), but because knowing how it moves makes you far better at modeling problems for it. Here is the algorithm stripped down to its logic. The problem shape Every LP problem has three parts: an objective function to maximize or minimize, e.g. Z = 5x1 + 4x2 a set of linear constraints, e.g. 6x1 + 4x2 <= 24, x1 + 2x2 <= 6 non-negativity: all variables >= 0 Geometrically, the constraints carve out a feasible region (a polytope). The optimum always sits at a corner of that region. The simplex method is just a smart way of hopping from corner to corner, uphill, until there is no higher corner to move to. The algorithm as pseudocode build initial tableau (add a slack variable per <= constraint) loop: compute Cj - Zj for each column if all (Cj - Zj) <= 0: break # optimal reached pivot_col = column with most positive Cj - Zj # entering variable ratios = RHS / pivot_col entries (only positive entries) pivot_row = row with smallest non-negative ratio # leaving variable pivot(pivot_row, pivot_col) # elementary row operations return solution from final tableau That's it. Four moves per iteration: score the columns, pick the entering variable, run the ratio test for the leaving variable, pivot. Repeat until the optimality condition holds. A quick worked run Take Maximize Z = 5x1 + 4x2 subject to 6x1 + 4x2 <= 24 and x1 + 2x2 <= 6. Add slack variables s1, s2, build the tableau, and iterate. The optimum lands at x1 = 3, x2 = 1.5, Z = 21. Two pivots and you're done. Simple on paper until the numbers get ugly. Where humans (and debugging) actually break The algorithm is clean. The arithmetic is not. A single wrong entry in one pivot silently corrupts every table
AI 资讯
Kubernetes Health Probes: Liveness, Readiness, and Startup Explained
You've deployed your app to Kubernetes. The pod starts — then it gets killed. Or it's running but no traffic reaches it. Or it takes 90 seconds to initialize and gets restarted in a loop. Every one of these problems traces back to the same root cause: misconfigured or missing health probes . Kubernetes gives you three types of probes: livenessProbe , readinessProbe , and startupProbe . Each serves a different purpose. Mix them up and your pods restart in infinite loops. Get them right and your deployments self-heal, scale correctly, and handle rolling updates without a single dropped request. Here's what each probe does, when to use it, and how to configure it for a real production service. 1. Liveness Probe: Is the Container Alive? The liveness probe answers one question: "Is this container still running correctly?" If the probe fails, kubelet kills the container and restarts it. livenessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 Use liveness probes for deadlock detection . If your app enters a state where it's alive but not making progress (a goroutine leak, a stuck mutex, an infinite loop), the liveness probe exposes that and triggers a restart. The #1 mistake people make: using the liveness probe to check external dependencies like databases or upstream APIs. Don't do this. If your database is down and your liveness probe fails, Kubernetes will restart your pod — but the database is still down. Restarting the app doesn't help, and now you have a crash loop on top of a DB outage. That's worse. Liveness probes should only check internal process health. Not database connectivity, not Redis, not upstream services. 2. Readiness Probe: Is the Container Ready for Traffic? The readiness probe answers: "Should this pod receive traffic?" If it fails, the pod is removed from all Service endpoints. It is not restarted. readinessProbe: httpGet: path: /ready port: 8080 periodSeconds: 5 failureThreshold: 2 successThre
AI 资讯
FDA Recall API: A Working Guide to openFDA Enforcement
The openFDA enforcement API is free, keyless, and well documented on the surface. It is also full of failure modes that return HTTP 200 with quietly wrong data. Every number and error string below was measured against the live API on 2026-07-20; anything I could not reproduce has been cut. Pick the right endpoint first There are four recall-shaped endpoints and they are not interchangeable. Choosing wrong gives you a different universe of records with no warning. Endpoint Records What it is drug/enforcement.json 17,793 Recall Enterprise System (RES) drug recalls device/enforcement.json 39,519 RES device recalls food/enforcement.json 29,224 RES food recalls device/recall.json 58,756 CDRH device recall database, a different schema entirely The three enforcement endpoints share their schema. device/recall.json does not: its fields include cfres_id , product_res_number , k_numbers , root_cause_description , event_date_posted , event_date_terminated and recall_status , and it has no classification field at all ( count=classification.exact returns HTTP 404 "Nothing to count" ). If you are filtering for Class I, you want an enforcement endpoint. The two families also refresh on different clocks. On 2026-07-20 the three enforcement endpoints reported meta.last_updated of 2026-07-08, while device/recall.json reported 2026-07-17. The OR bug that silently returns the wrong answer This is the single most expensive trap, and it is undocumented. An unparenthesized OR discards every clause except the last one. All figures below are from food/enforcement.json . search=classification:"Class I" OR state:"CA" returns 4,003 - exactly the count for state:"CA" alone. Reverse the operands and you get 12,809 - exactly classification:"Class I" alone. Wrap it: search=(classification:"Class+I"+OR+state:"CA") returns 14,822 in both orders. That is the real union (12,809 + 4,003 - 1,990 overlap, and the AND of the two clauses does return 1,990). No error is raised in any case. The nastier varia
AI 资讯
Uma Máquina, Duas Contas Claude, Zero Estado Compartilhado
Vi um post legal esses dias sobre rodar duas contas do Claude Code na mesma máquina compartilhando tudo entre elas: mesmas skills, mesmos servidores MCP, mesmos hooks. O artigo era: "Um cérebro, duas carteiras" Eu rodo, exatamente o oposto, e acho que pra muita gente o oposto é a escolha certa. Minhas duas contas não são uma pessoal e uma reserva pra quando os créditos acabam. Uma é pessoal, outra é de trabalho. A última coisa que eu quero é meus MCP servers de trabalho, meus hooks de trabalho e meu histórico de projeto de trabalho vazando pras sessões pessoais. Então em vez de ligar as duas, eu mantenho elas separadas de propósito . O setup inteiro O Claude Code guarda o estado num diretório de config ( ~/.claude por padrão) e lê a variável CLAUDE_CONFIG_DIR pra apontar pra outro lugar. Esse é o único mecanismo que você precisa. Sem shim, sem symlink, sem jq . bash # ~/.zshrc # Claude Code: contas isoladas (pessoal vs trabalho) # Cada uma usa um CLAUDE_CONFIG_DIR proprio -> credenciais/sessao separadas. # ~/.claude = pessoal (default) # ~/.claude-work = trabalho claude-work () { CLAUDE_CONFIG_DIR = " $HOME /.claude-work" claude " $@ " ; } claude-personal () { CLAUDE_CONFIG_DIR = " $HOME /.claude" claude " $@ " ; } # 'claude' sozinho continua sendo a conta pessoal. source ~/.zshrc claude-work # pede login OAuth da conta de trabalho, uma vez só Usei funções de shell em vez de alias por um motivo: a função repassa "$@" limpo, então claude-work --resume abc e claude-work chat funcionam sem a variável de ambiente vazar pra nada mais no shell. Um alias faria quase o mesmo aqui, mas a função deixa a passagem de argumentos explícita. É isso. claude puro é pessoal. claude-work é trabalho. Nada é compartilhado, e é aí que mora a graça. Por que eu não compartilho o cérebro A versão de cérebro compartilhado faz symlink de skills , plugins , settings.json e dá merge no bloco mcpServers entre as duas contas pra elas se comportarem igual. Se as suas duas contas são de fato a mesm
AI 资讯
Designing a Version-Aware Game Wiki for Early Access
Early Access games create a documentation problem that ordinary wikis do not handle well: the facts can change faster than search results, community posts, and copied tables are updated. A page can look polished and still be wrong for the current build. I have been working on an independent Subnautica 2 player wiki, and the most useful engineering lesson has been to treat every guide, map marker, and item row as versioned data rather than timeless prose. This post describes the workflow without assuming any particular framework. 1. Put provenance next to the fact For every structured record, keep at least: the game build or patch it was checked against; the source type: official note, in-game observation, or community report; the observation date; a confidence state such as verified, provisional, or disputed; a stable identifier that survives display-name changes. A user should not have to trust a page because it looks complete. They should be able to see whether a coordinate came from the current build and whether another player can reproduce it. 2. Separate stable identity from mutable labels Names, descriptions, recipes, and locations may change. Use an internal key as the identity and keep display text as versioned attributes. This prevents an item rename from creating a second logical entity or breaking every inbound link. The same rule helps with localization: English and translated labels point to one entity, while the source and verification state remain shared. 3. Model maps as evidence, not decoration An interactive map should not be a pile of pins. A useful marker contains coordinates, category, build, evidence, verification state, and a short player-facing note. If a patch moves or removes the object, preserve the history and mark the old observation as superseded. This also makes filters honest. “Show verified markers for the current build” is a meaningful query; “show everything ever imported” is not. 4. Make guides depend on structured facts Low-spoil
AI 资讯
Golang in Hinglish
A simple tutorial series on go in Hinglish. Jitna mujhe aata hai utna, aur zyada tar mere notes se! Note: Me non-native speaker hu to spelling mistakes to honge, is liye Hinglish spellings aur grammar ke liye main AI use karunga, par dev ke bot ko pata nahi chalega kyuki ye English nahi hai 😉 Parichay / Intro Shuruat hum isse karenge ki Go kya hai aur uske fayde kya hain. Pehle hum Wikipedia ki definition dekhte hain: To, Go ek aasan language hai. Go compiled language hai, matlab ek bar compiler ko humne apna code diya to wo ek executable file dega jo sidha hum chala sakte hain bina kisi aur dependency ke, jaise ki Python ka interpreter. Dusri high-level languages jaise Python ya JavaScript se Go tez chalta hai. Garbage collected hai, yani C ki tarah hame memory ko manually manage karna nahi padega. Go ka istemal kahan hota hai? APIs aur Web Servers banane me Network Programming aur Distributed Systems me Cloud-Native Applications aur Microservices banane me DevOps aur Infrastructure Automation me Command Line (CLI) Tools banane me Agar upar ki baatein abhi samajh na aayein, to koi baat nahi. Filhal itna samajh lijiye ki Go ka istemal bahut jagah hota hai to job ke liye kaam aayega. To ye thi Go ki kahani, CSM ki zubani... (jo chalti rahegi!) Aur haan, har post ke aakhir me meri ek shayari hogi, jo aapko guru dakshina ke roop me jhelni padegi! 😄 ख़यालों को बातों में उलझाए रखना । इस पल के हक़ीक़त को सुलझाए रखना । शिद्दत से चाहा जो मिल कर रहेगा । चेहरे पे मुस्कान थोड़ी बनाए रखना ।। -csm
AI 资讯
PowerToys Hosts File Editor alternative (when you need more than an edit box)
Microsoft PowerToys includes a Hosts File Editor. It is free, signed, and already on many Windows machines. It is a good editor. It is not always a good hosts workflow . What PowerToys Hosts does well Opens the real Windows hosts file with the right elevation story Simpler than hunting C:\Windows\System32\drivers\etc\hosts in Notepad Free if you already use PowerToys Fine for a handful of static lines When people search for an alternative You switch environments all day Local shop in the morning, client staging after lunch, cutover IP at night. An editor with one big file turns into commented chaos. You want named profiles you can toggle, not archaeology in comments. You also use a Mac or Linux box PowerToys is Windows-only. Your hosts process should not fork by OS if the team shares domain names. You forget ipconfig /flushdns Same bug as every other hosts tool without auto flush: file correct, browser wrong. Alternatives on Windows SwitchHosts Free, open source, profiles, also runs on Mac/Linux. Best PowerToys alternative when you need environment switching and maybe multi-OS later. Locahl Paid one-time. Windows, macOS, Linux. Automatic DNS flush and backups. Best when PowerToys feels too manual and you want the apply step to include flush + safety. Notepad as Administrator Still works. Still easy to save the wrong copy or skip flush. Only fine for rare edits. Hostly / CLI hosts switchers Interesting if you want hosts open Dev from scripts. Check that the project is maintained before you depend on it in CI. Feature snapshot (Windows view) Tool Profiles Auto flush Multi-OS Cost PowerToys Hosts Limited No No Free SwitchHosts Yes No Yes Free Locahl Yes Yes Yes One-time Notepad Admin No No Manual Free Practical upgrade path Keep PowerToys for now if you only have 5 stable lines When you start commenting / staging blocks every week, move to SwitchHosts or Locahl Always backup before the first import After every apply: ipconfig /flushdns ping myapp .test If PowerToys is
AI 资讯
JavaScript Under the Hood #1: From Source Code to the Call Stack
Every time you run a JavaScript program, a lot happens behind the scenes. Variables are allocated memory, execution contexts are created, functions are pushed onto the call stack, and the engine starts executing your code. But before we dive into all of that, let's first understand what JavaScript actually is and why it was created. An Introduction to JavaScript What is JavaScript? JavaScript is a programming language that was originally created in 1995 by Brendan Eich in just 10 days while he was working at Netscape. JavaScript is a high-level programming language primarily used to make web pages interactive. Today, it is also used to build servers, mobile applications, desktop software, and much more. Why was JavaScript created? JavaScript was created to make web pages alive . But what does "alive" mean? it means adding interactivity (e.g., animations, clickable buttons, popup menus, etc.) to the static web pages. Today, JavaScript isn't limited to browsers. With runtimes like Node.js, it can also be used to build backend applications and APIs, which allow you to add more functionality to a website. Did you know? When JavaScript was created, it initially had another name: “LiveScript”. Where can JavaScript be used? In your browser — every interactive website uses it (Facebook, YouTube, Gmail). On servers — through Node.js, you can build backend APIs. In mobile apps — using frameworks like React Native. In desktop apps — VS Code itself is built using JavaScript (Electron). In smart devices, games, robots, and much more. Now that we know what JavaScript is, another question comes to mind: How does JavaScript execute my code? Before answering that, let's first understand Who executes my code? . The answer is: The JavaScript Engine The JavaScript Engine We already know what JavaScript is, but what exactly is this engine ? The "Engine" A JavaScript engine is a piece of software responsible for executing JavaScript code. Every environment that runs JavaScript, whether i
AI 资讯
Understanding Callback Functions in JavaScript
Introduction A callback function is one of the most important concepts in JavaScript. It allows one function to execute another function after completing a task. Callback functions are widely used in JavaScript for handling asynchronous operations such as API requests, file reading, event handling, and timers. What is a Callback Function? A callback function is a function that is passed as an argument to another function and is executed later. In simple words: A callback is a function that is called after another function finishes its work. Syntax function greeting () { console . log ( " Good Morning! " ); } function welcome ( callback ) { console . log ( " Welcome! " ); callback (); } welcome ( greeting ); Output Welcome! Good Morning! Explanation greeting() is the callback function. welcome() accepts a function as a parameter. callback() executes the greeting function after printing "Welcome!". Real-Life Example Imagine you order food at a restaurant. You place the order. The chef prepares the food. After the food is ready, the waiter serves it. Here, serving the food happens only after preparation is complete. This is exactly how callback functions work. Example 1: Email Sending function emailSent () { console . log ( " Email Sent Successfully! " ); } function sendEmail ( callback ) { console . log ( " Sending Email... " ); callback (); } sendEmail ( emailSent ); Output Sending Email... Email Sent Successfully! Example 2: Download File function downloadComplete () { console . log ( " Download Complete! " ); } function downloadFile ( callback ) { console . log ( " Downloading File... " ); callback (); } downloadFile ( downloadComplete ); Output Downloading File... Download Complete! Why Do We Use Callback Functions? Callback functions are useful because they: Execute code only after another task finishes. Improve code reusability. Handle asynchronous operations. Make event handling easier. Help avoid repeating code. Where Are Callback Functions Used? Some common u
产品设计
📱 MyZubster Mobile App: Development Guide
Liquid syntax error: Variable '{{% raw %}' was not properly terminated with regexp: /\}\}/
AI 资讯
Streaming LLM responses in TypeScript: SSE, ReadableStream, and the React 19 useChat hook.
Streaming LLM responses in TypeScript: SSE, ReadableStream, and the React 19 useChat hook. The first time I wired an LLM response that streamed token by token instead of arriving as one lump after 4 seconds, I shipped it to production the same afternoon. The difference in perceived speed is that obvious to anyone who has used ChatGPT and then tried a non-streaming competitor. Users will wait 8 seconds if they can see the cursor moving. They will not wait 4 seconds for a blank screen. This tutorial walks the full stack from scratch. By the end you have a working Next.js API route that streams from an LLM over Server-Sent Events, a frontend that parses the stream manually with ReadableStream , and then the same UI rebuilt with the Vercel AI SDK's useChat hook so you can see what the abstraction actually buys you. TL;DR Layer What you build Key API Next.js route Streams LLM output as SSE streamText + toUIMessageStreamResponse Vanilla client Parses the stream by hand ReadableStream , TextDecoderStream React 19 client Managed state + cancellation useChat from ai/react Edge cases Backpressure, cancel, tool chunks AbortController , partial JSON guard 1. Why streaming matters A standard fetch returns after the entire response body is ready. For short completions, that is fine. For anything over 100 tokens, users see a spinner, then a wall of text, then confusion about whether the app is fast or slow. Streaming changes the shape of that experience. The first token lands in under 300ms for most hosted models. The user starts reading while the model is still writing. Perceived latency drops by 60 to 70 percent even if the total time to complete the response does not change. Cost transparency is the second reason to care. When you stream, you count tokens as they arrive. If your route has a budget ceiling and the response is going to blow past it, you can cut the stream at 800 tokens without ever waiting for the full completion. That cut is not possible with a blocking call. 2.
AI 资讯
Resolviendo los 404 de Google Search Console
Tres semanas después de publicar un sitemap dinámico que orgullosamente listaba cada perfil de miembro, Google Search Console me dijo que esos perfiles eran un error. No con un error de plano, sino con dos veredictos más callados: Soft 404 y Duplicada sin canónica seleccionada por el usuario . Esta es la historia de leer ese reporte, separar el ruido de la única señal real, y el arreglo, que fue quitar páginas del índice, no agregarlas. TL;DR El reporte "Por qué las páginas no se indexan" de Google es ~80% benigno por diseño. Aprende a triarlo o vas a perseguir fantasmas. Mis perfiles de miembros salieron marcados como Soft 404 (uno) y Duplicada sin canónica seleccionada por el usuario (otro). La misma causa raíz: el perfil público anónimo es deliberadamente flaco, un esqueleto con el username, todo lo demás es PII oculta a quien no ha iniciado sesión. Flaco + casi idéntico entre usuarios se lee como "página vacía" y "clúster de duplicados". No puedes arreglar un Soft 404 enriqueciendo una página que por contrato no tienes permitido enriquecer. Así que el arreglo es noindex,follow en la captura, más sacar las URLs del sitemap (un sitemap que lista una URL noindex es una autocontradicción que Google va a señalar). El modelo mental en una línea: una página que a propósito no tiene contenido para los visitantes anónimos no tiene nada que hacer en un índice construido para visitantes anónimos. El reporte que lo empezó todo El reporte de cobertura del índice, ordenado por número de páginas: Razón Fuente Páginas Descubierta, actualmente sin indexar Sistemas de Google 55 Duplicada sin canónica seleccionada por el usuario Sitio web 9 Página alternativa con etiqueta canónica correcta Sitio web 3 Página con redirección Sitio web 2 Rastreada, actualmente sin indexar Sistemas de Google 2 Soft 404 Sitio web 1 Excluida por etiqueta 'noindex' Sitio web 1 No encontrada (404) Sitio web 1 Bloqueada por acceso prohibido (403) Sitio web 1 Noventa y tantas URLs "sin indexar". El instint
AI 资讯
What Is a Pointer in C? A Beginner's Guide
What Is a Pointer in C? A Beginner's Guide If you're learning C and pointers are the moment things suddenly feel harder, you're not alone. Pointers trip up more beginners than almost any other concept in the language. But the core idea is simpler than it looks once you strip away the confusing syntax: a pointer is just a variable that stores an address instead of a value. A Variable Normally Stores a Value When you write int age = 25; , C sets aside a small chunk of memory, gives it a label called age , and stores the number 25 inside it. Every variable in your program lives somewhere in memory, and every location in memory has an address, similar to a house having a street address. Most of the time you don't think about that address at all. You just use the variable name and C handles the memory bookkeeping behind the scenes. What a Pointer Actually Stores A pointer is a variable, but instead of holding a regular value like a number or character, it holds the memory address of another variable. Here's what that looks like: int age = 25 ; int * agePointer = & age ; The & symbol means "give me the address of," and * when declaring a variable means "this variable is a pointer." So agePointer doesn't contain 25. It contains the address where 25 is stored. If you want to see the value at that address, you dereference the pointer using * again: printf("%d", *agePointer); would print 25, not the address. Why Not Just Use the Variable Directly? This is the question that trips up most beginners, and it's a fair one. If you already have age , why bother with a pointer to it? The real value of pointers shows up in a few common situations: Passing large data to functions. When you pass a variable to a function in C, it normally gets copied. For a single integer that's cheap, but for a large array or struct, copying is wasteful. Passing a pointer instead means the function works with the original data directly, without duplicating it. Modifying a variable inside a function. Nor
AI 资讯
Deploying MySQL on RDS and Joining Tables Like It's Production
Rds challenge lab devto post 🗄️🐬 aws #rds #database #tutorial Build Your DB Server and Interact With Your DB INTRO Did a hands-on AWS challenge lab on Amazon RDS. Task: spin up a managed database, connect from a Linux server, and run real SQL — create tables, insert data, join across tables. No hand-holding here, just requirements to figure out myself. Here's the walkthrough. SCENARIO Service: Amazon RDS Role: Cloud/DB Admin Goal: Launch RDS under set constraints, connect via EC2, run SQL (create, insert, select, join) ARCHITECTURE LinuxServer (EC2) sits in the Lab VPC — this is the client RDS instance (Aurora or MySQL) in the same VPC Security group lets LinuxServer talk to RDS Flow: LinuxServer -> MySQL client (port 3306) -> RDS -> tables STEP 1: LAUNCH THE RDS INSTANCE Constraints for this lab: Engine: Aurora (Provisioned) or MySQL — no serverless Template: Dev/Test or Free tier No standby instance (single-AZ only) Instance size: db.t3.micro to db.t3.medium Storage: gp2, up to 100 GB — no Provisioned IOPS Network: Lab VPC Security group must allow LinuxServer access MySQL only: turn off Enhanced Monitoring On-Demand only These limits keep costs in check — Provisioned IOPS and Multi-AZ are the fastest ways to blow up an RDS bill. Noted the master username, password, and endpoint — needed next. STEP 2: CONNECT TO THE LINUX SERVER Downloaded the PEM key, grabbed the LinuxServer address, connected over SSH: chmod 400 labsuser.pem ssh -i labsuser.pem ec2-user@<LinuxServer-address> This box is just the SQL client — it needs network access to RDS, nothing more. STEP 3: INSTALL MYSQL CLIENT AND CONNECT On the LinuxServer: sudo yum install mysql -y Connect using the master credentials from Step 1: mysql -h <rds-endpoint> -u <master-username> -p If it hangs, it's almost always the security group — check port 3306 inbound. STEP 4: CREATE THE RESTART TABLE CREATE DATABASE lab_db ; USE lab_db ; CREATE TABLE RESTART ( StudentID INT , StudentName VARCHAR ( 100 ), RestartCity VA
AI 资讯
Taiko RPC: The L2 With No Sequencer
Every OP Stack chain we've covered — Base, Unichain, Zora — has a sequencer: one privileged party that orders transactions, and the thing you're implicitly trusting for liveness and fair ordering. Taiko doesn't have one. It's a based rollup : Ethereum's own validators propose Taiko's blocks as part of normal L1 block production. That single architectural choice cascades into everything a developer cares about — liveness, finality, MEV, and reliability. And because Taiko is also a Type-1 zkEVM , your Ethereum tooling works with zero changes. Here's the map for chain ID 167000 . The essentials Taiko mainnet ( Alethia ) is chain ID 167000 , an EVM Layer 2 with: ETH as the gas token (18 decimals) — no separate gas token to source. ~12-second blocks , aligned with Ethereum's slot times — because block proposing rides on L1, the cadence follows L1. Type-1 zkEVM equivalence — the most Ethereum-equivalent zkEVM design. Contracts deploy bit-identically; opcode behavior is exact. Connecting is completely standard EVM: import { createPublicClient , http } from " viem " ; import { taiko } from " viem/chains " ; // chain ID 167000 const client = createPublicClient ({ chain : taiko , transport : http ( " https://rpc.swiftnodes.io/rpc/taiko?key=YOUR_API_KEY " ), }); await client . getBlockNumber (); // just works What "based" changes: no sequencer to trust — or to fail On a typical rollup, a sequencer receives your transactions, orders them, and produces L2 blocks ( what a sequencer does ). It's efficient, but it's also a single point of trust and a single point of failure — sequencer outages have taken major L2s offline for hours. A "based" rollup removes it entirely: Block proposing happens on Ethereum L1. Taiko blocks are proposed via L1 transactions, so Ethereum's proposers include them as part of normal block production. There is no separate Taiko sequencer. Liveness = Ethereum's liveness. As long as Ethereum is producing blocks, Taiko is producing blocks. There is no "the se
AI 资讯
How to build a reliable video-to-prompt pipeline
A video-to-prompt tool looks simple from the outside: upload a clip, wait a moment, and copy the result. The hard part is not generating text. It is preserving enough of the source video's structure that the prompt remains useful when another model interprets it. I learned this while working on a small video analysis workflow. Early versions produced fluent paragraphs, but they often dropped a camera move, merged two events, or placed dialogue in the wrong shot. The output sounded good and still failed as a production prompt. The fix was to stop treating the result as one block of prose. Start with an intermediate representation I now treat the prompt as the last stage of a compiler. The video is first converted into a structured record, and only then rendered for a specific video model. A minimal record might look like this: { "duration_seconds" : 12.4 , "shots" : [ { "start" : 0.0 , "end" : 3.8 , "subject" : "a cyclist waiting at a red light" , "action" : "looks over the left shoulder" , "camera" : { "shot_size" : "medium" , "movement" : "slow push-in" , "angle" : "eye level" }, "dialogue" : null } ] } This structure is deliberately boring. That is useful. A typed record makes missing data visible and gives you something concrete to validate before you ask a language model to write polished prose. Normalize the input first Video files arrive with different frame rates, codecs, orientations, and audio layouts. Links from social platforms add another layer of inconsistency. If every downstream stage has to understand every input format, failures become difficult to reproduce. The ingestion stage should produce a canonical package: a timestamped frame stream at a known sampling rate a normalized audio track basic metadata such as duration, aspect ratio, and frame rate a stable internal time base Keep the original timestamps. Rounding everything to whole seconds is tempting, but it causes trouble in short clips where several actions happen in quick succession. Detect
AI 资讯
Google custom search api free limit: How to bypass the cap
Running out of API quota in the middle of a production deployment is a frustrating rite of passage. If you are using the Google Custom Search API, you have likely hit that 100 free daily queries wall. Once you do, your application throws a 403 Quota Exceeded error, stalling your features unless you link a billing card and risk uncapped charges of $5 per 1,000 queries. In my experience, relying on Google's default limits without safeguards is a major liability. Here is how I protect my cloud budget, stretch the free tier using Redis, and transition to scalable alternatives when 100 queries are no longer enough. Step 1: Enforce a Hard Billing Cap in GCP Never rely on email alerts alone; they do not stop API requests. If a recursive loop in your code or a malicious bot targets your search endpoint, your credit card will bear the brunt. To set up a hard stop: Log into your Google Cloud Console . Navigate to APIs & Services > Enabled APIs & Services . Select Custom Search API , then click the Quotas tab. Locate Queries per day and click the edit pencil icon. Set your maximum limit to 95 (not 100). Pro Tip: This 5-query cushion gives you a safe buffer for emergency local debugging without triggering paid overages. Step 2: Implement Redis Caching Middleware Over 40% of search queries in typical web applications are repetitive. Implementing a Redis database to cache these searches can cut your API consumption by up to 80%. Here is a simple Python middleware pattern to normalize queries and cache them with a 24-hour Time-To-Live (TTL): import redis import requests # Connect to local Redis instance cache = redis . Redis ( host = ' localhost ' , port = 6379 , db = 0 , decode_responses = True ) def fetch_search_results ( query , api_key , search_engine_id ): # Normalize input to avoid duplicate cache keys normalized_query = query . strip (). lower () cache_key = f " search:cache: { normalized_query } " # 1. Check local cache first cached_data = cache . get ( cache_key ) if cach