code stringlengths 2 1.05M |
|---|
angular.module('mytoolboxApp').service('NotificationService', function($mdToast, $filter) {
'use strict';
var service = this;
var POSITION = 'top right';
function attachMethods() {
service.show = function(msg, next) {
$mdToast.show(
$mdToast.simple().textContent(msg).position(POSITION).hideDelay(2000)
... |
const stream = require('../primary/stream');
const toProperty = require('../one-source/to-property');
module.exports = function fromPromise(promise) {
let called = false;
let result = stream(function(emitter) {
if (!called) {
let onValue = function(x) {
emitter.emit(x);
emitter.end();
... |
import React from 'react';
import classnames from 'classnames';
import { flatten } from 'lodash';
import BreadcrumbItem from './BreadcrumbItem';
import BreadcrumbSeparator from './BreadcrumbSeparator';
import { merge } from '../../utils';
const Breadcrumb = (props) => {
const { children, embedded } = props;
const ... |
/**
* This file is part of the RedKite CMS Application and it is distributed
* under the GPL LICENSE Version 2.0. To use this application you must leave
* intact this copyright notice.
*
* Copyright (c) RedKite Labs <info@redkite-labs.com>
*
* For the full copyright and license information, please view the LICEN... |
import * as GeneralStore from '../GeneralStore';
jest.disableAutomock();
const exportList = [
'connect',
'define',
'defineFactory',
'DispatcherInstance',
'useStoreDependency',
];
describe('GeneralStore', () => {
it('should match the export list', () => {
exportList.forEach(exportName => {
expec... |
// This script allows the top right sidebar to open/close
$(document).ready(function(){
$("#menu-close").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});});
$(document).ready(function(){
$("#menu-toggle").click(function(e) {
... |
function changeMatrix([rows, cols, y, x]) {
let matrix = [];
for (let row = 0; row < rows; row++) {
matrix[row] = [cols];
for (let col = 0; col < cols; col++) {
matrix[row][col] = 0;
}
}
for (let row = 0; row < matrix.length; row++) {
for (le... |
/**
* Copyright 2012-2019, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var mouseOffset = require('mouse-event-offset');
var hasHover = require('has-hover');
var supportsPassive = req... |
import {assert} from 'chai';
import camelCase from '../src/camel-case.js';
describe('#camelCase', () => {
it('should camelCase a string', () => {
assert.equal(camelCase('helloThere'), 'helloThere');
assert.equal(camelCase('Hello.there'), 'helloThere');
assert.equal(camelCase('hello-There'), 'helloThere')... |
import './prod-detail.less'
import './tz_base.css'
import $ from 'jquery'
$(() => {
let csrftoken = document.cookie.match(/csrftoken=\w+/g)[0].replace(/csrftoken=/, '')
let onlineId = /detail\/\d+/.exec(location.href)[0].replace('detail\/', '')
//加载
let rendSku = (sku) => {
return '<img src=' + sku.pic + '>'
... |
var Company = require('./../models/company');
var Counter = require('./../models/counter');
var Contact = require('./../models/contact');
var objectAssign = require('object-assign');
var fs = require("fs");
var deleteFiles = require('./../utilities/deleteFiles').deleteFiles;
var getFileExtension = require('./../utilit... |
ServerInfo = function () {
this.Server = null;
this.dataStore = null;
this.TeamCityApi = null;
this.ServerListPage = null;
var that = this,
serverInfoRootId = "#server-settings",
$serverInfoElement = null;
this.Show = function(containerId) {
$serverInfoElement = $(Handlebars.templates['Server... |
/// bioinformatics library
/// influenced by: http://underscorejs.org/docs/underscore.html
///TODO: If this becomes larges, refactor into an extension to _.string
/// DNA-object below does not assume ES2015 or a transpiler is available
(function () {
'use strict';
var root = this;
var _ = !_ ? {} : _;
_.bioinfor... |
import React from 'react'
import {connect} from 'cerebral/react'
import {props, signal, state} from 'cerebral/tags'
import translations from '../../common/compute/translations'
export default connect(
{
// autoFocus
enterPressed: signal`projects.enterPressed`,
escPressed: signal`projects.escPressed`,
... |
import { ValidationError } from '../validation_error';
const camelCaseTest = RegExp('^[a-z][a-zA-Z0-9]*$');
export function InputObjectValuesAreCamelCased(context) {
return {
InputValueDefinition(node, key, parent, path, ancestors) {
const inputValueName = node.name.value;
const parentNode = ancesto... |
'use strict';
(function(module) {
const aboutController = {};
aboutController.init = function(){
$('#game-stats').hide();
$('#home-page').hide();
$('#top-games').hide();
$('#help-page').hide();
$('#leaderboard').hide();
$('#help-page').hide();
$('#about-us').fadeIn();
};
module.abo... |
'use strict';
const { NumberPrompt } = require('enquirer');
const placeholder = require('../../lib/placeholder');
const prompt = new NumberPrompt({
name: 'amount',
message: 'How much do you want to donate?',
float: true,
cursor: 1,
format(input = this.input) {
const str = Intl.NumberFormat(void 0, { sty... |
var app = angular.module("myApp", []);
app.controller('MainController', ['$scope', '$http', function($scope, $http) {
$scope.hi = 'hi';
$scope.ticker;
//$scope.year;
/*$scope.getFinancials = function() {
$http.get('http://localhost:4000/10K/' + $scope.ticker + '/' + $scope.year).then(function(... |
import * as React from 'react';
import axios from 'axios';
import Masonry from 'masonry-layout';
import $ from 'jquery';
import imagesLoaded from 'imagesloaded';
class Profile extends React.Component {
constructor(props) {
super(props);
}
_getUsername() {
let user = this.props.user;
if (user.first_n... |
"use strict";
var Directive = function() {
return {
restrict: "E",
templateUrl: "/modules/common/header/tmpl/header.html"
};
};
|
/**
* Created by jf on 15/12/9.
*/
"use strict";
import React from 'react';
import { shallow } from 'enzyme';
import assert from 'assert';
import WeUI from '../src/index';
const {CellsTitle} = WeUI;
describe('<CellsTitle></CellsTitle>', ()=> {
const text = `cells tips wording`;
const wrapper = shallow(
... |
/**
* @file mip-jm-searchtop 组件
* @author
*/
define(function (require) {
var customElement = require('customElement').create();
var $ = require('zepto');
/**
* 构造元素,只会运行一次
*/
customElement.prototype.firstInviewCallback = function () {
var $element = $(this.element);
var $form =... |
(function ($) {
$.Redactor.opts.langs['ba'] = {
html : 'HTML',
video : 'Ubaci video',
image : 'Ubaci fotografiju',
table : 'Tabela',
link : 'Veza',
link_insert : 'Ubaci vezu ...',
link_e... |
/**
* @param {*} string the string to test.
* @returns true if the string is null or of zero length.
*/
export function isBlank (string) {
return !(!!string && string.length)
}
/**
* Returns the route that is in place before a user accesses the login page,
* e.g. if the URL is http://www.example.com/path/#/rout... |
/**
* @author maurobuselli@gmail.com
*/
(function () {
'use strict';
angular.module('AngularPanelsApp.pages.components.timeline', [])
.config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
.state('components.timeline', {
url: '/timeline',
t... |
import chai from 'chai';
import chaiSpies from 'chai-spies';
chai.use(chaiSpies);
import proxyquire from 'proxyquire';
const documentMock = (function() {
const pageVisibilityListeners = [ ];
const mock = {
hidden: false
};
mock.addEventListener = function(eventName, handler) {
page... |
var express = require('express')
, jam = require('../lib/jamendo.js').JamNet
, router = express.Router()
;
// TRACKS
router.get('/tracks', function(req, res, next) {
res.render(
'form_track_search',{title: 'Find Tracks'}
);
});
router.post('/tracks', function(req, res, next) {
var url;
if (req.body.... |
var TableData = function () {
//function to initiate DataTable
//DataTable is a highly flexible tool, based upon the foundations of progressive enhancement,
//which will add advanced interaction controls to any HTML table
//For more information, please visit https://datatables.net/
var runDataTable... |
import React from "react";
import ReactDOM from "react-dom";
class Game extends React.Component {
constructor(props){
super(props);
this.state = {
audio: { blue: "sounds/simonSound1.mp3", yellow: "sounds/simonSound2.mp3", green: "sounds/simonSound3.mp3", red: "sounds/simonSound4.mp3" }... |
const youngMan = new Promise(function youngLady(resolve, reject) {
setTimeout(function() {
resolve('she is madly in love with him!');
}, 2000);
});
youngMan.then(function(results) {
// resolve
console.log(results);
console.log('yay! she said yes!');
console.log('looking for a place... |
describe("Question Three", function() {
describe("hospital.allMyDoctor function", function() {
var hospital;
beforeEach(function() {
hospital = new Hospital();
});
it("should return a string", function() {
expect(typeof hospital.displayDoctor()).toBe... |
/** @license MIT License (c) copyright 2010-2013 original author or authors */
/**
* Licensed under the MIT License at:
* http://www.opensource.org/licenses/mit-license.php
*
* @author Brian Cavalier
* @author John Hann
*/
var paths = require('../lib/path');
var domPointer = require('./domPointer');
var fn = re... |
// Generated by CoffeeScript 1.8.0
(function() {
var Teacup, doctypes, elements, merge_elements, tagName, _fn, _fn1, _fn2, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2,
__slice = [].slice,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] ... |
(function () {
'use strict';
angular
.module('app.web').run(appRun);
/* @ngInject */
appRun.$inject = ['routerHelper', 'appSession'];
function appRun(routerHelper, appSession) {
var states = getStates(routerHelper, appSession);
routerHelper.configureStates(states, '/dashboard');
}
function getStates(route... |
/* */
"use strict";
exports.__esModule = true;
exports["default"] = isRequiredForA11y;
function isRequiredForA11y(propType) {
return function validate(props, propName, componentName) {
if (props[propName] === null) {
return new Error("The prop '" + propName + "' is required to make '" + componentName + "... |
angular.module('app.token', [])
.factory('tokenInterceptor', function($q, localStorageService) {
return {
request: function(config) {
config.headers = config.headers || {};
if (localStorageService.get('token')) {
config.headers.Authorization = ... |
'use strict';
var objects = require('pegjs/lib/utils/objects');
var visitor = require('pegjs/lib/compiler/visitor');
var asts = require('pegjs/lib/compiler/asts');
var Imports = require('../utils/Imports');
var makeRuleBuilder = require('../utils/RuleBuilder');
var CodeBuilder = require('../utils/CodeB... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/home/Main.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'home',
component: Index
},
{
path: '/fixed-size',
name: 'fixed-size',
component: () => import(/* webpackChunkName: "fixed-size" */ '... |
/**
* @fileoverview Tests for padding-line-between-statements rule.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const rule = require("../.... |
import React from 'react';
import {shallow} from 'enzyme';
import Test from '../index';
describe('<Test />', () => {
it('should render message', () => {
const renderedComponent = shallow(
<Test />
);
expect(renderedComponent.childAt(0).prop('id')).toBe('app.components.Test.head... |
// Contact Form Scripts
$(function() {
$("#registerForm input").jqBootstrapValidation({
preventSubmit: true,
submitError: function($form, event, errors) {
// additional error messages or events
},
submitSuccess: function($form, event) {
event.preve... |
/* @flow */
import {
getNpmData,
curriedMerge,
pickDownloads,
filterPrivate } from './utilities';
import {
readPackageJson,
fetchEachDependency,
instantiateDependencies,
readYarnLock,
addNode
} from './helpers';
export function backpat() {
return new Promise((resolve) => {
Promise.all([readPa... |
/**
* Created by Administrator on 2017/6/6 0006.
*/
$('select[name="ct_id"]').live('change', function() {
$('#attr_val').children().remove();
$.post(SCOPE.commit_url, {id:$(this).val()}, function(data) {
var str = '<table>';
$(data).each(function(i,item){
str += '<tr><td><span styl... |
global.__dir = __dirname;
var quicksort = require(__dir + "/core/app/start");
quicksort.start(); |
import React, { Component } from 'react'
import { Form } from 'semantic-ui-react'
class FormExampleCaptureValues extends Component {
state = { name: '', email: '', submittedName: '', submittedEmail: '' }
handleChange = (e, { name, value }) => this.setState({ [name]: value })
handleSubmit = e => {
e.prevent... |
var HomeController = RouteController.extend({
template: 'home'
});
Router.map(function () {
this.route('home', {
path : '/_ref',
controller : HomeController
});
});
|
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* City Schema
*/
var CitySchema = new Schema({
_id: {
type: String,
default: '',
required: 'Please fill City search name',
unique: true,
trim: true
},
name: {
type: String,... |
import React from 'react';
import PropTypes from 'prop-types';
class Menu extends React.Component {
render() {
const { isActive, index } = this.props.showBookMenu;
const showClass = isActive && index === this.props.index ? " focused" : "";
return (
<svg className={`btn-icon icon-menu${showClass}`}... |
import MarketingHeading1 from './MarketingHeading1';
import MarketingHeading2 from './MarketingHeading2';
export { MarketingHeading1, MarketingHeading2 };
|
angular.module('app.changes_controller', []).controller('changesCtrl', function($scope, $state, utils, repository, $rootScope) {
$rootScope.navActive = 'changes'
$scope.loading = false
$scope.changes = []
$scope.repoName = repository.git.name
$scope.repoDir = repository.git.dest === 'default' ? 'Documents/Yo... |
var ab = require('airbrake');
exports.version = '0.0.3';
exports = module.exports = function airbrake (apikey, options) {
var options = options || {};
var client = ab.createClient(apikey);
function airbrake (instance) {
if(options.serverNotifier) {
instance.server.airbrakeNotify = function(msg) {
... |
(function () {
'use strict';
angular
.module('app')
.controller('Account.IndexController', Controller);
function Controller($window, $rootScope, UserService, FlashService) {
var vm = this;
vm.confirmPassword = "";
vm.user = null;
vm.saveUser = saveUser;
... |
/*
* There's no single, convenient standard idiom for converting a buffer object
* into a string. Illustrate a few techniques.
*/
/*@include util-buffer.js@*/
/*===
4 "\xffabc"
|c3bf616263|
4 "\ufffdabc"
|efbfbd616263|
4 "\ufffdabc"
|efbfbd616263|
4 "\ufffdabc"
|efbfbd616263|
4 "\xffabc"
|ff616263|
===*/
funct... |
import { PageNames } from '../../constants';
export function showProfilePage(store) {
store.dispatch('resetAndSetPageName', {
pageName: PageNames.PROFILE,
});
}
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
import React, { Component, PropTypes } from "react";
import { View, StyleSheet } from "react-native";
import moment from "moment";
import t from "tcomb-form-native";
import newEventFormStylesheet from "../config/newEventFormStylesheet";
const Form = t.form.Form;
const _Date = t.struct({
date: t.Date
});
const DateO... |
import Store from "../store.js";
import CorvoLinkedList from "../corvo_linked_list.js";
import CorvoNode from "../corvo_node.js";
import MemoryTracker from "../memory_tracker";
import CorvoSkipList from "../corvo_skiplist.js";
import CorvoSkipListNode from "../corvo_skiplist_node.js";
describe("corvo node", () => {
... |
/*global describe,it,should,beforeEach,module,expect*/
describe('angular-markdown-it:directive', function() {
'use strict';
var $compile;
var $rootScope;
beforeEach(module('mdMarkdownIt'));
beforeEach(inject(function(_$compile_, _$rootScope_) {
$compile = _$compile_;
$rootScope = _$rootScope_;
})... |
game.TitleScreen = me.ScreenObject.extend({
/**
* action to perform on state change
*/
onResetEvent: function() {
me.game.world.addChild(new me.Sprite(0, 0, me.loader.getImage('title-screen')), -10 ); // TODO
game.data.option1 =
me.game.worl... |
/*jslint indent: 4 */
/*global module */
module.exports = {
options: {
jshintrc: '.jshintrc'
},
all: ['Gruntfile.js', 'spec/**/*.js', 'tasks/**/*.js']
};
|
var port;
var lastData = {};
var state = STATE_NONE;
var STATE_NONE = 0;
var STATE_TURN = 1;
var STATE_END = 2;
var STATE_GEM_BACK = 3;
var STATE_SELECT_NOBLE = 4;
var selectedTokens = [0,0,0,0,0,0];
$(document).ready(function () {
port = getParameterByName("port");
$(".Card")
.append("<div class='Ca... |
/**
* @function
* Determines whether the supplied element is a node list.
* See http://stackoverflow.com/questions/7238177/how-to-detect-htmlcollection-nodelist-in-javascript for a detailed description.
* @param nodes - The nodes to check.
* @returns {Boolean} - Whether the element is a node list
*/
export defaul... |
'use strict';
// Define the `PractitionerListApp.practitioner-detail` module
angular.module('PractitionerListApp.practitioner-detail', [
'ngRoute',
'PractitionerListApp.practitioner'
]);
|
define([
'private/group/GroupApp',
'private/group/controllers/GroupController'
], function(){
}); |
/**
* All content covered under The MIT License except where included 3rd-party
* vendor files are licensed otherwise.
*
* @license http://opensource.org/licenses/MIT The MIT License
* @author Ryan Kelley
* @copyright 2011-2015 Jakked Hardcore Gym
*/
/**
* Provides functionality for tab-based elements
*/
(fu... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M3.81 6.28C2.67 7.9 2 9.87 2 12s.67 4.1 1.81 5.72C6.23 16.95 8 14.68 8 12S6.23 7.05 3.81 6.28zM20.19 6.28C17.77 7.05 16 9.32 16 12s1.77 4.95 4.19 5.72C21.33 16.1 22 14.13 22 12s-.... |
/*
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 4
Version: 4.6.0
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin/admin/
*/
var FONT_COLOR = '#212121';
var FONT_FAMILY = 'Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif';
var FONT_WEIGHT = '500... |
module.exports = function(grunt) {
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: [
'src/lunr.de.js',
'src/stemmer.js',
'src/stop_word_filter.js'
],
dest: 'dist/lunr.de.js'
}
... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({widgetLabel:"\u0412\u0456\u0434\u0441\u0442\u0435\u0436\u0443\u0432\u0430\u043d\u043d\u044f",startTracking:"\u041f\u043e\u0447\u0430\u0442\u0438 \u0432\u04... |
var fs = require ('fs');
var arquivo = process.argv[2];
fs.createReadStream(arquivo)
.pipe(fs.createWriteStream('novo-' + arquivo))
.on('finish', function(){
console.log('arquivo escrito');
}); |
/* global EmberDev */
import Controller from '../../controllers/controller';
import Service from '../../system/service';
import { Mixin, get } from 'ember-metal';
import EmberObject from '../../system/object';
import inject from '../../inject';
import { runDestroy, buildOwner } from 'internal-test-helpers';
QUnit.mod... |
export const styles = (theme) => ({
paper: {
padding: 2 * theme.spacing.unit,
},
header: {
marginTop: 2 * theme.spacing.unit,
marginBottom: theme.spacing.unit,
},
});
|
/*
*
* INSPINIA - Responsive Admin Theme
* version 2.7
*
*/
var collapseIBOX = function (element){
console.log('collapse-link', element);
var ibox = $(element).closest('div.ibox');
var button = $(element).find('i');
var content = ibox.children('.ibox-content');
content.slideToggle(200);
... |
import {INCREMENT, DECREMENT, DOUBLE} from '../constants/actionTypes';
import objectAssign from 'object-assign';
// IMPORTANT: Note that with Redux, state should NEVER be changed.
// State is considered immutable. Instead,
// create a copy of the state passed and set new values on the copy.
// Note that I'm using Ob... |
/* global module, wx, window: false, document: false */
'use strict';
import {extend, is} from '../util/helper'
import WxElement from '../core/element'
let WX_POINT_CONFIG = {
radius: 2,
style: 'circle', // Support triangle, rect and Image object
borderWidth: 1,
borderColor: '#000000',
backgroundC... |
import warning from 'warning';
import { POP } from './Actions';
function extractPath(string) {
var match = string.match(/https?:\/\/[^\/]*/);
if (match == null)
return string;
warning(
false,
'Location path must be pathname + query string only, not a fully qualified URL like "%s"',
string
);
... |
function CdnClient (options) {
if (!(this instanceof CdnClient)) return new CdnClient(options);
EventEmitter.call(this);
var self = this;
if (!util.isSupportedBrowser()) {
document.addEventListener('DOMContentLoaded', function(){
util.log("Unsupported browser");
var els = document.querySelect... |
const CDPMock = {
port: 4321,
host: 'foobarhost',
on: jest.fn(),
emit: jest.fn(),
Network: {
enable: jest.fn().mockImplementation((args, cb) => cb(null, args))
}
}
export default jest.fn().mockImplementation((args, cb) => cb(CDPMock))
|
define(["require", "exports", "app/boot", "angular", "app/configs/enums/size"], function (require, exports, boot, angular, size_1) {
"use strict";
exports.__esModule = true;
var ConfirmPromise = (function () {
function ConfirmPromise(defer) {
this.defer = defer;
}
Confirm... |
var express = require('express'),
router = express.Router(),
Cover = require('../models/cover'),
authCheck = require('../lib/auth-check'),
coverFile = require('../lib/coverFile'),
oauthRequest = require('../lib/oauthRequest'),
configs = require('config'),
request... |
var auth = require('../config/auth'),
Vote = require('mongoose').model('Vote');
module.exports = {
createComment: function (req, res, next) {
var newCommentData = req.body;
newCommentData.userId = req.user._id;
Vote.findOne({_id: newCommentData.voteId }, function (error, vote) {
... |
'use strict';
// ------------------------------------------------------------------------------
// Requirements
// ------------------------------------------------------------------------------
const rule = require('../../../lib/rules/require-meta-docs-description');
const RuleTester = require('eslint').RuleTester;
... |
'use strict';
// 春分の日 / 秋分の日
const spling = require('./spling');
const autumnal = require('./autumnal');
module.exports = {
spling: spling,
autumnal: autumnal
};
|
// app/models/support.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var SupportSchema = new Schema({
os: String,
browser: String
});
module.exports = mongoose.model('Support', SupportSchema);
|
/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
define("vs/code/electron-main/main.nls.zh-tw", {
"vs/base/common/errors": [
"{0}。錯誤碼: {1}",
"權限被拒絕 (HTTP {0})",
"權限被拒絕",
"{0} (HT... |
/* global jest */
const fs = require('fs');
const glob = require('glob');
const path = require('path');
const getLerna = require('../getLerna');
const getLernaPackages = require('./index');
jest.mock('fs');
jest.mock('glob');
jest.mock('path');
jest.mock('../getLerna');
global.process = Object.assign(process, {
cwd:... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FooterDirective = (function () {
function FooterDirective() {
this.restrict = 'E';
this.templateUrl = './templates/footer.html';
this.transclude = true;
}
FooterDirective.prototype.link = function (scope... |
'use strict'
// var mongoose = require('mongoose')
// var passport = require('passport')
var config = require('../../config').backend
var jwt = require('jsonwebtoken')
var expressJwt = require('express-jwt')
var compose = require('composable-middleware')
var User = require('../api/user/user.model')
var validateJwt = e... |
/*
* scrollClass jQuery Plugin v1.2.0
*
* Author: Virgiliu Diaconu
* http://www.virgiliudiaconu.com
* Licensed under the MIT license.
*/
;(function($, window, document, undefined) {
'use strict';
$.scrollClass = function(el, options) {
var base = this;
// Access to jQuery and DOM versions of element
... |
$(function() {
$("#table_salles").tablesorter();
$(".supprSalle").click(function () {
supprSalle(this)
});
$("#createSalle").click(function () {
createSalle()
});
});
function supprSalle(elt){
id = $(elt).attr("id");
jQuery.ajax({
type: "POST",
url: baseu... |
const Comparator = require('../../util/comparator');
/**
* short bubble sort algorithm
* worst: O(n^2) best: O(n)
*/
function shortBubbleSort(array, comparatorFn) {
const comparator = new Comparator(comparatorFn);
const length = array.length - 1;
let i = 0;
for (i; i < length; i++) {
const current = ar... |
import chai, { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import SyntheticEvent from 'react-dom/lib/SyntheticEvent';
import TestUtils, { Simulate } from 'react-addons-test-utils';
chai.use(sinonChai);
const clock = sinon.useFakeTimers();
let app, container, input, suggestion... |
module.exports = {
port: process.env.PORT || 8081,
db: {
database: process.env.DB_NAME || 'tabtracker',
user: process.env.DB_USER || 'tabtracker',
passwords: process.env.DB_PASS || 'tabtracker',
options: {
dialect: process.env.DIALECT || 'sqlite',
host: process.env.HOST || 'localhost',
... |
import btoa from './btoa.js';
export default function SourceMap ( properties ) {
this.version = 3;
this.file = properties.file;
this.sources = properties.sources;
this.sourcesContent = properties.sourcesContent;
this.names = properties.names;
this.mappings = properties.m... |
import { Ground } from 'meteor/ground:db'
export default () => ({
offlineEnabled: true,
Ground,
})
|
'use strict';
// Create an instance
var wavesurfer = Object.create(WaveSurfer);
// Init & load audio file
document.addEventListener('DOMContentLoaded', function () {
// Init
wavesurfer.init({
container: document.querySelector('#waveform'),
waveColor: 'white',
progressColor: '#2e3344',
... |
/* eslint-env node, mocha */
/* global $pg_database */
import expect from 'unexpected';
import cleanDB from '../../../dbCleaner';
import { Post, User, dbAdapter, Comment } from '../../../../app/models';
describe('Search', () => {
const posts = [];
function testSearch(testData) {
for (const { query = '', viewe... |
/**
* Created by zhs007 on 15/8/3.
*/
var jadecache = require('jadecache');
var renderparams = require('./renderparams');
var mainworkspace = require('./mainworkspace');
//var testmgr = require('./testmgr');
//var slotsmgr = require('../data/slotsmgr');
function renderimp(req, res, mws) {
var param = renderpara... |
var ns = {};
window.AudioContext = window.AudioContext ||
window.webkitAudioContext ||
function() {this.supported = false;};
ns.context = new window.AudioContext();
if (typeof ns.context.supported === 'undefined')
ns.context.supported = true;
window.OfflineAudioContext = window.OfflineAudioContext ||
window.... |
/**
* The helper of common fns
* @author Caro.Huang
*/
$.lHelper = (function () {
var self = {};
self.isBool = function (arg) {
return $.type(arg) === 'boolean';
};
self.isStr = function (arg) {
return $.type(arg) === 'string';
};
self.isNum = function (arg) {
return... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.