code stringlengths 2 1.05M |
|---|
'use strict';
var tls = require('tls');
module.exports = function (host, port, cb) {
var tlsSocket = tls.connect(port, host, { servername: host }, function (err, res) {
if (err) return cb(err);
var cert = tlsSocket.getPeerCertificate();
var info = {
issuer: cert.issuer ? cert.issuer.O : null,
... |
'use strict'
const multer = require('tiz-multer')
const upload = multer({
dest: tiz.projectHome + '/app/public/uploads',
})
module.exports = {
upload: [
upload.single('image'),
async function(ctx) {
const req = ctx.request
const res = ctx.response
console.log({
file: req.file,
... |
'use strict'
const test = require('ava').test
const Button = require('../src/button')
const name = 'button_name'
const text = 'Button Text'
const value = 'button value'
const style = 'primary'
const url = 'http://url'
test('Button()', t => {
var btn = Button()
t.is(btn.data.name, undefined)
t.is(btn.data.text... |
'use strict';
// Agents controller
angular.module('agents').controller('AgentsController', ['$scope','$http' ,'$modal' , '$stateParams', '$location', 'Authentication', 'Agents',
function($scope,$http,$modal, $stateParams, $location, Authentication, Agents ) {
$scope.open = function (size) {
var ... |
module.exports = {
entry: './src/index.jsx',
output: {
path: './dist',
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js[x]?$/,
exclude: /node_modules/,
loader: 'babel-loader?presets[]=es2015&presets[]=react'
... |
import OwnerConfigurationForm from './OwnerConfigurationForm';
export default OwnerConfigurationForm;
|
var schedule = [];
var list = document.getElementById("schedule");
var track1CheckBox = document.getElementById("show-track-1");
var track2CheckBox = document.getElementById("show-track-2");
function downloadSchedule() {
var request = $.ajax({
type: "GET",
url: "/schedule/list"
});
... |
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/extensions/TeX/begingroup.js
*
* Implements \begingroup and \endgroup commands that make local
* definitions possible and are... |
/**
* @param {number[]} nums
* @return {number[]}
*/
var findDuplicates = function (nums) {
const ans = [];
for (let n of nums) {
let key = Math.abs(n) - 1;
if (nums[key] > 0) nums[key] *= -1;
else ans.push(key + 1);
}
return ans;
};
// TEST
[
[[4, 1, 2, 3], []],
[[5, 1, 2, 3, 5], [5]],
[
... |
module.exports = {
triobroz: {
name: 'triobroz',
/*
dynamics:
*/
default: '[-3:C] 90=C1 8192=P 0=ON -5=OFF',
staccato: '[-3:+D]',
detached: '[-3:C] 8192=P 0=ON -5=OFF',
legatoslow: '[-3:C] 8192=P -12=ON 1=OFF 70=C17 50=C18',
legatoquick: '[-3:C] 8192=P -3=ON 1=OFF 127=C17 0=C18',... |
var LocalRemote = (function() {
'use strict';
var sock = new SockJS('/plugin/local-remote/client.rpy');
sock.onopen = function() {
console.log('open');
};
sock.onmessage = function(e) {
console.log('message', e.data);
var message = JSON.parse(e.data);
console.log(m... |
(function() {
'use strict';
/**
* @todo Complete the test
* This example is not perfect.
* The `link` function is not tested.
* (malarkey usage, addClass, $watch, $destroy)
*/
describe('directive malarkey', function() {
var $log;
var vm;
var el;
beforeEach(module('trieExperimentFr... |
'use strict'
const request = require('request')
// eslint-disable-next-line prefer-destructuring
const WebMergePromiseAPI = require('..').WebMergePromiseAPI
describe('WebMergePromiseAPI', () => {
describe('new WebMergePromiseAPI()', () => {
it('returns an object with a request client with default config', () =... |
define(['jquery'], function ($) {
'use strict';
var exports = {};
var requireToUrl = require.toUrl('');
var staticPrefix = 'static/';
var jsPostfix = '/js/';
var staticPath = requireToUrl.substring($.inArray( staticPrefix, requireToUrl),requireToUrl.length-jsPostfix.length);
// if($.inArray( ... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'myApp.view1',
'myApp.view2',
'myApp.version',
"ngRiffle"
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.otherwise({redirectTo: '/view1'});
}])
.config(function(... |
"use strict";
var PopupBase = (function () {
function PopupBase() {
this.contentColor = "teal";
this.okFunction = function () { };
this.cancelFunction = function () { };
}
return PopupBase;
}());
exports.PopupBase = PopupBase;
//# sourceMappingURL=popup.js.map |
var cellautomaton = (function() {
"use strict";
var CellularAutomaton = function(width) {
this.width = width;
this.cells = new Array(width);
this.colors = {
0: "white",
1: "blue"
}
}
CellularAutomaton.prototype.setRule = function(rule) {
... |
// Windows Template Library - WTL version 9.0
// Copyright (C) Microsoft Corporation, WTL Team. All rights reserved.
//
// This file is a part of the Windows Template Library.
// The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.... |
global.process = { __proto__: process, pid: 123456 }
Date.now = function () { return 1459875739796 }
require('os').hostname = function () { return 'abcdefghijklmnopqr' }
var pino = require(require.resolve('./../../../'))
var log = pino({ prettyPrint: true })
log.error(new Error('kaboom'))
log.error(new Error('kaboom'),... |
'use strict';
import isEqual from 'lodash.isequal';
// Regex used here are all from
// http://code.tutsplus.com/tutorials/8-regular-expressions-you-should-know--net-6149
const FORMAT_REGEX = {
email : /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/,
url : /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w ... |
const twitter = require('./twitter');
module.exports = {
twitter
}; |
var _ = require('underscore');
// Application Config
module.exports = _.extend(
require(__dirname + '/../config/env/all.js'),
require(__dirname + '/../config/env/' + process.env.NODE_ENV + '.json') || {}
);
|
/**
* Grid-light theme for Highcharts JS
* @author Torstein Honsi
*/
// Load the fonts
/*Highcharts.createElement('link', {
href: '//fonts.googleapis.com/css?family=Dosis:400,600',
rel: 'stylesheet',
type: 'text/css'
}, null, document.getElementsByTagName('head')[0]);
*/
export default {
colors: ["#7cb5ec", "#... |
"use strict";
/**
* @namespace
* Useful utility functions
*/
var jah = {
/**
* Creates a deep copy of an object
*
* @param {Object} obj The Object to copy
* @returns {Object} A copy of the original Object
*/
copy: function(obj) {
if (obj === null) {
return null;
... |
avocado.transporter.module.create('general_ui/similar_objects', function(requires) {
}, function(thisModule) {
thisModule.addSlots(avocado, function(add) {
add.creator('groupOfSimilarObjects', {}, {category: ['user interface']});
});
thisModule.addSlots(avocado.groupOfSimilarObjects, function(add) {
add.met... |
describe('PUT /users/:user/password', function() {
beforeEach(function *() {
yield fixtures.load();
});
it('should return Unauthorized when user is unauthorized', function *() {
try {
yield route.put('/users/me/password');
throw new Error('should reject');
} catch (err) {
expect(err... |
$(".card2").hover(function() {
$( this ).find( ".card-button2" ).stop(true, true);
$( this ).find(".card-button2").fadeIn("fast");
$( this ).find(".card-button2").animate({
top: "128"
}, 500, function() {
$( this ).find('.card-button2').fadeOut("fast", function() {
$( this ).... |
/*
* Project: Scrolly : parallax is easy as a matter of fact !
* Description: Based on jQuery boilerplate
* Author: Victor C. / Octave & Octave web agency
* Licence: MIT
*/
(function ( $, window, document, undefined ) {
// Create the defaults once
var pluginName = 'scrolly',
defaults = {
... |
(function() {
'Use strict';
var express = require('express'),
//creating an instance of express
app = express(),
bodyParser = require('body-parser'),
morgan = require('morgan'),
methodOverride = require('method-override'),
routes = require('./../server/routes/index'),
path = require('p... |
"use strict";
var KEYWORDS =[
// keywords
"break","case","catch","continue","debugger","default","delete","do","else",
"finally","for","function","if","in","instanceof","new","return","switch",
"this","throw","try","typeof","var","void","while","with","undefined",
// reserved
"abstract","boolean","byte","c... |
var path = require('path');
del = require('del'),
gulp = require('gulp'),
webpackStream = require('webpack-stream'),
browserSync = require('browser-sync').create(),
historyApiFallback = require('connect-history-api-fallback'),
minimist = require('minimist'),
gulpif = require('gulp-if'),
gulpsize = re... |
YUI.add('yui2-charts', function(Y) {
var YAHOO = Y.YUI2;
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
/*extern ActiveXObject, __flash_unloadHandler, __flash_savedUnloadHandler */
/*!
* SWFObject v1.5... |
import { createShallow } from 'material-ui/test-utils';
import { spy } from 'sinon';
import React from 'react';
import RecipeTargets from './RecipeTargets';
const shallow = createShallow({ dive: true });
describe('RecipeTargets', () => {
let onChangeGravity;
let onChangeVolume;
let onChangeEfficiency;
let re... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+relay
* @format
*/
'use strict';
jest
.mock('../../query-config/RelayQueryConfig')
.mock('../../store/Rela... |
output = [$.app, 'use', $.express.methodOverride()]
|
/*
* grunt-auto-image
* https://github.com/ericsims/grunt-auto-image
*
* Copyright (c) 2015 Eric Sims
* Licensed under the MIT license.
*/
'use strict';
var fs = require('fs');
var path = require('path');
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding... |
$(function() {
/* Async load CSS */
$("head").append('<link rel="stylesheet" href="/css/styles.css" type="text/css">');
/* END Async load CSS */
/* Init Lazyload */
$(".container img").lazyload({
skip_invisible : false,
effect: "fadeIn"
});
/* END Init Lazyload */
/* Append class for prettypri... |
var PingStrategy = require('./strategies/ping_strategy').PingStrategy
, StatisticsStrategy = require('./strategies/statistics_strategy').StatisticsStrategy
, ReadPreference = require('../read_preference').ReadPreference;
var Options = function(options) {
options = options || {};
this._options = options;
... |
export const UPDATE_STATUS = `media/UPDATE_STATUS`;
export const STORE_CALL = `media/STORE_CALL`;
export const UPDATE_CALL_STATE = `media/UPDATE_CALL_STATE`;
export const CONNECT_CALL = `media/CONNECT_CALL`;
export const REMOVE_CALL = `media/REMOVE_CALL`;
export const CHECKING_WEB_RTC_SUPPORT = `media/CHECKING_WEB_RTC_... |
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
export const Spendings = new Mongo.Collection('spendings');
const SpendingsSchema = new SimpleSchema({
amount: {
type: Number,
decimal: true,
optional: false,
},
type: {
type: String,
optional: ... |
$(document).ready(function() {
var options = {
//target: '#groupCommentaires', // target element(s) to be updated with server response
//beforeSubmit: showRequest, // pre-submit callback
success: showResponseCommentaire, // post-submit callback
// other av... |
import Node from './node';
import Controllers from './controllers';
import { constant } from './object-attributes';
export default class BSTCore {
constructor(options) {
constant(this, {
controllers: new Controllers(options || {})
});
}
/*
controllers
*/
valid(d... |
// Abstract azimuthal projection.
function d3_geo_azimuthal(scale, angle) {
function azimuthal(λ, φ) {
var cosλ = Math.cos(λ),
cosφ = Math.cos(φ),
k = scale(cosλ * cosφ);
return [
k * cosφ * Math.sin(λ),
k * Math.sin(φ)
];
}
azimuthal.invert = function(x, y) {
... |
'use strict';
angular.module('core').controller('subjectSetupController', ['$scope', 'Authentication', '$state',
function ($scope, Authentication, $state) {
// This provides Authentication context.
$scope.authentication = Authentication;
// If auth not set goto login
if(!Authentication.user) {
... |
function showUser() {
$.post(
'ajax/showUser.php',
{},
function(data) {
$('#carTable').html(data);
}
);
}
function addUser() {
var user_name = $('#user_name').val();
var user_email = $('#user_email').val();
var user_password = $('#user_password').val();
... |
import joinUrl from 'url-join'
export default function createEndpoint (member, { allowed, basePath, http }) {
const { method, call, force, name, path } = member
return function (body, params) {
// NOTE(vesln): registered with `map` - invoke directly
if (call) {
return call(body, params, http)
}
... |
/*!
*
* Copyright (c) David Bushell | http://dbushell.com/
*
*/
(function(window, document, undefined)
{
// helper functions
var trim = function(str)
{
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');
};
var hasClass = function(el, cn)
{
return (' ' + el.class... |
'use strict';
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (d... |
import Base from 'simple-auth/authorizers/base';
import Configuration from './../configuration';
var Tok = Base.extend({
tokenAttributeName: 'token',
init: function() {
this.tokenAttributeName = Configuration.tokenAttributeName;
},
authorize: function(jqXHR, requestOptions) {
var token = this.get('se... |
/* Problem: Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.
Example:
Input: ["Hello", "Alaska", "Dad", "Peace"]
Output: ["Alaska", "Dad"]
Note:
- You may use one character in the keyboard more than once.
... |
/**
* @license
* Visual Blocks Editor
*
* Copyright 2013 Google Inc.
* https://developers.google.com/blockly/
*
* 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.apach... |
const ytdl = require('ytdl-core');
const Discord = require('discord.js');
var servers = {};
//const streamOptions = { seek: 0, volume: 1 };
//-------------------------------------------------------------------------------
//Function
function play(connection, message){
var server = servers[message.guild.id];
... |
angular.module('ggisland.ccnetwork.states.facebook', ['ParseServices'])
.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider
.state('demo.facebook', {
url: '/facebook',
abstract: true,
templateUrl: 'app... |
import { get as getCookie } from "js-cookie";
import { getQueryParam, checkReferrer } from "../src/util/DOMHelpers";
import { capitalizeUTM } from "../src/util/utmFormat";
import {
LAST_PARTNER_COOKIE,
SOCIAL_REFERRERS,
SEO_REFERRERS,
CAMPAIGN_KEYWORDS,
} from "../src/util/constants";
export const getTouchSou... |
"use strict";
var _regenerator = require("babel-runtime/regenerator");
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
function _interopRequireDefault(obj) { re... |
var jsTag = angular.module('jsTag');
// This service handles everything related to input (when to focus input, key pressing, breakcodeHit).
jsTag.factory('InputService', ['$filter', function($filter) {
// Constructor
function InputService(options) {
this.input = "";
this.isWaitingForInput = options.autoFo... |
// Generated by CoffeeScript 1.6.3
(function() {
var CoughSyrup, compile, runScripts,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
CoughSyrup = require('./cough-syrup');
CoughSyrup.require = require;
... |
import React, { PropTypes } from 'react';
const SelectInput = ({ name, label, onChange, defaultOption, value, error, options }) => {
return (
<div className="form-group">
<label htmlFor={name}>{label}</label>
<div className="field">
<select
name={... |
$(document).ready(function(){
var locations = {
1: "region",
2: "state",
4: "mesoregion",
5: "microregion",
7: "municipality"
};
var course = location.pathname.split('/')[3];
var courseFilter;
if (course.length == 2)
courseFilter = 'sc_course_field='... |
let TEST_MIN, TEST_MAX, invalid, c;
/////////// TEST: String.fromCharCode ///////////
console.log('\n', 'String.fromCharCode', '\n');
/////////////////////////////////////////////////
TEST_MIN = 0;
TEST_MAX = Math.pow(2, 16) - 1;
invalid = false;
console.log(`TEST_MIN ${TEST_MIN} TEST_MAX ${TEST_MAX}`);
for (var i ... |
version https://git-lfs.github.com/spec/v1
oid sha256:30f6d770e8f548f98ef78cb4788d49fb9686349b6e2fd501d4f38f4476dc3095
size 23839
|
const ModelState = require('../model-state');
const { constants } = require('../../app/utils');
// User constants
const passwordLength = 6;
const phoneLength = 10;
const contactInfoLength = 10;
const userNameMinLength = 4;
class User {
static toViewModel(user) {
if (!user) {
throw new Error('E... |
/**
* Get or set an item in local storage.
*
* @param {String} key A key to fetch an object by.
* @param {Any} value A value to be stringified and stored.
* @return {Any} The object that was fetched and deserialized
*/
Cute.item = function (key, value) {
var storage = window.localStorage
/... |
// TODO: implement ClientService
|
$(document).ready(function() {
var $body = $('body');
var $optionBtns = $body.find('.option-btn');
var $formPanels = $body.find('.formbox');
//var $breastRadios = $body.find('.breast-radio');
var $breastRadios = $body.find('.breast-rbcl');
var $pooRadios = $body.find('.poo-radio');
var $cancelB... |
import View from 'view';
import Template from 'hbs!templates/root';
var RootView = View.extend({
/**
* The name of the view.
*
* @type {string}
*/
name: 'root',
/**
* The (handlebars) template to use.
*
* @type {handlebars}
*/
template: Template,
/**
* The class of the view's root element.
... |
const mongoose = require('mongoose');
const schema = {
'name': String,
'model': {'type': mongoose.Schema.Types.ObjectId, 'ref': 'Model'},
};
const RelatedModel = mongoose.model('RelatedModel', new mongoose.Schema(schema));
module.exports = RelatedModel;
|
define({lang:"JavaScript","short":"js",appfile:"App.js",ext:"js",config_request:'var config = this.vent.request("config");',module_code:"define(['App'], function(App) {\n App.module('ModuleName',function(Module, application, Backbone, Marionette, $, _) {\n // Code\n });\n};"}); |
import React, { Component } from 'react'
import {
Header,
Colophon,
TextSplash
} from '../ecosystems'
export default class Start extends Component {
static get propTypes () {
return {
docHtml: React.PropTypes.string
}
}
render() {
return (
<div className="start">
<Header /... |
var Base = require('./Base');
class Observer extends Base {
/**
* Event listener
* @param {Event} event
*/
onEvent(event) {throw 'Abstract method must be implemented';}
}
module.exports = Observer;
|
import { type, first, next } from './fn/manipulate'
/**
* Get the text aggregation of a node w/o being
* normalized and resorting to `$node.text()`.
*
* @param {CheerioDOMObject}
* @return {Array}
* An array of the text aggregation of the given node,
* divided by boundaries, w/o the content of the
* ignored elem... |
var rick = {
dood :'Rick',
nationality : 'American',
city : 'Casablanca',
ladyFriend : 'Ilsa',
suggestedRoulettePlay : 22,
controlFateOf : function(name) {
return this.name + ' helps ' + name + ' obtain an exit visa.';
}
};
rick.tellStory = function() {
var story = [];
story = story + this.dood +... |
$(document).delegate('.expander','click',function(){
$(this).toggleClass('expanded')
.nextAll('ul:first').toggleClass('expanded');
window.myScroll.refresh();
return true;
});
|
import React, { Component } from 'react';
import resolverContainer from './resolverContainer.js';
const templated = (config = {}) => (WrappedComponent) => {
class TemplatedComponent extends Component
{
getTemplateResolver() {
return config.defaultResolver || resolverContainer;
}
render() {
... |
/**
* window.c.Slider component
* Build a slider from any array of mithril elements
*
* Example of use:
* view: () => {
* ...
* m.component(c.Slider, {
* slides: [m('slide1'), m('slide2'), m('slide3')],
* title: 'O que estão dizendo por aí...'
* })
* ...
* }
*/
import m fro... |
var secrets = require('../config/secrets');
var nodemailer = require("nodemailer");
var transporter = nodemailer.createTransport({
service: 'Mandrill',
auth: {
user: secrets.mandrill.user,
pass: secrets.mandrill.password
}
});
/**
* GET /contact
* Contact form page.
*/
exports.getContact = function(r... |
import Ember from 'ember';
import HeightView from '../height';
export default HeightView.extend({
didInsertElement: function() {
Ember.$('.background-normal').css('background', 'url("img/tactics-bg.jpg")');
Ember.$('.progress .meter').css('background', '#14a09b');
Ember.$('.background-jazzy, .background-jazzy... |
'use strict'
const express = require('express');
const passport = require('passport');
const router = express.Router();
const User = require('./model');
require('./local');
router.get('/login', (req, res) => {
res.render('login');
});
router.post('/login',
passport.authenticate('local',
{
failureFlash... |
(function () {
'use strict';
var deps = ['DataService', 'ErrorHelperService', '$scope', '$location', '$routeParams'];
function processController(DataService, ErrorHelperService, $scope, $location, $routeParams) {
var self = this; // jshint ignore:line
$scope.con_number = '';
$scope.... |
$(function(){
$('.ptogtitle').click(function(){
if($(this).hasClass('vsble'))
{
$(this).removeClass('vsble');
$('#main-table-box #crudForm').slideDown("slow");
}
else
{
$(this).addClass('vsble');
$('#main-table-box #crudForm').slideUp("slow");
}
});
var save_and_close = false;
... |
global.docsearch = jest.fn(() => {})
|
(function() {
module.exports = function(app){
admit = function(req, res){
var json = {}
json.user =req.session.user
json.page = 'admission'
res.render('admission/admit.jade', json)
}
cancelAdmission = function(req, res){
var json = {}
json.user =req.session.user
... |
const vec3 = require('../../math/vec3')
const measureBoundingBox = require('./measureBoundingBox')
/** Measure the bounding sphere of the given poly3
* @param {poly3} polygon - the poly3 to measure
* @returns computed bounding sphere; center (vec3) and radius
*/
const measureBoundingSphere = (poly3) => {
const bo... |
(function () {
'use strict';
angular.module('cofw.core')
.controller('meetingsCtrl', meetingsCtrl);
meetingsCtrl.$inject = ['$scope', 'data', '$sce'];
function meetingsCtrl($scope, data, $sce) {
// var meetings = data.meetings;
var meetings = data.meetings.map(function(meeting){
... |
/**
* Backbone Global TODOS example -- Provides the canonical TODOS web app using the global ES5 bundle
* generated by backbone-es6 (https://github.com/typhonjs/backbone-es6) and typhonjs-core-backbone-localstorage
* (https://github.com/typhonjs/typhonjs-core-backbone-localstorage). This is a rhetorical demo
* show... |
console.log("cool") |
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{103:function(n,t,e){},270:function(n,t,e){"use strict";var i=e(103);e.n(i).a},280:function(n,t,e){"use strict";e.r(t);var i={beforeMount:function(){e.e(98).then(e.t.bind(null,275,7)).then((function(n){n.initialize({startOnLoad:!0}),n.init("div.language-mermaid>p... |
var gulp = require( 'gulp' );
var rev = require( 'gulp-rev' );
var config = require( '../../config' ).revision;
gulp.task(
'revision',
function() {
return gulp.src( config.src.assets, { base: config.src.base } )
.pipe( gulp.dest( config.dest.assets ) )
.pipe( rev() )
.pipe( gulp.dest( config.dest.assets )... |
$(document).ready(function(){
$("#subcat").parent().hide();
var subcats = $("#review_subcategory_id").html();
$("#review_category_id").change(function(){
var cat = $("#review_category_id :selected").text();
var options = $(subcats).filter("optgroup[label='" + cat + "']").html();
$("#review_subcategory... |
'use babel';
export default {
activate() {
const ImportOrganizer = require('./import-organizer');
this.importOrganizer = new ImportOrganizer();
},
provideImport() {
return require('./import-provider');
},
consumeJavaClasspathRegistry(registry) {
this.classpathRegistry = registry;
// C... |
'use strict';
/* global ol:false, proj4:false */
angular.module('mean.polls').directive('openlayers',function(){
return {
restrict: 'AE',
scope:{
results: '='
},
link: function(scope, elem, attrs){
var vectorSource = new ol.source.GeoJSON({
object: {
'type': 'FeatureColl... |
(function() {
'use strict';
angular.module('app')
.controller('ExpenseController', function ($scope, Expenses) {
$scope.data = {};
$scope.getExpenses = function() {
Expenses.allExpenses()
.then(function (expenses) {
$scope.data.expenses = expenses;
})
.catch(function (err... |
import RadarplotsComponent from './radarplots.component';
const radarplotsModule = angular.module('radarplots', [])
.component('radarplots', RadarplotsComponent);
export default radarplotsModule; |
import { assert } from 'chai';
import NavigationMenu from '../pages/NavigationMenu';
import JavaScriptAlertsPage from '../pages/JavascriptAlertsPage';
describe('JavaScript Alert test', () => {
before('setup', () => {
NavigationMenu.loadNavigationMenu();
NavigationMenu.clickJavaScriptAlertsPage();
... |
define( function() {
/*
* based on: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim
*/
if( ! String.prototype.trim ) {
String.prototype.trim = function () {
return this.replace( /^\s+|\s+$/g, "" );
};
}
return true;
} ); |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*------------------------------------------------------------... |
"use strict";
import { isLoggedIn, isLoggedOut } from "../middleware/login";
import express from "express";
import jwt from "jsonwebtoken";
const router = express.Router();
const server = require("../../config/server.config");
const User = require("../models/User");
router.post("/register", isLoggedOut, (req, res, n... |
'use strict';
/**
* How to check request parameters.
* Created by Yuriy Stul on 11/9/2016.
*/
var t1 = {i: 1, a: ["aa", "bb"]};
if (t1.a)
console.log("t1.a is defined");
if (t1.a == 'all')
console.log("t1.a == 'all' is true");
else
console.log("t1.a == 'all' is false");
// ERROR: t1.a is ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./drawContour"), exports);
tslib_1.__exportStar(require("./drawDetections"), exports);
tslib_1.__exportStar(require("./drawFaceExpressions"), exports);
tslib_1.__exportStar(require(... |
/*
Phantom by HTML5 UP
html5up.net | @n33co
Free for persona and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
skel.breakpoints({
xlarge: '(max-width: 1680px)',
large: '(max-width: 1280px)',
medium: '(max-width: 980px)',
small: '(max-width: 736px)',
xsmall: '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.