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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /var/www/YOUR_PROJECT/public; | |
index index.php index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name YOUR_IP_OR_DOMAIN; |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
'ftp-deploy': { | |
build: { | |
auth: { | |
host: 'XXX.com', | |
port: 21, | |
authKey: 'key1', |
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
{ | |
"landmark":[ | |
{ | |
"name":"熱門景點", | |
"ids":[ | |
4, | |
11 | |
] | |
} | |
], |
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
{ | |
"banner":{ | |
"back":[ | |
{ | |
"uid":"WyCE4MnL7sFqs9Vufh1jz9xDpfHD7Mag", | |
"src":"http://localhost:8080/banner/WyCE/4MnL/7sFq/s9Vu/586692876d5bd2b447731bae4394f57a", | |
"alt":"所以新圖都沒問提??" | |
} | |
] | |
}, |
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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
self.title = NSLocalizedString(@"Menu", nil); | |
self.menus = @[@"My Account", @"Menu 2", @"Menu 3", @"Menu 4"]; | |
[self.view addSubview: self.nameLabel]; |
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
// Gulpfile.js | |
// Require the needed packages | |
var gulp = require('gulp'); | |
var stylus = require('gulp-stylus'); | |
var watch = require('gulp-watch'); | |
// Get and render all .styl files recursively | |
gulp.task('stylus', function () { | |
gulp.src('app/views/assets/resources/stylus/**/*.styl') | |
.pipe(watch(function(files){ |
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
var fs = require("fs"); | |
var file = "./test.db"; | |
//載入 sqlite3 | |
var sqlite3 = require("sqlite3").verbose(); | |
//new 一個 sqlite 的 database,檔案是 test.db | |
var db = new sqlite3.Database(file); | |
db.serialize(function() { | |
//db.run 如果 Staff 資料表不存在,那就建立 Staff 資料表 |
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
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg : grunt.file.readJSON('package.json'), | |
sass:{ | |
dist: { | |
options:{ | |
style: 'expanded' | |
}, | |
files:{ | |
'style.css': 'style.sass', |
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
{ | |
"name": "sass_test", | |
"version": "0.1.0", | |
"author": { | |
"name": "WinWu", | |
"url": "http://yiyingloveart.blogspot.tw/" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-sass": "~0.5.0" |
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
function detect_if_image_loaded(){ | |
$('img').bind('error', function (e) { | |
var e = e.type; | |
switch(e){ | |
case 'error': | |
$(this).attr('src','/images/no_img.png'); | |
break; | |
} | |
}); | |
} |