Atcoder starter competition 164 e two currencies

Title Link There are \ (n \) cities, which are connected by \ (m \) two-way roads to ensure that they can reach each other. The \ (I \) road connection \ (U I, V \) takes \ (x \) silver coins and \ (t \) seconds. Every city has a silver exchange office. In the \ (I \) city, you can exchange \ (1 \) gold coins for \ (c_i \) silver coins. You ...

Posted on Sat, 02 May 2020 23:14:56 -0400 by idotcom

Model property generator, farewell to manual input of model properties

design sketch Explain The simple and easy-to-use tool class can automatically import model attributes according to the data requested by the network. It can customize fields and support nested models. It does not need to manually input attributes every time to reduce input errors. usage method 1. Create models, such as HHModel, ...

Posted on Sat, 02 May 2020 22:56:50 -0400 by rickmans

Build a proxy server with stunnel+squid

1, Network environment Host A: 192.168.0.11 Host B: 66.0.0.6 Host C: 4.2.2.2 Host A and host B communicate with each other, and host B and host C communicate with each other. If A accesses C network slowly or not, it can be accessed through stunnel+squid agent. 2, squid installation configuration Squid and stunnel can be c ...

Posted on Sat, 02 May 2020 17:22:49 -0400 by karq

3-11.RHEL7&CentOS7 Service Command

1) Service Status 1. Check server service status [root@lee ~]# systemctl -t service UNIT LOAD ACTIVE SUB DESCRIPTION abrt-ccpp.service loaded active exited Install ABRT coredump hook abrt-oops.service loaded active running ABRT kernel log watcher abrt-xorg. ...

Posted on Sat, 02 May 2020 13:32:52 -0400 by saurabhdutta

Simple implementation of Java crawler

Purpose: Crawling the smallest granularity regional dimension information of China, including Province, city, county, town and village committee through web crawler Main website link: http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2015/index.html Main jar package: http://jsoup.org/packages/jsoup-1.8.1.jar In the previous se ...

Posted on Sat, 02 May 2020 10:31:36 -0400 by thorpe

itertools of common built-in modules in Python

Python's built-in module itertools provides very useful functions for manipulating iterated objects. First, let's look at several "infinite" iterators provided by itertools: 1.count() creates an infinite iterator import itertools natuals = itertools.count(1) for n in natuals: print(n) Operation result: ...

Posted on Sat, 02 May 2020 06:50:32 -0400 by GreenUser

Display Html text / pictures / hyperlinks in TextView

Display Html text / pictures / hyperlinks in TextView Simple display of web content Html has many methods such as fromHtml(String, ImageGetter, TagHandler) to convert String objects into Spanned objects, which can display the colors / behaviors defined by various spans TextView's setMovementMethod(MovementMethod move ...

Posted on Sat, 02 May 2020 04:38:20 -0400 by lurius

App message center building

How to build App message center Classes mainly involved LauncherApplication.java MsgCenter.java MsgUtil MsgPackage MsgEvent LauncherApplication.java Here, the Application class of android is rewritten, and a public static message variable, sMsgCenter, is defined, and then initialized in init: public stati ...

Posted on Sat, 02 May 2020 03:15:27 -0400 by ahmedkl

Linux single user CS model TCP communication complete annotation manual

Linux single user CS model TCP communication complete annotation manual server describe To realize a simple Linux single user CS communication, the client sends a string, and the server converts it to uppercase and returns it. server code ``` #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/sock ...

Posted on Sat, 02 May 2020 02:34:05 -0400 by decodv

Implementation of HLS live broadcast (M3U8) review and download function

Streaming media is always the most important part of public life and entertainment, and it is also difficult in technology development, especially live broadcasting. Not only the function is irreplaceable, but also the development is more difficult than on-demand. Major sports events such as Rio Olympic Games can only be watched by live broadca ...

Posted on Sat, 02 May 2020 02:20:55 -0400 by The_Stranger