Writing a (valid) C program without main()
submitted by /u/iximiuz [link] [留言]
找到 9025 篇相关文章
submitted by /u/iximiuz [link] [留言]
Go hands-free with voice commands.
A close call in Northern Virginia revealed just how poorly data centers respond to grid disruptions. Here's how to fix the problem.
submitted by /u/Pink401k [link] [留言]
Guía crear Roles de Usuario usando RBAC Plano con PHP MySQL Agustin RamosJul 24, 2026PHP Stuffs El control de acceso basado en roles (RBAC) es utilizado en la mayoría de los sistemas para definir qué puede hacer cada usuario. En su versión más simple, conocida como RBAC plano, no es necesaria una tabla de permisos: cada usuario tiene un único rol, representado por un número, y ese número es el que determina qué se le permite hacer dentro del sistema. En esta guía es construido un módulo de RBAC plano completo, con base de datos, conexión, lógica de validación y ejemplos de uso, usando solo PHP y MySQL. Si necesitas repasar los fundamentos antes de continuar, puedes consultar nuestra guía de PHP y MySQL. Qué es el RBAC plano En este modelo, cada rol es representado por un ID numérico. La regla que se sigue en esta guía es simple: entre más bajo el número, mayor es el nivel de acceso. 1 = admin (mayor nivel de acceso) 2 = subadmin 3 = encargado 4 = empleado (menor nivel de acceso) Con esta lógica, validar “solo administradores o superiores” se reduce a una simple comparación: role_id <= 2. Base de datos Son necesarias únicamente dos tablas: rol y user. La columna role_id, dentro de user, es la que define el nivel de acceso de cada persona. Todo este bloque está guardado en el archivo schema.sql. Cómo ejecutarlo: copia todo el bloque de código y pégalo directamente en tu consola de MySQL (o en phpMyAdmin / MySQL Workbench). Esto crea la base de datos rbac_plano, sus tablas y los datos de ejemplo automáticamente. -- schema.sql CREATE DATABASE rbac_plano; USE rbac_plano; -- Tabla rol. -- El ID es usado como nivel: entre más bajo, más privilegios. CREATE TABLE rol ( id TINYINT UNSIGNED PRIMARY KEY, name VARCHAR(50) NOT NULL UNIQUE ); -- Se insertan los 4 roles base del sistema. INSERT INTO rol (id, name) VALUES (1, 'admin'), (2, 'subadmin'), (3, 'encargado'), (4, 'empleado'); -- Tabla user. -- Cada usuario tiene un único role_id (no hay tabla de permisos). CREATE TABLE us
The problem Recently I was looking for an npm package to generate OpenAPI (Swagger) documentation for my existing TypeScript project. My biggest requirement was TypeScript type-to-schema conversion: I already have all my request and response types, so why should I maintain the same schemas again in OpenAPI? Zod support would be a nice bonus. After trying most of the existing solutions, I found they generally fall into two categories: 1. Runtime frameworks The most popular example is tsoa . Honestly, tsoa is one of the best OpenAPI generators available today: it understands TypeScript well, generates schemas automatically and detects status codes. There are also contract-first libraries like ts-rest , Zodios and express-zod-api . However, none of these solutions are agnostic when it comes to how you write your code — they all dictate the shape of your routes. 2. Manual generators The best-known example is swagger-jsdoc. You write raw OpenAPI next to your code in JSDoc comments: /** * @openapi * /users: * post: * ... */ swagger-jsdoc is simple and framework-agnostic, but it's too verbose and knows nothing about your types. Then I found a similar tool that solved the verbosity problem: @visulima/jsdoc-open-api . It parses much more readable JSDoc tags: /** * POST /users * @summary Creates a new user. * @tags Users * @bodyContent {User} application/json - User object to create. * @bodyRequired * @response 201 - User created successfully. * @responseContent {User} 201.application/json - The created user object. */ But it still doesn't care about your types. User here is just the name of a component you have to define elsewhere in your document. Why not parse the actual types at generation time? That question inspired me to create Autoswag . The solution - Autoswag Describe your routes with readable JSDoc, and let the generator convert your TS types along the way. It doesn't affect your runtime code in any way, works with any framework, and even with vanilla JS. This is w
Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free...
minikube is the other "Kubernetes in Docker" option on Ubuntu, and with --driver=docker it runs the cluster inside a Docker container just like kind — but ships with addons (ingress, metrics-server, dashboard, a built-in registry) that make it feel more like a real cluster. Here's a practical setup and how it differs from kind . Install on Ubuntu You need Docker first ( sudo apt-get install -y docker.io , then add yourself to the docker group). Then: curl -fsSLo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube /usr/local/bin/minikube minikube version Start with the Docker driver minikube start --driver = docker # make it the default so you don't repeat the flag: minikube config set driver docker kubectl get nodes docker ps # a 'minikube' container is your node Size it for real work: minikube start --driver = docker --cpus = 4 --memory = 8g --disk-size = 40g The addons are the reason to pick minikube minikube addons list minikube addons enable ingress minikube addons enable metrics-server minikube dashboard # opens the web UI ingress gives you a working NGINX ingress controller with no manifest wrangling — genuinely useful when you want to test ingress routing locally. The Docker image workflow minikube runs its own Docker daemon inside the node container. The neat trick is pointing your shell's Docker CLI at that daemon, so images you build are immediately visible to the cluster with no push: eval $( minikube docker-env ) # your `docker` now talks to minikube's daemon docker build -t myapp:dev . kubectl create deployment myapp --image = myapp:dev # remember: imagePullPolicy: IfNotPresent so it doesn't try a registry pull Undo it when you're done so docker points back at your host daemon: eval $( minikube docker-env -u ) There's also a built-in registry if you prefer the push model: minikube addons enable registry Accessing services from Ubuntu Two common patterns: # quick tunnel to a single service (prints a
Evidence checked on July 25, 2026. This comparison separates vendor claims, general coding evidence, and native Unreal Engine delivery. Those are not the same thing. Kimi K3, Claude Opus 5, and Qwen3.8-Max-Preview all arrived with unusually strong claims around coding, visual iteration, long-running agents, or 3D creation. That makes one question inevitable for game developers: Which AI model is actually best for building an Unreal Engine 5 game? The short answer is Claude Opus 5 currently has the strongest public evidence for reliable agentic engineering and 3D reconstruction; Kimi K3 has the clearest first-party claim around playable 3D games and vision-in-the-loop iteration; Qwen3.8-Max-Preview is promising for large, multimodal engineering tasks but remains a preview with no official Unreal delivery proof. The more important answer is that none of these model announcements, by itself, proves that the model can deliver a valid native Unreal project, compile Blueprint or C++, cook assets, package a build, and reproduce the result. For Unreal work, the execution environment often matters more than a small difference in model intelligence. TL;DR: the Unreal-specific verdict Model Strongest relevant evidence Unreal-specific gap Best current role Claude Opus 5 Strong agentic coding, verification, computer use, a successful 3D FreeCAD reconstruction case, and early-user reports of better games and 3D output No official native Unreal project or packaging benchmark Lead engineering agent for difficult implementation, debugging, and review Kimi K3 First-party claim for playable multiplayer and 3D games, native vision, 1M context, long-horizon tool use, and screenshot-driven iteration Showcases do not establish .uproject , Blueprint, C++, cook, or package success Long-context, visually iterative game prototyping and tool-driven workflows Qwen3.8-Max-Preview 2.4T multimodal preview positioned for repository-scale coding, long tasks, image/video/document understanding, and a
I keep running into (and hearing about) a specific kind of bug that never throws an error — an API you depend on quietly changes its response shape. A field disappears. A number becomes a string. Something that was always present is suddenly null. Nothing crashes immediately. It just produces wrong or missing data somewhere downstream, and you find out from a bug report, not a log. I'm curious how common this actually is outside my own experience, so — genuine question, not a pitch: Has this happened to you, with a third-party API or even an internal one your own team owns? How did you find out it happened — a user report, a stack trace somewhere unrelated, manual debugging? Do you currently do anything to catch this kind of thing before it bites you (contract tests, monitoring, or just... hoping)? If you don't do anything about it today, is that because it's not painful enough to bother, or because you just haven't found a lightweight way to? Not selling anything here, just trying to understand how real and how painful this actually is for people building on top of APIs day to day. Would genuinely appreciate hearing your experience, even a one-line "yeah this happened to me once, wasn't a big deal" is useful data.
YouTube is making it easier to add custom thumbnails for both short-form and long-form videos.
Modern logistics is built on time-sensitive operations, yet traditional freight procurement suffers from friction. Legacy systems depend heavily on fragmented offline negotiations, opaque spot market prices, manual Lorry Receipt (LR) tracking, and coordination gaps between warehouse controllers and field drivers.To eliminate these operational bottlenecks, RoutePe Auto was engineered as a high-throughput Transport Management Software . The platform unites real-time spot bidding, pay-per-tender corporate procurement, vehicle discovery, automated freight billing, and live multi-point tracking into a unified ecosystem. Here is an architectural breakdown of how RoutePe Auto was designed using Laravel on the backend, React on the web frontend, a native Mobile App , and MySQL for transactional integrity. Architecture Overview ┌──────────────────────────┐ │ React Web Dashboard │ │ (Shippers / Logistics) │ └────────────┬─────────────┘ │ REST / WebSockets │ ┌──────────────────┐ ┌────────────▼─────────────┐ ┌──────────────────┐ │ Mobile App │◄────►│ Laravel API Gateway │◄────►│ MySQL Database │ │(Drivers/Fleet) │ │ & Execution Core │ │ (ACID Transactions) └──────────────────┘ └────────────┬─────────────┘ └──────────────────┘ │ ┌──────▼──────┐ │ Redis Queue │ └─────────────┘ The system operates across three tiers:The Web App Layer: Built with React, offering enterprise shippers a dynamic workspace to broadcast loads, review bids, manage tenders, and monitor active routes. The Field Execution Layer: A dedicated Mobile App for drivers and fleet operators, streaming real-time location updates, uploading electronic Proof of Delivery (ePOD) signatures, and receiving job dispatches. The Core Engine: A robust Laravel REST API backend handling business logic, asynchronous task dispatching, document generation, and balance ledger management against a relational MySQL store.Database Design in MySQLA core requirement for any Transport Management Software is strict transactional integrity.
10 paper AI nổi bật nhất trên Hugging Face hôm nay: từ agent tự cải tiến đến benchmark cho “active observers” Hôm nay mình tổng hợp 10 paper đang được upvote cao nhất trên Hugging Face. Danh sách này khá thú vị vì trải rộng nhiều hướng rất “nóng”: deep research agent, hậu huấn luyện mô hình lớn, embodied visual tracking, knowledge graph cho giáo dục, self-distillation cho vision, diffusion language model, đánh giá spatial cognition, sinh video dài, retrieval vượt khỏi “relevance”, và benchmark cho tác tử quan sát chủ động. Bài viết này không đi quá sâu vào chi tiết toán học, mà tập trung trả lời 4 câu hỏi cho mỗi paper: Bài toán là gì? Ý tưởng chính là gì? Điểm mới nằm ở đâu? Ứng dụng thực tế ra sao? 1) AREX: Towards a Recursively Self-Improving Agent for Deep Research Paper : 2607.21461 GitHub : https://github.com/VectorSpaceLab/arex-model Project : https://vectorspacelab.github.io/arex-model/ Bài toán Các “deep research agent” hiện nay có thể tìm kiếm, đọc tài liệu, tóm tắt và lập báo cáo, nhưng vẫn có một giới hạn lớn: chúng chưa thực sự tự cải tiến theo vòng lặp . Phần lớn agent chỉ chạy theo pipeline cố định hoặc được tối ưu thủ công. Ý tưởng AREX hướng đến một agent có khả năng đệ quy tự cải tiến . Nghĩa là agent không chỉ làm nghiên cứu, mà còn biết đánh giá kết quả của chính mình, tìm điểm yếu, sửa chiến lược, rồi chạy vòng tiếp theo . Ta có thể hình dung AREX như một “nhà nghiên cứu AI” gồm nhiều vòng: lập kế hoạch nghiên cứu, truy xuất thông tin, tổng hợp, tự phản biện, tinh chỉnh chiến lược cho lượt sau. Điểm mới Điểm mới quan trọng nằm ở từ khóa recursively self-improving . Nhiều hệ agent hiện tại có “reflection”, nhưng reflection thường chỉ là một bước phụ. AREX có vẻ đẩy ý tưởng này thành trung tâm kiến trúc , biến cải tiến lặp thành cơ chế vận hành chính. Nếu làm tốt, đây là bước tiến từ “agent biết dùng công cụ” sang “agent biết cải thiện cách dùng công cụ”. Ứng dụng thực tế Trợ lý nghiên cứu khoa học Phân tích thị trường, pháp lý, tài chính Tự động
Hi, friends! Welcome to Installer No. 137, your guide to the best and Verge-iest stuff in the world. (If you're new here, welcome, happy phone season, and also you can read all the old editions at the Installer homepage.) This week, I've been reading about Google Zero and armored cars for rich people, watching a […]
What Surrounds Us takes its title literally. You play as a circle surrounding a hole in its middle - it looks like a donut with frosting. You work together with other sentient moving circles, sometimes helping them joyfully meet with others. And you traverse a large map that's composed entirely of, you guessed it, a […]
Friendly hobby machine or serious production tool? Here’s how to know which one is for you.
Plus, email as turn-based combat (which is really just regular email).
These e-readers are more useful in their old age than you might think.
Researchers say TikTok, X, and Meta aren't providing data they're legally required to.
Warner Bros. Discovery has sued Amazon for 'inducing' its employees to breach their contracts.