start new:
tmux
start new with session name:
tmux new -s myname
| var htmlText = "<div id='pop' style='background-color:#0000ff;"; | |
| htmlText += "position: absolute;" | |
| htmlText += "left: 40%;"; | |
| htmlText += "'>"; | |
| htmlText += "foobar3333<br><br><br> Hoge </div>"; | |
| $("#page").prepend(htmlText); | |
| console.log($('#pop')); |
| NSTimeZone* sourceTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"]; | |
| NSTimeZone* destinationTimeZone = [NSTimeZone localTimeZone]; | |
| NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
| [dateFormatter setDateFormat:formatter]; | |
| [dateFormatter setTimeZone:sourceTimeZone]; | |
| NSDate *rawDate = [dateFormatter dateFromString:dateTime]; | |
| sudo service nginx stop |
| git remote prune origin |
| import theano | |
| from pylearn2.models import mlp | |
| from pylearn2.training_algorithms import sgd | |
| from pylearn2.termination_criteria import EpochCounter | |
| from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix | |
| import numpy as np | |
| from random import randint | |
| class XOR(DenseDesignMatrix): |
| NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; | |
| AFURLSessionManager *sessionManager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; | |
| NSURL *url = [NSURL URLWithString:apiURL]; | |
| NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | |
| [request setHTTPMethod:method]; | |
| [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; | |
| if (isNeedToken) { | |
| [request setValue:[NSString stringWithFormat:@"token %@", self.token] forHTTPHeaderField:@"Authorization"]; | |
| } | |
| - (RACSignal *)authorizeToGithubUsingOauth { | |
| __weak GitHubClient *weakSelf = self; | |
| RACSignal *authorizeSignal = [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) { | |
| CFUUIDRef uuid = CFUUIDCreate(NULL); | |
| NSString *uuidString = CFBridgingRelease(CFUUIDCreateString(NULL, uuid)); | |
| CFRelease(uuid); | |
| NSCharacterSet *slashSet = [NSCharacterSet characterSetWithCharactersInString:@"/"]; | |
| NSString *baseURLString = [BASE_WEB_URL stringByTrimmingCharactersInSet:slashSet]; | |
| #pragma mark - UIActionSheetDelegate | |
| - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { | |
| if (buttonIndex == 0) { | |
| [self takePhoto]; | |
| } else if (buttonIndex == 1) { | |
| [self choosePhotoFromLibrary]; | |
| } | |
| } |
| CLAuthorizationStatus authStatus = [CLLocationManager authorizationStatus]; | |
| if (authStatus == kCLAuthorizationStatusNotDetermined) { | |
| // _locationManager is CLLocationManager | |
| [_locationManager requestWhenInUseAuthorization]; | |
| return; | |
| } else if (authStatus == kCLAuthorizationStatusDenied || authStatus == kCLAuthorizationStatusRestricted) { | |
| // show location services denied alert | |
| return; | |
| } |