Deeply analyze the implementation principle of concurrent AQS exclusive lock reentrant lock and Condition

introduction In our previous article< Deeply understand the lock free CAS mechanism of Java Concurrent Programming >If the CAS mechanism mentioned in is the basis of the whole Java Concurrent Programming, the AQS described in this chapter is the core of the whole Java JUC. However, before learning AQS, you need to have a certain knowledg ...

Posted on Thu, 21 Oct 2021 13:21:19 -0400 by brucec

Hive's data storage format and optimization

Hive's data storage format Column storage, row storage The data storage format of the table in Hive supports not only text format, but also many other formats. When creating a table, it is specified by = = STORED AS syntax. If not specified, the default is textfile (row store) = =. Several mainstream file formats in Hive. textfile file ...

Posted on Thu, 21 Oct 2021 13:10:02 -0400 by catalinus

Linked list algorithm problem design linked list

catalogue Design linked list describe Example Tips Single linked list:   Double linked list: Design linked list describe Design the implementation of linked list. You can choose to use single linked list or double linked list. A node in a single linked list should have two attributes: val   and   next. val   Is ...

Posted on Thu, 21 Oct 2021 12:49:27 -0400 by saadshams

Do you know the structure of go? Hey

structural morphology Before the structure, let's talk about data types, where we have basic types, but we can also customize types and alias them. Both can be set using type, as follows You can clearly see that Ha, adding an equal sign means setting an alias, or adding a custom type Ha.So we also use type for our structure, plus stru ...

Posted on Thu, 21 Oct 2021 12:36:14 -0400 by ElectricRain

C++ Multithreaded Quick Start: Basic & Common Operations

case1: create thread 1 join, detach Create a thread and wait for it to finish executing and print the id of both threads #include <iostream> #include <thread> using namespace std; void func() { cout << "hello , this is my thread, thread id is " << this_thread::get_id() << endl; } int main() { thre ...

Posted on Thu, 21 Oct 2021 12:24:48 -0400 by giovo

☀️ Front end Basics - Advanced CSS skills ⭐⭐⭐]

1, Display and hiding of elements 1.1 display: display explain Used to convert elements and how to show and hide elementsNo longer keep position after hiding elements /* hidden object */ display: none; /* Display objects and convert elements into block level elements. They can also be converted into inline elements and inline block ...

Posted on Thu, 21 Oct 2021 12:13:53 -0400 by dbarron87

[machine learning] decision tree

This experiment will realize a simple binary decision tree. I wanted to finish my homework without being familiar with the theory. As a result, I encountered a bottleneck... So I began to organize my ideas carefully from the beginning. It seems that the shortcuts taken will eventually be redoubled. Knowledge should be accumulated honestly. It's ...

Posted on Thu, 21 Oct 2021 11:46:06 -0400 by dancingbear

Sword finger Offer II 007. Three numbers with 0 in the array

The js code is as follows: /** * @param {number[]} nums * @return {number[][]} */ var threeSum = function(nums) { if(nums.length<3){ return []; } nums.sort((a,b)=>a-b); let result = []; for(let i=0;i<nums.length-2;i++){ if(nums[i]>0){ break; } if(i>0&&num ...

Posted on Thu, 21 Oct 2021 11:31:51 -0400 by Norman Graham

Stack and queue Basics

1. Definition of stack A stack is a linear table that can only be inserted and deleted at the end of the table. We call the end that allows insertion and deletion as the top of the stack, the other end as the bottom of the stack, and the stack without any data elements as an empty stack. Stack is also called last in first out linear tab ...

Posted on Thu, 21 Oct 2021 11:27:56 -0400 by Sillysoft

Notes on advanced programming in UNIX Environment Chapter 4 - files and directories

1. Functions stat, fstat, fstatat and lstat Returns the specified file information int stat(const char *pathname, struct stat *statbuf); int fstat(int fd, struct stat *statbuf); int lstat(const char *pathname, struct stat *statbuf); int fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); The stat function returns the ...

Posted on Thu, 21 Oct 2021 10:38:58 -0400 by 90Nz0