[mysqldumpslow 报错] Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236.
mysqldumpslow报错:Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236.
总结:是由于top数目太多了。mysqldumpslow遍历只是来的缘故。
/usr/local/mysql/bin/mysqldumpslow -s -t 15 /root/db01-102-slow.log
1。把r去掉试试,还是报错,參数不识别。
[root@slave ]# /usr/local/mysql/bin/mysqldumpslow -s -t 15 /root/db01-102-slow.log Reading mysql slow query log from 15 /root/db01-102-slow.log
Can't open 15: 没有那个文件或文件夹 at /usr/local/mysql/bin/mysqldumpslow line 91.
Count: 22 Time=9.61s (211s) Lock=0.00s (0s) Rows=1.0 (22), [dubbo]@2hosts
select count(*)
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id Count: 177 Time=1.40s (247s) Lock=0.00s (0s) Rows=1.0 (177), [dubbo]@2hosts
select count(*) from user_info
LEFT JOIN system_region a
ON province_id =a.region_id
LEFT JOIN system_region b
ON city_id = b.region_id
LEFT JOIN system_region c
ON district_id = c.region_id Count: 22 Time=13.20s (290s) Lock=0.00s (0s) Rows=10.0 (220), [dubbo]@2hosts
select
coupon_id, coupon_lot.coupon_lot_id, coupon_lot.remark,
coupon.code, coupon_lot.coupon_type, coupon.state,
coupon_lot.ckey, coupon_lot.cvalue, coupon_lot.discount, coupon_lot.type, coupon_lot.channel,
coupon_lot.is_reusable, coupon_lot.start_datetime,
coupon_lot.end_datetime, coupon_lot.create_datetime, coupon.update_datetime ,coupon_lot.department,
coupon_lot.state as couponLotState, coupon_lot.create_operator,coupon_lot.coupon_category,
coupon_lot.pdt_code,brand.brand_name,product_category.category_name
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id
group by coupon_lot.coupon_lot_id
order by coupon_lot.create_datetime DESC
limit N,N Count: 8 Time=1.09s (8s) Lock=0.00s (0s) Rows=10.0 (80), [dubbo]@2hosts
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
limit N,N Count: 1 Time=1.00s (1s) Lock=0.00s (0s) Rows=1.0 (1), root[root]@localhost
select sleep(N) Count: 1 Time=1.13s (1s) Lock=0.00s (0s) Rows=10.0 (10), [dubbo]@[xx]
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
, oi.order_sn
limit N,N Count: 5 Time=2.47s (12s) Lock=0.00s (0s) Rows=0.0 (0), [dubbo]@2hosts
select
user_id, usename, nickname, password, user_group_id, realname, gender, email, mobilephone,
birthday, province_id, city_id, district_id, marry, income, remarks, create_datetime,
active_state, verityEmail, verityPhone, credit, last_login, last_ip, is_locked, channel,
tag, union_partner_uuid, union_user_safekey, is_black, qq, weibo_id, verity_email_key,
verity_phone_key, verity_email_datetime, verity_phone_datetime, verity_question,
verity_answer, cps_code, cps_time_from, cps_time_to, cps_cookie, first_channel
from user_info where mobilephone = 'S' and (channel is null or trim(channel) ='S')
2。查看下mysqldumpslow 使用參数,-s后面须要带參数的。看了西夏at比較合适
[root@db-master-2 ~]# /usr/local/mysql/bin/mysqldumpslow --help
Usage: mysqldumpslow [ OPTS... ] [ LOGS... ] Parse and summarize the MySQL slow query log. Options are --verbose verbose
--debug debug
--help write this text to standard output -v verbose
-d debug
-s ORDER what to sort by (al, at, ar, c, l, r, t), 'at' is default
al: average lock time
ar: average rows sent
at: average query time
c: count
l: lock time
r: rows sent
t: query time
-r reverse the sort order (largest last instead of first)
-t NUM just show the top n queries
-a don't abstract all numbers to N and strings to 'S'
-n NUM abstract numbers with at least n digits within names
-g PATTERN grep: only consider stmts that include this string
-h HOSTNAME hostname of db server for *-slow.log filename (can be wildcard),
default is '*', i.e. match all
-i NAME name of server instance (if using mysql.server startup script)
-l don't subtract lock time from total time
3,在mysqldumpslow的-s后面增加 at參数试试: [root@slave ]# /usr/local/mysql/bin/mysqldumpslow -s at -t 15 /root/db01-102-slow.log
[root@db-master-2 ~]# /usr/local/mysql/bin/mysqldumpslow -s at -t 15 /root/db01-102-slow.log
Reading mysql slow query log from /root/db01-102-slow.log
Count: 22 Time=13.20s (290s) Lock=0.00s (0s) Rows=10.0 (220), [dubbo]@2hosts
select
coupon_id, coupon_lot.coupon_lot_id, coupon_lot.remark,
coupon.code, coupon_lot.coupon_type, coupon.state,
coupon_lot.ckey, coupon_lot.cvalue, coupon_lot.discount, coupon_lot.type, coupon_lot.channel,
coupon_lot.is_reusable, coupon_lot.start_datetime,
coupon_lot.end_datetime, coupon_lot.create_datetime, coupon.update_datetime ,coupon_lot.department,
coupon_lot.state as couponLotState, coupon_lot.create_operator,coupon_lot.coupon_category,
coupon_lot.pdt_code,brand.brand_name,product_category.category_name
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id
group by coupon_lot.coupon_lot_id
order by coupon_lot.create_datetime DESC
limit N,N Count: 22 Time=9.61s (211s) Lock=0.00s (0s) Rows=1.0 (22), [dubbo]@2hosts
select count(*)
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id Count: 5 Time=2.47s (12s) Lock=0.00s (0s) Rows=0.0 (0), [dubbo]@2hosts
select
user_id, usename, nickname, password, user_group_id, realname, gender, email, mobilephone,
birthday, province_id, city_id, district_id, marry, income, remarks, create_datetime,
active_state, verityEmail, verityPhone, credit, last_login, last_ip, is_locked, channel,
tag, union_partner_uuid, union_user_safekey, is_black, qq, weibo_id, verity_email_key,
verity_phone_key, verity_email_datetime, verity_phone_datetime, verity_question,
verity_answer, cps_code, cps_time_from, cps_time_to, cps_cookie, first_channel
from user_info where mobilephone = 'S' and (channel is null or trim(channel) ='S') Count: 177 Time=1.40s (247s) Lock=0.00s (0s) Rows=1.0 (177), [dubbo]@2hosts
select count(*) from user_info
LEFT JOIN system_region a
ON province_id =a.region_id
LEFT JOIN system_region b
ON city_id = b.region_id
LEFT JOIN system_region c
ON district_id = c.region_id Count: 1 Time=1.13s (1s) Lock=0.00s (0s) Rows=10.0 (10), [dubbo]@[10.10.3.8]
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
, oi.order_sn
limit N,N Count: 8 Time=1.09s (8s) Lock=0.00s (0s) Rows=10.0 (80), [dubbo]@2hosts
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
limit N,N Count: 1 Time=1.00s (1s) Lock=0.00s (0s) Rows=1.0 (1), root[root]@localhost
select sleep(N) Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236.
看到后面还是报错:Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236.
4。去看看/usr/local/mysql/bin/mysqldumpslow的第161行左右,究竟是在操作什么脚本。
156 my @sorted = sort { $stmt{$b}->{$opt{s}} <=> $stmt{$a}->{$opt{s}} } keys %stmt;
157 @sorted = @sorted[0 .. $opt{t}-1] if $opt{t};
158 @sorted = reverse @sorted if $opt{r};
159
160 foreach (@sorted) {
161 my $v = $stmt{$_} || die;
162 my ($c, $t,$at, $l,$al, $r,$ar) = @{ $v }{qw(c t at l al r ar)};
163 my @users = keys %{$v->{users}};
164 my $user = (@users==1) ? $users[0] : sprintf "%dusers",scalar @users;
165 my @hosts = keys %{$v->{hosts}};
166 my $host = (@hosts==1) ?
$hosts[0] : sprintf "%dhosts",scalar @hosts;
167 printf "Count: %d Time=%.2fs (%ds) Lock=%.2fs (%ds) Rows=%.1f (%d), $user\@$host\n%s\n\n",
168 $c, $at,$t, $al,$l, $ar,$r, $_;
169 }
170
171 sub usage {
172 my $str= shift;
看到主要是foreach (@sorted)遍历函数,也就是遍历到chunk 236的时候就died结束了,没有办法往下继续foreach了。由于曾经写过代码,知道报错所在的这一行
my $v = $stmt{$_} || die;
是遍历第一句。那么肯定是赋值语句,报错Died。chunk 236肯定是已经遍历到末尾没有数据了,看这个函数没有推断传入的參数是否为null的逻辑。所以当文件数据已经遍历完,可是命令还没有结束,所以继续遍历,遍历null的时候报错,所以进程中止了。解决的方法就是做个限制不要遍历超过原始数据的字符串长度。那么我们再来看运行的命令:
/usr/local/mysql/bin/mysqldumpslow -s at -t 15 /root/db01-102-slow.log 有 -t 15这一句,那么就是要显示出前15个记录,那么假设我的slow.log统计出来仅仅有12个不到15个,而这里有继续遍历到15的话。那进程肯定会Died。
所以这里有2个解决方式:
1 改动/usr/local/mysql/bin/mysqldumpslow里面的源码。加null推断。
这个过程有些复杂。临时略过吧,期待兴许空了再研究。
2 改动命令 /usr/local/mysql/bin/mysqldumpslow -s at -t 15 /root/db01-102-slow.log 。把-t 15改动成-t 10或者-t 5试试。
试了好几次,发现临界点在-t 7上面。例如以下:
[root@slave~]# /usr/local/mysql/bin/mysqldumpslow -s at -t 8 /root/db01-102-slow.log
Reading mysql slow query log from /root/db01-102-slow.log
Count: 22 Time=13.20s (290s) Lock=0.00s (0s) Rows=10.0 (220), [dubbo]@2hosts
select
coupon_id, coupon_lot.coupon_lot_id, coupon_lot.remark,
coupon.code, coupon_lot.coupon_type, coupon.state,
coupon_lot.ckey, coupon_lot.cvalue, coupon_lot.discount, coupon_lot.type, coupon_lot.channel,
coupon_lot.is_reusable, coupon_lot.start_datetime,
coupon_lot.end_datetime, coupon_lot.create_datetime, coupon.update_datetime ,coupon_lot.department,
coupon_lot.state as couponLotState, coupon_lot.create_operator,coupon_lot.coupon_category,
coupon_lot.pdt_code,brand.brand_name,product_category.category_name
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id
group by coupon_lot.coupon_lot_id
order by coupon_lot.create_datetime DESC
limit N,N Count: 22 Time=9.61s (211s) Lock=0.00s (0s) Rows=1.0 (22), [dubbo]@2hosts
select count(*)
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id Count: 5 Time=2.47s (12s) Lock=0.00s (0s) Rows=0.0 (0), [dubbo]@2hosts
select
user_id, usename, nickname, password, user_group_id, realname, gender, email, mobilephone,
birthday, province_id, city_id, district_id, marry, income, remarks, create_datetime,
active_state, verityEmail, verityPhone, credit, last_login, last_ip, is_locked, channel,
tag, union_partner_uuid, union_user_safekey, is_black, qq, weibo_id, verity_email_key,
verity_phone_key, verity_email_datetime, verity_phone_datetime, verity_question,
verity_answer, cps_code, cps_time_from, cps_time_to, cps_cookie, first_channel
from user_info where mobilephone = 'S' and (channel is null or trim(channel) ='S') Count: 177 Time=1.40s (247s) Lock=0.00s (0s) Rows=1.0 (177), [xx]@2hosts
select count(*) from user_info
LEFT JOIN system_region a
ON province_id =a.region_id
LEFT JOIN system_region b
ON city_id = b.region_id
LEFT JOIN system_region c
ON district_id = c.region_id Count: 1 Time=1.13s (1s) Lock=0.00s (0s) Rows=10.0 (10), [xx]@[xxx]
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
, oi.order_sn
limit N,N Count: 8 Time=1.09s (8s) Lock=0.00s (0s) Rows=10.0 (80), [xx]@2hosts
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
limit N,N Count: 1 Time=1.00s (1s) Lock=0.00s (0s) Rows=1.0 (1), root[root]@localhost
select sleep(N) Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236. -- 临界点 -t 7
[root@db-master-2 ~]# /usr/local/mysql/bin/mysqldumpslow -s at -t 7 /root/db01-102-slow.log Reading mysql slow query log from /root/db01-102-slow.log
Count: 22 Time=13.20s (290s) Lock=0.00s (0s) Rows=10.0 (220), [xx]@2hosts
select
coupon_id, coupon_lot.coupon_lot_id, coupon_lot.remark,
coupon.code, coupon_lot.coupon_type, coupon.state,
coupon_lot.ckey, coupon_lot.cvalue, coupon_lot.discount, coupon_lot.type, coupon_lot.channel,
coupon_lot.is_reusable, coupon_lot.start_datetime,
coupon_lot.end_datetime, coupon_lot.create_datetime, coupon.update_datetime ,coupon_lot.department,
coupon_lot.state as couponLotState, coupon_lot.create_operator,coupon_lot.coupon_category,
coupon_lot.pdt_code,brand.brand_name,product_category.category_name
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id
group by coupon_lot.coupon_lot_id
order by coupon_lot.create_datetime DESC
limit N,N Count: 22 Time=9.61s (211s) Lock=0.00s (0s) Rows=1.0 (22), [dubbo]@2hosts
select count(*)
from coupon_lot
left join coupon
on coupon.coupon_lot_id = coupon_lot.coupon_lot_id
LEFT JOIN brand
ON brand.brand_id=coupon_lot.brand_id
LEFT JOIN product_category
on product_category.category_id=coupon_lot.category_id Count: 5 Time=2.47s (12s) Lock=0.00s (0s) Rows=0.0 (0), [xx]@2hosts
select
user_id, usename, nickname, password, user_group_id, realname, gender, email, mobilephone,
birthday, province_id, city_id, district_id, marry, income, remarks, create_datetime,
active_state, verityEmail, verityPhone, credit, last_login, last_ip, is_locked, channel,
tag, union_partner_uuid, union_user_safekey, is_black, qq, weibo_id, verity_email_key,
verity_phone_key, verity_email_datetime, verity_phone_datetime, verity_question,
verity_answer, cps_code, cps_time_from, cps_time_to, cps_cookie, first_channel
from user_info where mobilephone = 'S' and (channel is null or trim(channel) ='S') Count: 177 Time=1.40s (247s) Lock=0.00s (0s) Rows=1.0 (177), [xx]@2hosts
select count(*) from user_info
LEFT JOIN system_region a
ON province_id =a.region_id
LEFT JOIN system_region b
ON city_id = b.region_id
LEFT JOIN system_region c
ON district_id = c.region_id Count: 1 Time=1.13s (1s) Lock=0.00s (0s) Rows=10.0 (10), [dubbo]@[xxx]
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
, oi.order_sn
limit N,N Count: 8 Time=1.09s (8s) Lock=0.00s (0s) Rows=10.0 (80), [dubbo]@2hosts
select
return_sn, relating_order_sn, return_from, oi.order_out_sn ,
add_time , return_type,
return_pay, ui.usename as userName, return_consignee, return_goods_count ,
return_total_fee, total_paid,
return_desc, return_order_status, return_pay_status ,
return_shipping_status, order_return.lock_operator, order_return.return_invoice_no
from order_return LEFT JOIN order_info oi
on order_return.relating_order_sn = oi.order_sn
left join user_info ui on oi.user_id = ui.user_id
left join order_payment on order_payment.order_sn = oi.order_sn
order by order_return.add_time DESC
limit N,N Count: 1 Time=1.00s (1s) Lock=0.00s (0s) Rows=1.0 (1), root[root]@localhost
select sleep(N) [root@db-master-2 ~]#
终于总结:
mysqldumpslow报错:Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236. 是由于top数目太多了,mysqldumpslow遍历只是来的缘故。
[mysqldumpslow 报错] Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236.的更多相关文章
- mysqld_safe启动报错 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable
报错(如下),但是使用mysqld直接启动没有问题. 150718 00:03:38 mysqld_safe Logging to '/var/log/mysqld.log'. 150718 00:0 ...
- mysql 初始化报错 /usr/local/mysql/bin/mysqld:error while loading shared libraries :libaio.so.1
安装mysql在初始化的时候,出现/usr/local/mysql/bin/mysqld:error while loading shared libraries:libaio.so.1 :canno ...
- Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
centos7.5 安装mysql数据库报错 问题: [root@db04-54 scripts]# /etc/init.d/mysqld start /etc/init.d/mysqld: line ...
- WARNING: The host 'r6' could not be looked up with /usr/local/mysql/bin/resolveip.
初始化MySQL数据库提示以下信息: # /usr/local/mysql/scripts/mysql_install_db \ > --defaults-file=/etc/my.cnf \ ...
- mysql初始化/usr/local/mysql/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
[root@test153 ~]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql - ...
- /usr/local/mysql/bin/mysqlbinlog -vv /var/lib/bin/mysql-bin.000008 --base64-output=DECODE-ROWS --start-pos=307
/usr/local/mysql/bin/mysqlbinlog -vv /var/lib/bin/mysql-bin.000008 --base64-output=DECODE-ROWS --st ...
- export PATH=$PATH:/usr/local/mysql/bin
[root@test]# export PATH=$PATH:/usr/local/mysql/bin[root@test]# echo $PATH/usr/local/sbin:/usr/local ...
- nginx报错 [error] open() “/usr/local/var/run/openresty.pid” failed (2: No such file or directory)
解决: 服务没有启动 使用start启动服务,因为没有start而直接使用stop或者reload报错这个问题: 如果方法一没有解决,使用方法二:-C 指定配置文件nginx.conf或者weblua ...
- 64位linux安装了32位jdk8报错怎么办-bash:/usr/local/jdk1.8/jdk1.8.0_181/bin/java:/lib/ld-linux.so.2:badELFinterpreter:Nosuch
-bash:/usr/local/jdk1.8/jdk1.8.0_181/bin/java:/lib/ld-linux.so.2:badELFinterpreter:Nosuch https://bl ...
随机推荐
- Android之用PopupWindow实现弹出listview形式菜单
Android 4.0之前的菜单使用非常广泛,但是在android4.0之后,很少使用先前的菜单样式了.那如何实现下图的样式了? 我们简单模拟一下. (1)屏蔽系统弹出的菜单: 1.首先创建至少一个系 ...
- pack布局
Chapter 2. Geometry Management 第2章 布局管理: 显示部件在屏幕上,他们必须被传递给布局管理器. 布局管理器 控制部件的位置和大小 在显示窗口,几个布局管理器是可用的在 ...
- 2014第7周四excel多列文本复制技巧
刚才win8.1强制安装更新后重启,然后一直显示“安装更新失败正在,正在撤销更改,请不要关闭计算机”,等了很久还是不行,我还是强制按下了电源按钮,然后再次开机还是这样,实在没办法只能等,过了N久后没想 ...
- Noip2013之路
当我回望过去的一年,我想,我对自己没有任何的愧疚,因为我每一个脚印,都踩的很坚实. 第一次参加模拟赛,第一次接触NOIP的规则,虽然考得不是特别好,但是还是很有收获的,首先,数组一定要开得足够大,不然 ...
- SQLServer查看和解决死锁的方法
http://luohonghong.blog.163.com/blog/static/78312058201142411533316/ SQLServer查看和解决死锁的方法 2011-05-24 ...
- JavaScript学习总结(十六)——Javascript闭包(Closure)
原文地址: http://www.cnblogs.com/xdp-gacl/p/3703876.html 闭包(closure)是Javascript语言的一个难点,也是它的特色, 很多高级应用都要依 ...
- [转]Geoserver实现WFS操作
From:http://liushaobo2005.blog.163.com/blog/static/253056702011541462372/ wfs是OGC的标准规范,主要用于提供对矢量地理数据 ...
- 2、Lucene 最简单的使用(小例子)
在了解了Lucene以后,我打算亲手来做一个Lucene的小例子,这个例子只是Lucene最简单的应用:使用Lucene实现标准的英文搜索: 1.下载Lucene 下载Lucene,到Lucene的官 ...
- edit distance leetcode
这样的字符转换的dp挺经典的, 若word1[i+1]==word2[j+1] dp[i+1][j+1] = dp[i][j]:否则,dp[i+1][j+1] = dp[i][j] + 1.(替换原则 ...
- 浏览器桌面通知(notifications)
近期在做公司后台管理系统,当有任务到来时,须要通知当事人,可是 当事人有可能在做别的,浏览器有可能会被最小化,这样就非常难看到通知了.经过查找发现有些浏览器能够使用noitfications.能够在桌 ...