code stringlengths 2 1.05M |
|---|
/**
* Slide left and right
*/
module.exports = function(options) {
if (!options) options = {};
if (!options.property) options.property = 'width';
return require('./slide-fade')(options);
};
|
function setup() {
// createCanvas( windowWidth, windowHeight );
createCanvas( windowWidth, 600 );
frameRate( 4 );
background( 0 );
}
function draw() {
noFill();
stroke( 255 );
let circle_size = random( 10, width-10 );
ellipse( width/2, height/2, circle_size );
}
|
import 'material-design-lite';
import { Route, Switch } from "react-router-dom";
import PropTypes from 'prop-types';
import React from 'react';
import BrowserStorage from '../BrowserStorage';
import ErrorBoundary from '../ErrorBoundary';
import Oauth from '../Oauth';
import Rollbar from '../Rollbar';
import About from ... |
'use strict';
/**
* @static
* @memberof El
* @param {HTMLElement} element
* @param {Object} attrs
* @return {HTMLElement}
*
* @example
* El.setAttribute(El.get('div'), {
* id: 'foo',
* class: 'bar baz'
* });
* // <div id="foo" class="bar baz"></div>
*/
export function setAttribute(element, attrs) {
... |
/**
* @fileoverview Automute/restart auto plays the player but muted.
* @author Brian Kelley
*/
(function() {
videojs.plugin('automute', automute);
/** @namespace plugins.autoMuteRestart */
/**
* Function responsible for auto playing and muting the player when a video loads.
* Applies the classes "vjs-auto... |
module.exports = function Composer(app) {
// REQUIRED LIBRARIES
var mongoose = require('mongoose');
var async = require('async');
var jjv = require('jjv');
var Combinatorics = require('js-combinatorics').Combinatorics;
// RELATIVE REFERENCES
var Models = require('../models');
var Coredb = require... |
suite('rb/views/ReviewView', function() {
const template = _.template(dedent`
<div class="review review-request-page-entry">
<div class="review-request-page-entry-contents">
<div class="collapse-button"></div>
<div class="banners">
<input type="button" value="Publish"... |
var common = require('../common');
var assert = require('assert');
(function testAddingKeyToDevelopmentEnvironments() {
var errplane = require(common.dir.root).createClient( { api_key: common.key, app_key: 'appname', env_key: 'dev' });
errplane.developmentEnvironments.push('dev');
errplane.notify(new Error('thi... |
import React, { Suspense, lazy } from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import Main from './layouts/Main'; // fallback for lazy pages
import './static/css/main.scss'; // All of our styles
const { PUBLIC_URL } = process.env;
// Every route - we lazy load so that each page can be... |
new Vue({
el: '#app'
}); |
;(function ($) {
$.expr[':'].hasAncestor = function (element, i, match) {
var selector = match[3];
return $(element).parent().closest(selector).length;
};
$.fn.hasAncestor = function (selector) {
return this.filter(function () {
return $(this).parent().closest(selector).length;
});
};
})(jQue... |
const assert = require('assert')
const _ = require('lodash')
const request = require('supertest')
const jsonServer = require('../../src/server')
describe('Server', () => {
let server
let router
let db
const rewriterRules = {
'/api/': '/',
'/blog/posts/:id/show': '/posts/:id',
'/comments/special/:us... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _reactJsonTree = require("react-json-tree");
var _reactJsonTree2 = _interopRequireDefault(_reactJsonTree);
function _interopRequireDefault(obj) { return... |
/**
* Copyright 2016, Sumit Rai
* Copyrights licensed under the New MIT License. See the accompanying LICENSE file for terms.
*/
'use strict';
export default {
initialGitOwner: 'npm',
initialGitRepo: 'npm',
initialPageNumber: 1,
itemsPerPage: 25,
pagesToShow: 15,
apiHost: 'https://api.githu... |
/// <binding Clean='clean' />
"use strict";
var gulp = require("gulp"),
rimraf = require("rimraf"),
concat = require("gulp-concat"),
cssmin = require("gulp-cssmin"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename");
var webroot = "./";
var paths = {
js: webroot + "src/**/*.js",... |
var _images_values = {};
var _videos_values = {};
//######################################################################
//################################# IMAGENES ###########################
//######################################################################
function add_image(data) {
if(data.result.files... |
#!/usr/bin/env node
/*
* Jacu
* Copyright(c) 2016 Breno Lima de Freitas <brenolimadefreitas@gmail.com>
* MIT Licensed
*/
var pkg = require('../package');
var jacu = require('./jacu');
var yargs = require('yargs')
.version(function() {
return pkg.version;
})
.usage('Usage: $0 [options] <command>')
.command('init', ... |
/**
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","da",{title:"Tilgængelighedsinstrukser",contents:"Onlinehjælp. For at lukke dette vindue klik ESC",legend:[{name:"Generelt",items:[{name... |
import Helper from 'hubot-test-helper';
import chai from 'chai';
import Manager from '../src/wizards-duel/manager';
import Spells from '../src/wizards-duel/spells';
import Effects from '../src/wizards-duel/effects';
var expect = chai.expect;
var helper = new Helper('../src/wizards-duel.js');
describe('Manager',... |
'use strict'
import * as Reflux from 'reflux'
import {MacHistoryActions} from '../actions'
import {ErrorMixin} from './Mixins'
export var MacHistoryStore = Reflux.createStore({
mixins: [ErrorMixin],
listenables: [MacHistoryActions],
data: {'list': []},
onList() {
$.ajax({url: '/mac_history/', success: re... |
var KanaRowView = require('../views/kana-row-view');
var fs = require('fs');
require('browsernizr/test/css/animations');
var Modernizr = require('browsernizr');
module.exports = Backbone.View.extend({
tagName: 'div',
className: 'settings',
isDialog: true,
template: _.template(fs.readFileSync(__dirname... |
function Llave(x, y, imagen){
Kinetic.Image.call(this);//ejecutar el constructor de la clase Image de kinetic
//metodos de kinetic
this.setWidth(30);
this.setHeight(40);
this.setX(x);
this.setY(y);
this.setImage(imagen);
}
Llave.prototype = Object.create(Kinetic.Image.prototype); |
/**
* A basic example of how to use event listeners to detect a change of online/offline status and
* to give the user some sort of feedback, in this case by adding the `offline` class to the body
* to allow styling.
*/
(function () {
'use strict';
let updateOnlineStatus = function () {
let sta... |
import path from 'path';
import webpack from 'webpack';
import errorNotify from './error-notify';
import browser from 'browser-sync';
export default function build(development, done) {
done();
const COMPATIBILITY = require('../' + process.env.PROJECT).COMPATIBILITY;
const JAVASCRIPT = require('../' + proc... |
'use strict';
module.exports = {
db: {
uri: 'mongodb://localhost/mean-dev',
options: {
user: '',
pass: ''
}
},
log: {
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
format: 'dev',
// Stream defaults to process.stdout
// Uncomment to enable logging to a log on the file system... |
$(function () {
$('[data-toggle="tooltip"]').tooltip('show')
})
// FONCTION NAJIB
function myFunction() {
//contenu
var plateau = document.getElementById("scene");
var joueur = document.getElementsByClassName("joueur");
var vide = document.getElementsByClassName("vide");
var speed = 5;
var animtimer... |
module.exports = angular.module('MarginApp.services', [])
.service('User', ['$http', function ($http) {
this.get = function (id) {
var deferred = Q.defer();
if (id) {
$http.get('/api/user/' + id)
.success(function (data, status, headers, config) {
deferred.re... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
// Karma configuration for Quail unit tests
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '..',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mo... |
/*
Here we are going to update a document in the users collection.
The database name will be accessible via process.argv[2].
Say we have a user defined like:
{
"name": "Tina",
"age": 30,
"username": "tinatime"
}
We want to change Tina's age from 30 to 40.
For the purpose of this lesson, a... |
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'assets/js/*.js',
'assets/js/plugins/*.js',
'!assets/js/scripts.min.js'
]
},
recess: {
dist: {
... |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'devtools',
environment: environment,
baseURL: '/',
locationType: 'hash',
contentSecurityPolicy: {
'default-src': "'none'",
'script-src': "'self' 'unsafe-inline' 'unsafe-eval' www.google-analyti... |
import { Router } from 'express';
const router = new Router();
export default router;
|
// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute... |
window.Ideas = Backbone.Collection.extend({
model: window.Idea,
}); |
import { loadingBarReducer } from "react-redux-loading-bar"
import { combineReducers } from "redux"
import { RESET_PAGES } from "../constants/ActionTypes"
import pageProps from "./pageProps"
import pagination from "./pagination"
import searchProps from "./searchProps"
import searchQuery from "./searchQuery"
const allR... |
/*
* Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the ri... |
/**
* Express configuration
*/
'use strict';
var express = require('express');
var morgan = require('morgan');
var compression = require('compression');
var bodyParser = require('body-parser');
var methodOverride = require('method-override');
var cookieParser = require('cookie-parser');
var errorHandler = require('... |
// Attach a boolean to WebCopy to indicatewhether it is supported in this browser
WebCopy.isSupported = isSupported(navigator, document);
// Insert WebCopy styles at the end of the document head.
// Full styles if WebCopy is supported in this browser, else styles to hide the dummy span
insertStyles(WebC... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
} from 'react-native';
import { DatePickerDialog } from './main-index'
import moment from 'moment';
export defaul... |
const babelrc = {
babelrc: false,
presets: ["@babel/preset-env", "@babel/preset-typescript"],
plugins: [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-transform-runtime",
"@babel/plugin-tr... |
'use strict';
exports.find = function(req, res, next){
req.app.db.models.User.findAll({
attributes: ['id', 'username', 'email', 'firstname', 'lastname', 'isActive', 'isVerified', 'roles', 'groups', 'phone', 'createdById', 'twitterKey', 'facebookKey', 'googleKey', 'githubKey']
}).then(function(ite... |
function graphfileread(inputfile, cb) {
var linenumber = 0;
var error = false;
var nodes;
var edges;
var pos_edges=0;
var pos_nodes=0;
var N, M;
function reserveint(x) {
var i = 0;
var a = [];
while (i < x) {
a.push(0);
i++;
}
return a;
}
var llreader = r... |
/**
* QUnit v1.10.0 - A JavaScript Unit Testing Framework
*
* http://qunitjs.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
(function( window ) {
var QUnit,
config,
onErrorFnPrev,
testId = 0,
fileName = (sourceFromStacktrace... |
'use strict';
angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingData) {
var root = {};
var handleOpenURL = function(args) {
$log.info('Handling Open URL: ' + JSON.stringify(args));
// Sto... |
// Queue implementation taken from https://github.com/jessetane/queue.
// The original has a deendency on `inherits` package,
// this version uses in-built util.inherit method.
var util = require('util')
var EventEmitter = require('events').EventEmitter
module.exports = Queue
function Queue(options) {
if (!(this... |
'use strict';
/*
* Create an international address, then send a postcard with a custom PDF back.
* Run me! This example works out of the box, "batteries included".
*/
const fs = require('fs');
const lobFactory = require('../lib/index.js');
const Lob = new lobFactory('YOUR_API_KEY');
const file = fs.readFileSync(... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
// Select between string values, for use in Storybook
class Select extends Component {
constructor(props) {
super(props);
this.state = {
value: props.values[0]
};
this.onChange = this.onChange.bind(this);
}
onCh... |
'use strict';
module.exports = {
db: 'mongodb://' + process.env.MONGO_HOST,
app: {
title: 'books - Development Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
}... |
(function(global) {
function Connection(id, s, diagram, start, end) {
var self = this;
this.id = id;
this.snap = s;
this.start = {};
this.end = {};
this.elem = this.snap.path("M0 0L0 0").attr({
fill: "none",
stroke: "#333",
strokeWidth: 4
});
this.coll = th... |
angular.module( 'jsmpc.browse', [
'ui.state',
// 'placeholders',
'ui.bootstrap'
])
.config(function config( $stateProvider ) {
$stateProvider.state( 'browse', {
url: '/browse',
views: {
"main": {
controller: 'BrowseCtrl',
templateUrl: 'browse/browse.tpl.html'
}
},
dat... |
export { default } from 'ember-flexberry-designer/routes/fd-interface-edit-form';
|
// Creation Date: 2015.05.20
// Author: Fernando L. Canizo - http://flc.muriandre.com/
"use strict";
var cluster = require('cluster');
function startWorker() {
var worker = cluster.fork();
console.log("CLUSTER: Worker %d started.", worker.id);
}
if(cluster.isMaster) {
require('os').cpus().forEach(function () {
... |
var NurlHistory = require('./lib/nurl_history.js');
var history = new NurlHistory();
history.on('readable',function(){
var datas = history.read();
console.log("read");
console.log(datas);
});
history
.addToHistory({'foo':'bar'})
.addToHistory({'foo':'bar'})
.addToHistory(null); |
/*
backgrid-moment-cell
http://github.com/wyuenho/backgrid
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT @license.
*/
(function ($, _, Backbone, Backgrid, moment) {
/**
MomentFormatter converts bi-directionally any datetime values in any format
supported by [moment(... |
#!/usr/bin/env node
/**
* Module dependencies
*/
var package = require('../package.json')
, Sails = require('../lib/app')
, _ = require('lodash')
, rconf = require('../lib/configuration/rc')
, captains = require('captains-log')
, path = require('path');
/**
* `sails lift`
*
* Expose method which lifts ... |
(function(a){a.fn.readMore=function(d){var f={readMoreLinkClass:"read-more__link",readMoreText:"Read more",readLessText:"Read less",readMoreHeight:150};d=a.extend(f,d);var e=a(this);function c(g){if(typeof g.data("options")!=="undefined"){this.collapsedHeight=g.data("options")}else{this.collapsedHeight=d.readMoreHeight... |
function DropDown(id) {
this.dd = document.getElementById(id);
this.main = this.dd.querySelector('.main-text');
this.list = this.dd.querySelector('.dropdown-list');
this.dds = [].slice.call(document.querySelectorAll('.dropdown-wrap'));
this.value = this.main.innerHTML;
this.init();
}
DropDown.prototype.... |
(function(module) {
mifosX.controllers = _.extend(module, {
ReportsController: function(scope, resourceFactory,location) {
scope.reports = [];
scope.routeTo = function(id){
location.path('/system/viewreport/' + id);
};
resourceFactory.reportsResource.getReport(function(... |
(function() {
return {
name: 'te',
weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_... |
import {createStore, applyMiddleware} from 'redux'
import thunk from 'redux-thunk'
import reducers from './reducers'
const middleware = [thunk]
if (process.env.NODE_ENV === 'development') {
const createLogger = require('redux-logger') // eslint-disable-line global-require
middleware.push(createLogger())
//... |
/*global define*/
///////////////////////////////////////////////////////////////////////////
// Copyright © Esri. All Rights Reserved.
//
// Licensed under the Apache License Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
/... |
/**
* Created by adoug on 2017/7/20.
*/
export function attr2stylePokeman(attr) {
if (!attr) return {}
let attr1 = attr[0],
attr2 = attr.length > 1 ? attr[1] : attr1
let result = {
bgMain: `bg-${attr1}`,
bdMain: `bd-${attr1}`,
bglMain: `bgl-${attr1}`,
bSen: `b-${attr2}`,
bgSen: `bg-${... |
/*!
* nodeclub - site index controller.
* Copyright(c) 2012 fengmk2 <fengmk2@gmail.com>
* Copyright(c) 2012 muyuan
* MIT Licensed
*/
/**
* Module dependencies.
*/
var User = require('../proxy').User;
var Topic = require('../proxy').Topic;
var config = require('../config');
var eventproxy = require('eventproxy'... |
var eventuate = require('eventuate-core'),
fromArray = require('..')(eventuate)
var numbers = fromArray([1, 2, 3, 4, 5, 6, 7, 8, 9])
var consumption = numbers.consume(function (n) {
console.log(n)
if (n === 5) {
console.log('pausing...')
consumption.saturated()
setTimeout(function () {
conso... |
import React from 'react'
import $ from 'teaspoon'
import Nav from '../Nav'
import Tab from '../Tab'
import styles from '../Nav.scss'
const render = props => $(<Nav {...props} />).render()
const shallowRender = props => $(<Nav {...props} />).shallowRender()
describe('(component) Nav', () => {
describe('Nav', () => ... |
var jsConsole;
var button = document.getElementById("check");
button.onclick = function () {
jsConsole.clearConsole();
var a = document.getElementById("a");
var b = document.getElementById("b");
var c = document.getElementById("c");
var biggest = 0;
var bigger = 0;
var smallest = 0;
... |
import crypto from 'crypto';
import config from '../../config';
import logger from './logger';
import randomHex, {string as randomString} from './random';
import {Buffer} from 'buffer';
/**
* verifies a combination of plain password, passwordHash and passwordSalt
* @param password
* @param passwordHash
* @param pa... |
'use strict';
const _ = require('lodash');
const Script = require('smooch-bot').Script;
const scriptRules = require('./script.json');
module.exports = new Script({
processing: {
//prompt: (bot) => bot.say('Beep boop...'),
receive: () => 'processing'
},
start: {
receive: (bot) => ... |
/**
* Created by CristoH on 15/04/2016.
*/
$.cloudinary.config({
cloud_name: Meteor.settings.public.CLOUDINARY_CLOUD_NAME
}); |
var enterFullscreen = function(el) {
if(el.requestFullscreen) {
el.requestFullscreen();
} else if(el.msRequestFullscreen) {
el.msRequestFullscreen();
} else if(el.mozRequestFullScreen) {
el.mozRequestFullScreen();
} else if(el.webkitRequestFullscreen) {
el.webkitRequestFu... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Larave... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])... |
var AppDispatcher = require('../dispatchers/AppDispatcher');
var Constants = require('../constants/AppConstants');
module.exports = {
addItem: function(text) {
AppDispatcher.handleViewAction({
type: Constants.ActionTypes.ADD_TASK,
text: text
});
},
clearList: function() {
console.warn('... |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/home/HomePage';
import DocumentsPage from './components/Documents/DocumentsPage';
import DocumentPage from './components/Documents/DocumentPage';
import NewDocumentPage fro... |
define('app', ['app.config'], function(config) {
var App = function() {};
App.prototype = {
_cache : { selector : {} },
config : config,
bundles : {},
templates : {},
modals : {},
callbacks : {
loadBundles : function(bundle, key) ... |
const mongoose = require('mongoose');
const path = require('path');
const Schema = mongoose.Schema;
const SystemSchema = new Schema({
type: {
type: String,
required: '系统类型不能为空'
},
capacity: Number,
sensors: [{
address: {
type: String,
required: 'sensor地址不能为空'
},
name: {
ty... |
$(function () { // Same as document.addEventListener("DOMContentLoaded"...
// Same as document.querySelector("#navbarToggle").addEventListener("blur",...
$("#navbarToggle").blur(function (event) {
var screenWidth = window.innerWidth;
if (screenWidth < 768) {
$("#collapsable-nav").collapse('hide');
... |
/*!
* redis client
* Copyright(c) 2016 yanjixiong <yjk99@qq.com>
*/
var redis = require('redis');
var client = redis.createClient(6379, '127.0.0.1');
module.exports = client; |
'use strict';
// MODULES //
var isNumber = require( 'validate.io-number-primitive' ),
isArrayLike = require( 'validate.io-array-like' ),
isTypedArrayLike = require( 'validate.io-typed-array-like' ),
isMatrixLike = require( 'validate.io-matrix-like' ),
ctors = require( 'compute-array-constructors' ),
matrix = req... |
module.exports = {
capitalize: function(word) {
return word.replace(/^[a-z]/, function(letter) {
return letter.toUpperCase();
});
},
singularize: function(word) {
return word.replace(/s$/, '');
},
pluralize: function(word) {
return word + 's';
}
};
|
"use strict";
/*!
* koa-easy-websocket - lib/event.js
* Copyright(c) 2016 LnsooXD
* MIT Licensed
*/
const Context = require('./context');
exports = module.exports = class Event {
constructor(_event) {
readonlyProp(this, '_name', _event);
this.callbacks = {};
}
*onMessage(ctx, msg) {
if (this.callback... |
var curVersion = 'v43';
var request = require('request');
module.exports = function(grunt) {
var firebaseUrl = 'webhook';
var firebaseUri = null;
if(firebaseUrl) {
firebaseUri = 'https://' + firebaseUrl + '.firebaseio.com/generator_version.json';
}
var checkVersion = function(callback) {
if(fire... |
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import './index.less'
class ListItem extends Component {
render() {
return (
<div className="row">
<h3>{this.props.name}</h3>
{this.props.items.map((item, index) =>
<div className="col-lg-3 col-md-4 col-md-6" key={index}>
... |
// This is a plan old javascript lib
(function() {
var one = 1;
var two = 2;
console.log(one + two);
}).call(this);
(function(/*! Stitch !*/) {
if (!this.require) {
var modules = {}, cache = {}, require = function(name, root) {
var path = expand(root, name), indexPath = expand(path, './index'),... |
// Agency Theme JavaScript
(function($) {
"use strict"; // Start of use strict
// jQuery for page scrolling feature - requires jQuery Easing plugin
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anchor.a... |
var Router = Ember.Router.extend({
location: 'history'
});
Router.map(function() {
this.route('room', {path: 'room/:room_name'});
});
export default Router;
|
"use strict";
(function ($) {
var list = $('.search-list'),
form = $('form#search-form'),
showResults,
doSearch,
searching = false,
searchQueued = false,
previousQuery;
showResults = function (page) {
var newList = $(page);
list.html(newList.htm... |
version https://git-lfs.github.com/spec/v1
oid sha256:47faf475fe33a16c121cd07d6fb84ce86d5e6cc1aa24ec493ea6de5ae0d331f3
size 8163
|
/**
* Test case for network.
* Runs with mocha.
*/
'use strict'
const network = require('../lib/commands/network.js')
const assert = require('assert')
describe('network', function () {
this.timeout(3000)
before(async () => {
})
after(async () => {
})
it('Network', async () => {
})
})
/* globa... |
const path = require('path');
var webpack = require("webpack");
var plugins = []; // if using any plugins for both dev and production
var devPlugins = []; // if using any plugins for development
var prodPlugins = [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
... |
/*
Inventory
*/
import React from 'react';
import AddFishForm from './AddFishForm';
import autobind from 'autobind-decorator';
import Firebase from 'firebase';
const ref = new Firebase('https://crackling-inferno-9855.firebaseio.com/');
@autobind
class Inventory extends React.Component{
constructor(){
super();... |
'use strict';
import React from 'react';
import AppBar from 'material-ui/AppBar';
import { connect } from 'react-redux';
import { Doc, Config } from '../redux/actions';
import Datepicker from './datepicker';
import { flexParent } from '../styles';
import { createSelector } from 'reselect';
import { startOfDay, endOfDa... |
import { Application } from '../../../../../dist';
const app = new Application({ name: 'app', path: __filename });
app.set('error-handler', (req, res, statusCode) => {
res.status(statusCode).end();
});
export default app; |
var React = require('react');
var CloudinaryimageColumn = React.createClass({
renderValue: function() {
var value = this.props.data.fields[this.props.col.path];
if (!value) return;
return <a href={value.url} target='_blank'>{value.url}</a>;
},
render: function() {
return (
<td>
<div className='ItemL... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M.71 1.83c-.39.39-.39 1.02 0 1.41l3.68 3.68 2.21 4.66-1.35 2.45c-.19.33-.28.73-.24 1.15.1 1.06 1.06 1.82 2.12 1.82h7.33l1.38 1.38c-.5.36-.83.95-.83 1.62 0 1.1.89 2 1.99 2 .67 0 1.26-.33 1.62-.84l2.13 ... |
export default (urlIds) => {
return fetch('/api/getAlbums', {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(urlIds)
}).then(function(response) {
if (response.status >= 400) {
throw new Error("Bad response fr... |
const Note = require('./Note');
module.exports = Note;
|
export const CheckBoxConfig = {
id: 'Checkbox',
name: 'Checkbox',
subtitle: 'Checkbox',
group: 'Checkbox',
formlyType: 'checkbox',
formlySubtype: '',
formlyLabel: '',
formlyRequired: false,
formlyDescription: '',
formlyOptions: [],
formlyExpressionProperties: {},
formlyValidators: {},
formlyVa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.