精华内容
下载资源
问答
  • 在定语从句中,which 和that 在指代事物时,一般可以互换使用,但并非在任何情况下都是这样,这里介绍宜用that, 而不宜用which 的情况.①先行词为不定代词,all,much,something,everything,anything,nothing,none,the one...
    在定语从句中,which 和that 在指代事物时,一般可以互换使用,但并非在任何情况下都是这样,这里介绍宜用that, 而不宜用which 的情况.
    ①先行词为不定代词,all,much,something,everything,anything,nothing,none,the one等,
    1.We should do all that is useful to the people .
    2.There's nothing that can be said about it .
    3.Do you mean the one that was bought yesterday?
    ②先行词被only, any, few, little, no, just, very, one of等词修饰时.
    1.The only thing that we could do was to wait.
    2.That's the very word that is wrongly used.
    The last place (that) we visited was the chemical works.
    You can take any (=whichever) seat that is free.
    I hope the little that I can will be of some help to them.
    比较 *This is one of the best novels that were published last year.
    *This is the only one of the best novels that was published last year.
    ③先行词是序数词时或被序数词修饰时.
    1.When we talk about Wuxi, the first that comes into mind is Tai Lake.
    2.This is the third film that has been shown in our school this term.
    ④先行词是最高级或被最高级修饰时.
    1.This is the best that can be done now.
    2.The most important thing that should be done right now is how to stop him from going on.
    ⑤先行词既有人又有物,用which和who都不适合,这时宜用that. 如:
    1.The writer and his novel that you have just talked about is really well known .
    2.The rider and his bike that had run over an old woman were held up by the police.
    ⑥被修饰词为数词时.
    1.Yesterday I caught two fish and put them in a basin of water .Now you can see the two that are still alive .
    ⑦如果有两个从句,其中一个关系代词已用which ,另一个关系代词宜用that,以避免语言的单调或重复.
    Edison built up a factory which produced things that had never been seen before.
    ⑧疑问词是who或which,关系代词宜用that,以避免重复.
    1. Which is the book that you like best?
    2. Who is the man that is standing at the gate?
    ⑨主句是There be 结构,修饰其主句的定语从句宜用that 作关系代词. 如:
    1. There is still a seat in the corner that is still free.
    ⑩被修饰成分为表语时,或者关系代词本身是定语从句的表语时,该关系代词宜用that .
    1. That's a good book that will help you a lot.
    2. My home village is no longer the place ( that ) it used to be .
    定语从句中宜用which而不宜用that 的情况:
    ①当关系代词的前面有介词时.
    1.A zoo is a park in which many kinds of animals are kept for exhibition.
    2.Is this the room in which Mr. White lives?
    ②在非限制性定语从句中.
    1.Crusoe's dog, which was are now very old, became ill and died .
    2.More and more people are beginning to learn English, which is becoming very popular in our country. (which指代主句)
    ③在一个句子中有两个定语从句,其中一个定语从句的关系代词用了that, 另一个宜用which .
    1. Let me show you the novel,that I borrowed from the library which was newly open to us.
    2. At the station I bought some magazines that might help me to pass the time on the train and which I could pass on to others when I finished them.
    ④当关系代词后面带有插入语时.
    1. Here's the English grammar which, as I have told you, will help improve your English.
    ⑤先行词本身是that, 宜用which .
    What's that which she is looking at?
    ⑥先行词是those+复数名词.
    A shop should keep a stock of those goods which sell best.
    展开全文
  • Which用法?? 要全一点哦,,, pron.(代词) 1,哪一个,哪一些:特定的一个或那些: Which of these is yours? 这些里面哪个是你的? The one or ones previously mentioned or implied, specifically: 2,...
    Which的用法?? 要全一点哦,,,
     
    pron.(代词)
    1,哪一个,哪一些:特定的一个或那些:
    Which of these is yours?
    这些里面哪个是你的?
    The one or ones previously mentioned or implied, specifically:
    2,那一个,那一些:先前提到的或暗指的那个或那些,尤其是:
    在从句中用作关系代词为其先行词提供额外附加信息:
    my house, which is small and old.
    我的房子,又小又旧

    3,用在前面带有that 或一介词的从句中作关系代词,定语从句用以给先行词下定义或做限制:
    that which he needed; the subject on which she spoke.
    那他所需要的;她谈到的话题

    4,用以取代that 在从句中作关系代词,该从句限制或给其先行词下定义:
    The movie which was shown later was better.
    后来上映的电影较好看

    5,任一:任一个规定或暗示的事、事情、人;任一:
    Choose which you like best.
    选你最喜欢的
    A thing or circumstance that:
    那事情,那情况:
    He left early, which was wise.
    他早早地离开,那是很明智的

    adj.(形容词)
    1,…那个:一定数目的人或物中特定的一个或一些:
    Which part of town do you mean?
    你是说城镇的哪个地区?

    2,任一个,任一些;无论哪个:
    Use which door you please.
    随便你用哪个门

    3,…的那个:先前提及或暗指的那个:
    It started to rain, at which point we ran.
    天开始下雨时,我们跑了起来

    转载于:https://www.cnblogs.com/byeday/archive/2009/07/19/1526530.html

    展开全文
  • You are to simulate the playing of games of ``Accordian‘‘ patience, the rules for which are as follows:Deal cards one by one in a row from left to right, not overlapping. Whenever the card matches ...

    You are to simulate the playing of games of ``Accordian‘‘ patience, the rules for which are as follows:

    Deal cards one by one in a row from left to right, not overlapping. Whenever the card matches its immediate neighbour on the left, or matches the third card to the left, it may be moved

    onto that card. Cards match if they are of the same suit or same rank. After making a move, look to see if it has made additional moves possible. Only the top card of each pile may be moved at any given time. Gaps between piles should be closed up as soon

    as they appear by moving all piles on the right of the gap one position to the left. Deal out the whole pack, combining cards towards the left whenever possible. The game is won if the pack is reduced to a single pile.

    Situations can arise where more than one play is possible. Where two cards may be moved, you should adopt the strategy of always moving the leftmost card possible. Where a card may be moved either one position to

    the left or three positions to the left, move it three positions.

    Input

    Input data to the program specifies the order in which cards are dealt from the pack. The input contains pairs of lines, each line containing 26 cards separated by single space characters. The final line of the

    input file contains a # as its first character. Cards are represented as a two character code. The first character is the face-value (A=Ace, 2-9, T=10, J=Jack, Q=Queen, K=King) and the second character is the suit (C=Clubs, D=Diamonds, H=Hearts, S=Spades).

    Output

    One line of output must be produced for each pair of lines (that between them describe a pack of 52 cards) in the input. Each line of output shows the number of cards in each of the piles remaining after playing

    ``Accordian patience‘‘ with the pack of cards as described by the corresponding pairs of input lines.

    Sample Input

    QD AD 8H 5S 3H 5H TC 4D JH KS 6H 8S JS AC AS 8D 2H QS TS 3S AH 4H TH TD 3C 6S

    8C 7D 4C 4S 7S 9H 7C 5D 2S KD 2D QH JD 6D 9D JC 2C KH 3D QC 6C 9S KC 7H 9C 5C

    AC 2C 3C 4C 5C 6C 7C 8C 9C TC JC QC KC AD 2D 3D 4D 5D 6D 7D 8D TD 9D JD QD KD

    AH 2H 3H 4H 5H 6H 7H 8H 9H KH 6S QH TH AS 2S 3S 4S 5S JH 7S 8S 9S TS JS QS KS

    #

    Sample Output

    6 piles remaining: 40 8 1 1 1 1

    1 pile remaining: 52

    解决方案:

    首先题意要仔细理解,然后模拟即可,不过,由于处理大量的字符,必须用scanf来输入,而且scanf不能对string类型进行输入,所以不能用string,要用字符数组,如果用string,就必须把字符赋给string,这样很耗时,由于这个,这里tle了几次。然后是模拟,用vector,要2000多毫秒,用list可能比较少点。

    代码:

    #include

    #include

    #include

    #include

    #include

    using namespace std;

    struct node

    {

    char x,y;

    };

    bool cmp(node a,node b)

    {

    if(a.x==b.x) return true;

    if(a.y==b.y) return true;

    return false;

    }

    int main(){

    while(1)

    {

    vector >card;//定义vector(容器),包含的元素类型为stack;

    char temp[3];

    scanf("%c",&temp[0]);

    if(temp[0]==‘#‘) break;

    scanf("%c",&temp[1]);

    stack p;

    node c;

    c.x=temp[0];c.y=temp[1];

    p.push(c);

    card.push_back(p);//把栈存入card容器。

    for(int i=1;i<52;i++)

    {

    getchar();

    scanf("%c%c",&temp[0],&temp[1]);

    node c;

    c.x=temp[0];c.y=temp[1];

    stack t;

    t.push(c);

    card.push_back(t);

    }

    /* int len=card.size();

    for(int i=0;i

    {

    cout<

    }

    getchar();*/

    int len=card.size();//求容器的大小

    for(int i=0;i

    {

    int j=i;

    if(j-3>=0){

    if(cmp(card[j-3].top(),card[j].top())){ //容器也可像数组一样通过下标来使用。

    card[j-3].push(card[j].top());

    card[j].pop();

    if(card[j].empty())

    {

    card.erase(card.begin()+j);//删除某个位置的栈,参数必须为指向该位置的指针

    len=card.size();

    }

    i=-1;

    continue;

    }

    }

    if(j-1>=0){

    if(cmp(card[j-1].top(),card[j].top())){

    card[j-1].push(card[j].top());

    card[j].pop();

    if(card[j].empty())

    {

    card.erase(card.begin()+j);

    len=card.size();

    }

    i=-1;

    continue;

    }

    }

    }

    int l=card.size();

    if(l>1)

    {

    printf("%d piles remaining:",l);

    for(int i=0;i

    printf(" %d",card[i].size());

    }

    else {

    printf("%d pile remaining:",l);

    printf(" %d",card[0].size());

    }

    printf("\n");

    getchar();

    }

    return 0;

    }

    原文:http://blog.csdn.net/wujunokay/article/details/25086957

    展开全文
  • hcidump用法

    千次阅读 2012-10-15 16:16:17
    hcidump reads raw HCI data coming from and going to a Bluetooth device... (which can be specified with the option -i, default is the first avail-  able one) and prints to screen commands, events a

     hcidump  reads raw HCI data coming from and going to a Bluetooth device

     (which can be specified with the option -i, default is the first avail-

     able  one)  and  prints to screen commands, events and data in a human-

    readable form. Optionally, the dump can be written  to  a  file  rather

    than parsed, and the dump file can be parsed in a subsequent moment.

    1,

    hcidump读取发送和接受蓝牙设备的原始hci数据(该设备可以通过-I 参数指定,默认当前第一个有效的连接设备),并按照人可以识别的命令、事件、数据格式打印到屏幕上。转储信息还可以保存到一个当地文件中,从而保证转储文件在后续进行解析。

     

    这里主要介绍转储功能。

    Adb shell

    Hcidump –w /data/1.txt

     

    开始使用这个命令时,发现dump信息不是很稳定,有时候能保存有时候不能保存。由于开始我得路径是放置到sdcard上的。怀疑是sdcard不稳定,然后路径放置到data上后,仍然有这种现象,应该是方法问题。

     

    后来发现Hcidump执行一次后,并没有消失。Ps后还能够在进程中看到该活动。最后采用了后台运行的方式。在存储命令后加 & ,然后操作蓝牙,能够记录下1.cfa每次都在增加,应该是抓到了dump的数据。

    最后将1.txt adb pull出来即可。

     

    2,

    另外,注意用到的-X参数。

    For  every  packet,  not  only is the packet type displayed, but
    also all data in hex and ASCII.
    对于每个包,不仅仅显示包的类型,而且通过hex和ascii格式显示所有数据。

    配合-t参数可以显示全部数据。

    Hcidump –Xt

    参考:

    http://blog.csdn.net/zhaohc_nj/article/details/7990673

    芯片公司有专门分析dump的工具,不知道第三方是否有专门工具,还没有找到?

    展开全文
  • java.lang.Math.cos()返回角度的三角餘弦。...用法:public static double cos(double angle)Parameters:The function has one mandatory parameter angle which is in radians.返回值:該函數返回角度...
  • def 定义函数的用法

    千次阅读 2016-12-02 17:37:41
    def 的用法 def dead(why): print why, "\nGood job!\n" exit(0) def start(): print "You are in a dark room.\n" print "There is a door to your right and left.\n" print "Which one do y
  • Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through ... which you can retrieve and modify its values. Only one instance of the SharedPreferences object
  • Java parallel stream用法

    2017-10-06 10:42:00
    先摘录关于collection...One difficulty in implementing parallelism in applications that use collections is that collections are not thread-safe, which means that multiple threads cannot manipulate a c...
  • shell sed 用法大全

    2015-08-24 17:21:09
    FILE SPACING:   # double space a file ...# double space a file which already has blank lines in it. Output file   # should contain no more than one blank line between lines of text. ...
  • Projects each source value to an Observable which is merged in the output Observable, in a serialized fashion waiting for each one to complete before merging the next. 将source Observable里的每个元素...
  • API def swipe(self, start_x, start_y, end_x, end_y, duration=None): """Swipe from one point to another point, for an optional duration. :Args: - start_x - x-coordinate at which to star...
  • java.lang.Math.tan()返回角度的三角正切。如果参数为NaN或无穷大,则返回...用法:public static double tan(double angle)Parameters:The function has one mandatory parameter angle which is in radians.返回值...
  • Linux下mv命令的用法

    千次阅读 2016-01-12 20:21:11
    After knowing about copy command, the next command which is related is mv command. When you want to move files from one place to another and you don’t want to duplicate it, then mv command is ...
  • 先摘录关于collection并发的一段话:One difficulty in implementing parallelism in applications that use collections is that collections are not thread-safe, which means that multiple threads cannot ...
  • java.lang.Math.cos()返回角度的三角余弦。...用法:public static double cos(double angle)Parameters:The function has one mandatory parameter angle which is in radians.返回值:该函数返回角度...
  • Linux Bash provides a lot of useful features and ... Pipe or |is one of them. Bash provides a command-line interface facility which mainly used to concatenate command output to another command....
  • modf()函数是Python中的...用法:modf(number)参数:There is only one mandatory parameter which is the number.返回值:此方法返回two-item元组中数字的小数和整数部分。两个部分的符号与数字相同。整数部分以浮点...
  • Is one preferred over the other in certain situations? <p>I am writing a program which creates multiple <code>sync.WaitGroup</code>s so does it matter if <code>new</code> or <code>var</code> is used...
  • jsp 所有字体及示例...b> tag is used to make given text bold which is ticker than a normal one. Bold tag is used for the start and end of the text to specif...
  • js中with()的用法

    2007-03-20 14:45:25
    with Statement Establishes the default object for a statement. with (object)  statements Arguments object The new default object. ...One or more statements for which obje...
  • 35. Which two statements are true regarding constraints? (Choose two.)  A. A table can have only one primary key and one foreign key.  B. A table can have only one primary key but multiple foreign...
  • In the process of scraping some documents using Python 2.7, I've run into some annoying page separators, which I've decided to remove. The separators use some funky characters. I already asked one que...
  • OCP-1Z0-051 第133题 子查询的用法

    千次阅读 2014-05-18 10:07:37
    Which two statements are true regarding subqueries? (Choose two.) A. A subquery can retrieve zero or more rows. B. Only two subqueries can be placed at one level. C. A subquery can be used on
  • <p>I'm trying to represent a simplified chromosome, which consists of N bases, each of which can only be one of <code>{A, C, T, G}</code>. <p>I'd like to formalize the constraints with an enum, but I...
  • <p>Which seems fine except for the fact that we're directly using mutexes and not channels. <p>What's a more go-idiomatic way of implementing this? Or is this one of those times where a mutex is ...

空空如也

空空如也

1 2 3
收藏数 59
精华内容 23
关键字:

one用法which