code stringlengths 2 1.05M | repo_name stringlengths 5 114 | path stringlengths 4 991 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var appList = ['./app/index.tsx'];
if(process.env.NODE_ENV === 'development') {
appList.unshift('webpack/hot/only-dev-server');
}
var c... | janaagaard75/framework-investigations | old-or-not-typescript/learn-redux/react-redux-counter/webpack.config.js | JavaScript | unlicense | 1,059 |
var GamesList = React.createClass({
getInitialState: function() {
return {
games: this.props.initialGames
};
},
scoreChanged: function(gameId, teamNumber, score) {
var game = this.state.games.filter(function(game) {
return game.id == gameId;
})[0];
game['pool_entry_' + teamNumber + '_score'] = score;... | austinhaws/custom-bracket | public/js/views/bracket-round.js | JavaScript | unlicense | 2,838 |
var bcrypt = require('bcrypt-nodejs');
var crypto = require('crypto');
var mongoose = require('mongoose');
var userSchema = new mongoose.Schema({
email: { type: String, unique: true, lowercase: true },
password: String,
facebook: String,
twitter: String,
google: String,
github: String,
instagram: String... | guilhermeasg/outspeak | models/User.js | JavaScript | unlicense | 2,102 |
define([
'app',
'collections/tables',
'collections/connections',
'collections/rdf-entities',
'collections/rdf-attributes',
'models/connection',
'models/table',
'views/abstract/base',
'views/shared/message-dialog',
'views/editor/connection-form',
'views/editor/rdf-entity-list',
'views/editor/... | ilucin/relsem-bridge-frontend | app/views/editor/editor.js | JavaScript | unlicense | 9,433 |
var User = {
title : 'Customer',
LoginTitleText : 'Register yourself'
}
module.exports = User; | thakurarun/Basic-nodejs-express-app | samplenode/samplenode/server/model/User.js | JavaScript | unlicense | 104 |
var path = require('path')
var fs = require('fs')
var crypto = require('crypto')
var dirmatch = require('dirmatch')
var _ = require('underscore')
var handlebars = require('handlebars')
var Filter = require('broccoli-glob-filter')
var makePartialName = function(partialPath) {
var name = partialPath
var ext = path.ex... | sunflowerdeath/broccoli-render-handlebars | index.js | JavaScript | unlicense | 2,724 |
var express = require('express'),
app = express();
app.use('/', express.static(__dirname + '/static'));
app.listen(process.env.PORT || 8080);
| Hardmath123/quackoverflow | index.js | JavaScript | unlicense | 147 |
// Karma configuration
// Generated on Mon Mar 16 2015 13:42:33 GMT-0600 (MDT)
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... | ICT4H/dcs-enketo-core | test/karma.conf.js | JavaScript | apache-2.0 | 3,479 |
var currPageIndex = 0;
app.initialize();
$(document).ready(function () {
//$('.appV').html('v1.17');
//onDocumentReady();
setMenu();
toggleMenu();
});
function onDocumentReady() {
SetPagesList();
setBackground();
runPinchzoom();
turnPages(currPageIndex);
setPep();
//chan... | Webnology-/cookbook2013VeryLast | www/js/javascript.js | JavaScript | apache-2.0 | 18,944 |
export { default } from 'ember-table-filterable/components/table-filterable'; | clairton/ember-table-filterable | app/components/table-filterable.js | JavaScript | apache-2.0 | 77 |
import endsWith from 'lodash/endsWith';
import startsWith from 'lodash/startsWith';
import trim from 'lodash/trim';
const VALID_SLUG_PATTERN = /^([a-z0-9]-?)*[a-z0-9]$/;
const VALID_DATED_SLUG_PATTERN = /^([a-z0-9-]|[a-z0-9-][a-z0-9-/]*[a-z0-9-])$/;
/**
* Returns true if the provided value is a slug.
*
* @param {s... | gdbots/common-js | src/isValidSlug.js | JavaScript | apache-2.0 | 767 |
/**
* Copyright 2014 Shape Security, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | shapesecurity/shift-parser-js | src/tokenizer.js | JavaScript | apache-2.0 | 46,755 |
import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { mount } from 'enzyme';
// eslint-disable-next-line import/no-extraneous-dependencies
import { FacetedSearchIcon } from './FacetedSearchIcon.component';
import getDefaultT from '../../translate';
const t = getDefaultT();
... | Talend/ui | packages/faceted-search/src/components/FacetedSearchIcon/FacetedSearchIcon.component.test.js | JavaScript | apache-2.0 | 1,710 |
var _ = require('underscore');
var vcr = require('nock-vcr-recorder-mocha');
var Sdk = require('./../../../lib/clc-sdk.js');
var compute = new Sdk('cloud_user', 'cloud_user_password').computeServices();
var assert = require('assert');
var ServerBuilder = require('./../server-builder.js');
vcr.describe('Create server ... | CenturyLinkCloud/clc-node-sdk | test/compute-services/servers/create-server-test.js | JavaScript | apache-2.0 | 2,709 |
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... | Digaku/closure-library | closure/goog/net/tmpnetwork.js | JavaScript | apache-2.0 | 4,070 |
/**
* Created by chensheng on 15/8/3.
*/
'use strict';
(function (ns) {
ns.Publisher = tp.view.Loader.extend({
events: {
'change [name=publisher_type]': 'publisherType_changeHandler',
'change [name=province]': 'province_changeHandler'
},
initialize: function (options) {
tp.view.Loader.... | RyanTech/admin-v5 | js/page/Publisher.js | JavaScript | apache-2.0 | 1,341 |
/*
* File: app/controller/footerController.js
*/
Ext.define('webapp.controller.footerController', {
extend: 'Ext.app.Controller',
refs: {
footerLabel2: '#footerLabel2'
},
onLaunch: function() {
/**
* address Label click event를 catch 하도록 설정
*/
this.getFooter... | OpenSourceConsulting/athena-meerkat | console/app/controller/footerController.js | JavaScript | apache-2.0 | 1,951 |
$.STRATUS = function (){
var _init = function () {
$('#logout').click(_logout)
};
var _logout = function (event) {
event.preventDefault();
// Workaround to logout user
// As HTTP is state-less there is no cross-browser clean way to do
$.get(location.href.replace('://', '://x-pdisk-logout@'));
};
re... | StratusLab/storage | pdisk-server/war/src/main/webapp/media/js/stratuslab.js | JavaScript | apache-2.0 | 387 |
/*!
* ${copyright}
*/
sap.ui.define([
"sap/ui/test/_OpaLogger",
"sap/ui/base/ManagedObject"
], function (_OpaLogger, ManagedObject) {
"use strict";
/**
* @class Matchers for Opa5 - needs to implement an isMatching function that returns a boolean and will get a control instance as parameter
* @abstract
* @... | SAP/openui5 | src/sap.ui.core/src/sap/ui/test/matchers/Matcher.js | JavaScript | apache-2.0 | 1,818 |
var CaoTest = CaoTest || {}
//把一个对象的自有属性copy到一个新的对象里 浅克隆
CaoTest.clone = function {
objClone = {};
each(obj, function(value, key) {
if (obj.hasOwnProperty(key)) objClone[key] = value;
});
return objClone;
} | jcto/DBWeb | utils/clone.js | JavaScript | apache-2.0 | 255 |
/* @flow strict-local */
import { addBreadcrumb } from '@sentry/react-native';
import type { Narrow, Stream, User } from '../types';
import { topicNarrow, streamNarrow, groupNarrow, specialNarrow } from './narrow';
import { isUrlOnRealm } from './url';
const getPathsFromUrl = (url: string = '', realm: string) => {
c... | vishwesh3/zulip-mobile | src/utils/internalLinks.js | JavaScript | apache-2.0 | 4,379 |
// (C) Copyright 2014 Hewlett Packard Enterprise Development LP
import React, { Component, PropTypes } from 'react';
import FormattedMessage from './FormattedMessage';
const CLASS_ROOT = "legend";
export default class Legend extends Component {
constructor(props) {
super(props);
this._onActive = this._on... | samogami/grommet | src/js/components/Legend.js | JavaScript | apache-2.0 | 3,868 |
const
db = require('./db')
;
let schema = new db.Schema({
owner: { type: String, indexed: true, required: true }, // user.id
name: { type: String, required: true },
path: { type: String, unique: true, required: true },
info: db.Schema.Types.Mixed,
content: db.Schema.Types.Mixed
}, { timestamps: db.timestam... | arthurmilliken/gateway | models/resource.js | JavaScript | apache-2.0 | 374 |
/*jshint browser: true */
/*jshint unused: false */
/*global arangoHelper, _, $, window, arangoHelper, templateEngine, Joi, btoa */
(function() {
"use strict";
window.DocumentsView = window.PaginationView.extend({
filters : { "0" : true },
filterId : 0,
paginationDiv : "#documentsToolbarF",
idPrefi... | abaditsegay/arangodb | js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js | JavaScript | apache-2.0 | 35,454 |
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import uiModal from 'angular-ui-bootstrap/src/modal';
import forcegraphComponent from './forcegraph.component';
let forcegraphModule = angular.module('forcegraph', [
uiRouter,
uiModal
])
.config(($stateProvider) => {
"ngInject";
$statePr... | garrettwong/GDashboard | client/app/components/d3visualizations/forcegraph/forcegraph.js | JavaScript | apache-2.0 | 510 |
/**
* class for student
*/
'use strict'
const util = require('util')
const Person = require('./person');
function Student() {
Person.call(this);
}
// student继承自person
util.inherits(Student, Person);
Student.prototype.study = function() {
console.log('i am learning...');
};
module.exports = Student; | EvanDylan/node | base/mods/inhertis/student.js | JavaScript | apache-2.0 | 318 |
import * as Preact from '#preact';
import {boolean, number, select, withKnobs} from '@storybook/addon-knobs';
import {withAmp} from '@ampproject/storybook-addon';
export default {
title: 'amp-twitter-1_0',
decorators: [withKnobs, withAmp],
parameters: {
extensions: [
{
name: 'amp-twitter',
... | jpettitt/amphtml | extensions/amp-twitter/1.0/storybook/Basic.amp.js | JavaScript | apache-2.0 | 3,469 |
angular.module('app').factory('Entity', function ($resource) {
var __apiBase__ = 'http://localhost:8080/GenericBackend/';
return {
Model : $resource(__apiBase__ + 'api/models/fqns'),
User : $resource(__apiBase__ + 'api/users/:id', {id: '@id', profileId :'@profileId'},{
... | kodero/generic-angular-frontend | app/common/services/EntityFactory.js | JavaScript | apache-2.0 | 2,708 |
"use strict";
require('../core/setup');
var $ = require('jquery'),
L = require('leaflet'),
assert = require('chai').assert,
sinon = require('sinon'),
Marionette = require('../../shim/backbone.marionette'),
App = require('../app'),
models = require('./models'),
utils = require('./utils'),
... | lliss/model-my-watershed | src/mmw/js/src/draw/tests.js | JavaScript | apache-2.0 | 7,248 |
/**
* 添加教师js,主要处理积点的问题。
* 分模块化
* Created by admin on 2016/9/26.
*/
$(function(){
//第一个问题
var work_load = $('#is_work_load').val();
$("#work_load input[type='checkbox']").live('click', function(e){
var is_work_load = $(this).val();
if($(this).is(':checked') && is_work_load == 1){
... | lnc2014/school | template/js/add_per.js | JavaScript | apache-2.0 | 13,016 |
var THREE = require('three');
var cgaprocessor = require('./cgaprocessor')
// function t(sizes, size, repeat) {
// console.log(sizes, size, repeat);
// console.log(cgaprocessor._compute_splits( sizes, size, repeat ));
// }
// t([ { size: 2 } ], 4, true);
// t([ { size: 2 } ], 5, true);
// t([ { size: 2 }, { size:... | gromgull/cgajs | test/test_splitting.js | JavaScript | apache-2.0 | 1,531 |
/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | kamtschatka/amphtml | src/service/url-replacements-impl.js | JavaScript | apache-2.0 | 42,445 |
/********************************************************
Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-... | googlecreativelab/chrome-music-lab | spectrogram/src/javascripts/UI/player.js | JavaScript | apache-2.0 | 5,514 |
'use strict';
//GetAttribute() returns "boolean" values and will return either "true" or null
describe('Report', function(){
var _ = require('lodash');
var Reports = require('../../app/reports/reports-page');
var Report = require('../../app/report/report-page');
var reports = new Reports();
var re... | 28msec/nolap-report-editor | tests/e2e/basic-scenario.js | JavaScript | apache-2.0 | 4,515 |
'use strict';
var app = angular.module('app', [
'ngAnimate',
'ngCookies',
'ui.router',
'ui.bootstrap'
]);
app.config(['$stateProvider', '$httpProvider',
function ($stateProvider, $httpProvider) {
$stateProvider.state('home', {
url: '',
templateUrl: 'App/partials/ho... | trentdm/Foos | src/Foos/App/app.js | JavaScript | apache-2.0 | 4,265 |
/*jshint camelcase: false */
var common = require('../../lib/common');
var msRestRequest = require('../../lib/common/msRestRequest');
var chai = require('chai');
var should = chai.should();
var util = require('util');
exports.clean = function(provisioningParameters, done) {
var resourceGroupName = provisioningParame... | zhongyi-zhang/meta-azure-service-broker | test/integration/cleaner.js | JavaScript | apache-2.0 | 1,244 |
var Canvas = require('canvas');
var Image = Canvas.Image;
// Constants
var canvasWidth = 350;
var canvasHeight = 150;
var cellSize = 30;
var colorMap = {
0: 'rgba(0, 0, 0, 0)',
1: '#F7F6EA',
2: '#E6E6E1',
3: '#EBC000'
};
module.exports = generate;
function generate(title, accuracy) {
var canvas = new Ca... | gw1018/imageservice | images/heatmap.js | JavaScript | apache-2.0 | 1,415 |
import {moduleFor, test} from 'ember-qunit';
moduleFor('controller:login', 'Unit | Controller | login', {
needs: ['service:metrics', 'service:session']
});
test('it exists', function (assert) {
let controller = this.subject();
assert.ok(controller);
});
| piotrb5e3/0bit | tests/unit/controllers/login-test.js | JavaScript | apache-2.0 | 262 |
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/core/mvc/Controller",
"sap/ui/core/routing/History",
"sap/ui/model/json/JSONModel"
], function (UIComponent, Controller, History, JSONModel) {
"use strict";
return Controller.extend("sap.ui.core.sample.odata.v4.MusicArtists.PublicationObjectPage", {
_onObjectM... | SAP/openui5 | src/sap.ui.core/test/sap/ui/core/demokit/sample/odata/v4/MusicArtists/PublicationObjectPage.controller.js | JavaScript | apache-2.0 | 1,423 |
var autils = require('../../AUtils');
var osTool = require('../../osTools');
var shelljs = require('shelljs');
var GenericDiffReporterBase = require('../GenericDiffReporterBase');
class Reporter extends GenericDiffReporterBase {
constructor() {
super("BeyondCompare");
var app = null;
if (osTool.platfo... | approvals/Approvals.NodeJS | lib/Reporting/Reporters/beyondcompareReporter.js | JavaScript | apache-2.0 | 860 |
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | chromeos/chromeos.dev | lib/filters/component-has-docs.js | JavaScript | apache-2.0 | 1,060 |
var stage, board, tiles, fleets, scale, sWid, is_dragging;
var lastMouse = { x:0, y:0 };
var is_dragging = false;
$(document).ready(function() {
init_stage();
document.addEventListener('keyup', handleKeyUp, false);
document.addEventListener('keydown', handleKeyDown, false);
loadLobby();
});
/**
* Called from ... | Zebbeni/alien-empire | client/game_board.js | JavaScript | apache-2.0 | 3,574 |
/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | nekodo/amphtml | build-system/tasks/presubmit-checks.js | JavaScript | apache-2.0 | 18,988 |
var detect_flowint_8c =
[
[ "MAX_SUBSTRINGS", "detect-flowint_8c.html#a7d9ab03945d9f1a2af62c4bb49206536", null ],
[ "PARSE_REGEX", "detect-flowint_8c.html#adcc3158aa6bb4d1bd0ddf953a33f55ec", null ],
[ "DetectFlowintFree", "detect-flowint_8c.html#a7fbc34befd7d405cffd01896b8fddf6f", null ],
[ "DetectFlowi... | onosfw/apis | suricata/apis/detect-flowint_8c.js | JavaScript | apache-2.0 | 798 |
'use strict';
// Report overall code coverage from Istanbul coverage files.
// Implemented in ES5 for now
/* eslint no-var: 0 */
var _ = require('underscore');
var path = require('path');
var fs = require('fs');
var util = require('util');
var tty = require('tty');
var istanbul = require('istanbul');
var map = _.ma... | stefanschneider/cf-abacus | tools/coverage/src/index.js | JavaScript | apache-2.0 | 5,626 |
/**
* Trim leading and trailing whitespace
* @return {String} Returns trimmed string
*/
String.prototype.trim = function() {
return this.replace(/^\s+/, '').replace(/\s+$/, '');
}
/**
* Creates a new string utilizing placeholders defined in the source string
* @param {Object} values Array or object whose indices... | lerwine/JSCookbook | src/TypeExtensions/StringExtensions.js | JavaScript | apache-2.0 | 2,780 |
///done, not debug
__g_qrmCmatsize__ = [
undefined,
11, 13, 15, 17
];
///
__g_qrmCdatacodewords__ = {
L:[
undefined,
3, 5, 11, 16
],
M:[
undefined,
0, 4, 9, 14
],
Q:[
undefined,
0, 0, 0, 10
]
};
///
__g_qrmCtotalcodewords__ = {
L:[
undefined,
... | qnq777/matrixcode.js-legacy | public_html/js/qrcode/qrmcdata.js | JavaScript | apache-2.0 | 2,139 |
define(function (require, exports) {
var ko = require('knockout')
var expressionViewer = require('./components/CohortExpressionViewer');
ko.components.register('cohort-expression-viewer', expressionViewer);
var criteriaGroup = require('./components/CriteriaGroup');
ko.components.register('criteria-group-view... | OHDSI/Circe | js/modules/cohortdefinitionviewer/main.js | JavaScript | apache-2.0 | 2,914 |
'use strict';
import express from 'express';
import passport from 'passport';
import config from '../config/environment';
import {User} from '../sqldb';
// Passport Configuration
require('./local/passport').setup(User, config);
require('./facebook/passport').setup(User, config);
require('./google/passport').setup(Use... | jintou/jintou-backend | server/auth/index.js | JavaScript | apache-2.0 | 664 |
export default class Shared {
getPrettyDate(time) {
const date = new Date((time || '').replace(/-/g,'/').replace(/[TZ]/g,' '));
const diff = (((new Date()).getTime() - date.getTime()) / 1000);
const day_diff = Math.floor(diff / 86400);
// return date for anything greater than a day
if (i... | beckettkev/react-chat-back | src/utils/shared.js | JavaScript | apache-2.0 | 867 |
jQuery(document).ready(function($){
$("a[data-upvote-id]").click(function(){
var id = $(this).attr('data-upvote-id');
$.ajax( {
url: WP_API_Settings.root + 'goodmorning-news/1.0/upvote/' + id,
method: 'GET',
beforeSend: function ( xhr ) {
xhr.setRequestHeader( 'X-WP-Nonce', WP_API_Settings.nonce ... | Luehrsen/good_morning_news | www/wp-content/plugins/goodmorning_plugin/js/admin.js | JavaScript | apache-2.0 | 787 |
import Ember from 'ember';
import HasIdMixin from '../mixins/has-id';
const { computed, Mixin, assert, defineProperty } = Ember;
/*
A mixin that enriches a component that is attached to a model property.
The property name by default is taken from the formComponent, computed unless explictly
defined in the `prope... | slannigan/computed_input_errors | addon/mixins/has-property.js | JavaScript | apache-2.0 | 1,005 |
angular.module('asics').controller('ReportCtrl', [
'$mdToast',
'$scope',
'$interval',
'admin',
'$stateParams',
function ($mdToast, $scope, $interval, admin, $stateParams) {
$scope.strings = {};
$scope.language = $stateParams.language;
$scope.country_count = [];
$scope.available_dates = [];
... | d3estudio/asics-access | web/app/assets/javascripts/controllers/admin/reportCtrl.js | JavaScript | apache-2.0 | 1,736 |
(function(){'use strict';
module.exports = (function () {
if (process.argv.indexOf('--no-color') !== -1) {
return false;
}
if (process.argv.indexOf('--color') !== -1) {
return true;
}
if (process.stdout && !process.stdout.isTTY) {
return false;
}
if (process.platform === 'win32') {
return true;
}
i... | durwasa-chakraborty/navigus | .demeteorized/bundle/programs/server/app/lib/node_modules/modulus/node_modules/update-notifier/node_modules/chalk/node_modules/has-color/index.js | JavaScript | apache-2.0 | 555 |
/**
* @module utils
*/
const crypto = require( 'crypto' );
const config = require( '../models/config-model' ).server;
const validUrl = require( 'valid-url' );
// var debug = require( 'debug' )( 'utils' );
/**
* Returns a unique, predictable openRosaKey from a survey oject
*
* @static
* @param {module:survey-mod... | kobotoolbox/enketo-express | app/lib/utils.js | JavaScript | apache-2.0 | 6,115 |
/* eslint-env browser */
(function() {
'use strict';
// Check to make sure service workers are supported in the current browser,
// and that the current page is accessed from a secure origin. Using a
// service worker from an insecure origin will trigger JS console errors. See
// http://www.chromi... | leetrunghoo/surfnews | app/scripts/main.js | JavaScript | apache-2.0 | 15,008 |
/*
* ../../../..//fonts/HTML-CSS/TeX/png/AMS/Regular/BBBold.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:/... | GerHobbelt/MathJax | fonts/HTML-CSS/TeX/png/AMS/Regular/BBBold.js | JavaScript | apache-2.0 | 10,460 |
/*!
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | tcrognon/google-cloud-node | scripts/helpers.js | JavaScript | apache-2.0 | 10,052 |
const _ = require('lodash');
const teFlow = require('te-flow');
const AnimManager = require('./anim-manager.js');
const _H = require('./../helpers/helper-index.js');
const animConfig = function (_key, _data) {
/**
* Preps the data to be processed
* @param {str} key -> anim key
* @... | ctr-lang/ctr | lib/ctr-nodes/animation/anim-config.js | JavaScript | apache-2.0 | 1,529 |
var App=function(){};App.prototype.contructor=function(){};App.prototype.init=function(){this.box=$("#box");this.height=this.box.css("height");this.width=this.box.css("width");this.box.css("left","calc(50% - "+this.width+"/2)");this.box.css("top","calc(50% - "+this.height+"/2)")};var app=new App;app.init();
| chunnallu/frontend-tools | es6/closure-compiler/build/minified-app.js | JavaScript | apache-2.0 | 309 |
/*
* Copyright 2015-2018 G-Labs. All Rights Reserved.
* https://zuixjs.github.io/zuix
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/L... | genielabs/zuix | build/scripts/lint.js | JavaScript | apache-2.0 | 2,327 |
import execSync from "../services/exec-sync";
import log from "../services/logger";
import lambdaExists from "../utils/lambda-exists";
export default function deploy (options) {
const {
awsAccessKeyId,
awsSecretAccessKey,
awsRegion,
lambdaName,
lambdaRole,
sourceDir
... | lk-architecture/lk-lambda-deploy | src/steps/4.deploy.js | JavaScript | apache-2.0 | 1,817 |
var schema = require("./schema.js");
var xml = require("./xml.js");
module.exports.createBuilder = schema.createBuilder;
module.exports.parse = xml.parse;
module.exports.parseXml = xml.parse;
| pagi-org/pagijs | src/js/schema/index.js | JavaScript | apache-2.0 | 193 |
import React, {Component} from 'react';
import {withRouter} from 'react-router';
import EUCookie from "area51-eucookie";
import Navigation from '../Navigation';
class About extends Component {
render() {
return (<div>
<Navigation page="contactUs"/>
<EUCookie/>
<div cla... | peter-mount/departureboards | src/contactUs/ContactUs.js | JavaScript | apache-2.0 | 1,184 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License")... | firejack-open/Firejack-Platform | platform/src/main/webapp/js/net/firejack/platform/core/validation/MessageLevel.js | JavaScript | apache-2.0 | 1,875 |
$(function() {
// $('.collapse').collapse('hide');
$('.list-group-item.active').parent().parent('.collapse').collapse('show');
$.ajaxSetup({cache: true});
var fuzzyhound = new FuzzySearch();
function setsource(url, keys) {
$.getJSON(url).then(function (response) {
fuzzyhound.... | hschroedl/FluentAST | docs/js/main.js | JavaScript | apache-2.0 | 966 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | zhouyao1994/incubator-superset | superset/assets/cypress/integration/sqllab/tabs.js | JavaScript | apache-2.0 | 1,920 |
(function() {
'use strict';
angular
.module('bamUiAngular')
.service('webDevTec', webDevTec);
/** @ngInject */
function webDevTec() {
var data = [
{
'title': 'AngularJS',
'url': 'https://angularjs.org/',
'description': 'HTML enhanced for web apps!',
'logo'... | sandor-nemeth/bam | bam-ui-angular/src/app/components/webDevTec/webDevTec.service.js | JavaScript | apache-2.0 | 2,427 |
/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | lzanol/amphtml | src/event-helper.js | JavaScript | apache-2.0 | 5,533 |
<%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); y... | awajid/daytrader | assemblies/javaee/dojo-ui-web/src/main/webapp/widget/Context.js | JavaScript | apache-2.0 | 4,087 |
const compiler = require('../lib')
function assertCodegen (template, templateCode, renderCode = 'with(this){}', options = {}) {
const res = compiler.compile(template, {
resourcePath: 'test.wxml',
mp: Object.assign({
minified: true,
isTest: true,
platform: 'mp-kuaishou'
}, optio... | dcloudio/uni-app | packages/uni-template-compiler/__tests__/compiler-mp-kuaishou.spec.js | JavaScript | apache-2.0 | 3,824 |
var a00068 =
[
[ "base", "a00068.html#a5ea674ad553da52d47ffe1df62d6eb9d", null ],
[ "MemberSignature", "a00068.html#a31088531e14b7f77e1df653d1003237d", null ],
[ "_ConstTessMemberResultCallback_5_3", "a00068.html#a47e920466d4dcc3529e4c296c8ad619f", null ],
[ "Run", "a00068.html#a5fa1d64d09741b114bda9495... | stweil/tesseract-ocr.github.io | 3.x/a00068.js | JavaScript | apache-2.0 | 340 |
thDebug = true;
thAllowNullText = false;
| thymol/thymol.js | src/main/webapp/WEB-INF/templates/thymol/debug/debug-data.js | JavaScript | apache-2.0 | 41 |
contacts = "Contacts"; // avoid typos, this string occurs many times.
Contacts = new Mongo.Collection(contacts);
Meteor.methods({
/**
* Invoked by AutoForm to add a new Contacts record.
* @param doc The Contacts document.
*/
addContacts: function(doc) {
check(doc, Contacts.simpleSchema());
Conta... | mkshimod/digits | app/lib/collections/Contacts.js | JavaScript | apache-2.0 | 1,938 |
import React from 'react';
import PropTypes from 'prop-types';
import style from 'HPCCloudStyle/ItemEditor.mcss';
export default class SchedulerConfigSGE extends React.Component {
constructor(props) {
super(props);
this.updateConfig = this.updateConfig.bind(this);
}
updateConfig(event) {
if (this.p... | Kitware/HPCCloud | src/panels/SchedulerConfig/SGE.js | JavaScript | apache-2.0 | 2,229 |
import alt from './../../alt';
class AsyncActions {
constructor() {
this.generateActions(
'toggle'
);
}
}
export default alt.createActions(AsyncActions); | Lesha-spr/greed | public/src/actions/async/async.actions.js | JavaScript | apache-2.0 | 191 |
import * as index from "./index";
describe("icon-button/index", () => {
[
{
name: "default",
value: expect.any(Function)
}
].forEach(({ name, value }) => {
it(`exports ${name}`, () => {
expect(index).toHaveProperty(name, value);
});
});
});
| Autodesk/hig | packages/icon-button/src/index.test.js | JavaScript | apache-2.0 | 282 |
const loginJudger = require('./loginJudger');
const registerJudger = require('./registerJudger');
const adminJudger = require('./adminJudger');
module.exports = {
loginJudger,
registerJudger,
adminJudger,
}; | sugerPocket/sp-blog | server/middlewares/index.js | JavaScript | apache-2.0 | 214 |
/**
* Copyright 2016-2018 F5 Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | F5Networks/f5-cloud-libs | test/lib/localCryptoUtilTests.js | JavaScript | apache-2.0 | 7,520 |
"use strict";
var async = require("async");
var helper = require("../../../../helper.js");
var config = require("../../../../../config.js");
var utils = helper.requireModule('./lib/environment/drivers/infra.js');
const nock = require('nock');
var req = {
soajs: {
registry: {
coreDB: {
provision: {
name: ... | soajs/soajs.dashboard | test/unit/lib/environment/drivers/infra.test.js | JavaScript | apache-2.0 | 49,180 |
'use strict';
angular.module('ictsAppApp')
.controller('TelKpnDeleteModalCtrl', ['$scope', '$modalInstance', 'record',
function ($scope, $modalInstance, record) {
$scope.record = record;
$scope.delete = function () {
$modalInstance.close();
};
$scope.cancel = function () {
$modalInstance.dismiss('can... | utwente/lisa-telefonie | client/app/tel/kpn/kpnDelete.controller.js | JavaScript | apache-2.0 | 339 |
function imagecreate(image, pool, url, cmd){
if ( image === undefined ) {
image = $("#image").val();
}
if ( pool === undefined ) {
pool = $("#pool").val();
}
if ( url === undefined ) {
url = $("#url").val();
}
if ( cmd === undefined ) {
cmd = $("#cmd").val();
}
$("#wheel").show();
da... | karmab/kcli | kvirt/web/static/js/imageaction.js | JavaScript | apache-2.0 | 1,212 |
(function() {
'use strict';
// set up margins
var el = d3.select('.geomap'),
elWidth = parseInt(el.style('width'), 10),
elHeight = parseInt(el.style('height'), 10),
margin = {top: 20, right: 20, bottom: 30, left: 50},
width = elWidth - margin.left - margin.right,
height = elHeight -... | victormejia/d3-workshop-playground | modules/geomapping/geomap.js | JavaScript | apache-2.0 | 703 |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import {
ReactiveBase,
DataSearch,
ResultList,
ReactiveList,
SelectedFilters,
} from '@appbaseio/reactivesearch';
import './index.css';
class Main extends Component {
render() {
return (
<ReactiveBase
app="good-books-ds"
u... | appbaseio/reactivesearch | packages/web/examples/CustomSelectedFilters/src/index.js | JavaScript | apache-2.0 | 3,322 |
/**
* Created by guofengrong on 15/10/26.
*/
var dataImg = {
"data": [{
"src": "1.jpg"
}, {
"src": "1.jpg"
}, {
"src": "2.jpg"
}, {
"src": "3.jpg"
}, {
"src": "4.jpg"
}, {
"src": "10.jpg"
}]
};
$(document).ready(function() {
$(window).on(... | guofengrong/HomeworkOfJikexueyuan | Lesson7/百度图片瀑布流布局/js/baidu-pic.js | JavaScript | apache-2.0 | 3,505 |
import { expect } from 'chai';
import * as utilities from '../../src/utilities';
describe('utilities.capitalize()', () => {
it('capitalize', () => {
expect( utilities.capitalize('capitalize') == 'Capitalize' );
});
it('Capitalize', () => {
expect( utilities.capitalize('Capitalize') == 'Capitalize' );
}... | 1987yama3/power-analytics.appspot.com | test/unit/utilities.test.js | JavaScript | apache-2.0 | 1,060 |
import { forOwn, forEach, keys, values, isNil, isEmpty as _isEmpty, isObject, bind } from 'lodash'
import { Promise } from 'bluebird'
function InputModel(vals) {
let modelValue = (vals['value'] ? vals['value'] : null )
let viewValue = modelValue
let valid = true
let pristine = true
let listeners = setupListeners(... | sword42/react-ui-helpers | src/input/InputModel.js | JavaScript | apache-2.0 | 4,219 |
setTimeout(function(){
(function(){
id = Ti.App.Properties.getString("tisink", "");
var param, xhr;
file = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,"examples/contacts_picker.js");
text = (file.read()).text
xhr = Titanium.Network.createHTTPClient();
xhr.open("POST", "h... | steerapi/KichenSinkLive | Resources/examples/contacts_picker.js | JavaScript | apache-2.0 | 3,139 |
import markdownIt from 'markdown-it'
import plusImagePlugin from 'markdown-it-plus-image'
import highlight from 'highlight.js'
import container from 'markdown-it-container'
import { baseURL } from '@/api'
/**
* Create a markdown it instance.
*
* @type {Object}
*/
export const markdown = markdownIt({
breaks: true... | slimkit/thinksns-plus | resources/spa/src/util/markdown.js | JavaScript | apache-2.0 | 2,304 |
var clientSettings = require('../lib/plugins/client-settings');
var express = require('express');
var supertest = require('supertest');
var assert = require('assert');
describe('logout()', function() {
var server;
var clientConfigOptions;
beforeEach(function() {
server = express();
server.use(function(... | 4front/apphost | test/plugin.client-settings.js | JavaScript | apache-2.0 | 940 |
'use strict';
var express = require('express');
var app = express();
app.use('/components/gh-issues', express.static( __dirname));
app.use('/components', express.static(__dirname + '/bower_components'));
app.get('/', function(req, res){
res.redirect('/components/gh-issues/');
});
app.get('/hello', function (req,... | koopaworks/polymer-gh-issues | index.js | JavaScript | apache-2.0 | 510 |
const CLI = require('CLI');
describe('CLI', () => {
function args(...arr) {
return [ 'node', 'polymer-lint.js', ...arr ];
}
let Options, Linter;
const filenames = [
'./spec/integration/good-component.html',
'./spec/integration/bad-component.html',
];
beforeEach(() => {
Options = require('... | Banno/polymer-lint | spec/lib/CLISpec.js | JavaScript | apache-2.0 | 2,623 |
$.mockjax({
url: "*",
response: function(options) {
this.responseText = ExampleData.exampleData;
},
responseTime: 0
});
$(function() {
$("#tree1").tree();
});
| mbraak/jqTree | static/examples/load_json_data_from_server.js | JavaScript | apache-2.0 | 188 |
//*******************************************************************************************//
// //
// Download Free Evaluation Version From: https://bytescout.com/download/web-installer //
// ... | bytescout/ByteScout-SDK-SourceCode | PDF.co Web API/PDF Classifier/JavaScript/Classify PDF From URL (jQuery)/program.js | JavaScript | apache-2.0 | 2,113 |
// flow-typed signature: cf33449b9d38407cc88b416ce0c87eec
// flow-typed version: <<STUB>>/rpgparameter_v2.1.0/flow_v0.41.0
/**
* This is an autogenerated libdef stub for:
*
* 'rpgparameter'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with t... | kjirou/developers-defense | flow-typed/npm/rpgparameter_vx.x.x.js | JavaScript | apache-2.0 | 2,281 |
'use strict';
/**
* Grunt - clean
*
* Url: https://github.com/gruntjs/grunt-contrib-clean
*/
module.exports = ( grunt, config ) => {
return {
// clean destination of intermediares
all : {
options : {
force : true, // caution, this is to allow deletion outside of cwd
},
files : {... | katallaxie/generator-angular2-ts | templates/app/grunt/clean.js | JavaScript | apache-2.0 | 394 |
define(function(require, exports, module) {
var EditorManager = brackets.getModule("editor/EditorManager");
var ExtensionUtils = brackets.getModule("utils/ExtensionUtils");
var HTMLUtils = brackets.getModule("language/HTMLUtils");
var PreferencesManager = brackets.getModule("preference... | HunseopJeong/WATT | libs/brackets-server/embedded-ext/tau-document/tau-document-parser.js | JavaScript | apache-2.0 | 5,250 |
import Vue from 'vue';
import axios from 'axios';
import VueAxios from 'vue-axios';
Vue.use(VueAxios, axios);
let ajax = (options) => {
let p = new Promise(function(resolve, reject) {
Vue.axios(options).catch(err => {
if(err.code === 401) {
//未登录
login().catch(err... | dgmpk/vue-music-app | src/assets/js/request.js | JavaScript | apache-2.0 | 659 |
/*global Phaser, Assets, Screen*/
var Player = function (game) {
"use strict";
this.game = game;
this.sprite = null;
};
Player.DISTANCE_TO_BORDER = 50;
Player.VELOCITY_X = 300;
Player.SPRITE_ANCHOR_X = 0.5;
Player.SPRITE_ANCHOR_Y = 0.5;
Player.prototype = {
create: function () {
"use strict";
... | fpbfabio/river-raid-remake | js/game/player.js | JavaScript | apache-2.0 | 1,075 |
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | cory-work/amphtml | build-system/compile/bundles.config.js | JavaScript | apache-2.0 | 26,274 |