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 descArray(int *arr, int size){ | |
int temp; | |
int loopRun = floor(size/2); | |
for(int i = 0; i < loopRun; i++){ | |
temp = arr[size - i]; | |
arr[size - i] = arr[i]; | |
arr[i] = temp; | |
} | |
} |
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 | |
$array = array('type', 'apple'); | |
switch(true){ | |
case in_array('apple', $array): | |
echo 'Have Apple'; | |
case in_array('mango', $array): | |
echo 'Have Mongo'; | |
default: | |
} |
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 flash.ui.Multitouch; | |
import flash.ui.MultitouchInputMode; | |
import flash.events.TouchEvent; | |
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; //設定觸控模式 | |
Object(root).movie.stop(); //停止 movie 影片片段播放 | |
Object(root).movie.addEventListener(TouchEvent.TOUCH_TAP, myPlay); //新增觸控事件偵測(點擊 Tap) | |
var playMode:Boolean = false; //播放模式,預設 stop ( FALSE 為 stop ) |
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": "slim/slim-skeleton", | |
"description": "A Slim Framework skeleton application for rapid development", | |
"keywords": ["microframework","rest","router"], | |
"homepage": "http://github.com/codeguy/Slim-Skeleton", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Josh Lockhart", | |
"email": "[email protected]", |
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
# --------------------------------------------------------------- | |
# Aotoki Theme for oh-my-zsh theme by Aotoki ([email protected]) | |
# Home Page : http://frost.tw/ | |
# -------------------------------------------------------------- | |
# LS Color | |
LSCOLORS=xxbxcxxxxxdxBxxxxxCxExBhCh | |
#Color Shortcuts | |
R=$fg[red] |
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 | |
namespace Aotoki; | |
class YoutubeShortcode { | |
static private $_instance; | |
private function __construct() | |
{ |
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 | |
class Nyan_Template | |
{ | |
public $mode = null; | |
public function __construct($mode) | |
{ | |
$this->mode = $mode; | |
} |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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
### | |
# Ruby Block | |
### | |
@buffer = "" | |
def test(description, &block) | |
if block_given? | |
puts "##{description}" | |
yield |
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
user = User.create() | |
user.logs << Log.new | |
user.send_logs << Log.new # join table "action" column will assign "send" as default | |
user.receive_logs << Log.new # join table "action" column will assign "receive" as default |
OlderNewer