JavaB log statistics of the 9th Blue Bridge Cup

JavaB log statistics of the 9th Blue Bridge Cup Title: log statistics Xiaoming maintains a programmer forum. Now he has collected a "like" log with N lines. The format of each line is: ts id Indicates that the post with id number at ts time received a "like". Now Xiaoming wants to count which posts were &q ...

Posted by jcoones on Fri, 22 Nov 2019 09:43:35 -0800

Android uses RecyclerView to implement the carousel chart

I. demand The previous blog used ViewPager to implement the rotation chart< Android ViewPager to implement cyclic carousel chart >However, ViewPager has a natural defect that View cannot be reused. In addition, the sliding process of ViewPager will frequently request layout. Although redrawing can be reduced by using addViewInLayout and ...

Posted by RosieisSweet on Thu, 21 Nov 2019 11:06:00 -0800

Record Ocelot + SignalR multi server test

Preface There are two projects, one gateway and one SignalR Paste code 1,Gatway 1. Reference to Ocelot 2. Add a little code Startup.cs 3. Simple configuration of ocelot ocelot.json { "ReRoutes": [ { "DownstreamPathTemplate": "/{catchAll}", //Downstream path "DownstreamScheme": "ws", //https / / downstream protocol " ...

Posted by Draicone on Thu, 21 Nov 2019 06:43:25 -0800

Data Structure-Heap

Binary Heap The binary heap is a binary tree, not necessarily a full binary tree, but must be a complete binary tree. A complete binary tree is a part that allows missing nodes, but the part that missing nodes must be on the lower right. Any node in the heap must have a value greater than or equal to its child node.This feature also shows that ...

Posted by mahendrakalkura on Wed, 20 Nov 2019 23:07:41 -0800

PAT a 1060 Are They Equal (25 points)

\quad is sorry that he didn't get the full mark and doesn't know what's wrong.\What quad needs to pay attention to is that there is 00234.5 in the test point, so there is a number of zeros in front of it, which needs to be removed in advance; the second point is that there will be a number less than 0, such as 0.0123; the third ...

Posted by Azad on Wed, 20 Nov 2019 08:18:12 -0800

HashMap Source Learning

common method put method Description: One of the most common methods used to add key-value pairs to a hash bucket. However, this method does not perform the actual operation. Instead, it delegates the putVal method to process Code: public V put(K key, V value) { // This call specifies hash,key,value, replace existing value, not create mode ...

Posted by Jaquio on Tue, 19 Nov 2019 22:42:33 -0800

Single chip microcomputer realizes the operation of long press 3s and long press 10s for the same key

How to realize single-chip click, double-click and long press operation can refer to other people's articles: https://blog.csdn.net/qq997758497/article/details/80606710; Here, I mainly extend this function to realize the operation of click, double-click, long press for 3s and long press for 10s. What needs to be revised:   ...

Posted by Mahfouz on Tue, 19 Nov 2019 14:06:30 -0800

LeetCode problem solving notes 34-188. The best time to buy and sell stocks IV

subject Given an array, its i-th element is the price of a given stock on day I. Design an algorithm to calculate the maximum profit you can get. You can complete up to k transactions. Note: you cannot participate in multiple transactions at the same time (you must sell the previous shares before you buy again). Example 1: ...

Posted by fme on Tue, 19 Nov 2019 07:55:11 -0800

Source code analysis of Vue view update patch process

In this article Deep source learning Vue responsive principle This article explains how Vue informs the data that depends on it to update when the data changes. The point of this article is: the view knows the change of the dependent data, but how to update the view. Vnode Tree There is a DOM tree corresponding to it in real HTML, and a similar ...

Posted by Averice on Tue, 19 Nov 2019 05:24:02 -0800

ThreadPoolExecutor Thread Pool Source Code Analysis

Foreword (must see here!!) I'm sure you know the process of thread pool execution, but how do you configure thread size, how do you really use it, and how do you configure it reasonably with quantified metrics?This article will analyze the implementation of thread pools from the source code point of view and show how thread pools are quantified ...

Posted by johnska7 on Mon, 18 Nov 2019 18:08:39 -0800