This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $handle = fopen("inputfile.txt", "r"); | |
| if ($handle) { | |
| while (($line = fgets($handle)) !== false) { | |
| // process the line read. | |
| } | |
| fclose($handle); | |
| } else { | |
| // error opening the file. | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $array = ["周日","周一","周二","周三","周四","周五","周六"]; | |
| $time=date("w",time()); | |
| echo $array[$time]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] | |
| initWithTarget:self | |
| action:@selector(handleLongPress:)]; | |
| longPress.minimumPressDuration = 1.0; | |
| [myView addGestureRecognizer:longPress]; | |
| [longPress release]; | |
| - (void)handleLongPress:(UILongPressGestureRecognizer *)gesture { | |
| if(UIGestureRecognizerStateBegan == gesture.state) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UILabel *tips = [[UILabel alloc] init]; | |
| tips.numberOfLines = 0; | |
| tips.textAlignment = NSTextAlignmentCenter; | |
| tips.textColor = [UIColor lightGrayColor]; | |
| tips.text = @"No Data."; | |
| self.tableView.backgroundView = tips; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CLLocationCoordinate2D coor = ctrpoint;//原始坐标 | |
| NSDictionary* testdic = BMKConvertBaiduCoorFrom(coor,BMK_COORDTYPE_GPS); | |
| //NSLog(@"x=%@,y=%@",[testdic objectForKey:@"x"],[testdic objectForKey:@"y"]); | |
| //解密加密后的坐标字典 | |
| CLLocationCoordinate2D baiduCoor = BMKCoorDictionaryDecode(testdic);//转换后的百度坐标 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [UIView animateWithDuration:.25 | |
| animations:^{ | |
| self.btnAdd.frame = hideFrame; | |
| self.btnEnd.frame = hideFrame; | |
| } | |
| completion:^(BOOL finished){ | |
| self.btnAdd.hidden = YES; | |
| self.btnEnd.hidden = YES; | |
| self.startLabel.text = @""; | |
| [UIView animateWithDuration:.4 |