Java basic tutorial -- File class, Paths class, Files class

Class File The File class is in the java.io package. IO stands for input and output, input and output. Represents files and directories that are not platform related. You can create, delete, rename, but you cannot access the file content. Constants in the File class: import java.io.File; public class TestFileConst { public static void mai ...

Added by ++Sti++ on Mon, 28 Oct 2019 20:52:15 +0200

Noip 2016 tiantianai running

Noip 2016 tiantianai running It is obvious that the difference on the lca + tree can not be added directly because of the limitation of w, so the combination of weight line segment tree is considered. It's very troublesome that each player's starting point and ending point have different effects on different nodes. However, it can be found th ...

Added by moffo on Mon, 28 Oct 2019 18:27:26 +0200

Problem solving [BZOJ1922] continental hegemony

Problem surface analysis First, according to Kruskal algorithm, We can know, When an edge with a weight of \ (w \) is added, All edges with weights less than \ (w \) have been added to the tree (except for the linked ones). Therefore, we can save the connected block of each edge's endpoint before joining the spanning tree. Sort the sides of the ...

Added by sn0n on Mon, 28 Oct 2019 16:46:15 +0200

dedeCMS background upload getshell vulnerability (CNVD-2018-01221) recurrence

Vulnerability Name: CNVD-2018-01221 Influence: Dedecms v5.7 sp2 Harm: Arbitrary code execution, getshell; preparation: win7 virtual machine + Dedecms v5.7 sp2+phpstudy First install Dedecms v5.7 sp2: http://www.dedecms.com After downloading and installing, directly visit localhost/Dedecms v5.7 sp2/upl ...

Added by turek on Sun, 27 Oct 2019 12:26:02 +0200

Spring boot microservice configuration Cors to solve cross domain request problem

Catalog 1. Architecture design 1.1 brief description 2. Cross domain Cors principle and popular science 2.1 what is cross domain? 2.2 under what circumstances will cross domain occur?   2.3 how to avoid cross domain? 3. Cross domain solution cases 3.1 introduce the actual situation and g ...

Added by russthebarber on Sun, 27 Oct 2019 12:03:53 +0200

P4141 the division of lost things Backpack

Meaning: give the volume of $n $items and the maximum knapsack capacity of $m $, find out the number of schemes of $w\in [1,m] $knapsack after removing one item of $i $. There are n items with volume of W1, W2,... WN. Due to her negligence, the ith item was lost. "How many ways can i use the remaining N – 1 items to fill a backpac ...

Added by countdrac on Sat, 26 Oct 2019 23:31:49 +0300

[HDU 5068]Harry And Math Teacher

Title: There are \ (n \) floors, each floor has two stairs (No. \ (0 \) and \ (1 \). At the beginning, the stairs of the \ (i \) floor and the \ (i +1 \) floor can reach two. There are several operations: Reverse the connectivity of stairs \ (x \) on level \ (i \) and \ (y \) on level \ (i + 1 \) Query the number of schemes from layer \ (x \) ...

Added by xdentan on Sat, 26 Oct 2019 21:26:44 +0300

dom addition, deletion, modification and query

I. create node document.createElement(Tag), Tag must be a legal HTML element 2. Methods to add and delete nodes in DOM:             appendChild(newNode) Add newNode as the last child of the current node insertBefore(newNode,refNode) Insert the new node node before the refNode node replaceChild(newNode,oldNode) ...

Added by dnienhaus on Sat, 26 Oct 2019 18:08:53 +0300

Two languages implement design patterns (C + + and Java) (12: combination pattern)

Composition mode, which combines objects into attribute structure to represent the "part whole" hierarchy. The combination mode makes the use of single object and combination object consistent. Its UML diagram is as follows: The main solution: in our tree structure problem, it blurs the concept of simple elements and complex eleme ...

Added by Tyco on Fri, 25 Oct 2019 19:25:31 +0300

Summary of TP5 routing knowledge

I. routing mode Normal mode (default pathinfo, no route resolution) url_route_on' => false Mixed mode (pathinfo + resolve route) 'url_route_on' => true, 'url_route_must'=> false, Forced mode (must route) url_route_on' => true, 'url_route_must' => true, 2. Dynamic registration route 1. Dynamic registration route Route::rule('routi ...

Added by mdemetri2 on Fri, 25 Oct 2019 18:19:02 +0300