Assume that the apache log format is:118.78.199.98--[09/Jan/2010: 00: 59: 59 + 0800] "GET/Public/Css/index.css HTTP/1.1" 304-"http://www.a.cn/common/index.php”" Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.3 )"
Problem 1: In apachelog, find the top 10 IP addresses with the most accesses.Awk '{print $1}' apache_log | sort | uniq-c | sort-nr | head-n 10
Awk first captures the IP addresses in each log. If the log format is customized, you
Suppose the Apache log format is:118.78.199.98–-[09/jan/2010:00:59:59 +0800] "Get/public/css/index.css http/1.1″304–" http://www.a.cn/common/ index.php "" mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.3) "
Issue 1: Find the most visited 10 IP in Apachelog.awk ' {print $} ' apache_log |sort |uniq-c|sort-nr|head-n 10
awk first grabs the IP from each log, such as the log format is customized, and the-F defines the separator and the pri
be fixed by the component. See.
Drag-sort-listviewDrag reorder in ListItem. Developers have given up on maintenance but there are still a lot of followers.
FreeflowA layout engine produced by Comcast. Freeflow makes it easy for you to customize layouts and beautiful conversion animations.See Comcast good excitement, because he is the author of the company's largest customer.
FadingactionbarFolding st
IPv6 adoption: Challenges and Choices, and ipv6 adoption challenges
Today, many enterprises have begun to adopt IPv6 (Internet Protocol version 6th), and more countries are preparing to increase IPv6 traffic globally. As more and more devices connect to the Internet (such as smart cars, smart homes, and even smart cities), and the available IPv4 address pools quickly run out, today's network space has become more important than ever before. However, using NAT (Network Address Translation) as th
At present, ABR (Adaptive bitrate Adaptive bitrate technology) is a mainstream video playback format, HLS,HSS and HDS are widely used. Multi-screen video playback is also a trend, including mobile phones, tablets, computers, televisions, set-top boxes and other fused together, different occasions different network conditions, may choose different devices to play video.In the video solution test, our system general terminal playback format contains the Hls,hss,hds, depending on the device to choo
.
CardslibA card-style layout control. Remember the former Youdao Dictionary of the default page is this layout.Screen
PhotoViewImageView extension, supports indenting and gestures.
ListviewanimationsAdds animations to the ListView and also provides the ability to swipe to delete selected items. Delete Actions like Android Mail.
IonAnother image loads the library asynchronously. At least three are recommended, many wheels.
Android-menudrawerAnother component of a sliding menu.
Androi
#1, print the usage of the mounted directory, the default is separated by a spacedf-ph | awk ' {print $5,$6} '#2, separated by a space, colon, \ t, semicolonAwk-f ' [: \ t;] ' ' {print '} '#3, Print lines 3rd through 5th in the 6.txt file, nr represents the print line, and $ A is the text all fieldsawk ' nr==3,nr==5 {print} ' 6.txtawk '
Analysis of physical address re ing functions in vmalloc
Figure 1: vmalloc Areas
Figure 2: map three consecutive physical pages to a continuous virtual address
Note: The image goes to professional Linux kernel architecture
Function call relationship:
1) vmap_page_range (unsigned long start, unsigned long end,Pgprot_t Prot, struct page ** pages)
2) Static int vmap_page_range_noflush (unsigned long start, unsigned long end,Pgprot_t Prot, struct page ** pages)
3) Static int vmap_pud_range (pgd_t
I don't know how to understand this function after writing it, but I 'd like to save it here. I hope you can give us some suggestions:
The function video_register_device is located in the include/Media/v4l2-dev.h header file:
References: http://blog.sina.com.cn/s/blog_602f87700101a52s.html
Static inline int _ must_check video_register_device (struct video_device * vdev,
Int type, int nr)
{
Return _ video_register_device (vdev, type,
"
Return
}
Judegedate_01 = "judegedate01. 'date too many yymm1_d1_hsf-m=s'.txt"
Schema_judege01 = "select schema_name from information_schema.schemata ;"
Mysql-h $ {mysql_host}-P $ {mysql_port}-u $ {mysql_user}-p $ {mysql_pass}-e "$ {schema_judege01}" >$ {judegedate_01}
Echo-e "\ e [1; 31 m The databases name in current instance is: \ e [0 m"
Awk 'nr = 2, NR = 0 {print $1} '$ {judegedate_01}
Echo ""
# Get t
is 0, and if it is 0, return 1 atomic_inc (v): Add the value of *v to 1 Atomic_dec (v): Reduce the value of *v by 1 atomic_dec_and_test (v): * The value of V minus 1 and check whether the updated *v is 0, and if it is 0, return 1 atomic_inc_and_test (v): Add the value of *v to 1 and check if the updated *v is 0, and if it is 0, return 1 atomic_add_negative (i, v): Will * V Value Plus I and check whether the updated *v is negative, and if so, return 1 Atomic_inc_return (v): Add the *v value to 1
Use the awk command to merge the two lines with the same name in the following two files.[[email protected] ~]# cat 1.txt Han Hailin 21-year-old Hailin Han 23-year-old Han Linhai 22-year-old Lin Han 24-year-old [[email protected] ~]# cat 2.txt Han Linhai male hailin Han Nan Han Hailin male Linhai Han NanOutput effect:Han Hailin 21-year-old male[[email protected] ~]# awk ' nr==fnr{a[$1]=$2}nr>fnr{print $0,a[
(_ ioc_typeshift + _ ioc_typebits) // displacement of the size field, 16
# DEFINE _ ioc_dirshift (_ ioc_sizeshift + _ ioc_sizebits) // direction field displacement, 30
/*
* Direction bits.
*/
# DEFINE _ ioc_none 0u // No Data Transmission
# DEFINE _ ioc_write 1u // write data to the device. The driver must read data from the user space.
# DEFINE _ ioc_read 2u // read data from the device. The driver must write data to the user space.
# DEFINE _ IOC (Dir, type,
The following program can be directly read and written to the hard disk in the linux2.6 kernel sector, but also according to the practice of a friend on the internet has been modified;There are two areas that are not very clear: 1, the use of the Bd_claim function, this is a recursive function, such as matching memory pointers and devices, but the call will return an error; 2, Bdev = Open_by_devnum (0x00800000, Fmode_read | Fmode_write); 0x00800000 the confirmation of the number, I do not know w
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.