code
stringlengths
2
1.05M
var Model = require('./jugando'); module.exports = function (sequelize, DataTypes) { var DetalleVenta = sequelize.define( 'DetalleVenta', { idDetalleVenta: { type: DataTypes.INTEGER(11), primaryKey: true, autoIncrement: true, comment: 'ID Detalle Venta', validate:...
'use strict'; var some = require( './some.core' ); var grid = function ( world, width, height, marginX, marginY ) { some.layout.call( this, world, true ); this.horizontal = marginX || 1; this.vertical = marginY || marginX || 1; this.setSize( width, height ); this.generate(); return this; }; grid.proto...
'use strict'; module.exports = function (grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: true }, test: ['Gruntfile.js', 'index.js', 'demo/**/*.js'] }, ...
7.0-alpha1:4880c41b48494c08db5d89df9334a68a8ad73159507316d52f64f666c0996c5b 7.0-alpha2:4880c41b48494c08db5d89df9334a68a8ad73159507316d52f64f666c0996c5b
'use strict' const normalizeEndpoint = require('./lib/normalize-endpoint') module.exports = Client // TODO: request timeouts // const REQUEST_TIMEOUT = 10 * 1000 // 10 seconds // TODO eventually this will be https-only const hyperquest = require('hyperquest') const bole = require('bole') const logger = bole(proces...
import {customAttribute} from 'aurelia-templating'; //Placeholder attribute to prohibit use of this attribute name in other places @customAttribute('infinite-scroll-next') export class InfiniteScrollNext { constructor() {} attached() {} bind(bindingContext, overrideContext): void { this.scope = { binding...
var mongoSetup = require('./../index.js'); var cp = mongoSetup.collectionPromises; var connectionData = { connectionString : "mongodb://localhost:27017/repair_db" }; mongoSetup.connectTo(connectionData) .then(cp.repair()) .then(cp.disconnect()) .catch(mongoSetup.handleError());
var issuesListNodes = document.getElementsByClassName('issues-list'); var issuesList = issuesListNodes && issuesListNodes[0]; var issues = issuesList && issuesList.getElementsByClassName('octicon-git-pull-request'); var numPRs = issues && issues.length; for (var i = 0; i < numPRs; ++i) { var prIssue = issues[i].pare...
'use strict'; var grunt = require('grunt'); exports.html2str = { setUp: function(done) { // setup here if necessary done(); }, default_options: function(test) { test.expect(1); var actual = grunt.file.read('tmp/after.js'); var expected = grunt.file.read('test/expected/after.js'); test...
'use strict'; /* jshint ignore:start */ /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ /* jshint ignore:end */ var Q = require('q'); /* jshint ignore:line */ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../base/Pag...
'use strict'; var host = location.origin.replace(/^http/, 'ws'); var ws = new WebSocket(host); var clientId; var msgId; var Types = { INIT: 'INIT', TICK: 'TICK', ENTER: 'ENTER', CHAT: 'CHAT', EXIT: 'EXIT', }; function handleConnectionClosed () { setStatusMessage('Connection closed for unknown reason'); }...
define(["exports", "aurelia-metadata", "aurelia-loader", "aurelia-path"], function (exports, _aureliaMetadata, _aureliaLoader, _aureliaPath) { "use strict"; var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Obj...
/* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
'use strict' /*! * imports. */ var curry2 = require('curry2') var selectn = require('selectn') /*! * imports (local). */ var expressions = require('./lib/expressions') /*! * exports. */ module.exports = curry2(filter) /** * Curried function deriving a new array containing items from given array for which ...
/** * Created by thaoha on 8/27/14. */ var FormDropzone = function () { return { //main function to initiate the module init: function () { var form = $('form.create-album-form'); Dropzone.options.myDropzone = { init: function() { Form...
window.Rendxx = window.Rendxx || {}; window.Rendxx.Game = window.Rendxx.Game || {}; window.Rendxx.Game.Ghost = window.Rendxx.Game.Ghost || {}; window.Rendxx.Game.Ghost.System = window.Rendxx.Game.Ghost.System || {}; /** * Character: Basic */ (function (SYSTEM) { // Data -----------------------------------------...
var _ = require('lodash'); module.exports = function(self, options) { self.route('post', 'upload', self.middleware.canUpload, self.apos.middleware.files, function(req, res) { // Must use text/plain for file upload responses in IE <= 9, // doesn't hurt in other browsers. -Tom res.header("Content-Type", "...
#!/usr/bin/env node // wie viele Clients sind verbunden? var numberOfConnections = 0; // Array aller connections var connections = []; // benötige Module für Node.JS var WebSocketServer = require('websocket').server; var http = require('http'); // Fehlermeldung bei Aufruf des HTTP-Servers, wir brauchen aber einen H...
const router = require("koa-router")(); const Models = require("../lib/core"); const $User = Models.$User; const redisUtils = require("../utils/redisUtils"); router.post("/api/registActive", async ctx => { let code = "1", message = "登录成功"; var { verifyKey } = ctx.request.body; try { const activeKey = ve...
'use strict'; require('./polyfill'); var angular = require('angular'); var jQLite = exports.jQLite = angular.element; var camelToDash = exports.camelToDash = function(str) { return str.replace(/\W+/g, '-') .replace(/([a-z\d])([A-Z])/g, '$1-$2'); }; exports.compileDirective = function(directivename, html...
export default (action) => { const newOptions = { method: 'GET', uri: action.url, json: true, }; const options = Object.assign({}, newOptions, action); delete options.url; delete options.type; if (action.headers) { options.headers = action.headers; } if (action.data) { options.hea...
import React from "react"; import { useRouter } from "@curi/react-dom"; const CLASSNAMES = "m-0 mr-1 mb-1"; let Version = ({ versions, major, params }) => { let router = useRouter(); // only render dropdown for packages with multiple versions if (Object.keys(versions).length > 1) { return ( <label cl...
/* * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. * See LICENSE in the project root for license information. */ Office.onReady(() => { // If needed, Office.js is ready to be called }); /** * Shows a notification when the add-in command is executed. * @param event *...
'use strict'; module.exports.uniqueId = require('./unique-id'); module.exports.hiddenProperty = require('./hidden-property'); module.exports.createArchive = require('./create-archive');
import { assign, guidFor, dictionary, getOwner } from 'ember-utils'; import Logger from 'ember-console'; import { get, set, defineProperty, computed, run, deprecateProperty } from 'ember-metal'; import { Error as EmberError, deprecate, assert, info } from 'ember-debug'; import { Object as ...
import 'bulma/css/bulma.css'; import 'highlight.js/styles/atom-one-dark.css'; import './index.css'; import React from 'react'; import ReactDOM from 'react-dom'; import {Provider} from 'react-redux'; import marked from 'marked'; import App from './App'; import store from './store'; marked.setOptions({ highlight: fun...
import { MessageDispatcher, Envelope } from 'message-dispatcher'; import ActorRef from './ActorRef'; export default class ActorSystem { constructor(dispatcher) { this.actors = new Map(); this.dispatcher = dispatcher; } actorOf(ActorType, name = ActorType.name.toLowerCase()) { if (this.actors.has(nam...
// 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...
import Icon from '../components/Icon.vue' Icon.register({"medkit":{"width":1792,"height":1792,"paths":[{"d":"M1280 1120v-192q0-14-9-23t-23-9h-224v-224q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v224h-224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23-9t9-23v-224h224q14 0 23-9t9-23zM640 384h512v-128h-...
module.exports = { "extends": "google", "rules": { "max-len": ["error", { "ignoreStrings": true }], "eol-last": ["off"], "require-jsdoc": ["error", { "require": { "FunctionDeclaration": false, "MethodDefinition": false, "ClassDeclaration": true, "ArrowFunctionExpression": false } }]...
/** * @Scrollbar.js * @author xunxuzhang * @version * Created: 15-07-15 */ LBF.define('qidian.comp.Scrollbar', function (require, exports, module) { var $ = require('lib.jQuery'); require('{theme}/comp/Scrollbar.css'); /** * 模拟滚动条效果,基于原生的scroll实现 * 针对所有浏览器 * UI交互仿iOS系统滚动条,黑黑细细长长, * 默认不显示,scroll...
var glob = require('glob') var fs = require('fs') module.exports = function (content) { return function (pages, done) { glob(content, {}, function (err, files) { if (err) { done(err) } else { files = files.map(function (file) { return new Promise(function (resolve, reject) {...
var moment = require("moment") var gaillard = [], hometeamsi = [], hometeamwa = [], musicfarm = [], musichall = [], pourhouse = [], royalamerican = [] , sparrow = [], theatre99 = [], tinroof = [], windjammer = [], tonight = [], thisWeek = [] module.exports = function(shows, done) { sortShows(shows) var tonightLi...
'use strict'; var React = require('react'); var Modal = require('react-modal'); var customStyles = { content: { top: '50%', left: '50%', right: 'auto', bottom: 'auto', marginRight: '-50%', transform: 'translate(-50%, -50%)', backgroundColor: '#272525', color: '#fff' } }; var AddTa...
import { createTranslator } from 'kolibri.utils.i18n'; import logger from 'kolibri.lib.logging'; import { OBJECTS, ADJECTIVES, VERBS } from './constants'; export const logging = logger.getLogger(__filename); /* Strings variations below are defined based on the following constructions: Item status: N Object(s) is...
describe('Forced March', function() { integration(function() { describe('when revealed', function() { beforeEach(function() { const deck = this.buildDeck('targaryen', [ 'Forced March (R)', 'A Noble Cause', 'Hedge Knight', 'Hedge Knight', 'H...
process.env.NODE_ENV = 'test'; global.chai = require('chai'); global.expect = global.chai.expect;
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { options: { banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + ...
const configProto = { next: function (o) { let c = Configurator(this.name || o.name); c.signature = (this.signature || []).concat(o.signature || []); c.existing = o.existing || this.existing; c.functionType = o.functionType || this.functionType; c.returnValue = o.returnValue || this.returnValue; ...
var searchData= [ ['p_5f_5fmax',['P__MAX',['../structSPI__data.html#a634b17223c7720d100d159ea751d0ec9',1,'SPI_data']]], ['p_5f_5fmin',['P__MIN',['../structSPI__data.html#af33e94cc7303e19d8324916a596ff14c',1,'SPI_data']]], ['p_5fout_5f_5fmax',['P_OUT__MAX',['../structSPI__data.html#ab122e183f5f46e7984e7f581fa980ff...
module.exports = { "properties": { "a": { "description": "The entry at position [1,1] in the matrix.", "type": "Number" }, "absoluteDate": { "description": "The absolute date for the alarm.", "type": "Date" }, "accepted": { ...
import { Template } from 'meteor/templating'; import './register.html'; Template.register.events({ 'submit form': function(event) { event.preventDefault(); var usernameVar = event.target.registerUsername.value; var passwordVar = event.target.registerPassword.value; Accounts.createU...
$axure.loadCurrentPage({ "url":"初次体检.html", "generationDate":new Date(1450041086639.76), "isCanvasEnabled":false, "variables":["OnLoadVariable"], "page":{ "packageId":"dab4d3e52a1146f5896007130ba50a47", "type":"Axure:Page", "name":"初次体检", "notes":{ }, "style":{ "baseStyle":"627587b6...
(function ($) { "use strict"; var atp = { init: function () { this.bindUIActions(); $("#welcome-scene").parallax(); }, windowLoaded: function () { this.setSlideHeight(); }, bindUIActions: function () { $(".moveslideshow...
requirejs.config({ baseUrl: '/vendor/', paths: { jquery: 'jquery/dist/jquery.min', underscore: 'underscore/underscore', backbone: 'backbone/backbone' }, shim: { 'backbone': { deps: ['jquery', 'underscore'] } } }); require([ 'jquery', 'underscore', ...
(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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex...
/** * @class ResizeSimulate * @export ResizeSimulate */ export class ResizeSimulate { /** * On resize event simulate * @memberOf ResizeSimulate * @param type * @param args */ resizeResizableSimulate(type, args) { /** * Get jQuery.UI element * @type {*} */ const ui = args[1...
var expect = require('expect.js'); var server = require('./server'); var ROOT_URL = '/'; var PlexAPI = require('..'); describe('timeout error', function () { var api; beforeEach(function () { server.timeoutError(); api = new PlexAPI({ hostname: 'localhost', timeout: 10 }); }); afte...
var require = require || {}; require( [ 'jquery', 'doT', 'lodash' ], function( $, doT, _ ) { 'use strict'; });
/* global describe, it, expect */ var pkg = require('..'); describe('fingro-webfist', function() { it('should export object', function() { expect(pkg).to.be.an('object'); }); });
Aspect.build('anal-lover', { name: 'Anal Lover', description: 'is very sexually aroused by assholes and giving anal sex.', refutes: [ { aspect:'anal-skeptic' }, ], consentThresholdModifiers: { lust: 10, obscenity: 2, }, });
var express = require("express"); var morgan = require('morgan'); var mongoose = require('mongoose'); var bodyParser = require('body-parser'); var passport = require('passport'); var jwt = require('jsonwebtoken'); var cors = require('cors'); var socket = require('socket.io'); var index = require('./controllers/index');...
/** * Copyright (c) 2017 Dinesh Maharjan <httpdeveloper@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to...
//= require action_cable //= require_self (function () { this.App || (this.App = {}) App.cable = ActionCable.createConsumer(); }).call(this);
'use strict'; var RecorderStartView = Backbone.View.extend({ el: '#app-wrapper', template: JST['client/templates/recorder_start'], events: {}, initialize: function() { this.initState(); this.render(); this.setEvents(); }, initState: function() { window.tonetrainer_recording = {}; w...
import '@storybook/addon-options/register'; import '@storybook/addon-links/register';
// ==UserScript== // @name Tabbed Cheevos Page // @namespace pxgamer // @version 0.2 // @description Creates a tab system for the achievements page. // @author pxgamer // @include *kat.cr/achievements/ // @grant none // ==/UserScript== (function() { 'use strict'; $('h1').aft...
/** * Out Logger Class */ class Logger { constructor(callerClassName) { this.callerClassName = callerClassName; this.trace = false; } info(object) { this.logging("[INFO]",object); } warning(object) { this.logging("[WARNING]",object); } error(object) { ...
'use strict'; const usersCoolection = require('./db').users; const USERS_MOCK_DATA = require('./USERS_MOCK_DATA'); /** * Initialize Database * @function dbInit * @returns {void} */ module.exports = () => { usersCoolection.deleteAll(); USERS_MOCK_DATA.forEach(d => usersCoolection.insert(d)); }
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M21 5h-2.64l1.14-3.14L17.15 1l-1.46 4H3v2l2 6-2 6v2h18v-2l-2-6 2-6V5zm-5 9h-3v3h-2v-3H8v-2h3V9h2v3h3v2z" }), 'LocalPharmacy');
// @flow /* eslint-env mocha */ import assert from 'power-assert' import startOfUTCWeekYear from '.' describe('startOfUTCWeekYear', function() { it('returns the date with the time set to 00:00:00 and the date set to the first day of a week year', function() { var result = startOfUTCWeekYear(new Date(Date.UTC(20...
/* @preserve * The MIT License (MIT) * * Copyright (c) 2013-2017 Petka Antonov * * 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 r...
var should = require('should'); var nock = require('nock'); var Transifex = require('../transifex'); transifex = new Transifex({ project_slug: "node-transifex-sample", credential: "test.transifex:TestForTransifex" }); describe("Project API", function () { it("The projectInstanceMethods function should return d...
var mongoose = require('mongoose'), Schema = mongoose.Schema; var PriceRule = new Schema({ listingID: {type: mongoose.Schema.Types.ObjectId, ref: 'listing', required: true}, title: String, order: Number, scale: String, //(Fixed Value, Gradual Value, Fixed Percentage, Gradual Percentage) amount:...
(function() { describe('scalarInput', function() { describe('#constructor', function() { it('can handle single unit', function() { var si; si = $('<input>').scalarInput({ units: 'meters' }).scalarInput('instance'); return expect(si.option('units')).toEqual('meters')...
var mongoose = require('mongoose'), Schema = mongoose.Schema; var serviceSchema = new Schema({ name: String, version: String, status: Boolean, success: Boolean }); mongoose.model('Service', serviceSchema);
/** * Just initialize the variables * * @class init */ /** * * @class restFactory */ window.rest = (function () { 'use strict'; /** * Array of modules list of the rest factory accepts. * * Every Module is a Obect like this: * <pre> * { * {resourceName} : {Object} * } * </pre> * @property modul...
(function() { 'use strict'; angular .module('<%= moduleName %>') .controller('<%= moduleName %>Ctrl', controller); controller.$inject = []; function controller() { } })();
// NOTE This file documents the data structure of v1. const c = require('./common'); module.exports = { collections: { config: [], // Denotes that collection doesn't exist and must be removed. users: [{ name: 'admin', email: 'admin@example.com', hash: c.PASSWORD, admin: true, }],...
var csc = require('../index'); csc({ src: 'hello/*.cs', out: 'bin/hello.exe', nologo: true }, function(err, res){ if (res){ res.stdout && console.log(res.stdout); res.stderr && console.log(res.stderr); } if (err){ console.error(err); } });
/* */ var test = require('tape'); var fs = require('fs'); var parseKey = require('../index'); var rsa1024 = { private: fs.readFileSync(__dirname + '/rsa.1024.priv'), public: fs.readFileSync(__dirname + '/rsa.1024.pub') }; var rsa2028 = { private: fs.readFileSync(__dirname + '/rsa.2028.priv'), public: fs.readFi...
import { expect } from "chai"; import processor from "../../../src/core/monoProcessor"; describe("core/monoProcessor", () => { it("multiplies mono color by value", () => { const c = color({ mono: 40 }); processor.mul(c, 3); expect(c).to.eql(color({ mono: 120 })); }); it("adds a ...
import Discord from 'discord.js' import generateHelp from './util/generateHelp' import runHooks from './util/runHooks' import runPlugins from './util/runPlugins' import getChannel from './util/getChannel' import getCommands from './util/getCommands' import messageHandler from './util/messageHandler' import filterTags f...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime")...
//adding opensource modules to application 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 bcrypt = require('bcrypt-nodejs'); var passport = req...
const gulp = require('gulp'); const gutil = require('gulp-util'); const runSequence = require('run-sequence'); const buildServer = require('./helpers/buildServer'); const runStdPlatform = require('./helpers/runStdPlatform'); const runWebPlatform = require('./helpers/runWebPlatform'); const tryPackage = require('./help...
describe("About Expects", function() { // We shall contemplate truth by testing reality, via spec expectations. it("should expect true", function() { expect(true).toBeTruthy(); //This should be true }); // To understand reality, we must compare our expectations against reality. it("should expect equalit...
describe('Moto Eviscerator', function() { integration(function() { describe('Moto Eviscerator\'s ability', function() { beforeEach(function() { this.setupTest({ phase: 'conflict', player1: { inPlay: ['moto-eviscerato...
window.addEventListener('load', () => { if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/service-worker.js'); } else { console.warn('Service workers aren\'t supported in this browser.'); } });
'use strict'; export const Words = new Mongo.Collection('Words'); if (Meteor.isServer) { Meteor.publish('Words', () => { return Words.find({}); }); }
"use strict"; describe('Thermostat', function() { var thermostat; beforeEach(function() { // $('body').append('<h1>hello</h1>'); thermostat = new Thermostat(); }); describe('by default', function() { it('is set to 20 degrees', function() { expect(thermostat.temperature).toEqual(20); }); it('powe...
/********************************* * * mavisjs - graphing and geometry library for HTML5 canvas * * arrow.js Draw arrows (parallele or vector) on a line. * * Author: Martin McBride (martin.mcbride@axlesoft.com) * * Copyright (c) Martin McBride 2016 * *********************************/ /**** ...
import { directive as vDragged } from 'v-dragged' export default { directives: { dragged: vDragged } }
/*! * fill-array <https://github.com/jonschlinkert/fill-array> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License */ 'use strict'; var assert = require('assert'); var fill = require('./'); it('should fill the elements in the array to the specified length.', function () { assert.deepEqual...
(function(g,b){b.useDefaults();ltoptions.debug?b.setLevel(b.Debug):b.setLevel(b.WARN);g.onerror=function(a,d,e,f,c){if(e||d)a=a+"\nurl: "+d+"\non line "+e,f&&(a=a+" symbol "+f),c&&"stack"in c&&(a=a+"\n"+c.stack),b.error(a)}})(window,Logger);
module.exports = require('./lib').default; module.exports.default = module.exports; module.exports.NextButton = require('./lib').NextButton; module.exports.PreviousButton = require('./lib').PreviousButton; module.exports.PagingDots = require('./lib').PagingDots;
// flow-typed signature: 3a38999c5a4e8cac747ac63cfe49cb5b // flow-typed version: <<STUB>>/utm_v^1.1.1/flow_v0.102.0 /** * This is an autogenerated libdef stub for: * * 'utm' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with the * community ...
'use strict'; var JSONRPCFactory = require('../../lib'); var Names = { v1: 'JSONRPC_V1', v2: 'JSONRPC_V2' }; describe('JSONRPCFactory (lib/jsonrpc-factory.js)', function () { it('v1 method should gives ' + Names.v1 + ' object', function () { expect(JSONRPCFactory.v1().constructor.name).toBe(Names.v1); })...
import AcTypes from '../configs/types'; import { Record,Map } from 'immutable'; const { QUERY_BY_ID } = AcTypes; const InitialState = Record({ article:Map({}) }); const initialState = new InitialState(); export default function BLogDetailReducer(state = initialState, action = {}) { switch (action.type) {...
'use strict'; function create(value) { return /* BasicCameraView */{ _0: value }; } function value(basicCameraView) { return basicCameraView._0; } exports.create = create; exports.value = value; /* No side effect */
(function () { 'use strict'; angular.module('profile') .component('profileAboutBlock', { templateUrl: 'partials/profile-about-block.html', controller: profileAboutBlock, controllerAs: 'vm', bindings: { profile: '<' } })...
var chai = require('chai'); var util = require('util'); var path = require('path'); var poplar = require('poplar'); var ApiBuilder = poplar.ApiBuilder; var glue = require('../'); glue.autoload('myLoaders', path.join(__dirname, './loaders')); var SampleApp = require('./sample_app'); var expect = chai.expect; describ...
/*jshint node:true, quotmark:single */ 'use strict'; module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: true }, grunt: 'Gruntfile.js', source: 'src/**/*.js', tests: 'test/**/*.js' }, uglify: { options: { ba...
'use strict'; let Observable = require('data/observable').Observable; class AccountViewModel extends Observable { constructor() { super(); this.title = 'Account'; } } module.exports = { AccountViewModel: AccountViewModel, defaultInstance: new AccountViewModel() };
(function() { 'use strict'; angular .module('plagUiApp') .controller('ActivationController', ActivationController); ActivationController.$inject = ['$stateParams', 'Auth', 'LoginService']; function ActivationController ($stateParams, Auth, LoginService) { var vm = this; ...
import Tag from './Tag' function createTemplateTag (tag, options = {}) { return (strings, ...values) => { return new Tag(tag, options, strings, values) } } export {default as Tag} from './Tag' export const state = createTemplateTag('state', { isStateDependency: true }) const inputTemplateTag = createTempla...
var galleriesCtrl = function ($scope, galleriesResource) { $scope.categories = galleriesResource.query(); }; galleriesCtrl.$inject = ['$scope', 'galleriesResource']; module.exports = galleriesCtrl;
import { SET_PUBLISHER_FILTER } from 'redux/constants'; const SHOW_ALL = 'ALL'; function publisherFilter (state = SHOW_ALL, action) { switch (action.type) { case SET_PUBLISHER_FILTER: return action.filter; default: return state; } } export default publisherFilter;
bf.constant('Errors', { email: '不是有效格式的邮件地址', required: '此项不能为空' });
#!/usr/bin/env node // Load Jii Framework global.Jii = require('jii'); require('jii-urlmanager'); require('jii-httpserver'); require('jii-comet'); // Load other packages var request = require('request'); // Load custom config var customPath = __dirname + '/../../config.js'; var custom = require('fs').existsSync(cust...