Linux view machine CPU core number

CPUTotal core = physical CPU number * the number of cores per physical CPU.Total logical CPU = physical CPU number * the number of cores per physical CPU * the number of super threads.   Let’s look at what CPU stands for. Many physical CPU, CPU communicate through the bus, the efficiency is relatively low, as follows: Multi-core CPU, different cores communicate through L2 cache, storage and peripherals communicate with CPU via bus, as follows: Multi-core hyperthreading, each core has two logical processing units, two cores share a core of resources, as follows: From what I’...

About liunx machine offline environment (NETCORE) Nuget packet migration problem

First of all, the nuget offline environment can’t load third-party nuget packages, so I’m using nuget to cache files (right or recommend using your own nuget server and publishing it properly, just for emergencies) We all know that the dotnet restore of a project is a command to clarify the dependencies of a project, and the restore command relies on the project. assets. JSON file under the obj directory under the project directory to clarify the dependencies. Let’s start with a diagram that shows the directories of the liunx environment and the window environment nuget pac...

HTTP common status codes

Common HTTP status codes: 2″ (the request succeeds) indicates that the request status code is successfully processed. 200 (success) server” has successfully processed the request. Usually, this means that the server provides the requested web page.   201 (created) request succeeded and the server created a new resource.  202″ (accepted) server has accepted the request, but it has not been processed.   203 (unauthorized information) server has successfully processed the request, but the information returned may come from another source.   204 (no content) server success...

Pit design mode – factory method mode (Factory)

The factory method pattern is also called the factory pattern. It is one of 23 design patterns. It solves the problem of creating objects in software design. It can better solve the change of users’needs. Problem: In the simple factory pattern, we put all the instantiated objects in Factory. CS (factory class), and we can instantiate objects in our predictions, but our predictions are limited, and the customer’s requirements are unlimited, so there is a problem, but the customer’s needs are too complex.Miscellaneous, we have to modify the source code, which is not allowed by...

The closure I understand

Closure concept: a function that has access to variables in another function scope. function add(){ var result; result = function(x,y){ return y+x } return result } var sum = new add(); console.log(sum(10,20))/*30*/ The main reason for function execution is () function createFunctions(){ var result = new Array(); for (var i=0; i < 10; i++){ result[i] = function(){ return i; }; } return result; } var funcs = createFunctions(); for (var i=0; i < funcs.length; i++){ ...

Programmer’s distress

  Hello, everyone. I’m Xiao Yang. I’m glad you can brush this article. First of all, I encourage you to have a bright future on the road to struggle. Secondly, Xiao Yang said: pay = reward.   I hope that if we encounter setbacks on the road to struggle, we can simply vent, but let it out. We are still good colleagues and have to continue working. Xiao Yang is a shooter, full of positive energy, no matter what difficulties, Xiao Yang can face positively, this is Xiao Yang in my heart. Xiao Yang is studying in the future.They will work hard, be miserable and happy.   Don...

Solve multi table associated queries + slow sorting speed

select * from ( SELECT ROW_NUMBER() OVER(ORDER BY A.ColumnName DESC) NUM, * from T_A A left join T_B B on A.X=B.Y and ...) t where B.ColumnName is not null Optimization of the key 3:1、Change natural link to left join and filter out the null value of the right table in the outer layer.2、Oracle’s ROW_NUMBER () is used to place the order by condition in the join select item, ROW_NUMBER() OVER (ORDER BY A. ColumnName DESC) NUM.Solve the slow sequencing problem;3、Index create index IND_C_DESC on T_A (ColumnName DESC) is created according to ascending and descendin...