Skip to content

Instantly share code, notes, and snippets.

View mosluce's full-sized avatar

mosluce mosluce

View GitHub Profile
module.exports = function(Schema) {
return {
table: 'OAuthUser',
schema: {
local : {
email : String,
password : String,
},
facebook : {
id : String,
{
sNum: String,
logs: [{
date: Date
}],
count: Number
}
//data list example
[{
a.change(function(){
setTimeout(function(){
//延遲一下再進行邏輯
}, 250)
})
@mosluce
mosluce / block.js
Last active March 15, 2016 14:02 — forked from l02162010/block.js
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()
});
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;
db.books.aggregate({
$sort: {
date: -1
},
$group: {
_id: '$type',
type: {
$first: '$type'
},
name: {
<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') { %>
@mosluce
mosluce / Viewport.js
Created June 3, 2016 04:42
求助:拖拉位置問題
import React, {Component} from 'react';
import {
View,
Animated,
PanResponder,
StyleSheet,
Text,
Dimensions
} from 'react-native';
@mosluce
mosluce / Viewport.js
Created June 3, 2016 08:00
拖拉:解決...
import React, {Component} from 'react';
import {
View,
Animated,
PanResponder,
StyleSheet,
Text,
Dimensions
} from 'react-native';
@mosluce
mosluce / Viewport.js
Created June 3, 2016 09:56
拖拉:進階版
import React, {Component} from 'react';
import {
View,
Animated,
PanResponder,
StyleSheet,
Text,
Dimensions
} from 'react-native';