code stringlengths 2 1.05M |
|---|
// MIT © 2017 azu
"use strict";
const React = require("react");
const locator = require("textlint-app-locator");
import NavWrapper from "./NavWrapper.js";
import TextlintrcEditorContainer from "../container/TextlintrcEditorContainer/TextlintrcEditorContainer";
export default class TextlintrcEditorPage extends React.C... |
const Patch = require('../../lib/models/patch');
const assert = require('chai').assert;
describe('It creates full patch model', () => {
it('Should require name', done => {
let patch = new Patch({
votes: 0,
favorites: 0
});
patch.validate(err => {
assert... |
var vows = require("vows");
var assert = require("assert");
var should = require("should");
var request = require("request");
var blueprint = require("../lib/blueprint");
vows.describe("Scaffold Tests").addBatch({
"when requiring blueprint.scaffold":{
topic:function(){
return blueprint.scaffold;
},
... |
var monitorManager = require('./monitorManager.js');
module.exports = monitorManager; |
let db,ref;
function setup() {
noCanvas();
var config = {
apiKey: "AIzaSyB09BJHHUiPtfTmsGyQ785q1-7MzO1PVTY",
authDomain: "my-project-1496533920980.firebaseapp.com",
databaseURL: "https://my-project-1496533920980.firebaseio.com",
projectId: "my-project-1496533920980",
storageBucket: "my-proj... |
const JsonStrategy = require('passport-json').Strategy;
const bcrypt = require('bcrypt-nodejs');
const User = require('../models/user');
module.exports = function(passport){
// methods ======================
// generating a hash
const generateHash = function(password) {
return bcrypt.hashSync(password, b... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['src/js/*.js', 'src/js/**/*.js', 'test/*.js', 'test/**/*.js'],
options: {
ignores: ['src/js/lib/modernizr-custom.js', 'src/js/templates/templates.js']
}
},
requi... |
ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) {
"use strict";
var oop = acequire("../lib/oop");
var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules;
var SqlHighlightRules = function... |
var translate = require('../lib/translate'),
express = require('express'),
cors = require('cors');
var app = express();
app.use(cors());
app.get('/translate/:sl/:tl/:text', function (req, res) {
var text = req.params.text,
sl = req.params.sl,
tl = req.params.tl;
translate({
text: text,
source: sl || 'es'... |
import { AppRegistry } from 'react-native';
import Index from './src/';
AppRegistry.registerComponent('rishu_wedding', () => Index);
|
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import crypto from 'crypto';
import {skipSuiteOnWindows} from '@jest/test-utils';
function mockHashConten... |
/**
* This file/module contains all configuration for the build process.
*/
module.exports = {
build_dir: 'build',
compile_dir: 'bin',
test_dir: 'test',
app_files: {
js: [ 'src/**/*.js', '!src/**/*.spec.js'],
jsunit: [ 'src/**/*.spec.js', 'test/**/*.spec.js' ]
},
test_files:... |
version https://git-lfs.github.com/spec/v1
oid sha256:dbe3869751753d0215806b468f3545bcb1e0343c6b54a3a59bb4ead11eec5508
size 49510
|
version https://git-lfs.github.com/spec/v1
oid sha256:1b084bec5169a618c426d4f722bb1d86ae903e5910fd532c8f85f446f64d3767
size 15431
|
var express = require('express');
var session = require('express-session');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var passport = require('passport');
var Strategy = require... |
var gulp = require('gulp'),
usemin = require('gulp-usemin'),
wrap = require('gulp-wrap'),
connect = require('gulp-connect'),
watch = require('gulp-watch'),
minifyCss = require('gulp-minify-css'),
minifyJs = require('gulp-uglify'),
concat = require('gulp-concat'),
less = require('gulp-les... |
import m from 'mithril';
const Button = {
view(vnode) {
return m('button', {
onclick: vnode.attrs.events.onclick,
}, vnode.attrs.label);
},
};
export default Button;
|
const commonService = require('../commonService');
const tokenService = require('../tokenService');
const xmlBuilder = require('xmlbuilder');
/**
* The cloud-based Microsoft Speech API provides developers an easy way to create powerful speech-enabled features in their applications, like voice command control, us... |
/**
* Angular Carousel - Mobile friendly touch carousel for AngularJS
* @version v0.5.0 - 2015-09-18
* @link http://revolunet.github.com/angular-carousel
* @author Julien Bouquillon <julien@revolunet.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/*global angular */
/*
Angular touch carou... |
/**
* ContribuyentesController
*
* @description :: Server-side logic for managing contribuyentes
* @help :: See http://links.sailsjs.org/docs/controllers
*/
module.exports = {
/**
* `ContribuyentesController.comment()`
*/
comment: function (req, res) {
return res.json({
todo: 'comme... |
var gulp = require('gulp'),
config = require('../gulpconfig'),
stylus = require('gulp-stylus'),
stylusIconFont = require('stylus-iconfont'),
autoprefixer = require('autoprefixer-stylus'),
import_tree = require('stylus-import-tree'),
cssmin = require('gulp-minify-css'),
gulpIf = require('gulp-if'),
argv ... |
var Config = require('./config');
var makeAsyncFunc = require('./makeAsyncFunc');
/**
* Creates a suspendable function. Suspendable functions may use the await() function
* internally to suspend execution at arbitrary points, pending the results of
* internal asynchronous operations.
* @param {Function} fn - Co... |
angular
.module('myApp.filters', [])
.filter('startFromFtr', function () {
return function (input, currentPage, itemsPerPage) {
if (!input || !input.length) {
return;
}
var start = (currentPage - 1) * itemsPerPage;
return input.slice(start)... |
(function(){
'use strict';
// This could be used to fire page events that can then be picked up at various other parts of the code
// Useful for analytics
// window.pulpPageEvents = _.extend({}, Backbone.Events);
var State = Backbone.Model.extend({
initialize: function(){
this.set('single-page-width', parse... |
import Ember from "ember";
import Person from 'dummy/models/person';
import {ValidationMixin, validateEach} from "ember-cli-simple-validation/mixins/validate";
var isEven = function() {
var index = arguments[3];
var value = this.get("model").objectAt(index).get("rando");
var number = parseInt(value, 10);
... |
const Subscriber = require('../structs/db/Subscriber.js')
const createLogger = require('../util/logger/create.js')
const MISSING_CODES = new Set([10011, 10013, 10007])
/**
* @typedef {Object} SubscriberDetails
* @property {import('discord.js').Guild} guild
* @property {import('../structs/db/Subscriber.js')} subscri... |
'use strict';
define('ace/snippets/smarty', ['require', 'exports', 'module'], function (require, exports, module) {
exports.snippetText = "";
exports.scope = "smarty";
}); |
'use strict';
angular.module('feedbacks').controller('FeedbacksController', ['$scope','$rootScope', '$http', '$stateParams', '$location', 'Authentication', 'Feedbacks',
function($scope,$rootScope, $http, $stateParams, $location, Authentication, Feedbacks) {
$scope.authentication = Authentication;
$scope.rating = ... |
'use strict'
import NSObject from '../ObjectiveC/NSObject'
import CGPoint from '../CoreGraphics/CGPoint'
import CGRect from '../CoreGraphics/CGRect'
import CGSize from '../CoreGraphics/CGSize'
import CGVector from '../CoreGraphics/CGVector'
const _DecodingFailurePolicy = {
raiseException: Symbol('raiseException'),
... |
import React from 'react';
import styles from './Users.less'
import { Table, Pagination, Popconfirm, Button } from 'antd'
import { PAGE_SIZE } from '../../constants'
import UserModal from './UserModal'
function Users({
list: dataSource,
total,
page: current,
... |
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. pre-run appended it, var Module = {}; ..generated code..
// 4. Externa... |
/*! jQuery UI - v1.9.2 - 2015-04-05
* http://jqueryui.com
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
(function(e){e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hid... |
const webpack = require('webpack');
module.exports = {
context: __dirname + '/app',
entry: {
app: './app'
},
output: {
path: __dirname + '/public',
publicPath: '/',
filename: '[name].js'
},
devtool: "cheap-inline-module-sourcemap",
plugins: [
new webp... |
'use strict';
var aliases = require('./aliases.js').method;
var determineEvent = require('./determineEvent.js');
var EventEmitter = require('events').EventEmitter;
var net = require('net');
var request = require('request');
var util = require('util');
var Xbmc;
module.exports = Xbmc = function (conf, debug) {
if (!c... |
/*! jQuery UI - v1.10.4 - 2014-06-15
* http://jqueryui.com
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
jQuery(function(t){t.datepicker.regional.cs={closeText:"Zavřít",prevText:"<Dříve",nextText:"Později>",currentText:"Nyní",monthNames:["leden","únor","březen","duben","květe... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdSyncDisabled(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M21.27 11.7V7.52c-1.6.41-3.09 1.07-4.46 1.92l2.93 2.93c.49-.25 1-.49 1.53-.67zM7 9.82l4.71 4.71A15.885 15.885 0 0 0 9.27 23c0 4.42 1.81 8.4 4.71... |
'use strict';
var module = angular.module('ToerhApp.services');
module.factory('ResourceService', function($http, $window) {
var baseUri = 'http://toerh.matthis.se/api/v1/';
//var baseUri = 'http://toerh.dev/api/v1/';
$http.defaults.headers.common.Authorization = $window.sessionStorage.token;
return {
all: fu... |
#!/usr/bin/env node
var player = require('chromecast-player')();
var opts = require('minimist')(process.argv.slice(2));
var chalk = require('chalk');
var keypress = require('keypress');
var ui = require('playerui')();
var circulate = require('array-loop');
var xtend = require('xtend');
var unformatTime = require('./ut... |
'use strict';
import $ from 'jquery';
import { Keyboard } from './foundation.util.keyboard';
import { Move } from './foundation.util.motion';
import { GetYoDigits, rtl as Rtl } from './foundation.core.utils';
import { Plugin } from './foundation.core.plugin';
import { Touch } from './foundation.util.touch';
import ... |
/*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* 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... |
const mongoose = require('mongoose');
let Room = require('../models/roomSell');
let PropertySell = require('../models/propertySell');
let login = require('../helpers/login');
const checkAuth = (req,res, next) => {
let method = req.method;
let hasParam = req.path !== '/';
if (req.headers.hasOwnProperty('token'))... |
"use strict";
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
concat: {
dev: {
... |
export default {
//TASK
GET_TASK: 'GET_TASK',
GET_TASKS: 'GET_TASKS',
ADD_TASK: 'ADD_TASK',
UPDATE_TASK: 'UPDATE_TASK',
DELETE_TASK: 'DELETE_TASK'
} |
'use strict';
import angular from 'angular';
import AdminOneController from './sysadmin-one-controller';
var stateConfig = ($stateProvider) => {
$stateProvider
.state('app.admin.one', {
url: '/one',
controller: AdminOneController,
controllerAs: 'adminOne',
... |
"use strict";
var UserStory = (function () {
function UserStory(values) {
if (values === void 0) { values = {}; }
this.title = '';
this.complete = false;
this.author = '';
this.timestamp = new Date();
Object.assign(this, values);
}
return UserStory;
}());
expo... |
var n = 40,
data = [];
for (var i=n; i--;) data.push(0);
var width = 960,
height = 500;
var x = d3.scale.linear().domain([0, n - 1]).range([0, width]);
var y = d3.scale.linear().domain([0, 100]).range([height, 0]);
var line = d3.svg.line()
.x(function(d, i) { return x(i); })
.y(function(d, i) { retur... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:route-performance', 'Unit | Route | route ridership', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
let route = this.subject();
assert.ok(route);
});
|
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require... |
self.addEventListener('activate', function(event) {
// Delete all caches handled by broccoli-serviceworker.
logDebug('Deleting out of date caches, current cache version:', CACHE_VERSION);
event.waitUntil(
caches.keys().then(function(cacheNames) {
return Promise.all(
cacheNames.filter(function(c... |
/**
* Self-contained short-life ID generating module
*
* Not guarenteed to be unique outside of a single instance of the module.
*/
var sechash = require('sechash');
var merge = require('merge-recursive');
var current = 0;
var storage = { };
var config = {
length: 6,
algorithm: 'sha1',
salt: Math.random,
u... |
var dot = require('dotty');
module.exports = function(app) {
var _env = app.get('env');
var _log = app.lib.logger;
var _mongoose = app.core.mongo.mongoose;
var _query = app.lib.query;
var _emitter = app.lib.schemaEmitter;
// types
var ObjectId = _mongoose.Schema.Types.Objec... |
import { compose } from 'recompose';
import withAddressState from './withAddressState';
import withLogin from './withLogin';
import withLogout from './withLogout';
import withRegister from './withRegister';
import withChangePassword from './withChangePassword';
import withForgotPassword from './withForgotPassword';
imp... |
const React = require('react')
const Component = React.Component
const PropTypes = require('prop-types')
class Item extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div {...this.props}></div>
);
}
}
Item.propTypes = {
children: PropT... |
'use strict';
var PRODUCTION = process.env.PORT ? true : false,
PORT = process.env.PORT || 8080,
SESSION_KEY = process.env.SESSION_KEY,
DB_URL = process.env.DB_URL,
TWITTER_CONSUMER_KEY = process.env.TWITTER_CONSUMER_KEY,
TWITTER_CONSUMER_SECRET = process.env.TWITTER_CONSUMER_SECRET,
mongoHelpe... |
function defCalledFunctionExample() {
call1();
call2();
if (someCond) {
maybeCall1();
} else {
maybeCall2();
}
call3();
try {
call4();
} catch(e) {
maybeCall3();
} finally {
call5();
}
call6();
return;
noCall();
}
|
// This is a karma config file. For more details see
// http://karma-runner.github.io/0.13/config/configuration-file.html
// we are also using it with karma-webpack
// https://github.com/webpack/karma-webpack
var webpackConfig = require('../../build/webpack.test.conf.js')
module.exports = function (config) {
co... |
myApp.controller('serversController', ['$scope', '$http', '$timeout', function($scope, $http, $timeout){
$scope.description = "";
$scope.updateServers = function(){
$http.get("/api/minecraft/servers", {}).then(function(response){
$scope.servers = response.data;
});
$timeout($... |
import path from 'path'
import fs from 'fs'
import { castArray } from 'lodash'
import {
AVATARS,
COMPONENTS,
LANGUAGES,
MENU_ITEMS,
PUBLIC,
ROUTES,
THEMES,
UI_COMPONENTS,
WALLET_TABS,
WEBFRAME
} from './plugin-permission'
import * as AvatarsSetup from './setup/avatars-setup'
import * as ComponentsSe... |
/*
* wv: The Web Viewer
*
* WebSocket functions
*
* Copyright 2011-2013, Massachusetts Institute of Technology
* Licensed under The GNU Lesser General Public License, version 2.1
* See http://www.opensource.org/licenses/lgpl-2.1.php
*
*/
wv["wsUtOnOpen"] = function(evt)
{
w... |
/*
* Fractal Flyer
*
*
The MIT License (MIT)
Copyright (c) March 2015 Joseph Van Drunen
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 witho... |
var fs = require('fs');
var path = require('path');
var Collector = function () {
}
Collector.prototype.collect = function(root, option) {
var o = option || {};
o.abs = !!o.abs;
o.level = isNaN(o.level) ? -1 : o.level;
o.ext = !o.ext ? [] : Array.isArray(o.ext) ? o.ext : [o.ext];
o.not = !o.not ? [] :... |
/*
Version: 1.0.5
Documentation: http://baymard.com/labs/country-selector#documentation
Copyright (C) 2011 by Jamie Appleseed, Baymard Institute (baymard.com)
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 ... |
angular
.module('openeApp.systemsettings')
.factory('classifierValuesService', classifierValuesService);
function classifierValuesService($http, alfrescoNodeUtils){
return {
getClassifierValues: getClassifierValues,
saveClassifierValue: saveClassifierValue,
... |
function getIconClass(type) {
switch (type) {
case 'success':
return 'icon-shuruzhengquetishi'
case 'warning':
return 'icon-shurujinggaotishi'
case 'error':
return 'icon-shurucuowutishi2'
default:
return 'icon-shuruzhengquetishi'
}
}
function getTemplate(key, type, content) {
const iconC... |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : null_literal_specs.js
* Created at : 2019-02-05
* Updated at : 2019-08-05
* Author : jeefo
* Purpose : Easier to develop. Please make me happy :)
* Description : Describe what is Null notation and unit test every single case.
* : Make su... |
import { luxairportArrivalsAndDepartures } from '../../requests';
import moment from 'moment';
export const load = async () => {
var raw = await luxairportArrivalsAndDepartures();
return {
departures: filterOutTakenOff(raw['departures'].map(compilePlaneInfo)),
arrivals: filt... |
function solution(A){
var arr = A.split(';');
var obj = {};
var countMin = function(t){
var tt = t.split(':'), min = 0;
min = parseInt(tt[0]) > 0 ? parseInt(tt[0]) * 60 : 0;
min = parseInt(min) + parseInt(tt[1]);
min = parseInt(tt[2]) > 0 ? p... |
// import async to make control flow simplier
var async = require('async');
// import the rest of the normal stuff
var mongoose = require('../../lib');
require('./person.js')();
var Person = mongoose.model('Person');
// define some dummy data
var data = [
{ name : 'bill', age : 25, birthday : new Date().setFullY... |
'use strict';
var watch = require('./watch');
var zkflowWatcher = {
watch: watch
};
module.exports = zkflowWatcher;
|
import {bindable} from 'aurelia-framework';
export class NavBar {
@bindable router = null;
constructor() {
}
}
|
(function(root) {
'use strict';
var slice = Array.prototype.slice,
splice = Array.prototype.splice;
// ## Extend
// -------------------------------------------------------------------------
//
// Extend a class or an object with the properties and methods of any of the
// subsequent classes, or objec... |
/**
* grunt/pipeline.js
*
* The order in which your css, javascript, and template files should be
* compiled and linked from your views and static HTML files.
*
* (Note that you can take advantage of Grunt-style wildcard/glob/splat expressions
* for matching multiple files, and ! in front of an expression to ign... |
import { fromJS } from 'immutable';
import userCardReducer from '../reducer';
describe('userCardReducer', () => {
it('returns the initial state', () => {
expect(userCardReducer(undefined, {})).toEqual(fromJS({}));
});
});
|
/*
D3.js Slider
Inspired by jQuery UI Slider
Copyright (c) 2013, Bjorn Sandvik - http://blog.thematicmapping.org
BSD license: http://opensource.org/licenses/BSD-3-Clause
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module... |
var addClass = require('../addClass');
var chart = document.getElementById('chart');
var inputBank = document.getElementById('bank-name');
var inputType = document.getElementById('loan-type');
var inputLocation = document.getElementById('bank-location');
var containerLocation = document.getElementById('container-bank-... |
/*jslint node: true */
/*jshint node: true */
'use strict';
var
expect = require('chai').expect,
fs = require('fs'),
parser = require('../lib/parser.js');
describe('parser', function() {
describe('parseAuctionList()', function() {
var body;
before(function(done) {
... |
var Benchmark = require('benchmark');
var parse = require('../');
var suite = new Benchmark.Suite;
// add tests
suite.add('Semver#parse major.minor.patch', function() {
parse("3.14.26");
});
suite.add('Semver#parse major.minor.patch.prerelease.build', function() {
parse("3.14.26-alpha+build.3216");
});
// a... |
define(['app/app'], function () {
angular.element(document).ready(function () {
require([
'app/app',
'app/mainpage/mainpage'
], function () {
angular.bootstrap(document, ['blog']);
});
});
});
|
// See https://github.com/jquery-boilerplate/jquery-boilerplate/blob/master/dist/jquery.boilerplate.js
;
(function ($, window, document, undefined) {
"use strict";
var pluginName = "kmapsTypeahead",
defaults = {
term_index: 'http://localhost/solr/kmterms_dev',
domain: 'places',
root_kmapid: '... |
module.exports = require('./lib/middleware'); // eslint-disable-line import/no-unresolved
|
/**
* @fileoverview This file defines the "appLayerOpacityManager" service. This
* service (re-)sets the opacity of layers added to the map. The opacity is
* read from the layer's "start_opacity" metadata. If there's no metadata or
* if the "start_opacity" property doesn't exist then the layer opacity is
* reset t... |
import React from 'react';
import ReactDOM from 'react-dom';
import ReduxRouter from './ReduxRouter';
// require('../styles/Index.css');
require('../styles/Index.scss');
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
String.prototype.decapitalize = function () {... |
const {describe, it} = global;
import {expect} from 'chai';
import {spy, stub} from 'sinon';
import actions from '../user';
describe('user.actions.user', () => {
it('should do something');
});
|
import angular from 'angular';
import coreModule from '../core/CoreModule';
import TryflightController from './TryflightController';
import {TrialFlightResourceService} from './TrialFlightResourceService';
import "angular-recaptcha";
export default angular.module('fls.tryflight', [
coreModule.name,
'vcRecaptch... |
//= require_tree ./api
//= require_self
/**
* Interface for engines providing editor extensions.
*/
pageflow.EditorApi = pageflow.Object.extend({
initialize: function() {
this.sideBarRoutings = [];
this.mainMenuItems = [];
this.initializers = [];
this.fileSelectionHandlers = {};
/**
* Reg... |
const moment = require('moment')
const {
GraphQLObjectType,
GraphQLInt,
GraphQLString
} = require('graphql')
const PartyStatusType = require('./partyStatusType')
module.exports = new GraphQLObjectType({
name: 'PartidoCompleto',
description: '...',
fields: () => ({
id: {
type: GraphQLInt,
... |
import { termTypes } from 'constants/itemConstants/termTypes'
const sort = data => {
return data
.sort((a, b) => b.rating - a.rating)
.sort((a, b) => {
let aDate = new Date(a.createdAt);
let bDate = new Date(b.createdAt);
if (a.rating === b.rating) {
return bDate - aDate
}
... |
var express = require('express');
var deferred_listener = require('deferred-listener');
var Q = require('q');
var FS = require('fs');
/* Let's create our middleware */
function fetch_file(file, key) {
key = key || file;
var readFile = Q.nfbind(FS.readFile);
return deferred_listener(function(req, res) {
return rea... |
import angular from 'angular';
import 'angular-mocks';
import * as <%= controllerName %>Controller from './<%= controllerName %>.controller';
describe('<%= controllerName %> controller', () => {
beforeEach(() => {
angular
.module('dummyModule', [])
.controller('<%= controllerName %>', <%= controllerN... |
(function (toolkit) {
toolkit.register("inputGroup", function (registry) {
registry.inputGroup = new toolkit.classes.Directive("1.0", "input-group", function () {
return {
restrict: "E",
replace: true,
transclude: true,
templateUrl:... |
'use strict';
// Personals create controller
var personalsApp = angular.module('personals');
personalsApp.controller('PersonalsCreateController', ['$scope', 'Personals', 'Notify', '$timeout', '$window', 'Authentication', 'FileUploader',
function ($scope, Personals, Notify, $timeout, $window, Authentication, File... |
import React from 'react';
import { Route, Switch } from 'react-router';
import App from './containers/app';
import AppDetails from './containers/app_details';
import Login from './containers/login';
import CreateAccount from './containers/create_account';
import Home from './containers/app_list';
import { ConnectedRou... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('Jiragation', [
'ngRoute'
, 'Jiragation.taskList'
, 'Jiragation.logs'
, 'Jiragation.account'
, 'Jiragation.version'
, 'Jiragation.task'
, 'Jiragation.headerNav'
, 'Jiragation.actionBar'
, 'timer'
, 'ap... |
(function ($, undefined) {
var kendo = window.kendo,
extend = $.extend;
if (kendo === undefined)
return;
extend(true, kendo.data, {
schemas: {
everlive: {
type: "json",
data: function (data) {
return data.Result || d... |
var five = require('johnny-five'),
board, potent1, servo1, servo2;
var port = 'COM2';
if (process.argv.length > 2) {
port = process.argv[2];
}
board = new five.Board({port:port});
board.on('ready', function () {
potent1 = new five.Sensor({
pin: 'A0',
freq: 100
});
servo1 = new f... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Validation
*/
function validateLength (v) {
// a custom validation function for checking string length to be used by the model
return v.length <= 40;
}
/**
* Product Schema
*/
var ProductSc... |
$(document).ready(function() {
$('.blogPost__content p img').each(function() {
var maxWidth = '100%' // Max width for the image
var maxHeight = '250px' // Max height for the image
var ratio = 0 // Used for aspect ratio
var width = $(this).width() // Current image width
... |
var searchData=
[
['geometry_2ehpp',['Geometry.hpp',['../Geometry_8hpp.html',1,'']]]
];
|
import React from 'react';
import { IconButton, Menu, withStyles } from '@material-ui/core';
import MoreVert from '@material-ui/icons/MoreVert';
const styles = () => ({});
MoreButtonPres.defaultProps = {};
function MoreButtonPres(props) {
const {
anchorEl,
children,
className: classNameProp,
classe... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2016 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.m.Table.
sap.ui.define(['jquery.sap.global', './ListBase', './library'],
function(jQuery, ListBase, library)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.