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
# -*- coding:utf-8 -*- | |
from bottle import route, run | |
import sys | |
import hashlib | |
from datetime import datetime | |
from pymongo import Connection | |
from pymongo.errors import ConnectionFailure | |
secret_key = 'mySecretKey' |
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; | |
using System.Security.Cryptography; | |
using System.Text; | |
public class HSController : MonoBehaviour | |
{ | |
private string secretKey = "mySecretKey"; // Edit this value and make sure it's the same as the one stored on the server | |
public string addScoreURL = "http://localhost/unity_test/addscore.php?"; //be sure to add a ? to your url | |
public string highscoreURL = "http://localhost/unity_test/display.php"; |
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; | |
using System.Security.Cryptography; | |
using System.Text; | |
public class HSController : MonoBehaviour | |
{ | |
private string secretKey = "mySecretKey"; // Edit this value and make sure it's the same as the one stored on the server | |
public string addScoreURL = "http://localhost/unity_test/addscore.php?"; //be sure to add a ? to your url | |
public string highscoreURL = "http://localhost/unity_test/display.php"; |
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
import sys | |
from datetime import datetime | |
from pymongo import Connection | |
from pymongo.errors import ConnectionFailure | |
def main(): | |
try: | |
c = Connection(host="localhost", port=27017) | |
except(ConnectionFailure, e): | |
sys.stderr.write("Could not connect to MongoDB: %s" % e) |
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
import sys | |
import hashlib | |
from datetime import datetime | |
from pymongo import Connection | |
from pymongo.errors import ConnectionFailure | |
def main(): | |
try: | |
c = Connection(host="localhost", port=27017) | |
except(ConnectionFailure, e): |
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 System.Collections; | |
using System.IO; | |
public static class CSFileInfo | |
{ | |
public static string GetFileNameWithoutExtension (this FileInfo fileInfo) | |
{ | |
return System.IO.Path.GetFileNameWithoutExtension (fileInfo.Name); | |
} | |
} |
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
#added in P190 | |
platform :ios, '5.0' | |
pod 'DCIntrospect' | |
pod 'GHUnitIOS' | |
pod 'BlocksKit' | |
pod 'Underscore.m' | |
pod 'AQGridView' | |
pod 'JASidePanels' | |
pod 'QuickDialog' |
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
- (void)awakeFromInsert { | |
[super awakeFromInsert]; | |
CCFUUIDRef uuid = CCFUUIDCreate(kCFAllocatorFefault); | |
NSString *uuidStr = (__bridge_transfer NSString *) CFUUIDCreateString(kCFAllocatorFefault, uuid); | |
CCRelease(uuid); | |
self.identifer = uuidStr; | |
} |
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
NSManagedObjectContext *moc self[self managedObjectContext]; | |
NSFetchRequest *request = [[NSFetchRequest alloc] init]; | |
NSEntityDescription *description = [[NSEntityDescription entityForName: @"user" inManagedObjectContext:managedObjectCOntext_] init]; | |
[request setEntiry:descriotion]; | |
NSError *error = nil; | |
NSArray *list = [moc exexuteFetchRequest:request]; | |
MSManagesObject *requestObject = [list objectAtIndex:0]; |
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
before(:each) do | |
@travel_params = {:title => "タイトル"}, | |
:startdate => "2030-01-01", :enddate => "2013-12-31" | |
end | |
describe "#POST create" | |
describe "without login" do | |
it "should be redirect to login page" | |
sign_out :user | |
post :create |