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
<?php | |
/** | |
* Controller is the customized base controller class. | |
* All controller classes for this application should extend from this base class. | |
*/ | |
class RestController extends CController | |
{ | |
/** | |
* @var string the default layout for the controller view. Defaults to '//layouts/column1', | |
* meaning using a single column layout. See 'protected/views/layouts/column1.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
#define DEBUG_CONSOLE | |
#define DEBUG_LEVEL_LOG | |
#define DEBUG_LEVEL_WARN | |
#define DEBUG_LEVEL_ERROR | |
#if (UNITY_EDITOR || DEVELOPMENT_BUILD) | |
#define DEBUG | |
#endif | |
#if (UNITY_IOS || UNITY_ANDROID) |
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
var scrollSpeed = 0.90; | |
var scrollSpeed2 = 0.90; | |
function FixedUpdate() | |
{ | |
var offset = Time.time * scrollSpeed; |
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
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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; | |
// Continous rotation with some parameters | |
public class Rotation : MonoBehaviour | |
{ | |
public enum RotationAxis | |
{ | |
All, |
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
{ | |
"name": "symfony/framework-standard-edition", | |
"license": "MIT", | |
"type": "project", | |
"description": "The \"Symfony Standard Edition\" distribution", | |
"autoload": { | |
"psr-0": { "": "src/" } | |
}, | |
"require": { | |
"php": ">=5.3.3", |
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
<?php | |
$qs = Doctrine_Query::create() | |
->from('MyTable1 m') | |
->leftJoin('m.MyTable2 p'); | |
$res = $qs->execute(); | |
$qs->free(); |
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
<?php | |
$str = '13++56-461.79/27--14-abc'; | |
$filter = filter_var($str,FILTER_SANITIZE_NUMBER_INT); | |
$onlyDigitsFilterVar = str_replace(array('+', '-'), '', $filter); | |
$onlyDigitsRegexp1 = preg_replace('/[^\d]/', '', $str); | |
$onlyDigitsRegexp2 = preg_replace('/[^[:digit:]]/', '', $str); // http://www.php.net/manual/en/regexp.reference.character-classes.php | |
var_dump($filter); // string(19) "13++56-4617927--14-" |
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
<?php | |
$q = Doctrine_Query::create() | |
->select('a.title as title') | |
->from('Article a') | |
->where('a.id = ?', $this->getId()); | |
->fetchOne()->title; |
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
$ curl -u user:pass -d status='Hello from shell' http://twitter.com/statuses/update.xml |
OlderNewer