code stringlengths 2 1.05M |
|---|
'use strict';
/* App Module */
var realtyApp = angular.module('realtyApp', [
'ngRoute',
'angularUtils.directives.dirPagination',
'realtyControllers',
'realtyFilters',
'realtyServices'
]);
realtyApp.config(function(paginationTemplateProvider) {
paginationTemplateProvider.setPath('/bower_components/angul... |
var assert = require('assert'),
http = require('http'),
util = require('../lib/util');
module.exports = {
'ReconnectingClient tolerates connection failures': function(beforeExit) {
// TODO: Clean this test up using the new http client and server implementation
// var PORT = 9010,
// simp... |
'use strict';var _path;
function _load_path() {return _path = _interopRequireDefault(require('path'));}var _jestRegexUtil;
function _load_jestRegexUtil() {return _jestRegexUtil = require('jest-regex-util');}var _micromatch;
function _load_micromatch() {return _micromatch = _interopRequireDefault(require('mi... |
'use strict';
const store = new WeakMap();
module.exports = function(obj) {
if (!store.has(obj)) {
store.set(obj, {});
}
return store.get(obj);
};
|
"use strict";
var types = {
resize: function (image, options) {
return image.resize(options.width, options.height);
},
resizeAndCrop: function (image, options) {
return image.geometry(options.width, options.height, "^")
.gravity(options.gravity || "center")
.crop(opt... |
define({
"addTaskTip": "Lisää yksi tai useampia suodattimia pienoisohjelmaan ja määritä kunkin niistä parametrit.",
"enableMapFilter": "Poista esiasetettu karttatason suodatin kartasta.",
"newFilter": "Uusi suodatin",
"filterExpression": "Suodatinlauseke",
"layerDefaultSymbolTip": "Käytä karttatason oletussym... |
module.exports = {
input: {
_key: 'R5FvMrjo',
_type: 'block',
children: [
{
_key: 'cZUQGmh4',
_type: 'span',
marks: [],
text: 'Dat heading'
}
],
markDefs: [],
style: 'h2'
},
output: '<h2>Dat heading</h2>'
}
|
ns.HTMLElements.CTable = (function(){
var EClassNames = {
Base: 'cjw-table'
};
function fn(oData)
{
fn.Parent.call(this, oData);
this.m_html = document.createElement('TABLE');
this.m_html.cellSpacing = 0;
this.m_html.cellPadding = 0;
ns.DOM.AddClassNames(this.m_html, [
EClassNames.Base,
oData ... |
// sqlite3 database test
// for now unused in this project, but left here for
// future versions.
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:');
db.serialize(function() {
db.run("CREATE TABLE lorem (info TEXT)");
var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
fo... |
define([], function() {
function run(group, bite) {
var content = bite.session.getValue();
if (content) {
var result = group.container.querySelector('.bite-container-result'),
resultDocument = result.contentDocument,
resultWindow = result.contentWindow,
scriptTagES6 = resu... |
'use strict';
const isValidHex = require('../isValidHex');
it('isValidHex', () => {
expect(isValidHex('#333')).toBeTruthy();
expect(isValidHex('#a3b')).toBeTruthy();
expect(isValidHex('#333a')).toBeTruthy();
expect(isValidHex('#333afe')).toBeTruthy();
expect(isValidHex('#333afeaa')).toBeTruthy();
expect(isValid... |
const webpack = require('webpack'); // eslint-disable-line import/no-unresolved
const webpackConfig = {
module: {
loaders: [{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
}],
postLoaders: [{
test: /src\/.+\.ts$/,
exclude: /(node_modules|\.spec\.ts$)/,
lo... |
const path = require('path')
const fs = require('fs')
const webpack = require('webpack')
const { CheckerPlugin } = require('awesome-typescript-loader')
const NODE_ENV = process.env.NODE_ENV || 'development'
const sourcePath = path.join(__dirname, './src')
const env = {
'process.env.NODE_ENV': JSON.stringify(NODE_ENV... |
'use strict';
var MrtBot = require('./lib/mrtbot');
var botInstance = new MrtBot({
token: '_bot_token_here',
name: 'mr.t',
dbPath: 'data/mrtbot.db',
joinChannel: '_chat_channel_here_',
cronSchedule: '0 * 0,4,8,12,16,20 * * *',
printToLog: false
});
botInstance.run(); |
#!/usr/bin/env node
/*
* node-cordova-tools
* https://github.com/CoHyper/node-cordova-tools
*
* Copyright (c) 2017 Sven Hedström-Lang
* Licensed under the MIT license.
*/
let exec = require('child_process').exec;
let fs = require('fs');
let CONFIG = require('./../lib/config');
/**
* @author Sven Hedström-Lang... |
var m = 0;
var canvas; //for affecting position of canvas or other things
var h2;
function setup() {
h2 = createElement('h2', "This is a dynamic header!");
canvas = createCanvas(300,300);
canvas.position(0,0); //absolute positioning relative to the page, not the canvas coordinate system!
createP("My favorit... |
// Generated on 2016-09-07 using generator-angular 0.15.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Time how long task... |
/*
DO NOT USE OR REFERENCE THIS FILE!!! Switch back to 1130g
THIS was an attempt to add a json global vars for special handlers, like price and inventory. BUT these cases are going to be so unique per user that it makes more sense to handle it on a case-by-case basis in their layout and not bloat this js f... |
import React from 'react'
const ExtPage = props =>{
return(
<div>这就是一个为了静态看的页面</div>
)
}
module.exports = ExtPage
module.exports.default = module.exports |
export default {
getLocation() {
return window && window.location;
}
};
|
/*globals importScripts:true, self:true */
importScripts("/dist/papergirl.js");
self.onmessage = function(messageEvent) {
return papergirl
.setDriver(messageEvent.data.driver)
.then(function() {
return papergirl.setItem('service worker', messageEvent.data.value);
})
.the... |
/*
Author : John Weis
Plugin : Tweeze
Purpose: Uses the Search API at Twitter - https://dev.twitter.com/docs/using-search
Version: 0.1
TODO:
implement a since_id store via $.data
handle error messaging
handle rate limiting (via a cookie, so the user doesn't Ctrl + R and freak out
*/
;(function ($) {
... |
'use strict';
function getError(validateInfo, field) {
if (validateInfo && validateInfo[field] && validateInfo[field].length > 0) {
return validateInfo[field][0];
}
return '';
}
module.exports = getError; |
/*global describe, it, expect, before */
/*jshint expr:true */
var chai = require('chai'),
Strategy = require('..').Strategy;
describe('Strategy', function() {
describe('failing authentication', function() {
var strategy = new Strategy(function(creds, done) {
return done(null, false);
});
v... |
'use strict';
const Post = require('../models/post');
class IndexController {
index(req, res) {
res.render('index', {
session: req.session
});
}
}
module.exports = new IndexController();
|
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const clear = require('clear');
const {rollup} = require('rollup');
const vue = require('rollup-plugin-vue2');
const babel = require('rollup-plugin-babel');
const uglify = require('rollup-plugin-uglify');
const moduleName = 'VueXdraggable';
const des... |
'use strict';
/**
* Module dependencies.
*/
var passport = require('passport'),
LocalStrategy = require('passport-local').Strategy,
User = require('mongoose').model('User');
module.exports = function() {
// Use local strategy
passport.use(new LocalStrategy({
usernameField: 'username',
passwordField: 'pass... |
import { between } from '../../utils/format.js'
import { position } from '../../utils/event.js'
import FormMixin from '../../mixins/form.js'
import DarkMixin from '../../mixins/dark.js'
import TouchPan from '../../directives/TouchPan.js'
// PGDOWN, LEFT, DOWN, PGUP, RIGHT, UP
export const keyCodes = [ 34, 37, 40, 33,... |
/* Usage:
*
* --exec: specify which test(s) to run
* --iter: how many iterations each test should run (default: 1e6)
* --slow: toggle use of slow buffer
*
* Example:
*
* node buffer_write_string.js --exec 'write - 1e1' --iter 1e5 --slow
*
* Defaults are 'fast' and '1e6'.
*/
var oc = require('../templates/... |
test('.prototype.divide()', 12, function () {
// integer
equal((new MathLib.Integer('+10000000')).divide(new MathLib.Integer('+10')).toString(), '1000000');
equal((new MathLib.Integer('+10000000')).divide(new MathLib.Integer('-10')).toString(), '-1000000');
equal((new MathLib.Integer('-10000000')).divide(new MathL... |
var app = angular.module('JSONedit', ['ui']);
// fix ui-multi-sortable to y-axis
app.value('ui.config', {
"sortable": {
"axis": "y",
"placeholder": "sortable-placeholder"
}
});
// override the default input to update on blur
// from http://jsfiddle.net/cn8VF/
app.directive('ngModelOnblur', fun... |
/*!
* jQuery JavaScript Library v1.11.3
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2015-04-28T16:19Z
*/
(function( global, factory ) {
if ... |
var Phaser = require('phaser');
var self = {}
self.ang = {
to:{
rad:function(a){
return a*(180/Math.PI)
},
deg:function(a){
return a*(Math.PI/180);
}
}
}
self.randInRange = function(point,range){
var a = (Math.random()*360) * (Math.PI / 180);
var d = Math.random()*range*0.5;
return {
x:point.x +... |
#!/usr/bin/env node
/*
*
* poloniex-unofficial
* https://git.io/polonode
*
* Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
* exchange APIs.
*
* Copyright (c) 2016 Tyler Filla
*
* This software may be modified and distributed under the terms of the MIT
* license. See the LICENSE file ... |
var jsConsole,
i,
currentCount,
maxCount= 0,
sequenceStart,
arr = [2, 1, 1, 2, 3, 3, 2, 2, 2, 1];
for (i = 1, len = arr.length; i < len; i+=1) {
if (arr[i] === arr[i - 1]) {
currentCount += 1;
} else {
currentCount = 1;
}
if (currentCount > maxCount) {
max... |
/* ========================================================================= */
/* Preloader
/* ========================================================================= */
jQuery(window).load(function(){
$("#preloader").fadeOut("slow");
});
/* =====================================================================... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = '5.0.0-pre.9';
//# sourceMappingURL=version.js.map |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
define([
'jquery',
'underscore',
'backbone',
], function($, _, Backbone) {
var ItemView = Backbone.Marionette.View.extend({
className : 'row',
/**
*
*/
template : _.template('<li><div class="col-lg-8 text-left"><%=common.truncateString (title, 25, "..") %></div><div... |
/** @flow */
import type { Evaluator } from './evaluator';
import type { BodyEntries } from '../target';
import * as Syntax from '../syntax';
import { NodeEvaluator } from './evaluator';
export class ConditionalEvaluator extends NodeEvaluator {
static tags = ['conditional'];
node: Syntax.ConditionalOperator;
... |
import mapStateToProps from '../map-state-to-props';
function getDefault(first) {
// coercive equality used to test for null as well.
// noinspection EqualityComparisonWithCoercionJS
return first == undefined ? [] : first;
}
export function discardNullOrEmpty(first, second) {
first = getDefault(first)... |
import React, { Component } from 'react';
import {scaleLinear} from 'd3-scale';
import {
Crosshair,
HorizontalGridLines,
MarkSeries,
VerticalGridLines,
XAxis,
XYPlot,
YAxis,
Voronoi
} from 'react-vis';
export default class DynamicCrosshairScatterplot extends Component {
state = {
data: this.p... |
'@mixin'['MixinInReq'] = {
'1.First step': function () {
act.click(function () {
return '#test'
}, {
alt: true,
ctrl: false
});
},
'2.Check': inIFrame('#frame', function () {
notEq(document.getElementById('#yo'), 1);
ok(true);
... |
module.exports = {
title: 'React Hooks'
}
|
angular.module('PetAppUI').factory('PetFactory', function($http, ServerUrl, $routeParams) {
var pets = [];
var fetch = function() {
$http.get(ServerUrl + '/pets').success(function(response) {
angular.copy(response, pets);
});
};
return {
pets: pets,
fetch: f... |
import React, { Component, PropTypes} from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
export default class LoginError extends Component{
componentDidMount = () => {
setTimeout( () => this.props.clearLoginError(), 2000)
}
render(){
return(
<ReactCSSTransitionGroup ... |
import * as actions from './actions'
export default actions
export reducer from './reducer'
export withNotifications from './components/withNotifications'
export Notifications from './components/Notifications'
export * as actionTypes from './actionTypes'
|
// a.js includes b.js and c.js
// b.js includes c.js
function Annie() {
return 'A';
}
// This comment is added to test an issue
INCLUDE('b');
function Caitlyn() {
var c = INCLUDE('c');
return INCLUDE('c') + c;
}
exports.ABC = Annie() + Blitzcrank() + Caitlyn();
|
OnlineStatusModel = new Mongo.Collection('fisOnlineStatus');
OrbitActivitiesModel = new Mongo.Collection('fisOrbitActivities');
//security policies
if (Meteor.isServer) {
OnlineStatusModel.allow({
insert: function () {
return false;
},
update: function () {
return f... |
/**
* Created by Daniel on 2017-04-13.
*/
const jwt = require('jsonwebtoken');
const User = require('mongoose').model('User');
import config from '../config';
/**
* The Auth Checker middleware function.
*/
module.exports = (req, res, next) => {
if (!req.headers.authorization) {
return res.status(401).end()... |
import React from 'react';
import * as RB from 'react-bootstrap';
export default class Topic extends React.Component {
static propTypes = {
}
render() {
return (
<div>
<RB.Input type='text' value={this.props.topicName} onChange={this.props.handleTopicChange} />
<RB.Button onClick={this.... |
import map from 'lodash/map'
import React, { Component } from 'react'
import { Helmet } from 'react-helmet'
import LetterheadCard from '../components/LetterheadCard'
import letterheadData from '../data/letterheadData'
import { logPageView } from '../utils/analytics'
class Letterhead extends Component {
componentDidM... |
import {
default as expect,
} from "expect";
import * as event from "./google.maps.event.mock";
export class Map {
constructor (domEl, options) {
}
setOptions (nextOptions) {
}
setZoom (nextZoom) {
}
}
export {event}; |
var chating_enabled = false;
var drawing_enabled = false;
// Connect to the Node.js Server
io = io.connect('/office');
io.on('connect',function(data){
console.log("I guess that connection worked!");
/* Check if you can initialize the ChatingManager */
if(typeof ChatingManager == 'function')
{
cm = new ChatingM... |
// -----------------------------------------
// Backbone Multi-router
// Enables multiple independent routers which
// each match one or more routes.
//
// Author: Tim Griesser
// License: MIT
// -----------------------------------------
(function(root, factory) {
// Set up Backbone appropriately for the environmen... |
var grunt = require("grunt");
var loader = require("../lib/loader");
module.exports.loader = {
load: function (test) {
test.expect(8);
var part1 = loader.load("part1", "tests/parts/", grunt, {}),
part2 = loader.load("part2", "tests/parts/", grunt, {});
test.equal(part1.concat... |
//document.getElementById('wrap').style.height = (window.innerHeight) + "px";
$(document).ready(function() {
$('select').material_select();
$('.tooltipped').tooltip({delay: 50});
$('textarea#description, textarea#method').characterCounter();
$('.carousel').carousel();
});
$('.recipes').dropdown();
$('.dro... |
function layout() {
var menu = $('#layout_menu'),
menuToggle = $('#layout_menu_toggle'),
nav = $('body > main > nav'),
article = $('body > main > article'),
main = $('body > main'),
dropdowns = $('.dropdown');
menuToggle.click(function() {
menu.toggleClass('showing');
menuToggle.toggleClass... |
import welcomeRequest from './welcome'
export {
welcomeRequest
} |
(function(insight) {
/**
* The BarSeries is an abstract base class for columns and rows.
* @constructor
* @extends insight.Series
* @param {String} name - A uniquely identifying name for this series
* @param {insight.DataProvider | Object[]} data - An object which contains this series' dat... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
var request = require('request'),
fs = require('fs'),
filePath = 'articles.json',
previousMaxItem = JSON.parse(fs.readFileSync(filePath, 'utf8')).maxItem || 8453151,
maxItem;
request('https://hacker-news.firebaseio.com/v0/maxitem.json?print=pretty', function (error, response, body) {
if (!error && res... |
let john = "john";
console.log(john);
let bruh = "bruh";
console.log(bruh);
let singleton = num => num+1;
|
// --------- This code has been automatically generated !!! 2015-08-18T22:56:50.737Z
require("requirish")._(module);
var registerObject = require("lib/misc/factories").registerObject;
registerObject('SessionDiagnostics');
var SessionDiagnostics = require("_generated_/_auto_generated_SessionDiagnostics").SessionDiagnos... |
/* jshint expr:true */
import {expect} from 'chai'
import hbs from 'htmlbars-inline-precompile'
import {describe, it} from 'mocha'
import {integration} from 'dummy/tests/helpers/ember-test-utils/setup-component-test'
const test = integration('frost-viz/plot/element/symbol/star')
describe(test.label, function () {
t... |
'use strict';
var utils = exports;
var BN = require('../../../BN/bn');
utils.assert = function (condition, errorMessage) {
if (!condition) {
throw new Error(errorMessage)
}
};
// Represent num in a w-NAF form
function getNAF(num, w) {
var naf = [];
var ws = 1 << (w + 1);
var k = num.clone();
while (k... |
var _c = _c || {};
_c.app = _c.app || {};
_c.app.views = _c.app.views || {};
(function(views) {
"use strict";
views.ExplosionView = Backbone.View.extend({
initialize: function(options) {
_.bindAll(this,
'render',
'setConstants',
'initMembers... |
const delayEffect = (delay, effect) => {
return {
key: 'delayEffect',
params: { delay, effect }
};
};
const requireCharacter = (prop, status, effect) => {
return {
key: 'require',
params: { status, effect, prop }
};
};
const requireActorAndTarget = (statuses, effect) => {
return requireChara... |
angular.module("goRemote")
.directive('loadMore', ['', function(){
// Runs during compile
return {
scope: {},
require: '^PositionIndexController', // Array = multiple requires, ? = optional, ^ = check parent elements
restrict: 'A',
link: function($scope, iElm, iAttrs, controller) {
$scope.loadMore... |
'use strict';
/* Filters */
angular.module('myApp.filters', [])
.filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
};
}])
.filter('urlSlashEncode', function() { //$window
... |
/**
* @func !help
*
* @desc Help menus for commands & command categories
*/
const settings = require('../../settings.json');
const { getGuildCommandPrefix } = require('../../handlers/GuildSettings');
const splitVal = settings.helpMenu.split_value;
exports.help = {
name: 'help',
description: 'Displays all com... |
'use strict';
/**
* Pre defined Device Types
* @see https://github.com/SteelSeries/gamesense-sdk/blob/master/doc/api/standard-zones.md#device-types
* @enum {string}
*/
gamesense.DeviceType = {
/**
* Any connected, supported keyboard. Initially the Apex M800, Apex 300, MSI GE62, and MSI GE72.
*/
KE... |
/*
* grunt-po-json
*
*
* Copyright (c) 2014 Nicky Out
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>',
],
o... |
/* Remember: https://mochajs.org/#arrow-functions*/
import React from 'react';
import { mount, shallow } from 'enzyme';
import sinon from 'sinon';
import UtilsHelper from "helper/utilsHelper";
import App from 'App';
import Header from 'containers/Header';
import GithubLink from 'containers/GithubLink';
import ButtonBa... |
if(typeof exports === 'object') {
var assert = require("assert");
var alasql = require('..');
};
describe('Test 43', function() {
// describe('Dates', function(){
var db = new alasql.Database("test43");
it('Create database', function(done) {
// alasql('create database test43');
// alasql('use test43');
... |
import PropTypes from 'prop-types';
import React from 'react';
import { Image, ActivityIndicator, Platform } from 'react-native';
import RNFS, { DocumentDirectoryPath } from 'react-native-fs';
import ResponsiveImage from 'react-native-responsive-image';
// support RN 0.60
import NetInfo from "@react-native-community/n... |
const mongoose = require('mongoose');
let animeSchema = mongoose.Schema({
name: {type: 'string', required: 'true'},
description : {type: 'string', required: 'true'},
watched : {type: 'string', required: 'true'},
rating : {type: 'number', required: 'true'},
});
let Anime = mongoose.model('Anime', anime... |
// Karma configuration
// Generated on Thu Aug 21 2014 10:24:39 GMT+0200 (CEST)
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/... |
/*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.9.1 (2021-08-27)
*/
!function(){"use strict";var n=tinym... |
let moduleName = 'app.controllers';
import angular from 'angular';
import MenuController from './ui/menu/menu_controller';
import ToolbarController from './ui/toolbar/toolbar_controller';
import SidebarController from './ui/sidebar/sidebar_controller';
import FacebookController from './facebook/facebook_controller';
i... |
/**
* Original code from three.js project. https://github.com/mrdoob/three.js
* Original code published with the following license:
*
* The MIT License
*
* Copyright © 2010-2014 three.js authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associa... |
$(document).on("ready" ,function(){
listaTipologiaInversion();/*llamar a mi datatablet listar funcion*/
//abrir el modal para registrar
//REGISTARAR NUEVA tipologia inversion
$("#form-AddTipologiaInversion").submit(function(event)
{
event.preventDefault();
$.ajax(
{
url : b... |
/*
This is a debug tool. It checks all revisions for data corruption
*/
if(process.argv.length != 3)
{
console.error("Use: node checkPad.js $PADID");
process.exit(1);
}
//get the padID
var padId = process.argv[2];
//initalize the database
var log4js = require("log4js");
log4js.setGlobalLogLevel("INFO");
var asy... |
// import React from 'react';
// import ReactDOM from 'react-dom';
//
// import('./index.css')
var React = require('react');
var ReactDOM = require('react-dom');
require('./index.css');
var App = require('./components/App');
ReactDOM.render(
<App />,
document.getElementById('app')
);
|
describe(`Client only paths`, () => {
const routes = [
{
path: `/client-only-paths`,
marker: `index`,
label: `Index route`,
},
{
path: `/client-only-paths/page/profile`,
marker: `profile`,
label: `Dynamic route`,
},
{
path: `/client-only-paths/not-found`,
... |
define([
'jquery',
'underscore',
'backbone',
'app'
], function($, _, Backbone, LessonManager) {
Tile = Backbone.Model.extend({
idAttribute: '_id',
parse: function(response) {
//Server
this.set("_id", response._id);
return response;
},
defaults: ... |
define([
'views/view',
'views/track',
'tpl!templates/playlist.html',
'jquery-nestable'
],
function (View, TrackView, template) {
var Playlist = View.extend({
template: template,
initialize: function () {
this.listenTo(this.collection, 'add remove reset sort change:selected', this.render);
}... |
// Karma configuration
// Generated on Mon Feb 16 2015 22:26:59 GMT-0500 (Eastern Standard Time)
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://npm... |
M.block_course_contents={debug:false,init:function(Y){main=this;this.Y=Y;main.log('course_contents block Debug mode active');Y.all('.block_course_contents li.section-item').on('click',function(e){main.log('in onclick handler');if(!e.target.hasClass('expanded')){e.target.addClass('expanded')}else e.target.removeClass('e... |
'use strict';
const assert = require('assert');
const fs = require('fs');
const path = require('path');
const Promise = require('bluebird');
const del = require('del');
const render = require('../../lib/utils/render');
const { nunjucksEnv } = require('../../lib/utils/templates');
const readFile = Promise.promisify(... |
// 0: 成功
// 1---:参数错误
// 2---:服务错误
var _mokaError = {
//参数类
10100: '帐号格式有误',
10101: '手机格式有误',
10102: '邮箱格式有误',
10103: '密码长度必须大于等于6',
10200: '用户未登陆',
10201: '帐号未注册',
10202: '帐号已注册',
10203: '手机号码未注册',
10204: '手机号码已注册',
10205: '邮箱未注册',
10206: '邮箱已注册',
10207: '验证码错误... |
'use strict'
var path = require('path')
var test = require('tape')
var noop = require('./util/noop-processor')
var spy = require('./util/spy')
var engine = require('..')
var join = path.join
var fixtures = join(__dirname, 'fixtures')
test('settings', function(t) {
t.plan(2)
t.test('should use `settings`', func... |
/* Tabulator v4.9.1 (c) Oliver Folkerd */
var ReactiveData = function ReactiveData(table) {
this.table = table; //hold Tabulator object
this.data = false;
this.blocked = false; //block reactivity while performing update
this.origFuncs = {}; // hold original data array functions to allow replacement after data is d... |
/* @flow */
export const HASH_KEY = 'jfa^7uY(#)'
export const SECRET_KEY = 'nj&H8^0L'
|
const getReadableStream = require('./getReadableStream.js');
const getDuplexStream = require('./getDuplexStream.js');
function runBasicStreamTests(data, objData, runTest) {
if (data) {
it('works with a Readable stream', (done) => {
const readableStream = getReadableStream(data);
runTest(readableSt... |
/**
* Created by lab on 09/09/15.
*/
"use strict";
var app = angular.module("app", ['ngPapaParse', 'ui.select', 'ngSanitize', 'ngAnimate', 'ui.bootstrap', 'ui.bootstrap.collapse','ngOboe']);
app.service('neo4jQueryBuilder', [function() {
return function(queryObject) {
var api = {
getDomains: ge... |
/**
* React Router DOM v6.0.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ?... |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.1 (2021-05-20)
*/
(function () {
'use strict';
... |
const registry = new Map();
function register(className, factory) {
registry.set(className, factory);
return className;
}
function resolve(rule, context) {
const factory = registry.get(rule.n);
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
retu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.