code stringlengths 2 1.05M |
|---|
/**
* Created by hbzhang on 4/2/15.
*/
angular.module('mean.front').controller('FrameSecondMainContentController', ['$scope','Global','Restangular','Program','$location',
function($scope,Global,Restangular,Program,$location) {
$scope.global = Global;
$scope.package = {
name: 'front'
... |
var dbclient = require('mongodb').MongoClient;
var url = 'mongodb://localhost:27017/quadavore';
module.exports = function(cb)
{
dbclient.connect(url, function(err, db)
{
console.log('Connected to MongoDB');
cb(db);
});
};
|
/** Net.JS 0.0.1 */
/*!
* Net.JS
* Copyright(c) 2011 Oleg Shparber <trollixx@gmail.com>
* MIT Licensed
*/
/**
* @namespace
*/
var net = this.net = {
/**
* Library version.
*/
version: '0.0.1',
/**
* Applet loading states.
*
* @type {Objects}
* @api private
*/
... |
import Button from './markdown-button';
import layout from '../templates/components/markdown-code';
export default Button.extend({
layout,
precede: '`',
succeed: '`'
});
|
'use strict';
angular.module('flagMatchApp.version', [
'flagMatchApp.version.interpolate-filter',
'flagMatchApp.version.version-directive'
])
.value('version', '0.1');
|
"use strict";
var test = require("tape");
var ellipsize = require("../src/index");
var ELLIPSE = "…";
test("ellipsize simple cases", function (assert) {
var cases = [
{
label: "zero length string",
len: 100,
string: "",
expect: "",
},
{
... |
module.exports = function () {
return {};
};
|
// <details> polyfill
// http://caniuse.com/#feat=details
// FF Support for HTML5's <details> and <summary>
// https://bugzilla.mozilla.org/show_bug.cgi?id=591737
// http://www.sitepoint.com/fixing-the-details-element/
;(function() {
'use strict'
var NATIVE_DETAILS = typeof document.createElement('details').ope... |
// flow-typed signature: e7c03a4ac695e4a014530cf5ab6c79da
// flow-typed version: <<STUB>>/randexp_v^0.4.3/flow_v0.37.0
/**
* This is an autogenerated libdef stub for:
*
* 'randexp'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* co... |
import { callbackURLPrefix } from '../server';
const callbackURL =
process.env.NODE_ENV === 'production'
? `${callbackURLPrefix}/api/oauth2/github/callback`
: 'http://localhost:8000/api/oauth2/github/callback';
const githubApp = {
clientID: '',
clientSecret: '',
callbackURL,
};
export default githubA... |
!function ($) {
$('#tooltip1').tooltip();
$('#tooltip2').tooltip();
}(window.jQuery)
|
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var userSchema = mongoose.Schema({
local: {
email: String,
password: String,
isAdmin: Boolean
}
});
userSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genS... |
import format from 'date-fns/format';
import { createSelector } from 'reselect';
import {
getAccountsCurrencyMap,
getAccountsAsOptions
} from '../../entities/accounts';
import { getBaseCurrency } from '../../settings';
import { defaultKind, TransationKindT } from '../../../entities/Transaction';
const { Expense, I... |
function Project(id, type, name, lastActivity) {
this.id = id;
this.type = type;
this.name = name;
this.lastActivity = lastActivity;
}
// The list of all projects currently in the system.
// (Feel free to imagine this came from a database somewhere on page load.)
var CURRENT_PROJECTS = [
new Projec... |
import { assert, expect } from 'chai';
import Kasmir from '../../src/kasmir';
import config from '../fixtures/config/test.config';
describe('Kasmir - successful test', () => {
let k;
let r;
// Initialize kasmir with some test actions and the
// default config
beforeEach('initialize kasmir instance', (done)... |
var $ = require('../$'),
Utils = require('../utils/utils'),
Droppable = require('./droppable-class');
$.fn.hqyDroppable = function (options) {
var args = arguments;
return this.each(function () {
var $ele = $(this);
var instance = $ele.data('hqyDroppable');
if (Utils.isString(options)){
instance && inst... |
var user = require(__dirname + '/models/user.js');
var bot;
var dummy = {};
function addToClientList(clientList) {
user.findOne({where: {
username: 'bot'
}}).then(function(entity) {
if (entity) {
var zone = entity.sectionX + '_' + entity.sectionY;
clientList[zo... |
'use strict';
var resourceManager = require('./resource-manager');
var debog = require('./debog');
var relLog = debog('relationships');
var queryLog = debog('query');
/**
* @name query-builder
* @module query-builder
* @description
* build and return query object
*
* @param {object} struct - structure
*... |
var container;
var canvas;
var ctx;
var canvas_height = 300; // px
var canvas_width = 1000; // px
var bar_width = 20;
var bar_count = 2;
var bar_spacing = 10; // px
var bars = []; // array
function start_visualizer() {
canvas = document.getElementById("bars");
ctx = canvas.getContext("2d");
set_canvas_si... |
'use strict';
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var config = require('../config');
module.exports = function (gulp) {
gulp.task('test', ['lint'], function (cb) {
gulp.src(['!' + config.paths.cliFile].concat(config.paths.lib))
.pipe(istanbul({
includeUntest... |
/* eslint-disable ember/no-classic-components */
/**
* @module ember-paper
*/
import Component from '@ember/component';
import { tagName, layout } from '@ember-decorators/component';
import template from './template';
/**
* @class PaperContent
* @extends Component
*/
@tagName('')
@layout(template)
class PaperCont... |
/* eslint-env node,mocha */
/* global window */
(function(root) {
"use strict";
//
// Run in either Mocha, Karma or Browser environments
//
if (typeof root === "undefined") {
root = {};
}
var saltthepass = root.SaltThePass ? root.SaltThePass : require("../src/saltthepass");
var... |
import Vue from 'vue'
import * as types from './mutation-types'
export const getUserInfo = ({ state, commit }) => {
Vue.resource(state.userInfoUrl).get()
.then(response => {
commit(types.GET_USER_INFO_SUCCESS, response.data)
})
}
|
goog.provide('dc.Application');
goog.require('dc.BaseApplication');
goog.require('dc.services.Settings');
goog.require('zb.console');
goog.require('zb.device.Resolution');
/**
* @extends {dc.BaseApplication}
* @constructor
*/
dc.Application = function() {
zb.console.setLevel(zb.console.Level.LOG);
goog.base(thi... |
define(['jquery'], function ($) {define('select2/utils',[], function () {
var Utils = {};
Utils.Extend = function (ChildClass, SuperClass) {
var __hasProp = {}.hasOwnProperty;
function BaseConstructor () {
this.constructor = ChildClass;
}
for (var key in SuperClass) {
if (__hasProp.ca... |
/*!
* Copyright(c) 2014 Jan Blaha
*/
/*globals $data */
var async = require("async"),
express = require('express'),
_ = require("underscore"),
path = require("path"),
odata_server = require('odata-server'),
q = require("q"),
bodyParser = require("body-parser"),
cookieParser = require('c... |
import {TiInfinity as icon} from 'react-icons/ti'
export default {
name: 'recursivePopoverTest',
type: 'document',
title: 'Recursive Popover Test',
icon,
fields: [
{
name: 'title',
title: 'Title',
type: 'string',
},
{
name: 'arrayWithAnonymousObject',
title: 'Array w... |
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
// App files location
const PATHS = {
app: path.resolve(__dirname, '../src/js'),
styles: path.resolve(__dirname, '../src/styles'),
build: path.resolve(__dirname, '../build')
};
const plugins = [
// ... |
/**
* shortsort
* @param {integer} start - pixel to start at
* @param {integer} end - pixel to end at
*/
Jimp.prototype.shortsort = function shortsort(dir, start, end, cb) {
var width = this.bitmap.width,
height = this.bitmap.height,
data = new Uint32Array(this.bitmap.data),
cut, mm;
if (nullOrUndefined(start)... |
import _ from 'underscore'
import moment from 'moment'
import rewire from 'rewire'
import sinon from 'sinon'
const app = require('api/index.coffee')
const { fixtures, fabricate, empty } = require('api/test/helpers/db.coffee')
const resolvers = rewire('../resolvers.js')
describe('resolvers', () => {
let article, arti... |
import Mat23 from 'math/matrix/mat23/Build.js';
import Scale from 'math/transform/2d/components/Scale.js';
import Position from 'math/transform/2d/components/Position.js';
// A Minimal 2D Transform class
// Components: Position and Scale, baked to a Mat23
// Supports: Immediate or Deferred Updates, Interpolation.
... |
import Class from '../mixin/class';
import Media from '../mixin/media';
import {
$,
addClass,
after,
Animation,
clamp,
css,
dimensions,
fastdom,
height as getHeight,
offset as getOffset,
getScrollingElement,
hasClass,
isString,
isVisible,
noop,
offsetPosit... |
var ndarray = require('ndarray');
var show = require('ndarray-show');
var zeros = require('zeros');
var crout = require('../');
var A = ndarray([
2, 1, 1, 3, 2,
1, 2, 2, 1, 1,
1, 2, 9, 1, 5,
3, 1, 1, 7, 1,
2, 1, 5, 1, 8
], [ 5, 5 ]);
var L = zeros([ 5, 5 ]);
var U = zeros([ 5, 5 ]);
crout(A, L, U)... |
'use strict';
// Declare app level module which depends on views, and components
var app =angular.module('myApp', [
'ngRoute',
'myApp.milestones',
'myApp.stage',
'myApp.version'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');... |
import React, { Component } from "react";
export default class Home extends Component
render() {
return (
{this._renderHeader()}
{this._renderBody()}
);
}
_renderHeader() {
return (
<div className=""><div/>
);
}
_renderBody() {
return (
<div className=""><div/>
);
}
... |
if (true) { };
function foo() { };
function foo() {
};
if (true) {
};
function foo() { }; function bar() { };
|
/**
* SignWriting 2010 JavaScript Library v1.9.1
* https://github.com/Slevinski/sw10js
* Copyright (c) 2007-2016, Stephen E Slevinski Jr
* sw10.js is released under the MIT License.
*/
var sw10 = {
key: function(text,style){
var key = text.match(/S[123][0-9a-f]{2}[0-5][0-9a-f]([0-9]{3}x[0-9]{3})?/g);
if (!key... |
var sql = require('mssql');
import * as PORTACTION from "../actions/PORTActionConst.js"
import * as PORTSTATE from "../actions/PORTState.js"
import * as PORTCHK from "../actions/PORTChkConst.js"
import * as CONNECT from "./PORTSQLConst.js"
import * as MISC from "./Misc.js"
var portCheck2Done=false;
var portCheck2Cn... |
const express = require('express');
const router = express.Router();
const pc = require('./pathway-commons-router');
router.use('/api/search', require('./search'));
router.use('/api/pc', pc);
router.use('/api/pathways', require('./pathways'));
router.use('/api/interactions', require('./interactions'));
router.use('/ap... |
var RuleEngine = require('../index');
describe("Rules", function() {
describe(".init()", function() {
it("should empty the existing rule array", function() {
var rules = [{
"condition": function(R) {
R.when(1);
},
"consequence":... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... |
/**
* Created by saf on 1/6/17.
*/
import React, {Component} from 'react';
import {observer} from 'mobx-react';
import {observable, computed} from 'mobx';
import * as Table from 'reactabular-table';
import * as search from 'searchtabular';
import * as resolve from 'table-resolver';
@observer
export default class As... |
/*
* Copyright (C) 2013-2015 Uncharted Software Inc.
*
* Property of Uncharted(TM), formerly Oculus Info Inc.
* http://uncharted.software/
*
* Released under the MIT License.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Tutorial Schema
*/
var TutorialSchema = new Schema({
name: {
type: String,
default: '',
required: 'Please fill Tutorial name',
trim: true
},
created: {
type: Date,
default: Date.now
},
... |
define(['./utilities/cookie'], function(cookie) {
/**
* sails.io.js
*
* This file is completely optional, and merely here for your convenience.
*
* It reduces the amount of browser code necessary to send and receive messages
* to & from Sails by simulating a REST client interface on top of socket.io... |
cc._RFpush({ exports: {} }, '414458STphLF75+aFmYFzfh', 'EffectPreview');
"use strict";
var Editor = parent.Editor;
cc.Class({
"extends": cc.Component,
properties: {
isAllChildrenUser: false,
frag_glsl: {
"default": null,
visible: false
},
vert_glsl_no_mvp: {
"default": null,
visible: false
},... |
define(["module-a"], function(moduleA) {
return {
"name":"main",
"submodule":moduleA,
"project":"foo"
};
}) |
System.config({
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"es7.decorators"
]
},
paths: {
"github:*": "jspm_packages/github/*",
"aurelia-router/*": "dist/*.js",
"npm:*": "jspm_packages/npm/*"
},
map: {
"aurelia-dependency-i... |
/**
* Created by Ron on 26/5/2016.
*/
"use strict";
import ReactNative, {
StyleSheet,
Text,
View,
Dimensions,
TouchableWithoutFeedback,
Image
} from 'react-native';
import React, { Component , PropTypes } from 'react';
import CommonModules,{
ThemeStyle,
dismissKeyboard,
} from '../../utils/CommonModu... |
import {
injectDeps
} from 'react-simple-di';
export default class App {
constructor(context) {
if (!context) {
const message = `Context is required when creating a new app.`;
throw new Error(message);
}
this.context = context;
this.actions = {};
this._routeFns = [];
}
_bindCo... |
export type Path = {
parent: Path,
node: ASTNode,
replace: Function,
remove: Function,
}
|
'use strict';
var mongoose = require('mongoose');
/**
* Schema defining the 'ticket' model.
*/
var TicketSchema = module.exports = new mongoose.Schema({
/**
* Describes on which board does this ticket belong.
*
* TODO Should we actually group the ticket's under the 'board' model as
* references, or k... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('../errors.server.controller'),
mongoose = require('mongoose'),
passport = require('passport'),
User = mongoose.model('User'),
Client = mongoose.model('Client');
/**
* Signup
*/
exports.signup = function(req, res) ... |
/*
* Copyright (C) 2009, 2010 Google Inc. All rights reserved.
* Copyright (C) 2009 Joseph Pecoraro
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the abov... |
import RSVP from 'rsvp';
import XFlowHarness from './xflow-harness';
import DocRegistry from './helper/docregistry';
class XFlowRunner {
constructor(opts) {
this.name = 'XFlowRunner';
this.xfmap = new DocRegistry();
this.factory = opts.factory;
this.tickLimit = opts.tickLimit || 4096;
}
_makeH... |
import toUniqueStringsArray from "../toUniqueStringsArray";
describe("toUniqueStringsArray", () => {
it("sane defaults", () => {
expect(toUniqueStringsArray()).toEqual([]);
expect(toUniqueStringsArray(null)).toEqual([]);
expect(toUniqueStringsArray({})).toEqual([]);
expect(toUniqueStringsArray("")).t... |
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var clc = require('cli-color');
var terminalWallet = require('./');
var cli = meow({
help: [
'Usage',
' wallet debit <value> <purchase details> [-c <category>][-d <date in yyyy-mm-dd format>]',
' wallet credit <value> <source details> [-c <c... |
/* eslint-disable no-sync */
const readPackages = require('./readPackages')
const writePkg = require('write-pkg')
module.exports = function transformPkgs(mapFn) {
readPackages().forEach(pkg => {
const transformedManifest = mapFn(pkg.manifest)
writePkg(pkg.path, transformedManifest)
})
}
|
// Temporary code to test sending files to the server
import fs from "fs";
import net from "net";
import path from "path";
const { SERVER_PORT, SERVER_ADDRESS } = process.env;
const SERVER_OPTIONS = { port: SERVER_PORT, address: SERVER_ADDRESS };
export function send(name) {
console.log("About to send", name);
... |
// All code points in the `So` category as per Unicode v9.0.0:
[
0xA6,
0xA9,
0xAE,
0xB0,
0x482,
0x58D,
0x58E,
0x60E,
0x60F,
0x6DE,
0x6E9,
0x6FD,
0x6FE,
0x7F6,
0x9FA,
0xB70,
0xBF3,
0xBF4,
0xBF5,
0xBF6,
0xBF7,
0xBF8,
0xBFA,
0xC7F,
0xD4F,
0xD79,
0xF01,
0xF02,
0xF03,
0xF13,
0xF15,
0xF16,
0x... |
$(document).ready(function() {
/* Done setting the chart up? Time to render it!*/
var data = [
{
values: [],
key: 'Event queue length',
color: '#000000'
},
]
/*These lines are all chart setup. Pick and choose which chart features you want to utilize. */
nv.addGraph(function() {
... |
const chai = require('chai')
const expect = chai.expect
const path = require('path')
const fs = require('fs')
const os = require('os')
const YAML = require('yamljs')
const pkg = require('../package')
describe('grql', () => {
let config, grql, sampleServer
before(() => {
process.env['NODE_ENV'] = 'test'
co... |
export const fourUp = {"viewBox":"0 0 8 8","children":[{"name":"path","attribs":{"d":"M0 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm-6 2v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm-6 2v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm-6 2v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1... |
var express = require('express');
var router = express.Router();
var path = require('path')
router.route('/')
.get(function (req, res) {
res.render('index', {
pageTitle: "Carl Schriever",
pageDescription: "My personal website.",
pageCss: ['main'],
pageScripts... |
import {
Function as FunctionToken,
RightParenthesis
} from '../../tokenizer/index.js';
export const name = 'Function';
export const walkContext = 'function';
export const structure = {
name: String,
children: [[]]
};
// <function-token> <sequence> )
export function parse(readSequence, recognizer) {
... |
define(['app'], function (app) {
app.controller('CalendarController', ['breadcrumb', function(breadcrumb) {
breadcrumb.title = 'Calendar';
breadcrumb.subTitle = 'Control panel';
breadcrumb.list = [
{ name: 'Calendar' }
];
}]);
});
|
//var osString = Components.classes["@mozilla.org/xre/app-info;1"]
// .getService(Components.interfaces.nsIXULRuntime).OS;
//if(true)
pref("extensions.vlc_shortcut.vlc_filepath", "");
pref("extensions.vlc_shortcut.middleclick", 0);
pref("extensions.vlc_shortcut.ctrlmiddleclick", 0);
pref("extensions.v... |
$(document).ready(function(){
$("table.step").click(function(){
if($(this).next().length) {
$(this).toggle();
$(this).next().toggle();
} else {
$(this).toggle();
$("#step1").toggle();
}
});
}); |
import React, { PropTypes } from 'react';
import Actions from '../../actions/lists';
import PageClick from 'react-page-click';
export default class ListForm extends React.Component {
componentDidMount() {
this.refs.name.focus();
}
_handleSubmit(e) {
e.preventDefault();
const { dispatch, channel, li... |
const $ = require('gulp-load-plugins')();
const gulp = require('gulp');
const config = require('../config');
const path = require('path');
gulp.task('pug', () => {
return gulp.src(path.join(config.paths.pug, '*.pug'))
.pipe($.plumber({
errorHandler: $.notify.onError(err => ({
... |
suite('angular-mask', function() {
});
|
var React = require('../../node_modules/react');
var ReactDOM = require('../../node_modules/react-dom');
var PopupComponent = require('./components/popup/popup_component.js.jsx');
ReactDOM.render(
<PopupComponent />,
//<p>Hey</p>,
document.getElementById('popup-content')
); |
const gtmTpl = () => `
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WBQ2PN"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.ge... |
angular.module('markticle').service('StorageService', markticleStorageService);
|
(function(){
'use strict';
/**
* @ngdoc function
* @name 343LandingPageApp.controller:NewjobpostCtrl
* @description
* # NewjobpostCtrl
* Controller of the 343LandingPageApp
*/
angular.module('343LandingPageApp')
.controller('NewjobpostCtrl', ['$scope', '$http', 'authFact', function ($scope, $http, a... |
const group = require('../../src/models/Groups');
const mongojs = require('mongojs');
const mongoose = require('mongoose');
const config = require('../../config');
//create a group
exports.createGroup = function(req, res) {
const db = mongoose.connect(config.database);
var member = req.body.member;
//ad... |
import { filtersToCQL, getISODateTimeString } from '../core/util';
import FiltersModel from '../core/models/FiltersModel';
function getCoverageXML(coverageid, options = {}) {
let subsetX = options.subsetX;
let subsetY = options.subsetY;
if (!coverageid) {
throw new Error('Parameters "coverageid" is mandator... |
{
"Integrations": "Integrações",
"Pricing": "Preços",
"Apps": "Aplicativos",
"Existing user login": "Usuários existentes login",
"login": "login",
"Chat, for GitHub.": "Chat, para GitHub.",
"Get unlimited public rooms and one-to-one chats, free forever. Private team plans start from $2 per user per month. No cre... |
import BlitzLead from '../../models/BlitzLead';
export default function blitzLeadCreate(req) {
var leadObject = req.body;
leadObject.createdate = new Date();
return new Promise((resolve, reject) => {
BlitzLead.findOneAndUpdate({ phone: leadObject.phone }, leadObject, {
upsert: true
}, (err, doc) => ... |
'use strict';
var async = require('async');
var SQLite = require('react-native-sqlite');
var eventsModel = require('festivals-model').model;
var EventResponseBuilder = eventsModel.eventResponse.EventResponseBuilder;
var EventPlaceResponseBuilder = eventsModel.eventPlaceResponse.EventPlaceResponseBuilder;
var EventCateg... |
define([
"backbone",
"react",
"underscore"
], function(
Backbone,
React,
_
) {
var Router = Backbone.Router.extend({
routes: {
"repository/:id": "repository",
"repository/:id/branch/:bid": "repository",
"repository/:id/branch/:bid/:lang": "reposito... |
/**
* Module dependencies.
*/
var utils = require('../utils/utils');
/**
* HLEN <key>
*/
exports.hlen = function(key){
var obj = this.lookup(key);
if (!!obj && 'hash' == obj.type) {
return Object.keys(obj.val).length;
} else {
return -1;
}
};
/**
* HVALS <key>
*/
exports.hvals = function(key){
... |
var React = require("react");
var Reflux = require("reflux");
// Required for cuAPI.handlesFriendlyTarget
var cuAPI = require('../../cu-lib/API.js');
// The FriendlyTarget UI component pulls together the FriendlyTargetStore which
// tracks the "handlesFriendlyTarget": true events and the UnitFrame that
// will render... |
'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]; } } } ... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Helmet } from 'react-helmet';
import PropTypes from 'prop-types';
import Field from '../util/styled/Field';
import Logo from '../svg/Logo';
import NotificationList from '../util/NotificationList';
class Login extends React.Component {
construct... |
'use strict';
var fs = require('fs');
exports.modularize = {
compile: function (test) {
var code = fs.readFileSync('test/tmp/fixture.js', 'utf8');
var expected = fs.readFileSync('test/expected.js', 'utf8');
test.ok(code === expected);
test.done();
}
}; |
'use strict';
// coffeescript's for in loop
var __indexOf = [].indexOf || function(item) {
for (var i = 0, l = this.length; i < l; i++) {
if (i in this && this[i] === item) return i;
}
return -1;
};
angularApp.directive('fieldDirective', function($http, $compile, $sce, $parse) ... |
#!/usr/bin/env node
const program = require('commander')
const download = require('download-git-repo')
const chalk = require('chalk')
const exists = require('fs').existsSync
const path = require('path')
const inquirer = require('inquirer')
const ora = require('ora')
const rm = require('rimraf').sync
const home = requi... |
import Ember from 'ember';
import PressGestureMixinMixin from '../../../mixins/press-gesture-mixin';
import { module, test } from 'qunit';
module('PressGestureMixinMixin');
// Replace this with your real tests.
test('it works', function(assert) {
var PressGestureMixinObject = Ember.Object.extend(PressGestureMixinMi... |
import test from 'ava';
import sinon from 'sinon';
import { create } from '../../../core/index.js';
import { getWindow } from '../../../utils.js';
import {
createVNode as h,
getVNodeFragment,
getVNodeDOM,
attachEventListeners,
isEvent,
detatchEventListeners,
} from '../utils.js';
test('It shoul... |
'use strict';
const _ = require('lodash');
const { has_method } = require('helpers/util');
const EXCLUDE_PROTOTYPE_METHODS = [
'constructor', 'hasOwnProperty', 'isPrototypeOf',
'propertyIsEnumerable', 'toString', 'valueOf',
'toLocaleString', 'log', 'getInstanceMethodNames'
];
/**
* @class
* @classdesc ... |
/**
* @fileOverview An extension to Exhibit adding a view using SIMILE Timeline.
* @author David Huynh
* @author <a href="mailto:ryanlee@zepheira.com">Ryan Lee</a>
* @example Load this file like so:
* <script src="http://host/exhibit/3.0.0/exhibit-api.js"></script>
* <script src="http://host/exhibit/3.0.0/extensi... |
module.exports = require('./src/Search'); |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Boucher, Antoni <bouanto@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 limitat... |
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* ... |
var Promise = require('es6-promise').Promise;
var DelayTask = function(timeMs) {
this.execute = function() {
var promise = new Promise(function(resolve) {
setTimeout(function() {
resolve('Finished sleeping: ' + timeMs + 'ms');
}, timeMs);
});
return... |
module.exports = function (content) {
return content.replace(/_/g,' ');
}
|
(function() {
"use strict";
var module = angular.module("QMCUtilities");
function doSomething($http) {
return $http.get("./hworld/hworld")
.then(function(result) {
return result.data;
});
}
function getVersion($http) {
return $http.get("./ver... |
import { BehaviorSubject } from 'rxjs/BehaviorSubject'
import { combineEpics } from 'redux-observable'
import conformsTo from 'lodash/conformsTo'
import isEmpty from 'lodash/isEmpty'
import isFunction from 'lodash/isFunction'
import isObject from 'lodash/isObject'
import isString from 'lodash/isString'
import invariant... |
export { Gesture } from './Gesture.js';
export { gestureManager } from './gestureManager.js';
export { tap } from './tap.js';
export { threeFingerSwipe } from './threeFingerSwipe.js';
export { itemListTouchSelect } from './itemListTouchSelect.js';
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.