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
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
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 *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section | |
{ | |
if(tableView==self.tableView1){ | |
CGRect frame = tableView.frame; | |
//NSLog(@"self view %@",NSStringFromCGRect(self.view.frame)); | |
//NSLog(@"tableview frame %@",NSStringFromCGRect(frame)); | |
UITableViewHeaderFooterView *headerView = [[UITableViewHeaderFooterView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 20)]; | |
CGFloat btnWidth = 50; | |
CGFloat btnTrail = 10; | |
UIButton *sortButton = [[UIButton alloc] initWithFrame:CGRectMake(frame.size.width-(btnWidth+btnTrail), 0, btnWidth, 20)]; |
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
// | |
// FirstViewController.m | |
// NotifDemo | |
// | |
// Created by wisaruthk on 3/3/2559 BE. | |
// Copyright © 2559 kojo. All rights reserved. | |
// | |
#import "FirstViewController.h" | |
#import "Children.h" |
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
// | |
// Children.h | |
// KVCODemo | |
// | |
// Created by wisaruthk on 3/3/2559 BE. | |
// Copyright © 2559 kojo. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
func transitionToChildViewController(toViewController:UIViewController){ | |
var fromViewController:UIViewController? | |
if(self.childViewControllers.count > 0){ | |
fromViewController = self.childViewControllers[0] | |
} else { | |
fromViewController = nil; | |
} | |
if(toViewController == fromViewController || !self.isViewLoaded()){ |
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
public function behaviors() { | |
$behaviors = parent::behaviors(); | |
$behaviors['authenticator'] = [ | |
'class' => \yii\filters\auth\HttpBasicAuth::className(), | |
'only' => ['hi','token-log-in', 'log-out', | |
'list-template-data', | |
'download-template-data'], | |
]; | |
$behaviors['response'] = [ | |
'class' => 'yii\filters\ContentNegotiator', |
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
// Initial Receipt | |
let receiptURL:NSURL? = NSBundle.mainBundle().appStoreReceiptURL | |
let data:NSData? = NSData(contentsOfURL: receiptURL!); | |
if(data == nil){ | |
// No local receipt | |
print("No local receipt") | |
} else { | |
let temp = data!.base64EncodedStringWithOptions([]) | |
let requestContent:NSDictionary = NSDictionary(object: temp, forKey: "receipt-data") |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package mangaloader; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; |
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
// | |
// FVRInAppPurchaseVC.swift | |
// favroutes | |
// | |
// Created by wisaruthk on 10/8/2558 BE. | |
// Copyright © 2558 kojo. All rights reserved. | |
// | |
import UIKit | |
import StoreKit |
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
let batchRequest = NSBatchUpdateRequest(entityName: "Group") | |
batchRequest.predicate = NSPredicate(format: "SELF != %@", self.group!) | |
batchRequest.propertiesToUpdate = ["isFirstView":NSNumber(bool: false)] | |
batchRequest.resultType = .UpdatedObjectsCountResultType | |
do { | |
let results:NSBatchUpdateResult = try managedContext.executeRequest(batchRequest) as! NSBatchUpdateResult | |
print("update with result = \(results.result)") | |
} catch { | |
print("Error something..") |