code stringlengths 2 1.05M |
|---|
// import routes
import { matchRoutes } from 'react-router-config';
import Routes from './../../client/routes/Routes';
import renderer from './renderer';
import template from './template';
import createStore from './createStore';
module.exports = (app, req, res) => {
// set up the redux store on the server side
cons... |
import _ from 'lodash';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../actions/backpackActions';
class Backpack extends Component {
componentDidMount() {
this.props.recalcutateTotalPrice();
}
handleAddItem(id) {
this.props.addItemToBackpack(id);
}
... |
/* global module:false */
module.exports = function(grunt) {
var port = grunt.option('port') || 8000;
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
'/*!\n' +
' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +... |
export function convertRegionToBounds(region) {
const {
latitude: centerLat,
longitude: centerLong,
latitudeDelta,
longitudeDelta,
} = region;
return {
north: centerLat + latitudeDelta,
south: centerLat - latitudeDelta,
west: centerLong - longitudeDelta,
east: centerLong + longitudeDelta,
};
}
exp... |
import React from 'react';
import { Redirect } from 'react-static';
//
export default () => <Redirect to="/" />;
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const crosshair_1 = require("./crosshair");
it("decode crosshair", () => {
expect((0, crosshair_1.decodeCrosshairCode)("CSGO-miBcy-2S2P7-h9var-ZqwE3-wmb3K")).toEqual({
alpha: 205,
blue: 47,
gap: 1.0,
green: ... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports... |
/**
* phantomjs script for printing presentations to PDF.
*
* Example:
* phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf
*
* By Manuel Bieh (https://github.com/manuelbieh)
*/
// html2pdf.js
var page = new WebPage();
var system = require( 'system' );
var slideWidth = system.args... |
/**
* @file app.js
* @desc Controllers for back-end connection and front-end services.
*/
/*********************************************************
* ALL Variables
**********************************************************/
var problemListApp = angular.module('ProblemListApp', []);
var LOGGING = true;
var PROB... |
require(['app']) |
module.exports = (function (){
function Templar(){
}
Templar.prototype.sayHello() = function (){
return 'hello'
}
return Templar
})()
|
(function () {
// Copiado do Detector do Mr Doob - THREE JS
ON_DAED["WEBGL_SUPPORT"] = (function () {
try {
return !!window.WebGLRenderingContext && !!document.createElement('canvas').getContext('experimental-webgl');
} catch (e) {
return false;
}
})... |
/**
* @author oosmoxiecode
*/
import { Geometry } from '../core/Geometry';
function TorusKnotGeometry( radius, tube, tubularSegments, radialSegments, p, q, heightScale ) {
Geometry.call( this );
this.type = 'TorusKnotGeometry';
this.parameters = {
radius: radius,
tube: tube,
tubularSegments: tubularSegm... |
define( [
'link-list/singlyLinkListSpec',
'link-list/doublyLinkListSpec',
'link-list/singlyCircularLinkListSpec',
'link-list/doublyCircularLinkListSpec'
], function(
singlyLinkListSpec,
doublyLinkListSpec,
singlyCircularLinkListSpec,
doublyCircularLinkListSpec
) {
} );
|
rock.namespace('rock.geometry');
/**
* Represents a 3x3 matrix.
*
* @constructor
* @author Luis Alberto Jiménez
*/
rock.geometry.Matrix3 = function () {
// column major
this.matrix = new Array(9);
this.identity();
// This properties are used to avoid allocate new memory
this.point3_ma = new r... |
// const request = require('supertest'),
// app = require('../test_util/test_server_app');
//
// function expectRespondsWithAppHtml(url, done) {
// request(app)
// .get(url)
// .expect(200)
// .expect(function (res) {
// expect(res.text.startsWith('<!doctype html>')).toBeTrut... |
import { Map, List, fromJS } from 'immutable';
import { memoize, compose, partialRight, call } from 'ramda';
import { Promise } from 'es6-promise';
function createHookStructure() {
return fromJS({hooks: Map() });
}
function hookAtom() {
return Map({
'before': List(),
'after': List(),
});
}
function Ho... |
import Ember from 'ember';
export default Ember.Service.extend({
log(context, error) {
if (error) {
//eslint-disable-next-line no-console
console.error('ember-error-handler:', error.stack);
} else {
//eslint-disable-next-line no-console
console.error... |
module.exports = {
printCanvas (canvasToPrint, state) {
let w = canvasToPrint.canvas.width;
let h = canvasToPrint.canvas.height;
let data = canvasToPrint.context.getImageData(0,0,w,h);
let compositeOperation = canvasToPrint.context.globalCompositeOperation;
canvasToPrint.context.globalCompositeOp... |
'use strict';
/**
* Policy to set necessary create data to body.
*
* @param {Request} request Request object
* @param {Response} response Response object
* @param {Function} next Callback function
*/
function alphanum(value) {
if (/[^a-zA-Z0-9]/.test(value)) {
return false;
... |
'use strict';
exports.__esModule = true;
var _postcss = require('postcss');
var postcss = _interopRequireWildcard(_postcss);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(o... |
Template.presentationDisplay.helpers({
slides: function () {
var slides = [];
presentationslides.find({presentation: this._id}, {sort: [['order', 'asc']]}).forEach(function (slide) {
slide.action = this.action;
slides.push(slide);
}.bind(this));
retur... |
'use strict';
var fs = require('then-fs');
var Promise = require('promise');
var RegClient = require('npm-registry-client');
var tar = require('tar-pack');
var registry = new RegClient({});
// returns {src, rfile}
function getReadme(directory, cb) {
return fs.readdir(directory).then(function (files) {
var rfile... |
require('angular');
module.exports = {
'route-mount': angular.module('route-mount', [])
.provider('$mount', require('./providers/mount/provider'))
}; |
var pages_register = {
'public render_register': function()
{
r.inject(
this.dom.form = form({
c:['table', 'box', 'align_center'],
e:
{
submit: this.event_submit_register.bind(this)
}
},
div({c:['column', 'title']}, 'Please Register'),
this.dom.message = div({c:['column',... |
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... |
/*! Buefy v0.9.10 | MIT License | github.com/buefy/buefy */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.Loading = {}));
}(this, f... |
/**
* @description Google Chart Api Directive Module for AngularJS
* @version 0.0.8
* @author Nicolas Bouillon <nicolas@bouil.org>
* @author GitHub contributors
* @license MIT
* @year 2013
*/
(function (document, window) {
'use strict';
angular.module('googlechart', [])
.constant('googleChartAp... |
var babylon = require('babylonjs');
const TEXTURE_PATH = 'textures/dragon.png';
export default class Dragon {
constructor(options) {
// First animated player
this.sprite = new babylon.Sprite("player", new babylon.SpriteManager('dragonManager', TEXTURE_PATH, 2, 128, options.scene));
this.sprite.playAnimat... |
"use strict";
angular.module('frsApp.login', ['firebase.utils', 'firebase.auth', 'ngRoute', 'frsApp.countries'])
.controller('LoginCtrl', ['$scope', 'Auth', '$location', 'fbutil', 'APPNAME', 'CountryService',
function($scope, Auth, $location, fbutil, APPNAME, countries) {
$scope.email = null;
$sc... |
// import jwtUtils from './jsonwebtoken';
const store = global.localStorage;
const document = global.document;
const fetchFromStore = (key) => {
// load any stored value from sessionStorage
let initValue = store && store.getItem(key);
if (typeof initValue !== 'undefined') {
try {
initValue = JSON.pars... |
const { compactThemeSingle } = require('./theme');
const defaultTheme = require('./default-theme');
module.exports = {
...compactThemeSingle,
...defaultTheme
} |
// Minimum Moves to Equal Array Elements
// Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal,
// where a move is incrementing n - 1 elements by 1.
// Example:
// Input:
// [1,2,3]
// Output:
// 3
// Explanation:
// Only three moves are needed (re... |
"use strict";
/**
* @license
* Copyright 2019 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... |
import { darken, lighten, adjust, invert } from 'khroma';
import { mkBorder } from './theme-helpers';
class Theme {
constructor() {
/* Base vales */
this.background = '#f4f4f4';
this.primaryColor = '#cde498';
this.secondaryColor = '#cdffb2';
this.background = 'white';
this.mainBkg = '#cde498';... |
/* global module:false */
module.exports = function(grunt) {
var port = grunt.option('port') || 8000;
var base = 'http://localhost';
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
... |
/**
* @file child.js
* Colorbox Modal iframe pages' JS
*/
(function($) {
/**
* Colorbox Modal object for child windows.
*/
Drupal.cbmodal_child = Drupal.cbmodal_child || {
processed: false,
behaviors: {}
};
/**
* Child modal behavior.
*/
Drupal.cbmodal_child.attach = function(contex... |
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var gutil = require('gulp-util');
var coffee = require('gulp-coffee');
// browserify bundle for direct browser use.
gulp.task("bundle", function(){
bundler = browserify('./src/java... |
import {generateId, passwordToHash, loadConfig} from './helper';
const escapeHTML = require('escape-html');
let config = loadConfig();
/* datastore */
import DataStore from './datastore';
var datastore = new DataStore(config);
var room_dicebot = {};
datastore.getAllDicebot(function(dicebots) {
room_dicebot = diceb... |
'use strict'
const BaseDelete = require('../delete');
/**
* `DELETE` statement.
*/
class Delete extends BaseDelete {
/**
* Sets some fields to the `RETURNING` clause.
*
* @param Object|Array fields The fields.
* @return Function Returns `this`.
*/
returning(fields) {
const arr = Ar... |
var socketIO=require("socket.io");
module.exports=function(server,params){
var defParams={
auth:undefined,
banner:"Welcome to HssH server",
log:"error"
};
var args={};
for (var key in defParams){
args[key]=defParams[key];
if (params[key]!=undefined){
args[key]=params[key];
}
}
... |
// Set up a bridge between Model-R and postmessage.
//
// The convention is that everything sent via post-message is a JSON-encoded object with a
// field called "action" which is used to determine which message was sent.
//
// So, if we receive '{"action":"complete","status":200}' from the iframe,
// that will get con... |
window.console&&console.log||function(){for(var i=function(){},n=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","markTimeline","table","time","timeEnd","timeStamp","trace","warn"],t=n.length,r=window.console={}... |
// /*
// * @Author: Austen Morgan
// * @Date: 2016-07-03 20:04:37
// * @Last Modified by: AustenMorgan
// * @Last Modified time: 2016-10-26 19:37:48
// */
// 'use strict';
// function openOptions() {
// chrome.runtime.openOptionsPage();
// }
// document.querySelector('#openOptions').addEventListener('click', op... |
var Gym = require('../client/gym')
, sizzle = require('sizzle')
, getkeycode = require('keycode')
var iekeyup = function(k) {
var oEvent = document.createEvent('KeyboardEvent');
// Chromium Hack
Object.defineProperty(oEvent, 'keyCode', {
get : function() {
return thi... |
import React, {Component} from "react";
import {Link} from "react-router-dom";
import AppBar from "material-ui/AppBar";
import Drawer from "material-ui/Drawer";
import MenuItem from "material-ui/MenuItem";
export default class Layout extends Component {
constructor() {
super();
this.state = {
... |
'use strict';
(function(exports, undefined) {
function _emit(type, data) {
var handlers = Util.slice.call(this._notifyHash[type]);
for (var i = 0, l = handlers.length; i < l; i++) {
var j = Util.extend({}, handlers[i]);
var scope = (j.scope) ? j.scope : this;
j.scope = scope;
j.handl... |
// Generated on 2017-07-04 using generator-angular-fullstack 3.8.0
'use strict';
import _ from 'lodash';
import del from 'del';
import gulp from 'gulp';
import grunt from 'grunt';
import path from 'path';
import gulpLoadPlugins from 'gulp-load-plugins';
import http from 'http';
import open from 'open';
import lazypipe... |
'use strict';
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
describe('my app', function() {
it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).toMatch("/home");
});
descr... |
/*
*--------------------------------------------------------------------
* jQuery-Plugin "timetable-weekly"
* Version: 3.0
* Copyright (c) 2016 TIS
*
* Released under the MIT License.
* http://tis2010.jp/license.txt
* -------------------------------------------------------------------
*/
jQuery.noConflict();
... |
//= link_directory ../stylesheets/blorgh .css
|
var classHelix_1_1Glob_1_1ActionMap =
[
[ "~ActionMap", "classHelix_1_1Glob_1_1ActionMap.html#a7d4aa57074e069641ab6bbb68884c25b", null ],
[ "ActionMap", "classHelix_1_1Glob_1_1ActionMap.html#a7f8755d9865b2a6285b8ed894dec6469", null ],
[ "ActionMap", "classHelix_1_1Glob_1_1ActionMap.html#afeedaa145c9fb859866... |
// Content below is autogenerated by ojster template engine
// usually there is no reason to edit it manually
(function (root, factory) {
"use strict";
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ojster', './my_lib'], factory);
} else {
// Browser globals... |
export const StatusReportStates = {
assigned : 0,
inProgress: 1,
submitted : 2
}; |
import './module.scss';
import directive from './directive';
import facetsModule from './../facets/module';
const name = 'list';
export default angular.module(`${name}`, [
facetsModule.name
])
.directive(`${name}`, directive)
|
define([
'color',
'spellquest',
'entities/entity'
], function( Color, Game, Entity ) {
'use strict';
function Letter() {
Entity.call( this );
this._char = ' ';
this._fontSize = 12;
this._textColor = new Color();
}
Letter.prototype = new Entity();
Letter.prototype.constructor = Le... |
var Util = {
/**
* Rounds a given number to 4 decimal places. Seems to be safe for most
* exchanges.
*
* @param {Number} number
* @returns {Number}
*/
round: function(number) {
return Math.ceil(number * 10000) / 10000;
}
/**
* Finds a random number between the two values
*
* @param {Number}... |
function QueryBuilder(dictionary, minSubset) {
if (!(this instanceof QueryBuilder)) {
return new QueryBuilder(dictionary, minSubset);
}
var queries = combine(dictionary, minSubset);
var self = this;
this.queryList = queries;
QueryBuilder.prototype.getQueryList = function(){
... |
var columnDimensions = {
w: 80,
h: 640,
d: 80
};
function createFig(box, type) {
"use strict";
var fig = document.createElement("figure");
fig.className = type;
box.appendChild(fig);
return fig;
}
function createBox(w, h, d) {
"use strict";
var box = document.createElement("div... |
'use strict';
var whoamiControllers = angular.module('whoamiControllers', ['angularSpinner']);
whoamiControllers.controller('indexCtrl', ['$scope', '$sce', '$window', 'usSpinnerService', 'getHeadersService', 'getAppStats', 'getAppDiagStaticData', 'getAppDiagDynamicData',
function($scope, $sce, $window, usSpinnerServ... |
import React from 'react';
import { scaleOrdinal, scaleLinear, range } from 'd3';
import * as chromatic from 'd3-scale-chromatic';
import chroma from 'chroma-js';
import colorClasses from '../utils/colorClasses';
const colors0 = [
'#7fcdbb',
'#a1dab4',
'#41b6c4',
'#a1dab4',
'#41b6c4',
'#2c7fb8',
'#c7e9... |
module.exports = {
port:3000,
timeout:120000
}
|
var TasksViewController = $V.classes.VViewController.extend({
displayName: "TasksViewController",
viewWillInit: function() {
this.initNewProperty('tabId', 'tasks');
this.setTitle('Tasks');
},
viewDidLoad: function(aView) {
var self = this;
aView.setContent("TasksViewController");
}
});
|
/* global expect test */
const { Lyric } = require('./j-lyric');
async function testLyric(object) {
const { url, title, artist, lyricist, composer, arranger, length } = object;
const inst = new Lyric(url);
await inst.get();
expect(inst.title).toBe(title);
expect(inst.artist).toBe(artist);
if (lyricist) ex... |
var express = require('express');
var app = express();
var router = express.Router();
router.dashboard = function(req, res) {
} |
import * as React from "react"
import loadable from "@loadable/component"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import "./layout.css"
const Header = loadable(() => import("./header"))
const Layout = ({ children }) => {
const data = useStaticQuery(graphql`
query Sit... |
'use strict';
/**
*
* @type {exports}
*/
var _ = require('lodash'),
express = require('express'),
passport = require('passport'),
auth = require('../auth.service'),
User = require('../../api/user/user.model'),
json = require('../../components/protocol/json');
var router = express.Router();
// ... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["Scada"] = factory();
else
root["Scada"]... |
const Turbolinks = require('turbolinks');
// Monkey patch Turbolinks to render 403, 404 & 500 normally
// See https://github.com/turbolinks/turbolinks/issues/179
Turbolinks.HttpRequest.prototype.requestLoaded = function() {
return this.endRequest(function() {
var code = this.xhr.status;
if (200 <= ... |
$wnd.showcase.runAsyncCallback20("function Hhb(a){this.a=a}\nfunction IEb(a){oh(this,(hwb(),a))}\nfunction HEb(){Nyb();IEb.call(this,So($doc,'file'));(hwb(),this.hb).className='gwt-FileUpload'}\nUX(442,1,G9b,Hhb);_.Sc=function Ihb(a){var b;b=gh(this.a).value;(SXb(),b).length==0?($wnd.alert('\\u4F60\\u5FC5\\u987B\\u9009... |
const AUTOPREFIXER_BROWSERS = [
'Android 2.3',
'Android >= 4',
'Chrome >= 35',
'Firefox >= 31',
'Explorer >= 9',
'iOS >= 7',
'Opera >= 12',
'Safari >= 7.1',
];
module.exports = {
plugins: [
require('autoprefixer')({ browsers: AUTOPREFIXER_BROWSERS })
]
} |
Main.k.CreatePopup = function() {
var popup = {};
popup.dom = $("<td>").attr("id", "usPopup").addClass("usPopup chat_box");
popup.mask = $("<div>").addClass("usPopupMask").attr('onclick','Main.k.ClosePopup();').appendTo(popup.dom);
popup.content = $("<div>").addClass("usPopupContent chattext").css({
... |
import Browsable from 'appkit/libs/browsable';
var LtiAppBrowseController = Ember.ObjectController.extend({
isLoaded : true,
targetRoute: 'ltiApp.browseDetails',
showDashboard: function() {
return Ember.isEmpty(Ember.ENV.TOOL_ID);
}.property('Ember.ENV.TOOL_ID'),
parentFolderChain: function() {
if ... |
PhaxMachine.pages['user-form'] = {
render: function() {
$('#addUserEmail').on('click', function() {
var emailInputs = $('#userEmailList input[type=email]');
var nextIdx = emailInputs.length;
var newInput = emailInputs.first().clone();
newInput.attr('id', 'user... |
/**
* emit events
* websocket-error
* websocket-message
* session-expired
* logined
* error
* connected
*/
/**
* @param {string} sessionId
* @param {string} url
* @constructor
*/
var AppWebSocket = function (sessionId, url) {
this.url = url;
this.websocket = null;
this.sessionId = sessionId;
//wi... |
(function () {
'use strict';
angular.module('Data')
.controller('MenuDataController', MenuDataController);
MenuDataController.$inject = ['MenuDataService', 'categories'];
function MenuDataController(MenuDataService, categories) {
var menuData = this;
menuData.categories = categories;
}
})();
|
var rx_1 = require("rx");
var Omni = require('../../omni-sharp-server/omni');
var dock_1 = require("../atom/dock");
var find_pane_view_1 = require("../views/find-pane-view");
var FindUsages = (function () {
function FindUsages() {
this.selectedIndex = 0;
this.scrollTop = 0;
this.usages = [];... |
define([
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/on",
"dojo/mouse",
"dojo/dom",
"dojo/dom-construct",
"dojo/dom-style",
"dojo/dom-geometry",
"dojo/window",
"dojo/request",
"dojo/fx",
"dojo/fx/Toggler",
"dij... |
/*jslint node: true, nomen: true */
"use strict";
var _ = require('underscore');
function getObjValue(field, data) {
return _.reduce(field.split("."), function (obj, f) {
if (obj) {
return obj[f];
}
}, data);
}
function setObjValue(field, data, value) {
var fieldArr = field.sp... |
// Karma configuration
// Generated on Mon Jul 21 2014 11:48:34 GMT+0200 (CEST)
module.exports = function (config) {
config.set({
// base path used to resolve all patterns (e.g. files, exclude)
basePath: '',
// frameworks to use
frameworks: ['mocha', 'chai-sinon'],
// list... |
module.exports = require('./variadic')(pipe)
function pipe(rest) {
return apply(compose, rest.reverse())
}
var compose = require('./compose')
, apply = require('./apply') |
(function (angular) {
'use strict';
angular.module('DiaryModule')
.controller('ListDiaryController', ['$scope', '$state', 'Diarys', 'toastr',
function ($scope, $state, Diarys, toastr) {
$scope.me = window.SAILS_LOCALS.me;
if (!$scope.me.kadr && !$scope.me.admi... |
describe('basic functionality (text input)', function() {
before(function() {
this.genericPage = require('../lib/page/generic');
this.getTextarea = false;
});
require('./shared-tests/basic')();
it('should work well with the auto focus component', function() {
var page = this.genericPage.create('/a... |
'use strict';
var path = require('path'),
log4js = require('log4js'),
ucparam = require('./ucparam'),
util = require('./util'),
proto = Log.prototype;
function Log(options) {
if (!(this instanceof Log)) {
return new Log(options);
}
options = options || {};
options.filename = o... |
"use strict";
var async = require('async');
var Anyfetch = require('anyfetch');
module.exports.get = function get(req, res, next) {
async.waterfall([
function getDocument(cb) {
var anyfetchClient = new Anyfetch(req.accessToken.token);
anyfetchClient.getDocumentById(req.params.id, {
search: r... |
/*
*
* FileContainer actions
*
*/
import {
DEFAULT_ACTION,
UPDATE_FILE_INFO,
RECEIVE_FILE_ID,
UPDATE_BY_FILE_ID,
NEW_CONTAINER_ACTION,
ADD_NEW_ROW,
EDIT_ROW,
MAKE_SAVE_METADATA_ACTION,
MAKE_SAVE_METADATA_FROM_BACKEND,
DONT_SHOW_METADATA_FOR_DIRECTORY,
} from './constants';
// import { ADD_NEW_C... |
"use strict";
var fs = require('fs-extra'),
async = require('async'),
path = require('path');
module.exports = function(ctx, done){
if(!ctx.includes || ctx.includes.length === 0){
return done();
}
async.parallel(Object.keys(ctx.includes).map(function(src){
return function(cb){
... |
var gulp = require('gulp'),
stylus = require('gulp-stylus'),
connect = require('gulp-connect'),
concat = require('gulp-concat'),
changed = require('gulp-changed');
gulp.task('stylus', function () {
gulp.src('./client/app/styl/**/*.styl')
.pipe(changed('./client/public/css', { extension: '.css' }))
.pipe(stylu... |
var db = require( './../models/mysqlUser' );
var errors = require( './errors' );
var get_user_friends_list = function ( req, res, next ) {
var id = req.params.id1; // Given User ID
// Geting user friends list
db.get_user_friends( id, function ( err, data ) {
if ( err )
// If during getting friends li... |
/*
Highcharts JS v9.3.3 (2022-02-01)
Item series type for Highcharts
(c) 2019 Torstein Honsi
License: www.highcharts.com/license
*/
'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/item-series",[... |
const test = require('ava')
const RingBuffer = require('../lib/RingBuffer')
test.beforeEach(t => {
t.context.ringBuffer = new RingBuffer({size: 5})
})
test('setArray', t => {
const expectArray = [1, 2, 3, 4, 5]
t.context.ringBuffer.setArray(expectArray)
t.deepEqual(t.context.ringBuffer._arr, expectArray, 'set... |
app.config(function ($stateProvider) {
$stateProvider.state('layout', {
abstract: true,
url: '',
views: {
'layout': {
templateUrl: 'static/core/views/layout.html'
}
}
})
})
|
function drt_triplets_from_api(cb){
var request = new XMLHttpRequest();
request.open('POST', 'api/relations', true);
request.setRequestHeader("Content-type", "application/json");
request.onload = function () {
data = this.response;
console.log(data)
err = '';
cb(data, er... |
/*
* CSVJSON Application - SQL to JSON
*
* Copyright (c) 2014 Martin Drapeau
*/
APP.sql2json = function() {
var uploadUrl = "/sql2json/upload";
var $file = $('#fileupload'),
$format = $('input[type=radio][name=format]'),
$sql = $('#sql'),
$result = $('#result'),
$clear = $('#clear, a.clear'),
$conver... |
'use strict';
/**
* Generates catalog.json
* Inherits EventEmitter
* Emits: log
* */
var EventEmitter = require('events').EventEmitter,
Promise = require('bluebird'),
_ = require('lodash'),
path = require('path'),
moment = require('moment'),
fse = Promise.promisifyAll(require('fs-extra'));
m... |
((win, ns, undefined) => {
var namespace = win[ns] || {}
win[ns] = namespace
const newWindowBtn = document.getElementById('frameless-window')
newWindowBtn.addEventListener('click', (event) => {
let win = new BrowserWindow({
frame: false,
//transparent: true
... |
(() => {
return {
mixins: [bbn.vue.basicComponent, bbn.vue.localStorageComponent],
props: {
storage: {
default: true
},
storageFullName: {
default: 'appui-ide-popup-new'
}
},
data(){
let rep = this.source.type !== false ? this.source.repositoryProject : t... |
import './parser.js'
|
//contains code to manage the page routing
var log = new Logger('router.js', CLL.error);
//This adds our default layout
Router.configure({
layoutTemplate: 'layout'
});
//configures the router to change the navigation highlighting after routed page
Router.onAfterAction(function () {
//handles updated the navi... |
'use strict';
const unescape = require('lodash/unescape');
const marked = require('marked');
const chalk = require('chalk');
const index = require('./index');
const allElements = [
'blockquote', 'html', 'strong', 'em', 'br', 'del',
'heading', 'hr', 'image', 'link', 'list', 'listitem',
'paragraph', 'strikethroug... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.