Zhejiang University PAT Class A 1014 Waiting in Line
A simple simulation problem. The Yellow Line used to have N teams, each with a capacity of M. After the Yellow Line, we can see that there is only one team. Now we can fill up the N teams in front of the Yellow Line (if we can), whenever someone leaves, the people behind the Yellow Line will fill up, ...
Posted by unreel on Sat, 05 Oct 2019 08:58:59 +0200
Qt Drag-and-Drop Assistant Class-Simplified Drag-and-Drop Programming for Qt Controls
Because drag-and-drop functions are often used in Qt programs, many examples on the Internet directly rewrite two virtual functions of this kind:
protected:
virtual void dragEnterEvent(QDragEnterEvent *event) override;
virtual void dropEvent(QDropEvent *event) override;
However, each contro ...
Posted by bmcewan on Sat, 05 Oct 2019 03:19:23 +0200
Flask-wtforms are similar to form components in django
I. installation
pip3 install wtforms
II. Simple Use
1. Create flask objects
from flask import Flask, render_template, request, redirect
from wtforms import Form
from wtforms.fields import simple
from wtforms import validators
from wtforms import widgets
app = Flask(__name__, template_folder='templates')
app.debug = True
II. Generating form Co ...
Posted by fuji on Fri, 04 Oct 2019 22:04:00 +0200
Talk about Server List Manager of nacos
order
This article mainly studies the Server List Manager of nacos.
ServerListManager
nacos-1.1.3/naming/src/main/java/com/alibaba/nacos/naming/cluster/ServerListManager.java
@Component("serverListManager")
public class ServerListManager {
private static final int STABLE_PERIOD = 60 * 1000;
@Autowired
private SwitchDomain switchDo ...
Posted by CleoK on Fri, 04 Oct 2019 08:52:27 +0200
Simple Practice of Disruptor Framework
Simple Practice of Disruptor Framework
Basic knowledge
Architecture diagram
Core concept
Simple practice
https://github.com/LMAX-Exchange/disruptor/wiki/Introduction
https://github.com/LMAX-Exchange/disruptor/wiki/Getting-Started
http://lmax-exchange.github.io/disruptor/files/Disruptor-1.0.pdf
...
Posted by finkrattaz on Fri, 04 Oct 2019 07:32:53 +0200
CodeForces-166B Geometry Judges whether Polygons Are Inside Convex Hulls
Give you a polygon (not guaranteed to be a convex polygon), and then let you judge whether the polygon is strictly inside the convex hull, you just have to answer yes or no.
Violent judgment of whether each point of the polygon is too slow in the convex hull, in fact, it is only necessary to know whethe ...
Posted by harryman100 on Thu, 03 Oct 2019 16:04:16 +0200
rocketmq Source Parsing Message Pull Processor II
Said ahead
Message Pull Processor
Source code analysis
Enter this method and find the mapping file according to offset, as described above at org. apache. rocketmq. store. MappedFileQueue # find MappedFileByOffset (long, boolean).
Return to this method and find the next mapping file based on offset, org ...
Posted by cwncool on Thu, 03 Oct 2019 01:26:58 +0200
ACM-ICPC 2018 network competition A.Hard to prepare [rule recursion]
t: There are n people in a circle, and everyone can choose.Different hats, but the number of hats chosen by two neighbouring people can not be the same or 0. How many options are there?
Association + Reasoning
Let's assume that there are beads. We don't consider the restrictions at the beginning ...
Posted by bubbadawg on Wed, 02 Oct 2019 21:51:59 +0200
2010 Summer Holiday Multi-school Training Game 10 | Part of the Solutions
Forget who wrote the emm
Anyway, there is still no solution to the problem.
Two questions were asked during the match.
In fact, the last chance to make 05 but out of the bug
Always change and change...
Later, it was found that there were less judgment conditions.
09 Block Breaker
HDU 6699 ...
Posted by ccjob2 on Wed, 02 Oct 2019 21:40:16 +0200
Change of TCP listen socket lookup in Linux
When the kernel TCP receives the SYN message, it matches the socket in LISTEN state locally to shake hands according to the destination IP and Port of the message.
listen socket lookup prior to version 4.17
The current listener hashtable is hashed by port only. When a process is listening at many IP addresses with the same port (e.g.[IP1]:443, ...
Posted by knucklehead on Sun, 29 Sep 2019 17:21:38 +0200