Develop a modern .NetCore console program, including dependency injection/configuration/logging and other elements

1Foreword There are a lot of scenarios where gadgets need to be developed recently. Last time I developed a hive export tool using the go language. The experience was pretty good, but I really don’t like the syntax of the go language. This time I will try to use C# to develop gadgets. The function […]

Configuration resource management of k8s

1. secret Secret is a k8s resource used to store sensitive data such as passwords, tokens, keys, etc. Although this type of data can also be stored in Pods or mirrors, it is placed in Secret to more conveniently control how to use the data and reduce exposure. risk. There are three types: 1. kubernetes.io/service-account-token: […]

Linux offline installation of cuda&cudnn and configuration of the machine and its environment packaging and migration

cuda installation cuda version adaptation Check the cuda version number supported by your computer [You can skip this step if you install the cuda toolkit on a supercomputing platform] CUDA toolkit Download official website download cuda toolkit Upload the downloaded .run executable file to the platform for offline installation $ cd /uploaded directory $ chmod […]

Configure kafka cluster on windows10

1. Introduction to kafka Kafka is an open source stream processing platform developed by Apache and written in Scala and Java. Kafka is a high-throughput distributed publish-subscribe messaging system that can process all behavioral record data of consumers in the website 2. kafka download kafka address 3. kafka cluster configuration 1. Zookeeper configuration # Licensed […]

FastDFS+Nginx installation configuration

FastDFS + Nginx installation configuration Directory Download and upload the installation package to the server project address: FastDFS installation 1. Install FastDFS dependent libraries 1. Compilation environment 2. Install libfastcommon and libserverframe libraries 2. Install FastDFS and configure it 3. Start (choose one of the following startup methods) File mode startup Configure systemd startup 1. […]

The role of configuration configuration class, rabbitMq code example how to customize beans

@Configuration @ConditionalOnClass(SimpleRabbitListenerContainerFactory.class) public class ConsumerConfig { @Value(“${rabbit.batch.num:100}”) private int batchNum; @Bean(“batchQueueRabbitListenerContainerFactory”) public SimpleRabbitListenerContainerFactory batchQueueRabbitListenerContainerFactory(ConnectionFactory connectionFactory) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(connectionFactory); factory.setBatchListener(true); factory.setConsumerBatchEnabled(true); factory.setBatchSize(batchNum); return factory; } } This code is a RabbitMQ message consumer configuration class based on Spring Boot. Let me explain step by step and give examples: @Configuration: This annotation indicates […]

centos9 image source, network configuration, accidentally deleted python recovery

centos9 Accidentally deleted python recovery solution centos9 accidentally deleted /usr/bin/python3.9, causing yum to become unavailable. [root@localhost ~]# yum makecache -bash: /usr/bin/yum: /usr/bin/python3.9: bad interpreter: No such file or directory [root@localhost ~]# python3 -bash: /usr/bin/python3: No such file or directory [root@localhost ~]# python3.9 -bash: /usr/bin/python3.9: No such file or directory If you just delete this file […]

Matplotlib_plotting canvas configuration

Canvas Configuration plt.figure() figsize:canvas size, width and height #Import the two libraries numpy and matplotlib.pyplot import numpy as np import matplotlib.pyplot as plt #Created a graphics window with a size of 5×3 inches. plt.figure(figsize=(5, 3)) # Draw sine curve x = np.linspace(0, 2*np.pi) y = np.sin(x) plt.plot(x, y) plt.show() If the canvas size is changed […]

Django file configuration, request object, connection to MySQL, ORM

Article directory Django static files and related configurations Static file preface Static file related configuration form form request object request request result GET request POST request pycharm connects to database Django connects to MySQL Introduction to Django ORM Django static files and related configuration In this blog I will introduce relevant knowledge through a user […]