銆銆鑻est.rar鏂囦歡涓嶅瓨鍦紝鍒欐墦鍖協ile1.txt鏂囦歡鎴恡est.rar rar a test.rar file2.txt 鑻est.rar鏂囦歡宸茬粡瀛樺湪錛屽垯娣誨姞file2.txt鏂囦歡鍒皌est.rar涓?榪欐牱 test.rar涓氨鏈変袱涓枃浠朵簡錛夋敞錛屽鏋滄搷浣滄枃妗d腑宸叉湁鏌愭枃浠剁殑涓浠芥嫹璐濓紝鍒檃鍛戒護鏇存柊璇ユ枃浠?鍙︼紝瀵圭洰褰曚篃鍙互榪涜鎿嶄綔 eg. rar a test.rar dir1 銆?nbsp;
銆銆2) e test.rar 娉紝鐢╡瑙e帇鐨勮瘽錛屼笉浠呭師鏉ョ殑file1.txt鍜宖ile2.txt琚В鍘嬪埌褰撳墠鐩綍錛屽氨榪瀌ir1閲岄潰鐨勬墍鏈夋枃浠朵篃琚В鍘嬪埌褰撳墠鐩綍涓嬶紝涓嶈兘淇濇寔鍘嬬緝鍓嶇殑鐩綍緇撴瀯錛屽鏋滄兂淇濇寔鍘嬬緝鍓嶇殑鐩綍緇撴瀯錛岀敤x瑙e帇銆?nbsp;
銆銆3) c 瀵規搷浣滄枃妗f坊鍔犺鏄庢敞閲?eg. rar c test.rar
銆銆錛堜細鍑虹幇Reading comment from stdin瀛楁牱錛岀劧鍚庤緭鍏ヤ竴琛屾垨澶氳娉ㄩ噴錛屼互ctrl+d緇撴潫錛夈?nbsp;
銆銆5) d 浠庢枃妗d腑鍒犻櫎鏂囦歡 eg. rar d test.rar file1.txt e
銆銆灝嗘枃浠惰В鍘嬪埌褰撳墠鐩綍 eg. rar銆?nbsp;
銆銆6) e test.rar 娉紝鐢╡瑙e帇鐨勮瘽錛屼笉浠呭師鏉ョ殑file1.txt鍜宖ile2.txt琚В鍘嬪埌褰撳墠鐩綍錛屽氨榪瀌ir1閲岄潰鐨勬墍鏈夋枃浠朵篃琚В鍘嬪埌褰撳墠鐩綍涓嬶紝涓嶈兘淇濇寔鍘嬬緝鍓嶇殑鐩綍緇撴瀯錛屽鏋滄兂淇濇寔鍘嬬緝鍓嶇殑鐩綍緇撴瀯錛岀敤x瑙e帇銆?nbsp;
寤虹珛鏁版嵁琛紝鏈塯enerated always鍒?br />create table t1 ( c1 char(30), c2 double, c3 int not null generated always as identity (start with 100, increment by 5) ) 絎竴嬈℃洿鏂扮敤insert into t1(c1,c2,c3) values('123',34,default) 浠ュ悗鐢?insert into t1(c1,c2) values('hi',45)
濡傛灉鏄痝enerated by default create table t1 ( c1 char(30), c2 double, c3 int not null generated by default as identity (start with 100, increment by 5) ) 濡傛灉鎻掑叆鏃跺彧鏈変袱涓弬鏁幫紝灝辨寜榛樿鐨勬潵 濡傛灉涓変釜鍙傛暟錛屽氨鏄彃鍏ョ殑閭d釜鏁?br />榛樿鐢熸垚鐨勭涓変釜鏁板彲浠ヤ慨鏀癸紝緋葷粺浼氭湁璁板綍錛屽嵆浣夸慨鏀逛簡涔熶細浠庝笂涓嬈$殑榛樿浣嶇疆寮濮嬪彔鍔犮備笉浼氬啀鍥炲埌100.
--select * from authors
--select au_lname, au_fname from authors where state ='CA'
--select * from publishers
--select distinct state from publishers
--select *from titles
--select * from titles where price is null
-- select case when price is null then 0 else price end from titles-- it works!!!!!!!!!!
-- 4 Functions
--select varchar_format(current date - date('2011-01-01') + date, 'DD-MM-YY') as newDate,
-- varchar_format(date,'DD-MM-YY') as olddate from sales
--values current date - date('2014-01-01') + date('2014-01-02')
--select *from roysched
--select hex(lorange) from roysched
--select * from titles where price in (20,19) -- in one shot ZANZANZANZANZAN!!!
select
case type when 'business' then Title else 'other' end from titles 鑱旂郴鏉′歡璇彞騫舵樉紺烘垚涓嶅悓鐨勫睘鎬?/p>-----------------------------------------------------------------------------------------------
--select * from authors
--select au_lname, au_fname from authors where state ='CA'
--select * from publishers
--select distinct state from publishers
--select *from titles
--select * from titles where price is null
-- select case when price is null then 0 else price end from titles-- it works!!!!!!!!!!
-- 4 Functions
--select varchar_format(current date - date('2011-01-01') + date, 'DD-MM-YY') as newDate,
-- varchar_format(date,'DD-MM-YY') as olddate from sales
--values current date - date('2014-01-01') + date('2014-01-02')
--select *from roysched
--select hex(lorange) from roysched
--select * from titles where price in (20,19) -- in one shot ZANZANZANZANZAN!!!
--select case type when 'business' then Title else 'other' end from titles
--select syscolumns.length from syscolumns where syscolumns.id = 'titles' and syscolumns.name = 'title'
--5 Grouping
--select (days(max(pubdate)) - days(min(pubdate)) )/365 from titles
--select title from titles order by length(title)
--select *from titles
--select count(*) from authors group by city
--select title from titles where length(title) = (select max(length(title)) from titles)
--select coalesce(price,0) from titles -- yuan lai bushi yong is null shi yong zhe ge a!!!!
--select length(price) from titles
/*
select title from titles where length(title) >= all
(
select length(title) from titles
)
*/
--select pubdate from titles
/*
select title,pubdate from titles where pubdate >= all
(
select pubdate from titles
)
*/
--select count(*) from sales group by stor_num
--select * from sales
--select * from publishers
--select * from titles as a inner join publishers as b on a.pub_id = b.pub_id
--select title,city,a.pub_id from titles as a inner join publishers as b on a.pub_id = b.pub_id where city not in ('Boston')
--select * from psales
/*
select b.ord_num,b.discount,d.discounttype from psales as a inner join salesdetail as b on a.stor_id = b. stor_id and a.ord_num = b.ord_num
inner join stores as c on a.stor_id = c.stor_id inner join discounts as d on c.stor_id = d.stor_id order by b.ord_num
*/
--select * from authors
--select * from publishers
--select * from authors as a inner join publishers as b on a.city = b.city
--select sum(qty) from salesdetail
--select pub_name, count(distinct type) from publishers as a inner join titles as b on a.pub_id = b.pub_id group by pub_name
price > all(select coalesce(price,0) from titles as t2 where t2.type != t1.type)
銆
--select * from titles
--select t1.type,t1.title,t1.price,(select avg(price) from titles as t2 where t2.type = t1.type)
--from titles as t1
--where price > (select avg(price) from titles as t2 where t2.type = t1.type)
銆
--select avg(price) from titles
--select abs(13.93750000000000000000000000- price) from titles
--select coalesce(abs((select avg(price) from titles) - price),0) from titles
--select count(*) as ANS from SB_AUCTION where (days(enddate) - days(startdate) < 10)
/*
select
description, enddate, reserve from SB_Auction inner join sb_item on SB_Auction.itemid = sb_item.itemid
where (date('2011-02-20') >= startdate and date('2011-02-20') <= enddate) order by reserve desc
*/
銆
--select * from sb_bid
--select name from (sb_bid as a inner join sb_auction as b on a.bidder = b.userid) inner join sb_user as c on b.userid = c.userid group by name
--select * from authors
--select newA.name from
--(
--select name,c.itemid from (sb_user as a inner join sb_auction as b on a.userid = b.userid)
-- inner join sb_item as c on b.itemid = c.itemid
--) AS newA
--select * from sb_auction
/*
create
view weitaol_view
as
select
c.auctionid, max(amount) as winning_bid from sb_auction as a inner join sb_user as b on a.winnerid = b.userid
inner join sb_bid as c on a.auctionid = c.auctionid where a.state = 'sold' group by c.auctionid
*/
--select * from weitaol_view
銆
select
enddate, description,coalesce(name,'==') as name ,coalesce(c.winning_bid,0) as winning_bid
from sb_auction as a inner join sb_item as b on a.itemid = b.itemid
left join sb_user on a.winnerid = sb_user.userid
left join weitaol_view as c on a.auctionid = c.auctionid
/*
]]>C# 鐚滄暟瀛楀皬娓告垙(IDisposable鎺ュ彛緇冧範)http://m.shnenglu.com/abilitytao/archive/2014/09/21/208368.htmlabilitytaoabilitytaoSun, 21 Sep 2014 04:26:00 GMThttp://m.shnenglu.com/abilitytao/archive/2014/09/21/208368.htmlhttp://m.shnenglu.com/abilitytao/comments/208368.htmlhttp://m.shnenglu.com/abilitytao/archive/2014/09/21/208368.html#Feedback0http://m.shnenglu.com/abilitytao/comments/commentRss/208368.htmlhttp://m.shnenglu.com/abilitytao/services/trackbacks/208368.htmlusing System; using System.Collections.Generic; using System.Linq; using System.Text;
class iTimer:IDisposable { String mes; DateTime s; public iTimer(String mes) { this.mes = mes; s = DateTime.Now; }
publicvoid Dispose() {
DateTime t = DateTime.Now; TimeSpan ts = t - s; Console.Error.WriteLine("spent time(in Milliseconds):"); Console.Error.WriteLine(ts.TotalMilliseconds);
}
publicstaticvoid Main() {
using (iTimer t = new iTimer("game")) { int ans = 10; int input = Int32.Parse(Console.ReadLine());