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)perform { | |
UIViewController *sourceViewController = self.sourceViewController; | |
UIViewController *destinationViewController = self.destinationViewController; | |
// Add the destination view as a subview, temporarily | |
[sourceViewController.view addSubview:destinationViewController.view]; | |
// Transformation start scale | |
destinationViewController.view.transform = CGAffineTransformMakeScale(0.05, 0.05); | |
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 android.os.Handler; | |
import android.os.Message; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.ClientProtocolException; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; | |
import org.apache.http.client.methods.HttpPost; | |
import org.apache.http.impl.client.DefaultHttpClient; |
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
UIBarButtonItem *btn =[[UIBarButtonItem alloc] initWithTitle:@"Check out" style:UIBarButtonItemStyleBordered target:self action:@selector(Checkout)]; | |
self.navigationItem.rightBarButtonItem = btn; |
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
# Install APNS gem: | |
# sudo gem install APNS | |
require 'APNS' | |
# gateway.sandbox.push.apple.com is default | |
# APNS.host = 'gateway.push.apple.com' # Production | |
APNS.host = 'gateway.sandbox.push.apple.com' # Development | |
# this is also the default. Shouldn't ever have to set this, but just in case Apple goes crazy, you can. | |
APNS.port = 2195 |
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
// | |
// AppDelegate.swift | |
// pushtest | |
// | |
// Created by sawapi on 2014/06/08. | |
// Copyright (c) 2014年 sawapi. All rights reserved. | |
// | |
// iOS8用 | |
import UIKit |
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
PRAGMA user_version;//Get | |
PRAGMA user_version = 2; //Set |
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
http://stackoverflow.com/questions/8500698/use-arduino-gsm-gprs-shield-to-send-data-to-my-web-service |
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
//Register Notification ในviewDidLoad | |
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(ชื่อฟังค์ชั่น) name:@"ชื่อโนติ" object:nil]; | |
//Call Notification main thread | |
[[NSNotificationCenter defaultCenter]postNotificationName:@"ชื่อโนติ" object:self]; |
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
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | |
NSMutableURLRequest *request = [NSMutableURLRequest | |
requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%@/getAllUser",[GlobalVar serverIp],[GlobalVar serverPort]]]]; | |
NSDictionary *requestData = [[NSDictionary alloc] initWithObjectsAndKeys: | |
[defu objectForKey:@"ComId"], @"id", | |
nil]; | |
NSError *error; | |
NSData *postData = [NSJSONSerialization dataWithJSONObject:requestData options:0 error:&error]; |
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
# my.cnf for TAKIS Server | |
# BEGIN CONFIG INFO | |
# DESCR: 8 GB RAM, InnoDB only, ACID, few connections, heavy queries | |
# TYPE: SYSTEM | |
# END CONFIG INFO | |
[client] | |
port = 7000 | |
socket = /var/lib/mysql/mysql.sock |