code stringlengths 2 1.05M |
|---|
/**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
/* eslint-disable */
import 'babel-polyfill';
/* eslint-disable import/no-unresolved, import/extensions */
// Load the manifest.json file and the .htaccess file
import '!file-loader?name=[name].[ext]!./manifest.json... |
/**
* Created by Administrator on 2016/8/11.
* 指令(模板)加载
*/
define(['com'], function (com) {
'use strict';
com.directive("eReg", function () {
return {
restrict: "ECMA",
templateUrl: 'modules/common/register.html'
}
})
});
|
/*!
* jQuery JavaScript Library v2.1.0
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-01-23T21:10Z
*/
(function( global, factory ) {
if (... |
var util = require('util');
var _ = require('lodash');
var debug = require('debug')('vulcand');
var etcd = require('../lib/etcd.js');
var async = require('async');
var backendMixin = require('../lib/backendMixin.js');
/**
* Create a new Vulcand backend
* @constructor
*/
function Vulcand(docker) {
if(!this instan... |
import { Component } from 'react'
import Svg from '../svg'
class DomNodeExample extends Component {
componentDidMount () {
if (typeof window !== 'undefined') {
const { shape, render } = Wilderness
const svg = document.querySelector('#dom-node-example')
const circle = svg.querySelector('circle'... |
(function($, self){
if(!$ || !self) {
return;
}
for(var i=0; i<self.properties.length; i++) {
var property = self.properties[i],
camelCased = StyleFix.camelCase(property),
PrefixCamelCased = self.prefixProperty(property, true);
$.cssProps[camelCased] = Pref... |
import React from 'react'
import Helmet from 'react-helmet'
import { FormattedMessage, FormattedHTMLMessage, injectIntl, intlShape } from 'react-intl'
const Terms = props => {
const { intl: { formatMessage } } = props
const styles = require('./Terms.css') // eslint-disable-line global-require
const messages = re... |
"use strict";
/* tslint:disable:one-line */
var hero_service_1 = require('./hero.service');
var logger_service_1 = require('../logger.service');
var user_service_1 = require('../user.service');
var heroServiceFactory = function (logger, userService) {
return new hero_service_1.HeroService(logger, userService.user.i... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... |
/**
* Gulp clean tasks.
*/
'use strict';
var path = require('path'),
gulp = require('gulp-help')(require('gulp')),
del = require('del'),
runSequence = require('run-sequence'),
conf = require('./conf');
/**
* Gulp clean lib directory task.
*/
gulp.task('clean-lib', function () {
return del([
... |
/**
* Module dependencies.
*/
var express = require('express'),
app = express();
/**
* App configuration.
*/
app.configure(function () {
app.use(express.static(__dirname + '/dist'));
app.set('views', __dirname);
app.set('view engine', 'html');
});
/**
* App routes.
*/
app.get('/', function (req, res) ... |
'use strict'
/* global describe, it */
const assert = require('assert')
const Funq = require('../')
describe('stress test - sequential', () => {
it('should succeed and pass', done => {
let index = 0
const limit = 10000
const queue = new Funq((err, value) => {
assert(!err)
assert.equal(valu... |
/**
*
*/
var httpUtil = require('http_util'),
log = require('log'),
util = require('util');
module.exports = {
testGetHeader: function(test){
var headers = {
"content-type" : "text/html",
"Check-Something": "test"
}
test.assertEquals(httpUtil.getHeader(headers, "Conte... |
'use strict';
var shell = require('shelljs');
var symlinkDir = './node_modules/freepeople';
if (!shell.test('-L', symlinkDir)) {
shell.exec('ln -s ../services' + ' ' + symlinkDir, function() {
console.log('Symlink created');
});
} |
const Boom = require('@hapi/boom');
const get = require('lodash/get');
const { translate } = require('@datawrapper/service-utils/l10n');
module.exports = {
name: 'routes/visualizations/{id}',
version: '1.0.0',
register
};
async function register(server, options) {
server.app.scopes.add('visualization:... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Card, CardTitle } from 'material-ui/Card';
import compose from 'recompose/compose';
import inflection from 'inflection';
import ViewTitle from '../layout/ViewTitle';
import Title from '../layout... |
export default {
'flowtype/boolean-style': 'error',
'flowtype/define-flow-type': 'warn',
'flowtype/delimiter-dangle': [
'error',
'never',
],
'flowtype/generic-spacing': 'error',
'flowtype/no-dupe-keys': 'error',
'flowtype/no-mutable-array': 'error',
'flowtype/no-primitive-constructor-types': 'er... |
var plumber = require('gulp-plumber');
var gulpMocha = require('gulp-spawn-mocha');
var filter = require('gulp-filter');
var gulpFile = require('gulp-file');
var gulpIf = require('gulp-if');
var gulpUtil = require('gulp-util');
var gulpWatch = require('gulp-watch');
var yargs = require('yargs');
var argv = require('yar... |
exports.up = function(knex, Promise) {
return knex.schema.createTable('users', function (table) {
table.increments('id').primary();
table.string('email').notNullable();
table.string('oauth_provider').notNullable();
table.string('oauth_id').notNullable();
table.timestamps();
});
};
exports.down... |
import assert from 'assert';
import Ruler from '../lib/ruler';
describe('Ruler', function () {
it('should replace rule (.at)', function () {
var ruler = new Ruler();
var res = 0;
ruler.push('test', function foo() { res = 1; });
ruler.at('test', function bar() { res = 2; });
var rules = ruler.g... |
define(['text!./template.html'], function (template) {
'use strict';
return {
template : template,
modelData : {
title : '404: Page not found.'
}
};
}); |
module.exports = {
100: "request data invalid",
101: "data not found",
102: "data exists",
103: "no file attached",
201: "User exists",
301: "Access forbidden error",
303: "Incorrect username",
302: "Log out fails",
304: "Incorrect password",
306: "Vendor already exists",
307... |
const { parse } = require('path');
const colors = require('colors/safe');
const { knexConfig, knexInstance } = require('@atlauncher/database');
module.exports = {
name: 'db:rollback',
description: 'Rolls back the last database migration',
action: async function (args, callback) {
this.log('Rolling ... |
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dev: {
options: {
style: 'compact'
},
files: {
'output/assets/css/foo.css': 'source/sass/foo.scss'
}
}
},
assemble: {
dev: {
options: {
data: 'source/data/*... |
import express from 'express';
import PostIt from './../src/PostIt';
import verifyToken from './../middleware/verifyToken';
const getGroups = express.Router();
const postIt = new PostIt();
/**
* Gets all the groups to which a user belongs
*/
getGroups.get('/groups', verifyToken, (request, response) => {
postIt.fi... |
module.exports = {
// Force double quotes
"quotes": [2, "double"],
// Disable trailing spaces
"no-trailing-spaces": 2,
// Two spaces indent
"indent": [2, 2],
// Require space after operator keywords
"space-after-keywords": 2,
// Do not allow a space before function parens
"space-before-function-... |
/**
* @file Light平台核心服务的初始化
* @module lib.http.loader
* @author r2space@gmail.com
* @version 1.0.0
*/
"use strict";
const path = require("path")
, http = require("http")
, _ = require("underscore")
, express = require("express")
, ejs = require("ejs")... |
/*
Phantomer v1.0.6
(c) 2016-2017 Petar Telbiyski. https://github.com/telbiyski
License: MIT
*/
const phantom = require('./lib/node-phantom');
const defaults = require('defaults');
const Promise = require('bluebird');
module.exports = function(options) {
let self = this,
browser = null,
tab = nul... |
var interactive = require('../interactive-framework');
interactive.listen(3000); |
/*!
* DatatableJs v0.2.0 (https://github.com/mkenney/DatatableJs)
* Copyright 2014-2015 Michael Kenney
* Licensed under MIT (https://github.com/mkenney/DatatableJs/blob/master/LICENSE)
*/
+function(global, undefined) {
'use strict';
// This library uses console messages to provide non-fatal error feedback, make... |
const hasWindow = (typeof window !== 'undefined')
/*
* [lng, lat]
* {lng, lat}
* {longitude, latitude}
*/
export const toLnglat = (pos) => {
if (!pos) {
return pos
}
// 高德原生 AMap.LngLat 类
if ('getLng' in pos && 'getLat' in pos) {
return pos
}
let lng = 0
let lat = 0
if (({}).toString.call(p... |
import 'whatwg-fetch'
import React, { Component } from 'react'
import { Bar, Line } from 'react-chartjs-2'
import { Progress } from 'reactstrap'
import './Overview.scss'
// const brandPrimary = '#20a8d8'
// const brandSuccess = '#4dbd74'
const brandInfo = '#63c2de'
const brandDanger = '#f86c6b'
const cardChartLine =... |
'use strict';
angular.module("ngLocale", [], ["$provide", function ($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function ... |
/***Generated Resource **/
var resource = require('resource');
var EntertainmentBusiness = resource.define('EntertainmentBusiness');
EntertainmentBusiness.schema.description = "A business providing entertainment.";
EntertainmentBusiness.persist('fs');
EntertainmentBusiness.property('additionalType', {
"name" :... |
import React from 'react';
export function renderInputField(field) {
return (
<input type="text" placeholder={`Enter a ${field.label}...`} {...field.input} className={field.class}/>
);
}
|
game.resources = [
/* Graphics.
* @example
* {name: "example", type:"image", src: "data/img/example.png"},
*/
{name: "background-tiles", type:"image", src: "data/img/background-tiles.png"},
{name: "meta-tiles", type:"image", src: "data/img/meta-tiles.png"},
{name: "player", type:"image"... |
require("should");
module.exports = function (data) {
data.should.not.equal(null);
data.should.instanceOf(Object);
data.should.have.property('code');
data.code.should.instanceOf(String);
data.should.have.property('termOfPayment');
data.termOfPayment.should.instanceOf(String);
data.sh... |
// var socket = io.connect('http://api.m-ph.org:3000');
$(function() {
document.socket.on('connect', function() {
console.log('connected');
});
// send a chat message
$('#btn').click(function() {
var message = $('#message');
// console.log(message);
// push msg command to server
document.s... |
(function () {
'use strict';
var express = require('express');
var routes = function (Book) {
var bookRouter = express.Router();
var bookController = require('../controllers/bookController')(Book);
bookRouter.route('/')
.post(bookController.post)
.get(bookController.get);
bookRouter... |
import Vue from 'vue'
import Vuex from 'vuex'
import modules from './modules'
import state from './state'
import * as actions from './actions'
import * as getters from './getters'
import * as mutations from './mutations'
Vue.use(Vuex)
export default new Vuex.Store({
modules,
state,
actions,
getters,
... |
module.exports = function (grunt)
{
grunt.initConfig({
copy: {
main: {
files: [
{expand: true, cwd: "node_modules/", src: ["mirrorjs/**", "mirrorjs-widgets/**"], dest: "build/"},
{expand: true, cwd: "src/", src: ["index.html"], dest: "build... |
var fs = require( 'fs' );
var assert = require( 'assert' );
var rmrf = require( 'rimraf' );
var Collection = require( '../src/collection' );
describe( 'Collection constructor', function() {
it( 'throws when given a config object without "name" key', function() {
assert.throws(function() {
Collection('users');
... |
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = {
entry: {
app: "./index.js",
styles: "./src/sass/index.js"
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js"
},
devServer: {
publicPath: "/",
contentBase: "./dist",
h... |
define(['app'], function (app) {
app.controller('divideController', ['$location', '$window', function DivideControllerFactory($location, $window) {
var
divide = this,
items = [],
control = {
'tries' : {},
'sum' : {}
},
refine = function refine(item) {
ite... |
var express = require('express');
var router = express.Router();
var dao = require('../utils/dao');
router.get('/', function(req, res, next) {
dao.anime.list(function(error, rows, fields) {
res.render('animes_list', {
title: 'Listagem de animes',
animes: rows,
});
});
});
router.get('/add', ... |
export { createExampleRoute } from './ExampleRoute';
export { createSessionRoute } from './SessionRoute';
export { createUserRoute } from './UserRoute';
|
'use strict'
// const test = require('tape')
// // Replace all N with day
// test('Day N.A - ', t => {
// const dayN = require('../solutions/N')
// t.equal(dayN.a(), 'a')
// t.end()
// })
//
// test('Day N.B - ', t => {
// const dayN = require('../solutions/N')
// t.equal(dayN.b(), 'b')
// t.end()
// })
|
import { zip, unzip } from "./itertools";
const { pow, cos, sin } = Math;
const lerp = (s, e, t) => s + (e - s) * t;
/**
* Checks to see if a command is relative or absolute
* Abusing some JS here so you can either pass in just the command
* or a command set
* e.g.
* ["M", 0, 0][0] => "M"
* "M"[0] => "M"
*... |
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.findRecord('flashcard', params.flashcard_id)
},
afterModel() {
this.set('lesson', this.modelFor('lesson'))
}
});
|
module.exports={
'todoist_token':'user_token',
'user': "mail@account.com2",
'password': "mail_password",
'host': "imap.gmail.com",
'port': 993,
'tls': true,
'tlsOptions': {rejectUnauthorized: false}
};
|
/* eslint-enable import/no-unresolved, import/extensions */
import { black } from './colors';
import { ELEVATION_ZINDEX } from './constants';
const getPlatformElevation = (elevation) => {
if (elevation !== 0) {
return {
shadowColor: black,
shadowOpacity: 0.3,
shadowRadiu... |
//
// Stub out `require` in rhino
//
function require(arg) {
return less[arg.split('/')[1]];
};
// ecma-5.js
//
// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
// -- tlrobinson Tom Robinson
// dantman Daniel Friesen
//
// Array
//
if (!Array.isArray) {
Array.isArray = functio... |
var tswlairmgr = tswlairmgr || {};
tswlairmgr.modules = tswlairmgr.modules || {};
tswlairmgr.modules.organizer = tswlairmgr.modules.organizer || {};
tswlairmgr.modules.organizer.viewPicktableParticipantRow = function organizerViewPicktableParticipantRow(contentNode, modelInstance, participantInstance, localization) {
... |
/* jslint browser: true, node: true */
/* eslint-disable max-statements */
/* global window, document, setTimeout, XMLHttpRequest */
'use strict';
/**
* The autocomplete widget.
*
* @param {Element} inputEl The input element.
* @param {Function} urlFn The optional function to return the URL for
* retrieving ... |
//@flow
import * as React from "react";
import type { ActivePagePanel } from 'models/pageLayout';
import { NavigationPanel, MainPanel, AsidesPanel } from 'components/pageLayout';
export function PanelSwipeMarker(props : ActivePagePanel) {
return (
<ol className={getListClass(props)}>
<li classN... |
import React, { Component } from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import './index.css';
import Header from '../Header';
import Content from '../../components/Content';
import Register from '../Register';
import Login from '../Login';
import BookDetail from '../BookDetail';
import AddCartSuccess f... |
'use strict';
/**
* Module dependencies.
*/
var should = require('should'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Catbrowse = mongoose.model('Catbrowse');
/**
* Globals
*/
var user, catbrowse;
/**
* Unit tests
*/
describe('Catbrowse Model Unit Tests:', function() {
beforeEach(funct... |
/* global $*/
'use strict';
var consts = require('config/consts.js');
var utils = require('helpers/utils.js');
var AudioInput = require('inputs/audio.js');
var BarcodeInput = require('inputs/barcode.js');
var BranchInput = require('inputs/branch.js');
var CheckboxInput = require('inputs/checkbox.js');
var DateInput = r... |
import faker from 'faker'
export const User = {
userId: String,
username: String,
email: String,
createdAt: String,
updatedAt: String
}
export const fakeUser = () => ({
username: faker.internet.userName().replace(/[\W_]/g, '').slice(0, 63),
password: faker.internet.password(),
email: faker.internet.em... |
(function() {
define([
'jquery',
'backbone',
'hogan',
'js/view/headerView'
], function($, Backbone, Hogan, Header) {
return describe('Header', function() {
it('should display header', function(done) {
$('#main').empty().append(new Header().render().$el);
$('header').should.exist;
done();
... |
import 'aurelia-polyfills';
import {initialize} from 'aurelia-pal-browser';
initialize();
const context = require.context('./', true, /\.spec\.[tj]s$/);
context.keys().forEach(context);
|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
module.exports = {
apps: [
{
//名称
name: 'react-server-render',
//要启动的文件路径
script: './3_compress_ensure_render/dist/server/server.js',
/**设定进程
*0或'max'表示启用与cpu核心对应的进程.
*-1表示启动比cpu核心少一个的进程
*其他具体数字表示指定进程数目
... |
var b = "test"
|
/**
* Created by zhangrz on 2017/9/24.
* Copyright© 2015-2020 codingview (https://github.com/codingview)
* @version 0.0.1 created url解析
*/
'use strict';
module.exports = {
get: name => {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
, r = window.location.search.substr(1).ma... |
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html
// Generated on 2015-04-16 using
// generator-karma 0.9.0
module.exports = function(config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: tr... |
import $ from 'jquery/dist/jquery.slim';
import {
JetView,
} from 'webix-jet';
export default class CdnView extends JetView {
config() {
return {
id: 'cdn',
view: 'datatable',
select: 'row',
columns: [{
id: 'url',
editor: 'text',
header: 'CSS path',
fillsp... |
/**
* Livechat Department model
*/
class LivechatDepartmentAgents extends RocketChat.models._Base {
constructor() {
super('livechat_department_agents');
}
findByDepartmentId(departmentId) {
return this.find({ departmentId: departmentId });
}
findOneByAgentId(agentId) {
const query = { agentId : agentId }... |
import React, { Component } from 'react';
import styles from './SkipToContent.module.css';
class SkipToContent extends Component {
render() {
return (
<a href="#main" className={ styles.link }>
Skip To Content
</a>
);
}
}
export default SkipToContent;
|
'use strict';
/**
* Module dependencies.
*/
var init = require('./config/init')(),
config = require('./config/config'),
mongoose = require('mongoose'),
chalk = require('chalk');
/*
ADD TO Allocine-API
var cleanJson = function(data) {
if (data) {
var str = JSON.stringify(data);
str = str ? str.... |
/*
* # locale library test suite
*
* ## locale.js: i18n for Node.js and browser
*
* @author Dmitry A. Chleck <dmitrychleck@gmail.com>
* @url https://github.com/chleck/locale-js
*/
var locale = require('..');
var i18n, __, tmp;
describe('Test suite for locale library', function() {
describe('Configure:', ... |
var cliks = require('./index')
, util = require('util')
;
new cliks.accel.board({ scale_factor: [ 0.0371299982 , -0.0374319982, 0.0385979986 ] }).on('ready', function(data) {
var self = this
, x = 3
;
console.log('accel: ready');
console.log(util.inspect(data, { depth: null }));
var measureAc... |
Package.describe({
name: 'rocketchat:ui',
version: '0.1.0',
// Brief, one-line summary of the package.
summary: '',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, se... |
'use strict';
/**
* Module dependencies
*/
var carsPolicy = require('../policies/cars.server.policy'),
cars = require('../controllers/cars.server.controller');
module.exports = function (app) {
// Cars collection routes
app.route('/api/cars').all(carsPolicy.isAllowed)
.get(cars.list)
.post(cars.create... |
'use strict';
module.exports = {
extends: 'octane',
rules: {
'no-bare-strings': true
}
};
|
'use strict';
const isEmpty = require('lodash.isempty');
const aggregator = require('./aggregator');
const DEFAULT_METRICS_LARGEST_ASSETS = ['image.0.transferSize'];
module.exports = {
open(context, options) {
this.make = context.messageMaker('assets').make;
this.options = options;
this.alias = {};
... |
'use strict'
const logger = require('koa-logger')
const Koa = require('koa')
const app = new Koa()
app.use(logger())
app.use((ctx) => {
this.body = 'hello world'
})
app.listen(3000)
|
import React from 'react'
import renderer from 'react-test-renderer'
import { CommentForm } from './index'
describe('<CommentForm />', () => {
it('should match its empty snapshot', () => {
const tree = renderer
.create(
<CommentForm
id="custom-textarea-id"
aria-label="Leave a co... |
'use strict';
require('mocha');
var assert = require('assert');
var templates = require('templates');
var questions = require('base-questions');
var app;
var ask;
describe('helper-ask', function() {
beforeEach(function() {
app = templates();
app.use(questions());
ask = require('./')(app);
app.asyncH... |
var choicesDal = require('../choices/dal');
var Promise = require('bluebird');
module.exports = {
create: create,
//findAll: findAll,
find: find,
update: update,
remove: remove,
removeByQuestionId: removeByQuestionId,
query: query
};
// { text, choices[] = { text } }
function create (para... |
/**
* Copyright (c) 2016-2017 Guyon Roche
* LICENCE: MIT - please refer to LICENCE file included with this module
* or https://github.com/guyonroche/exceljs/blob/master/LICENSE
*/
'use strict';
// The purpose of this module is to wrap the js-zip library into a streaming zip library
// since most of the exceljs co... |
var React = require('react');
module.exports = MenuItem = React.createClass({
render: function() {
var key = this.props.key;
var menuItem = this.props.menuItem;
return (
<li className={"menuItem" + (menuItem.active ? " active" : "")} data-key={key} onclick={this.props.onClick} >
<a href={menuItem.href} >... |
self.addEventListener('message', function(message) {
setTimeout(function() {
self.postMessage(message.data);
}, 1000);
}, false); |
const path = require('path');
module.exports = ({ config, isDevelopment }) => webpackConfig => ({
...webpackConfig,
output: {
path: path.join(config.projectRoot, 'dist'),
publicPath: isDevelopment ? '/' : config.dist.publicPath,
globalObject: 'this',
filename: isDevelopment
? '[name].js'
... |
/**
* @file apis/nsw.js
*
* @author fewieden
* @license MIT
*
* @see https://github.com/fewieden/MMM-Fuel
*/
/**
* @external node-fetch
* @see https://www.npmjs.com/package/node-fetch
*/
const fetch = require('node-fetch');
/**
* @external moment
* @see https://www.npmjs.com/package/moment
*/
const mome... |
// ```
// @datatype_void
// david.r.niciforovic@gmail.com
// webpack.common.js may be freely distributed under the MIT license
// ```
var webpack = require('webpack');
var helpers = require('./helpers');
//# Webpack Plugins
var CopyWebpackPlugin = require('copy-webpack-plugin');
var HtmlWebpackPlugin = require('html-... |
var Bluebird = require('bluebird');
var ResourceStream = require('./resource_stream');
/*
* @type {Number} Maximum number of items in a collection this library will
* ever return. This is currently way higher than the practical limit
* of items one can expect to get from the API.
*/
var MAX_COLLECTION_SIZE... |
module.exports = {
rules: {
'brace-style': [ 2, '1tbs', { 'allowSingleLine': true } ],
'camelcase': [ 2, { 'properties': 'never' } ],
'comma-spacing': [ 2, { 'before': false, 'after': true } ],
'comma-style': [ 2, 'last' ],
'eol-last': 2,
'func-names': 0,
'ind... |
"use strict";
var React = require('react');
var Link = require('react-router').Link;
var NotFoundPage = React.createClass({
render: function() {
return (
<div>
<h1>Page Not Found</h1>
<p>Whoops! Sorry, there is nothing to see here.</p>
<p><Link to="app">Back to... |
// eslint-disable react/jsx-indent rule added for proper <Markdown /> formatting
/* eslint-disable react/jsx-indent */
const React = require('react');
const { Link } = require('react-router');
const { SelectFullScreen } = require('mx-react-components');
const Markdown = require('components/Markdown');
const options ... |
'use strict';
const test = require('tape');
function runTest(description, headingLevel) {
test(description, t => {
t.plan(6);
t.strictEqual(headingLevel('h1'), 1, 'should extract heading level from tag name.');
t.strictEqual(headingLevel('H2'), 2, 'should extract heading level from tag name of upper c... |
const path = require(`path`)
const resolveCwd = require(`resolve-cwd`)
const yargs = require(`yargs`)
const report = require(`./reporter`)
const envinfo = require(`envinfo`)
const existsSync = require(`fs-exists-cached`).sync
const DEFAULT_BROWSERS = [`>0.25%`, `not dead`]
const handlerP = fn => (...args) => {
Prom... |
var sensorLib = require('node-dht-sensor');
var mqtt = require('mqtt');
var client = mqtt.connect({
port: 1883,
host: 'app.connectingthings.io',
keepalive: 10000,
protocolId: 'MQIsdp',
protocolVersion: 3
});
var sensor = {
initialize: function () {
return sensorLib.initialize(11, 4);
},... |
'use strict';var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(fu... |
const fs = require('fs/promises')
const nlp = require('./google-nlp.json')
async function run() {
const sentiments = nlp
.map(d => [
d.data.documentSentiment.score,
d.data.documentSentiment.magnitude,
])
.sort((a, b) => a - b)
await fs.writeFile(
__dirname + '/statementSentiment.json'... |
(function(angular) {
'use strict';
function driverInfoPopup(details) {
var popUpCtrl = this;
var modalInstance = popUpCtrl.$uibModal.open({
component: 'driverInfoModal',
windowClass: 'app-modal-window-small',
resolve: {
details: function() {... |
/**
* Copyright (C) 2020 tt.bot dev team
*
* This file is part of tt.bot.
*
* tt.bot is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any ... |
AuthManager.$inject = ["$resource", "$http", "$rootScope", "LocalStorage", "baseURL", "User"];
export default function AuthManager($resource, $http, $rootScope, LocalStorage, baseURL, User) {
let authFac = {},
TOKEN_KEY = 'userinfo',
isAuthenticated = false,
username = '',
authToken = undefined;
let... |
var TRANSFORM_INT = [
{low: "0.0.0.0", high: "1.1.1.1", newBase: "2.2.2.2" }
]
D("foo.com","reg",IMPORT_TRANSFORM(TRANSFORM_INT,"foo2.com",60)) |
var appX = angular.module('boilerplate');
appX.controller('todo', ['$scope', function ($scope) {
$scope.tasks = [];
var taskData = localStorage['taskLists'];
if (taskData !== undefined) {
$scope.tasks = JSON.parse(taskData);
}
$scope.searchEnter = function() {
if(event.which == 13 && $scope.task != ""){
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.