code stringlengths 2 1.05M |
|---|
class vss_vsscoordinator_1 {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService()
GetL... |
const StarOverlayNetwork = require('../../lib/star-overlay-network')
module.exports =
function buildStarNetwork (id, peerPool, {isHub, connectionTimeout}={}) {
const network = new StarOverlayNetwork({id, peerPool, isHub, connectionTimeout})
network.testJoinEvents = []
network.onMemberJoin(({peerId}) => network.... |
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'ngCookies',
'myApp.filters',
'myApp.services',
'myApp.directives',
'myApp.controllers',
'ui.bootstrap'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/in... |
"use strict";
let entries = require("../mongodb/entries");
exports.createEntry = function(req,res,next) {
if (!req.session.userID) {
return next(new Error("user is not logged in"));
}
let entry = req.body;
if (entry.date) {
entry.date = new Date(entry.date);
}
entries.createEntry(req.db, req.sessi... |
import Vue from 'vue'
import Vuex from 'vuex'
import menus from './modules/menus.js'
import copyText from './modules/copyText.js'
import features from './modules/features.js'
import settings from './modules/settings.js'
import Persistance from '../api/vuex/persistance.js'
import createLogger from 'vuex/logger'
import... |
'use strict'
require('./app')
|
'use strict';
module.exports = {
db: 'mongodb://localhost/mecenate-web-test',
port: 3001,
app: {
title: 'mecenate-web - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: '/auth/facebook/callback'
},
twi... |
define(["./inner"],function(inner){
var t
return inner
})
|
angular.module('team-task')
.controller('WorkforceController', ['$scope', '$rootScope', '$state', 'Atividade', 'Time',
'Pessoa', '$stateParams', 'Projeto', '$filter', '$uibModal',
function ($scope, $rootScope, $state, Atividade, Time, Pessoa, $stateParams, Projeto, $filter, $uibModal) {
... |
var config = require('config');
var rest = require('restler');
var fs = require("fs");
var dateformat = require("dateformat");
var jsonfile = require("jsonfile");
var rssBaseURL = config.get('rssBaseURL');
var apps = config.get('apps');
var maxPage = config.get('maxPage');
var now = new Date()
var timestamp = datefor... |
'use strict';
describe('caesarCipher', function () {
var caesarCipher;
beforeEach(module('zsoltiii.angular-cipher-filters'));
beforeEach(inject(function ($filter) {
caesarCipher = $filter('caesarCipher');
}));
describe('default parameters', function() {
it('should return the lett... |
export default function canAccessProperty(key, value) {
let prop;
try {
prop = value[key];
} catch (error) {
console.error(error); // eslint-disable-line no-console
}
return !!prop;
}
|
//Modules
var async = require('async');
var tools = require('./tools.js');
var fs = require('fs');
var pathMod = require('path');
var Handlebars = require('handlebars');
var vCard = require('vcards-js');
var vcardparser = require('vcardparser');
var _ = require('lodash')... |
'use strict';
const basicAuth = require('basic-auth');
function unauthorized(res, realm) {
const _realm = realm || 'Authorization Required';
res.set('WWW-Authenticate', `Basic realm=${_realm}`);
return res.sendStatus(401);
};
function isPromiseLike(obj) {
return obj && typeof obj.then === 'function';
}
fun... |
const Hapi = require('hapi');
const routes = require('./routes');
const server = new Hapi.Server();
server.connection({ port: process.env.PORT || 8080});
server.route(routes);
server.start((err) => {
if (err) { throw err; }
console.log(`Server running at: ${server.info.uri}`);
});
|
describe('the RepoAssessor', function() {
beforeEach(module('sidewinder-app'));
var $httpBackend, RepoAssessor;
beforeEach(inject(function(_$httpBackend_, _RepoAssessor_, _GitHubRepo_) {
$httpBackend = _$httpBackend_;
RepoAssessor = _RepoAssessor_;
GitHubRepo = _GitHubRepo_;
... |
import {parse} from 'graphql/language/parser';
import {print} from 'graphql/language/printer';
import {teardownDocumentAST} from '../utils';
/**
* This is a stupid little function that sorts fields by alias & then by name
* That way, testing equality is easy
*/
export const parseSortPrint = graphQLString => {
cons... |
var TEST_SECRET = sails.config.stripe.testSecretKey;
var stripe = require('stripe')(TEST_SECRET);
module.exports = {
charge: function (req, res) {
var userId = req.user.id;
var params = req.params.all();
var source = params.source;
var provider = params.providerId;
var amount = params.amount;
... |
const path = require('path');
const webpack = require('webpack');
const Visualizer = require('webpack-visualizer-plugin');
const Webiny = require('webiny-cli/lib/webiny');
const ModuleIdsPlugin = require('./plugins/ModuleIds');
module.exports = function (app) {
const sharedResolve = require('./resolve')(app);
... |
// const meshblu = require('./api/config/meshblu');
const config = require('./api/config/config');
const express = require('./api/config/express');
const mongoose = require('./api/config/mongoose');
const mqtt = require('./api/config/mqtt');
var port = process.env.PORT || config.port;
// Initializing the data base
va... |
'use strict';
angular.module('copayApp.services').factory('walletService', function($log, $timeout, lodash, trezor, ledger, storageService, configService, rateService, uxLanguage, $filter, gettextCatalog, bwcError, $ionicPopup, fingerprintService, ongoingProcess, gettext, $rootScope, txFormatService, $ionicModal, $sta... |
define(['summernote/core/func'], function (func) {
/**
* list utils
*/
var list = (function () {
/**
* returns the first element of an array.
* @param {Array} array
*/
var head = function (array) {
return array[0];
};
/**
* returns the last element of an array.
... |
function slugify(string) {
return string
.toString()
.trim()
.toLowerCase()
.replace(/\s+/g, "-")
.replace(/[^\w\-]+/g, "")
.replace(/\-\-+/g, "-")
.replace(/^-+/, "")
.replace(/-+$/, "");
};
angular.module("exambazaar").controller("officialPapersController",
[ '$scope', '$rootScope',... |
(function (angular) {
'use strict';
/**
* @ngdoc directive
* @name esri.map.directive:esriInfoTemplate
* @restrict E
* @element
*
* @description
* This directive creates an
* {@link https://developers.arcgis.com/javascript/jsapi/infotemplate-amd.html InfoTemplate}
*... |
/*
Created by Freshek on 07.10.2017
*/
class Box extends Movable {
constructor(x, y, hash, type) {
super(x, y);
this.hash = hash;
this.type = type;
}
toString() {
return JSON.parse(this);
}
isMaterial() {
var type = this.type.toLowerCase();
return (type == "mucosum" || type == "pris... |
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _react = require("react");
var _propTypes = _interopRequireDefault(require("prop-types"));
var _useSelect2 = _interopRequireDefault(require("./useSelect"));
var _types = require("./types");
var _Options = _interopRequireDefault(require("./C... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, Text, TouchableOpacity } from 'react-native';
import Styles from './Styles';
import Checkbox from './Checkbox';
export default class CheckboxField extends Component {
static propTypes = {
// CheckboxField
label: Prop... |
/**
* Internal dependencies.
*/
var Rule = require('../rule');
var MinLen = Rule.create({
error: 'The variable name is too short',
option: {
key: 'varmin',
type: 'number'
},
on: {
VariableDeclaration: 'check'
},
});
/**
* Perform the check.
*
* @param {Object} node
* @api public
*/
Mi... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Contact from './Contact'... |
version https://git-lfs.github.com/spec/v1
oid sha256:8fcaa59f8f7d92d17f1967c30e716003bf2096aa6e162d68e3476991d70c5ad1
size 16572
|
version https://git-lfs.github.com/spec/v1
oid sha256:c2e49c9c3bf532498c29c64cbafec19f19fb11fddee2e36d8ea433291bbbc04f
size 5691
|
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const { webFrame, remote } = require("electron")
import Style from "./app/scss/app.scss"
// disable zoom in/out functionality in app
// webFrame.se... |
/**
* @license Angular v4.2.5
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core'... |
define(function (require, exports, module) {
"use strict";
// External dependencies.
var Backbone = require('backbone');
var Marionette = require('marionette');
window.urls = require('urls');
window.util = require('util');
// The root path to run the application through.
exports... |
module.exports = function(accounts) {
accounts = accounts != null ? accounts : {};
return function(req, res, next) {
var auth, buf, creds, found, i, password, tmp, userAuth, username;
auth = req.headers['authorization'];
if (!auth) {
res.statusCode = 401;
res.setHeader('WWW-Authenticate', 'B... |
/*!
* bespoke-hash v0.1.1
*
* Copyright 2013, Mark Dalgleish
* This content is released under the MIT license
* http://mit-license.org/markdalgleish
*/
(function(bespoke) {
bespoke.plugins.hash = function(deck) {
var activeIndex,
parseHash = function() {
var hash = window.location.hash.slice(1),
... |
version https://git-lfs.github.com/spec/v1
oid sha256:b7ace73d0372ab733e44a6e6e929f5d7f8f76aa936a63141ce71b444d15db719
size 59294
|
var common = require('../common.js');
var utils = common.load('utils');
module.exports = function handle_presenterRequest() {
var self = this;
var piccolo = this.piccolo;
var res = this.response;
var route = this.cache.route;
this.log('info', 'Require presenter module: ' + this.cache.filepath);
// Get... |
import * as SampleActions from './actions'
import {SampleReducer} from './reducer'
export {SampleActions, SampleReducer} |
'use strict';
angular.module('LDT.ui').directive('catchInput',function() {
return {
link: function(scope, element, iAttrs, ctrl) {
function stopit(e) {
e.stopPropagation();
}
//Don't allow clicks to change mode
element.click(stopit);
//Don't allow renaming keypresses to ch... |
/**
* Japanese translation
* @author Tomoaki Yoshida <info@yoshida-studio.jp>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.jp = {
'_translator' : 'Tomoaki Yoshida <info@yoshida-studio.jp>',
'_translation' : 'Japanese translation',
'Editor' : 'エディター',
'Source' : 'ソース',
// Panel... |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
(function (global) {
'use strict';
$ = global.jQuery;
let branding_style = $('.govuk-radios__item input[name="branding_style"]:checked');
if (!branding_style.length) { return; }
branding_style = branding_style.val();
const $paneWrapper = $('<div class="govuk-grid-column-full"></div>');
const $form =... |
"use strict"
//constructor
var FileManager = function(input,callback){
var that = this;
this.input = input;
}
FileManager.prototype.upload = function(callback){
this.input.addEventListener("change",function changeEvent (e){
try{
var reader = new FileReader();
reader.onloadend = function(evt){
... |
angular.module('deco').directive('decoEmail',
[function () {
return {
restrict: 'EA',
replace: false,
template: function (element, attrs) {
return attrs.before + '@' + attrs.after;
}
... |
Router.configure({
layoutTemplate: 'layout',
//loadingTemplate: 'loading',
//waitOn: function() {return true;} // later we'll add more interesting things here ....
});
Router.route('/', {name: 'welcome'});
Router.route('/about', {name: 'about'});
Router.route('/sponsors', {name:'sponsors'})
Router.route('/gra... |
module.exports = require('./lib/shim')
|
// is this necessary? not sure
if (module.parents) {
throw new Error("node-dev-warnings won't work");
}
require('./json');
|
Fixtures.DefaultPluginConfig = {foo: 'foo', bar: 'bar'};
Fixtures.Plugin = function(config) {
var self = this;
this.config = config;
this.preUpdates = 0;
this.postUpdates = 0;
this.prefabsCreated = 0;
this.prefabsDestroyed = 0;
this.entitiesCreated = 0;
this.entitiesDestroyed = 0;
... |
'use strict';
const jsonWebToken = require('jwt-simple');
const settings = require('../settings.js');
const passwords = require('../common/passwords.js');
/**
* @param userObject
* @returns {{access_token: String, expires: *, user: *}}
*/
function generateToken(userObject) {
const date = new Date();
const expir... |
/*global require */
require([
'jquery'
, 'lodash'
, 'backbone'
, 'src/js/main-view'
, 'livefyre-bootstrap'
, 'nls/i18n'
, 'src/js/polyfill'
, 'css!lib/livefyre-bootstrap/dist/all.css'
, 'css!dev/css/main.css'
], function(
$
, _
, Backbone
, MainView
, lfBootstrap
) {
var main = new MainVi... |
(function() {
var width = 960,
height = 480;
var projection = d3.geo.equirectangular()
.scale(153)
.translate([width / 2, height / 2])
.precision(.1);
var path = d3.geo.path()
.projection(projection);
var graticule = d3.geo.graticule();
var svg = d3.select("body").append("svg")
.attr("width... |
{
"(member ex officio), Managing Director": "Diretor Administrativo",
"404_error_msg": "Desculpe, esta página não existe",
"About": "Sobre",
"About Participedia": "Sobre Participedia",
"about.cases.example": "Por exemplo, este caso em %s 2017 orçamento participativo de Paris%s é uma das mais de 160 entradas d... |
/**
* The Header view.
*/
define([
'jquery',
'backbone',
'underscore',
'mps',
'views/ShareView'
], function($,Backbone, _,mps, ShareView) {
'use strict';
var HeaderView = Backbone.View.extend({
el: '#headerView',
events: {
'click #btn-menu' : 'toggleMenu',
'click .share-link' : '... |
import React, { PropTypes } from 'react'
import { Modal } from 'antd'
import wechatCodeImg from '../../static/img/me/wechat_code.jpg'
import classes from './ImageModal.scss'
class ImageModal extends React.Component {
static propTypes = {
visible: PropTypes.bool.isRequired
};
componentDidUpdate() {
cons... |
version https://git-lfs.github.com/spec/v1
oid sha256:2a87ff5b4bbc72c52d9a82be37ffa8e7f1f7d41c49ecd9c9868fcf511a1a03ad
size 28192
|
SyncedCron.config({
// Log job run details to console
log: true,
// Use a custom logger function (defaults to Meteor's logging package)
//logger: null,
// Name of collection to use for synchronisation and logging
collectionName: DRM.collectionNamePrefix + 'cronHistory',
// Default to using localTime
... |
// Fixture for has function
// Object literals with attributes to test against
var has_attribute_with_backslash_fixture = {
"hello": {
"world": {
"foo\\bar": {
"baz": true
},
"\\foo bar": {
"baz": true
},
"foo bar\\... |
var gmaps = require('google-maps-api')('AIzaSyC2Xp07hffemgAHYenBMKxeAeJ017nIbbk');
var mapOptions = {
zoom: 13,
center: {lat: -34.397, lng: 150.644},
mapTypeControl: false,
streetViewControl: false,
zoomControl: false
... |
import Login from '../components/Login.jsx';
import {useDeps, composeWithTracker, composeAll} from 'mantra-core';
import { connect } from 'react-redux'
import { push } from 'react-router-redux';
export const composer = ({context, clearErrors}, onData) => {
onData(null, {});
// clearErrors when unmounting the com... |
"use strict";
var debug = require('debug')('loopback:CustomerAccountUserMapping');
var vasync = require('vasync');
module.exports = function customerAccountUserMapping(CustomerAccountUserMapping) {
CustomerAccountUserMapping.findAccount = function findAccount(token, next) {
var Account = CustomerAccountUserMapp... |
import Hero from './Hero';
import MiniHero from './MiniHero';
export default Hero;
export { MiniHero }
|
'use strict';
var BrowserifyCache = require('browserify-cache-api');
module.exports = function incrementalWatchPlugin(b) {
var hasReadCache = false;
b.on('bundle', function() {
var cache = BrowserifyCache.getCache(b);
if (!hasReadCache && cache) {
Object.keys(cache.dependentFiles).... |
/**@license
The MIT License (MIT)
Copyright (c) 2015 Daniel Furtlehner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, m... |
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as R from 'ramda';
import Button from '@material-ui/core/Button';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@ma... |
import Action from './Action'
import tryCall from './tryCall'
export default function then (f, r, p, promise) {
p._when(new Then(f, r, promise))
return promise
}
class Then extends Action {
constructor (f, r, promise) {
super(promise)
this.f = f
this.r = r
}
fulfilled (p) {
this.runThen(thi... |
var execSync = require('child_process').execSync,
eslint = require('gulp-eslint'),
gulp = require('gulp'),
mocha = require('gulp-mocha'),
path = require('path'),
spawn = require('child_process').spawn... |
{
var regexp = /EQUIVALENCE.*$/gm;
var aSpecs = (a.match(regexp) || []).sort().join("\n");
var bSpecs = (b.match(regexp) || []).sort().join("\n");
if (aSpecs.length === 0 && bSpecs.length === 0) {
throw new Error("No spec results found in the output");
}
expect(aSpecs).toEqual(bSpecs);
}
|
module.exports = {
apps: [{
name: 'URL-ShortenerAPI',
script: './source/server.js',
env: {
watch: 'source',
ignore_watch : 'source/gui',
NODE_ENV: 'development',
MONGO_PORT: 28017,
API_PORT: 8000
},
env_production: {
watch: false,
NODE_ENV: 'production',
... |
'use strict'
module.exports = {
// Format a string for terminal ouptut
formatString: require('./methods/format-string'),
// JSON pretty print
json: require('./methods/json'),
// Send notification via pushover
notify: require('./methods/notify'),
// Gets a random array item
getRandom: require('./met... |
var results;
function viewData()
{
var resultsTable = $('<table></table>').attr('id', 'results');
var tableHead = $("<thead></thead>");
var tableBody = $("<tbody></tbody>");
var temp;
$.post("/api/Data/Query/",
{
name: $('#name').val(),
query: $('#query').val(),
server: $('#server').val(... |
/*
* remotejs
* Controls iTunes from your browser
*
* Copyright (c) 2013 Jeffrey Muller
* Licensed under the MIT license.
*/
app.music = {
songMetadata: function(song) {
return {
'song': song,
'artist': (song.artist !== null) ? app.library.artists[song.artist] : null,
... |
/**
* Relies on Googoose for the basic exportation to Winword.
* This javascript file is loaded by marknotes **only when Pandoc isn't
* correctly installed.**
*
* When Pandoc is installed, this script isn't included by marknotes since
* the action behind the "Download as .docx file" will be immedialty a
* link t... |
"use strict";
var express = require('express');
var app = express(); // define our app using express
var path = require('path');
var fs = require('fs')
var handlebars = require('express-handlebars'), hbs;
var bodyParser = require('body-parser');
// handlebars template engine
hbs = handlebars.create({ def... |
let dice1; let dice2; let dice3; let dice4; let dice5; let dice6;
let dice;
function preload(){
dice1 = loadImage("images/dice-1.png");
dice2 = loadImage("images/dice-2.png");
dice3 = loadImage("images/dice-3.png");
dice4 = loadImage("images/dice-4.png");
dice5 = loadImage("images/dice-5.png");
dice6 = ... |
function result() {
this.insert_id = 0
this.affected_rows = 0
this.rows = []
}
module.exports = result |
import { toBeDeepCloseTo } from 'jest-matcher-deep-close-to';
import {
highResolution4,
highResolution,
simple,
} from '../../../testFiles/examples';
expect.extend({ toBeDeepCloseTo });
describe('merge: Low resolution', () => {
it('no options', () => {
let result = simple.merge();
result.x = Array.f... |
var clv = require("../../../../index.js");
var assert = require("assert");
describe("Generated test - rm/ins/undo/undo/rm/ins/ins/rm/ins/ins - 10-ops-3cb06c80-722e-4eaa-a5f7-7068c46db475", function() {
var doc1 = new clv.string.Document("163cfd90-537e-11e7-a087-55438491864c", 0, null);
var doc2 = new clv.string.Do... |
_.mixin({
on : function(obj, event, callback) {
// Define a global Observer
if(this.isString(obj)) {
callback = event;
event = obj;
obj = this;
}
if(this.isUndefined(obj._events)) obj._events = {};
if (!(event in obj._events)) obj._events[event] = [];
obj._events[event].push(callback);
return this;
},
once... |
/*Made by *** for learning perpouses
Feel free to use it as you see fit.
*/
var JSConsol;
function CreateConsol() {
JSConsol = function Consol() {
/*create stack of functions w8 for input*/
var awaitInputStack = new Array();
/*create execution list*/
var execList = new Array();... |
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, triggerEvent } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import $ from 'jquery';
module('Integration | Component | fm-widget:radio', function(hooks) {
setupRenderingTest(hooks);
... |
/*globals define*/
/*eslint-env node, browser*/
/**
* Plugin illustrating how to merge branches/commits.
*
* @author lattmann / https://github.com/lattmann
* @module CorePlugins:MergeExample
*/
define([
'plugin/PluginConfig',
'plugin/PluginBase',
'text!./metadata.json',
'common/core/users/merge',... |
// Generated by CoffeeScript 1.6.3
var Message, should, vows;
Message = require("../");
vows = require("vows");
should = require("chai").should();
vows.describe("Utility methods").addBatch({
"#prefixIsHostmask()": {
"when prefix is valid hostname": {
topic: Message(":test!test@something.com PRIVMSG #Tes... |
/*
Plotr.PieChart
==============
Plotr.PieChart is part of the Plotr Charting Framework.
For license/info/documentation: http://www.solutoire.com/plotr/
Credits
-------
Plotr is partially based on PlotKit (BSD license) by
Alastair Tse <http://www.liquidx.net/plotkit>.
Copyright
---------
Copyright 20... |
// # Display shape mixin
// This mixin defines additional attributes and functions for Stack and Canvas artefacts, in particular adding hooks for functions that will be automatically invoked when the artefact's dimensions update.
// #### Demos:
// + [Canvas-034](../../demo/canvas-034.html) - Determine the displayed sh... |
import { REQUEST_CONTACT_DATA } from '../Contacts/ContactCard/constants';
export function requestContactData(userId) {
return {
type: REQUEST_CONTACT_DATA,
userId,
};
}
|
/** @jsx h */
import h from '../../helpers/h'
export const flags = {}
export const schema = {
blocks: {
paragraph: {},
item: {
parent: { types: ['list'] },
nodes: [{ objects: ['text'] }],
},
list: {},
},
}
export const customChange = change => {
// see if we can break the expected ... |
(function($){
$(function(){
var window_width = $(window).width();
// convert rgb to hex value string
function rgb2hex(rgb) {
if (/^#[0-9A-F]{6}$/i.test(rgb)) { return rgb; }
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
if (rgb === null) { return "N/A"; }
f... |
'use strict';
angular.module('skillz').directive('xebianSkillCard', function () {
return {
restrict: 'E',
scope: {
xebian: '=xebian',
showRating: '=showRating',
onClick: '&onClick'
},
templateUrl: 'modules/skillz/views/xebian-skill-card.template.h... |
'use strict';
var express = require('express');
var app = express();
var mongojs = require('mongojs');
var db = mongojs('questions', ['questions']);
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var bodyParser = require('body-parser');
var passport = require('passport');
var LocalStrategy = requi... |
export const find = (array, element) => {
let start = 0;
let end = array.length - 1;
let middle;
while (start <= end) {
middle = Math.floor((start + end) / 2);
if (element === array[middle]) {
return middle;
} else if (element < array[middle]) {
end = middle - 1;
} else if (element >... |
import Joi from 'joi'
export default class EventsEntity {
constructor(deps = {}) {
this.Adapter = deps.Adapter || require('./Adapter').default
}
createValidation(input){
return new Promise((resolve, reject) => {
let schema = Joi.object().keys({
game: Joi.string().required(),
... |
module.exports.DB = require('./lib/database');
module.exports.Layer = require('./lib/layer');
|
const initStart = process.hrtime();
const DeviceDetector = require('device-detector-js');
const detector = new DeviceDetector({ skipBotDetection: true, cache: false });
// Trigger a parse to force cache loading
detector.parse('Test String');
const initTime = process.hrtime(initStart)[1] / 1000000000;
const package = r... |
// Allow a form to post without navigating to another page:
postForm = function(oFormElement) {
if (!oFormElement.action) { return; }
var oReq = new XMLHttpRequest();
if (oFormElement.method.toLowerCase() === "post") {
oReq.open("post", oFormElement.action);
oReq.send(new FormData(oFormEleme... |
/**
*
* @fileoverview fileoverview comment before import. transformer_util.ts has
* special logic to handle comments before import/require() calls. This file
* tests the regular import case.
*
* @suppress {checkTypes} checked by tsc
*/
goog.module('test_files.file_comment.before_import');var module = module || {... |
export const ic_looks_two_twotone = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M19 5H5v14h14V5zm-4 6c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z","opacity":".3"},"children":[]},{"name":"pat... |
;(function() {
"use strict";
owid.namespace("App.Views.Form.MapColorSchemeView");
var ColorPicker = App.Views.UI.ColorPicker;
App.Views.Form.MapColorSchemeView = Backbone.View.extend({
el: "#form-view #map-tab .map-color-scheme-preview",
events: {},
initialize: function( options ) {
this.dispatcher = o... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototy... |
import Ember from 'ember';
import SelectPicker from './select-picker';
import ItemCursorMixin from 'ember-cli-select-picker/mixins/item-cursor';
const KEY_ENTER = 13;
const KEY_ESC = 27;
const KEY_UP = 38;
const KEY_DOWN = 40;
export default SelectPicker.extend(ItemCursorMixin, {
layoutName: 'components/selec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.