code stringlengths 2 1.05M |
|---|
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
//Schema Definition
var shipSchema = new Schema({
_id: Number,
name: String,
description: String,
shipType: Number,
imgUrlLrg: String,
imgUrlSml: String,
renderUrl: String
});
//Expose (export) the model
modul... |
define([
'jquery',
'underscore',
'backbone',
'marionette',
'bootstrap',
'myapp',
'vent',
'views/modals/ModalDemoRegion',
'text!templates/modals/modalDemoTemplate.html'
], function($, _, Backbone, Marionette, bootstrap, app, vent, ModalDemoRegion, modalDemoTemplate){
var ModalDemoView = Marionette.I... |
/*!
* Chart.js
* http://chartjs.org/
* Version: 1.0.2
*
* Copyright 2015 Nick Downie
* Released under the MIT license
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
*/
(function(){
"use strict";
//Declare root variable - window in the browser, global on the server
var root = this,
previous... |
'use strict';
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/woofli',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css'... |
"use strict";
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
const LiveReloadPlugin = require('webpack-livereload-plugin');
const webpack = require('webpack');
const helpers = require('./helpers');
module.exports = {
entry: {
mai... |
import fetch from 'isomorphic-fetch';
import checkStatus from './../utils/checkStatus';
import { gotoRoute } from './router-actions';
export const FETCH_ALL_CITIES_REQUEST = 'FETCH_ALL_CITIES_REQUEST';
export const FETCH_ALL_CITIES_SUCCESS = 'FETCH_ALL_CITIES_SUCCESS';
export const FETCH_ALL_CITIES_FAILURE = 'FETCH_AL... |
/*jshint node: true*/
'use strict';
var harvest = require('./../../../services/harvest')('default'),
notifier = require('./../../../services/notifier'),
_ = require('lodash'),
logger = require('./../../../services/logger.js')('de... |
var _ = require('lodash');
var Bus = require('./PubSub');
var setNested = require('./lib/set-nested');
class VueModel {
constructor() {
this.bus = Bus();
this.registry = {};
}
register(name, definition) {
definition = _.toPlainObject(definition);
// Set the name of the mod... |
/*
Copyright 2013, KISSY UI Library v1.40dev
MIT Licensed
build time: Apr 17 00:23
*/
KISSY.add("tabs/bar",function(e,d){var b=d.extend({createDom:function(){this.get("el").attr("role","tablist")},handleKeyEventInternal:function(c){var a=this.get("selectedTab"),c=this.getNextItemByKeyEventInternal(c,a);if(e.isBoolean(c... |
define(["bpmn/util/JSClass"], function(jsclass){
var topic = {
publish: function(eventPath, message) {
}
};
return new jsclass.Class(topic);
}); |
import { declare } from "@babel/helper-plugin-utils";
import presetStage2 from "@babel/preset-stage-2";
import transformExportDefaultFrom from "@babel/plugin-proposal-export-default-from";
import transformLogicalAssignmentOperators from "@babel/plugin-proposal-logical-assignment-operators";
import transformOptionalCha... |
import notifier from "node-notifier";
import postal from "postal";
import monitorCamera from "./util/camera-monitor";
export default function( menubar ) {
global.postal = postal;
global.appDataPath = menubar.app.getPath( "appData" );
function openDevTools() {
menubar.setOption( "alwaysOnTop", true... |
// Copyright 2012 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
//
// Unl... |
[["DF62544A85FC44A9869BF267C5D2F6E3","securenotes.SecureNote","TestSecureNote","",1473215248,"",0,"N"],["6794F08130D84D5FB3CACC9FA725DD4D","webforms.WebForm","TestLogin","http:\/\/mysite.xyz",1473215217,"",0,"N"],["8D6CD8BA102F4586B790649EC5251DFB","wallet.financial.CreditCard","TestCreditCard","",1473222181,"",0,"N"],... |
const subscribe = require('../../hooks/subscribe');
const geoadd = require('../../hooks/geoadd');
module.exports = {
before: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [],
find: [],
get: [],
create: [ geoadd(), subscri... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdDashboard(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M6 26h16V6H6v20zm0 16h16V30H6v12zm20 0h16V22H26v20zm0-36v12h16V6H26z" />
</IconBase>
);
}
export default MdDashboard;
|
{
const exports = runtime.requireMock(
__filename,
"./test_root/RegularModule.js"
);
expect(exports.getModuleStateValue._isMockFunction).toBe(true);
}
|
#!/usr/bin/env node
/*jslint node: true */
/*global module, require*/
'use strict';
const Koa = require('koa');
const route = require('koa-route');
const api = require('./api')
const app = new Koa();
app.use(route.get('/kick/:it', api.kick));
app.listen(3000);
|
/**
* @file script.js
* @version 1.0
* @date 2017-04-30
* @author VO, Nhu-Hoai Robert <nhuhoai.vo@franicflow.ch>
* @copyright FRANIC Flow Sàrl
* @brief Main scripts
*/
//
// Font variables
//
/// Fonts list
var font_families = ["monospace", "LCDDot TR", "DISPLAY FREE TFB", "Simp... |
version https://git-lfs.github.com/spec/v1
oid sha256:04624391e80f44018f37fdd9d9ba3eea4ba797002a507338098dd31920107119
size 82808
|
samqode.main.ready(function (SAMPLE, $) {
SAMPLE.on("myBoxClicked", function (eventArg) {
console.log("event fired ...");
console.log(eventArg);
});
}); |
import gql from 'graphql-tag';
import { c, t } from 'ttag';
import { useQuery } from '@apollo/react-hooks';
import { makeStyles } from '@material-ui/core/styles';
import { useRouter } from 'next/router';
import { ListPageCards, ArticleCard } from 'components/ListPageDisplays';
import { LoadMore } from 'components/List... |
import { StudyImportStatus } from '../../both/collections';
var fs = Npm.require('fs');
var fiber = Npm.require('fibers');
WebApp.connectHandlers.use('/uploadFilesToImport', function(req, res) {
if (!req.headers.filename) {
// Response: BAD REQUEST (400)
res.statusCode = 400;
res.end();
... |
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
var map;
function initialize() {
directionsDisplay = new google.maps.DirectionsRenderer();
var business = new google.maps.LatLng(43.4857867,-80.5407032);
var mapOptions = {
zoom:9,
center: business
}
... |
$_QE.prototype.FloatingElementColor = function() {};
Object.assign(
$_QE.prototype.FloatingElementColor.prototype,
$_QE.prototype.FloatingElement.prototype,
$_QE.prototype.FeatureColor.prototype,
{
_parse_arguments_color: function(args) {
if (args[ARG_COLOR_FOREGROUND] != null) {
... |
var OrdinalScale = require('../scale/Ordinal');
var IntervalScale = require('../scale/Interval');
require('../scale/Time');
require('../scale/Log');
var Scale = require('../scale/Scale');
var numberUtil = require('../util/number');
var zrUtil = require('zrender/lib/core/util');
var te... |
'use strict';
/* jasmine specs for controllers go here */
describe('controllers', function(){
beforeEach(module('lolApp.controllers'));
it('should ....', inject(function($controller) {
//spec body
var myCtrl1 = $controller('MyCtrl1', { $scope: {} });
expect(myCtrl1).toBeDefined();
}));
it('shou... |
const path = require('path');
const test = require('ava');
const sinon = require('sinon');
const metalsmithConcat = require('.');
function filesFixture() {
return {
'first/file': {contents: Buffer.from('lorem')},
'second/file': {contents: Buffer.from(' ')},
'third/file': {contents: Buffer.from('ipsum')}
};
}
... |
angular.module('tf-client-services')
.factory('invitationService', function($q, dolittle, resourceService) {
function createInvitation(attrs) {
return resourceService.post('/invitations', dolittle.to.snake(attrs))
.then(function (response) {
return response.data;
}, function (response) {
... |
// JQuery Console 1.0
// Sun Feb 21 20:28:47 GMT 2010
//
// Copyright 2010 Chris Done, Simon David Pratt. 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 ... |
import { h, render, Component } from 'preact/preact';
import ViewBar from 'com/view-bar/bar';
//import ViewTimeline from 'com/view-timeline/timeline';
//import ViewSingle from 'com/view-single/single';
//import CoreData from '../core-data/data';
window.LUDUMDARE_ROOT = '/e/ludum-dare';
cla... |
import {
prepareClassName,
isValidEntity
} from './utils';
export function blockProperty(bemNaming, chai, entityHook) {
const { assert } = chai;
return function() {
const entity = entityHook(this._obj);
// check input
assert(
isValidEntity(entity),
`${e... |
Meteor.methods({
'livechat:registerGuest': function({ token, name, email, department, custid, leadid, country, mobilenumber, invflag } = {}) {
var stampedToken = Accounts._generateStampedLoginToken();
var hashStampedToken = Accounts._hashStampedToken(stampedToken);
var username = "";
... |
module.exports = {
assertHasSingularEntry (po, singular) {
const entry = po.translations[''][singular]
expect(entry).toEqual({
msgid: singular,
msgstr: [''],
})
},
assertHasSingularContextEntry (po, singular, context) {
expect(po.translations[context]).not.toBeUndefined()
const e... |
import ActionType from '../constants/OrderConstants';
import Dispatcher from '../dispatcher';
import {createStore} from './BaseStore';
const order = {};
const OrderStore = createStore({
getAll(){
return order;
},
get(id) {
return order[id];
}
});
OrderStore.dispatchToken = Dispatch... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ retu... |
"use scrict";
var app = angular.module('conscienciaApp', ['ui.bootstrap', 'ngRoute']);
app.value('INSTA_PUBLIC_KEY', 'b3772cf0fbf34a85a8bbc283e6588b32');
const APP_PAGE = 'html/pages/';
const APP_TPL = 'html/tpls/';
app.config(function($routeProvider) {
$routeProvider.
when('/', {controller: 'HomeCtrl', template... |
/* eslint-disable no-console */
/**
* Given the dist tag fetch the corresponding
* version and make sure this version is used throughout the repository.
*
* If you work on this file:
* WARNING: This script can only use built-in modules since it has to run before
* `yarn install`
*/
const childProcess = require('... |
var Person = {
init: function (firstName, lastName, age) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
},
introduce: function () {
var introducement = "First name: " + this.firstName + "<br />";
introducement += "Last name: " + this.lastName ... |
const debug = require("debug")("jobs-bot:warn");
const config = require("config");
const bot = require("../bot");
const { isChatAdmin, isKeyword, isReply } = require("../validators");
const keywords = new Set(["формат"]);
const reasonToWarn = {
тег: "нужен хэштэг #вакансия",
адрес: "адрес или хотя бы город",
фо... |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { injectIntl } from 'react-intl';
import { Icon } from 'antd';
import './Follow.less';
export class FollowPure extends React.Component {
static propTypes = {
intl: PropTypes.shape().isRequired,
isFollow... |
/*!
* word-wrap <https://github.com/jonschlinkert/word-wrap>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
module.exports = function(str, options) {
options = options || {};
if (str == null) {
return str;
}
var width = options.width || 50;
var indent = (typeof op... |
import { expect } from 'chai'
import { before, describe, test, after } from 'mocha'
import { initClient, createTestEnvironment, createTestSpace, getTestUser } from '../helpers'
describe('Task Api', () => {
let space
let environment
let entry
let assignee
const taskBody = 'JS SDK Task Integration Test'
bef... |
var map;
var lat=[];
var lng = [];
var locations;
var position;
var icon;
var json_data=[];
// Create a new blank array for all the listing markers.
var markers = [];
function displayMaps(locations,icon){
for (var i = 0; i < locations.length; i++) {
// Get the position from the location array.
po... |
var mongoose = require('mongoose');
var Tweet = mongoose.model('Tweet');
module.exports = function(stream, io) {
stream.on('data', function(data) {
if (!data.user) { return; }
var tweet = {
twid: data['id'],
active: false,
author: data['user']['name'],
... |
'use strict';
var $routeProviderReference;
var myapp = angular.module('myapp', ['ngRoute']);
myapp.config(['$routeProvider', function($routeProvider) {
$routeProviderReference = $routeProvider;
}]);
myapp.run(['$rootScope', '$http', '$route', function($rootScope, $http, $route) {
$http.get('http://localhost... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('../../../../controllers/errors.server.controller'),
mongoose = require('mongoose'),
passport = require('passport');
/**
* Update user details
*/
exports.update = function(req, res) {
// // Init Variables
// var us... |
import React from 'react';
const VideoDetail = ({video}) => {
if (!video) {
return <div>Loading...</div>;
}
const url = `https://youtube.com/embed/${video.id.videoId}`
return (
<div className='video-detail col-md-8'>
<div className='embed-responsive embed-responsive-16by9'>
<iframe
... |
import React from 'react';
function RadioButton(props) {
return (
<label key={props.label} className='radio flex'>
<input
checked={props.checked}
type='radio'
value={props.value}
onChange={props.onChange}
/>
<span className={[(props.checked ? 'checked' : ''), 'ra... |
import { configure, setAddon, addDecorator } from '@kadira/storybook';
import { disable } from 'react-komposer';
disable();
function loadStories() {
require('../client/modules/users/components/.stories/index.js');
// require as many as stories you need.
require('../client/modules/core/components/.stories/index.... |
Utils.addMethodToPromise = function (name, fn) {
check(name, String)
Promise[name] = fn
Promise.prototype[name] = function () {
var args = arguments
return this.then(function(previous){
return fn.apply(previous, args)
})
}
}
|
import Promise from 'bluebird';
import fs from 'fs';
import log from 'color-logger';
import Npm from './Npm';
import Event from './Event';
const fileSystem = Promise.promisifyAll(fs);
/**
* This class is usually the main part of the application.
*/
export default class PluginManager {
/**
* Create a new instan... |
'use strict';
module.exports = {
port: 443,
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/dj-tookit',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/angu... |
define([
"app",
"backbone-plugins",
"lib/channels/channel"
], function(Komanda, Backbone, channel) {
var channels = Backbone.Collection.extend({
model: channel,
// localStorage: new Backbone.LocalStorage('komanda.channels'),
initialize: function() {},
swapChannels: function (firstChannelInde... |
import {
NativeModules,
NativeAppEventEmitter,
Platform
} from 'react-native';
const WS = NativeModules.WS;
export default class Rest {
postMultiPartWithProgress(url, headers, postData, imageKey, imageName, imageData, progressCb, cb) {
// eslint-disable-next-line prefer-const
let obj = {
url,
... |
// add public methods to logEnhancerObj
this.enhanceLogger = enhanceLogger;
this.exposeSafeLog = exposeSafeLog; |
TestSuite.modules.push(function () {
QUnit.module('overflow');
var inst = this;
var container = this.fixture;
var element = this.element;
QUnit.test('Should return data on how how much element overflows container from each side.', function (assert) {
assert.expect(4);
inst.setStyles(c... |
import React, {Component} from 'react';
export default class Rightbar extends Component {
render() {
return (
<div>
<aside className="control-sidebar control-sidebar-dark">
<ul className="nav nav-tabs nav-justified control-sidebar-tabs">
<li className="active"><a href="... |
exports['test1'] = function(test) {
test.expect(2);
test.equal(1, 1);
test.done();
};
|
(function(h){var k=/^[a-zA-Z0-9]*\[([a-zA-Z0-9]*)\]$/,l=/^([0-9])*$/;h.register("JsMethod","urlQueryParse",function(c){var b={},e,d,a,g,f;c=c||this.document.location.search.substr(1);c=c.split("&");for(e=0;e<c.length;e++)d=decodeURIComponent(c[e]).split("="),2===d.length&&(a=d[0],g=d[1],(f=a.match(k))?(a=a.split("[")[0... |
'use strict';
const unirest = require('unirest');
const validate = require('validate.js');
const _ = require('lodash');
const Common = require('./common');
const DEFAULT_CURRENCY = 'KES';
function Airtime(options) {
this.options = options;
}
Airtime.prototype.send = function (params) {
const _self ... |
(function () {
'use strict';
var headerDirective = function headerDirective() {
return {
restrict: 'A',
scope: false,
templateUrl: 'common/header-directive.html'
};
};
angular
.module('showcaseSystem.directives')
.directive('showcase... |
/*
The MIT License (MIT)
Copyright (c) 2013 Bryan Hughes <bryan@theoreticalideations.com> (http://theoreticalideations.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, in... |
import React, { Component } from 'react'
import { Card, CardTitle, CardText } from 'material-ui/Card'
import Players from './players'
class Stuff extends Component {
render () {
return (
<div style={{margin: '0 25%'}}>
<Card style={{marginTop: '25px', cursor: 'pointer'}} onClick={() => window.loca... |
require('babel/polyfill');
const environment = {
development: {
isProduction: false
},
production: {
isProduction: true
}
}[process.env.NODE_ENV || 'development'];
module.exports = Object.assign({
host: process.env.HOST || 'localhost',
port: process.env.PORT,
apiHost: process.env.APIHOST || 'loc... |
// Load the required packages
var Magma = require('../models/magma');
// Create endpoint /api/magmas for POSTS
exports.postMagmas = function(req, res){
// Create a new instance of the Magma model
var magma = new Magma();
// Set the magma properties that came from the POST data
magma.title = req.body.title;
magm... |
[["ZEN",1],["KIN",0.6461538461538462],["LEAS",0],["MOUR",1],["SOF",0],["ABI",0],["FLOB",0],["CFEB",0],["COFP2",0],["COFB",0],["SOLV",1],["BELR",0],["MACK",1],["LUXA",0.03125],["FOY",0],["WEHB",0.12558872793380943],["RTL",0],["ACKB",0],["DIEG",1],["RES",0.977560913381809],["SOLB",1]] |
var util = require('util');
var Function = require('./function');
var Avg = function(expr, alias) {
Function.call(this, expr, alias);
this.class_name = 'Avg';
};
util.inherits(Avg, Function);
module.exports = Avg;
|
import { SET_UI_PROP, defaultState } from './constants';
export default (state = defaultState, action) => {
switch (action.type) {
case SET_UI_PROP:
return { ...state, ...action.payload };
default:
return state;
}
};
|
'use strict';
/* global bootstrapDiagram, inject */
var modelingModule = require('../../../../lib/features/modeling'),
replaceModule = require('../../../../lib/features/replace');
describe('features/Replace', function() {
beforeEach(bootstrapDiagram({ modules: [ modelingModule, replaceModule ] }));
var ... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
ext... |
'use strict';
let Promise = require('bluebird')
let fs = require('fs')
let co = require('co')
let path = require('path')
fs = Promise.promisifyAll(fs)
const IS_DIR = 'DIR';
const IS_FILE = 'FILE';
/**
* @description Do the traversal of the source directory structure
* @param {string} targetPath
* @param {object... |
require('babel-register');
const test = require('tape');
const makeStatusActions = require('../lib/builders/makeStatusActions').default;
const { defaultCallOpts } = require('../lib/middleware');
test('makeStatusActions', t => {
t.plan(9);
const plainActions = { 400: 'SOME_ACTION' };
const plai... |
import React, { Component } from 'react';
import _ from 'lodash';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search'
import SearchBar from './components/search_bar'
import VideoList from './components/video_list'
import VideoDetail from './components/video_detail'
const API_KEY = 'AIzaSyBdrFOij... |
const db = require("../models");
module.exports = function(app, passport) {
app.post('/room/book', passport.authenticate('local-signup',
{
successRedirect: '/guest',
failureRedirect: '/'
}
));
app.get('/guest', isLoggedIn, function(req, res) {
db.Guest.findAll({
where: {
... |
var assert = require("assert");
var sourceMap = require("source-map");
var printComments = require("./comments").printComments;
var linesModule = require("./lines");
var fromString = linesModule.fromString;
var concat = linesModule.concat;
var normalizeOptions = require("./options").normalize;
var getReprinter = requir... |
import React from 'react';
import {Link} from 'react-router';
import NewsComments from './NewsComments';
export default class News extends React.Component {
static defaultProps = {
comments: []
}
render() {
let {single, id, title, description, comments, author, date, rating, image, rate, unrate} = this.props... |
'use strict';
const EXPRESS = require('express');
const bodyParser = require('body-parser');
const PG = require('pg');
const FS = require('fs');
const PORT = process.env.PORT || 3000;
const conString = `${process.env.DATABASE_URL}`;
const client = new PG.Client(conString);
const app = EXPRESS();
app.use(bodyParser.js... |
/*
* grunt-phantomas
* https://github.com/stefanjudis/grunt-phantomas
*
* Copyright (c) 2013 stefan judis
* Licensed under the MIT license.
*/
'use strict';
var Promise = require( 'bluebird' );
var fs = Promise.promisifyAll( require( 'node-fs' ) );
var path = Promise.promisifyAll( require( 'path' ... |
version https://git-lfs.github.com/spec/v1
oid sha256:cdb71be7dca0a2bc583d6a9fcb1e776519d597a9fe39a98fcf0350a9722ac5d2
size 5498
|
import React from "react";
import Helmet from "react-helmet";
import { StaticQuery, graphql } from "gatsby";
import Footer from "../Footer";
import SideBar from "../SideBar";
import "purecss/build/pure.css";
import "purecss/build/grids-responsive.css";
import "./index.scss";
import "./common.scss";
export default ({ c... |
/**
* Copyright 2012 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 required by applic... |
angular.module( 'jsb', [
'templates-app',
'templates-common',
'jsb.home',
'jsb.desk',
'jsb.toolbar',
'jsb.navbar',
'ngRoute'
])
.config(['$routeProvider',
function($routeProvider) {
$routeProvider
.when('/home', {
templateUrl: 'home/home.tpl.html',
controller: 'homeController'... |
// depends on jquery
/**
Returns the value of the specified query string parameter from the URL
*/
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (results==null){
return null;
}
else{
return results[1] || 0;
}
} |
import markdownRenderer from './renderers/markdown/renderer';
import markdownSlidesRenderer from './renderers/markdown-slides/renderer';
import codeRenderer from './renderers/code/renderer';
import mediaRenderer from './renderers/media/renderer';
let renderer = null;
export default {
bind(path, target) {
const e... |
'use strict';
describe('Component: Grid', () => {
let scope, compile, templateCache, template, element, tubularColumn, $httpBackend;
const serverUrl = 'api/data';
beforeEach(module('tubular.tests'));
beforeEach(module('tubular'));
beforeEach(inject(function(_$compile_, _$rootScope_, _$templateCache_, _$... |
window.config = {
prefix: "http://api.tavern.name/tavern"
};
Date.prototype.Format = function (fmt) { //author: meizz
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.g... |
import nock from 'nock';
import Coinbase from './coinbase';
beforeAll(() => nock.disableNetConnect());
afterAll(() => nock.enableNetConnect());
describe('Coinbase', () => {
describe('getExchangeRates()', () => {
beforeEach(() => {
nock('https://api.coinbase.com:443').get('/v2/prices/BTC-EUR/buy').reply(20... |
var Sequelize=require('sequelize')
var dbConfig=require('../../connection/dbConfig.js')
var sequelize = new Sequelize(dbConfig.dbName, dbConfig.user, dbConfig.password, {
host: dbConfig.host,
dialect: 'mysql',
pool: dbConfig.pool,
});
var project_exp = sequelize.define('project_exp', {
id:{
type:Sequelize.... |
/**
* @memberof GL
* @class A WebGL sphere.
* @name Sphere
* @param {number} x X coordinate.
* @param {number} y Y coordinate.
* @param {number} z Z coordinate.
* @param {number} latitudeBands Latitude bands.
* @param {number} longitudeBands Longitude bands.
* @param {number} radius The sphere radius.
* @prop... |
(function($) {
$.fn.goTo = function() {
$('.content').animate({
scrollTop: $(this).offset().top + 'px'
}, 'fast');
return this; // for chaining...
}
})(jQuery); |
var BetaCoin = require('../main.js');
var betacoin = new BetaCoin();
betacoin.createCoin({title: "Samantha Beta"}, function(err, coin) {
});
console.log("Example Started"); |
import Mixin from '@ember/object/mixin';
import RSVP from 'rsvp';
import Route from '@ember/routing/route';
import { describe, beforeEach, it } from 'mocha';
import { expect } from 'chai';
import sinon from 'sinon';
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
import Int... |
/**
* @author jahting / http://www.ameco.tv/
*/
function test_Triangulator() {
var testData = new PolygonTestdata();
function test_triangulate_polygon_details( inDataName, inExpectedMonoChains, inDebug ) {
var example_data = testData.get_polygon_with_holes( inDataName );
var expectedTriangList = testData.get... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Mickael Jeanroy
*
* 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 ... |
/*
backgrid
http://github.com/wyuenho/backgrid
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT license.
*/
/**
HeaderCell is a special cell class that renders a column header cell. If the
column is sortable, a sorter is also rendered and will trigger a table
refresh afte... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{370:function(i,s,e){i.exports=e.p+"assets/img/interactive-choices.423a6843.gif"}}]); |
/*
* MEAN MVC Learning Project
* Released under MIT License
*/
var users = require('../../app/controllers/users.server.controller'),
todos = require('../../app/controllers/todos.server.controller');
module.exports = function (app) {
app.route('/api/todos')
.get(todos.list)
.pos... |
import AppDispatcher from '../../dispatcher/AppDispatcher';
import { EventEmitter } from 'events';
import SampleConstants from '../../constants/core/constant';
import assign from 'object-assign';
const CHANGE_EVENT = 'change';
let counter = 0;
const SampleStore = assign({}, EventEmitter.prototype, {
saveCount: fun... |
import dom from './parser/browser/dom.js';
import parser from './parser';
import HtmlEmail from './engines/html-email';
export const toEmail = (mmm) => {
const template = parser(mmm, dom, new HtmlEmail());
const html = template.getHtml();
return {
html,
// use something like html-to-text
text: '',... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.