code stringlengths 2 1.05M |
|---|
"use strict";
const _ = require( "lodash" );
const postal = require( "postal" );
let logger, logFn;
let logs = {};
let topics = [];
function configure( config ) {
const envDebug = !!process.env.DEBUG;
if ( envDebug ) {
logger = logFn( postal, { adapters: { debug: { level: 5 } } } );
} else {
logger = logFn( po... |
'use strict';
/**
* This file is part of the NAD package.
*
* (c) Ivan Proskuryakov
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @name NADOrder
* @description Order module
*/
define(['app',
'./config/ord... |
$(function() {
$('#url').focus(function() {
var url = $('#url').val();
if (url === 'http://www.whatsmyip.org/') {
$('#url').val('');
}
});
// defaults
$('#url').blur(function() {
var url = $('#url').val();
if (url === '') {
$('#url').val('... |
module.exports = function(grunt) {
grunt.initConfig({
clean: ['build/'],
jshint: {
files: ['lib/**/*.js', 'spec/**/*.js'],
options: {
node: true,
jasmine: true,
globalstrict: true,
quotmark: true,
undef: true,
unused: true
}
},
jasmin... |
// -------------------------------------
// Task: lint
// -------------------------------------
//
// - Run ESLint and Sass Lint
//
// -------------------------------------
import gulp from 'gulp';
import eslintTask from './eslint';
import sasslintTask from './sasslint';
const lintTask = (cb) => {
return gulp.p... |
c['1453']=[['1454',"Brand Property","topic_00000000000009F1.html",0],['1455',"Id Property","topic_00000000000009F0.html",0],['1456',"IsDefault Property","topic_00000000000009F4.html",0],['1457',"Last4 Property","topic_00000000000009F6.html",0],['1458',"Month Property","topic_00000000000009F2.html",0],['1459',"Name Prop... |
var fa = require("fixed-array");
var r = require("redis").createClient();
function PerSec(name) {
this.name = name;
this.start = Date.now();
this.count = 0;
this.log = fa.newFixedValueHistory(100);
var self = this; // or use bind
setInterval(function () {self.reset()}, 5000);
}
// Either create with `new... |
import App from '../../app/containers/App';
import { hot } from 'react-hot-loader/root';
export default hot(App);
|
define([],function(){
'use strict';
var ctlr = ['$scope','PrizeService', function($scope, PrizeService){
PrizeService.get({id: 'current'},function(prize){
$scope.prize = prize;
});
}];
return ctlr;
}); |
// @flow
import React, { PureComponent } from 'react';
import logo from './logo.svg';
import './view.css';
import * as EyeController from './eye/controller';
import Eye from './eye/view';
import * as MoviesController from './movies/controller';
import Movies from './movies/view';
import * as Controller from './controll... |
import React from 'react';
export default class Navbar extends React.Component {
render() {
return (
<nav className="navbar navbar-default">
<div className="container-fluid">
<div className="navbar-header">
<a className="navbar-brand" href="#">
<img alt="Brand" s... |
(function() {
/*!
* @overview Ember - JavaScript Application Framework
* @copyright Copyright 2011-2018 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* @license Licensed under MIT license
* ... |
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
/* import postcss config array */
var postCSSConfig = require('./postcss.config')
module.exports = {
entry: {
'der-reader': ['./src/der-reader.js'],
'index': './src/index.js'
},
output: {
path: __dirname + '/../... |
var express = require('express');
var router = express.Router();
var bcrypt = require('bcrypt');
var Model = require('../models');
var saltRounds = 10;
router.get('/', function (req, res) {
if (!req.isAuthenticated()) {
res.redirect('/auth/signin');
} else {
if (!req.user.admin) {
... |
var events = require('../events');
var localdb = require('../localdb');
var parcelCollection = require('./parcels');
var query = require('../rest/weather');
var DB_COLLECTION_NAME = 'weather';
function WeatherCollection() {
this.clear = function() {
localdb.clear(DB_COLLECTION_NAME);
}
this.load = functio... |
angular.module('eappApp').controller('PasswordForgottenController', ["$scope", "$rootScope", "eapp", function ($scope, $rootScope, eapp)
{
$scope.passwordForgottenErrorMessage = null;
$scope.passwordForgottenSuccessMessage = null;
$scope.sendPasswordReset = function()
{
var sendPasswo... |
(function() {
var proxy = Backbone.Model.extend();
var klass = Backbone.Collection.extend({
url : function() { return '/collection'; }
});
var doc, collection;
module("Backbone.Model", {
setup: function() {
doc = new proxy({
id : '1-the-tempest',
title : "The Tempest",
... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
/* =========================================================
* bootstrap-datetimepicker.js
* =========================================================
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Improvements by Sébastien Malot
* Improvements by Yun Lai
* Improvements by Kenneth Henderick
* P... |
'use strict';
(function() {
var chartsCtrl = function chartsCtrl($scope, getSummariesTenRes) {
$scope.runs = getSummariesTenRes;
};
angular.module('charts').controller('chartsCtrl', ['$scope', 'getSummariesTenRes', chartsCtrl]);
}(window._)); |
ScalaJS.is.scala_collection_TraversableProxy = (function(obj) {
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_collection_TraversableProxy)))
});
ScalaJS.as.scala_collection_TraversableProxy = (function(obj) {
if ((ScalaJS.is.scala_collection_TraversableProxy(obj) || (obj === null))) {
re... |
var ejs = require('ejs');
var fs = require('fs');
exports.name = "ejs (without `with`)";
exports.version = JSON.parse(require('fs').readFileSync(__dirname + "/../../node_modules/ejs/package.json")).version;
function makeExport(name) {
return {
prepare: function (done) {
var filename = __dirname + '/' + na... |
/*!
* app.js
* Author: xxx (xxx@xxx.xxx)
* Created: DD/MM/YYYY
*/
|
$(function () {
$('#container').highcharts({
title: {
text: 'Monthly Average Temperature',
x: -20 //center
},
subtitle: {
text: 'Source: WorldClimate.com',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', ... |
'use strict';
const
moment = require('moment'),
Promise = require('bluebird'),
Joi = require('joi'),
Exception = require('../error'),
_ = require('underscore');
function TeamView(args) {
var me = this;
this.user = args.user;
this.base_date = args.base_date || this.user.company.get... |
var symbols = require('katex/src/symbols');
var functions = require('katex/src/functions');
module.exports = {
textSymbols: Object.keys(symbols.text),
mathSymbols: Object.keys(symbols.math),
functions: Object.keys(functions.funcs)
};
|
/*!
* Native JavaScript for Bootstrap Popover v3.0.9 (https://thednp.github.io/bootstrap.native/)
* Copyright 2015-2020 © dnp_theme
* Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)
*/
var mouseHoverEvents = ('onmouseleave' in document) ? [ 'mouseenter', 'mouseleave'] : [ 'mo... |
import React from 'react'
import h from "lib/ui/hyperscript_with_helpers"
import R from 'ramda'
import AssocColumn from "./assoc_column"
export default class AssocManager extends React.Component {
_classNames(){
return [
`${this.props.parentType}-${this.props.assocType}`
]
}
render(){
return ... |
import React, { Component, PropTypes } from 'react'
import { Grid, Row, Col } from 'react-flexbox-grid'
import { connect } from 'react-redux'
import { WATCH_CLIENT_STATS, UNWATCH_CLIENT_STATS } from '../../sagas/event'
import { green500, blue500 } from 'material-ui/styles/colors'
import { Card, CardTitle, CardText } fr... |
function CamaraPrimeraPersona(width, height, eye, target, up) {
this.targetInicial = target;
this.eyeInicial = eye;
this.camara = new PerspectiveCamera(width, height);
this.camara.setUp(up[0], up[1], up[2]);
this.camara.setPosition(eye[0], eye[1], eye[2]);
this.camara.setTarget(target[0], target[1], target[2]);
... |
// test
import test from 'ava';
// src
import gte from 'src/gte';
test('if greater returns true when first numerical value is greater than or equal to the second, false otherwise', (t) => {
t.true(gte(10)(5));
t.true(gte(10)(10));
t.false(gte(10)(12));
});
test('if gte returns true when first string value is ... |
'use strict'
var isNode = typeof window === 'undefined'
module.exports = exports = function (chai, _) {
var performance = require('./performance')
var Assertion = chai.Assertion
var log = require('./log')
Assertion.addMethod('performance', function (params, done) {
var fn = this._obj
var assertion = ... |
define(['scriptcard.js'], function (scriptCard) {
return {
cards: [],
events: {
consolelog: function (state, event) {
console.log(
'consolelog: ' +
scriptCard.debugEvent(event)
);
}
},
tri... |
export const chevronLeft = {"viewBox":"0 0 8 16","children":[{"name":"path","attribs":{"fill-rule":"evenodd","d":"M5.5 3L7 4.5 3.25 8 7 11.5 5.5 13l-5-5 5-5z"},"children":[]}],"attribs":{}}; |
'use strict';
let five = require("johnny-five");
let board = new five.Board();
board.on("ready", function() {
// Put one led on each of these pins
let led = [2, 3, 4, 5, 7, 9, 11, 13].map(x => new five.Led(x));
// Make leds available in repl
this.repl.inject({
led: led,
});
let tick = 0;
setInte... |
var __CML__GLOBAL = require('/static/js/manifest.js')
__CML__GLOBAL.App = App;
require('/static/js/common.js')
require('/static/js/app.js')
|
angular.module('account.resources.advtraining', ['ngRoute', 'security.authorization']);
angular.module('account.resources.advtraining').config(['$routeProvider', 'securityAuthorizationProvider', function($routeProvider, securityAuthorizationProvider){
$routeProvider
.when('/resources/advtraining', {
templat... |
'use strict';
var pagesCategories = angular.module('pagesCategories', [
//
]);
pagesCategories. controller('categoriesListCtrl', function(Auth, $scope, $firebaseArray) {
var ref = firebase.database().ref();
$scope.categories = $firebaseArray(ref.child('categories'));
}); |
import PageQuerier from '../pageQuerier.js';
import SearchService from '../searchService.js';
describe("SearchService", function () {
var searchService, pageQuerierMock;
beforeEach(function () {
pageQuerierMock = sinon.createStubInstance(PageQuerier);
searchService = new SearchService(pageQue... |
export default [
{
type: 'select',
label: 'Input Format',
key: 'inputFormat',
weight: 105,
placeholder: 'Input Format',
tooltip: 'Force the output of this field to be sanitized in a specific format.',
template: '<span>{{ item.label }}</span>',
data: {
values: [
{
... |
'use strict';
(function() {
// Social Controller Spec
describe('Social Controller Tests', function() {
// Initialize global variables
var SocialController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting the... |
import { Meteor } from 'meteor/meteor';
import fs from 'fs';
import childProcess from 'child_process';
import { Platform } from 'electron-builder';
import lucyDirsum from 'lucy-dirsum';
import { EJSON } from 'meteor/ejson';
import * as _ from 'lodash';
export const stat = Meteor.wrapAsync(fs.stat);
export const dirsum... |
(function($){
$.timeAutocomplete.formatters.ampm = function(){
this.initialize.apply(this, arguments);
};
$.timeAutocomplete.formatters.ampm.prototype = {
/*
* The main instance that was created. Found on $('#el').data('timeAutocomplete')
* of that specific element. Gets... |
'use strict';
var rx = require('rx');
var Observable = rx.Observable;
var asyncVal = Observable.create(function(o) {
setTimeout(function() {
o.onNext('hello');
o.onCompleted();
}, 100);
});
asyncVal.map(function onProgrammerError(val, idx, source) {
// blow up!
var x = y + 1;
}).sub... |
/*
* Render display author field
*/
var linkTo = require('./linkTo')
module.exports = function(author, authorList) {
// TODO: Transform authors to site metadata
// If none specific, default author will be call
if (!author || author === undefined) return
author = author.json
if (author.type !== 'author')
... |
QUnit.module("Flat List", function() {
var list = ["a","b","c"];
function ListView(vm) {
return function() { return el("ul#list0.test-output", list.map(function(item) { return el("li", item) })); }
}
var vm, listEl;
QUnit.test("Create", function(assert) {
instr.start();
vm = domvm.createView(ListView).mou... |
define(['jquery', 'codemirror/lib/codemirror', 'jquery.bootstrap', 'codemirror/mode/markdown/markdown', 'jquery.explorer', 'jquery.ui.widget','jquery.upload'], function($, cm) {
var MiuCode = function(){
this.explorer = null;
this.editor = null;
this.current_file = null;
this.change... |
// Auto-generated content.
// This file contains the boilerplate to set up your React app.
// If you want to modify your application, start in "index.vr.js"
// Auto-generated content.
import {VRInstance} from 'react-vr-web';
function init(bundle, parent, options) {
const vr = new VRInstance(bundle, 'YamVR', parent,... |
let request = require('request');
let list = require('./stateList.js');
let abbr = require('./stateAbbreviation.js');
module.exports = {
search: function(req, res) {
let dataSearch = req.body;
let address = dataSearch.address;
let distance = dataSearch.distance;
let dates = dataSearch.dates;
let ... |
app.controller('WelcomeController', ['$scope',
function($scope) {
}
]) |
///**
// * Author: Jeff Whelpley
// * Date: 11/3/14
// *
// *
// */
//(function () {
//
// /**
// * Originally from Pasvaz/bindonce, but modified for our purposes (only boIf for now)
// *
// * Bindonce - Zero watches binding for AngularJs
// * @version v0.3.1
// * @link https://github.com/Pasvaz/... |
(function(angular){
"use strict";
angular.module("mfl.filtering", [
"mfl.filtering.controllers",
"mfl.filtering.services",
"mfl.filtering.routes",
"mfl.filtering.directives"
]);
})(angular);
|
function AS_Form_b427625da43e4aff897387592c3ffbce(eventobject) {
return initializeClient.call(this);
} |
/* globals $ */
import { load as loadTemplate } from 'templates';
export function aboutUsController(context) {
$('#viewSearch').hide();
$('#search-form').hide();
loadTemplate('aboutUs')
.then(template => {
context.$element().html(template());
});
} |
'use strict'
const gulp = require('gulp')
const packageJson = require('./src/package.json')
const gulpElectron = require('gulp-electron')
const rimraf = require('rimraf')
const path = require('path')
const builder = require("electron-builder")
const electronVersion = '1.2.5'
const Platfor... |
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Theming and layout of headers, footers, and content areas
//>>label: Page Sections
//>>group: Core
define( [ "../jquery", "./page", "../jquery.mobile.core" ], function( $ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
$... |
'use strict';
module.exports = {
port: 8443,
db: {
uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/mean',
options: {
user: '',
pass: ''
}
},
log: {
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
format: 'combined',
// Stream defaults to process... |
/**
* @flow
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
type Props = {
match: Object,
};
type State = Object;
export default class Lab extends Component {
props: Props;
state: State;
static propTypes = {
match: PropTypes.object.isRequired,
};
constructor(props:... |
function xhrAudio(url, resman, closure)
{
var audio = new Audio()
audio.observe('canplaythrough', function(event)
{
closure(audio)
resman.loaded('Audio ' + url)
})
audio.observe('error', function(event)
{
resman.error('Audio ' + url)
})
audio.observe('abort', func... |
const { testSimpleNotation } = require( '../util' );
describe( 'Roll `simple` notation:', () => {
testSimpleNotation( '20', 20 );
testSimpleNotation( '20', 20, 1 );
testSimpleNotation( '20', 20, 1, 0 );
testSimpleNotation( '20', 20, null, null );
testSimpleNotation( '2 10', 10, 2 );
testSimpleNotation( '... |
/*global CanvasShapes*/
CanvasShapes.Config = (function () {
var options = {
/**
* Represents the smallest interval between distinguishable numbers.
* Implementation from: http://stackoverflow.com/a/19052105/571230
*
* @type {float}
*/
EPSILON: (functi... |
test('murge', function() {
deepEqual(
murge({ a: 1 }, { b: 2 }),
{ a: 1, b: 2 }
);
deepEqual(
murge({ a: 1 }, undefined, { b: 2 }),
{ a: 1, b: 2 }
);
deepEqual(
murge({ a: 1 }, null, { b: 2 }),
{ a: 1, b: 2 }
);
deepEqual(
... |
/*
* Copyright (C) 2012 Bo Zhu http://zhuzhu.org
*
* 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, modify,... |
const right = {
crud: {
user: {
read: 1,
create: 2,
update: 3,
delete: 4
}
,
role: {
read: 5,
create: 6,
update: 7,
delete: 8,
},
branch: {
read: 9,
... |
import React, { Component } from 'react'
import '../App.css';
import LiveSummonerForm from '../components/summonerForm'
function mapStateToProps(state) {
return {
form: state.form
}
}
class SummonerStats extends Component {
render() {
return (
<div>
<div className="container">
... |
/**
* Cookie
* @return {Cookie}
*/
function Cookie() {
if( !(this instanceof Cookie) )
return new Cookie()
this.name = ''
this.value = ''
this.path = void 0
this.domain = void 0
this.expires = void 0 // new Date().toISOString()
this.httpOnly = void 0
this.secure = void 0
this.comment = vo... |
'use strict';
var Promise = require('bluebird'),
inherits = require('inherits'),
CommonCursor = require('../../common/cursor'),
Doc = require('./doc');
var Cursor = function (cursor, callbackWrapper, col) {
this._cursor = cursor;
this._callbackWrapper = callbackWrapper;
this._col = col;
};
inherits(Curso... |
import React from 'react';
import expect from 'expect';
import { mount, shallow } from 'enzyme';
import { ManageCoursePage } from './ManageCoursePage';
describe('Manage Course Page', () => {
it('sets error message when trying to save empty title', () => {
const props = {
authors: [],
actions: { saveC... |
/* 7. Write a script that finds the greatest of given 5 variables.*/
var log = jsConsole.writeLine;
var numbers = [1, 2, 3, 4, 5];
var biggerValue = numbers[0];
var i;
for (i = 1; i < numbers.length; i += 1) {
if (numbers[i] > biggerValue) {
biggerValue = numbers[i];
}
}
log("greatest value is: " + ... |
const crypto = require('crypto');
const https = require('https');
const qs = require('qs');
class UnitPay {
constructor(opts = {}) {
this.supportedCurrencies = ['EUR','UAH', 'BYR', 'USD','RUB'];
this.supportedMethods = ['initPayment', 'getPayment', 'massPayment'];
this.requiredMethodsParams = {
initPaym... |
import Cell from './Cell';
class Grid extends Phaser.Group {
constructor(game, nbRow, nbColumn, cellSize, xOrigin = 0, yOrigin = 0, cellColor = 0xFFFFFFF, gridColor = 0x000000) {
super(game);
this.nbRow = nbRow;
this.nbColumn = nbColumn;
this.opacity = 0.1
for(let y = 0; y < nbColumn; ++y) {
... |
var assert = require("power-assert");
var Parser = require("../src/util/Parser.js");
var Repository = require("../src/repository/StringMapRepository.js");
var repository = new Repository(null);
var zeroOneMap = repository.getZeroOneMap();
var stringMap = repository.getStringMap();
describe('Parser', function() {
... |
(function() {
'use strict';
angular.module('staurtherApp').controller('UserController', UserController);
// inject dependencies
UserController.$inject = ['$scope', 'UserService'];
// define functionality
function UserController($scope, User) {
var vm = this;
// initialize variables
$scope.user = User.ge... |
/**
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize modern exports="node" -o ./modern/`
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and In... |
import { connect } from 'react-redux'
import { setActiveSong } from '../actions/songs'
import React, { Component, PropTypes } from 'react'
import MusicPlayer from '../components/MusicPlayer'
import Player from '../utils/Player'
import shuffle from 'shuffle-array'
import { YOUTUBE_CONSTS } from '../utils/constants'
impo... |
export default function useBasepath() {
return process.env.REACT_STATIC_DISABLE_ROUTE_PREFIXING === 'true'
? ''
: process.env.REACT_STATIC_BASE_PATH
}
|
var Data = function() {
var self = this;
this.title = 'Loading...';
this.todos = [];
this.storeTodo = function (data) {
self.todos.push(data);
};
this.getActiveTodos= function () {
return self.todos.filter(function (todo) {
return !todo.completed;
});
};
this.getCompletedTodos= function ()... |
var searchData=
[
['ap_5fdone_5fbit',['AP_DONE_BIT',['../bm-hw-ip_8cpp.html#ac41f006533297629f93c22fa60bf910d',1,'bm-hw-ip.cpp']]],
['ap_5fen_5fbit',['AP_EN_BIT',['../bm-hw-ip_8cpp.html#a6f4ae195d2c5d14f499036d7b7952fed',1,'bm-hw-ip.cpp']]],
['array_5fsize',['ARRAY_SIZE',['../helper_8h.html#a0d77409489a4b407e12c9... |
import {onGeoLocationSuccess, onGeoLocationFail} from '../locator/actions';
export function requestGeoLocation() {
navigator.geolocation.getCurrentPosition(function(position) {
onGeoLocationSuccess(position);
}, function(error) {
onGeoLocationFail(error);
});
}
|
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
storiesOf('Button', module)
.add('with text, default color', () => (
<button className="button default" onClick={action('clicked')}>My First Button</button>
))
.add('with icon, primary color', () => (
<button className="but... |
import angular from 'angular';
export class restService {
constructor($http, $rootScope) {
angular.extend(this, {$http, $rootScope});
}
addPost(request) {
return this.$http.post('http://reqres.in/api/users', request);
}
} |
// =============================================================================
// astar.js
// -----------------------------------------------------------------------------
// Astar module.
//
// =============================================================================
// -- Modules ----------------------------... |
'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
// Add options here
});
app.import('node_modules/bootstrap/dist/css/bootstrap.css');
return app.toTree();
};
|
'use strict';
angular.module('search').controller('SearchController', ['$scope',
function($scope) {
// Controller Logic
// ...
}
]); |
/*
* Copyright (c) 2012-2016 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSame
} = Assert;
// B.3.3 Block-Level Function Declarations Web Legacy Compatibility Semantics
{
function nonStrict() {
var... |
/*global angular, Microsoft, DrawingTools, console*/
function pushpinDirective() {
'use strict';
function link(scope, element, attrs, mapCtrl) {
var eventHandlers = {};
function updatePosition() {
if (!isNaN(scope.lat) && !isNaN(scope.lng)) {
scope.pin.setLocation... |
// flow-typed signature: 6a7f1567951d451869f2f1682c268a50
// flow-typed version: <<STUB>>/babel-core_v^6.25.0/flow_v0.52.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-core'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the... |
'use strict';
(function CommentsModule($, window, document) {
var toastr = window.toastr,
swal = window.swal;
var Comments = {
init: function init() {
Comments.bindEvents();
},
bindEvents: function bindEvents() {
// edit comment
$('.comment-body').click(function (e) {
... |
'use strict';
/* jasmine specs for services go here */
describe('service', function() {
beforeEach(module('gemStore.services'));
describe('version', function() {
it('should return current version', inject(function(version) {
expect(version).toEqual('0.1');
}));
});
});
|
const es2015 = require('babel-preset-es2015').buildPreset
const ENV = process.env.BABEL_ENV
module.exports = {
presets: [
[ es2015, {
modules: ENV === 'es' ? false : 'commonjs'
} ],
],
}
|
Package.describe({
summary: 'Voteable behavior for Meteor\'s Verin Model package'
});
Package.on_use(function (api) {
api.use('handlebars', 'client');
api.use([
'accounts-base',
'verin-model'
], ['client', 'server']);
api.add_files('lib/client/helpers.js', 'client');
api.add_files('lib/voteable.... |
'use strict';
exports.register = function (server, options, next) {
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
var uri = server.connections[0].info.uri;
var docsFolder = server.settings.app.config.product.docsFolder || '/docs';
var name = server.settin... |
/**
* Created by Roman on 5/5/2015.
*/
"use strict";
angular.module('shoppingBasketApp')
.controller('NotFoundController', [
'$scope',
'$location',
function ($scope, $location) {
// export url to scope
$scope.requestUrl = $location.path();
}
]
);
|
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('./chunk-14c82365.js');
require('./helpers.js');
require('./chunk-60255743.js');
require('./chunk-3acb500b.js');
var __chunk_5 = require('./chunk-13e039f5.js');
var __chunk_21 = require('./chunk-52035157.js');
//
var script = {
na... |
var express = require('express');
var router = express.Router();
var Category = require('../models/category_model');
var Article = require('../models/article_model');
router.get('/', function(req, res, next) {
res.render('articles', {
title: 'Articles'
});
});
router.get('/show/:id', function(req, re... |
var webpack = require('webpack');
var path = require('path');
const config = {
entry: [
path.join(__dirname, 'src', 'index')
],
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
load... |
//Assigning variables different elements.
const btnLogout = document.getElementById('btnLogout');
const searchValue = document.getElementById('sok');
const preObject = document.getElementById('searchEnigne');
const dbRefCourses = firebase.database().ref().child('Courses');
const dbRefUsers = firebase.database().ref().c... |
/** Oslo JavaScript Framework. */
define(function(){"use strict";function a(){return++a.counter_}a.counter_=0;function b(b,c,d,e,f,g){this.listener=b,this.proxy=c,this.src=d,this.type=e,this.capture=!!f,this.context=g,this.key=a(),this.callOnce=!1,this.removed=!1}return b.prototype.markAsRemoved=function(){this.removed... |
var _ = require('underscore');
var api = require('../helpers/api.js');
exports.testList = function(test) {
api.request(['doc'], 'GET', {}, function(actual) {
test.ok(typeof actual.apis !== 'undefined');
test.ok(typeof actual.version !== 'undefined');
_.each(actual.apis, function(entry) {
test.... |
// http://backbonejs.org/#Router
(function(win, doc, App){
/**
* Router
* @type {object}
*/
App.Routers.Router = Backbone.Router.extend({
routes: {
'' : 'root',
'home' : 'root',
'form' : 'form',
'game' : 'game',
'lost' : 'lost',
'usb' :... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.