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 Utils = {
}
/**
* Gestisce il resize di un'imamgine in modo che sia nel contenitore senza cambiare le proporzioni
*/
Utils.ResizeImg = function(imgTag, image, set, modo, align)
{
tag = "#" + imgTag;
img = new Image();
if (image != null)
img.src = image;
else
img.src = $(tag).attr("src");
imgH = img.he... | elifesy/jemma | jemma.osgi.ah.webui.energyathome/src/main/resources/webapp/ehdemo/reportDemo/js/Utils.js | JavaScript | lgpl-3.0 | 6,409 |
define([
"TerraMA2WebApp/analysis/services",
"TerraMA2WebApp/collapser/directives"
], function(servicesApp, collapserApp) {
"use strict";
var moduleName = "terrama2.analysis.directives";
angular.module(moduleName, [servicesApp, collapserApp])
.run(["$templateCache", function($templateCache) {
$t... | pauloremoli/terrama2 | webapp/public/javascripts/angular/analysis/directives.js | JavaScript | lgpl-3.0 | 3,033 |
var Dcp = require('./Dcp');
var Enums = require('./../Enums');
var Form = Enums.Form;
var Utils = require('./../Utils');
/**
* It handles DCP-INPE semantics type.
* @constructor
*/
var DcpToa5 = function(args) {
Dcp.call(this, args);
};
DcpToa5.prototype = Object.create(Dcp.prototype);
DcpToa5.prototype.construc... | edelatin/terrama2 | webapp/core/data-series-semantics/DcpToa5.js | JavaScript | lgpl-3.0 | 1,046 |
/// <reference path="../../../../Framework/Signum.Web/Signum/Headers/jquery/jquery.d.ts"/>
define(["require", "exports", "d3"], function (require, exports, d3) {
"use strict";
//import d3sc = require("d3-scale-chromatic");
var d3sc = {};
var ChartUtils;
(function (ChartUtils) {
d3.sel... | mapacheL/extensions | Signum.Web.Extensions/Chart/Scripts/ChartUtils.js | JavaScript | lgpl-3.0 | 20,244 |
test("Rect", function() {
rect1 = new jaws.Rect(0,0,10,10)
rect2 = new jaws.Rect(5,5,10,10)
rect3 = new jaws.Rect(2,2,10,10)
rect4 = new jaws.Rect(11,11,10,10) // This won't collide with anything
ok(rect1.collideRect(rect2), "collideRect()")
ok(rect3.collideRect(rect1), "collideRect()")
ok(rect3.collide... | ippa/jaws | test/rect.js | JavaScript | lgpl-3.0 | 915 |
'use strict';
var _ = require('lodash');
var Fixedvalues = require('./fixedValues.model');
// Get list of fixedValuess
exports.index = function(req, res) {
Fixedvalues.find(function (err, fixedValuess) {
if(err) { return handleError(res, err); }
return res.json(200, fixedValuess);
});
};
// Get a single ... | Rodjers/integration-doc | server/api/fixedValues/fixedValues.controller.js | JavaScript | lgpl-3.0 | 1,722 |
const path = require('path');
module.exports = {
extends: 'airbnb-base',
settings: {
'import/resolver': {
webpack: { config: path.join(__dirname, 'webpack.config.js') },
},
},
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
allowImportExportEverywhere: true,
},
rules:... | MetaSolutionsAB/rdforms | .eslintrc.js | JavaScript | lgpl-3.0 | 1,005 |
define(['dojo/_base/declare',
'dojo/_base/lang',
'dojo/dom-construct',
'./Base',
'd3'
], function(declare, lang, domConstruct, Base, d3) {
return declare([Base], {
buildRendering: function () {
this.inherited(arguments);
this.searchTermInput = domConstruct.create('input', {
'type' : 'text',
... | OpenClemson/SocialTap | public/app/vis/PieGraph.js | JavaScript | lgpl-3.0 | 4,441 |
angular.module("plan", [])
.controller("PlanCtrl", function () {
this.refresh = function() {
console.log("Refresh");
};
})
.factory("redmineRest", ["$http", function($http) {
var forEachTicket = function(apiKey
return {
};
}]);
| wginolas/playground | angular/plan.js | JavaScript | lgpl-3.0 | 296 |
import React from 'react';
import expect from 'expect';
import { mount, shallow } from 'enzyme';
import RolesList from './RolesList';
describe('RolesList', () => {
it('renders without crashing', () => {
let wrapper = shallow(<RolesList />);
expect(wrapper.length).toEqual(1);
});
});
| seyade/loggent | src/components/role/RolesList.test.js | JavaScript | lgpl-3.0 | 298 |
K3cms_Blog = {
}
k3cms_blog_blog_post = {
updatePage: function(object_name, object_id, object, source_element) {
K3cms_InlineEditor.updatePageFromObject(object_name, object_id, object, source_element)
// TODO: only update title if page title was originally set to @page.title. Perhaps we should set some JS v... | k3integrations/k3cms_demo_app | public/javascripts/k3cms/blog.js | JavaScript | lgpl-3.0 | 579 |
/*
* 输出路径:bookName +index.html
* */
var Promise = require('bluebird');
var DB = require('../Db/index.js');
var TaskQueue = require('../utils/TaskQueue.js');
var render = require('../render/index.js');
var PathFn = require('path');
var DataFormat = require('../utils/time.js').DataFormat;
var marko = require('../util... | RainboyNodeJs/RSblog | lib/book/bookIndex.js | JavaScript | lgpl-3.0 | 1,413 |
'use strict';
(function() {
var language = {
//random :
BLOCKLY_MSG_DUPLICATE_BLOCK: 'Duplicar',
BLOCKLY_MSG_REMOVE_COMMENT: 'Remover comentário',
BLOCKLY_MSG_ADD_COMMENT: 'Adicionar comentário',
BLOCKLY_MSG_EXTERNAL_INPUTS: 'Entradas externas',
BLOCKLY_MSG_INLINE_INP... | AMOsPL/roboblocks | lang/pt-PT.js | JavaScript | lgpl-3.0 | 24,932 |
/* Albanian initialisation for the jQuery UI date picker plugin. */
/* Written by Flakron Bytyqi (flakron@gmail.com). */
( function( factory ) {
if ( false && typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
//define( [ "../widgets/datepicker" ], factory );
} else {
// B... | Jemt/Fit.UI | Resources/JqueryUI-1.11.4.custom/i18n/datepicker-sq.js | JavaScript | lgpl-3.0 | 1,163 |
if ("geolocation" in navigator) {
$('.js-geolocation').show();
} else {
$('.js-geolocation').hide();
}
// Clickable geolocation button that loads weather based on HTML5 geo-locating
/*$('.js-geolocation').click(function () {
navigator.geolocation.getCurrentPosition(function (position) {
loadWeather... | baliga-lab/pf1010-web | aqxWeb/static/js/weather.js | JavaScript | lgpl-3.0 | 1,633 |
var structshyft_1_1core_1_1hbv__stack_1_1state__collector =
[
[ "state_collector", "structshyft_1_1core_1_1hbv__stack_1_1state__collector.html#a0ca42eafe965c3ad1be737495b7d026d", null ],
[ "state_collector", "structshyft_1_1core_1_1hbv__stack_1_1state__collector.html#ae777e37f14bfc1ca5529280cbd0fd168", null ],
... | statkraft/shyft-doc | core/html/structshyft_1_1core_1_1hbv__stack_1_1state__collector.js | JavaScript | lgpl-3.0 | 1,436 |
/*
21-Escaping-Literal-Quotes-in-Strings.js
When you are defining a string you must start and end with a single or double
quote. What happens when you need a literal quote: " or ' inside of your string?
In JavaScript, you can escape a quote from considering it as an end of string
quote by placing a backslash (\) in ... | kraevit/Javascript | fcc/Basic-Javascript/21-Escaping-Literal-Quotes-in-Strings.js | JavaScript | lgpl-3.0 | 925 |
// Copyright (C) 2018 go-nebulas authors
//
// This file is part of the go-nebulas library.
//
// the go-nebulas library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
... | nebulasio/go-nebulas | nf/nvm/v8/lib/1.0.5/crypto.js | JavaScript | lgpl-3.0 | 2,877 |
/**
*
*/
$(function () {
$('.button-checkbox').each(function () {
// Settings
var $widget = $(this),
$button = $widget.find('button'),
$checkbox = $widget.find('input:checkbox'),
color = $button.data('color'),
settings = {
on: {
... | PrataapMS/Traventure | TraventureZero/src/main/webapp/resources/js/signup.js | JavaScript | unlicense | 1,952 |
var pmp = {
addressesToPlot: [],
pointsToPlot: [],
unplottableAddresses: [],
geocoder: null,
init: function() {
pmp.geocoder = new google.maps.Geocoder();
var mapOptions = {
center: { lat: 51.44, lng: -0.09},
zoom: 13
};
pmp.map = new google.maps.Map(document.getElementById('map'), mapOptions);
d... | adamalton/plot-my-places | script.js | JavaScript | unlicense | 1,546 |
'use strict';
var convert = require('xml-js');
var fs = require('fs');
const Table = require('./table');
const TableKey = require('./tableKey');
const TableEntry = require('./tableEntry');
const Direction = require('./direction');
function str2direction(str){
if(str === 'left') return Direction.LEFT;
if(str ==... | sanelli/tms | node/tms/statefulTable.js | JavaScript | unlicense | 2,980 |
$(function() {
smoothScroll(300);
workBelt();
workLoad();
clientStuff();
$("header h1").fitText(1, { minFontSize: '20px', maxFontSize: '72px' });
$(".biglink").fitText(1.5);
$('textarea').autosize();
});
//parallax
$(window).scroll(function(){
var wScroll = $(this).scrollTop();
$('.myitem').css({
'trans... | ManolisFrag/charisportfolio | assets/js/functions.js | JavaScript | unlicense | 12,590 |
"use strict";
var should = require('should');
var subject = require('../lib/exchange.js');
describe('exchange', function () {
describe('#coerce', function () {
var tests = [
{in: 0, expected: '0.00'},
{in: 0.0, expected: '0.00'},
{in: '0', expected: '0.00'},
{in: 0.111, expected: '0.11'}... | pyranja/convert-currency | test/exchange.js | JavaScript | unlicense | 3,462 |
/* eslint-env node */
'use strict';
module.exports = function(environment) {
let ENV = {
modulePrefix: 'cliside',
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-co... | ConnerAiken/cliside | config/environment.js | JavaScript | unlicense | 1,155 |
mycallback( {"_record_type": "fec.version.v7_0.TEXT", "FILER COMMITTEE ID NUMBER": "C00461061", "REC TYPE": "TEXT", "TEXT4000": "Total earmarked through conduit PAC limit not affected", "TRANSACTION ID NUMBER": "TINCA7345IDTA512", "_src_file": "2011/20110504/727407.fec_5.yml", "BACK REFERENCE TRAN ID NUMBER": "INCA7345... | h4ck3rm1k3/federal-election-commission-aggregation-json-2011 | objects/91/bc77db0f5d1bff74f59e5c65d67f7fa8dc951f.js | JavaScript | unlicense | 378 |
var Navigation = {
setCurrentNav: function() {
var url = location.pathname,
all_links = $('ul#main_nav li'),
current_link = $('ul#main_nav li a[href$="' + url + '"]'),
active_link = current_link.parent("li");
if (url == "/") {
all_links.removeClass('active');
$('.home').a... | coderstash/photostock | app/assets/javascripts/libs/navigation.js | JavaScript | unlicense | 442 |
(function() {
'use strict';
angular
.module('gigtrakrApp')
.controller('LoginController', LoginController);
LoginController.$inject = ['$rootScope', '$state', '$timeout', 'Auth', '$uibModalInstance'];
function LoginController ($rootScope, $state, $timeout, Auth, $uibModalInstance) {
... | cvanderkolk/gigtrakr | src/main/webapp/app/components/login/login.controller.js | JavaScript | unlicense | 2,495 |
/**
*自适应水平和垂直方向都居中容器
* Created by GUY on 2016/12/2.
*
* @class BI.FlexHorizontalLayout
* @extends BI.Layout
*/
BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "... | fanruan/fineui | src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js | JavaScript | apache-2.0 | 3,001 |
$.extend({
birthday: function(options) {
var defaults = {
YearSelector: "#sel_year",
MonthSelector: "#sel_month",
DaySelector: "#sel_day",
FirstText: "--",
FirstValue: 0,
StartYear: 1949
};
var opts = $.extend({}, defaults, options);
var $YearSelector = $(opts.YearS... | nicecss/uikit | modules/birthday/birthday.js | JavaScript | apache-2.0 | 3,369 |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Field, reduxForm } from 'redux-form';
import { resetPassword } from '../../actions/auth';
const form = reduxForm({
form: 'resetPassword',
validate,
});
function validate(formProps) {
const errors = {};
if (!formProps.pa... | hah-nan/papabear2 | client/src/components/auth/reset_password.js | JavaScript | apache-2.0 | 2,709 |
/*
Copyright 2017 Aleksandar Jankovic
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 agreed to in writing, so... | stanislavb/roleHaven | utils/gameUserManager.js | JavaScript | apache-2.0 | 1,564 |
const request = require("request-promise")
const cheerio = require("cheerio")
const test = async() => {
const options = {
uri: 'http://cloverink.com',
json: true,
transform: body => cheerio.load(body)
}
const $ = await request(options)
console.log($(".name").text())
}
test(); | cloverink/farm | testnode/test-scrap.js | JavaScript | apache-2.0 | 304 |
var args = arguments[0] || {};
/**
* Backbone.Events.once() is not implemented in Backbone v 9.x.x (included in Alloy)
* It should throw an exception
*/
Alloy.Globals.events.once ('app:eventWithReferenceOnce',function (e){
try {
var color = (e.window.backgroundColor === 'white') ? 'red' : 'white';
e.window.setB... | rlustemberg/quickndirtyTiEventsDemo | app/controllers/window6.js | JavaScript | apache-2.0 | 403 |
/* global $, APP, interfaceConfig, JitsiMeetJS */
import UIUtil from '../util/UIUtil';
import UIEvents from '../../../service/UI/UIEvents';
const defaultBottomToolbarButtons = {
'chat': {
id: '#bottom_toolbar_chat'
},
'contacts': {
id: '#bottom_toolbar_contact_list'
},
'filmstrip': ... | luciash/jitsi-meet-bootstrap | modules/UI/toolbars/BottomToolbar.js | JavaScript | apache-2.0 | 4,107 |
/**
* Copyright 2012 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... | JT5D/blk-game | src/blk/game/server/serverplayer.js | JavaScript | apache-2.0 | 6,729 |
var electronLicense = require('../');
var assert = require('assert');
describe('electron-license', function() {
it('should work', function() {
assert(electronLicense);
});
});
| mongodb-js/electron-license | test/index.test.js | JavaScript | apache-2.0 | 185 |
if (!ether.laws)
ether.laws = new Object();
ether.laws.Collision = function Collision(_pool) {
this.pool = _pool == null ? new Array() : _pool;
this.delta = new ether.Vector();
};
ether.laws.Collision.prototype.enforce = function(p1, dt, index) {
var delta = this.delta;
var pool = this.pool.slice(index + 1);
for... | grahamzibar/EtherJS | src/extra/laws/Collision.js | JavaScript | apache-2.0 | 846 |
// 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 in ... | google-business-communications/bc-bm-nodejs-api-explorer | routes/brands.js | JavaScript | apache-2.0 | 5,000 |
// Copyright 2011 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... | lucidsoftware/closure-library | closure/goog/style/transition_test.js | JavaScript | apache-2.0 | 3,291 |
#!/usr/bin/env node
// *****************************************************************************
// Copyright 2013-2018 Aerospike, 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
... | aerospike/aerospike-client-nodejs | examples/add.js | JavaScript | apache-2.0 | 1,244 |
'use strict';
import Alt from 'alt';
var alt = new Alt();
export default alt; | cpollet/mytimesheets | src/alt.js | JavaScript | apache-2.0 | 80 |
Meteor.languages = {};
Meteor.languages["zh-CN"] = {
user_name: "用户名",
password: "密码",
}; | zhanghaojie/meteor_discuz | client/lib/lang/zh-cn.js | JavaScript | apache-2.0 | 103 |
var app={
inicio: function(){
pixelsIconos = 64;
dificultad = 1;
velocidadX = 0;
velocidadY = 0;
velocidadPulpoY = 0.5;
velocidadPulpoX = 0.5;
puntuacion = 0;
puntuacionText= null;
capturaCangrejo= false;
fondoInicial= '#00ffff';
dificultadText= null;
alto ... | luisngl/CangrejosP | www/js/Mijuego - copia.js | JavaScript | apache-2.0 | 5,657 |
/**
* Created by jbr134 on 20/01/15.
*/
var phantom = require('phantom');
startPhantom();
function startPhantom(){
phantom.create(function(ph) {
level1(ph);
})
}
function level1(ph){
return ph.createPage(function(page) {
return page.open("http://www.bricklink.com/catalogTree.asp?it... | BrandiATMuhkuh/LegoScrapComparison | phantomJS/stopOne.js | JavaScript | apache-2.0 | 1,807 |
// discoveryDelay = 750ms artificial delay - this is probably dependent on how fast one can establish a connection to aws
var config = {
maxSensors:2,
discoveryTime:15000, //ms
discoveryDelay:750, //ms
sensorRefresh:2, //sec
sensorDelay:1000, //ms
roundRobin:true,
gateway:'__my_thingId__',... | ArrowElectronics/aws-iot-tisense-js | BeagleBone/src/config_template.js | JavaScript | apache-2.0 | 595 |
// don't allow regex as _id: SERVER-9502
var testColl = db.regex_not_id;
testColl.drop();
assert.writeOK(testColl.insert({_id: "ABCDEF1"}, {writeConcern: {w: 1}}));
// Should be an error.
assert.writeError(testColl.insert({_id: /^A/}, {writeConcern: {w: 1}}));
// _id doesn't have to be first; still disallowed
asser... | christkv/mongo-shell | test/jstests/core/regex_not_id.js | JavaScript | apache-2.0 | 406 |
import {combineReducers} from 'redux';
import * as bookReducers from './bookReducers';
import * as userReducers from './userReducers';
import * as loginReducers from './loginReducers';
import * as routes from './routesReducers';
import * as communityReducers from './communityReducers';
const allReducers = Object.assi... | manchaques/micose-mobile | src/reducers/reducers.js | JavaScript | apache-2.0 | 475 |
/* Module: ReactionChannels -- Add users to channels based on message reactions. */
const { MessageEmbed } = require('discord.js');
const Module = require('../Module.js');
const PERM_ADMIN = 'administrator';
const CREATE_TYPES = ['text', 'voice'];
const NEUTRAL_COLOR = "#808080";
class ModReactionChannels extends M... | Protected/rowboat | behavior/ReactionChannels.js | JavaScript | apache-2.0 | 35,109 |
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{X2gj:function(o,e,n){"use strict";n.r(e),n.d(e,"theme",(function(){return c}));var c="{\n --deckgo-highlight-code-carbon-background: #2b3e50;\n --deckgo-highlight-code-carbon-color: rgb(248, 248, 242);\n --deckgo-highlight-code-token-atrule: #ff6541;\n --dec... | flaviojmendes/flaviojmendes.github.io | 22-eba7f64db82ae6d20252.js | JavaScript | apache-2.0 | 746 |
jQuery(document).ready(function($) {
'use strict';
/************** Toggle *********************/
// Cache selectors
var lastId,
topMenu = $(".menu-first"),
topMenuHeight = topMenu.outerHeight()+15,
// All list items
menuItems = topMenu.find("a"),
// Ancho... | calltovinod/edorei | WebContent/js/main.js | JavaScript | apache-2.0 | 2,547 |
if (!ORYX.Plugins)
ORYX.Plugins = {};
if (!ORYX.Config)
ORYX.Config = {};
ORYX.Plugins.VoiceCommand = Clazz.extend({
construct: function(facade){
this.facade = facade;
this.facade.registerOnEvent(ORYX.CONFIG.EVENT_VOICE_COMMAND, this.handleVoiceCommand.bind(this));
this.facade.registerOnEvent(ORYX.CONFIG... | fanta-mnix/designer | src/main/webapp/js/Plugins/voicecommand.js | JavaScript | apache-2.0 | 5,084 |
/*-------------------------------------------------------------------------------------------------------------------------------*/
/*This is main JS file that contains custom scripts used in this template*/
/*------------------------------------------------------------------------------------------------------------... | samlanh/cam-adsproject | public/template/subtemplate/template2/js/global.js | JavaScript | apache-2.0 | 21,359 |
import {set} from 'cerebral/operators';
import {PAGE_EMPTY} from '~/constants';
const showMain = [
set('state:main.current_page', PAGE_EMPTY),
];
export default showMain;
| saitodisse/md-list | src/modules/Main/chains/showMain.js | JavaScript | apache-2.0 | 175 |
L.esri.Demographics._addKeys([
{
'key': 'LithuaniaPurchasingPowerperCapita',
'id': '1577c2d481764b19aeb63486428557c3'
},
{
'key': 'LithuaniaAverageHouseholdSize',
'id': 'e396723abb4940f499bc0ceeb61b7d53'
}
]); | Esri/esri-leaflet-demographic-layer | layers/lithuania.js | JavaScript | apache-2.0 | 233 |
'use strict';
/**
* CODE BY BeanNguyen | At 5.22PM
*/
App.factory('AuthenticationService', ['$rootScope', '$http', '$sanitize', function ($rootScope, $http, $sanitize) {
var sanitizeCredential = function (credential) {
return {
action : 'login',
username : $sanitize(credential.username),
password : $san... | beannguyen/ibanking | assets/scripts/controllers/login.js | JavaScript | apache-2.0 | 939 |
/**
* Red Hat Open Innovation Labs Console API
* Specification for interaction between the Labs Console front-end and back-end. Additionally, this API will be used to experiment with new concepts in order to allow the Automation API (https://github.com/rht-labs/automation-api) to remain stable.
*
* OpenAPI spec ver... | priley86/labs-console | data/model/User.js | JavaScript | apache-2.0 | 4,471 |
var searchData=
[
['mainwindow',['MainWindow',['../class_sign_language_translator___record__2_d_1_1_main_window.html#ae31adbb9d5dee60ecb17087fb825949c',1,'SignLanguageTranslator_Record_2D::MainWindow']]]
];
| preetiamatya/SignLanguageTranslator-using-Kinect2-Recorder | Documentation/html/search/functions_4.js | JavaScript | apache-2.0 | 209 |
/*
good instanceId : b259c5e0-7442-46bc-970c-9912613077dd
test:
*/
/* jshint camelcase: false */
/* jshint newcap: false */
/* global describe, before, it */
var should = require('should');
var sinon = require('sinon');
var azurestorage = require('../../../../lib/services/azurestorage/');
var azure = require('..... | zhongyi-zhang/meta-azure-service-broker | test/unit/services/azurestorage/provision-spec.js | JavaScript | apache-2.0 | 8,313 |
(function () {
"use strict";
var assert = require('assert')
, CirQ = require(__dirname + '/../lib/cirq')
, cirq
;
cirq = new CirQ(4);
assert.ok(undefined === cirq.pop());
assert.ok(undefined === cirq.pop());
cirq.push('a');
cirq.push('b');
cirq.push('c');
assert.deepEqual(['a','b','c'... | coolaj86/cirqjs | test/cirq-test.js | JavaScript | apache-2.0 | 2,108 |
'use strict';
module.exports = resolveTokens;
/**
* Replace tokens in a string template with values in an object
*
* @param {Object} properties a key/value relationship between tokens and replacements
* @param {string} text the template string
* @returns {string} the template with tokens replaced
* @private
*/... | gbif/map-gl | frontend/mapbox-gl-js/js/util/token.js | JavaScript | apache-2.0 | 508 |
Ext.define('oa.ux.PositionMultiSelect', {
extend: 'Ext.form.field.Tag',
xtype: 'positionMultiSelect',
alias: 'widget.positionMultiSelect',
store: {
type: 'position'
},
fieldLabel: '选择职位',
queryMode: 'local',
filterPickList: true,
displayField: 'name',
valueField: '... | zuesgooogle/oa | oa-client/classic/src/view/ux/PositionMultiSelect.js | JavaScript | apache-2.0 | 335 |
/* eslint-disable no-unused-expressions */
// eslint-disable-next-line import/no-extraneous-dependencies
const resizeTo = require('terra-toolkit/lib/nightwatch/responsive-helpers').resizeTo;
module.exports = resizeTo(['tiny', 'small', 'medium'], {
'Sets the fields appropriately for a morning time': (browser) => {
... | nagrawal3/terra-core | packages/terra-time-input/tests/nightwatch/time-input-twelve-hour-mobile-spec.js | JavaScript | apache-2.0 | 3,115 |
function closeWindow() {
$.startWin.close();
}
var facebook = Alloy.Globals.Facebook;
facebook.appid = 238640849675744;
// facebook.permissions = ['publish_stream'];
facebook.addEventListener('login', function(e) {
if (!e.success) {
$.startWin.close();
}
});
$.startWin.addEventListener('open', f... | lucheins/GoTransfer | app/controllers/start.js | JavaScript | apache-2.0 | 736 |
/*
* Copyright (c) 2012-2015, Inversoft 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... | inversoft/prime.js | src/test/js/DocumentTest.js | JavaScript | apache-2.0 | 10,190 |
String.prototype.endsWith = String.prototype.endsWith || function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
String.prototype.trim = String.prototype.trim || function() {
return this.replace(/^\s+|\s+$/g, '');
};
String.prototype.ltrim = String.prototype.ltrim || function() {
re... | jschappet/manage-inventory | oldversion/src/main/webapp/resources/js/utils.js | JavaScript | apache-2.0 | 22,193 |
angular.module('chatApp.chatPanel', ['chatApp.chatMessages'])
.controller('chatPanelCtrl', function($scope, $rootScope, $resource, $timeout) {
$rootScope.$on("chatting", function() {
var Messages = $resource(MESSAGES_ENDPOINT);
var poll = function()
{
$timeout(function() {
... | kylesomers/aws-lambda-zombie-workshop | NEW/appWithIamAuth/modules/chat/chatPanel.js | JavaScript | apache-2.0 | 1,972 |
const processor = require('../mahafuncs');
const { assert } = require('chai');
const cheerio = require('cheerio');
const config_no_follow_all = {
preferNofollow: true
};
const config_no_follow_all_whitelist_good = {
preferNofollow: true,
whitelist: [
/somewhere.good$/i
]
};
const config_no_f... | akashacms/akashacms-external-links | test/index.js | JavaScript | apache-2.0 | 15,377 |
{
name : "UpdatedRequest",
type : "object",
description : "The schema for an updated Request object.",
strict : true,
properties : {
search_text : {
type : "string",
},
context : {
type : "string",
},
provenance : {
type : "string... | tree33333/ontology-broker | docs/json-schemas/UpdatedRequest.js | JavaScript | apache-2.0 | 665 |
// @flow
import React from "react";
import { createStackNavigator, createAppContainer } from "react-navigation";
import TeamsScreen from "../screens/teams-screen";
import TeamDetailsScreen from "../screens/team-details-screen";
import TeamEditorScreen from "../screens/team-editor-screen";
import TeamMemberDetails from ... | johnneed/GreenUpVermont | navigation/teams-stack.js | JavaScript | apache-2.0 | 633 |
/**
* @author Kevin Garay
*/
$( document ).ready(function() {
/*DataTable definition*/
$(".datatables").DataTable({
"scrollY": "350px",
"scrollCollapse": false,
"aoColumns":
[
{ "sWidth": "10%", "sClass": "center", "bSortable": false },
{ "sWidth": "10%" ... | kevingcfcb88/sicmec | src/main/webapp/WEB-INF/resources/js/administracionMedicamentos.js | JavaScript | apache-2.0 | 5,151 |
import React, { Component } from 'react';
import {
View,
Image,
Text,
Dimensions,
ScrollView,
TouchableOpacity
} from 'react-native';
import _ from 'lodash';
import * as Animatable from 'react-native-animatable';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import ParallaxScrollView from 'react-... | cloudfavorites/favorites | android/source/component/homeRender.js | JavaScript | apache-2.0 | 3,950 |
/**
* @license Copyright 2019 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 applicable la... | google/outrigger | uxAutomation/audits/form-autocomplete/has-valid-autocomplete.js | JavaScript | apache-2.0 | 3,658 |
'use strict';
angular.module('chronontology.controllers')
.controller("PeriodController", function ($scope, $location, $routeParams, $http, $sce, chronontologySettings,
authService, gazetteerDataService, timelineDataService) {
// possible relations
// (la... | dainst/chronontology-frontend | js/controllers/PeriodController.js | JavaScript | apache-2.0 | 8,990 |
import hub from 'hub'
class ApplicationActions {
listAll () {
return true
}
listRequestError (error) {
return error
}
listRequestSuccess (list) {
return list
}
}
export default hub.createActions(ApplicationActions)
| apphub-pro/apphub-console | client/actions/application.js | JavaScript | apache-2.0 | 239 |
export const ADD_TO_CART = 'ADD_TO_CART'
export const CHECKOUT_REQUEST = 'CHECKOUT_REQUEST'
export const CHECKOUT_SUCCESS = 'CHECKOUT_SUCCESS'
export const CHECKOUT_FAILURE = 'CHECKOUT_FAILURE'
export const DUMMY_ITEMS_REQUEST = 'DUMMY_ITEMS_REQUEST'
export const ITEMS_REQUEST = 'ITEMS_REQUEST'
export const CREATE_CUST... | spara/atsea-sample-shop-app | app/react-app/src/constants/ActionTypes.js | JavaScript | apache-2.0 | 658 |
module.exports = formatTime;
module.exports.padNumber = padNumber;
/**
* Format number by padding it with leading zeroes
* @param {Number} num source value
* @param {Number} length desired minimum target length
* @returns {String} padded number
*/
function padNumber(num, length) {
return `${num}`.padStart(len... | igi2k/shield | lib/util/format-time.js | JavaScript | apache-2.0 | 2,979 |
'use strict';
var fs = require('fs');
var path = require('path');
var walk = require('jade-walk');
module.exports = load;
function load(ast, options) {
load.validateOptions(options);
// clone the ast
ast = JSON.parse(JSON.stringify(ast));
return walk(ast, function (node) {
if (node.str === undefined) {
... | timbur/Unreal.js | Plugins/UnrealJS/Content/Scripts/node_modules/jade-load/index.js | JavaScript | apache-2.0 | 2,821 |
/**
* Copyright © 2015 The Regents of the University of Michigan
* 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 ... | e4ong1031/OntoKiWi | modules/js/ext.okw.form.general.js | JavaScript | apache-2.0 | 3,763 |
angular.module('roveretoSegnala.services.conf', [])
.factory('Config', function ($q, $http, $window, $filter, $rootScope) {
var URL = 'https://tn.smartcommunitylab.it/cityreport';
//var URL = 'https://dev.smartcommunitylab.it/cityreport';
var APP_VERSION = '0.1.2';
var APP_BUILD = '';
var app = 'c... | smartcommunitylab/sco.cityreport | roveretosegnala/www/js/services/conf.js | JavaScript | apache-2.0 | 8,684 |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, Injectable, InjectionToken, Injec... | tongpa/pypollmanage | pypollmanage/public/javascript/node_modules/@angular_ols/material/esm2015/snack-bar.js | JavaScript | apache-2.0 | 22,436 |
/*
Richie Mendelsohn
Remember Your Friends - Makeymakey Moire magic Speed / Memory collab make friends game
3/21/16
*/
/*
WORDS OF WISDOM:
- Keep it simple, stupid...
TODO / Ideas:
- [P0
- [P2] Speed up demo when there's more moves, and like slow the pace down as it gets to the end...
- [P1] Do a timeout???
... | richieM/richieM.github.io | theWorm/sketch.js | JavaScript | apache-2.0 | 20,118 |
define([
'underscore',
'shared/util/TemplateUtil',
'shared/models/Model',
'shared/util/SchemaUtil'
], function (_, TemplateUtil, Model, SchemaUtil) {
var getDisplayType = function (displayType) {
return SchemaUtil.DATATYPE[displayType] || displayType;
};
var baseURL = TemplateUtil.tpl('/api/internal... | alanzhou-okta/okta-signin-widget | node_modules/@okta/courage/src/models/ud/PreviewMapping.js | JavaScript | apache-2.0 | 2,367 |
var url = require("url");
var fs = require("fs");
function Router() {
}
Router.prototype.route = function(request, response, callback) {
var self = this;
var uri = url.parse(request.url).pathname;
if (uri.charAt(0) === '/') {
uri = uri.substr(1);
}
if (uri.charAt(uri.length - 1) === '/')... | ethan476/NodeMVC | lib/system/core/Router.js | JavaScript | apache-2.0 | 3,148 |
;(function(){
function setEqualHeight(columns) {
var tallestcolumn = 0;
columns.each(function() {
currentHeight = $(this).height();
if(currentHeight > tallestcolumn) {
tallestcolumn = currentHeight;
}
}
);
columns.height(tallestcolumn);
}
var ... | KylinOLAP/KylinTutorial | js/main.js | JavaScript | apache-2.0 | 7,603 |
define(
"dojo/cldr/nls/en-nz/gregorian", //begin v1.x content
{
"dateFormat-short": "d/MM/yy",
"dateFormat-medium": "d/MM/yyyy",
"dateFormat-long": "d MMMM y",
"dateFormatItem-MMMMd": "d MMMM",
"dateFormat-full": "EEEE, d MMMM y",
"dateFormatItem-Md": "d/M",
"dateFormatItem-yyyyMM": "MM/yyyy",
"dateFormatItem-y... | WASdev/skunkworks.libertycar | LibertyCar/WebContent/remote/dojo-release-1.7.4/dojo/cldr/nls/en-nz/gregorian.js | JavaScript | apache-2.0 | 362 |
// Generated by CoffeeScript 1.8.0
(function() {
var nconf;
nconf = require('nconf');
nconf.argv().env();
nconf.defaults({
DYNAMODB_ENDPOINT_DEV: 'http://localhost:9000/dynamodb/',
DYNAMODB_REGION_DEV: 'us-east-1',
USE_COGNITO_DEV: false,
DYNAMODB_ENDPOINT_TEST: 'http://localhost:8080/dynamod... | gartox/mars-rover-json-test | viewer/lib/mynconf.js | JavaScript | apache-2.0 | 910 |
var http = require('http');
var url = require('url');
var path = require('path');
var fs = require('fs');
var _ = require('lodash');
var chalk = require('chalk');
var makeJUnitXml = require('../../test/utils/make_j_unit_xml');
var docRoot = path.join(__dirname, '../../test/integration/browser_yaml_suite');
chalk.enable... | elkarel/north | north/node_modules/elasticsearch/scripts/run_browser_integration_suite/server.js | JavaScript | apache-2.0 | 5,167 |
var webdriver = require('selenium-webdriver'),
By = require('selenium-webdriver').By;
function ITProPage(driver) {
this.driver = driver;
}
ITProPage.prototype.click_picture = function (WebBrowser) {
// Androidの場合の処理
if (WebBrowser.indexOf('Android') == 0) {
//var PC_button = '//img[@src="/images/n/itpr... | hirokundayon/koedo | Node.js/Pages/ITProPage.js | JavaScript | apache-2.0 | 1,577 |
UserProvider = require('../userprovider').UserProvider;
var userProvider= new UserProvider(GLOBAL.mongo_host, GLOBAL.mongo_port);
exports.register = function(req, res) {
userProvider.register(req.query.token, function(error, userObject) {
if(error) {
console.log(error.toString());
... | alonl/bestmatch-server | routes/user.js | JavaScript | apache-2.0 | 2,308 |
/*!
* ${copyright}
*/
sap.ui.define([
"sap/ui/test/selectors/_BindingPath",
"sap/m/ListBase",
"sap/m/ListItemBase",
"sap/ui/thirdparty/jquery"
], function (_BindingPath, ListBase, ListItemBase, $) {
"use strict";
/**
* Selector generator for an item inside row in a ListBase control (eg:... | SAP/openui5 | src/sap.ui.core/src/sap/ui/test/selectors/_TableRowItem.js | JavaScript | apache-2.0 | 3,433 |
import Health from '../utils/mappings/health';
import notify from '../utils/notify';
import errorMessage from '../utils/xhr-error-message';
export default function(xhr, defaultMessage) {
var message = errorMessage(xhr, defaultMessage);
var severity = (xhr.status === 422 || (xhr[0] && xhr[0].status === 422)) ... | vine77/saa-groups | app/utils/xhr-error.js | JavaScript | apache-2.0 | 406 |
'use strict';
var adapters = [
['local', 'http'],
['http', 'http'],
['http', 'local'],
['local', 'local']
];
if ('saucelabs' in testUtils.params()) {
adapters = [['local', 'http'], ['http', 'local']];
}
var downAdapters = ['local'];
adapters.forEach(function (adapters) {
describe('suite2 test.replicatio... | yaronyg/pouchdb | tests/integration/test.replication.js | JavaScript | apache-2.0 | 141,381 |
'use strict';
angular.module('core').directive('showonhoverparent',
function () {
return {
link: function (scope, element, attrs) {
//element.hide();
element.parent().bind('mouseenter', function () {
// element.show();
});
... | valuesetworkbench/valueset-workbench | public/modules/core/directives/showonhover.client.directive.js | JavaScript | apache-2.0 | 472 |
/**
* Created by Dio on 7/2/2015.
*/
'use strict';
var utils = require('../utils');
var express = require('express');
var router = express.Router();
var mongoose = require('mongoose');
var toDoSchema = mongoose.model('Todo');
//endregion
router.get('/init', function (req, res) {
new toDoSchema({
user_id: uid,
... | diophung/asker | routes/todos.js | JavaScript | apache-2.0 | 2,376 |
/*
* Copyright 2021-2021 Robbyxp1 @ github.com
*
* 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 ag... | EDDiscovery/EDDiscovery | WebSite/EDD/jslib/websockets.js | JavaScript | apache-2.0 | 869 |
/**
* Copyright 2020 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 applicable law ... | GoogleChromeLabs/tooling.report | tests/transformations/subtests/compress-images/rollup/src/index.js | JavaScript | apache-2.0 | 675 |
export default (sequelize, DataTypes) => sequelize.define('vehicleType', {
id: {
type: DataTypes.BIGINT,
allowNull: false,
primaryKey: true,
autoIncrement: true,
field: 'id',
},
type: {
type: DataTypes.TEXT,
allowNull: false,
field: 'type',
},
}, {
tableName: 'vehicle_type',
})... | AmaralGuincho/api | models/vehicle_type.js | JavaScript | apache-2.0 | 322 |
var editor_style_1=new Abstract({style_init:function(){this.mce_handle=this.el;this.addEvent("click",this.status.bind(this));this.addEvent("click",function(a){if(!this.$init){this.mce_handle.setOpacity(1);" "==this.inc.doc.body.innerHTML.substr(0,6)&&(this.inc.doc.body.innerHTML=this.inc.doc.body.innerHTML.slice(6... | liuguogen/Ecstore | public/app/desktop/statics/js_mini/coms/editor.js | JavaScript | apache-2.0 | 12,873 |
/*
* 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 ... | firejack-open/Firejack-Platform | platform/src/main/webapp/js/net/firejack/platform/console/domain/store/TypeEntitiesStore.js | JavaScript | apache-2.0 | 1,554 |
#! /usr/bin/env node
var _ = require('lodash');
var color = require('bash-color');
var Table = require('cli-table');
var findLineColumn = require('find-line-column');
var fs = require('fs');
var path = require('path');
var rousseau = require('../lib');
var tokenizeHTML = require('tokenize-htmltext');
// Colors for ... | GitbookIO/rousseau | bin/rousseau.js | JavaScript | apache-2.0 | 2,534 |