code stringlengths 2 1.05M |
|---|
import components from './components';
import cities from './cities';
import git from './git';
export default {
components,
cities,
git,
};
|
export const tags = {"viewBox":"0 0 1920 1792","children":[{"name":"path","attribs":{"d":"M448 448q0-53-37.5-90.5t-90.5-37.5-90.5 37.5-37.5 90.5 37.5 90.5 90.5 37.5 90.5-37.5 37.5-90.5zM1515 1024q0 53-37 90l-491 492q-39 37-91 37-53 0-90-37l-715-716q-38-37-64.5-101t-26.5-117v-416q0-52 38-90t90-38h416q53 0 117 26.5t102 6... |
// create a function that takes in a string for a base currency as it's parameter
// create a url variable that accesses a base currency
const axios = require("axios");
function getRates(baseCurrency) {
let url = `https://api.frankfurter.app/latest?from=${baseCurrency}`
console.log(url)
return axios
... |
// Global includes
var config = require('./config.js');
var gulp = require('gulp');
var when = require('./when.js');
// Local includes
var browserSync = require('browser-sync').create();
// SERVE
//
// Serve the site statically via browser-sync.
// ----------------------------------------------------------------... |
/* tslint:disable:no-unused-variable */
System.register(['@angular/core/testing', './data.component'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var testing_1, data_component_1;
return {
setters:[
function (testing_1_1) {
... |
import r from 'restructure';
import Entity from '../entity';
import StringRef from '../string-ref';
export default Entity({
id: r.uint32le,
name: StringRef,
animationDataID: r.uint32le,
flags: r.uint32le,
unknowns: new r.Reserved(r.uint32le, 2),
soundID: r.uint32le
});
|
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M2 17h20v2H2v-2zm1.15-4.05L4 11.47l.85 1.48 1.3-.75-.85-1.48H7v-1.5H5.3l.85-1.47L4.85 7 4 8.47 3.15 7l-1.3.75.85 1.47H1v1.5h1.7l-.85 1.48 1.3.75zm6.7-.75l1.3.75.85-1.48.85 1.48 1.3-.75-.85-1.48H1... |
require('font-awesome/scss/font-awesome.scss');
import {load as loadEmojis, parse as parseEmojis, all as allEmojis} from 'gh-emoji';
import {timeAgo, $, $$} from './lib/utils';
import {addEventListeners} from './lib/ui';
import {getRepos} from './lib/github';
import {renderTemplate} from './lib/template';
import artic... |
// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the Licen... |
/**
* Created by Edward Luna Noriega on 03/10/17.
*/
var ctx = document.getElementById('myChart').getContext('2d');
function GenerarReporte() {
$.ajax({
type: 'POST',
url: '/terranorte/app/reporte/indicador2',
contentType: "application/json",
data: JSON.stringify({fechainicial: ... |
/**
* Created by zhoujihao on 2016/1/3.
*/
function addHandler(element, type, handler) {
if (element.addEventListener) {
element.addEventListener(type, handler, false);
} else if (element.attachEvent) {
element.attachEvent('on' + type, handler);
} else {
element['on' + type] = han... |
var huskies = require("huskies"),
lock = require("huskies-lock");
function test(name,time,cb){
setTimeout(function(){
cb(name + "-leo");
},time);
}
var wrap = huskies(test).use(lock);
for(var i=0;i<10;i++){
wrap("name"+i,1000-i*10,function(n){
console.log(n)
})
}
/*
function ... |
if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define(
// Dependencies
[ 'require', 'underscore' ],
// Module
function(require) {
var _ = require('underscore');
var CLASS_KEY = '__type';
var META_KEY = '__meta';
var TYPE_ID_KEY = '__type_id';
var PARENT_KEY = '... |
/**
* Exports object that contains names of options as a key and their configuration objects as a value
*
* @example
* export default {
* optionName: {
* desc: 'Description for the option',
* alias: 'Short name for the option',
* type: Boolean || String || Number,
* defaults: 'Default value',... |
//-------------------------------------------------------------------------
// This source code is confidential proprietary information which is
// Copyright (c) 1999, 2013 by Great Hill Corporation.
// All Rights Reserved.
//-------------------------------------------------------------------------
//-----------------... |
$(document).ready(function() {
//Script Creato da Riccardo Mel
//Targetweb.it - riky.mel@gmail.com
//Versione 2.0
//al click sul bottone del form
$("#bottone-contact").click(function(){
$(this).hide();
$("<img src='images/loader.gif' class='loader' />").appendTo("#contact");
var timer = 2000;
... |
var chai = require("chai");
var sinon = require("sinon");
var sinonChai = require("sinon-chai");
var expect = chai.expect;
chai.use(sinonChai);
var noSync = require('../index.js');
describe('Protractor-NoSync Wrapped Object Method', function () {
var browser, obj, nosync, arg1, arg2, result;
var data = { valu... |
Phylotastic.App = {
updateMapToSource: function() {
var curSource = Phylotastic.DataSources.currentSource;
var selectionType = curSource.selectionType;
switch (selectionType) {
case 'point':
Phylotastic.Maps.setPointSelection();
break;
case 'circle':
Phylotastic.Maps.setCircular... |
var config = require('./config');
var del = require('del');
var gulp = require('gulp');
var gulpif = require('gulp-if');
var runSequence = require('run-sequence');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
var... |
import regex from './regex';
export { default as go } from './go.js';
const captureQuotedWord = regex`
['"] # beginning quote
(?<$1>[^'"\s]+) # capture the word inside the quotes
['"] # end quote
`;
const importMembers = regex`[\r\n\s\w{},*\$]*`;
const from = regex`\s from \s`;
export co... |
var cloak = require('./cloak/index.js');
var _ = require('underscore');
cloak.configure({
port: 8090,
roomLife: 1000*60*60*3,
autoJoinLobby: false,
minRoomMembers: 1,
pruneEmptyRooms: 1000,
reconnectWait: 2000,
messages: {
registerUsername: function(arg, user) {
var users = cloa... |
import instrumentApplicationLoaded from './instrumentApplicationLoaded';
import instrumentEnvironmentReady from './instrumentEnvironmentReady';
import linkGithubIdentity from './linkGithubIdentity';
import logout from './logout';
import projectSuccessfullySaved from './projectSuccessfullySaved';
import saveProject from... |
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicati... |
"use strict";
var Backbone = require('backbone')
, _ = require('lodash');
var ownOpts = ['view', 'routes', 'el', 'connection']
function AppArea(options){
this._configure(options)
this._setElement()
this._setView()
this._setRouter()
this.initialize.apply(this, arguments);
}
_.extend(AppArea... |
console.debug('debugger tile loading');
(function ( $ ) {
$.fn.debuggerTile = function(params) {
var tileNode = this;
var properties = JSON.parse($(this).find('div.data-properties').html());
var output = $(this).find('table tbody');
function clear_output() {
output.empt... |
import Joi from 'joi';
export default class OffsetValidator {
build = () => Joi.object().keys({
offset: Joi.number(),
})
}
|
var data = [
{country: "France", litres: 12.2},
{country: "Canada", litres: 10.2},
{country: "Pakistan", litres: 0.1},
{country: "United States", litres: 9.2},
{country: "Russia", litres: 15.1},
{country: "Malaysia", litres: 1.3},
{country: "India", litres: 4.3},
{country: "South Korea", litres: 12.3},
... |
/**
* iEvent.biz.companyemployee.edit.js
*/
$(function() {
var sVersion = "v1";
var sResource = "eventPersonnels";
var companyid = iEvent.current_user_companyid;
if (companyid == 0) {
$.scojs_message('您不是企业管理人员,无法处理', $.scojs_message.TYPE_WARN, function(){
parent.window.location.reload();
});
return... |
// idb.js: generalized wrapper for IndexedDB
// Author: Keith Johnson
// Date: 03/21/2015
// Inspired by Craig Shoemaker's "HTML5 Web Storage, IndexedDB and File System"
// course on PluralSight
// Example initialization:
// var todoDB = new IDB('TODODB', 1, { tasks:'tasks' });
// todoDB.OpenDatabase('tasks');
funct... |
/**
A **Pin** is a pinned position on the surface of a {{#crossLink "Mesh"}}{{/crossLink}}.
## Overview
#### Position
A Pin is positioned within one of the triangles of its {{#crossLink "Mesh"}}Mesh's{{/crossLink}} {{#crossLink "Geometry"}}{{/crossLink}}. Wherever that triangles goes within the 3D view, the Pin ... |
const Ranks = [
'2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A',
];
const Suits = ['diams', 'spades', 'hearts', 'clubs'];
let fullDeck = [];
for (const [weight, rank] of Ranks.entries()) {
for (const suit of Suits) {
fullDeck.push({ suit, rank, weight: String.fromCharCode(weight + 65) });
... |
'use strict';
const Cashflow = require('./service');
module.exports = {
getAll: Cashflow.getAll,
insert: Cashflow.insert,
update: Cashflow.update,
};
|
var l_ATraiterPar = "A traiter par";
var l_Auteur = "Antrag, der gestellt wurde, von ";
var l_Comment = "Kommentar";
var l_Comments = "Kommentare";
var l_Country = "Land";
var l_DateArriveeEtat = "Date d'arrivée dans l'état";
var l_DateCreation = "Date de création";
var l_Demandeur = "Antragsteller";
var l_Dema... |
/**
* vue-tagdog v0.0.1
*
* Copyright (c) kriskbx <m@kris.cool>, contributors.
* Licensed under the MIT license.
*/(function(root, factory){
var vueTagdog = {
twoWay: true,
tagdog: null,
tagdogSettings: null,
tagdogProps: {
destroy: function destroy() {
... |
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt
// __("Form")
frappe.ui.AppFrame = Class.extend({
init: function(parent, title, module) {
this.set_document_title = true;
this.buttons = {};
this.fields_dict = {};
this.parent = parent;
var $center = p... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'newpage', 'bg', {
toolbar: 'Нова страница'
} );
|
//
// select our input DOM element with a type of file
// var fileInput = document.querySelector('input[type="file"]');
// var hiddenFileForParams = document.querySelector('#base');
//
// fileInput.addEventListener('change', function() {
// var fileAsBase64 = convertToBase64(fileInput.files[0], hiddenFileForParams, ... |
// Simple server for running static client files.
var http = require('http');
var ecstatic = require('ecstatic');
var staticRoot = 'www';
var port = 4400;
http.createServer(ecstatic({root: staticRoot})).listen(port);
console.log("HTTP server listening on " + port);
|
version https://git-lfs.github.com/spec/v1
oid sha256:a91ad7bae693a5951918c84dc0117025194dae870eb3147b524c9104d29ec8df
size 1032
|
/**
* Any OOUI widget that contains other widgets (such as {@link OO.ui.ButtonWidget buttons} or
* {@link OO.ui.OptionWidget options}) mixes in GroupElement. Adding, removing, and clearing
* items from the group is done through the interface the class provides.
* For more information, please see the [OOUI documenta... |
import React from 'react';
import { Row, Col } from 'react-bootstrap';
import ReactPlayground from '../../components/ReactPlayground';
import samples from './samples';
const FormDemo = ({ children }) => (
<Row>
<Col xs={12}>
<h2 className="page-header">Form Example</h2>
<ReactPlayground codeText={sa... |
function template(locals) {
var pug_html = "", pug_mixins = {}, pug_interp;
pug_mixins["foo"] = pug_interp = function() {
var block = this && this.block, attributes = this && this.attributes || {};
pug_html = pug_html + "<p>bar</p>";
};
pug_mixins["foo"]();
pug_html = pug_html... |
var crypto = require('crypto');
module.exports = exports = function(req, res) {
if(req.method == 'POST') {
var user = req.body.user;
var password = req.body.password;
if(user == req.config.nodeserver.admin.user && crypto.createHash('md5').update(password).digest('hex') == req.config.nodeserver.admin.password)... |
/* eslint-env jest */
import { parse, combine, getSizeAtTrack } from './index'
const sizeTracks = [
{ value: '50px', type: 'px', numeric: 50 },
{ value: '10px', type: 'px', numeric: 10 },
{ value: '5px', type: 'px', numeric: 5 },
]
;[
{
input: '1px 2px 3px',
output: [
{ val... |
/**
* Local dependencies
*/
const {JWTSchema, JWKSchema} = require('@trust/jose')
/**
* AccessTokenSchema
*/
const AccessTokenSchema = JWTSchema.extend({
properties: {
payload: {
properties: {
/**
* cnf
* OPTIONAL. Proof of Possession Confirmation Claim
* @see https:/... |
var express = require('express');
var router = express.Router();
var users = require('../model/users');
/* GET users listing. */
router.get('/refresh_address', function(req, res, next) {
res.send('respond with a resource');
});
router.get("/login", function (req, res) {
res.render("login");
});
router.post("/l... |
describe('$.layer - set layer', function () {
jsdom({
src: polydom
});
it('should throw an error if the z-index isn\'t set', function () {
document.body.innerHTML = '<div id="myDiv"></div>';
var myDiv = document.querySelectorAll('#myDiv');
$.layer(myDiv[0], "999");
ex... |
(function (){
"use strict";
var navbar = function() {
return {
restrict: 'E',
templateUrl: 'src/captcha/views/navbar.html',
controller: 'captchaCtrl'
};
};
angular.module('clientApp').directive('navbar', navbar);
}()); |
function foo()/*:number*/{} |
(function () {
'use strict';
var FontSizeForm = MediumEditor.extensions.form.extend({
name: 'fontsize',
action: 'fontSize',
aria: 'increase/decrease font size',
contentDefault: '±', // ±
contentFA: '<i class="fa fa-text-height"></i>',
init: function () {
... |
export default function gatherRefs( fragment ) {
let key = {}, index = {};
// walk up the template gather refs as we go
while ( fragment ) {
if ( fragment.parent && ( fragment.parent.indexRef || fragment.parent.keyRef ) ) {
let ref = fragment.parent.indexRef;
if ( ref && !( ref in index ) ) index[ref] = fra... |
export default {
actionButton: 'tag-list-action',
toggleMoreButton: 'tag-list-toggle-more',
};
|
needs("dialogues.IDialogue", {
CLAZZ("dialogues.NWDialogue", {
EXTENDS:"dialogues.IDialogue"
win:null,
CONSTRUCTOR:function(opt){
SUPER(opt);
},
save:function( saveAs ){
if( !this.onSave ){
if( this.parent )
this.parent.save(saveAs);
return;
}
if( sav... |
'use strict';
msos.provide('ng.intl.ml');
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"am",
"pm"
],
"DAY":... |
'use strict';
var stylesheet = require('./style.scss');
var img = {
cloud: require("./cloud.png"),
darkCloud: require("./darkCloud.png"),
purpleCloud: require("./purpleCloud.png"),
purpleCloud2: require("./purpleCloud2.png"),
smoke: require("./smoke.png"),
fire: require("./fire.png"),
fire2:... |
define([
'jquery',
'Global/SQ',
'SQ/Broadcaster',
'SQ/Util',
'underscore',
'text!./template/teachers_table.tmpl',
'datatables'
], function(
$,
SQ,
Broadcaster,
Util,
_,
TeachersTableTemplate
) {
'use strict';
return function TeachersTable() {
var _me = this;
var _util = new Util();
var _$teachers... |
import { connect } from 'react-redux'
import Autopay from 'components/Autopay'
const mapStateToProps = () => ({})
const mapDispatchToProps = {}
export default connect(mapStateToProps, mapDispatchToProps)(Autopay)
|
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
define("ghost/helpers/gh-path",
["ghost/utils/ghost-paths","exports"],
function(__dependency1__, __exports__) {
"use strict";
// Handlebars Helper {{gh-path}}
// Usage: Assume 'http://www.myghostblog.org/myblog/'
// {{gh-path}} or {{gh-path ‘blog’}} for Ghost’s root (/myblog/)
// {{gh-path ‘adm... |
define(function(require, exports, module) {
var Backbone = require('backbone');
var _ = require('lodash');
var toggleTemplate = _.template(require('text!./comboboxView.ejs'));
var dropdownTemplate = _.template(require('text!./dropdownView.ejs'));
var DropdownView = require('./dropdownView');
var classnames ... |
var mystack = stack()
.on("activate", activate)
.on("deactivate", deactivate);
var section = d3.selectAll("section"),
follow = d3.select("#follow"),
followAnchor = d3.select("#follow-anchor"),
followIndex = section[0].indexOf(follow.node()),
lorenzIndex = section[0].indexOf(lorenz.node());
fun... |
'use strict';
let should = require('should'),
Promise = require('bluebird'),
express = require('express'),
request = require('supertest'),
mung = require('../');
describe ('mung jsonAsync', () => {
function noop (json, req, res) {
return Promise.resolve(json);
}
fun... |
/**
*
*/
define(function (require, exports, module) {
var zhCN = require('datatableZh');
var editorCN = require('i18n');
editorCN.edit.title = "入库情况确认";
exports.index = function ($, tableId,itemTableId,customers,materials) {
var editor = new $.fn.dataTable.Editor({
ajax: {
... |
// Changes a string to lowercase and replaces spaces with hyphens
module.exports = function(text) {
return String(text).replace(/\s+/g, '-').toLowerCase()
} |
if (!L.FeatureGroup.prototype.setOpacity) {
L.FeatureGroup.include({
setOpacity: function(opacity) {
this.eachLayer(function(layer) {
if(layer.setOpacity) {
layer.setOpacity(opacity);
}
});
}
});
} |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
module.exports = {
// Production configuration options
}
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 ... |
(function(angular, $) {
'use strict';
angular
.module('adminlte')
.directive('daterange', daterange)
;
daterange.$inject = [];
function daterange() {
return {
restrict: 'C',
scope: {
alDaterangeConfig: '=',
alDaterangeSelect: '='
},
controller: daterangeController,
controllerAs: 'da... |
;(function() {
"strict mode";
var _DEV_ = true; // false in min file
if (typeof define === 'function' && define.amd) {
define(['backbone', 'underscore'], module);
} else {
module(Backbone, _);
}
function module (BB, _) {
DOMView.v = '1.48.1';
var View = BB.V... |
const ValidationError = require('../errors/validation-error')
const FieldValidator = require('../validators/field-validator')
const FieldsetValidator = require('../validators/fieldset-validator')
const dateFormatter = require('../date-formatter')
const ErrorHandler = require('../validators/error-handler')
const unsafeI... |
const remote = require("electron").remote;
//const Store = require("electron-config");
const fs = require("fs");
const path = require('path');
/* Setting up language selector for app language (select2) */
function setAppLang() {
logger.debug("setAppLang");
$("#app-lang-selector").empty();
fs.readdirSync(p... |
var User = require('./../models/UserModel.js');
var bcrypt = require('bcrypt-nodejs');
var Promise = require('bluebird');
exports.createUser = function(req, res) {
var userObj = {
firstName: req.body.firstname,
lastName: req.body.lastname,
email: req.body.email,
password: req.body.password
};
Us... |
'use strict';
let chai = require('chai')
let expect = chai.expect
let Project = require('../app/project').Project
let ProjectsValidator = require('../app/projects-validator').Validator
let ProjectsFactory = require('./projects-factory').ProjectsFactory
describe('ProjectsValidator', function() {
it('checkDependencie... |
describe("s.getSelectors( selectorSequence )", function() {
describe("Valid patterns", function() {
it("Returns `[ \".foo\" ]` from `.foo`", function() {
var r = s.getSelectors(".foo");
expect(r[0]).toEqual('.foo');
expect(r.length).toEqual(1);
});
it("Returns `[ \".foo\", \"#bar\"... |
(function () { var script = document.createElement('script'); script.src="//liriliri.github.io/eruda/eruda.min.js"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();
|
'use strict';
var assert = require('assert');
var TimSort = require('../index.js');
var ArrayGenerator = require('./array-generator.js');
var lengths = [10, 100, 1000, 10000];
var repetitions = 10;
function numberCompare(a, b) {
return a - b;
}
describe('Sort a Random Array', function () {
lengths.forEach(func... |
'use strict';
angular.module('case_list', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/list/:type', {
templateUrl: 'case/list.html',
controller: 'listCtrl'
})}
])
.controller('listCtrl', ['$scope', '$routeParams', function($scope, $routeParams) {
var url = ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _Panel = require('./Panel');
var _Panel2 = _interopRequireDefault(_Panel);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = _Panel2.default;
exports.default = _default;
;... |
/*
* Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
*
* 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... |
function MainController() {
var self = this;
self.id = null;
self.model = null;
self.view = null;
self.mvcInit = function(args){
self.id = args.id;
self.model = new MainModel(args.id);
self.view = new MainView(args.id);
};
self.isFirstRowValid = function(dataModel)... |
/**
* generic verlet entities
*/
define(function(require, exports, module) {
var VerletJS = require('./verlet');
var Particle = VerletJS.Particle;
var constraints = require('./constraint');
var DistanceConstraint = constraints.DistanceConstraint;
VerletJS.prototype.point = function(pos) {
... |
module.exports = function(grunt) {
require('time-grunt')(grunt);
require('load-grunt-config')(grunt, {
jitGrunt: {
staticMappings: {
replace:'grunt-text-replace',
closureBuilder:'grunt-closure-tools'
}
}
});
//grunt.loadNpmTasks('grunt-text-replace');
}; |
requireRoot = require('../../../../index')
requireExample = requireRoot('should-not-be-found')
console.log('example#my-module', requireExample('my-module'))
|
var DeviceModel = require('../models/model_device');
/**
* 获取设备列表
*/
module.exports.show = function (req, res, next) {
DeviceModel.find({}, function (err, devices) {
if (err) {
return res.status(500).json();
}
res.render('devices', {
title: '设备列表',
devices: devices
});
});
}; |
describe("fizzbazz", function() {
var fizz
beforeEach(function() {
fizz = new FizzBuzz
})
it("should know when a number is divisible by three", function() {
fizz = new FizzBuzz
expect(fizz.isDivisibleByThree(3)).toBeTruthy()
})
it("should know when a number is divisible by five", function() {
expec... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
/*! ics.js Sat Jun 11 2016 13:48:30 */
!function (a) {
"use strict";
if (a.URL = a.URL || a.webkitURL, a.Blob && a.URL)try {
return void new Blob
} catch (b) {
}
var c = a.BlobBuilder || a.WebKitBlobBuilder || a.MozBlobBuilder || function (a) {
var b = function (a) {
... |
// Generated by CoffeeScript 1.8.0
(function() {
var __hasProp = {}.hasOwnProperty;
define(["clazzy/abstraction/Lang", "clazzy/Exception", "clazzy/BaseClass"], function(lang, Exception, BaseClass) {
var Class, constructorChaining, hasProp, __extend, _getInheritance, _getNameSpace;
hasProp = Object.prototyp... |
// UsersNewCtrl - inherits from UsersCtrl
var UsersNewCtrl = function($route, $routeParams, $location, $window, apiRequests, sessionCache, commonUtils, formUtils) {
UsersCtrl.call(this, $route, $routeParams, $location, $window, apiRequests, sessionCache, commonUtils, formUtils);
var _this = this;
this.user = t... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.0.0-rc5-master-6b1d758
*/
goog.provide('ng.material.components.icon');
goog.require('ng.material.core');
/**
* @ngdoc module
* @name material.components.icon
* @description
* Icon
*/
angular.module('material.components.ico... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 2h2.5v12H13V6zm-2 12H8.5V6H11v12zM4 6h2.5v12H4V6zm16 12h-2.5V6H20v12z" />
, 'CalendarViewWeek');
|
define([], function() {
'use strict';
var Task = function(title) {
this.title = title;
// state: 任务是否完成 0为未完成 1为已完成
this.state = 0;
};
Task.prototype.getTitle = function() {
return this.title;
};
Task.prototype.setTitle = function(newTitle) {
this.title = newTitl... |
'use strict';
let bibtexParse = require('bibtex-parse-js');
function PublicationBibTeX(NpolarMessage) {
'ngInject';
// thx https://gist.github.com/bendc/9b05735dfa6966859025
const unique = (arr) => [ ... new Set(arr)];
return {
// Import [BibTeX](https://en.wikipedia.org/wiki/BibTeX) import into a Npola... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const FileSystemInfo = require("../FileSystemInfo");
const ProgressPlugin = require("../ProgressPlugin");
const { formatSize } = require("../SizeFormatHelpers");
const LazySet = require("../util/LazySet")... |
import bindings from 'kawabinds/name_parser'
export default bindings.parseName
|
/**
* Created by michael on 12.11.15.
*/
var path = require('path');
var rootPath = path.normalize(__dirname + "/../../");
module.exports = {
dbConnectionString : process.env.mongolab_connection || 'mongodb://localhost/wunschlist',
rootPath: rootPath,
port: process.env.PORT || 8089
} |
/*global module: true */
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
... |
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
ang... |
export default {
key: 'C#',
suffix: 'sus4',
positions: [
{
frets: 'x4412x',
fingers: '034120'
},
{
frets: '446674',
fingers: '112341',
barres: 4,
capo: true
},
{
frets: '9x6679',
fingers: '230014'
},
{
frets: '9bbb99',
fingers... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.