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
| SomeModalViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"SomeModalViewControllerID"]; | |
| vc.providesPresentationContextTransitionStyle = YES; | |
| vc.definesPresentationContext = YES; | |
| vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; | |
| vc.modalPresentationStyle = UIModalPresentationOverCurrentContext; // UIModalPresentationPopover | |
| [self presentViewController:vc animated:YES completion:nil]; |
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
| - (BOOL)isConnectedToInternet | |
| { | |
| CFNetDiagnosticRef diag = CFNetDiagnosticCreateWithURL(kCFAllocatorDefault, (__bridge CFURLRef)[NSURL URLWithString:@"www.apple.com"]); | |
| CFNetDiagnosticStatus status = CFNetDiagnosticCopyNetworkStatusPassively(diag, NULL); | |
| CFRelease(diag); | |
| if (status == kCFNetDiagnosticConnectionUp) { | |
| return YES; | |
| } else { |
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
| class YourCustomViewController: UIViewController { | |
| static func storyboardInstance() -> YourCustomViewController? { | |
| // if your storyboard's name same as VC name | |
| let storyboard = UIStoryboard(name: String(describing: self), bundle: nil) | |
| // make concrete storyboard as initial to use this method | |
| // else, use instantiateViewController(withIdentifier: _ ) | |
| return storyboard.instantiateInitialViewController() as? YourCustomViewController | |
| } | |
| } |
Качаем c оф.сайта OpenWrt необходимую прошивку и необходимые для дальней работы пакеты, описание которых находится в глоссарии.
Заходим в веб-интерфейс по адрессу http://192.168.0.1. Как правило, для TP-LINK этот адресс именно такой.
В боковом меню находим пункт "Системные настройки" (как правило, над пунктом "Выход"). Там выбираем подпунтк "update firmware", выбираем на нашем диске необходимую прошивку, запускаем и ждем пока произойдет установка.
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
| - Implemented obtaining the list of available (paired) devices | |
| - Implemented device connecting | |
| - Implemented device disconnecting |
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
| List<String> names = Arrays.asList("nik", "andrey", "alena", "sasha"); | |
| // First method to sort Java "List" with strings | |
| Collections.sort(names, new Comparator<String>() { | |
| @Override | |
| public int compareTo(String a, String b) { | |
| return b.compareTo(a); | |
| } | |
| }); |
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
| # any idea where i take the data :) | |
| # but basically, i've taken it from 'data(...)' | |
| rf_caret <- train(Class ~ ., data = train, method = "rf", trControl = | |
| trainControl(method = "repeatedcv", repeats = 5)) | |
| rf_importance <- varImpPlot(rf_caret$finalModel) |
NewerOlder