Category: Senza categoria
-
Implementing Authorization Workflow (on Amazon SP API)
Amazon Selling Partner API documents two kinds of authorization workflow, one starting from your website app https://developer-docs.amazon.com/sp-api/docs/website-authorization-workflow, and the other one starting from the Amazon App store. Authorize from your website While implementing the authorize workflow from your website, you start assuming that the user is already logged in. This means the browser is keeping a…
-
Error Management: Go vs Rust vs Exception-based
I want to write some reference for error management in Rust and in Go, versus exception-class based language, maybe Python deserve a specific session, I will update that, but basically the point of exception-based error management is the sub-classing of a Exception class and the try {…} catch(…) {…} block for handling exceptional cases Golang…
-
Dive into (useless?) uncovered case of multistage dockerfile
Looking at the upstream documentation of Multi-stage builds there are some examples but this is missing: Ok, I mean, the example by itself is useless, but “it works”. Try: docker build -f Dockerfile -t copiedfrom-rust:v0.1 . Then: docker run -it copiedfrom-rust:v0.1 sh Real use case scenario Lets get serious now: why? Suppose you are inside…
-
Rust: riferimenti e lifetime
(… oggi ho imparato che … premessa) Cosa vuol dire “lifetime” in Rust: A lifetime parameter does not allow you to choose how long a value lives, it only allows you to communicate to the compiler that two or more references are “related” to the same memory and are expected to share the same lifetime.…
-
DAGs from Graph
Still ChatGPT. But bad experience this time. I asked all possible distinct DAGs given an adjacency matrix of a graph (probably not connected). I insisted that the graph is not connected. But “it” pretended to just make a loop over the nodes and build “all possible dags” (it pretends). I must note that the solution…
-
Exploring the Power of Windows in Rust: Unleashing the Potential of Sequential Data
Just catch a glimpse from your windows (it was: “introduction”) The windows method in Rust’s standard library is a powerful tool for processing sequential data. It enables efficient iteration over fixed-size, overlapping windows of elements in a collection, offering a functional and concise approach to data manipulation. This article will discuss the usefulness of the…
-
Streaming query result
I know I will never write a post on this, really, not a complete post on this matter. But I am working on making service consume less memory, and for sure I will achieve that. By now this is just an idea of the result of the same request made by buffering a whole result…
-
Building multi arch docker image from linux host
Key concepts Container manager.There is an actor, a daemon, or something that pull and run the right image when instructucted to do that.That means, you can use docker, docker swarm mode, kubernetes, k3s, or whatever daemon to monitor or just run containerbased on image taken from some place, and that daemon need to understand what…
-
React server side rendering as a react based template engine
isomorphic javascript is a technology used to speedup rendering on browser, it can be used a pure version that is server-side-rendering (ssr) to generate template from a react app Motivation: Create a presentation template to be converted to pdf and configurable with data: produce formatted documents. Here:https://www.freecodecamp.org/news/server-side-rendering-your-react-app-in-three-simple-steps-7a82b95db82e/ This is the way the piece of server…
-
php zmq in docker and checking whether the C compiler works… no
I spent 2 hours of what it lasts of my life trying to understand what was the problem on installing php’s zmq extension in a docker running alpine as base image. I would like to share my experience here. During morning I would like to write supporting class for integrating zmq into our system and…