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

标签:#c

找到 20762 篇相关文章

AI 资讯

Do you access a server with username and password? It's a combination padlock facing the street

✍️ This post was written with two hands. The story — the first part — is Murilo's, lived and told by the person who was there. The technical manual , at the end, was written with AI. The split is intentional and marked in the text. Nothing hidden about the seam: part is human, part is machine, and the reader sees both. If you've ever managed or logged into a web server and never set up SSH keys, it's because you don't yet know the real risks of a break-in — and that's okay. Until you find out what can happen. Logging into a server over SSH with a username and password is like locking the front door of a house that faces the street, with nobody keeping watch. Anyone can try as many combinations as they want, freely. And setting this up takes almost as much time as typing a username and password — and it makes getting into the server much faster and easier afterwards. Ignorant of best practices, I managed my servers for a long time by typing: ssh user@server-ip password That nearly cost me dearly, the day I found out my server had been broken into. After that incident, I realized just how vulnerable a username and password are on SSH. Today I can't say I sleep soundly — no system is completely break-in proof — but I sleep a lot better (and honestly, I always slept well, until I started managing servers). Waking up on a fine Sunday morning to do some maintenance on the server, and finding out it was broken into through the front door because you left a combination padlock facing the street — that is not the kind of surprise I'd wish on anyone. I have a degree in Law. I worked for 15 years in the legal field at a public institution, until I decided to venture into the world of programming. And where did I end up? Managing systems at the institution I work for, after spending some time building automations in Python. Managing systems wasn't exactly what I had in mind when I wanted to learn to code and understand the world of programming. But that opportunity ended up tea

2026-07-17 原文 →
AI 资讯

Show HN: Justif – Knuth-Plass justification and microtypography for the web

Justif is a drop-in JavaScript library that progressively enhances web pages to TeX-level text justification. Installation is a single <script> line, standard text and accessibility affordances are unchanged, and users with JS disabled get native browser rendering. I made justif because I've long been a fan of justified text. I think it looks clean and elegant, and makes reading more enjoyable. But bad justification is the opposite, with gaping spaces that distract me to the point of making the

2026-07-17 原文 →
AI 资讯

Terminal Velocity: Audits of the Present and Future

Introduction A Continuation of Shadow SCADA Terminal Velocity begins where Shadow SCADA left off — at the edge where digital audits meet the physical world. In the previous article, we explored how hidden infrastructures reveal themselves through aerial recon, magnetic anomalies, and environmental signals. Now we move deeper: into the physics of sensing, the light‑based pathways of diodes and photodiodes, and the high‑spec tools that transform invisible signals into readable intelligence. Modern audits are no longer limited to dashboards and logs. They extend into light, magnetic fields, environmental distortions, and sensor‑level truth — domains that traditional processes never touch. Section 1 – Diodes and Photodiodes: The First Gate of Physical Signals In modern audits, everything starts at the physical layer — where electricity and light move before any software or dashboard exists. Two tiny components sit at that gate: diodes and photodiodes. They look similar, but they do very different jobs. What is a diode? · One‑way valve for electricity: A diode lets electric current pass in one direction only, like a one‑way street. · Why this matters for security: Diodes are used to make sure information can leave a system but cannot come back in through the same path (for example, in SCADA or critical networks). · Simple image: Think of a diode as a door that only opens outward. You can exit, but nobody can enter through that door. What is a photodiode? · Sensor for light: A photodiode doesn’t control current—it detects light and turns that light into an electrical signal. · Where it’s used: In cameras, light sensors, security systems, and tools that “listen” to the environment through light. · Simple image: Think of a photodiode as a tiny eye that sees light and tells the system, “Something is shining here.” The key difference (in one sentence) · Diode = controls flow. · Photodiode = senses light. Diodes are about blocking or allowing. Photodiodes are about seeing and

2026-07-17 原文 →
AI 资讯

Connecting AWS Account with Cypress Automation: A Simple STS Connection Test

When building Cypress automation that interacts with AWS services, the first step is verifying that your test framework can successfully authenticate and communicate with your AWS account. In this article, you'll learn how to connect Cypress to AWS and perform a simple authentication test using AWS Security Token Service (STS) and the GetCallerIdentity API. This approach helps confirm that: AWS credentials are correctly configured. Cypress can invoke AWS SDK operations through Node.js tasks. The automation environment is connected to the expected AWS account. Establishing this connection first provides a solid foundation before automating interactions with services such as AWS Lambda, Amazon S3, Amazon DynamoDB, Amazon SNS, or Amazon SQS. Prerequisites Before getting started, ensure you have: Node.js installed A Cypress project Valid AWS credentials: AWS Access Key ID AWS Secret Access Key AWS Session Token (if using temporary credentials) AWS Region Note:If you're running Cypress in an AWS environment (such as AWS CodeBuild, an EC2 instance with an IAM role, or GitHub Actions using OpenID Connect), you may not need to provide credentials manually. The AWS SDK can automatically retrieve credentials from the execution environment. Step 1: Install the AWS SDK Install the AWS STS client package: npm install @aws-sdk/client-sts For this connectivity test, we only need the AWS Security Token Service (STS) client. The package provides: STSClient – Creates a client for communicating with AWS STS. GetCallerIdentityCommand – Returns details about the authenticated AWS identity associated with the configured credentials. Step 2: Configure AWS Credentials For local development, create or update your cypress.env.json file. { "AWS_ACCESS_KEY_ID" : "" , "AWS_SECRET_ACCESS_KEY" : "" , "AWS_SESSION_TOKEN" : "" , "AWS_REGION" : "" } Populate the file with your AWS credentials. Example: { "AWS_ACCESS_KEY_ID" : "your-access-key" , "AWS_SECRET_ACCESS_KEY" : "your-secret-key" , "AWS_SES

2026-07-17 原文 →
AI 资讯

Building a Production-Ready Risk Management Engine for Algorithmic Trading

Part: 4 of 18 About this series This series documents the engineering evolution of a production-ready algorithmic trading platform in Python. It focuses on architecture, state management, execution, real-time data processing, persistence, and the engineering decisions that transformed a simple trading bot into a production-ready platform. In Part 3: Building a Production-Ready Position Manager for Algorithmic Trading , I described the component responsible for maintaining persistent position state throughout the entire trade lifecycle. Read Part 3 here: https://dev.to/pydevtop/building-a-production-ready-position-manager-for-algorithmic-trading-55n4 The Position Manager could remember every open position. The next challenge was deciding what should happen to those positions as market conditions continuously changed. Project Website This article is part of the engineering story behind the Bybit Signal Trading Platform . If you'd like to learn more about the project, see additional screenshots, features and technical details, visit: https://py-dev.top/application-software/bybit-signal-trading-bot The Problem Was Never Stop Loss If someone had asked me during the first weeks of development where the Stop Loss logic should live, I wouldn't have hesitated. Inside the Trade Execution Engine. Where else? The engine already received TradingView webhooks. It validated incoming requests. It calculated Take Profit. It opened positions. Adding one more calculation felt completely natural. The implementation looked something like this. signal = receive_signal () validate ( signal ) entry = execute_order ( signal ) stop_loss = calculate_stop_loss ( entry ) take_profit = calculate_take_profit ( entry ) Simple. Readable. Everything related to opening a trade existed in one place. At that moment there was absolutely no reason to introduce another component. There was only one trading pair. Only one open position. No persistence. No restart recovery. No Break Even. No Trailing Stop.

2026-07-17 原文 →
AI 资讯

A required field made my AI fabricate statistics

I run a pipeline that generates explainer articles. LLM in the middle, structured output, published in several languages. It had been running for a while and the articles looked good: clean layout, a chart, and near the top of each one a confident little box with a statistic. Something in the shape of "68% of people never change the default." A number, a source, an authoritative ring to it. Not one of those numbers had been researched. The pipeline had never looked up a single statistic in its life. It asked the model for a number and printed whatever came back. I did not find this through a clever eval. I found it while cleaning up something unrelated and actually reading the prompt. The field that forced a lie The output schema had a required field. statistic.text and statistic.source , described in the prompt as an "eye-catching stat" for the top of the article. Required. Every article had to have one. The prompt also, helpfully, told the model what to do when it did not have a real number. It said to round to a safe order of magnitude. And it said to strip the year off the source, so the article would look evergreen instead of dated. Read that back slowly. The instructions were: always produce a statistic, make up a plausible magnitude if you have to, and remove the one piece of metadata that would let anyone check it. That is not a prompt that occasionally allows a hallucination. That is a prompt that requires one, every single time the model does not happen to know a real figure. So it produced them, confidently, in every language, each wearing a real-sounding source: a named institute, an industry association, a government statistics office. None of it had been looked up when it was written. This was content people actually act on, which is exactly the category where being wrong is not a rounding error. There was a second engine doing the same thing in the chart code. The block that generated the data visualization asked the model for "actual statistics from

2026-07-17 原文 →