This file contains 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
using UnityEngine; | |
using System.Collections; | |
public class MultiScreen : MonoBehaviour | |
{ | |
Camera extCam; | |
Camera extCam2d; | |
void Start () | |
{ |
This file contains 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
$pageSize=20; | |
$page=@$_GET['page']; | |
if(strcmp($page, '')==0) | |
$page=1; | |
// 查找資料總數 | |
$sql="SELECT TOP 1 count(*) as count FROM testtable"; | |
$stmt = j_sqlquery($sql, array()); | |
$total=sqlsrv_num_rows($stmt); |
This file contains 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
NSURL *URL = [NSURL URLWithString:@"http://example.com/"]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:URL]; | |
AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; | |
op.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]; | |
op.responseSerializer =[AFHTTPResponseSerializer serializer]; | |
[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { | |
NSStringEncoding big5 = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingBig5_HKSCS_1999); | |
NSString *string = [[NSString alloc] initWithData:responseObject encoding:big5]; | |
NSLog(@"HTML: %@", string); | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { |
This file contains 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
NSURL *URL = [NSURL URLWithString:@"http://example.com/"]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:URL]; | |
AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; | |
op.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]; | |
op.responseSerializer =[AFHTTPResponseSerializer serializer]; | |
[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { | |
// NSString* newStr = [NSString stringWithUTF8String:[responseObject bytes]]; | |
NSString* newStr = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding]; | |
NSLog(@"HTML: %@", newStr); | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { |
This file contains 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
NSURL *URL = [NSURL URLWithString:@"http://example.com/"]; | |
NSString *postString = @"company=Locassa&quality=AWESOME!"; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL | |
cachePolicy:NSURLRequestUseProtocolCachePolicy | |
timeoutInterval:60.0]; | |
[request setHTTPMethod:@"POST"]; | |
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]]; | |
AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; | |
op.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]; | |
op.responseSerializer =[AFHTTPResponseSerializer serializer]; |
This file contains 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
#!/bin/bash | |
# https://gist.github.com/949831 | |
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
# command line OTA distribution references and examples | |
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
This file contains 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
#!/bin/bash | |
# | |
# (Above line comes out when placing in Xcode scheme) | |
# | |
API_TOKEN=<TestFlight API token here> | |
TEAM_TOKEN=<TestFlight team token here> | |
SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
#LOG="/tmp/testflight.log" |
This file contains 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
#!/bin/bash | |
# Parameter check | |
if [[ "$1" == *'help' ]] || [[ "$1" == '-h' ]] ;then | |
echo "Usage:" | |
echo " Method 1:" | |
echo " \$ $0 <apk_apk_file> [start]" | |
echo | |
echo " Method 2:" |
This file contains 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
#!/bin/bash | |
function StopIfFail(){ | |
# http://www.dotkam.com/2008/10/24/getting-return-code-from-ant-in-shell/ | |
if [ $? -ne 0 ];then | |
echo "BUILD ERROR: see message above." | |
exit 1; | |
else | |
sleep 1 | |
fi |
This file contains 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
tell application "Google Chrome" | |
activate | |
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl" | |
if (count every window) = 0 then | |
make new window | |
end if | |
set found to false | |
set theTabIndex to -1 |
OlderNewer