code stringlengths 2 1.05M |
|---|
Hammer.utils = {
/**
* extend method,
* also used for cloning when dest is an empty object
* @param {Object} dest
* @param {Object} src
* @parm {Boolean} merge do a merge
* @returns {Object} dest
*/
extend: function extend(dest, src, merge) {
for(var key in src) {
if... |
import Vue from "vue";
import VueInputAutosize from "../src";
Vue.use(VueInputAutosize);
describe("vue-input-autosize", () => {
it("has an install method for Vue.use()", () => {
expect(typeof VueInputAutosize.install).toEqual("function");
});
it("creates the v-input-autosize directive", () => {
const vm... |
/**
* Author: Jeff Whelpley
* Date: 2/17/14
*
* Co-author: Masaya Ando
* date: 6/12/2014
*
* Unit tests for the main pancakes module
*/
var name = 'pancakes';
var taste = require('taste');
var pancakes = taste.target(name);
var path = require('path');
describe('Unit tests for ' + name, function () {... |
(function () {
"use strict";
// Shortcuts.
var utils = valerie.utils,
copyFunction = function (sourceModel, destinationModel, index, includeWrappedFunction, includeUnwrappedFunction) {
var value = sourceModel[index];
if (includeWrappedFunction(value, sourceModel, index)) {
... |
'use strict';
/**
* Module dependencies.
*/
var path = require('path'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));
/**
* Show the current user
*/
exports.read = function (req, res) {
res... |
'use strict';
var path = require('path'),
root = path.dirname(require.main.filename),
route = require(root + '/vendor/router');
module.exports = function (app) {
route.setModule('Auth');
route.get('/home', 'AuthController@index', ['Auth::protect']);
route.get('/login', 'AuthController... |
'use strict';
describe('emailApp.version module', function() {
beforeEach(module('emailApp.version'));
describe('version service', function() {
it('should return current version', inject(function(version) {
expect(version).toEqual('0.1');
}));
});
});
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M.04 0h24v24h-24V0z" /><path d="M5.04 19h14V5h-14v14zm4-12h2v4h2V7h2v10h-2v-4h-4V7z" opacity=".3" /><path d="M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2... |
/**
* Netto Brutto sync form
*
* @class Hatimeria.core.form.PriceTaxSyncForm
* @extends Ext.form.Panel
*/
(function() {
Ext.define('Hatimeria.core.form.PriceTaxSyncForm', {
extend: 'Ext.form.Panel',
config: {
/**
* Tax rate
* @cfg {Number... |
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"plugins": [
'react'
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"common-sense"
],
// remove this
rules: {
'react/display-name': 0
}
}... |
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'react',
'i18next'
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
"plugin:react/recommended"
],
parserOptions: {
ecmaFeatures: {
jsx: true
... |
var R = require('ramda');
var simpleCompareConcernFactory = require('../internal/simpleCompareConcernFactory');
module.exports = simpleCompareConcernFactory("max", R.identity, R.lte);
|
/*
* Ext JS Library 2.2.1
* Copyright(c) 2006-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
Ext.onReady(function(){
Ext.QuickTips.init();
function formatDate(value){
return value ? value.dateFormat('M d, Y') : '';
};
// shorthand alias
var f... |
module("About Assignment (topics/about_assignment.js)");
test("local variables", function() {
var temp = 1;
equal(temp, 1, "Assign a value to the variable temp");
});
test("global variables", function() {
temp = 1; // Not using var is an example. Always use var in practice.
equal(window.temp, temp, '... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Takes your scss files and compiles them to css
sass: {
dist: {
options: {
style: 'expanded'
},
files: {
'src/css/main... |
'use strict';
var Generator = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var helpers = require(__dirname + '/../../helpers');
module.exports = class extends Generator{
constructor(args, opts){
super(args, opts);
}
prompting() {
this.log(yosay... |
/* loader for $ LAB
env:production
*/
$LAB
.script((!Array.prototype.indexOf) ? "js/extra/es5-shim.js":null).wait()
.script("js/esential.js")
.script("js/jquery.js")
.script("js/olli.js").wait(layout.init);
|
var Player = function(){
var x,
y,
id;
};
Player.prototype=function(startX,startY){
this.x=startX;
this.y=startY;
};
Player.prototype.getX=function(){
return this.x;
};
Player.prototype.getY=function(){
return this.y;
};
Player.prototype.setX=function(newX){
this.x=newX;
};
Pla... |
/**
* AngularUI - The companion suite for AngularJS
* @version v0.1.0 - 2012-07-20
* @link http://angular-ui.github.com
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
angular.module('ui.config', []).value('ui.config', {});
angular.module('ui.filters', ['ui.config']);
angular.module('ui.directi... |
'use strict';
describe('Controller: ResearchCtrl', function () {
// load the controller's module
beforeEach(module('richlewismlApp'));
var ResearchCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
Resear... |
/*
* grunt-dogescript
* https://github.com/Bartvds/grunt-dogescript
*
* Copyright (c) 2013 Bart van der Schoor
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('gru... |
'use strict';
angular
.module('uploader')
.controller('UploaderController', UploaderController);
//.factory('UploaderService');
UploaderController.$inject = ['$scope', '$http','FileUploader', 'UploaderService'];
//app.controller('SecumapsController', ['$rootScope', '$scope', '$compile',
function Uploa... |
//目次
//ブラウザ判定、body,formのid,class付与
//ConfigManagerからid取得
//ID付与(IDがない場合)(nameが被った場合、単にiを付与する方が処理が軽い)
//事前コンバート
//ConfigManagerからclass取得
//ConfigManagerからvalidation取得
//new
//action
// window.onunload = function(){}
// if(window.name != "xyz"){
// location.reload();
// window.name = "xyz";
// }
jQuery.noConflict();
j... |
function formatHelper([text]) {
let result = ''
for (let i = 0; i < text.length; i++) {
if (text[i + 1] !== ' ' && (
text[i] === '.' ||
text[i] === ',' ||
text[i] === '!' ||
text[i] === '?' ||
text[i] === ':' ||
text[i] === ';')) {
result += te... |
/**
* Create selectors for user store
*/
import { createSelector } from 'reselect'
const userStateSelector = state => state.user;
export const userSelector = createSelector(
userStateSelector,
userState => userState.user
);
export const tokenSelector = createSelector(
userStateSelector,
userState => user... |
/** internal
* class Processor
*
* Used to create custom processors without need to extend [[Template]] by
* simply providing a function to the processor registration methods:
*
* var name = 'my-pre-processor';
* var func = function (context, data, callback) {
* callback(null, data.t... |
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['underscore', 'jquery', '../codeplayer'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('underscore'), require('jquery'), require('../codep... |
var searchData=
[
['year_2epy',['Year.py',['../Year_8py.html',1,'']]]
];
|
'use strict';
describe('rgiAnswerMethodSrvc', function () {
beforeEach(module('app'));
var rgiAnswerMethodSrvc;
var $q, rgiAnswerSrvc, rgiHttpResponseProcessorSrvc;
var $qDeferStub, $qDeferSpy, expectedPromise;
beforeEach(inject(function (_rgiAnswerMethodSrvc_, _$q_, _rgiAnswerSrvc_, _rgiHttpResp... |
'use strict';
angular.module('<%= scriptAppName %>')
.filter('<%= cameledName %>', function() {
return function(input) {
return '<%= cameledName %> filter: ' + input;
};
});
|
var express = require('express');
var router = express.Router();
router.get('/search', (req, res, next) => {
if(!req.query.q) {
res.status(403).send('Usage: /entity/search?q=<keyword>');
return;
}
var q = req.query.q;
res.json(graph.serialize());
});
module.exports = router;
|
// @flow
import React, { Element as ReactElement } from 'react';
import { Link } from 'react-router';
export default class StageIdentifier extends React.Component {
static propTypes: Object = {
stageNum: React.PropTypes.number.isRequired,
styles: React.PropTypes.object.isRequired,
changeStage: React.Prop... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("node_modules/codemirror/lib/codemirror.js"));
else if (typeof define == "function... |
module.exports = function (grunt) {
var pkg = grunt.file.readJSON("package.json");
grunt.initConfig({
mocha: {
test: {
src: ["test/spec-runner.html"]
}
}
});
grunt.loadNpmTasks("grunt-mocha");
grunt.registerTask("test", ["mocha:test"]);
... |
const electron = require('electron');
const proc = require('child_process');
const path = require('path');
const SlaxServer = require('skylark-slax-nodeserver');
const chalk = require('chalk');
exports = module.exports = serve;
function serve(slaxApp, options) {
// spawn Electron
options.slax = slaxApp;
... |
/*!
* Copyright (c) 2010 Chris O'Hara <cohara87@gmail.com>
*
* 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 rights to use, copy,... |
import React from 'react';
import PropTypes from 'prop-types';
import Paper from '@material-ui/core/Paper';
import List from '@material-ui/core/List';
const SuggestionsList = ({
children,
}) => (
<div className="ChatInput-suggestions">
<Paper>
<List>
{children}
</List>
</Paper>
</div>... |
const item = require('./item.model');
const tran = require('./transaction.model');
module.exports = {
/**
* The GET operation for the edit transaction action
* @param {number} id - The id for the record to edit, undefined for new records
*/
get: function(id) {
return new Promise((resolv... |
/**
* Build the cartridge store definition.
* @return {object} - The error store component.
*/
module.exports = function(){
return {
'messages': 'messages'
};
};
|
const Lab = require('lab');
const Code = require('code');
const Helper = require('./_helper');
const lab = exports.lab = Lab.script();
lab.experiment('FAQ page', () => {
let driver;
let sessionID;
let passed;
lab.beforeEach(() => {
passed = false;
driver = Helper.build();
return driver.getSessio... |
//
import React, { Component } from 'react';
import classnames from 'classnames';
import { fetchJson } from './helper';
import MembersChart from '../../components/CallToolAnalytics/MembersChart';
import MembersStatusTable from '../../components/CallToolAnalytics/MembersStatusTable';
import TargetsChart from '../../comp... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'basicstyles', 'ru', {
bold: 'Полужирный',
italic: 'Курсив',
strike: 'Зачеркнутый',
subscript: 'Подстрочный индекс',
... |
// grab screen size
var SCREEN_WIDTH = window.innerWidth,
SCREEN_HEIGHT = window.innerHeight,
// init canvas element and 2D context
canvas = document.getElementById('canvas'),
context = canvas.getContext('2d');
// init canvas size
canvas.width = SCREEN_WIDTH;
canvas.height = SCREEN_HEI... |
import showdown from 'showdown';
import $ from 'jquery';
let sourceText = '';
let previousSourceText;
function run() {
previousSourceText = sourceText;
sourceText = document.getElementById('id_content').value;
if (previousSourceText === sourceText) {
return;
}
const target = document.getElementById('chu... |
'use strict';
/**
* Background Directive
*
* Simple directive used for controlling the dynamic background on the site
* It loads an image from a the ImageGenModel and sets it as the background.
* It also exposes a method that allows for a new background image to be loaded.
*/
var BackgroundDirective = BaseDirect... |
const PlotCard = require('../../plotcard.js');
class AGameOfThrones extends PlotCard {
setupCardAbilities(ability) {
this.persistentEffect({
targetController: 'any',
match: player => player.getNumberOfChallengesWon('intrigue') < 1,
effect: [
ability.effec... |
import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'Home',
component: Home
}
]
})
|
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import autoprefixer from 'autoprefixer';
import constants from './constants';
import path from 'path';
import webpack from 'webpack';
import webpackIsomorphicAssets from './assets';
import WebpackIsomorphicToolsPlugin from 'webpack-isomorphic-tools/plugin';
i... |
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _DropdownContext = _interopRequireDefault(require("./DropdownContext"));
function _interopRequireDefault(obj) { return obj &&... |
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
module: {
loaders: [
{ test: /\.(?:c|sc|sa)ss$/,
loader: ExtractTextPlugin.extract(['css', 'sass'])
}
]
},
output: {
publicPath: '/assets/'
},
plugins: [
new ExtractTextPlugin('bundle.css'... |
/**
* Created by sgreenwo on 12/25/16.
*/
import 'babel-polyfill';
import chai from 'chai';
chai.should();
describe('someCommand', () => {
before(() => {
});
describe('#someMethd', () => {
it('should work', () => {
const a = [1, 2, 3, 4];
a.should.have.length(4);
... |
// @flow
import { call, put, takeEvery } from 'redux-saga/effects';
import type { Saga } from 'redux-saga';
import { makeGetRequest } from 'services/networking/request';
import { fetchUserSuccess, fetchUserError } from './actions';
import { USER_FETCH_REQUEST } from './constant';
// worker Saga: will be fired on USER_... |
var yargs = require( 'yargs' )
var package = require( '../package' )
var log = require( 'debug' )( 'ZEUGBERG:MAIN' )
var gui = window.require( 'nw.gui' )
var Zeugberg = require( './zeugberg' )
// Patch nw.js' console.*() for nice output
require( './console' )()
// Brutally exit() on uncaught errors
process.on( 'uncau... |
import React from 'react';
import { Tab, TabBarItem, Article } from '../../../build/packages';
import IconButton from '../home/images/icon_nav_button.png';
import IconMsg from '../home/images/icon_nav_msg.png';
import IconArticle from '../home/images/icon_nav_article.png';
export default class TabBarAutoDemo extends R... |
module.exports.set = function(app,connection){
/* @api airsensor
* @var int | air_s_id [record id]
* @var date | air_s_date [current date]
* @var int | air_s_value [air quality index slope value]
*/
app.get('/api/airsensor', function(req, res) {
connection.query('SELECT ... |
var buf1 = new Buffer('我');
var buf2 = new Buffer('爱');
var buf3 = new Buffer('中');
var buf4 = new Buffer('国');
//合并:Buffer.concat(list[,totalLength]);
/*var all = Buffer.concat([buf1,buf2,buf3,buf4],12).toString();
console.log(all);
var s = all.slice(9,12);
console.log(s);*/
//复制Buffer: Buffer.copy(targetBuffer,tar... |
var mongoose=require("mongoose")
mongoose.connect('mongodb://127.0.0.1/accountBook')
var db=mongoose.connection
db.once('open',callback=>{
console.log('数据库打开成功')
})
//schema
var userSchema = new mongoose.Schema({
"nick": String,
"id":String,
"pwd": String,
"signInTime":{type:Date,default:Date.now()}
});
/... |
const setupResolveDeep = require('./index');
const PromiseBluebird = require('bluebird');
const {assert, expect} = require('chai');
setupResolveDeep(Promise);
setupResolveDeep(PromiseBluebird);
let checkFor = (val) => {
return val2 => {
assert.deepEqual(val2, val);
};
};
let port = 44441;
function setupTest... |
'use strict';
angular.module('getAgileApp')
.controller('AddStoryCtrl', function ($scope, $modalInstance, StoryService, selectedBoardId, socket) {
var storyRef = StoryService.draftStory();
var storyId = storyRef.name();
console.log(storyId);
//console.log($scope.draftStory);
... |
import gulp from 'gulp';
import { config, $, notify, isDev } from './config';
gulp.task('imagemin_clear', () =>
$.del([config.dest.images])
);
gulp.task('imagemin_build', () =>
gulp.src(config.src.images)
.pipe($.if(isDev, $.plumber({ errorHandler: notify('Images error') })))
.pipe($.debug())
.pipe($.... |
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: For creating grouped collapsible content areas.
//>>label: Collapsible Sets (Accordions)
//>>group: Widgets
//>>css.structure: ../css/structure/jquery.mobile.collapsible.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css
defin... |
$(function() {
var History = window.History;
var askUser = function(msg) {
return (window._testConfirm || window.confirm).call(null, msg);
}
$.ajaxSetup({
timeout: 10000,
async: true,
cache: false,
dataType: 'json',
type: 'GET'
});
var $content = $('#content');
var stateCounte... |
let $ = require('jquery')
$('#list').html(`
<h1>list title</h1>
<p>list describe</p>
`) |
/**
* Main JS file for Casper behaviours
*/
/*globals jQuery, document */
(function ($) {
"use strict";
$(document).ready(function(){
$(".post-content, .post-excerpt").fitVids();
$('iframe[src*="spotify"]').attr({width: 288, height: 368}).wrap($('<div />').css({'width': 288, 'margin': '1em aut... |
/**
* Module dependencies.
*/
var Hunter = require('../lib/hunter');
var Users = require('../lib/users');
var co = require('co');
/**
* Initialize static variables.
*/
var token = process.env.TWITTER_ACCESS_TOKEN_KEY;
var secret = process.env.TWITTER_ACCESS_TOKEN_SECRET;
/**
* Main function.
*/
function *ma... |
const app = require('./server-app'); // Express app
const port = process.env.SERVER_PORT || 8000;
console.log(`Starting server on port ${port}`);
app.listen(port);
|
/*
zuck.js
https://github.com/ramon82/zuck.js
MIT License
*/
module.exports = (window => {
/* Utilities */
const query = function (qs) {
return document.querySelectorAll(qs)[0];
};
const get = function (array, what) {
if (array) {
return array[what] || '';
} else {
return ''... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.sqrtmDependencies = void 0;
var _dependenciesAbs = require("./dependenciesAbs.generated");
var _dependenciesAdd = require("./dependenciesAdd.generated");
var _dependenciesIdentity = require("./dependenciesIdentity.generated");
v... |
'use strict';
const assert = require('assert');
const Browscap = require('../src/index.js');
suite('checking for issue 1875. (1 test)', function () {
test('issue-1875-A ["Mozilla/5.0 (compatible; proximic; +https://www.comscore.com/Web-Crawler)"]', function () {
const browscap = new Browscap();
const browse... |
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('due_date_tmp', {
issue_open: {
type: DataTypes.INTEGER(11),
allowNull: true
},
issue_closed: {
type: DataTypes.INTEGER(11),
allowNull: true
},
assigned_to_id: {
type: Da... |
// Start server
var server = require('./server/server').init(); |
//Ball
Ball = function(game, x,y, key, frame) {
Phaser.Sprite.apply(this, arguments);
game.physics.p2.enable(this);
this.body.setCircle(Ball.const.BALL_RADIUS);
this.body.collideWorldBounds = true;
this.body.setCollisionGroup(game.const.COL_BALL);
this.checkWorldBounds = true;
//this.outOfBoundsKill = true;
th... |
$data.Guid = function Guid(value) {
///<param name="value" type="string" />
if (value === undefined || (typeof value === 'string' && /^[a-zA-z0-9]{8}-[a-zA-z0-9]{4}-[a-zA-z0-9]{4}-[a-zA-z0-9]{4}-[a-zA-z0-9]{12}$/.test(value))) {
this.value = value || '00000000-0000-0000-0000-000000000000';
} else {... |
/* globals ish: false */
var CachingCalculator = ish.dspcalc.CachingCalculator;
var Tokenizer = ish.dspcalc.Tokenizer;
var testName = 'ish.dspcalc.CachingCalculator ';
QUnit.test(testName + "basic tests", function( assert ) {
"use strict";
assert.expect(4);
var done = assert.async(4);
var c = new Ca... |
version https://git-lfs.github.com/spec/v1
oid sha256:0f82ba51ba0b04adc7e184d2adfacc2dd0a9cd9d14b83d0eb109e02321536532
size 14483
|
var fs = require('fs');
var path = require('path');
var _merge = require('lodash/object/merge');
var ase = require('ase-utils');
var chroma = require('chroma-js');
var mkdirp = require("mkdirp");
var walkPath = './lib';
var outPath = './dist';
var json = {};
function walk (dir, done) {
fs.readdir(dir, function (erro... |
define([
'jquery',
'underscore',
'backbone',
'collections/teas',
'models/tea',
'views/header',
'views/tealist',
'views/teadetails'
], function ( $, _, Backbone, Teas, Tea, HeaderView, TeaListView, TeaView) {
'use strict';
// Router
var TeaApp = Backbone.Router.extend({
routes: {
"" : "list... |
/**
* A module to define the game lost UI.
*
* @module ui/stage/returnable/gamelost
* @see module:ui/stage/returnable
*/
define(['config/config', 'config/strings', 'ui/stage/returnable'], function (config, strings, ReturnableUI) {
/**
* Creates the game lost UI.
*
* @constructor
* @extends... |
import { findOne } from 'ember-cli-page-object/extend';
export default function <%= camelizedModuleName %>(selector, options = {}) {
return {
isDescriptor: true,
get() {
return findOne(this, selector, options).disabled;
}
};
}
|
import { Beat } from 'ember-audio';
import { module, test } from 'qunit';
import { settled } from '@ember/test-helpers';
module('Unit | Class | beat', function() {
// Replace this with your real tests.
test('it exists', function(assert) {
let result = Beat.create();
assert.ok(result);
});
test('_markP... |
module.exports = {
tableName: 'users',
records: [
{
id: 1,
team_id: 1,
first_name: 'Adam',
last_name: 'Michaelides',
email: 'acm1@cornell.edu',
password_salt: '$2a$10$wlhVrmkAu7H7Wttks/9vte',
password_hash: '$2a$10$wlhVrmkAu7H7Wttks/9vte8KTY6afM7XHdKTXadrXlpvpVgfHyx6m',... |
// Generated by LiveScript 1.2.0
(function(){
var Pointer, Base, Cell;
Pointer = require('./pointer');
Base = require('./base');
Cell = (function(superclass){
var prototype = extend$((import$(Cell, superclass).displayName = 'Cell', Cell), superclass).prototype, constructor = Cell;
function Cell(val){
... |
// On page load...
$(function() {
// Set a listener for the experienced_hacker radio buttons
$('section#apply input[name=experienced_hacker]').change(function() {
console.log(this.value);
if (this.value === "true") {
$('#noob-form').addClass('hidden');
$('#experienced-form').removeClass('hidden'... |
var cards = {};
function Card(attributes){
this.id = attributes.id;
this.name = attributes.name;
this.c_type = attributes.c_type;
this.bonus = attributes.bonus;
this.apr = attributes.apr;
this.anual_fee = attributes.anual_fee;
this.credit_needed = attributes.credit_needed;
this.balance_tra... |
"use strict";
const reduxNodes = require(`./nodes`);
const lokiNodes = require(`../../db/loki/nodes`).reducer;
const backend = process.env.GATSBY_DB_NODES || `redux`;
function getNodesReducer() {
let nodesReducer;
switch (backend) {
case `redux`:
nodesReducer = reduxNodes;
break;
case `lok... |
import PropTypes from 'prop-types'
import React from 'react'
import { findDOMNode } from 'react-dom'
import clsx from 'clsx'
import * as dates from './utils/dates'
import chunk from 'lodash/chunk'
import { navigate, views } from './utils/constants'
import { notify } from './utils/helpers'
import getPosition from 'dom... |
import admin from 'firebase-admin'
import * as functions from 'firebase-functions'
export { functions }
export const firebase = admin.initializeApp()
|
'use strict'
const { expect } = require('chai')
const server = require('../lib/server')
describe('Server', function () {
it('should export a function', function () {
expect(server).to.be.a('function')
})
})
|
Grailbird.data.tweets_2015_11 =
[ {
"source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E",
"entities" : {
"user_mentions" : [ {
"name" : "Fetcheveryone",
"screen_name" : "fetcheveryone",
"indices" : [ 0, 14 ],
"id_... |
var Proteus = require("proteus"),
dutil = require("dice-js/util"),
format = dutil.format,
Dice
;
Dice = Proteus.Class.derive(Object.defineProperties({
/**
* Dice represents a collection of a number of dice all having the same
* number of faces
*
* @constructor
* @param {Nu... |
'use strict';
/**
* practice Node.js project
*
* @author William Wang <wangmuming_0218@126.com>
*/
module.exports = function (set, get, has) {
// ·þÎñÆ÷¼àÌý¶Ë¿Ú
set('web.port', 3000);
// session secret
set('web.session.secret', 'test');
// session redis connection
set('web.session.redis', {
host: '... |
module.exports = handler
const debug = require('../debug').handlers
async function handler (req, res, next) {
debug('DELETE -- Request on' + req.originalUrl)
const ldp = req.app.locals.ldp
try {
await ldp.delete(req)
debug('DELETE -- Ok.')
res.sendStatus(200)
next()
} catch (err) {
debug(... |
$(document).ready(function() {
$('a[href^="#"]').bind('click.page-scroll', function(e) {
e.preventDefault();
var target = this.hash;
console.log(target);
$('html, body').stop().animate({
'scrollTop': $(target).offset().top
}, 1500, 'easeInOutExpo', function()
... |
import Logger from "../../../src/common/js/Logger.js";
import EngineTest from "../js/EngineTest.js";
window.LOGGER = new Logger();
LOGGER.setTraceEnabled(false);
LOGGER.setDebugEnabled(false);
LOGGER.setInfoEnabled(false);
QUnit.start(); |
var mercury = require('../../../index')
var h = mercury.h
var doMutableFocus = require('../../todomvc/lib/do-mutable-focus')
var update = {
// this needs to be input rather than change so that the pre expands as text
// is entered into the textarea
input: function (state, e) {
state.value.set(e.target.value)
},
... |
/*
UIEmojiPanel.js
Copyright (c) 2014-2022 dangered wolf, et al
Released under the MIT License
*/
// import { EmojiButton } from '@joeattardi/emoji-button';
export class UIEmojiPanel {
static attachEvents() {
const picker = new EmojiButton({style:"twemoji",autohide:false,i18n:{
search:I18n("Search emojis...... |
'use strict';
/*
* Angular Directive References:
* http://www.codeproject.com/Articles/607873/Extending-HTML-with-AngularJS-Directives
* http://jsfiddle.net/Wijmo/LyJ2T/
*/
angular.module('ledita-app')
.directive('activitydetail', [function() {
return {
restrict: 'E',
scope: {
sho... |
'use strict';
let braintree = specHelper.braintree;
let Config = require('../../../lib/braintree/config').Config;
let GraphQL = require('../../../lib/braintree/graphql').GraphQL;
describe('GraphQL', function () {
describe('checkGraphQLErrors', function () {
it('returns a null for non-error responses', function ... |
import Book from './book.model';
function showBooksOfUser({ user }) {
return Book
.find({ user })
.populate('info')
.exec();
}
export default showBooksOfUser;
|
define( [
"suds/events/Dispatcher",
"suds/patches/function.bind"
], function( Dispatcher ) {
var instance = null;
var allowInstantiation = false;
var history = window.history;
var location = window.location;
var support = !!( history && history.pushState );
var hash = "#!/";
var History = Dispatcher.exten... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.