Skip to content

Instantly share code, notes, and snippets.

View mosluce's full-sized avatar

mosluce mosluce

View GitHub Profile
//
// ViewController.swift
// SwiftPicker
//
// Created by 默司 on 2016/8/8.
// Copyright © 2016年 默司. All rights reserved.
//
import UIKit
//
// ShadowViewB.swift
// SwiftShadow
//
// Created by 默司 on 2016/8/4.
// Copyright © 2016年 默司. All rights reserved.
//
import UIKit
@mosluce
mosluce / AppDelegate.m
Created June 7, 2016 12:48
React Push (iOS) : register 沒反應
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "AppDelegate.h"
@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';
@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 04:42
求助:拖拉位置問題
import React, {Component} from 'react';
import {
View,
Animated,
PanResponder,
StyleSheet,
Text,
Dimensions
} from 'react-native';
<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') { %>
db.books.aggregate({
$sort: {
date: -1
},
$group: {
_id: '$type',
type: {
$first: '$type'
},
name: {
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;
@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()
});