java array definition, usage, and array memory analysis

Preface This paper is mainly from the concept of container to the concept of array to the three definitions of array and the analysis of array memory in various situations, as well as some common operations of array traversal, inversion, maximum value and so on. It aims to have a comprehensive understanding of java arrays. @[toc] 1. What is a c ...

Posted on Mon, 04 Nov 2019 19:53:34 -0500 by styler1971

Deep analysis of thread pool in java thread series -- future task execution process

(it's more convenient to see the source code on the horizontal screen of mobile phone) Note: java source code analysis part is based on java version 8 unless otherwise specified. Note: thread pool source code refers to ThreadPoolExecutor class unless otherwise specified. brief introduction We learned the execution process of common tasks in t ...

Posted on Mon, 04 Nov 2019 09:15:17 -0500 by neilybod

36 classic exercises for Python beginner

[procedure 1] Title: there are 1, 2, 3 and 4 numbers. How many different and unrepeated three digits can they be composed of? How many are they? num_list=[] cou=0 for i in range(1,5): for j in range(1,5): for k in range(1,5): if i!=j and j!=k and k!=i: res=i*100+j*10+k num_list.append(res) ...

Posted on Mon, 04 Nov 2019 08:41:20 -0500 by chacha102

Easy to understand to girlfriend: the internal principle of thread pool

Restaurant appointments The dinner plate is crystal white under the light. My girlfriend takes a glass of red wine and sips it gently. She says to me, "I often hear you talk about the thread pool. What is the principle of the thread pool?" I was shocked. I thought about what happened to my girlfriend today and how I suddenly asked su ...

Posted on Sun, 03 Nov 2019 20:51:54 -0500 by Kaylub

Deep analysis of thread pool in java thread series

(it's more convenient to see the source code on the horizontal screen of mobile phone) Note: java source code analysis part is based on java version 8 unless otherwise specified. Note: thread pool source code refers to ThreadPoolExecutor class unless otherwise specified. brief introduction We have learned the architecture, construction method ...

Posted on Sun, 03 Nov 2019 09:55:18 -0500 by benwilhelm

Getting started with Python syntax 02

Introduction In the last article, we mainly learned about python, a programming language. Today, let's talk about user interaction, data types and operators User interaction What is user interaction? User interaction is that people input data into the computer and the computer outputs results For a simple example, let's enter the following ...

Posted on Sun, 03 Nov 2019 01:21:55 -0400 by doddatika

Java get file code

Almost no method is absolutely correct to detect the file coding by certain means without informing the file coding. Only the success rate. 1. The following are several commonly used methods for identifying file codes. Common encoding file starts to identify file encoding: ANSI: no format definition Unicode: the first two bytes are FFFE Unico ...

Posted on Sun, 03 Nov 2019 00:17:03 -0400 by wilorichie

leetcode-1053. Previous permutation of exchange once

Title Description: Give you an array of positive integers A (the elements of which are not necessarily completely different). Please return the maximum possible permutation that can be obtained after A single exchange (exchange the positions of two numbers A[i] and A[j]) and arranged in dictionary order less than A. If this is not possible, r ...

Posted on Sat, 02 Nov 2019 23:54:58 -0400 by xcandiottix

T-SQL advanced query statement

System function:String function: The basic salary of select 'operation and maintenance engineer' + name + 'is:' + CAST (basic salary as varchar(10)) + 'Yuan' from A1 where position: 'operation and maintenance engineer' #Display the name and basic salary of all operation and maintenance engineers in table A1, and the required display format i ...

Posted on Sat, 02 Nov 2019 17:45:11 -0400 by djnrempel

Data structure - delete all elements with values greater than mink and less than maxk

1. Title Description An algorithm is designed to delete all elements whose values are greater than mink and less than maxk (mink and maxk are given two parameters, and their values can be the same as or different from those in the table). 2. Topic analysis Find the node with the first value > mink and the node w ...

Posted on Sat, 02 Nov 2019 15:56:15 -0400 by theqase