Introduction to sed command of Linux

sed:Stream EDitor,Line editor: Usage: sed [option]…’script’inputfile… Here we will first show the contents of /etc/fstab, which will be used later.   Common options: -n:Do not export contents from the pattern to the screen. -e:Multipoint editing -f:/PATH/TO/SCRIPT_FILE:Read the edit script from the specified file -r:Supports extended regular expressions -i:Original editor Address delimit (in the following edit command bar, for example, screenshots): No address: processing the full text. Single address: #:Specified line /pattern/:Each row that ...

.htaccess set custom error page

Label: com http HTML file TP C doc PHP 00 404Errors can be written like this ErrorDocument code error.php If it’s 404 error, jump to file error. PHP Other common error page writings (of which 404 errors have two writings, the one above and the one below are generic error definitions) ErrorDocument 404 /error/404.php ErrorDocument 500 /error/500.php ErrorDocument 400 /error/400.php ErrorDocument 401 /error/401.php ErrorDocument 403 /error/403.php ErrorDocument 503 /error/503.php If it’s a 404 error, jump to the 404. PHP file in the error directory If it&#...

TypeScript face object two

optional attribute Use this attribute to be an optional attribute. interface BaseButtonProps { icon?: string; } generic type Let’s look at the following simple generics. function greetNane<T>(name:T):T{ return name } let myIdentity: <T>(name: T) => T = greetNane; We can also define the generic function using the literal size of the object with the calling signature. function greetNane<T>(name:T):T{ return name } let myIdentity: {<T>(name: T): T} = greetNane; This leads us to write the first generic interface. We take the font size of the object i...

LeetCode: summary interval [228]

LeetCode:Summary interval [228] Title Description Given an array of ordered integers without repeating elements, returns the sum of the array interval ranges. Example 1: Input: [0,1,2,4,5,7] Output: ["0->2","4->5","7"] Explanation:0,1,2 It can form a continuous interval, and 4,5 can form a continuous interval. Example 2: Input: [0,2,3,4,6,8,9] Output: ["0","2->4","6","8->9"] Explanation:2,3,4 It can form a continuous interval, and 8,9 can form a continuous interval. Topic analysis JavaAn explanation class Solution { public List<String> summaryRanges(int[] nums) { ...

BZOJ2212 [POI2011] Tree Rotations 【treap】

Title Analysis: The written irrotational Treap should run away, but the total time limit for bzoj judgment is. Change the relevant implementation into line segment tree merging. Code: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 1000020; 5 6 int n; 7 int ch[maxn][2],num,val[maxn]; 8 9 int son[maxn>>2][2],sz[maxn],rot[maxn],data[maxn],key[maxn]; 10 11 long long ans = 0; 12 13 int merge(int r1,int r2){ 14 if(r1 == 0) return r2; if(r2 == 0) return r1; 15 if(key[r1] < key[r2]){ 16 son[r1][1] = merge(son[r1][1],r2);...

Dlib is compiled into static library and invoked by other programs.

1. Git Download: https://github.com/davisking/dlib   Official website: http://dlib.net/ Two, compiled into a static library in VS   1、Create static library project in vs2015 (c++ version above vs2015).   2、Add dlib\dlib\all\source.cpp to the source file, do not move, add git directly.   3、Direct compilation will generate xxx.lib static library and add it to your own project.

Chip industry for 60 years. The first chapter is good, followed by information or public relations: 2.5 stars, “core things”.

Core: a book reading chip industry The author attempts to introduce the history of the chip industry in the past 60 years. The book contains 4 chapters, and the first chapter is not bad. It introduces the major events and some key technical details of the chip industry. Most of the events have been seen many times in other materials. Some technical details are for the first time, such as optical lithography. The latter 3 chapters are stacked in many industry materials and public relations manuscripts, and I feel dull during my reading. In the later order, the author said that the book was wr...

UG/NX 8 installation method (illustrated in detail)

UG8.0,Since it was acquired by SIEMENS, it has been renamed NX.NX8.0,As a very good 3D mold design software. He can provide a proven solution to the user’s virtual product design and process design needs. It is loved by many users for its comprehensive design concept and good interface. UG8.0 adds duplicate commands and constraints to previous versions.Navigator, read-only component prompts and creates layer classification tool.The blogger here provides ug8.0 crack Chinese version download, contains 32 and 64 bits of two packets, with crack files, the following is a detailed install...