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
//failed | |
curl --request POST \ | |
> --url http://api.lineopener.com/index.php/api/login \ | |
> --header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ | |
> --form [email protected] \ | |
> --form password=test123 |
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
//MARK:API | |
func loginRequest(username:String, password:String) { | |
activityIndicator.startAnimating() | |
self.fieldView.endEditing(true) //reset screen | |
guard let url = URL(string:"http://api.lineopener.com/index.php/api/login") else { return } | |
let parameters = ["email": username, "password": password] | |
var request = URLRequest(url: url) |
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
<NSHTTPURLResponse: 0x60400042e540> { URL: http://166.62.92.171/lineopner/index.php/api/login } { Status Code: 200, Headers { | |
"Cache-Control" = ( | |
"no-store, no-cache, must-revalidate, post-check=0, pre-check=0" | |
); | |
"Content-Length" = ( | |
56 | |
); | |
"Content-Type" = ( | |
"application/json" | |
); |
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 LabelWithBgImage : UILabel { | |
var topInset: CGFloat = 0.0 | |
var bottomInset: CGFloat = 0.0 | |
var leftInset: CGFloat = 10.0 | |
var rightInset: CGFloat = 10.0 | |
public override init(frame: CGRect) { | |
super.init(frame: frame) | |
} |
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
Venues | |
{ | |
"venue_name":"John", | |
"place":30, | |
"image":null, | |
"num_restaurants":12 | |
} |
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
- (void)renderComets { | |
NSArray *strips = PPDeviceRegistry.sharedRegistry.strips; | |
if (strips.count >= self.numStrips) { | |
for (NSUInteger s=0; s<self.numStrips; s++) { | |
PPStrip *strip = strips[s]; | |
for (int i=0; i<strip.pixels.count; i++) { | |
PPPixel *pix = strip.pixels[i]; | |
pix.red = pix.green = pix.blue = 0; | |
} | |
NSMutableArray *stripComets = self.comets[s]; |
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
if ((-self.beacon.rssi < strip.pixels.count)) { | |
pixcount = -self.beacon.rssi; | |
NSLog(@"1 - %d", pixcount); | |
}else { | |
pixcount = strip.pixels.count; //should be 72 | |
NSLog(@"2 - %d", pixcount); | |
} | |
/* |
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
UIButton *adButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | |
[adButton setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 50.0f)]; | |
adButton.backgroundColor = [UIColor purpleColor]; | |
//[self.view addSubview:adButton]; |
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
- (void)adButtonTapped:(id)sender { | |
TLLog( @"BCWebAdView:adButtonTapped:sender:%@", sender ); | |
[self _adButtonTapped:sender event:nil]; | |
} | |
- (void)_adButtonTapped:(id)sender event:(UIEvent *)e { | |
... |
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
//BCWebAdView.m | |
-(void)testmethod:(id)sender{ | |
NSLog(@"testmethod"); | |
} | |
//-----------// | |
//TLAdView.m | |
#import "TLAdView.h" |