code stringlengths 2 1.05M |
|---|
var THREE = require('three')
var container;
var scene, camera, light, renderer;
var geometry, cube, mesh, material;
var mouse, center;
var animationId;
var width, height;
var nearClipping, farClipping, zOffset, scale;
var texture, t;
function conteinerHeight(){
// window.innerHeight
return container.offsetHei... |
/**
* Encapsulates pageable entity
*/
class PageService {
/**
* @param {Number} pageIndex page number
* @param {Number} chunkSize size of an items
*/
constructor(pageIndex, chunkSize) {
this._pageIndex = pageIndex;
this._chunkSize = chunkSize;
}
/**
* Returns a pag... |
var filters = {
all: {}
,
hacker: {
'profile.mentor': {
$in: [true, null]
},
'profile.admin': {
$in: [false, null]
}
},
sponsor: {
'profile.sponsor' : false
},
mentor: {
'profile.mentor': true
},
admin: {
... |
const express = require('express')
const router = express.Router()
const jwt = require('jsonwebtoken')
const sha1 = require('sha1')
const rand = require('csprng')
const secret = require('../../config').jwt
const confirmToken = require('../middlewares/confirmToken')
let db = require('../models/db')
let models = [db.stu... |
import React from 'react'
import PropTypes from 'prop-types'
import NewOAuthServerContainer from './newOAuthServerContainer'
const propTypes = {
location: PropTypes.object.isRequired
}
const NewOAuthServerPage = ({ location }) => <NewOAuthServerContainer location={location} />
NewOAuthServerPage.propTypes = propT... |
var Icon = require('../icon');
var element = require('magic-virtual-element');
var clone = require('../clone');
exports.render = function render(component) {
var props = clone(component.props);
delete props.children;
return element(
Icon,
props,
element('path', { fill: '#010101', d: 'M20 12l-1.41-1.4... |
$(document).ready(function () {
$('#admin_page_controller').hide();
$('#text_event_name').text("Create New Event");
var eventName = getURLParameter("q");
console.log("eventName (inside ready):" + eventName)
if (eventName != null && eventName !== '' && eventName != "undefined") {
$('#text_event_name').text("Even... |
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
watch: {
js: {
files: ['resources/assets/js/functions.js'],
tasks: ['uglify'],
},
sass: {
files: ['resources/assets/sass/style.sass'],
... |
Dagaz.Model.NO_SOUND = true;
ZRF = {
JUMP: 0,
IF: 1,
FORK: 2,
FUNCTION: 3,
IN_ZONE: 4,
FLAG: 5,
SET_FLAG: 6,
POS_FLAG: 7,
SET_POS_FLAG: 8,
ATTR: 9,
SET_ATTR: 10,
PROMOTE: 11,
... |
import { StyleSheet } from 'aphrodite';
const codeColors = {
func: '#f06595',
attr: '#12b886',
object: '#65737E',
array: '#65737E',
number: '#ff922b',
string: '#e599f7',
bool: '#ff922b',
empty: '#C0C5CE',
brace: '#862e9c',
component: '#d6336c',
prop: '#ae3ec9',
content: '#24292e',
};
const cod... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ViewSelectorItemMock = void 0;
var ViewSelectorItemMock = /** @class */ (function () {
function ViewSelectorItemMock(reference) {
this.reference = reference;
}
ViewSelectorItemMock.prototype.getEntityReference = fun... |
jQuery(function ($) {
//region Mobile menus
var $d = $(document),
$w = $(window),
resizeTmt;
new MobileMenus();
function MobileMenus() {
var mobileMenus = [],
settings = {
classMenuItemHasSubmenu: 'pi-has-dropdown',
classParentRowWrapper: 'pi-header-row-sticky',
classOpen: 'p... |
/**
* Module dependencies.
*/
var express = require('express');
/*-----分离路由,方便管理和阅读-------------*/
var routes = require('./routes/index.js');
var _search = require('./routes/search_2.js');
var check_data = require('./routes/check_data.js');
var controller = require('./routes/controller.js');
/*其他核心模块*/
var http ... |
'use strict';
var path = require('path'),
assert = require('yeoman-generator').assert,
helpers = require('yeoman-generator').test;
describe('bnsf:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.withArguments('name')
.withOptions({ '... |
// Poll repository to save and retrieve poll
//
//
var mongo = require('mongodb');
var mongoClient = mongo.MongoClient;
var ObjectID = mongo.ObjectID;
var debug = require('debug')('model:poll_repository');
var localMongoUri = "mongodb://localhost:27017/db";
var mongoUri = process.env.MONGOLAB_URI ||
pr... |
define(["Tone/core/Tone", "Tone/signal/WaveShaper", "Tone/type/Type", "Tone/core/Param", "Tone/core/Gain"], function(Tone){
"use strict";
/**
* @class A signal is an audio-rate value. Tone.Signal is a core component of the library.
* Unlike a number, Signals can be scheduled with sample-level accurac... |
version https://git-lfs.github.com/spec/v1
oid sha256:88b53f5119b1946b7944f325b5ba3c72da78e089d8691843877f7a0e24c4cbab
size 3880
|
"use strict";
const fs = require("fs-extra-promise");
const yargs = require("yargs");
const rp = require("request-promise");
const { userrepo: configUserRepo } = require("./config.json");
const argv = yargs
.help("help")
.strict()
.option("i", {
alias: "id",
describe: "Team id",
type: "string",
requir... |
/**
* Requires `value` to be a `string` with atleast one line containing
* characters followed by ': ' and then more characters.
*
* Returns an `Object` where the keys and values match that of the fields in
* the fieldset.
*
* Returns `false` if the `value` is not a valid fieldset.
* @param {string} value
* @r... |
/*global Backbone, jQuery, _, ENTER_KEY, ESC_KEY, Showdown */
(function ($) {
'use strict';
app.SuspendedMessageView = Backbone.View.extend({
tagName: 'tbody',
className: "message-body",
template: _.template($('#suspended-message-template').html()),
// Re-render the titles of t... |
import { ACTIVATE_STATE, DEACTIVATE_STATE } from '../types';
export function activateState(comp) {
return {
type: ACTIVATE_STATE,
comp: comp
}
}
export function deactivateState(comp) {
return {
type: DEACTIVATE_STATE,
comp: comp
}
}
|
import { getWithDefault } from '@ember/object';
import readModules from 'ember-cli-mirage/utils/read-modules';
import Server from 'ember-cli-mirage/server';
import _assign from 'lodash/assign';
/**
Helper to start mirage. This should not be called directly. In rfc232/rfc268
tests, use `setupMirage()` or the `autob... |
(function () {
'use strict';
var dateFilter = function dateFilter() {
return function (input) {
var monthNames = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
... |
import Ember from 'ember';
import { defaultFeedIdentifiers } from 'couch/couch/changes/changes';
const {
Evented,
computed
} = Ember;
const call = name => {
return function() {
let internal = this._internal;
return internal[name].call(internal, ...arguments);
}
}
const internalProperty = key => {
r... |
/**
* @name stringular
* @kind function
*
* @description
* get string with {n} and replace match with enumeration values
*/
function stringular(input) {
var args = Array.prototype.slice.call(arguments, 1);
return input.replace(/{(\d+)}/g, function (match, number) {
return isUndefined(args[number]) ? matc... |
module.exports = {
/**
* Supported translations
*/
languages: ['fr', 'es'],
/**
* The path to be scanned when searching for messages
*/
sourcePath: ['.'],
/**
* The path where language files will be generated
*/
messagePath: 'languages/',
/**
* The function you are using... |
// Generated by CoffeeScript 1.7.1
(function() {
var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDENTABLE_CLOSERS, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS... |
// 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 any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
var Checker = require('./helper').Checker
exports.doTest = function() {
_a()
_b()
}
function _a() {
var checker = new Checker(".test {\
color: red\
}\
.empty {}\
@font-face {}\
@media print {\
.empty {}\
}\
.test {\
border: none\
}")
... |
import * as path from 'path';
import {Base} from 'yeoman-generator';
import {humanize, titleize} from 'underscore.string';
import {assign, trim} from 'lodash';
import glob from 'glob';
import * as git from './git';
class ApiaryLibGenerator extends Base {
constructor() {
super(...arguments);
// Using gl... |
define('Dumper', function() {
return function(size, dump) {
if (size == null) {
size = 9;
}
if (dump == null) {
dump = [];
}
return (function() {
return {
push: function(val) {
if (dump.push(val) > size) {
return dump.shift();
}
},
... |
import React from 'react'
import { shallow, mount } from 'enzyme'
import Favorite from '.'
import { Button } from 'semantic-ui-react'
import Pen from './../../../../../../../../model/tools/Pen'
import ToolsConfig from './../../../../../../../../model/ToolsConfig'
import defaultToolsConfig from './../../../../../../... |
import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import { PieChart } from 'react-native-ios-charts';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'stretch',
backgroundColor: 'transparent'
}
});
export default c... |
'use strict';
var gulp = require('gulp'),
Plumes = require('./index');
gulp.task('fontawesome', function(done) {
gulp.src('node_modules/font-awesome/fonts/*')
.pipe(gulp.dest('public/plumes/fonts'))
.on('end', done);
});
new Plumes(gulp, {
paths: {
less: './features/**/css/*.less',
js: './fea... |
"use strict";
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
exports.Program = Program;
var react = _interopRequireWildcard(require("../../helpers/react"));
var t = _interopRequireWildcard(require("../../../types"));
var JSX_ANNOTATION_REGEX = /^\*\s*@jsx... |
const { getLabel, getAction } = require('../../../../../server/routes/viewModels/taskLists/tasks/bassOffer')
describe('bass offer task', () => {
describe('getLabel', () => {
it('should return Bass area rejected if bassAreaNotSuitable = true', () => {
expect(
getLabel({
decisions: { bassAr... |
// All code points with the `Logical_Order_Exception` property as per Unicode v4.0.1:
[
0xE40,
0xE41,
0xE42,
0xE43,
0xE44,
0xEC0,
0xEC1,
0xEC2,
0xEC3,
0xEC4
]; |
(function($){
var quantityTemp = '<div class="selectbox disabled"><select class="item-quantity" name="quantity[]">',
items = $('.list').find('.item'),
amount = $('#amount-price'),
prices = [];
for (var i=0; i<10; i++){
quantityTemp += '<option value="'+i+'">'+i+'</option>';
}
quantityTemp += '</select></d... |
/* Game namespace */
var game = {
// an object where to store game information
data : {
// score
score : 0
},
// Run on page load.
"onload" : function () {
// Initialize the video.
if (!me.video.init("screen", me.video.CANVAS, 640, 480, true, 'auto')) {
alert("Yo... |
/**
* Created by nina on 09/12/2016.
*/
angular
.module('maintenancetrackerApp')
.controller('NotificationController', NotificationController);
NotificationController.$inject = ['$scope','$firebaseObject','$firebaseArray','$routeParams'];
function NotificationController($scope,$firebaseObject,$firebaseArray,... |
import _ from "lodash";
import { bind } from "mousetrap";
import {
addComment,
addIdentification,
agreeWithCurrentObservation,
showNextObservation,
showPrevObservation,
toggleCaptive,
toggleReviewed,
toggleFave,
addAnnotationFromKeyboard,
zoomCurrentPhoto,
showPrevPhoto,
showNextPhoto,
showPre... |
import fs from 'fs';
import expressJwt from 'express-jwt';
import { secret } from '../config';
import { getToken } from '../utils';
const { Router } = require('express');
const multer = require('multer');
const uuid = require('uuid/v4'); // 使用v4生成uuid
// 确保upload和jkef目录存在
try {
fs.accessSync('upload');
} catch (e)... |
var _ = require('lodash');
var passport = require('passport');
var request = require('request');
var InstagramStrategy = require('passport-instagram').Strategy;
var LocalStrategy = require('passport-local').Strategy;
var FacebookStrategy = require('passport-facebook').Strategy;
var TwitterStrategy = require('passport-t... |
import React, { Component } from 'react';
import BigCalendar from 'react-big-calendar';
import moment from 'moment';
BigCalendar.setLocalizer(BigCalendar.momentLocalizer(moment));
export default class WrappedCalendar extends Component {
state = { }
render() {
return (
<BigCalendar
events={this... |
// test cases for the status model and game status management
var should = require('should');
var mongoose = require('mongoose');
var Status = require('../../app/models/status');
describe('app: models: status', function() {
before(function(done) {
mongoose.connect('mongodb://localhost:27017/lol_status');
d... |
var controllers=require('../app/controllers');
module.exports=function(app)
{
app.get('/', controllers.home);
app.get('/questions', controllers.questions.list);
app.post('/questions', controllers.questions.create);
//app.get('/questions/:id', controllers.get);
// app.post('/questions/:questionId/com... |
'use strict';
angular.module('workingRoom')
.controller('ModulesSearchCtrl', function (Module, TicketsList, $filter, $scope, $state, $timeout) {
var vm = this;
vm.ticket = {};
vm.moduleId = Module.$id;
vm.module = Module;
vm.searchTickets = searchTickets;
vm.hide = ... |
/**
* Module dependencies.
*/
var express = require('express');
var http = require('http');
var path = require('path');
var handlebars = require('express3-handlebars');
var index = require('./routes/index');
var project = require('./routes/project');
// Example route
// var user = require('./routes/user');
var a... |
module.exports = function ( Service, ExampleModel ) {
return Service.extend({
model: ExampleModel
});
}; |
define([
'jquery',
'marionette',
'moment',
'app/templates/trades/latest-item'
], function ($, Marionette, moment, template) {
return Marionette.ItemView.extend({
template: template,
tagName: "a",
className: "latest-trades-item list-group-item",
attributes: {
href: "#"
},
... |
var wsp = require('writestreamp');
var path = require('path');
var NickServ = require('..');
var server = require('optimist').argv.server || null;
// Mock the irc module if no server given.
var irc = require(!server ? './mock/irc' : 'irc');
/**
* Creates a bot that logs notices and messages sent.
*
* @... |
Tinytest.addAsync("Images - Storefronts - Can add images with merchant", function(test, done) {
var storefrontId, storefrontSub
testLogout(test, createMerchant)
function createMerchant() {
testLogin([Mart.ROLES.GLOBAL.MERCHANT], test, function(error, email) {
createStorefronts()
})
}
// one s... |
version https://git-lfs.github.com/spec/v1
oid sha256:40852c0ed7fc3c4acfa58f726f1d2a9b117bdaed663c83b09ef481ce5e826359
size 1076
|
var nijs = require('nijs');
exports.pkg = function(args) {
return new nijs.NixLet({
value: {
generateNumbers : new nijs.NixFunction({
argSpec : ["min", "max"],
body : new nijs.NixExpression("if min == max then [ min ] else [ min ] ++ (generateNumbers { min = builtins.add min 1; inherit max;... |
import test from "ava"
import { getInfo } from "../"
test(`getInfo - Success`, async t => {
const userId = `146688070@N05`
const results = await getInfo({ userId })
t.true(!!results, `Successfuly fetched results for user: ${userId}`)
})
/*
test(`getInfo - Fail`, async t => {
await t.throws(getInfo(), Error, `... |
/**
* @fileOverview Auth endpoints.
*/
var express = require('express');
var router = express.Router();
var auth = require('../../../lib/middleware/auth');
var login = require('./login');
var logout = require('./logout');
/**
* Log in endpoint.
*/
router.post('/login',
auth.register('name'), // registers playe... |
const request = require('request');
const HttpError = require('standard-http-error');
function promisifyRequest(options) {
return new Promise(function (resolve, reject) {
return request(options, function (err, resp, body) {
if (err) return reject(err);
if (resp.statusCode >= 400) re... |
import * as mockedData from '../data/index';
let baseUrl = '/api/v1/users';
export const get = {
oneTwoThree: {
url: baseUrl + '/123',
httpCode: 200,
response: {
httpCode: 200,
data: {
users: [
mockedData.users.oneTwoThree
]
},
errors: []
},
delay... |
const test = require('tape')
const setup = require('./setup')
test('video-streaming', function (t) {
setup.resetTestDataDir()
t.timeoutAfter(30e3)
const app = setup.createApp()
setup.waitForLoad(app, t, {online: true})
.then(() => app.client.waitUntilTextExists('.torrent-list', 'Big Buck Bunny'))
// P... |
var expect = require('chai').expect;
var jsonfile = require('jsonfile');
var jsonpatch = require('json-patch');
var template = [
{ op: 'add', path: '/submittedSlides', value: true },
{ op: 'remove', path: '/tags' },
{ op: 'move', from: '/about', path: '/bio' },
{ op: 'replace', path: '/email', value: 'fred.smit... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors.server.controller'),
Mangaitem = mongoose.model('Mangaitem'),
mal = require('./mal.server.controller'),
//uuid = require('node-uuid'),
multiparty = require('multiparty'),
fs = require('fs')... |
version https://git-lfs.github.com/spec/v1
oid sha256:ebeb1cdfc49ef3fc1f1f937b4a2fef98a9ec58d21fb31f93d1b060aa676702d9
size 1694
|
var Tokenizer = require("tokenizer")
module.exports = function (cb) {
var t = new Tokenizer(cb)
t.addRule(/^"(?:(?:\\\n|\\"|[^"\n]))*?"?$/, "string1")
t.addRule(/^'(?:(?:\\\n|\\'|[^'\n]))*?'?$/, "string2")
t.addRule(/^\/\*[\s\S]*?\*\/$/, "comment1")
t.addRule(/^\/\/.*?\n$/, "comment2")
t.addRule(Tokenizer... |
// LICENSE : MIT
"use strict";
import HTMLProcessor from "./HTMLProcessor";
export default {
Processor: HTMLProcessor
} |
/**
* Compile CoffeeScript files to JavaScript.
*
* ---------------------------------------------------------------
*
* Compiles coffeeScript files from `assest/js` into Javascript and places them into
* `.tmp/public/js` directory.
*
* For usage docs see:
* https://github.com/gruntjs/grunt-contrib-coffee
... |
var debug = require('debug')('primus-graphql:fixtures:graphql-schema')
var GraphQL = require('graphql')
var Relay = require('graphql-relay')
var db = require('./mem-db.js') // In memory database
var GraphQLRelaySubscription = require('graphql-relay-subscription')
var UserChangesIterator = require('./user-changes-itera... |
Heroes = new Meteor.Collection("heroes");
Matches = new Meteor.Collection("matches");
Items = new Meteor.Collection("items");
Analytics = new Meteor.Collection("analytics");
|
$(document).ready(function() {
console.log("javascript is working");
}); |
function saveOptions(e) {
chrome.storage.local.set({ maxAge: document.getElementById('maxAge').value });
}
function restoreOptions() {
chrome.storage.local.get('maxAge', (res) => {
document.getElementById('maxAge').value = res.maxAge || '';
});
}
document.addEventListener('DOMContentLoaded', restoreOptions)... |
var Request = require("./Request");
/*
automatically convert JSON responses to JSON
*/
var wrap_response = function (callback) {
return function (status, headers, data) {
if (headers["content-type"] && headers["content-type"].indexOf("/json") >= 1) {
try {
data = JSON... |
var routes = require('./routes'),
express = require('express'),
bodyParser = require('body-parser'),
fs = require('fs'),
https = require('https'),
http = require("http"),
crypto = require('crypto'),
morgan = require('morgan'),
app = express(),
port = process.env.PORT || 3000;
//http.createServer(app).listen(8... |
var AdaptersTest = TestCase('AdaptersTest');
AdaptersTest.prototype.setUp = function () {
// Map the three event functions to call our own instead.
this.eventMonitor = new EventMonitor(addEvent, removeEvent, fireEvent);
}
/**
* At tear down, log output from the event monitor and reset.
*/
AdaptersTest.prototype.t... |
/*
Copyright (c) 2014, Viktor Dorotovic
All rights reserved.
See LICENSE.txt for licensing information.
*/
/**
* Adds support for marking time spans(segments) of waveform
*
* @module TimeSpan
* @main TimeSpan
*/
/**
* Represents time span
*
* Abstract class - use su... |
var express = require('express');
var app = express();
var http = require('http').Server(app);
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res){
res.sendfile('index.html');
});
http.listen(3000, function(){
console.log('listening on *:3000');
});
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2016 DeNA Co., Ltd.
*
* 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 u... |
TAGT.settings.addGroup('Piwik', function addSettings() {
this.add('PiwikAnalytics_url', '', {
type: 'string',
public: true,
i18nLabel: 'URL'
});
this.add('PiwikAnalytics_siteId', '', {
type: 'string',
public: true,
i18nLabel: 'Client_ID'
});
this.section('Analytics_features_enabled', function addFeatu... |
(function () {
'use strict';
/**
* Main module of timax.js.
*/
angular
.module('timaxjsClientApp', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'LocalStorageModule',
... |
import get from 'extensions/themeGet';
import styled from 'styled-components';
export default styled.div`
position: absolute;
display: flex;
flex-direction: row;
top: 50%;
transform: translateY(-50%);
right: 15px;
color: ${get('colors.primary.default')};
font-size: 18px;
opacity: ${({ isDragging }) =... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
const { Class } = require('../core/heritage');
const { windowNS } = require('./namespace');
const { ... |
/*
counter.js: Counter
The MIT License (MIT)
Copyright (c) 2014-2019 Tristan Slominski
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 righ... |
let MiraUIObject = require("./base.js");
let RemoteSprite = require("../lib/remoteSprite.js");
export default class LiveText extends MiraUIObject {
constructor(stateObj) {
super(stateObj);
this._offImage = new RemoteSprite(this._state.getResourceAtIndex(0));
this._onImage = new RemoteSprite(this._state.getResou... |
"use strict";
var express = require('express'),
bodyParser = require('body-parser'),
fs = require('fs'),
router = express.Router(),
app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
//Would normally copy necessary scripts into src folder (via grunt/gulp) ... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var FolderTraversal_1 = require("../Enumerations... |
version https://git-lfs.github.com/spec/v1
oid sha256:8fece04be6aca6daa113a6e7f523e47a142a1ed4037b83bd18170c33fcf314ef
size 99
|
// Simulation of Laughlin state
var particlesQ = 1024;
var slider;
var c = 100;
var beta = 20;
var step = 0.1;
var gamma = beta * step**2 / 8;
var radius = 100
var x = new Array(particlesQ);
var y = new Array(particlesQ);
var vx = new Array(particlesQ);
var vy = new Array(particlesQ);
/////////////////////////////... |
global["vGraph"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ r... |
var keystone = require('keystone');
var async = require('async');
exports = module.exports = function (req, res) {
var view = new keystone.View(req, res);
var locals = res.locals;
// Init locals
locals.section = 'blog';
locals.filters = {
category: req.params.category
};
locals.data = {
posts: [... |
#! /usr/bin/env node
const glob = require('glob');
const { join, resolve } = require('path');
const { argv, entry, args } = require('../config');
const spawn = require('../@/spawn');
const context = typeof argv.dir === 'string' ? argv.dir : '.fixtures/**';
const files = entry.length > 1 ? `{${entry.join(',')}}` : entr... |
/*Here goes javasript*/ |
const Jimp = require('jimp');
const util = require('util');
module.exports = async function imageToInput(img) {
const binaryImage = await util.promisify(img.getBuffer.bind(img))('image/jpeg');
return [...(await Jimp.read(binaryImage)).bitmap.data].map(x => x / 256);
};
|
const { Command } = require('discord-akairo');
const request = require('snekfetch');
const Logger = require('../../util/Logger');
class TimeCommand extends Command {
constructor() {
super('time', {
aliases: ['time'],
category: 'info',
args: [
{
... |
import { runTest } from '../run'
import * as cases from './cases'
runTest('nested', cases)
|
const webpack = require('webpack');
const merge = require('webpack-merge');
const nodeExternals = require('webpack-node-externals');
const base = require('./webpack.base.config');
const VueSSRServerPlugin = require('vue-server-renderer/server-plugin');
const { resolve, join } = require('path');
const CLIENT_FOLDER = re... |
( function ( global, undefined ) {
'use strict';
var cola = {
version: '1.0.0'
};
var noop = function () {};
var extend = function ( o, c ) {
if ( c && typeof c == 'object' ) {
for ( var p in c ) {
o[ p ] = c[ p ];
}
}
};
... |
(function($){$.widget("ui.tagit",{options:{allowDuplicates:false,caseSensitive:true,fieldName:"tags",placeholderText:null,readOnly:false,removeConfirmation:false,tagLimit:null,onlyAvailable:false,transform:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:false,allowSpaces:false,singleField:false,singleFiel... |
(function(){
'use strict';
angular.module('Core')
.factory('DataFactory', DataFactory);
DataFactory.$inject = ['lokijsService','common'];
function DataFactory(lokijsService,common){
/* jshint validthis: true */
var Service = function(collectionName, index){
this.collection = lokijsService.loadCol... |
/* globals __dirname */
const path = require('path');
const express = require('express');
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const applyTo = (app) => {
app.set('view engine', 'pug');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extende... |
var zlib = require('zlib');
var fs = require('fs');
var stream = require('stream');
var util = require('util');
var path = require('path');
var Pend = require('pend');
var findit = require('findit2');
var mime = require('mime');
var url = require('url');
var StreamSink = require('streamsink');
var crypto = require('cry... |
'use strict';
module.exports = {
get: 'METER_GET',
getOpts: {
getOnStart: true,
},
getParserV2: () => ({
Properties1: {
Scale: 2,
},
}),
getParserV4: () => ({
Properties1: {
'Rate Type': 'Import',
Scale: 2,
},
'Scale 2': 0,
}),
report: 'METER_REPORT',
reportParserV1: report => {
if (rep... |
/*
***************************************************************************************************************************************************+
* NUTRITIONIX.com |
* ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.