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 |
|---|---|---|---|---|---|
/*
Copyright 2015, 2016 OpenMarket Ltd
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, sof... | aperezdc/matrix-react-sdk | src/components/views/voip/VideoFeed.js | JavaScript | apache-2.0 | 1,467 |
/*global sap */
sap.ui.define(
["sap/ui/demo/tracker/base/Controller",
"sap/ui/demo/tracker/util/Utility"],
function (Controller, Utility) {
"use strict";
return Controller.extend("sap.ui.demo.tracker.view.IssueEdit", {
onInit: function () {
this.editFormView = this.byId("editFormView");
... | shubhadeep/ui5-tracker-mvc | view/IssueEdit.controller.js | JavaScript | apache-2.0 | 2,108 |
sap.ui.define(function() {
"use strict";
return {
name: "TestSuite for Topic: Security",
defaults: {
loader:{
paths:{
"testdata/core": "test-resources/sap/ui/core/qunit/"
}
},
qunit: {
version: 2
},
sinon: {
version: 4
},
module: "test-resources/sap/ui/core/qunit/{name}.... | SAP/openui5 | src/sap.ui.core/test/sap/ui/core/qunit/testsuites/testsuite.security.qunit.js | JavaScript | apache-2.0 | 1,846 |
import GameSession from '~/GameSession'
const GameSessionManagerWrapper = env => class GameSessionManager {
constructor() {
// Map<GuildId, Map<TextChannelId, GameSession>>
this.serverSessions = new Map()
}
getGameSession(guild, channel) {
const sessions = this.getGameSessions(guild)
let sessio... | LouisTakePILLz/6v6bot | src/GameSessionManager.js | JavaScript | apache-2.0 | 987 |
casper.test.begin('Test Magento Hipay Enterprise Config', function(test) {
phantom.clearCookies();
var fields = [],
configsID = ["", "_moto", "_basket"];
casper.start(baseURL + "admin/")
.then(function() {
this.logToBackend();
})
/* Check HiPay Enterprise menu blocs */
.then(function() {
... | hipay/hipay-fullservice-sdk-magento1 | bin/tests/001_ADMIN_MENUS/0_admin/0101-TEST_HIPAY_ENTERPRISE_CONFIG.js | JavaScript | apache-2.0 | 2,439 |
/*
* Copyright 2016 Nicolas Lochet 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... | nicocube/gloss2text | test/12-parse-paradigms.spec.js | JavaScript | apache-2.0 | 6,592 |
var searchData=
[
['messagedata',['messageData',['../da/d16/classch_1_1bfh_1_1gr33nopo55um_1_1enocean_1_1telegram_1_1Radio802.html#a7a73fbb66042c771a8c03875b5167bd1',1,'ch::bfh::gr33nopo55um::enocean::telegram::Radio802']]],
['messagerorg',['messageRorg',['../da/d16/classch_1_1bfh_1_1gr33nopo55um_1_1enocean_1_1tele... | Gr33nOpo55um/EnOcean | documentation/doxygen/html/search/variables_7.js | JavaScript | apache-2.0 | 438 |
/**
* jQuery TAH Plugin
* Using for Textarea-Auto-Height
* @Version: 0.4
* @Update: December 13, 2011
* @Author: Phoetry (http://phoetry.me)
* @Url: http://phoetry.me/archives/tah.html
**/
~function($){
$.fn.tah=function(opt){
opt=$.extend({
moreSpace:10,
maxHeight:600,
animateDur:200
},opt);
ret... | diandianxiyu/ApiTesting | public/assets/global/scripts/textareaAutoHeight.js | JavaScript | apache-2.0 | 1,190 |
/**
* @license
* 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 requir... | mdittmer/web-apis | main/chromestatus_idl_urls_import.es6.js | JavaScript | apache-2.0 | 1,758 |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'onboarding',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-... | gabrielgrant/mayday-2.0-onboarding | config/environment.js | JavaScript | apache-2.0 | 1,076 |
const Content = require('../../../../common_functions/content').Content;
const ValidAccountOpening = require('../../../../common_functions/valid_account_opening').ValidAccountOpening;
const Validate = require('../../../../common_functions/validation').Validate;
const JapanAccOpeningData = require... | teo-binary/binary-static | src/javascript/binary/websocket_pages/user/new_account/japan_acc_opening/japan_acc_opening.ui.js | JavaScript | apache-2.0 | 10,433 |
var searchData=
[
['localupdateapplied',['LocalUpdateApplied',['../class_f_h_s_d_k_1_1_sync_1_1_f_h_sync_client.html#a95d1dd36f40d4b0ace8b96820554fb3c',1,'FHSDK::Sync::FHSyncClient']]]
];
| feedhenry/fh-dotnet-sdk | Documentations/html/search/events_2.js | JavaScript | apache-2.0 | 190 |
import angular from 'angular';
import Navbar from './navbar/navbar';
import User from './user/user';
import AppIcon from './appicon/appicon'
let commonModule = angular.module('app.common', [
Navbar,
User,
AppIcon
])
.name;
export default commonModule;
| ryno412/connect | client/app/common/common.js | JavaScript | apache-2.0 | 261 |
ConfApplyView = Ext.extend(Ext.Panel, {
searchPanel : null,
gridPanel : null,
store : null,
topbar : null,
constructor : function(a) {
Ext.applyIf(this, a);
this.initUIComponents();
ConfApplyView.superclass.constructor.call(this, {
id : "ConfApplyView",
title : "未通过审核会议查询",
iconCls : "menu-confApply... | jacarrichan/eoffice | src/main/webapp/js/admin/ConfApplyView.js | JavaScript | apache-2.0 | 9,359 |
exports.definition = {
config: {
columns: {
title: "TEXT",
directions: "TEXT"
},
defaults: {},
adapter: {
type: "sql",
collection_name: "BusStops",
migration: 20130417200059
}
},
extendModel: function(Model) ... | jbeuckm/AlloyMigrationExample | Resources/alloy/models/BusStop.js | JavaScript | apache-2.0 | 1,007 |
import {ddescribe, describe, it, iit, xit, expect, beforeEach, afterEach,
AsyncTestCompleter, inject, proxy, SpyObject} from 'angular2/test_lib';
import {IMPLEMENTS} from 'angular2/src/facade/lang';
import {WrappedValue} from 'angular2/src/change_detection/pipes/pipe';
import {ObservablePipe} from 'angular2/src/chan... | justinfagnani/angular | modules/angular2/test/change_detection/pipes/observable_pipe_spec.js | JavaScript | apache-2.0 | 3,664 |
$(document).ready(function(){
$('a#del_button').bind('click', function(){
var del_data = $(this).parents('tr').find('td').first().text().trim();
if (confirm("Are you sure you want to delete '" + del_data + "'?")) {
$(this).parents('tr').remove();
$.ajax({
type: "POST",
contentType: "applicat... | disfear86/mushcloud | app/static/js/delete.js | JavaScript | apache-2.0 | 552 |
Torrents = new Meteor.Collection('torrents');
| luixal/eXtrenosTorrent | common/torrents.js | JavaScript | apache-2.0 | 46 |
import React, { Component } from 'react';
import {Provider} from 'react-redux';
import configureStore from './store/ConfigureStore';
import App from './containers/App';
const store = configureStore();
export default class Root extends Component {
render() {
return (
<Provider store={store}>
<App /... | MisterZhouZhou/ReactNativeLearing | ReduxLearn/src/Root.js | JavaScript | apache-2.0 | 353 |
typeof(SVGeneration) == "undefined" && (SVGeneration = {});
SVGeneration.Editor = React.createClass({displayName: "Editor",
getInitialState: function() {
return {
active: 'Parameters',
image: false,
script: false,
windowHeight: $(window).height(),
currentParameters: []
};
},
... | DDKnoll/SVGeneration | js/.module-cache/fcba3e99527d4a0b82168eafec624a8b9682cdd2.js | JavaScript | apache-2.0 | 4,912 |
/*
ScratchJr © Massachusetts Institute of Technology and Tufts University - 2014, All Rights Reserved.
*/
var frame;
var isiPad;
var DEGTOR = Math.PI/180;
var WINDOW_INNER_HEIGHT = window.innerHeight;
var WINDOW_INNER_WIDTH = window.innerWidth;
var scaleMultiplier = WINDOW_INNER_HEIGHT / 768.0;
///////////////////... | in1004kyu/tokitool | demos/Inject/js/utils/lib.js | JavaScript | apache-2.0 | 15,024 |
/*
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in com... | Bedework/bw-classic | deployment/webadmin/portlet/resources/resources/includes.js | JavaScript | apache-2.0 | 5,122 |
const passport = require("passport");
//const LocalStrategy = require("passport-local").Strategy;
const User = require("./../models/user");
//const expressJwt = require('express-jwt');
const validator = require('validator');
const flash = require('flash');
const helper = require("./../helpers/general.js");
const succes... | rtorcato/contactmanager | app/controllers/AuthController.js | JavaScript | apache-2.0 | 5,493 |
module.exports = function(RED) {
function LogstashFilterTranslateNode(config) {
RED.nodes.createNode(this, config);
var node = this;
this.on("input", function(msg) {
node.send(msg);
});
this.on("close", function() {
});
}
RED.nodes.registerType(... | consulthys/node-red-contrib-logstash | nodes/filter/translate/translate.js | JavaScript | apache-2.0 | 373 |
addI18n({
info: {
head:'Confirm your Account',
},
fgt:{
info:'A message will be sent to your email if the account exists.',
m:'Your Mail',
sub:'Confirm',
abrt:'Cancel',
}
}); | Appudo/Appudo.github.io | static/dashs/www.appudo.com/d/pub/i18n/en-gb/confirm.js | JavaScript | apache-2.0 | 230 |
(function() {
'use strict';
let isNode = false;
if (typeof module !== 'undefined' && module.exports) {
isNode = true;
}
/**
* Copyright 2016 Pawel Psztyc, The ARC team
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with th... | jarrodek/cookie-parser | parser.js | JavaScript | apache-2.0 | 19,330 |
import Koa from 'koa';
import bodyParser from 'koa-bodyparser';
import request from 'supertest';
const botToken = process.env.BOT_TOKEN;
jest.mock('../../bot/', () => ({
createRequestHandler: jest.fn(() => jest.fn(() => Promise.resolve())),
}));
function makeApp() {
const app = new Koa();
app.use(bodyParser())... | PPAV-inc/telegram-bot | src/routes/__tests__/bot.spec.js | JavaScript | apache-2.0 | 1,691 |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.kurentoUtils =... | Kurento/kurento-utils-bower | js/kurento-utils.js | JavaScript | apache-2.0 | 158,409 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.f = f;
var name = exports.name = 'tabs';
/**
* <tabs home="#isNowHome" position="top">
* <ul>
* <li><a tab-href="#isNowHome">Home</a></li>
* </ul>
* <ANY id="isNowHome" class="tabs-content">
* <p>Bla..<p>
* </AN... | alejonext/ink.angular | lib/tabs.js | JavaScript | apache-2.0 | 1,181 |
/* global init, assertFailure, dump */
'use strict';
require('./_base');
var assert = require('assert'),
async = require('async'),
Model = require('arrow').Model,
should = require('should');
describe('Custom Objects', function () {
var FruitModel = null,
FruitNameModel = null,
fruitCount = 0,
initialCount ... | titanium-forks/appcelerator.appc.arrowdb | test/test-custom-object.js | JavaScript | apache-2.0 | 19,775 |
'use strict';
angular.module('reikopcomApp')
.controller('SignupCtrl', function ($scope, Auth, $location) {
$scope.user = {};
$scope.errors = {};
$scope.register = function(form) {
$scope.submitted = true;
if(form.$valid) {
Auth.createUser({
name: $scope.user.name,
... | reikop/reikop.com | client/app/account/signup/signup.controller.js | JavaScript | apache-2.0 | 900 |
'use strict';
import { module } from 'angular';
import { Registry } from '@spinnaker/core';
import { CANARY_ACATASK_ACATASKEXECUTIONDETAILS_CONTROLLER } from './acaTaskExecutionDetails.controller';
import { CANARY_ACATASK_ACATASKSTAGE } from './acaTaskStage';
import { CANARY_ACATASK_ACATASKSTAGE_TRANSFORMER } from '... | spinnaker/deck | packages/app/src/canary/acaTask/acaTaskStage.module.js | JavaScript | apache-2.0 | 1,061 |
// @flow
type NodeCallbackType<T=*, RET=any> = (error: any, ...rest: Array<T>)=>RET
type EventCallbackType<T=*, RET=any> = (...rest: Array<T>)=>RET
type UserAttributesType<T=string|number> = {
[key:string]: T | T[]
}
type FeaturesType = {
rules: RulesType
}
type EvaluatedFeaturesType = {
[key: string]: string
... | featureflow/featureflow-javascript-sdk | flow/types.js | JavaScript | apache-2.0 | 1,906 |
sap.ui.define(function () { 'use strict';
var dialogSvg = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="160" height="160" viewBox="0 0 160 160" id="sapIllus-Dialog-BeforeSearch">
<path class="sapIllus_AccentColor" d="M132.6937,27.73c-3.2533-1.26-4.83-4.3131-6.05-7... | SAP/openui5 | src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/illustrations/sapIllus-Dialog-BeforeSearch.js | JavaScript | apache-2.0 | 3,121 |
(function () {
"use strict";
/*
* Should only have view module dependencies or pluggable behaviour enhancer
*/
angular.module("mzDemo", ["mzResponsive", "mzMainpage"]);
})();
| HeberLZ/mzDemo | src/app/app.js | JavaScript | apache-2.0 | 190 |
var app;
app = {};
(function() {
app.helpers = {};
app.helpers.conf = require('app/helpers/conf');
app.helpers.util = require('app/helpers/util');
app.helpers.style = require('app/helpers/style');
app.models = require('app/models/Memo');
app.views = {};
app.views.root = require('app/views/win');
app.vie... | ofl/TiMemo | Resources/app.js | JavaScript | apache-2.0 | 395 |
//Generated from NumericJS 1.2.6
//https://github.com/sloisel/numeric/releases/tag/v1.2.6
//
//Numeric Javascript
//Copyright (C) 2011 by Sébastien Loisel
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//i... | Sable/mcvm-js | lib/numeric.js | JavaScript | apache-2.0 | 143,053 |
angular.module("appSite", ["ngMessages", "ngRoute", "ngCkeditor", "ui.utils.masks", "ngFileUpload", "angulike"]);
| leandroseverino/application-florenca | js/app.js | JavaScript | apache-2.0 | 116 |
define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/Evented',
"dojo/request/script",
], function(declare, lang, Evented, script){
return declare('RouteDetailsForDropdown', [Evented], {
busRouteFeatureLayer:"",
projectId:"",
getRoutes:function(){
var urlParameters = "/query?";
urlP... | CanterburyRegionalCouncil/MetroInfoMaps | src/js/ecan/RouteDetailsForDropdown.js | JavaScript | apache-2.0 | 902 |
// Load modules
var Joi = require('joi');
var Hoek = require('hoek');
// Declare internals
var internals = {};
exports.assert = function (type, options, message) {
var error = Joi.validate(options, internals[type]).error;
Hoek.assert(!error, 'Invalid', type, 'options', message ? '(' + message + ')' : '',... | thebillkidy/RandomProjects | VirtualAssistant/Server/node_modules/hapi/lib/schema.js | JavaScript | apache-2.0 | 11,908 |
/*
* Copyright 2021 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 ... | google/web-prototyping-tool | scripts/migration/input/webpack.config.js | JavaScript | apache-2.0 | 1,204 |
var Hapi = require('hapi'),
path = require('path'),
port = process.env.PORT || 3030,
server = new Hapi.Server(port),
routes = {
css: {
method: 'GET',
path: '/css/{path*}',
handler: createDirectoryRoute('css')
},
js: {
method: 'GET',... | fertech/task-list | server.js | JavaScript | apache-2.0 | 1,263 |
#!/usr/bin/env node
// Copyright 2012 Google 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 applicabl... | mduvall/traceur | src/node/filecompiler.js | JavaScript | apache-2.0 | 10,646 |
/**
* @fileoverview Genotet tooltip.
*/
'use strict';
/** @const */
genotet.tooltip = {};
/**
* Tooltip container
* @private {jQuery}
*/
genotet.tooltip.container_ = null;
/** @private {number} */
genotet.tooltip.mouseX_ = 0;
/** @private {number} */
genotet.tooltip.mouseY_ = 0;
/**
* Default offset of the t... | ViDA-NYU/genotet | src/tooltip.js | JavaScript | apache-2.0 | 1,631 |
export default function gup(name, url) {
if (!url) url = location.href;
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(url);
return results == null ? null : results[1];
}
| bingweichen/GOKU | fontend/src/utils/getUrlParam.js | JavaScript | apache-2.0 | 298 |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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 a... | stdlib-js/stdlib | lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-definition-spacing/lib/main.js | JavaScript | apache-2.0 | 3,583 |
const { app, ipcMain } = require("electron");
exports.tailPid = null;
exports.setupHandlers = monitorGroup => {
ipcMain.handle("terminate", function terminate() {
app.quit();
});
ipcMain.handle("getAll", function getAll() {
return getProcessesStatus();
});
ipcMain.handle("getOne", function getOne(... | mnutt/khepri | electron-app/src/ipc.js | JavaScript | apache-2.0 | 2,055 |
//@line 38 "e:\builds\moz2_slave\rel-m-rel-xr-w32-bld\build\toolkit\components\alerts\resources\content\alert.js"
// Copied from nsILookAndFeel.h, see comments on eMetric_AlertNotificationOrigin
const NS_ALERT_HORIZONTAL = 1;
const NS_ALERT_LEFT = 2;
const NS_ALERT_TOP = 4;
var gFinalSize;
var gCurrentSize = 1;
var ... | bwp/SeleniumWebDriver | third_party/gecko-10/win32/bin/chrome/toolkit/content/global/alerts/alert.js | JavaScript | apache-2.0 | 5,470 |
/**
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"... | matrosov-nikita/cordova-lib | spec-cordova/util.spec.js | JavaScript | apache-2.0 | 14,209 |
function WalkWithMyFeet() {
this.go = function() {
console.log("go walking");
}
}
function DriveMyCar() {
this.go = function() {
console.log("go by car");
}
}
function myFactory(methodOfTransport) {
switch(methodOfTransport) {
case "walk":
return new WalkWithMyFeet();
case "drive":
... | shahmanish/cms | app/www/js/app_switch_case.js | JavaScript | apache-2.0 | 407 |
/*
* SmartMenus jQuery v0.9.3
* http://www.smartmenus.org/
*
* Copyright 2013 Vasil Dinkov, Vadikom Web Ltd.
* http://vadikom.com/
*
* Released under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
(function($) {
var menuTrees = [],
IE = !!window.createPopup, // we need to detec... | mr-niels-christensen/environment-scotland-dot-rural | src/main/frontend/js/jquery.smartmenus.js | JavaScript | apache-2.0 | 40,794 |
var searchData=
[
['downloadmediafrom360fly_3atolocation_3awithcompletionhandler_3a',['downloadMediaFrom360Fly:toLocation:withCompletionHandler:',['../interface_f_l_y_connected_device.html#a4f4455f8499c1b8820907d46672c0c8d',1,'FLYConnectedDevice']]]
];
| 360fly/360flySDK-iOS | Doxygen/search/functions_1.js | JavaScript | apache-2.0 | 255 |
function inject(url) {
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.src = url;
document.body.appendChild(script); // run the script
document.body.removeChild(script); // clean up
}
inject(chrome.extension.getURL('/injected.js'));
| 9inevolt/betterdgg | betterdgg/content-scripts/inject.js | JavaScript | apache-2.0 | 315 |
const _ = require('lodash');
const md5 = require('md5');
const LRU = require('lru-cache');
module.exports = function(locals) {
var project = locals.project;
var appName = locals.app.get('name');
var model = locals.services.models.Page;
var cache = LRU({
max: 500 * 1000,
length: function(item) {
i... | agneta/platform | pages/core/database.js | JavaScript | apache-2.0 | 1,722 |
'use strict';
angular.module('cloudSlangWebsiteApp')
.factory('MessagesService', function ($rootScope) {
// App labels
$rootScope.messages = {
// nav bar
navGettingStartedTitle: 'Get Started',
navUseCasesTitle: 'Use Cases',
navAboutTitle: 'About Us',
... | lirantal/CloudSlang.github.io | app/scripts/services/messages.js | JavaScript | apache-2.0 | 7,281 |
class CategoriesModel {
constructor($q) {
'ngInject';
this.$q = $q;
this.categories = [
{"id": 0, "name": "Development"},
{"id": 1, "name": "Design"},
{"id": 2, "name": "Exercise"},
{"id": 3, "name": "Humor"}
];
}
getCategories... | hankandre/angular1-in-angular2 | client/app/common/models/categories.model.js | JavaScript | apache-2.0 | 607 |
/*
* 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 ... | hgschmie/shindig | features/opensocial-templates/container.js | JavaScript | apache-2.0 | 12,055 |
var models = require('../models');
var Account = models.Account;
function loginPage(req, res) {
res.render('login', {csrfToken: req.csrfToken()});
}
function signupPage(req, res) {
res.render('signup', {csrfToken: req.csrfToken()});
}
function logout(req, res) {
req.session.destroy();
res.redirect('/');
}
... | cognettings/nefarious-octo-prune | src/controllers/Account.js | JavaScript | apache-2.0 | 1,737 |
const path = require('path');
const { exec } = require('child_process');
const dirname = __dirname;
module.exports = async function resetDB() {
return new Promise((resolve, reject) => {
exec(
`sh ${path.resolve(dirname, '../../../src/database/recreate-db.sh')} notifications_test notificator`,
(error... | usful/notification-microservice | test/scripts/methods/reset-db.js | JavaScript | apache-2.0 | 524 |
"use strict";
import React, {Component, PropTypes} from "react";
import Rx from "rx";
import {connect} from "react-redux";
import {Label} from "react-bootstrap";
import FlavorList from "../components/FlavorList";
import Header from "../components/Header";
import Selector from "../components/Selector";
import {toggleVi... | fidash/widget-compareflavors | src/js/containers/App.js | JavaScript | apache-2.0 | 13,682 |
/*!
* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
//jQuery to collapse the navbar on scroll
//
//$(window).scroll(function() {
// if ($(".navbar").offset().top > 25) {
// ... | aldrinh07/aldrinh07.github.io | js/grayscale.js | JavaScript | apache-2.0 | 1,029 |
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
define('WinJS/Application/_State',[
'exports',
'../Core/_Global',
'../Core/_WinRT',
'../Core/_Base',
'../Core/_BaseUti... | xirzec/winjs-modules | WinJS/Application.js | JavaScript | apache-2.0 | 41,522 |
import './controller';
import './link';
| zeckson/vernam-cipher | src/js/main.js | JavaScript | apache-2.0 | 41 |
/************************************************
* AUTHOR: Alexandre Cazala *
* CREATION_DATE: 23/11/16 *
* EMAIL: alexandre.cazala@gmail.com *
* LICENSE: Apache 2.0 *
***********************************************/
module.exports = {... | Trigunale/PFE_Facilitation_agile | configurations/database.js | JavaScript | apache-2.0 | 533 |
/**
* Blockly Apps: Turtle Graphics
*
* Copyright 2012 Google Inc.
* http://blockly.googlecode.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/licen... | tobyk100/blockly-trunk | apps/turtle/turtle.js | JavaScript | apache-2.0 | 12,554 |
/*eslint no-console: 0, no-unused-vars: 0, no-undef:0*/
"use strict";
var port = process.env.PORT || 3000;
var server = require("http").createServer();
global.__base = __dirname + "/";
var init = require(global.__base + "utils/initialize");
//Initialize Express App for XSA UAA and HDBEXT Middleware
var app = init.ini... | marionschlotte/hana-shine-xsa | user-js/server.js | JavaScript | apache-2.0 | 598 |
'use strict';
/**
* @ngdoc function
* @name angularJsProApp.controller:Chapter18Ctrl
* @description
* # Chapter18Ctrl
* Controller of the angularJsProApp
*/
angular.module('angularJsProApp')
.controller('Chapter18Ctrl', function ($scope, sampleFactory, sampleService, sampleProvider, loggProvider) {
$scope... | johncol/proangularjs | app/scripts/controllers/chapter18.js | JavaScript | apache-2.0 | 2,976 |
var CONN_STATUS = {
IDLE: 0,
SCANNING: 1,
CONNECTED: 2,
ADD_RECEIVED: 3,
ERROR: -1,
}
module.exports = {
CONN_STATUS: CONN_STATUS,
} | ckhoon/ALP_Platform | ble-port/constant.js | JavaScript | apache-2.0 | 149 |
var stage;
var queue;
var balls=[];
var socket;
function init(){
console.log("initiating");
stage=new createjs.Stage("gameScene");
createjs.Ticker.setFPS(60);
createjs.Ticker.addEventListener("tick",tick);
stage.enableMouseOver(10);
var btn=new ui.SimpleButton('hi, this is yiou');
btn.setButton({color:"wh... | yiochen/Controller | game.js | JavaScript | apache-2.0 | 2,026 |
//amusement
var amusement = [
{
"id": 1,
"name": "Ferris wheel",
"price": 10.00,
"open": ["Monday","Wednesday","Friday"],
"children": true
},
{
"id": 2,
"name": "Big Drop",
"price": 15.00,
"open": ["Tuesday","Friday","Saturday","Sunday"... | uberdatageek/uberdatageek.github.io | projects/lab2/js/amusement-data.js | JavaScript | apache-2.0 | 558 |
'use strict';
angular.module('jhipstersampleApp')
.config(function ($stateProvider) {
$stateProvider
.state('requestReset', {
parent: 'account',
url: '/reset/request',
data: {
authorities: []
},
... | marhan/jhipstersample | src/main/webapp/scripts/app/account/reset/request/reset.request.js | JavaScript | apache-2.0 | 904 |
var ical = require('./ical')
, fs = require('fs')
exports.parseFile = function(filename){
return ical.parseICS(fs.readFileSync(filename, 'utf8'))
}
var rrule = require('rrule').RRule
ical.objectHandlers['RRULE'] = function(val, params, curr, stack, line){
curr.rrule = line;
return curr
}
var originalEnd = ic... | peterbraden/ical.js | node-ical.js | JavaScript | apache-2.0 | 1,508 |
/* Copyright 2016 Streampunk Media Ltd.
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 wri... | Streampunk/dynamorse | funnel/macadamInlet.js | JavaScript | apache-2.0 | 1,107 |
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
| paulcastro/openwhisk-wskdeploy | tests/usecases/alarmtrigger/actions/hello.js | JavaScript | apache-2.0 | 98 |
// nr = not as per eslint:recommended
module.exports = {
"rules": {
"comma-spacing": 2, // nr
"eol-last": 2, // nr
"eqeqeq": 2, // nr
"indent": [2, "tab", { "SwitchCase": 1 }], // nr
"linebreak-style": ["error", "unix"], // nr
"new-parens": 2, // nr
"no-debugger": 2,
"no-dupe-args": ... | Brightspace/eslint-config-brightspace | common-config.js | JavaScript | apache-2.0 | 1,107 |
'use strict';
module.exports = {
db: {
name: 'db',
connector: 'memory',
},
es: {
name: 'es',
index: process.env.ELASTIC_INDEX,
hosts: [
{
protocol: "http",
host: process.env.ELASTIC_HOST,
port: process.env.ELASTIC_PORT
}
],
requestTimeout: 3000,
... | societe-generale/react-loopback-generator | generators/server-datasource/templates/server/datasources.only-elastic.js | JavaScript | apache-2.0 | 342 |
/**
* @license
* Copyright 2014 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 requir... | osric-the-knight/foam | js/foam/ui/md/TwoPane.js | JavaScript | apache-2.0 | 3,042 |
/**
* Copyright (C) 2016 Steven Bartels
*
* 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... | stevinho/pat | scripts/controllers/submit5.controller.js | JavaScript | apache-2.0 | 2,778 |
class itemTreeStateStorage {
constructor( startStateOpen = true ) {
this.startStateOpen = startStateOpen;
this.storage = {};
}
get ( id ) {
return this.storage[id];
}
set ( id, model ) {
this.storage[id] = _.assignIn( {}, model );
}
isOpen ( id ) {
... | antipodejs/antipode | src/components/itemTreeStateStorage.js | JavaScript | apache-2.0 | 558 |
Titanium.include('../internal/wagnerpalombo.js');
var window = {};
window.menu = (function() {
var _init = false;
var m = {};
var win = null;
var menu = null;
m.init = function ()
{
_init = true;
m.win = Titanium.UI.currentWindow;
m.load();
};
m.load = function(){};
return m;
})();
window.m... | wagner-palombo/titanium_appcelerator_facebook_menu | Resources/class/windows/wagnerpalombo.menu.js | JavaScript | apache-2.0 | 332 |
const bourbon = require("./index");
module.exports = function(eyeglass, sass) {
return {
sassDir: bourbon.includePaths[0]
};
};
| entoj/entoj-core | test/__fixtures__/Application/Compact/sites/base/common/sass/bourbon/eyeglass-exports.js | JavaScript | apache-2.0 | 137 |
var eachSectionDegrees = 360 / 12;
var startRotation = -90 - (eachSectionDegrees / 2);
var KonvaView = require('./konva');
var Bus = require('bus');
module.exports = KonvaView.extend({
wedgeGroup: null,
labelGroup: null,
currentTween: null,
events: {
'mouseover .note-wedge': '_scaleUpWedge',
... | leemiller/optikal | app/scripts/views/color-wheel.js | JavaScript | apache-2.0 | 3,761 |
'use strict';
const async = require('async');
const assembly = require('../assembly');
const BL = require('./index');
module.exports = function defineDaemonJobs (daemon, config) {
daemon.job('basicJob', (soajs, next) => {
console.log('Our job is running...');
soajs.config = config;
process.emit('daemon-... | peid/testing | lib/jobs.js | JavaScript | apache-2.0 | 793 |
sap.ui.predefine("fixture/forced-async-loading/bundle1", [], function() {
"use strict";
return {
id: "fixture/forced-async-loading/bundle1"
};
});
| SAP/openui5 | src/sap.ui.core/test/sap/ui/core/qunit/loader/fixture/forced-async-loading/bundle1.js | JavaScript | apache-2.0 | 152 |
/*
* Copyright 2015-2016 OpenCB
*
* 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 ... | opencb/jsorolla | src/webcomponents/commons/filters/deprecated/canvas-caller-filter.js | JavaScript | apache-2.0 | 3,568 |
'use strict';
angular.module('owlcalcApp').directive('focus', function () {
return {
link: function(scope, element, attrs) {
element[0].focus();
}
};
});
| thesnapdragon/owlcalc | app/scripts/directives/focus.js | JavaScript | apache-2.0 | 191 |
const expect = require('expect');
const client = require('./client');
describe('Requests', () => {
it('should correctly make a GET request', () => {
return client.get('/repos/GitbookIO/gitbook')
.then((response) => {
expect(response.body).toBeAn('object');
expect(response.h... | SamyPesse/octocat.js | test/requests.js | JavaScript | apache-2.0 | 1,445 |
var ConfigurationHelper = require('../app/libs/configHelper.js');
new ConfigurationHelper().clearGitConfig(); | Andolamin/SfOpticon-Web-App | cli-service/test/configHelper.clearGitConfig.js | JavaScript | apache-2.0 | 110 |
enyo.depends(
"views",
"widgets"
);
| shackbarth/enyo-x | test/tests/package.js | JavaScript | apache-2.0 | 40 |
"use strict";
var _ = require('../../');
var root = _.path.fun(__dirname);
var eq = _.test.eq;
var ok = _.test.ok;
suite('request');
var test_server = require('../../test_server/server.tjs');
before(test_server.start_server);
after(test_server.stop_server);
test("get", function(done){
_.http.get("http://loca... | dryjs/dry-underscore | lib/node/http.test.js | JavaScript | apache-2.0 | 3,451 |
const mock = require('mock-require');
mock('redis', require('fakeredis'));
const should = require('should');
const config = require('../../../lib/config');
const services = require('../../../lib/services');
const credentialService = services.credential;
const userService = services.user;
const db = require('../../../l... | srcnix/express-gateway | test/services/credential-service/credentials.test.js | JavaScript | apache-2.0 | 12,343 |
// LICENSE : MIT
"use strict";
/*
3.2.カタカナ語間のスペースの有無
中黒または半角スペースを用いてカタカナ語を区切ります。
「2.1.7 カタカナ複合語」を参照してください。
*/
import {isUserWrittenNode} from "./util/node-util";
import {matchCaptureGroupAll} from "match-index";
export default function (context) {
let {Syntax, RuleError, report, getSource} = context;
return {... | awesomest/text-checker | appengine/text-checker/node_modules/textlint-rule-preset-jtf-style/src/3.2.js | JavaScript | apache-2.0 | 1,232 |
import Controller from '@ember/controller'
import NewOrEdit from 'ui/mixins/new-or-edit';
import { alias } from '@ember/object/computed';
import { computed, get, set, observer } from '@ember/object';
import { inject as service } from '@ember/service';
import { next } from '@ember/runloop';
import C from 'ui/utils/const... | lvuch/ui | app/authenticated/cluster/projects/new-ns/controller.js | JavaScript | apache-2.0 | 3,991 |
/*
* 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 ... | machak/rave | rave-portal-resources/src/main/webapp/script/rave.js | JavaScript | apache-2.0 | 44,622 |
import Application from "./app/index";
require('expose?$!expose?jQuery!jquery/dist/jquery.js');
require('bootstrap/dist/js/bootstrap.js');
require('./styles/main.scss');
require('bootstrap/dist/css/bootstrap.css');
Application.start(); | justusburger/primarium | src/index.js | JavaScript | apache-2.0 | 238 |
/*
* Copyright 2012-2013 DigitasLBi Netherlands B.V.
*
* 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 applic... | LBiNetherlands/LBi.LostDoc | LBi.LostDoc.Templates/Library/js/lostdoc.js | JavaScript | apache-2.0 | 1,319 |
import * as THREE from "three";
import OrbitControls from "three/examples/js/controls/OrbitControls.js";
import Stats from "stats.js";
import Coordinates from "renderer/coordinates";
import AutoDrivingCar from "renderer/adc";
import Ground from "renderer/ground";
import TileGround from "renderer/tileground";
import Ma... | wanglei828/apollo | modules/dreamview/frontend/src/renderer/index.js | JavaScript | apache-2.0 | 18,710 |
/* eslint-disable */
/* Don't modify anything outside the {} brackets.
* Insides of the {} brackets should be formatted as a JSON object.
* JSON rules:
* 1. All keys and string values must be enclosed in double quotes.
* 2. Each key/value pair should be on a new line.
* 3. All values and keys must be constant, you... | AllanYangZhou/oppia | assets/constants.js | JavaScript | apache-2.0 | 12,062 |
"use strict";
const Uppy = require("@uppy/core");
const ProgressBar = require("@uppy/progress-bar");
const XHRUpload = require("@uppy/xhr-upload");
exports.make_upload_absolute = function (uri) {
if (uri.startsWith(compose.uploads_path)) {
// Rewrite the URI to a usable link
return compose.uploads... | kou/zulip | static/js/upload.js | JavaScript | apache-2.0 | 11,965 |
var testLogin = {
test: function () {
document.location = '../../../php/login/valid_login.php';
}
}
var validLoginJS = document.getElementById('html');
validLoginJS.addEventListener('menuHTML', function (event) {
testLogin.test();
event.preventDefault();
}, false);
| andreluiz93/_01teste | scripts/js/function/test_login.js | JavaScript | apache-2.0 | 294 |