code
stringlengths
2
1.05M
(function() { 'use strict'; var bowerFiles = require('bower-files')(); var config = require('./gulp/config'); function listFiles() { var files = [] .concat(bowerFiles.dev().ext('js').files) .concat([ config.sourceDir + 'app/**/*.html', config.sourceDir + 'app/**/*.js', ])...
var http = require("http"); var https = require("https"); var url = require("url"); var log = require("./logger"); var headerRE = /(.*):(.*)/ // Runs a single step within a given context exports.run = function(context, step, callback) { if (step.variables) { context.updateVariables(step.variables); ...
// @flow /** * Copyright (c) 2017, Dirk-Jan Rutten * 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. * */ export { serializeTime, serializeTimeString, serializeDate, serializeDateTime, serializeDateTimeS...
'use strict' var website = angular.module('website',['ngRoute']); website.config(function($routeProvider, $locationProvider) { $routeProvider.when('/', { templateUrl: '/website/partials/home.html', controller: 'mainCtrl' }) });
/** * The MIT License (MIT) * Copyright (c) 2016 Krypto Fin ry and the FIMK Developers * * 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 limitatio...
/* let fs = require('fs'); fs.readFile('./files/a.json','utf8',(error1,data1)=>{ console.log(data1); fs.readFile('./files/b.json','utf8',(error2,data2)=>{ console.log(data2); fs.readFile('./files/c.json','utf8',(error3,data3)=>{ console.log(data3); fs.readFile('./files/d.json','utf8',(error4,data4)=>{ ...
const _ = require('lodash'); const Promise = require('bluebird'); const fs = require('fs'); const _path = require('path'); /** * @memberOf FileUtil * @function symlink * * Asynchronous {@link http://man7.org/linux/man-pages/man2/symlink.2.html|symlink(2)}. * * @param {Object} options * @param {String|Buffer} o...
import React, { PureComponent } from 'react'; import { connect } from 'react-redux'; import isFunction from 'lodash/isFunction'; import noop from 'lodash/noop'; import withTheme from 'hoc/withTheme'; import { actions } from 'modules/modal'; import Button from 'components/Button'; import { propTypes, defaultProps } f...
// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of this code must retain the above // copyright and this n...
// Generated by CoffeeScript 1.9.3 (function() { 'use strict'; var _containersControllers, _windowEventsHandlerBinded, _windowInViewItems, addWindowInViewItem, bindWindowEvents, checkInView, debounce, getBoundingClientRect, getOffsetFromPercentage, getViewportHeight, offsetIsPercentage, removeWindowInViewItem, trac...
/** * Copyright (c) 2011-2014 Felix Gnass * Licensed under the MIT license * http://spin.js.org/ */ ; (function (root, factory) { /* CommonJS */ if (typeof module == 'object' && module.exports) module.exports = factory() /* AMD module */ else if (typeof define == 'function' && define.amd) define(f...
var tool = require('../tool'); var mapping = require('../mapping'); var factory = require('../io/factory'); //protobuf映射 function callbackMapping(entity, tag) { switch (tag) { case "GetUserInfoOutput": var userInfo = new RongIMClient.UserInfo(); userInfo.setUserId(entity.userId); ...
// Backbone.Declarative.Views, v4.1.2 // Copyright (c) 2014-2017 Michael Heim, Zeilenwechsel.de // Distributed under MIT license // http://github.com/hashchange/backbone.declarative.views ;( function ( root, factory ) { "use strict"; // UMD for a Backbone plugin. Supports AMD, Node.js, CommonJS and globa...
import { $, ensureEventExists } from "../api/jquery.js"; import { TD } from "../api/td.js"; import { ensurePropertyExists } from "../api/utils.js"; function reloadScheduledColumn() { const column = Object.values(TD.controller.columnManager.getAll()).find(column => column.model.state.type === "scheduled"); if (colu...
import gulp from 'gulp'; import path from 'path'; import runSequence from 'run-sequence'; import { spawn } from 'child_process'; const pkg = require('../package.json'); function zip(src, dest) { const current_process = spawn('7z', ['a', '-tzip', dest, src], {cwd: './tmp'}); let is_error = false; return new Pro...
function getParam(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)",t=new RegExp(n),r=t.exec(window.location.href);return null==r?"":r[1]}function getQueryString(){var e=window.location.search.substring(1),n=e.split("?");return n=n.join(""),n.length>0?n="?"+n:(n=e.split("#!"),n=n.join(""),...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define(["require","exports","../../../../../../core/tsSupport/makeTemplateObjectHelper","../../shaderModules/interfaces"],function(n,e,b,c){Object.defineProperty(e...
import logger from '../../logging'; export default logger.child({module: 'resources', resource: 'account'});
/* eslint-disable max-len, camelcase */ 'use strict'; exports.seed = function(knex) { return knex('tasks').del() .then(() => { return knex('tasks').insert([{ id: 1, column_index: 1, short_description: 'Prepare Day 1 of Angular Curriculum', long_description: 'Focus on gettin...
var class_property_two = [ [ "SetUp", "class_property_two.html#aa3ab39cf4e6c751cb0788c575bf92ca2", null ], [ "TearDown", "class_property_two.html#aa4ffb2b9dddeba69f0f9baf133f06ef2", null ] ];
var base = require('../base') var ERROR_LEVEL = base.ERROR_LEVEL var Class = base.Class var RuleChecker = base.RuleChecker var helper = require('./helper'); module.exports = global.FEDUseSingleQuotation = new Class(RuleChecker, function() { this.__init__ = function(self) { self.id = 'single-quotation' ...
define(['app', 'lodash'], function(app, _) { app.factory("mongoStorage", ['$http','$rootScope','$q','$timeout','$filter', function($http,$rootScope,$q,$timeout,$filter) { var clientOrg = 0; // means cbd //============================================================ // //=========...
var https = require('https'); var url = require('url'); module.exports = function (options) { options = options || {}; var agent = new https.Agent(options); return agent; };
/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Paper from '@material-ui/core/Paper'; import Breadcrumbs from '@material-ui/core/Breadcrumbs'; import Typography from '@material-ui/core/Typography'; import Link from '@material-ui/cor...
/** * This behavior adds a class of 'js' to the element. * * Although simple, this technique is useful when applied to the BODY element in the DOM. * Stylesheets can then target the page if the page has Javascript enabled (as the new class * will be applied), or target a Javascript less environment where the class wi...
'use strict'; /* https://github.com/angular/protractor/blob/master/docs/toc.md */ // describe('my app', function() { // // browser.get('index.html'); // // it('should automatically redirect to /view1 when location hash/fragment is empty', function() { // expect(browser.getLocationAbsUrl()).toMatch("/view1"); ...
const Shader = require('../') const test = require('tape') const GL = require('gl') const gl = GL(256, 256) test('kindred-shader: compiler errors', function (t) { const valid = Shader` attribute vec2 position; void vert() { gl_Position = vec4(position, 1, 1); } void frag() { gl_FragColo...
// Add residence data if (Residences.find().count() === 0) { Residences.insert({ building: 'Sibley', type: 'Residence Hall', beds: 'Single', tenantNames: [], tenants: 0 // use $inc }); Residences.insert({ building: 'Shuniah', type: 'Residence Hall', beds: 'Double', tenantNames...
var AboutMeEditEntryView = Backbone.View.extend({ events: { "click #save": "saveEntry", "click #delete": "deleteEntry", "click #close-success": "closeSuccess" }, render: function() { $(this.el).html(template.preferencesView.aboutMeEditEntry({title: this.model.get("t...
module.exports = function getTaxRate(income) { if (income <= 18200) return 0; if (income <= 37000) return 0.19 - 3458/income; if (income <= 80000) return 0.325 - 8453/income; if (income <= 180000) return 0.37 - 12053/income; return 0.45 - 26453/income; };
module.exports = { favicon: { src: '<%= src %>/favicon.ico', dest: '<%= build %>/favicon.ico' }, bower_components: { files: { '<%= build %>/css/codemirror.css':'bower_components/codemirror/lib/codemirror.css' } }, 'wri-skeleton': { files: { '<%= build %>/css/wri-skeleton.css...
'use strict' const apemandb = require('apemandb') let db = apemandb({ env: require('../env')('database'), models: `${__dirname}/models/*.json`, addons: `${__dirname}/addons/*.addon.js`, seeds: `/seeds/${process.env.NODE_ENV}/*.seed.js` }) // Models are exposed as db.models.<ModelName> (like db.models.User) m...
angular.module('Atarnia.utils').factory('_uploader', ['$upload', '_apiAdapter', _uploader]); function _uploader($upload, _apiAdapter) { return { setUp: setUpUploader }; function setUpUploader(scope, fileFieldLabel, tokenFieldLabel, progressFieldLabel) { var url = _apiAdapter.getApiUrl() +...
// Dependencies var express = require('express'); var path = require('path'); // Args var port = process.argv[2]; var template = process.argv[3]; // App var app = express(); // App settings app.set('views', template || path.join(__dirname, 'templates')); app.set('view engine', 'jade'); // URL app.get('/home', funct...
'use strict'; const UserHandler = require('../handlers/user'); const user = new UserHandler(require('../services/user')); const middleware = require('../../../middleware'); module.exports = function (app) { app.route('/users') .post(user.create.bind(user)); app.route('/users/likes') .put(midd...
import { StyleSheet } from 'aphrodite'; import * as fonts from '../../style/fonts'; import * as colors from '../../style/colors'; export default StyleSheet.create({ quiz: { marginTop: '3em' }, flower: { marginTop: '1rem', }, img: { maxWidth: '100%', height: 'auto', marginBottom: '20px' }, rsvpBu...
import { __decorate } from "tslib"; import { customAttribute, inject } from "aurelia-framework"; let AttachFocusAttribute = /** @class */ (() => { let AttachFocusAttribute = class AttachFocusAttribute { constructor(element) { this.element = element; } attached() { if ...
'use strict'; module.exports = function (verificationToken, onSlackEvent) { return function (req, res, next) { if (req.method !== 'POST') return next(); if (!req.body) { res.stausCode = 400; res.end('bad request - no body found'); return; } var body = req.body.payload ? JSON.parse(...
"use strict"; var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _typeof = typeof Symbol === "...
/* the root getters */
/** * reply代理 */ var Reply=require('../models').Reply; var EventProxy=require('eventproxy'); var tools=require('../common/tools'); var User=require('./user'); var at=require('../common/at'); /** * 获取一条回复信息 * @param {String} id 回复ID * @param {Function} callback 回调函数 */ exports.getReply=function(id,callback){ ...
const winston = require("winston"); require("winston-daily-rotate-file"); const beautify = require('js-beautify').js_beautify const embedBuilder = require("./embedBuilder.js"); const util = require("./util.js"); const config = require('./../config.json'); const winstonLogger = new (winston.Logger)({ exitOnError: ...
// for tests need to install mocha: // npm install -g mocha // // then to run a test // // mocha test.js // var assert = require("assert"); require('./index') // the values are arrays of elements. describe('groupby',function(){ it("should sort items into buckets. return an object - put each item of an array...
'use strict'; describe('rgiResourcesCtrl', function () { beforeEach(module('app')); var $scope, $location, actualErrorHandler, locationPathBackup, RESOURCES = 'RESOURCES', spies = {}, stubs = {}, initializeController = function(resourceType) { beforeEach(inject( function ($...
/*eslint-env node*/ var fs = require('fs'); module.exports = (function (fileName) { var fileObj = JSON.parse(fs.readFileSync(fileName, 'utf8')) return fileObj.token; });
import React from 'react'; import {State, History} from 'react-router'; import { Menu, Mixins, Styles } from 'material-ui'; import Content from '../../components/layout/Content'; import ContentHeader from '../../components/layout/ContentHeader'; import Tabela from '../../components/Tabela'; class StudentiLista extends...
(function(define, describe) { "use strict"; var dependencies = [ 'bootstrap', 'angular' ]; define(dependencies, function(AppBootstrap, angular) { var appName = 'app'; describe('Network service', function() { beforeEach(module(appName)); var n...
const Chromy = require('../src') const path = require('path') let chromy = new Chromy() chromy.chain() .goto('file://' + path.join(__dirname, '/pages/index.html')) .evaluate(() => { return document.querySelectorAll('*').length }) .result((r) => console.log(r)) .end() .then(_...
/** * File to check duration selection and pass selected duration to modules. * Will trigger on event on every duration change. */ "use strict"; var myDur = (function () { var myDur = {}; var startDate, endDate; var EVENT_DURATION_CHANGE = jQuery.Event(myConfig.EVENT_DURATION_CHANGE_NAME); f...
import Vue from 'vue' import CButton from 'components/c-button' describe('button.vue', () => { let el beforeEach(() => { el = document.createElement('div') document.body.appendChild(el) }) afterEach(() => { document.body.removeChild(el) }) it('should render correct contents', () => { con...
'use strict'; import angular from 'angular'; import OnboardingController from './design-onboarding-controller'; var stateConfig = ($stateProvider) => { $stateProvider .state('app.design.onboarding', { url: '/onboarding', controller: OnboardingController, controllerAs: ...
/** * editor_plugin_src.js * * Copyright 2010, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { tinymce.create('tinymce.plugins.Save', { init : function(ed, url) { ...
import get from 'lodash/get' /** * parseConnectionString - Parse a BTCPay Server style connection string. * * @param {string} value Connection string * @param {string} network Network code of config to extract * @returns {{ host, port, macaroon, cert }} Parsed connection string */ const parseConnectionString = (...
//~ name a481 alert(a481); //~ component a482.js
$(function () { $(".submit-on-checked").change(function (ev) { var that = $(this); if (that.attr("type") == "radio" && !that.is(":checked")) { return; } $("#search-form").submit(); }) })
module.exports = {"ClickerScript":{"normal":"ClickerScript-Regular.ttf","bold":"ClickerScript-Regular.ttf","italics":"ClickerScript-Regular.ttf","bolditalics":"ClickerScript-Regular.ttf"}};
'use strict'; exports.__esModule = true; var _slice = Array.prototype.slice; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a func...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); //var index = require('./routes/index'); //var users = require('./routes/users'); var pub_scr = req...
var width = document.body.clientWidth; var height = document.body.clientHeight; var canvas = document.getElementById('theCanvas'); var interaction_canvas = document.getElementById('interactionCanvas'); var param_names = { realMin: "Minimum X", realMax: "Maximum X", imagMin: "Minimum Y", imagMax: "Maxi...
angular.module('utils') .directive('paraPie', function($q, percentsFilter) { return { restrict: 'E', scope: { slices : '=' }, link: function(scope, element, attrs) { var Gui = Class.extend({ init : function() { var self = this; ...
import DynamicLayer from 'esri/layers/ArcGISDynamicMapServiceLayer'; import TiledLayer from 'esri/layers/ArcGISTiledMapServiceLayer'; import ImageLayer from 'esri/layers/ArcGISImageServiceLayer'; import ImageParameters from 'esri/layers/ImageParameters'; import WebTiledLayer from 'esri/layers/WebTiledLayer'; import Gra...
const path = require('path'); module.exports = (config, env) => { const moduleResolve = config.resolve.modules; moduleResolve.push(path.resolve('./src')); return config; }
var _debug = true; var ajaxCalls = new Array(); var resultDisplayed = false; $( document ).ready(function() { $("#searchField").first().focus(); }); $('#advanced_link').click(function() { $('#advanced_link').addClass("hide"); $('#row_advanced_search').removeClass("hide"); }); $('#combo_structure').chang...
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra Modified by Richard Scarrott @richardscarrott */ var Template = require('webpack/lib/Template'); var JsonpMainTemplatePlugin; /** * Patches the `JsonpMainTemplatePlugin` with jsonp error handling logic. * @param {JsonpM...
// api used to check the status of the service and database module.exports = (db) => { var express = require('express'); var router = express.Router(); router.use('/status', function(req, res, next) { console.log('status router.use'); next(); }); router.route('/status') ....
'use strict'; // 培训信息子集 exports = module.exports = function(mongo, mongoose) { var trainInfoSubset = new mongoose.Schema({ startDate: { type: Date }, // 培训起始时间 content: { type: String }, // 培训内容 lessonHour: { type: Number }, // 课时 notes: { type: String }, // 备注 endDate: { type: Date }, // 培训结束时间 ...
'use strict'; const CONSTANTS = require('./../constants'); const resetRoles = (data, message) => { let reply = 'You have no roles to reset ' + message.author.toString(); if (message.member.roles.cache) { var found = false; //reset user roles message.member.roles.cache.forEach( (role) => { if (CONSTANTS.PR...
// http://bonesmoses.org/2016/07/15/pg-phriday-a-postgres-persepctive-on-mongodb/ use db var timing = new Array() var currentDate = new Date(); currentDate.setHours(0,0,0,0) var batch = new Array() var start = new Date() for (var i = 1; i <= 1000000; i++) { batch[i] = { _id: i, location: i % 1000, ...
import config from '../../config.json'; import gulp from 'gulp'; import yargs from 'yargs' import browserSync from 'browser-sync'; const argv = yargs.argv const browserSyncTask = () => { var browserSyncWatch = [ config.dist.markup + '**/*.{html,php,twig,rss}', config.dist.images.base + '**/*.{j...
import 'styles/styles.css' import React from 'react' import { Field } from 'redux-form' import RenderValidationField from 'components/survey/RenderValidationField' import { required } from 'redux-form-validators' const TextQuestion = ({ fields, input: { name, value }, meta: { error, submitFailed, invalid, ...
var assert = require('assert'); var noDef = ' is not defined'; module.exports = { str: function () { assert(this.editor.gruntfile.toString, 'gruntfile.toString' + noDef); return this.editor.gruntfile.toString(); }, read: function (file) { return require('fs').readFileSync(file, 'utf-8').trim(); },...
/** * Created by truls on 29.06.17. */ import mongoose from 'mongoose'; const Schema = mongoose.Schema; const socialSchema = new Schema({ facebook: { type: 'String', required: false }, twitter: { type: 'String', required: false }, youtube: { type: 'String', required: false }, provider: { type: 'String', requ...
/** * Created by roberthilscher on 25.06.15. */ module.exports = (function () { var lodashTemplate = require('lodash.template'), path = require('path'), fs = require('fs'), statuses = { FAILED: 'failed', PASSED: 'passed', UNDEFINED: 'undefined', PENDING: 'pending', SKIPPED: 'skipped' ...
/* jshint esversion:6, node: true */ /* * Loblaws Messenger - recipe.js * * Recipe search handler. */ const request = require('request'), net_handler = require('../net_handler.js'); function requestRecipe(sender, query) { console.log("[INFO] " + sender + ": Requested search for recipe with query: \'"...
(function() { 'use strict'; angular.module('app.tasks', [ 'app.core', 'app.widgets' ]); })();
var alt = angular.module('alt', ['ngResource', 'ngRoute', 'wu.masonry']); alt .config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider .when('/', { templateUrl: '/pages/index' }) .when('/brand/chapter/products/all', { templateUrl: '/pages/brand-products-all', controll...
this["JST"] = this["JST"] || {}; this["JST"]["test/fixtures/it's-a-bad-filename.hbs"] = Handlebars.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { return "Why would you name your file like this?"; },"useData":true});
var should = require('should') var Browser = require('zombie') var Driver = require('zombify') describe("Viewing a hotel room", function() { var driver = new Driver('../Hotelier') , client = null before(function(done) { driver.start(done) }) after(function(done) { driver.stop(done) }) describ...
Excel.run(function (ctx) { var chart = ctx.workbook.worksheets.getActiveWorksheet().charts.getItemAt(0); chart.dataLabels.showSeriesName = true; return ctx.sync(); }).catch(function (error) { console.log(error); });
//------------------------------------------------------------------ // // Creates an explosion effect that emits all particles at creation time. // The spec is defined as: // { // center: { x: , y: }, // howMany: // How many particles to emit // } // //----------------------------------------------------...
class Test { constructor() { } pai() { let list = [1, 2, 3, 4]; list.forEach(d => { //console.log(d) }); } getMin() { let getMinIdx = function (list) { let min = Math.min(...list); return list.indexOf(min); }; let li...
/*jslint browser: true */ // Log.js (c) 2010-2013 Loren West and other contributors // May be freely distributed under the MIT license. // For further details and documentation: // http://lorenwest.github.com/monitor-min (function(root){ // Module loading var Monitor = root.Monitor || require('./Monitor'), /...
'use strict'; angular.module('ccFilters', []).filter('noTransparent', function() { return function(colors) { var output = []; angular.forEach (colors, function(color) { if (color.color != 'transparent') { output.push(color); } }) return output; }; });
/** * Created by vmalla on 11/20/2014. */ var GhostServer = require('./index');
openRequest.onupgradeneeded = function(e){ database = e.target.result; createObjectStore(database,"profile",false); var ms= createObjectStore(database,"messages",false); ms.createIndex("between",'f'); ms.createIndex("profile",'m.p.u'); createObjectStore(database,"application",true); }; openReq...
function middle(e,t){var _=function t(){var n=Array.prototype.slice.call(arguments);return void 0===_._m_ctx&&(_._m_ctx=this),_._m_stack.length===_._m_index?(_._m_index=0,e.apply(_._m_ctx,n)):(n.unshift(t),_._m_stack[_._m_index++].apply(_._m_ctx,n))};return _._m_stack=[],_._m_index=0,_._m_ctx=t,_.use=function(e,t){_._m...
(function() { 'use strict'; var name = 'ZOBAngels.directive.SecurityDirectives'; var securityDirectives = angular.module(name,[ 'ZOBAngels.service.AccountService' ]); securityDirectives.directive('isAuthenticated',[ 'ngIfDirective', 'ZOBAngels.service.AccountService', ...
import React, { Component } from 'react' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import Header from '../Shared/Header' import Body from './Body' import Footer from './Footer' import injectTapEventPlugin from 'react-tap-event-plugin'; const TheContainer = React.createClass({ render: funct...
(function() { 'use strict'; document.addEventListener('DOMContentLoaded', function() { var includes = document.querySelectorAll('.includes-link'); for(var i = 0; i < includes.length; i++) { includes[i].addEventListener('click', function(e) { e.preventDefault(); ...
import Blockly from 'node-blockly/browser'; Blockly.JavaScript['stop_motor'] = function (block) { var motor = Blockly.JavaScript.valueToCode(block, 'MOTOR', Blockly.JavaScript.ORDER_ATOMIC); let actualMotor = eval(motor); return(`bot.motors.${actualMotor.motor}.stop();\n`) };
const bluebird = require('bluebird'); const crypto = bluebird.promisifyAll(require('crypto')); const api_key = process.env.MAILGUN_API_KEY || process.env.MAILGUN_API_SANDBOX_KEY; const domain = process.env.DOMAIN; const mailgun = require('mailgun-js')({apiKey: api_key, domain: domain}); const passport = require('pas...
'use strict'; angular.module('projects', ['ui.router']) .config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider .state('projects', { url: '/projects', controller: 'ProjectsCtrl' }) .state('projects.project', { url: '/:project', controller: 'P...
var Application = require('./../models/application'); var Student = require('./../models/student'); var Company = require('./../models/company'); var MailController = require('./mailController'); var nodemailer = require("nodemailer"); var objectAssign = require('object-assign'); // Get var getApplication = function...
function toggleSide(node) { $('.sidebar').toggleClass('hidden'); $('.page-main').toggleClass('hidden'); } $(document).ready(function(){ $('.sidebar').css('height',document.body.offsetHeight+"px"); $('.sidebar .scrollpane>ul.nav').slimScroll({ height: '100%' }); if(!window.module)return; var act...
function readURL(input,x) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('.img').eq(x).attr('src', e.target.result); try { resizeImg(); } catch(e) { } ...
require('chai').use(require('chai-as-promised')) if (global.__env__) { process.env.CHROMANODE_URL = global.__env__.CHROMANODE_URL } let errors = require('../src').errors process.on('unhandledRejection', (err) => { let msg = (err && err.stack || err).toString() if (err instanceof errors.Network.Chromanode.Fail ...
import state from './basket.state' import actions from './basket.actions' import mutations from './basket.mutations' export default { state, actions, mutations }
function compose() { const argz = arguments; return x => [...argz].reduceRight((acc, curr) => curr(acc), x); } const addClass = name => el => { el.classList.add(name); } const S = f => g => x => { const fx = f(x); const gx = g(x); const result = fx(gx); return result; } const K = x => y => { return ...
import { map } from '@ember/object/computed'; import { isEmpty } from '@ember/utils'; import { observer, get, defineProperty } from '@ember/object'; import Helper from '@ember/component/helper'; export default Helper.extend({ compute([func, array]) { this.set('func', func); this.set('array', array); return thi...
// chrome.tabs // ----------------- // ref: // - http://chrome.liuyixi.com/tabs.html (function (root, factory) { 'use strict'; if ('function' === typeof define && define.amd) { define([], factory); } else { root.tabs = factory(); } }(window, function () { 'use strict'; var ...