This Meteor package wraps Leaflet in a reactive API.
isDragging()
returns true
or false
and is reactive.
getCenterState()
> 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; |
// lskjdflskhjf |
#!/bin/ruby | |
def calculatePrime | |
list = (2..7050000).to_a | |
print "2 " | |
list = list.select(&:odd?) | |
list.each_with_index.each do |n, i| | |
next if n == nil | |
print "#{n} " | |
while i < list.count do |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { height: 100% } | |
body { height: 100%; margin: 0; padding: 0 } | |
#map_canvas { height: 100% } | |
</style> | |
<script type="text/javascript" |
$(document).scroll(function() { | |
var currentScrollTop = $(this).scrollTop(); | |
if (currentScrollTop > prevScrollTop) { | |
//down | |
var lasthiddenbox = $('.fadeboxhidden:last'); | |
var nextbox = (lasthiddenbox.length > 0) ? lasthiddenbox.next('.fadebox') : $('.fadebox:first'); | |
while (nextbox.length) { | |
if (nextbox.offset().top < currentScrollTop) { | |
nextbox.css('opacity', (currentScrollTop - nextbox.offset().top) / nextbox.outerHeight()); | |
} |
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 { |
At the beginning
PostsController# (Timeout::Error) "execution expired"
/app/vendor/bundle/ruby/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb:45:in `read'
/app/vendor/bundle/ruby/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb:45:in `block in read'
/app/vendor/bundle/ruby/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb:78:in `handle_socket_errors'
/app/vendor/bundle/ruby/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb:45:in `read'
/app/vendor/bundle/ruby/1.9.1/gems/moped-1.3.2/lib/moped/connection.rb:177:in `read_data'
/app/vendor/bundle/ruby/1.9.1/gems/moped-1.3.2/lib/moped/connection.rb:99:in `block in read'
<?php | |
// only run this code if they submitted the form (we can check if the submit button was pressed) | |
if (isset($_POST['contact-submit'])) { | |
$email = isset($_POST['email']) ? trim($_POST['email']) : ''; | |
$name = isset($_POST['name']) ? trim($_POST['name']) : ''; | |
$message = isset($_POST['message']) ? trim($_POST['message']) : ''; | |
success = true; |