Source code analysis of jdk1.8 AtomicInteger and AtomicStampedReference

AtomicInteger AtomicInteger can ensure correct increase and decrease in multithreaded environment The bottom layer is implemented by cas, volatile and unsafe Important attribute // setup to use Unsafe.compareAndSwapInt for updates private static final Unsafe unsafe = Unsafe.getUnsafe(); private static final long valueOffset; ...

Added by anoopd on Wed, 04 Dec 2019 19:22:20 +0200

IVWEB Play WASM Series-WEBGL YUV Rendering Image Practice

Recently the team built a WEB player with WASM + FFmpeg.We decode videos using FFmpeg by writing C and communicate with JavaScript on browsers by compiling C to WASM.The default FFmpeg decoded data is yuv, and canvas only supports rendering rgb, so there are two ways to handle this yuv. The first one uses FFmpeg exposure to convert YUV directl ...

Added by ben14 on Wed, 04 Dec 2019 18:27:18 +0200

ECharts study note 02, pie and Nightingale

target Use echarts to draw pie chart, and draw Nightingale pie chart on this basis. The example is as follows Building environment Create a new folder note02. The directory structure is as follows ./note02/ |---index.html |---index.js |---index.css |---echarts.js Write index.html We put < article > and < aside > in < ...

Added by mmilano on Wed, 04 Dec 2019 10:18:22 +0200

A simple object-oriented example

For instance First, design a class about Time (Time class). The members of this class are as follows: Code: //Definition code of Time class class Time { //The following are private members private int hour; private int minute; private int second; ...

Added by tave on Wed, 04 Dec 2019 06:32:35 +0200

59 tool classes commonly used in the front end [continuous update]

Preface Sometimes the front-end development will process some data returned from the background, or do some processing according to the data judgment; at this time, it is very necessary to encapsulate some common tool classes; This paper encapsulates 59 methods according to some commonly used tool classes, of course, there are many less used ...

Added by racerxfactor on Tue, 03 Dec 2019 23:07:38 +0200

Getting started with Tablestore data management

In order to let users of table store better understand the product data management ability and SDK use, this article will describe the function and use mode of data management in combination with the code. This article only talks about the management and use of the main table data, not all the data management capabilities of the Tablestore. The ...

Added by Drayton on Tue, 03 Dec 2019 21:15:46 +0200

The first step of html login and registration

On the road of web Security~~~ After learning C language and completing course design, HTML (Hypertext Markup Language) is studied. The purpose of learning html is to understand the structure of those web pages, how his head is, and body, etc. ~ ~ although it's very simple, HTML can't be ignored. The most basic syntax and some comm ...

Added by simon13 on Tue, 03 Dec 2019 21:10:51 +0200

vue realizes animation effect among multiple elements or components

Transition of multiple elements <style>   .v-enter,.v-leave-to{     opacity: 0;   }   .v-enter-acitve,.v-leave-active{     opacity: opacity 1s;   } </style> <div id='app'>   <transition>     <div v-if='show'>hello world</div>     <div v-else>bye world</div>   </trans ...

Added by jpaloyo on Tue, 03 Dec 2019 17:14:59 +0200

python - multi process crawling hot pictures of embarrassing events

Today, we can't solve the practical problem when using regular expressions, so we use BS4 library to complete the matching. Through repeated tests, we finally solve the practical problem and deepen the understanding of bs4.beautiful soup module. Crawling process Prelude: It is necessary to analyze the website information of different pages of t ...

Added by Stryves on Mon, 02 Dec 2019 20:56:03 +0200

Give default values to your objects properties

I'm a zebra What to do and what to solve in this blog What knowledge is needed to solve this problem Specific code, effect In actual development, in order to avoid unnecessary null pointer exception. It is necessary to judge whether it is empty. If a method is called to judge whether it is null every time an object's prop ...

Added by PHPThorsten on Mon, 02 Dec 2019 18:23:03 +0200