Within an <ion-scroll>
, this directive creates sticky item headers that get bumped out of the way by the next item.
Demo: http://cl.ly/2u2X390s0H1a
Requirements:
- Needs UnderscoreJS for its
_.throttle
utility. - Must be used within an
or
/*! | |
* jQuery Form Plugin | |
* version: 2.52 (07-DEC-2010) | |
* @requires jQuery v1.3.2 or later | |
* | |
* Examples and documentation at: http://malsup.com/jquery/form/ | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
*/ |
class EventsController < ApplicationController | |
def index | |
# start with default filtering (usually no filtering) | |
@events = Event.all | |
# custom (user-chosen) filtering | |
if params[:filters].present? | |
# you can check for all the different filter values you want to allow. first is future/current/past |
Meteor.publish('user-stats', function() { | |
var initializing = true; | |
var userStats = []; | |
var aYearAgo = moment().utc().subtract({years: 1}); | |
var aQuarterAgo = moment().utc().subtract({months: 3}); | |
var aMonthAgo = moment().utc().subtract({months: 1}); | |
var defaultAggregation = { | |
wins: 0, |
Within an <ion-scroll>
, this directive creates sticky item headers that get bumped out of the way by the next item.
Demo: http://cl.ly/2u2X390s0H1a
Requirements:
_.throttle
utility.or
> Polygons.deny({update: function() { return true; }}); | |
> p=Polygons.findOne(); | |
{ _id: '74iGubCqxB29ZF2tJ', | |
geom: | |
{ type: 'Polygon', | |
coordinates: [ [Object] ], | |
type2: 'Polygonal' }, | |
tags: {} } | |
> Polygons.update({_id: p._id}, {$set: {'geom.type2': 'Polygonify'}}) | |
1 |
(function() { | |
Backbone.Events.autorun = function(f, context) { | |
if (!this.__autorunHandles) this.__autorunHandles = []; | |
var backboneContext = this; | |
var handle = Tracker.autorun(function() { | |
Tracker.currentComputation.__backboneContext = backboneContext; | |
f(); | |
}); | |
this.__autorunHandles.push(handle); | |
return handle; |
import React from 'react'; | |
import $ from 'jquery'; | |
// Accepts these props: | |
// `apiKey` - Your Filepicker.io API key. | |
// `onSuccess` - A callback that receives (blobs) upon pickAndStore success. | |
// `onError` - A callback that receives (error) upon pickAndStore error. Note that a user-initiated cancel triggers an error with {code: 101}. | |
// `onCancel` - A callback that is triggered when the user closes/cancels the dialog. If `onCancel` is passed, it will be called instead of onError in the event of a user-initiated cancel. | |
// `onProgress` - A callback that receives (progress) upon pickAndStore progress. | |
class FilepickerPickAndStoreDialog extends React.Component { |
function login (email, password, callback) { | |
// This script should authenticate a user against the credentials stored in | |
// your database. | |
// It is executed when a user attempts to log in or immediately after signing | |
// up (as a verification that the user was successfully signed up). | |
// The `password` parameter of this function is in plain text. It must be | |
// hashed/salted to match whatever is stored in your database. For example: | |
// if (bcrypt.compareSync(password, dbPasswordHash)) { ... } | |
// | |
// There are three ways this script can finish: |
function getByEmail (email, callback) { | |
// This script should retrieve a user profile from your existing database, | |
// without authenticating the user. | |
// It is used to check if a user exists before executing flows that do not | |
// require authentication (signup and password reset). | |
// | |
// There are three ways this script can finish: | |
// 1. A user was successfully found. The profile should be in the following | |
// format: https://auth0.com/docs/user-profile | |
// callback(null, profile); |