18 Java 8 date processing practices, very useful

Java 8 introduces a new date time API. In the tutorial, we will learn how to use the new API through some simple examples. The way Java deals with date, calendar and time has always been criticized by the community. Setting java.util.Date as a variable type and the non thread safety of SimpleDateFor ...

Posted on Sun, 19 Jan 2020 09:07:25 -0500 by djjamiegee

Source code analysis of redis cluster visit

gossip Update in github later, please stamp redis Cluster - > visit Catalog cluster bus When will the message be sent ping pong cluster bus Come from cluster-tutorial Each Redis cluster node needs two TCP connections. The general TCP port is used to interact with the client, such as 6379. Ther ...

Posted on Sun, 19 Jan 2020 09:06:12 -0500 by timj

Comparison of array de duplication methods

The following two arrays are simulated, one with a length of 100000 and the other with a length of 50000 The following methods are all tests for these two arrays The longer the array length, the greater the speed difference let arr1 = Array.from(new Array(100000), (x, index) => { return index; }); ...

Posted on Sun, 19 Jan 2020 05:30:09 -0500 by prudens

Transformation of Apache Flink DataStream API (Chapter 3)

DataStream data conversion General operators // order zhangsan TV,GAME val env = StreamExecutionEnvironment.createLocalEnvironment() val props = new Properties() props.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "CentOS:9092,CentOS:9093,CentOS:9094") props.setProperty(Cons ...

Posted on Sun, 19 Jan 2020 02:31:15 -0500 by Rayne

Common functions in MySQL

1. String function length(a) gets the length of string a concat(a,b,c) splices multiple values into a string trim(a) remove the space at the beginning and end of string a replace(a,b,c) replace the b string in string a with C subString(str,index,len) intercepts the string str from the index char ...

Posted on Sun, 19 Jan 2020 00:42:01 -0500 by Murciano

[operation of training team] IOI 2020 extensive operation test of training team 11

Codeforces 590E Birthday First, we can use AC automata to calculate the containment of strings. It is noted that the inclusion relation constitutes a poset, and the remaining problem essentially requires the longest anti chain. From Dilworth's theorem, we can get that the size of the longest anti chain ...

Posted on Sat, 18 Jan 2020 10:03:27 -0500 by crishna369

Freshman winter holiday weekly 1

I. C language algorithm code practice Luo Gu: 1. Tianjin savings plan #include<stdio.h> int main(void) { int i,money=0,savings=0,saving=0,Estimate=0; for(i=1;i<=12;i++) { money = money + 300; scanf("%d",&Estimate); saving = 0; if((money-Estimate)>=100) { saving = (money-E ...

Posted on Sat, 18 Jan 2020 08:44:28 -0500 by theex

[algorithm notes - fast sorting algorithm]

Quick Sort Geesforgeks quick sort blog, including video, algorithm complexity analysis, C C++ Java Python C ාimplementation version Word Pivot center Partition partition Divide and Conquer algorithm For example: Quick Sort, Merge Sort Select an element in array as pivot Split pivot left and right ...

Posted on Sat, 18 Jan 2020 00:59:36 -0500 by videxx

The getWidth() and getHeight() of the view return 0

I am dynamically creating all the elements in my android project.I'm trying to get the width and height of the button so that I can rotate it.I just want to learn how to use the Android language.However, it returns 0. I've done some research and found that it needs to be done outside the onCreate ...

Posted on Fri, 17 Jan 2020 23:23:30 -0500 by colby.anderson

java Concurrency Principle Reality--How to Create Threads

Article Directory Create Threads 1. Inherit thread 2. Implement the runnable interface: 3. How anonymous internal classes work: 1. Override thead class + anonymous inner class Implement runnable+anonymous inner class (3) Implement runnable+override thead class+anonymous internal class 4. Create thr ...

Posted on Fri, 17 Jan 2020 22:49:09 -0500 by Jnerocorp