code stringlengths 2 1.05M |
|---|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = R... |
/**
* @fileOverview first_run.js shows the necessary navigation and
* design elements to be integrated into the privly-applications
* bundle.
*/
/**
* Initialize the applications by showing and hiding the proper
* elements.
*/
var callbacks = {
/**
* Submit the registration form and await the return of th... |
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var configuration = require('../configuration.js');
gulp.task('watch', function() {
var server = livereload();
var reload = function(file) {
livereload.changed(file.path);
};
gulp.watch(configuration.vendor.scripts + '/**', ... |
function Upload(id, options){
console.log(options)
if (!(window.File && window.FileReader && window.FileList && window.Blob)) return false;
var $input = document.querySelector(id);
var self = this;
var pid, reader, cancelled, paused, start_time, file, file_index = 0, start_file_index;
var block_size = 1048... |
// output consumer
'use strict';
var buffers = require ('stream-buffers');
/**
* output consumer constructor
* this consumes the strings that compose the final result
* @param bufferParams stream buffer params, see stream-buffers docs
* @constructor
*/
function Consumer (bufferParams) {
this.bufferParams = buff... |
'use strict';
var XML = require('utils/xml');
var tempoTotalEstimado = function (tempoEstimado) {
var limite;
if (tempoEstimado.tipo() === 'entre') {
limite = m('entre', {
min: tempoEstimado.entreMinimo(),
max: tempoEstimado.entreMaximo(),
unidade: tempoEstimado.entreTipoMaximo()
});
... |
import tracer from 'tracer'
const logger = tracer.console({
format: '{{timestamp}} <{{title}}> {{message}}',
dateformat: 'HH:MM:ss.L',
})
export default logger
|
'use strict';
/**
* Plot sequences as rows of rectangles.
* @constructor
*/
var SequenceVisualizer = function() {
/** Margins of plot are to the view boundaries
* @const */
this.margins = [
[40, 0],
[0, 20]
];
/** Rendering states */
this.zoom = null;
this.zoomTranslate = [0, 0];
this.zoo... |
/**
* COMMON WEBPACK CONFIGURATION
*/
const path = require('path');
const webpack = require('webpack');
module.exports = (options) => ({
entry: options.entry,
output: Object.assign({ // Compile into js/build.js
path: path.resolve(process.cwd(), 'build'),
publicPath: '/',
}, options.output), // Merge w... |
import React from 'react';
import ResumeStyles from './../../styles/resume';
export default React.createClass({
render() {
return (
<header className="main-header">
<ul id="navMenu" className="site-nav">
<li data-menuanchor="about-me">
<a className="nav-link" href="#ab... |
import React from 'react';
import { graphql } from 'gatsby';
import Layout from '../components/Layout';
import Sidebar from '../components/Sidebar';
import Feed from '../components/Feed';
import Page from '../components/Page';
import Pagination from '../components/Pagination';
const IndexTemplate = ({ data, pageContex... |
// Agency Theme JavaScript
(function($) {
"use strict"; // Start of use strict
// jQuery for page scrolling feature - requires jQuery Easing plugin
$(document).on('click', 'a.page-scroll', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($... |
import Vue from 'vue';
import Router from 'vue-router';
import { routes } from '../app';
Vue.use(Router);
export default new Router({
mode: 'hash',
routes: routes
});
|
/**
* Account Manager System (https://github.com/PsyduckMans/accountmanager)
*
* @link https://github.com/PsyduckMans/accountmanager for the canonical source repository
* @copyright Copyright (c) 2014 PsyduckMans (https://ninth.not-bad.org)
* @license https://github.com/PsyduckMans/accountmanager/blob/maste... |
export const arrowUp = {"viewBox":"0 0 10 16","children":[{"name":"path","attribs":{"fill-rule":"evenodd","d":"M5 3L0 9h3v4h4V9h3L5 3z"},"children":[]}],"attribs":{}}; |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z" />
, 'PhotoOutlined');
|
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {ReactProviderType, ReactContext} from 'shared/ReactTypes';
import type {LazyComponent as LazyComponentTyp... |
oc = oc || {};
oc.activity = oc.activity || {};
var $globalActivity;
var $userActivity;
$(document).ready(function() {
$globalActivity = $('#global-activity');
$userActivity = $('#user-activity');
if ($globalActivity.length > 0) {
oc.activity.loadGlobalActivity($globalActivity);
}
... |
//Overloaded Handlebars
Handlebars = require('handlebars'),
Handlebars.registerHelper('toUpperCase', function(str) {
return str.toUpperCase();
});
Handlebars.registerHelper('toLowerCase', function(str) {
return str.toLowerCase();
});
Handlebars.registerHelper('lineBreakToBr', function(str) {
return str.repla... |
import find from 'lodash/find';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import includes from 'lodash/includes';
import padStart from 'lodash/padStart';
import escape from 'lodash/escape';
import moment from 'moment';
import { Helpers } from 'sonos';
import SonosService from '../services/So... |
module.exports = {
root: true,
env: {
node: true
},
extends: './lib/index.js'
};
|
import React, {Component} from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types'
import 'bootstrap/dist/css/bootstrap.css';
import Header from '../header';
import Footer from '../footer';
import SupportForm from './SupportForm';
import { moreInfo } from '../../action';
import styles f... |
// a fairly complex CLI defined using the yargs 3.0 API:
var argv = require('yargs/yargs')(process.argv.slice(2))
.usage('Usage: $0 <cmd> [options]') // usage string of application.
.command('install', 'install a package (name@version)') // describe commands available.
.command('publish', 'publish the package ins... |
// import assign from 'lodash/assign';
import generateConstants from 'utils/asyncSagaConstants';
const fournisseurConst = generateConstants('app/Fournisseur', 'load_fournisseur');
export default fournisseurConst;
|
module.exports = function (module, extended, config) {
"use strict";
let async = require('async');
let error = require('./error.js')({'module': module, 'extends': extended});
if (typeof config !== 'object' || !config) return;
let code = require('../../code');
let scoped = function (code) {
... |
import TilemapPlus from "./tilemap-plus/TilemapPlus";
import TilemapLayerPlus from "./tilemap-plus/TilemapLayerPlus";
import TilesetPlus from "./tilemap-plus/TilesetPlus";
import SpritePlus from "./tilemap-plus/SpritePlus";
Phaser.Plugin.TilemapPlus = function (game, parent) {
Phaser.Plugin.call(this, game, par... |
export { default } from './me-page';
|
/**
* File: detailedCard.js
*
* This file allows the detailed item display to open and close
*
* Version 1
* Authors: Sarah Murphy
*/
// Get the elements
var menuModal = document.getElementById('detailedMenuModal');
var span = document.getElementsByClassName("closeModal")[0];
// When the user clicks on x, clos... |
/*global casper*/
/*jshint strict:false*/
var fs = require('fs'), testFile = '/tmp/__casper_test_capture.png';
if (fs.exists(testFile) && fs.isFile(testFile)) {
fs.remove(testFile);
}
casper.start('tests/site/index.html', function() {
this.viewport(300, 200);
this.test.comment('Casper.capture()');
thi... |
/* globals $ */
$().ready(() => {
$('#userSignUpForm').validate({
rules: {
username: {
required: true,
minlength: 2,
maxlength: 15,
regx: /^[a-zA-Z0-9_\\.]+$/
},
email: {
required: true,
... |
/* ========================================================================
* Bootstrap: tooltip.js v3.4.0
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2018 Twitter, I... |
'use strict';
/**
* FUNCTION: qmean( arr, clbk )
* Computes the quadratic mean of an array using an accessor function.
*
* @param {Array} arr - input array
* @param {Function} clbk - accessor function for accessing array values
* @returns {Number|Null} quadratic mean or null
*/
function qmean( arr, clbk ) {
var len =... |
(function (ns) {
'use strict';
ns.models.RmIssueModel = function () {
return {
system: undefined, //inject
restClient: undefined,
rmProjectModel: undefined,
rmUserModel: undefined,
dataService: undefined,
configUtils: undefined,
... |
'use strict';
var AssetPathService = function () {
return ''; // '/android_asset/www/';
};
module.exports = AssetPathService; |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Contact Schema
*/
var ContactSchema = new Schema({
username: {
type: String,
required: true,
trim: true
},
email: {
type: String,
required: true,... |
$(function(){
$("#close").click(function(){
$('#imgs').hide();
});
}) |
/*! jQuery UI - v1.10.3 - 2013-09-23
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
jQuery(function(t){t.datepicker.regional.he={closeText:"סגור",prevText:"<הקודם",nextText:"הבא>",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יול... |
import { unprotect } from 'mobx-state-tree';
import { Stores, itemPost60, itemCat7 } from '../mocks';
let stores;
beforeEach(() => {
stores = Stores.create({});
unprotect(stores);
});
describe('Analytics > GoogleAnalytics', () => {
test('sendPageView', () => {
window.ga = jest.fn();
stores.connection.s... |
var Guides = require('../src/modules/Guides');
describe("Guides class tests", function() {
var $element = $('<div>Test</div>', {position: 'fixed'}).appendTo('body'),
guides;
$element.width(window.innerWidth);
$element.height(20);
$element.offset({top: 0, left: 0});
beforeEach(... |
import { expect } from 'chai';
import * as helpers from './helpers';
import * as funcs from './ch2-q3';
for (let key in funcs) {
let func = funcs[key];
describe('ch2-q3: ' + key, function() {
it('throws an error if node is invalid', function() {
expect(() => func(null)).to.throw('invalid node');
... |
/* */
(function(process) {
'use strict';
var version = require('../package.json!systemjs-json').version,
tmplNew = require('../dist/tmpl').tmpl,
tmpl22 = require('./v223/tmpl223').tmpl;
var data = {
num: 1,
str: 'string',
date: new Date(),
bool: true,
item: null
},
tmplLis... |
/*!
* devextreme-angular
* Version: 16.2.5
* Build date: Tue Feb 28 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://git... |
/**
* Native String.prototype.trimStart method with fallback to String.prototype.trimLeft
* Edge doesn't support the first one
* @param {string} string - input string
* @returns {string} trimmed output
*/
export default function trimStart(string) {
return (string.trimStart || string.trimLeft).apply(string)
} |
'use strict';
var url = require('url');
var Tag = require('./TagService');
module.exports.tagGET = function tagGET (req, res, next) {
Tag.tagGET(req.swagger.params, res, next);
};
module.exports.tagIdDELETE = function tagIdDELETE (req, res, next) {
Tag.tagIdDELETE(req.swagger.params, res, next);
};
module.expo... |
var searchData=
[
['parameters',['Parameters',['../class_excimontec_1_1_parameters.html',1,'Excimontec']]],
['parameters_5flattice',['Parameters_Lattice',['../class_k_m_c___lattice_1_1_parameters___lattice.html',1,'KMC_Lattice']]],
['parameters_5fsimulation',['Parameters_Simulation',['../class_k_m_c___lattice_1_1... |
(function () {
'use strict';
// Roles controller
angular
.module('roles')
.controller('RolesController', RolesController);
RolesController.$inject = ['$scope', '$state', '$window', 'Authentication', 'roleResolve'];
function RolesController ($scope, $state, $window, Authentication, role) {
var v... |
uiFormModule.directive('uiFormInputText', ['$compile', 'uiFormService', 'uiFormValidationService', function($compile, uiFormService, uiFormValidationService){
return {
restrict: 'E',
transclude: false,
replace: true,
require: '^form',
scope: {
elementName: '@?',
label: '=?',
config: '=?',
... |
// Game Format Style
{
"id": Parse.Object.Game.id
"title": String,
"owner": Parse.User.id,
"status": String, // "preGame", "active", "completed"
"players": [
Parse.User.id
],
"mapId": Parse.Object.Map.id,
"settings": Object({
turnLength: Number, // time for each player to submit orders
supplyToWin: Numb... |
//Ce dialog est destiné à fonctionner avec tiny-mce
//il ne recoit pas en input un conceptual-image, ni un concrete-image
//il recoit l'url de l'image et fait un appel à l'api pour obtenir l'information nécessaire
//en ce sens, il devrait peut-être être renommé (on pourrait éventullement avoir un vrai concrete-image-di... |
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
"file": "plugins/org.apache.cordova.device/www/device.js",
"id": "org.apache.cordova.device.device",
"clobbers": [
"device"
]
},
{
"file": "plugins/org.apache.c... |
import "../../define/PullToRefresh.js";
import {
defaultState,
firstRender,
ids,
render,
setState,
state,
template,
} from "../../src/base/internal.js";
import { updateChildNodes } from "../../src/core/dom.js";
import { templateFrom } from "../../src/core/htmlLiterals.js";
import ReactiveElement from "../... |
(function() {
'use strict';
angular
.module('canvas')
.factory('dpCanvasTool', dpCanvasTool);
dpCanvasTool.$inject = ['$rootScope', 'dpPaperScope', 'dpCanvas', 'dpCanvasConfig', 'dpCanvasFrames'];
/* @ngInject */
function dpCanvasTool($rootScope, dpPaperScope, dpCanvas, dpCanvasConfig, dpCanvasFram... |
/**
* Author: Umayr Shahid <umayrr@hotmail.co.uk>,
* Created: 05:43, 09/03/15.
*/
'use strict';
module.exports = require('./classes/uranus');
|
/**
* Test sagas
*/
import expect from 'expect';
// import { take, call, put, select } from 'redux-saga/effects';
// import { defaultSaga } from '../sagas';
// const generator = defaultSaga();
describe('defaultSaga Saga', () => {
expect(true).toEqual(true);
});
|
// Require mongoose
var mongoose = require('mongoose');
// Configure conenction URL (only needs to happen once per app)
mongoose.connect('mongodb://admin:admin@ds031203.mongolab.com:31203/node-workshop');
// Create a database schema for our Post object, which will describe both it's
// data and it's behavior.
var pos... |
define(['jquery','datepicker'], function (jQuery) {
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
jQuery(function($){
$.datepicker.regional['el'] = {
closeText: 'Κλείσιμο',
prevText: 'Προηγούμενος',
nextText: 'Επόμενος',
current... |
'use strict';
import React from 'react';
import LaddaButton from 'react-ladda';
import ReactTagsInput from 'react-tagsinput';
import {Grid, Row, Col} from 'react-bootstrap';
import {Map} from 'immutable';
import Component from '../components/component.react';
import Tag from '../tags/tag';
import {search as tagsAction... |
var
/** async flow lib */
$q = require('q'),
/** http request library */
request = require('superagent'),
/** server utilities / helper fns */
util = require('../lib/util');
/* ==========================================================================
Request - Class for making HTTP requests
=========... |
'use strict';
module.exports = function()
{
if (!this.paused)
return;
this.paused = false;
if (this.stopedAtTimeStamp)
{
this.previousStepTimeStamp = Date.now() - (this.stopedAtTimeStamp - this.previousStepTimeStamp);
this.stopedAtTimeStamp = null;
}
var speed = this.speed || 5000;
var step... |
/**
* ConfigItem Model
**/
angular.module('mNodeView').factory('ConfigItem', function(){
function ConfigItem(id, val){
/* {string} Config id (e.g. hdfs-site) */
this.id = id;
/* {string} value */
this.val = val;
/* {int} status Diff status
1.Equal (val equal)
... |
var chai = require('chai');
var expect = chai.expect;
var config = require('../config');
var path = require('path');
var utils = require('../../dist/utils/parse');
describe('utils/parse', () => {
describe('getFiles', () => {
it('should retrieve a file list from a glob', () => {
var glob = config.fixturePat... |
/*!
* jQuery Upload File Plugin
* version: 3.1.10
* @requires jQuery v1.5 or later & form plugin
* Copyright (c) 2013 Ravishanker Kusuma
* http://hayageek.com/
*
* Adapt by Chien-Yueh Lee (kinomoto@sakura.idv.tw)
*/
(function ($) {
//if($.fn.ajaxForm == undefined) {
// $.getScript(("https:" == docume... |
'use strict';
import { getDB } from './jsonDB';
import { stringToArray, getSorter, urlToId, loadJsonFile } from '../tools/functions';
import {
getFilterbyNameMixin,
getFilterbyClassificationMixin,
getFilterbyDesignationMixin
} from './dbMixin';
export default async function load() {
const sorter = getSorter('name... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LEVEL_ENUM = exports.TIME_PERIOD_ENUM = exports.RESERVED_WORDS_ENUM = void 0;
exports.RESERVED_WORDS_ENUM = {
defaction: true,
function: true,
return: true,
not: true,
setting: true,
null: true,
true: true,
... |
'use strict';
module.exports = require('ridge/collection').extend({
model: require('../models/region'),
url: '/api/regions'
});
|
/**
* Module dependencies.
*/
var express = require('express'),
routes = require('./routes'),
domain = require('./routes/domain'),
engines = require('consolidate'),
http = require('http'),
path = require('path');
var app = express();
app.disable('x-powered-by');
app.engine('hbs', engines.handlebars);
a... |
Dagaz.Controller.persistense = "session";
Dagaz.Model.WIDTH = 5;
Dagaz.Model.HEIGHT = 5;
Dagaz.AI.FLAGS = 0xE0;
ZRF = {
JUMP: 0,
IF: 1,
FORK: 2,
FUNCTION: 3,
IN_ZONE: 4,
FLAG: 5,
SET_FLAG: 6,
POS_FLAG: 7,
... |
import React from 'react';
import { storiesOf } from '@storybook/react-native';
import FlexedView from '@ui/FlexedView';
import TaggedContent from './';
storiesOf('TaggedContent', module)
.add('group stories', () => (
<FlexedView>
<TaggedContent tagName="community" sectionTitle="You can't do life alone" /... |
/*!
* Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.
*/
/* eslint-disable indent */
import {assert} from '@ciscospark/test-helper-chai';
import {createBrowser} from '@ciscospark/test-helper-automation';
import testUsers from '@ciscospark/test-helper-test-users';
import pkg from '../../../package';
c... |
'use strict';module.exports = function(css){var TokenType=require('../token-types');var tokens=[],urlMode=false,blockMode=0,c, // current character
cn, // next character
pos=0,tn=0,ln=1,col=1;var Punctuation={' ':TokenType.Space,'\n':TokenType.Newline,'\r':TokenType.Newline,'\t':TokenType.Tab,'!':TokenType.ExclamationM... |
/**
* The Initial Developer of the Original Code is
* Tarmo Alexander Sundström <ta@sundstrom.io>
*
* Portions created by the Initial Developer are
* Copyright (C) 2014 Tarmo Alexander Sundström <ta@sundstrom.io>
*
* All Rights Reserved.
*
* Contributor(s):
*
* Permission is hereby granted, free of charge, t... |
import $ from "jqmin";
import Autocomplete from "@AX6UI/AX6UIAutocomplete";
import "@AX6UI/AX6UIAutocomplete/style.scss";
let html = `
<div class="row">
<div class="input-field col s12">
<div data-ax6ui-autocomplete="ac1" data-ax6ui-autocomplete-config='{}'></div>
</div>
</div>
`;
let fn = {
moduleRu... |
/* eslint-env mocha */
import Path from './Path'
import assert from 'assert'
describe('primitives', () => {
it('should initiate correctly', () => {
const payload = {
foo: 'bar',
}
const path = new Path('path', payload)
assert.ok(path instanceof Path)
assert.strictEqual(path.path, 'path')
... |
describe('Bases Loaded controllers', function () {
describe('VotingFormCtrl', function () {
var scope, $httpBackend;
beforeEach(module('basesloaded'));
beforeEach(inject(function(_$httpBackend_, $rootScope, $controller) {
$httpBackend = _$httpBackend_;
$httpBackend.... |
import gulp from 'gulp'
import htmlmin from 'gulp-htmlmin'
import uglify from 'gulp-uglify'
import runSequence from 'run-sequence'
gulp.task('minify-html', () => {
return gulp.src('html/**/*.html')
.pipe(htmlmin({
collapseWhitespace: true,
minifyCSS: true,
minifyJS: true,
removeComments: ... |
'use strict'
//Pass in path to root directory
//returns object representation with all directories and files
//directory properties have property structure
//path: STRING, files: ARRAY, opened: BOOL (default false), type:STRING
//file properties have property structure
//path:STRING, type:STRING
//separate out the pro... |
/**
@module ember
@submodule ember-testing
*/
import { checkWaiters } from '../test/waiters';
import RSVP from 'ember-runtime/ext/rsvp';
import run from 'ember-metal/run_loop';
import { pendingRequests } from '../test/pending_requests';
/**
Causes the run loop to process any pending events. This is used to ensure th... |
define(['./transpiled/BootstrapMixin'], function (BootstrapMixin) {
return BootstrapMixin.default;
}) |
const m = require('mithril');
const Component = require('../../core/Component');
class SocialLink extends Component {
view(vnode) {
return m('li.social-link', [
m('a', {
href: vnode.attrs.url,
target: "_blank"
}, [
m('i', { class: "fa... |
/**
* container组件
*/
import React from 'react';
/**
* Usage:
* import {Container} from 'chameleon';
*
* React.createClass({
* render() {
* return (
* <Container>
* </Container>
* );
* }
* });
*/
export default React.createClass({
getDefaultProps() {
return {
fluid: f... |
import constants from './constants';
const keys = constants.taskKeys;
export default ({ hasServer, hasClient, hasPackages }) => {
const tasks = [{
/* Lint server code and build all Server artifacts to dist/ folder */
key: keys.buildServer,
dependencies: [
keys.createEnvSettings,
keys.creat... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" />
, 'CodeOutlined');
|
(function () {
'use strict';
describe('Employeeprofiles Controller Tests', function () {
// Initialize global variables
var EmployeeprofilesController,
$scope,
$httpBackend,
$state,
Authentication,
EmployeeprofilesService,
mockEmployeeprofile;
// The $resource servi... |
define(['app', 'Backbone', 'dom'], function(app, Backbone, $) {
return Backbone.View.extend({
tagName: 'article',
className: 'issueList table',
build: function() {
return this;
},
render: function() {
return this;
}
});
});
|
'use strict';
const fs = require('fs');
const chalk = require('chalk');
const util = require('../util');
/**
* The config object sets and gets the ./config/config.json
* file locally and remotely. This file is used to ensure
* we always know the URL for the remote docs, in case it
* changes in the future.
*
* I... |
/*
* Created by orion on 12-06-15.
*/
'use strict';
angular.module('myApp.util', [])
.service('Util', function Util() {
this.stripAfterSlash = function(s) {
var pos = s.lastIndexOf('/');
if (pos === -1 || pos === s.length - 1) {
return s;
}
... |
import 'babel-polyfill';
import React from 'react';
import {render} from 'react-dom';
import {Provider} from 'react-redux';
import {Router, hashHistory} from 'react-router';
import {syncHistoryWithStore} from 'react-router-redux';
import routes from './routes';
import configureStore from './store/configureStore';
impor... |
/* React */
import { render, unmountComponentAtNode } from 'react-dom'
import Rtu from 'react-dom/test-utils'
import React from 'react'
/* Components to test */
import Element from '../components/Element.js';
import Link from '../components/Link.js';
import events from '../mixins/scroll-events.js';
/* Test */
import ex... |
import Ember from 'ember';
export function formatDate(params, hash) {
return { params, hash };
}
export default Ember.Helper.helper(formatDate);
|
export const FRAME_TYPE_NORMAL = 'normal';
export const FRAME_TYPE_STRIKE = 'strike';
export const FRAME_TYPE_SPARE = 'spare';
function detectType(roll1, roll2) {
if (roll1 + roll2 > 10) {
throw new Error('Invalid frame roll total');
}
if (roll1 == 10) {
return FRAME_TYPE_STRIKE;
}
if (roll1 + roll2 ... |
import React, { Component } from 'react';
import reactMixin from 'react-mixin';
import {handleForms} from '../../components/Forms/FormDecorator';
import UserForms from '../../components/Users/UserForms.js';
import styles from './forgotReset.css';
@handleForms
export default class ForgotPasswordRoute extends React.Comp... |
/** 页面组件出口 **/
// 项目公共样式
import './style.less'
// 导入页面组件
import Home from './Home/Home.jsx'
import Counter from './Counter/Counter.jsx'
import RouterDemo from './RouterDemo/RouterDemo.jsx'
import NotFoundPage from './NotFoundPage/NotFoundPage.jsx'
import Md5 from './Md5/Md5.jsx'
import Bodymovin from './Bodymovin/Body... |
if (typeof define !== 'function') {var define = require('amdefine')(module)}
/**
* @module smpl
* @submodule smpl.dom
* @class smpl.dom
* @static
*/
define(['./smpl.core'], function(smpl) {
smpl.dom = {};
/**
* Test if a `HTMLElement` as a given class
*
* @method hasClass
*
* @param {HTMLElement} el... |
const makeConfig = require('./webpack/build');
const webpack = require('webpack');
const rimraf = require('rimraf');
const path = require('path');
const ALLOWED_MODES = {
DEBUG: false,
DIST: true,
PROD: true,
};
const BUILD_MODE = process.env.MODE;
if (!(BUILD_MODE && ALLOWED_MODES[BUILD_MODE])) {
console.log... |
class x509enrollment_cx509attribute_1 {
constructor() {
// string RawData (EncodingType) {get}
this.Parameterized = undefined;
// IObjectId ObjectId () {get}
this.ObjectId = undefined;
}
// void Initialize (IObjectId, EncodingType, string)
Initialize(IObjectId, Encodin... |
function User() {
this.render();
this.a1();
}
User.prototype = {
render: function () {
var config = this.a1();
var data = this.a2();
document.body.innerHTML = 'template + ' + JSON.stringify(data);
},
a1: function () {
console.log('a1');
},
a2: function () {
... |
/**
* Created by ovolodin on 12.05.2017.
*/
describe('userList', function() {
// Load the module that contains the `phoneList` component before each test
beforeEach(module('usersApp'));
beforeEach(module('userList'));
// Test the controller
describe('UserListController', function() {
var... |
/**
* @fileoverview Tests for no-empty-label rule.
* @author Ilya Volodin
*/
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var eslintTester = require("../../../lib/tests/eslintTester"... |
jQuery.extend({
handleError: function( s, xhr, status, e ) {
// If a local callback was specified, fire it
if ( s.error ) {
s.error.call( s.context || s, xhr, status, e );
}
// Fire the global callback
if ( s.global ) {
(s.context ? jQue... |
var TH = TH || {};
TH.players = (function() {
return {
players: {},
init : function() {
this.createMainPlayer();
this.startPlayerPolling();
},
createMainPlayer: function() {
this.players.red = new TH.MainPlayer();
this.players.red.as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.