code stringlengths 2 1.05M |
|---|
var mLineas = require('../models/mLineas');
var mEmple = require('../models/mEmple');
var mBorro = require('../models/mBorro');
var mAyuda = require('../models/mAyuda');
module.exports = {
getAll: getAll,
getAlta: getAlta,
postAlta: postAlta,
getModificar: getModificar,
postModificar: postModificar,
getDel: getD... |
'use strict';
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var Q = require('q'); /* jshint ignore:line */
var _ = require('lodash'); /* jshint ignore:line */
var Page = require('../../../base/Pag... |
// Inclusion de Mongoose
var mongoose = require('../libs/mongoose').mongoose;
var Schema = require('../libs/mongoose').Schema;
var crypto = require('crypto');
var log = require('../libs/log')(module);
var validator = require('validator');
var Mail = new Schema({
value: {
type: String... |
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define */
/**
* BrambleExtensionLoader allows optional enabling/disabling of extensions
* based on query string params.
*/
define(function (require, exports, module) {
"use strict";
var basePath = PathUtils.di... |
var path = require('path');
var logger = require('../util/logger')('COMMAND');
/*
* Each file included in this folder (except `index.js`) is a command and must export the following object
* {
* execute: (...args) => void | command itself
* }
*
* The execute function should not have much logic
*/
/* Each and... |
'use strict';
var gulp = require('gulp'),
connect = require('connect'),
livereload = require('gulp-livereload'),
browserify = require('browserify'),
watchify = require('watchify'),
source = require('vinyl-source-stream'),
less = require('gulp-less'),
rubySass = require('gulp-ruby-sass'),
plumber = requi... |
define(['angular', 'given', 'util'], function(angular, given, util) {
'use strict';
describe('services', function() {
describe('MyModel service', function() {
var $injector, MyModel;
before(function() {
return given.servicesForLoopBackApp(
{
models: {
MyM... |
'use strict';
var MongoClient = require('mongodb').MongoClient
var cheerio = require('cheerio');
var Q = require('q');
var _ = require('lodash');
var mongoUri = process.env.MONGOLAB_URI ||
process.env.MONGOHQ_URL ||
'mongodb://localhost/prerender';
var db = Q.denodeify(MongoClient.connect)(mongoUri);
var pag... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import MuseUI from 'muse-ui'
import 'muse-ui/dist/muse-ui.css'
import store from './store/index.js'
impo... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({other:"Outro",classBreaks:"\u00e3_Class Breaks_____________\u00c7",classBreaksNormFieldAsPercent:"\u00e3_Class Breaks with normalizationField as percent___... |
export default (function (thing, encoding, name) {
if (Buffer.isBuffer(thing)) {
return thing;
}
else if (typeof thing === 'string') {
return Buffer.from(thing, encoding);
}
else if (ArrayBuffer.isView(thing)) {
return Buffer.from(thing.buffer);
}
else {
throw... |
process.stdin.resume();
process.stdin.setEncoding('ascii');
var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;
process.stdin.on('data', function (data) {
input_stdin += data;
});
process.stdin.on('end', function () {
input_stdin_array = input_stdin.split("\n");
main();
});
func... |
/* global test, expect, jest */
import {
mapStateToProps,
mapDispatchToProps
} from "../../container/MenuApp";
test("Should map state to props", () => {
expect(mapStateToProps({toto: "toto"})).toEqual({toto: "toto"});
});
test("Should map dispatch to props", () => {
const mockedDispatch = jest.fn();
... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M7.01 9.49L11 6.7V5.3l-1.35-.95c-1.82.57-3.37 1.77-4.38 3.34l.39 1.34 1.35.46zM5.01 10.92l-1 .73c0 .12-.01.23-.01.35 0 1.99.73 3.81 1.94 5.21l1.14-.1.79-1.37L6.4 11.4l-1.39-.48zM18.34 ... |
var dataModule=function(n,t,i){var r=[],u=function(t){n.ajax({url:"api/activities/Search",contentType:"application/json",method:"POST",data:t,dataType:"json",success:function(n){i.updateDom(n)}})},f=function(n){var i=this;i.id=t.observable(n.Id);i.name=t.observable(n.Name)},e=function(){return r.length==0&&n.ajax({asy... |
/* eslint quotes: 0 */
'use strict'; // eslint-disable-line
import('./src/calculator-app').then(({
default: app
}) => {
app.start('root', () => {
console.log('-------Welcome to Calculator Example-------');
});
}).catch(console.error.bind(console));
|
'use strict';
/**
* @ngdoc filter
* @name myNewProjectApp.filter:myFilter
* @function
* @description
* # myFilter
* Filter in the myNewProjectApp.
*/
angular.module('myNewProjectApp')
.filter('myFilter', function () {
return function (input) {
return 'myFilter filter: ' + input;
};
});
|
'use strict';
describe('Controller: FindCtrl', function () {
// load the controller's module
beforeEach(module('realtalkApp'));
var FindCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
FindCtrl = $contr... |
// for jasmine-node support
if (typeof process !== 'undefined' && process.title && process.title === 'node') { // detect node environment
var Validator = require('./../src/validator');
}
// only checks numeric, string, and undefined
describe('email validation rule', function() {
it('should pass with the email addre... |
var KIRIAPP = KIRIAPP || {};
KIRIAPP.score = {};
KIRIAPP.score.makeScore = function() {
//--------------------------------------------------
var __ = function() {};
//--------------------------------------------------
var effect = function(elmentId, delay) {
var el = document.getElementById(elmentId);
el.styl... |
module.exports = function (RED) {
var Client = require('azure-iot-device').Client;
var Protocols = {
amqp: require('azure-iot-device-amqp').Amqp,
mqtt: require('azure-iot-device-mqtt').Mqtt,
http: require('azure-iot-device-http').Http,
amqpWs: require('azure-iot-device-amqp').A... |
/*!
* ShortUrl
* Copyright(c) 2015 Andrew Shapro
* MIT Licensed
*/
(function () {
'use strict';
/**
* API for the handlers
* @type {Object}
*/
var ShortUrlHandlers = function ($, ShortUrlUi) {
var ui = new ShortUrlUi($);
/**
* handle ajax `done`
* @param {Object} data data resolved in request
... |
import addAbout from '<server/graphql>/mutations/about/add';
import updateAbout from '<server/graphql>/mutations/about/update';
import removeAbout from '<server/graphql>/mutations/about/remove';
export default {
addAbout,
updateAbout,
removeAbout,
};
|
import React, { Component, PropTypes } from 'react';
import { Table } from 'fixed-data-table';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { List, Map } from 'immutable';
import Modal from '../Modal';
import { ThreeBounceSpinner } from '../../../../Base/Spinners/Spinners';... |
#!/usr/bin/env node
'use strict';
(function() {
var async, backupCtrl, chalk, cli, connectCtrl, databaseCtrl, getCommand, helpCtrl, main, memoryCtrl, ndx, options, pack, pad, passwordCtrl, path, processCommand, readline, revokeCtrl, tokenCtrl;
ndx = require('./ndx.js');
readline = require('readline');
c... |
/**
* Backend related objects
*/
/* global CKEDITOR, CKFinder, Bloodhound, linkList */
var jsBackend =
{
debug: false,
current: {
module: null,
action: null,
language: null
},
// init, something like a constructor
init: function () {
// get url and split into chunks
... |
$(document).ready(function() {
$("#error").hide();
}); |
// ==UserScript==
// @name amazon_wishlist_sum
// @namespace danibaena
// @description Just a simple script to sum all items and prices in an Amazon.es' Wishlist url
// @include http://www.amazon.es/gp/registry/wishlist/*
// @include https://www.amazon.es/gp/registry/wishlist/*
// @include ... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.m.ObjectListItem.
sap.ui.define(['jquery.sap.global', './ListItemBase', './library', 'sap/ui/core/IconPool'],... |
import React from 'react'
import test from 'tape'
import { shallow } from 'enzyme'
import ListItem from './'
test('<ListItem />', t => {
const wrapper = shallow(<ListItem>Beep</ListItem>)
t.equals(wrapper.text(), 'Beep')
t.end()
})
test('<ListItem className />', t => {
const wrapper = shallow(<ListItem class... |
/*
Web call needed to discover baseURI needed to call Users API for individual LiveEngage accounts for Accounts:
This URL is for app keys that have Read/Write enabled on the API
https://api.liveperson.net/api/account/{YOUR ACCOUNT NUMBER}/service/accountConfigReadWrite/baseURI.json?version=1.0
This URL is for app k... |
// ## LayoutPage
//
// Represents the Layout page. Mounts to #root.
//
var LayoutPage = new Combo.Component({
render: function() {
return `
${HeaderComponent.render()}
${SidebarComponent.render()}
<main role="main" id="content"></main>
`... |
/**
* Created by alexander on 14.05.15.
*/
'use strict';
module.exports = function (gulp, plugins, config, utility, logger, notifier) {
return function () {
logger.info('Compiling sass files to css and adding vendor prefixes.');
gulp.src(config.files.src.sassfx)
.pipe(plugins.if(config.isStage, plugi... |
export const UPLOAD_FILE_SUCCESS = 'UPLOAD_FILE_SUCCESS';
export const UPLOAD_FILE_FAILURE = 'UPLOAD_FILE_FAILURE';
export const FETCH_FILES_REQUEST = 'FETCH_FILES_REQUEST';
export const FETCH_FILES_SUCCESS = 'FETCH_FILES_SUCCESS';
export const FETCH_FILES_FAILURE = 'FETCH_FILES_FAILURE';
export const UPDATE_FILE_NAME... |
module.exports = function(app) {
var express = require('express');
var snippetsRouter = express.Router();
snippetsRouter.get('/', function(req, res) {
res.send({
'snippets': [
{
'id': 1,
'content': 'This is the content of a snippet attached to a draft.',
'creatorEm... |
function rect(data) {
var layer = this.layer,
context = this.context;
context.rect(
layer.normalizeX( data.x || 0 ),
layer.normalizeY( data.y || 0 ),
layer.normalizeX( data.width || layer.width() ),
layer.normalizeY( data.height || layer.height() )
);
}
registerEle... |
var EasyBacklogImpl = function(url, apiKey, accountId) {
this.url = url;
this.apiKey = apiKey;
this.accountId = accountId;
};
EasyBacklogImpl.prototype = Object.create(IEasyBacklog);
EasyBacklogImpl.prototype.setApiKey = function(apiKey) {
this.apiKey = apiKey;
};
EasyBacklogImpl.prototype.setAccountId = functio... |
import {
DeviceEventEmitter,
NativeAppEventEmitter,
NativeEventEmitter,
NativeModules,
Platform,
} from 'react-native';
const { RNBackgroundTimer } = NativeModules;
const Emitter = new NativeEventEmitter(RNBackgroundTimer);
class BackgroundTimer {
constructor() {
this.uniqueId = 0;
this.callbacks ... |
import React, {Component} from 'react';
class ClockUTC extends Component {
constructor(props) {
super(props);
this.state = {date: new Date()};
}
componentDidMount() {
this.timerID = setInterval(
() => this.tick(),
1000
);
}
componentWillUnmount() {
clearInterval(this.timerID... |
export function formatVideoDuration(seconds) {
const mm = Math.floor(seconds / 60) || 0;
const ss = ('0' + Math.floor(seconds % 60)).slice(-2);
return mm + ':' + ss;
}
|
var webpack,
path,
WriteFilePlugin,
devServer;
webpack = require('webpack');
path = require('path');
ExtractTextPlugin = require('extract-text-webpack-plugin');
devServer = {
contentBase: path.resolve(__dirname, './public'),
colors: true,
quiet: false,
noInfo: false,
publicPath: '/stat... |
import { Vue, mergeData } from '../../vue'
import { NAME_CARD_HEADER } from '../../constants/components'
import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props'
import { htmlOrText } from '../../utils/html'
import { sortKeys } from '../../utils/object'
import { copyProps, makeProp, makeP... |
/**
* Created by wxb on 15/12/29.
*/
'use strict';
angular.module('tailorApp')
.controller('MoreManageNavCtrl', function ($scope, $location, localStorageService) {
$scope.privilege = localStorageService.cookie.get('user').privilege;
$scope.admin = localStorageService.cookie.get('user').admin;
$sc... |
let Cycle = require('@cycle/core')
let express = require('express')
let serverConfig = require('config')
let {Observable} = require('rx')
let {makeHTMLDriver} = require('@cycle/dom')
let {makeHTTPDriver} = require('@cycle/http')
let layout = require('./components/layout')
let app = require('./app')
function wrapVTre... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var vector2Grid_1 = require("./../vector2Grid");
var util = require("./../../util");
var Item = (function () {
function Item() {
this.rotation = 0;
this.isFlipped = false;
this.category = "Misc";
this.destro... |
import { combineReducers } from 'redux';
import {
FETCH_REGION_LIST, FETCH_REGION_LIST_ID,
SEARCH_REGION, SEARCH_REGION_ID,
REQUEST_C1_RECAP, RECEIVE_C1_RECAP, RECEIVE_CANDIDATES
} from '../actions/index';
function regionList(state = {}, action) {
switch (action.type) {
case FETCH_REGION_LIST:
return... |
module.exports = function(grunt){
//require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Hint the JS files
jshint: {
options: {
reporter: 'node_modules/jshint-stylish',
},
target: {
file... |
version https://git-lfs.github.com/spec/v1
oid sha256:d698c911fd58bcee23edc54c2f4505c9798197ba594cd370e9ba8e4ebeb1af85
size 11740
|
version https://git-lfs.github.com/spec/v1
oid sha256:03d827e9a738a7622dae9cf04aa2a14cc7e90d3486e2744a3128748df84a119d
size 2331
|
version https://git-lfs.github.com/spec/v1
oid sha256:1909143c44b8c37944f1271b9fdc63cf5e0936173b7821fd4af817fd1b19604a
size 37701
|
import gql from 'graphql-tag';
import React, { Component } from 'react';
import { graphql } from 'react-apollo';
import { Link } from 'react-router-dom';
class Wishlist extends Component {
render() {
const { loading, wishlist } = this.props.data;
if (loading) {
return <span>Loading...</span>;
}
... |
class LearningActivityController {
constructor() {
this.name = 'Learning Activity';
}
}
export default LearningActivityController;
|
// --------------------- IMPORTS ----------------------------------
var express = require('express')
, voronoi = require('./voronoi.js').Voronoi
, http = require('http')
, routes = require('./routes');
var app = express();
// ------------------------- CONFIGURATION ------------------------
app.set('port', proce... |
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i &... |
// This is the runtime configuration file. It complements the Gruntfile.js by
// supplementing shared properties.
require.config({
urlArgs: 'v=' + (new Date()).getTime(),
paths: {
"vendor": "../vendor",
"almond": "../vendor/bower/almond/almond",
"underscore": "../vendor/bower/lodash/dis... |
// TODO: make this code pretier, and add it on your api
// ****
var DumbEventTarget = function() {
this._listeners = {};
};
DumbEventTarget.prototype._ensure = function(type) { // if type is not added to listeners, add and ensure that it is added
if(!(type in this._listeners)) this._listeners[type] = [];
};
D... |
import Animate from './Animate';
import { configBezier, configSpring } from './easing';
import { translateStyle } from './util';
import AnimateGroup from './AnimateGroup';
export { configSpring, configBezier, AnimateGroup, translateStyle };
export default Animate; |
(function () {
'use strict';
angular
.module('app')
.controller('DataTabController', DataTabController);
DataTabController.$inject = ['$document', '$ionicLoading', '$ionicModal', '$ionicPopup', '$log', '$scope', '$state',
'HelpersFactory', 'IS_WEB'];
function DataTabController($document, $ionicLoad... |
module.exports = require('lodash.startswith')
|
'use strict';
angular.module('packs').controller('EditCourseImagesController', ['$scope', 'Cards',
function ($scope, Cards) {
$scope.options = {};
$scope.options.readFront = 'leave';
$scope.options.readBack = 'leave';
$scope.options.mode = 'leave';
$scope.options.speech = ... |
/**
* Particle objects used in starfield
* this.speed.x
* this.speed.y
* this.speed.z
* this.size
* this.depth
* this.boundries.x.min
* this.boundries.x.max
* this.boundries.y.min
* this.boundries.y.max
*/
/**
* Create a new particle with defined properties
* @param {Object} properties
*/
var Particle = ... |
module.exports = function(grunt) {
//////////////////
// config vars //
//////////////////
// files: ['!node_modules/**/*.js', '**/*.js', '**/*.html']
// filesLib = ['index.js', 'lib/**/*.js'],
var docsTmplDir = 'docs-tmpl',
filesDocsTmpl = docsTmplDir + '/**/*.tmpl',
filesLib = ['lib/**/*.js'],
filesCSS ... |
/**
* The popup script would be executed when user clicked the chrome plugin's icon
*
*/
(function(){
// STEP 1: invoked when plugin popup page show up
document.addEventListener('DOMContentLoaded', function () {
jQuery('#uploadHref').click(function(){
chrome.tabs.query({active:true,currentWindow:true},fu... |
define(['joga'], function (joga) {
module("HTMLInputElementBinding");
test("data-value binding updates input text value", function() {
var model = new Model();
function Model() {
this.name = joga.objectProperty("test");
this.element = joga.elementProperty('<input type=... |
// import React from 'react';
// import { shallow } from 'enzyme';
// import { SelectFriend } from '../index';
describe('<SelectFriend />', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(false);
});
});
|
import PropTypes from 'prop-types';
import React from 'react';
import {
TouchableNativeFeedback,
TouchableHighlight,
StyleSheet,
View,
Platform,
ActivityIndicator,
Text as NativeText,
} from 'react-native';
import colors from '../config/colors';
import Text from '../text/Text';
import MaterialIcon from 'r... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('/Plugin/slidepanel', ['exports', 'jquery', 'Plugin'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('jquery'), require('Plugin'));
} else {
var mod = {
exports: {}
};
... |
'use strict';
/* Main application module */
var blogApp = angular.module('blogApp', [
'blogAppServices',
'blogAppDirectives'
]);
|
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Session = require('./session');
// Thanks to http://blog.matoski.com/articles/jwt-express-node-mongoose/
// set up a mongoose model
var InterventSchema = new Schema({
title: {
type: String,
unique: false,
required: tru... |
const express = require('express')
const path = require('path')
const bodyParser = require('body-parser')
const logger = require('morgan') // remove for production
const PORT = process.env.PORT || 5000
const app = express();
// fixes
app.disable('x-powered-by')
// dev additions // should be conditined out for producti... |
import Spacing from 'material-ui/styles/spacing';
export default {
spacing: Spacing,
fontFamily: 'Roboto, sans-serif',
palette: {
primary1Color: '#0097a7', // (#00bcd4)输入框聚焦边框改变颜色 check
primary2Color: '#0097a7', // (#0097a7)
primary3Color: '#bdbdbd', // (#bdbdbd)
accent1Color: '#ff4081', // (#... |
import {
FETCH_AD_STARTED,
FETCH_AD_COMPLETED,
FETCH_AD_FAILED
} from 'shared/constants/ActionTypes'
import { createReducer } from 'shared/utils/redux-utils'
const initialState = {
ads: {}
}
export default createReducer(initialState, {
[FETCH_AD_STARTED]: () => (initialState),
[FETCH_AD_COMPLETED]: (state... |
/* ========================================================================
* Bootstrap: affix.js v3.2.0
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap... |
const path = require("path")
exports.createPages = ({ actions, graphql }) => {
const { createPage } = actions
const casePostTemplate = path.resolve(`src/templates/post.js`)
return graphql(`
{
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
limit: 1000
) {
... |
var AspxCustomerManagement = {
"Are you sure you want to delete customer?": "Are you sure you want to delete customer?",
"Sorry! You can not delete yourself.": "Sorry! You can not delete yourself.",
"Customer ID": "Customer ID",
"Culture Name": "Culture Name",
"Added On": "Added On",
"Upda... |
var assert = require("assert");
var indexStringify = require('../index');
var jsonStableStringify = require('json-stable-stringify');
var validateLibOutput = require('./validate');
var data = require("../fixtures/index").input;
var dataLength = JSON.stringify(data).length;
suite("libs", function() {
var minSamples... |
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const autoprefixer = require('autoprefixer');
const webpack = require('webpack');
module.exports ... |
/* global angular, document, window */
'use strict';
angular.module('starter.controllers', [])
.controller('AppCtrl', function($scope, $ionicModal, $ionicPopover, $timeout) {
// Form data for the login modal
$scope.loginData = {};
$scope.isExpanded = false;
$scope.hasHeaderFabLeft = false;
... |
import { scene, camera, renderer } from './common/scene';
import { setEvents } from './common/setEvents';
import { convertToXYZ, getEventCenter, geodecoder } from './common/geoHelpers';
import { mapTexture } from './common/mapTexture';
import { getTween, memoize } from './common/utils';
import topojson from 'topojson';... |
'use strict';
const webpack = require('webpack');
function build(config) {
return new Promise((resolve, reject) => {
webpack(config, (err, res) => {
if (err) {
reject(err);
}
resolve(res);
});
});
}
module.exports = build;
|
import React, { Component } from 'react';
import Radium from 'radium';
const styles = {
wrapper: {
width: '100%',
},
}
const FailePage = ({}) => {
return (
<div style={styles.wrapper}>
<h1>Falha na autenticação!!!</h1>
</div>
)
}
export default Radium(FailePage)
|
import React from 'react';
import PropTypes from 'prop-types';
import ProfileDataKey from './ProfileDataKey';
const propTypes = {
dataKeys: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number.isRequired,
selected: PropTypes.bool.isRequired,
label: PropTypes.string.isRequired,
}).isReq... |
/* global describe, it, expect */
var Container = require('../lib/container');
// Bacteria
function Bacteria() {
}
Bacteria.prototype.eat = function() {
return 'sugar';
}
// Fish
function Fish(bacteria) {
this.bacteria = bacteria;
}
Fish.prototype.eat = function() {
return 'bacteria, ' + this.bacteria.eat... |
// TodoApp.Views.Todos ||= {}
// class TodoApp.Views.Todos.NewView extends Backbone.View
// template: JST["backbone/templates/todos/new"]
// events:
// "submit #new-todo": "save"
// constructor: (options) ->
// super(options)
// @model = new @collection.model()
// @model.bind("change:errors", ... |
'user strict'
var Primus = require('primus')
var http = require('http')
var request = require('request')
var Redis = require('redis')
var fs = require('fs')
var bunyan = require('bunyan')
var CronJob = require('cron').CronJob
var log = bunyan.createLogger({
name: 'Chimera IRChat server',
serializers: {
req: b... |
export default class Projectile extends Phaser.Physics.Arcade.Sprite {
constructor (scene, x, y, key, frame) {
// call bullet constructor
super(scene, x, y, key, frame);
// project attributes
this.attributes = this.attributes || {};
this.attributes.bounce = this.attributes.b... |
function MockStore(store) {
this._store = store;
}
MockStore.prototype.load = function(req, cb) {
process.nextTick(function() {
cb(null, { transactionID: req.body.state, redirectURI: 'http://www.example.com/auth/callback' })
});
}
MockStore.prototype.store = function(req, txn, cb) {
req.__mock_store__ = {... |
version https://git-lfs.github.com/spec/v1
oid sha256:b8b033ce61dee6a88210b9e99b9f8bd14b7e7fda5ffec139b21631a190328926
size 267
|
/**
* See https://github.com/kennychua/pdiffy/blob/master/examples/casperjs/CASPEREXAMPLE.md for more information
**/
// Initialise Casper, and instruct it to do lots of logging
var casper = require('casper').create(
{
verbose:true,
logLevel: "debug"
});
// Navigate to Google homepage
casper.start('http://google.c... |
const toArray = (myObj) => {
const newArray = []
for(let index in myObj) {
if(myObj.hasOwnProperty(index)){
newArray.push(myObj[index]);
}
}
return newArray
}
export { toArray } |
/**
* Emulate CustomEvent constructor
* credits to https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent
* @author Gustavo Salomé Silva <gustavonips@gmail.com
* @link https://github.com/gusnips/html5-polyfill>
* @license MIT
*/
;(function(e,document,t){if(e.CustomEvent)return;function n(e,n){n=$.extend({bu... |
version https://git-lfs.github.com/spec/v1
oid sha256:77e7b0022b2a91ba37ba6ece5615f28f86228558035c75ef63847d563d501ec2
size 244225
|
import * as Kit from "./kit";
import { Tag, symbol, invariant } from "./kit";
import * as Match from "@effectful/transducers/match";
import * as path from "path";
// import {sync as resolve} from "resolve"
/** token type for signaling config object changes */
export const config = symbol("config");
/** token holding d... |
$(document).ready(function() {
//toggles the image on click
$("#toggle_second").click(function() {
$("#toggle_second").toggleClass("transparent");
});
});
//used for mask and opacity
$(document).ready(function() {
//set height of container of images from it's child div height
function setHeight() {
... |
'use strict';
const expect = require('chai').expect;
const Plugin = require('.');
describe('pegjs-brunch', function () {
it('should initialize with no arguments', function () {
const plugin = new Plugin();
expect(plugin).to.be.ok;
});
it('should initialize with empty brunch config', function () {
... |
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2016 San Dinh Studios. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ----------... |
// Component and content creation classes and functions
import component, {state} from 'kompo';
import {delegate, create} from 'kompo-util';
// Example components with self-explanatory name
import table, {tableActions} from '../../../src/js/table/infiniteTable';
// Create root component
const root = component.constru... |
(function() {
'use strict';
describe('service webDevTec', function() {
var webDevTec;
beforeEach(module('jsNode'));
beforeEach(inject(function(_webDevTec_) {
webDevTec = _webDevTec_;
}));
it('should be registered', function() {
expect(webDevTec).not.toEqual(null);
});
des... |
module.exports = {
extends: [
// Use the Standard config as the base
// https://github.com/stylelint/stylelint-config-standard
'stylelint-config-standard',
// Enforce a standard order for CSS properties
// https://github.com/stormwarning/stylelint-config-recess-order
'stylelint-config-recess-o... |
"use strict";
var express = require('express')
, v1 = require('./v1/auth')
;
var auth = express();
auth.use('/v1', v1);
module.exports = auth; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.