Category Archives: 轻松一刻


2018.11.07 , , No Comments 0 views
Objective-C // 1.截取字符串 NSString*string =@"sdfsfsfsAdfsdf"; string = [string substringToIndex:7];//截取掉下标7之后的字符串 NSLog(@"截取的值为:%@",string); [string substringFromIndex:2];//截取掉下标2之前的字符串 NSLog(@"截取的值为:%@",string); // 2.匹配字符串 NSString*string =@"sdfsfsfsAdfsdf"; NSRangerange = [stringrangeOfString:@"f"];//匹配得到的下标 NSLog(@"rang:%@",NSStringFromRange(range)); string = [string substringWithRange:range];...... >>阅读全文<<


2013.09.01 , , No Comments 596 views

准确数字An Exact Number

2013.08.31 , , No Comments 542 views
A tourist was visiting New Mexico and was amazed at the dinosaur bones lying about.       "How old are these bones?" the tourist asked an elderly Native American, who served as a guide.       "Exactly one hundred million and three years old.       "How can you be so sure?" inquired the tourist.       "Well," replied the guide, " a geologist came by here and told me these bones were one hundred million years old, and that was exactly three years ago.       一位游客在新墨西哥游览。他对随处...... >>阅读全文<<


2013.08.29 , , No Comments 614 views
Mrs. Brown was going out for the day. She locked the house and tacked a note for the milkman on the door: "NOBODY HOME. DON'T LEAVE ANYTHING." When she got back that night, she found her door broken open and her house ransacked. On the note she had left, she found the following message added: "THANKS! WE HAVEN'T LEFT ANYTHING!" 布朗太太要外出一天。她锁好了房门,在门上给送牛奶的人钉了一张便条:“家里没人,请不要留下任何东西!” 她当天晚上回家后发现房间门被撞开,房子被洗劫一空。在她留给送奶...... >>阅读全文<<


2013.08.21 , , No Comments 597 views
Your Coat Is on Fire The master, to impress on his pupils the need of thinking before speaking, told them to count fifty before saying anything important, and one hundred if it was very important. The next day he was speaking, standing with his back to the fire, when he noticed several lips moving rapidly. Suddenly the whole class shouted: Ninety-eight, ninety-nine, a hundred. Your coat is on fire, sir! 您的大衣着火了 老师为了让学生记住先思考后发言,告诉他们在说出重要事情之前先数到50,如果...... >>阅读全文<<

Rope or Ox 到底是绳子还是公牛

2013.08.20 , , No Comments 578 views
The man in the prison asked a new comer why he was sent there. The new comer answered: I am out of luck, I think. A few days ago I was walking in the street when I saw a piece of dirty rope. I thought nobody wanted it and so I picked it up and took it home. But it is not against the law to pick up a piece of rope and take home! I told you I had bad luck, didn't I? the man sighed, The trouble is that I didn't notice there was an ox at the other end of that rope. 绳子还是公牛? 在监狱里,一...... >>阅读全文<<


2013.08.14 , , No Comments 592 views
One day after school the teacher said to his students, Tomorrow morning, if any one of you can answer my first question, I will permit him or her to go home earlier. The next day, when the teacher came into the classroom, he found the blackboard daubed. He was very angry and asked, Who did it? Please stand up! It's me, said Bob, Now, I can go home. Good-bye, Sir.   我可以回家了 一天,放学以后,老师对他的学生们说:明天上午,如果你们当中的任何一个同学能首先回答我的问题,我就准许他或她最...... >>阅读全文<<

A Soldier’s Brilliant Idea

2013.08.07 , , No Comments 50,314 views
Mr. Robinson had to travel somewhere on business, and as he was in a hurry, he decided to go by air. He liked sitting beside a window when he was flying, so when he got on to the plane, he looked for a window seat. He found all of them had already had been taken except for one. There was a soldier sitting in the seat beside this one, and Mr. Robinson was surprised that he had not taken the one by the window; but, anyhow, he at once went towards it. When he reached it, however, he saw that ...... >>阅读全文<<