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(Schema) { | |
return { | |
table: 'OAuthUser', | |
schema: { | |
local : { | |
email : String, | |
password : String, | |
}, | |
facebook : { | |
id : String, |
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
{ | |
sNum: String, | |
logs: [{ | |
date: Date | |
}], | |
count: Number | |
} | |
//data list example | |
[{ |
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
a.change(function(){ | |
setTimeout(function(){ | |
//延遲一下再進行邏輯 | |
}, 250) | |
}) |
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
router.get('/2', function (req, res) { | |
Block.findOne({ps: 1}).exec().then(function(block) { | |
//原本你的cb那一塊 | |
res.render('indexTest', { | |
title: '首頁', | |
user: req.session.user, | |
block: block, | |
success: req.flash('success').toString(), | |
error: req.flash('error').toString() | |
}); |
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
public class ChecklistAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |
public static final int ROW_TITLE = 100; | |
public static final int ROW = 101; | |
public static final String ANS_YES = "1"; | |
public static final String ANS_NO = "0"; | |
public static final String ANS_DEFAULT = "-1"; | |
private List<ChecklistRow> checklistRows; | |
private OnEditIconClickedListener onEditIconClickedListener; |
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
db.books.aggregate({ | |
$sort: { | |
date: -1 | |
}, | |
$group: { | |
_id: '$type', | |
type: { | |
$first: '$type' | |
}, | |
name: { |
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
<html> | |
<%- include ../partials/head.ejs %> | |
<% | |
var foodTypes = ['特餐', '飯類', '麵食', '水餃', '炸物', '湯類', '飲料']; | |
%> | |
<body> | |
<div class="container"> | |
<%- include menu.ejs %> | |
<div class="row well" style="margin-top: 8px;"> | |
<% if (typeof error !== 'undefined') { %> |
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
import React, {Component} from 'react'; | |
import { | |
View, | |
Animated, | |
PanResponder, | |
StyleSheet, | |
Text, | |
Dimensions | |
} from 'react-native'; |
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
import React, {Component} from 'react'; | |
import { | |
View, | |
Animated, | |
PanResponder, | |
StyleSheet, | |
Text, | |
Dimensions | |
} from 'react-native'; |
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
import React, {Component} from 'react'; | |
import { | |
View, | |
Animated, | |
PanResponder, | |
StyleSheet, | |
Text, | |
Dimensions | |
} from 'react-native'; |