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
import xmlrpclib | |
url = 'http://localhost:8069' | |
db = 'kojostudio' | |
username = 'admin' | |
password = 'admin' | |
common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url)) | |
vVersion = common.version() | |
print(vVersion) |
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
FDPGroup *group = self.datasource[indexPath.row]; | |
UIAlertController* alert = [UIAlertController alertControllerWithTitle:LocalizedString(@"Rename Group") | |
message:LocalizedString(@"Input Group Name") | |
preferredStyle:UIAlertControllerStyleAlert]; | |
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:LocalizedString(@"Cancel") | |
style:UIAlertActionStyleCancel | |
handler:^(UIAlertAction * action) { | |
[[self.tableView cellForRowAtIndexPath:indexPath] setSelected:false]; |
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
'response'=>[ | |
'format' => yii\web\Response::FORMAT_JSON, | |
'class' => 'yii\web\Response', | |
'on beforeSend' => function ($event) { | |
$response = $event->sender; | |
//var_dump($response); | |
if ($response->data !== null) { | |
$response->data = [ | |
'success' => $response->getIsSuccessful(), |
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..") |
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
/* | |
* 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
// 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
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
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
// | |
// Children.h | |
// KVCODemo | |
// | |
// Created by wisaruthk on 3/3/2559 BE. | |
// Copyright © 2559 kojo. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |