code stringlengths 2 1.05M |
|---|
/**
* @author Arnold Koh <arnold@kohded.com>
* Developed: 3/19/2017
* File: binary-search-tree-test.js
*/
const expect = require('chai').expect;
const BinarySearchTree = require('../../../data-structures/trees/binary-search-tree.js');
describe('BinarySearchTree', () => {
let emptyBST;
let bst;
beforeEach((... |
/*jshint node:true */
if ( typeof module !== 'undefined' && module.exports ) {
module.exports = oo;
} else {
global.OO = oo;
}
|
/**
* @ngdoc filter
* @name join
* @kind function
*
* @description
* join a collection by a provided delimiter (space by default)
*/
angular.module('a8m.join', [])
.filter('join', function () {
'use strict';
return function (input, delimiter) {
if (isUndefined(input) || !isArray(input)) {
... |
// @remove-on-eject-begin
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// @remove-on-eject-end
'use strict';
// Do this as the first thing so that any code reading it knows the righ... |
( function() {
'use strict';
app.controller('SupImplantacoesPorCategoriaCtrl', SupImplantacoesPorCategoriaCtrl);
/** @ngInject */
function SupImplantacoesPorCategoriaCtrl($scope, $rootScope, SuporteImplantacoesService) {
var mes = moment($rootScope.mes);
implantacoesPorCategoria();
... |
var net = require('net');
var _ = require('underscore');
module.exports.createServer = createServer;
function createServer() {
return new ChronoServer();
}
// the server object. each server listens to 1 port on either 1 or all interfaces
function ChronoServer() {
// set basic data
this.interf... |
/**
* Created by dantegg on 16-9-23.
*/
import React,{ Component,PropTypes} from 'react'
import ReactDom from 'react-dom'
import 'antd/dist/antd.css'
import {Button,Input,Timeline,Row,Col} from 'antd'
import QueueAnim from 'rc-queue-anim'
//import store from '../store/configureStore'
class Todo extends Component{
... |
angular.module('CareyHinoki').
directive('technologyUsedTooltip', function () {
return {
link: function (scope, element, attrs) {
var element = $(element);
element.tooltip();
}
};
}); |
// don't reinitialize the bookmarklet if it has already been run
var HSMatch = function() {
this.init();
};
HSMatch.prototype.init = function() {
this.modal = new Modal(this);
this.comparer = new Comparer();
this.createLinks();
$('body').on('click', '.close', this.modal.closeHandler());
... |
var http = require('http'),
URL = require('url');
console.log(process.argv);
if (process.argv.length === 4) {
var url = process.argv[2];
var originalJson = process.argv[3];
console.log(originalJson);
var obj = JSON.parse(originalJson);
var json = JSON.stringify(obj);
var parsedUrl = URL.parse(url);
var he... |
Template.ideologyItem.helpers({
bestWork: function(){
if(this._id && this.proponents){
var ratings = Ratings.find({ideologyId: this._id, ratingType: "positive", userId: {$in: this.proponents}},
{fields: {worksId:1, scores: 1, url: 1}}).fetch();
var valuableWorks = ca... |
/*global _*/
/*global angular*/
(function() {
'use strict';
angular.module('core').directive('slideSection',
function() {
return {
scope: {
slide: '='
},
require: '?^^slideSection',
link: function postLink(... |
import { SAVE_COMMENT } from './types';
export function saveComment(comment) {
return {
type: SAVE_COMMENT,
payload: comment
};
}
|
/**
* Copyright (c) 2007-2013, Alexandru Marasteanu <hello [at) alexei (dot] ro>
* All rights reserved.
*
* * 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 above... |
/*
* Application Core
* https://github.com/goliatone/application-core
*
* @copyright Copyright (c) 2016 goliatone
* @license Licensed under the MIT license.
*/
'use strict';
const os = require('os');
const path = require('path');
const extend = require('gextend');
const KeyPath = require('gkeypath');
const Event... |
import Module from '../../core/Module.js';
class FrozenColumns extends Module{
constructor(table){
super(table);
this.leftColumns = [];
this.rightColumns = [];
this.leftMargin = 0;
this.rightMargin = 0;
this.rightPadding = 0;
this.initializationMode = "left";
this.active = false;
this.scrollEnd... |
jQuery(document).ready(function() {
function setTabFocus() {
$('.tabs-affix-js a').each(function(i, item) {
var content_id = $(item).attr('href');
var content_el = $(content_id);
var content_top = content_el.offset().top;
var docview_top = $(window).scrollTop... |
this.NesDb = this.NesDb || {};
NesDb[ '222E19511D64872E0B47A47D77ECC9BB3EBC52DC' ] = {
"$": {
"name": "Solomon's Key",
"class": "Licensed",
"catalog": "NES-KE-USA",
"publisher": "Tecmo",
"developer": "Tecmo",
"region": "USA",
"players": "1",
"date": "1987-07"
},
"cartridge": [
{
"$": {
"sys... |
#! /usr/bin/env node
/* jslint undef: true */
/* global window, document, $ */
/* ----------------------------------------------------------------
* riki.js
*
* A command line based chat app made in nodejs
* ---------------------------------------------------------------- */
(function() {
'use strict';
va... |
const fs = require('fs')
const path = require('path')
const exec = require('child_process').exec
const tree = require('strong-npm-ls')
const test = require('tap').test
const skip = [
'install-only',
'install-save'
]
const bin = path.join(__dirname, '..', 'bin', 'dep.js')
const fixtures = fs.readdirSync(path.join(__... |
/*
Each mapping has a set of buttons and some have or not axes,
inside there's a key that you will use to retrieve the event
and the mapped value that corresponds to that key.
The axes are compound, but you can copy the same axis for others.
*/
var rightMapping = {
buttons:{
R... |
moduleRegistrar.register('fl.dashboardNav');
angular.module('fl.dashboardNav', ['ui.router'])
.controller('DashNavCtrl', [
'flDashboardNav',
'$state',
function (flDashboardNav, $state) {
var vm = this;
vm.isCurrent = function (str) {
return $state.current.name.indexOf( str.toLowerC... |
import React from 'react';
import './style.css';
const Quote = ({ text = '', author = '' }) => (
<div className="quote">
{ text &&
<div className="quote__text">{text}</div>
}
{ author &&
<div className="quote__authorContainer">
<span className="quote_... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2014-2022 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
... |
const RequestV1Protocol = require('./request')
describe('Protocol > Requests > CreateAcls > v1', () => {
let args
beforeEach(() => {
args = {
creations: [
{
resourceType: 2,
resourceName:
'test-topic-392850dd6d7a5d5b19ce-14472-4a2169c1-4784-4717-b2d1-9189bdfb8322'... |
import _ from 'lodash'
import fetch from 'node-fetch'
import delay from '../../utils/delay'
import parse from './parse'
const FETCH = 'realmdata/FETCH'
const SAVE = 'realmdata/SAVE'
const ERROR = 'realmdata/ERROR'
const PURGE = 'realmdata/PURGE'
const POLL_TIMEOUT_SUCCESS = (1 * 60) * 1000
const POLL_TIMEOUT_ERROR = ... |
var _ = require('busyman'),
helper = require('../helper'),
nc;
function read (permAddr, attrName, callback) {
operateDevAttr(this, 'read', permAddr, attrName, null, callback);
}
function write (permAddr, attrName, val, callback) {
operateDevAttr(this, 'write', permAddr, attrName, val, callback);
}
//... |
export default {
ambient_light: require('./fragment/ambient_light.glsl'),
direct_light: require('./fragment/direct_light.glsl'),
point_light: require('./fragment/point_light.glsl'),
spot_light: require('./fragment/spot_light.glsl'),
};
|
'use strict';
(function (angular, buildfire) {
angular.module('contactUsPluginWidget')
.controller('WidgetHomeCtrl', ['$routeParams', 'Buildfire', 'DataStore', '$scope', 'TAG_NAMES', 'Location', 'LAYOUTS', '$rootScope', '$sce', '$timeout',
function ($routeParams, Buildfire, DataStore, $scope, TAG_NAMES, Lo... |
require('./init')
require('./db')
var log4js = require('log4js');
var res_api = require('res.api');
var log = log4js.getLogger("moa-api");
var app = require('base2')({
// debug: true,
root:__dirname,
"pre": function(app) {
app.use(res_api);
},
"views": "app/views",
"routes": "a... |
"use strict";
var _ = require("lodash");
var assert = require("assert");
var path = require("path");
var defaultLayoutConfig = require("./default-layout-config");
var validate = require("jsonschema").validate;
var layoutConfigSchema = require("./layout-config-schema.json");
/* eslint-disable no-magic-numbers */
// Eac... |
// per http://redux.js.org/docs/recipes/ComputingDerivedData.html
import { createSelector } from 'reselect'
import React from 'react'
import {Format, Show} from './constants'
import * as Dubdiff from './util/dubdiff'
const input = (state) => state.input
const format = (state) => state.format
const show = (state) =... |
const parse = require("../index");
describe("diff parser", function () {
it("should parse null", () => {
expect(parse(null).length).toBe(0);
});
it("should parse empty string", () => {
expect(parse("").length).toBe(0);
});
it("should parse whitespace", () => {
expect(parse(" ").length).toBe(0);... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const Post = require('./post');
const options = {
discriminatorKey: '_type'
};
const TextPostSchema = new Schema({
text: { type: String, default: null }
}, options);
const TextPostModel = Post.discriminator('text', TextPostSchema);
module.exp... |
+function($){
"use strict"
var dismiss = '[data-dismiss="alert"]'
var Alert = function(el){
$(el).on('click',dismiss,this.close)
}
Alert.prototype.close = function(e){
var $this = $(this);
var selector = $this.attr('data-target')
if (!selector) {//----------
selector = $this.attr('hr... |
/**
* Created by Administrator on 2015/11/17.
*/
$f("df","tasks.projectedit.addprojectresp",function(_data,_scope) {
if(_data.issuccess == true){
$('#myModal').modal('hide');
RenderPage('projectlist','app-context','projectlist');
}else{
return alert(_data.message);
}
}); |
var dust = require('../../nodejs-dust');
var fs = require('fs');
var path = require('path');
//convert to / normalize file-path (with system-dependent path-separators)
var toFilePath = function(uri, name){
return uri.replace(/\//gm, path.sep);
};
var unresolveAntPropPath = function(value, config){
r... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'mgcrea.ngStrap',
'ngAnimate',
'ngSanitize',
'myApp.ontologyClassViewJSONLD',
'myApp.ontologyClassView',
'myApp.ontologyIndividualView',
'myApp.modelView',
'myApp.svgView',
'myApp.h... |
// App view
// ========
import {E, T, H1, P, A} from '../../../src/Up';
import todosView from './todos';
// Make DOM for header.
function header() {
return E('header#header') . has([
H1("todos") // some kind of placeholder?
])
}
// Create page footer.
function footer() {
return E('footer') . has([
P("D... |
window.DEFAULT_SAMPLE_SIZE = 4096;
window.DEFAULT_SAMPLE_RATE = 44100;
var Segment = function(channels, sample_size, sample_rate) {
var self = this;
var _sample_size = sample_size || DEFAULT_SAMPLE_SIZE;
var _sample_rate = sample_rate || DEFAULT_SAMPLE_RATE;
self.channels = ko.observableArray(channels);
... |
import React from 'react';
import { isWidthUp } from '@material-ui/core/withWidth';
import {
withStyles,
MenuItem,
Tab,
Tabs as MuiTabs,
BottomNavigationAction,
BottomNavigation,
CardContent,
CardActions,
Card,
CardMedia,
CardHeader,
Collapse as MuiCollapse,
ListItemSecondaryAction,
ListIte... |
module.exports = {
basic: {
name: 'ContentFu',
description: 'Create content quickly when framing out a website'
},
server: {
host: 'localhost',
port: '3000',
email: ''
},
pg: {
server: 'postgres://localhost:5432/contentfu',
table: 'content'
},
files: {
routes: '',
bu... |
'use strict';
const _ = require('lodash');
const express = require('express');
const path = require('path');
const logger = require('morgan');
const bodyParser = require('body-parser');
const multipart = require('connect-multiparty');
const routes = require('./routes/index');
const app = express();
/* eslint-disabl... |
/**
* @hidden
*/
export function applyMixins(derivedCtor, baseCtors) {
baseCtors.forEach(function (baseCtor) {
Object.getOwnPropertyNames(baseCtor.prototype).forEach(function (name) {
derivedCtor.prototype[name] = baseCtor.prototype[name];
});
});
}
|
import React, {Component} from "react";
class CharacterList extends Component{
render(){
return <h1>Temp</h1>;
}
}
export default CharacterList; |
/*jslint node: true */
'use strict';
var lib = {
fs: require('fs'),
path: require('path')
};
var root = lib.path.resolve(__dirname, '../');
if (lib.path.basename(lib.path.dirname(root)) !== 'node_modules') {
process.exit(0);
}
process.chdir(lib.path.resolve(root, '../../'));
if (!lib.fs.existsSync('.editorconf... |
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['navbar'],
didInsertElement: function() {
this.$('.center').css('opacity', '0');
var _this = this;
setTimeout(function() {
_this.get('f7').sizeNavbars();
_this.$('.center').css('opacity', '1');
}, 0);
}
}... |
/*
Copyright 2016 Capital One Services, LLC
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 applicable law or agreed to in writing... |
import m from "mithril"
import merge from "mergerino"
import stream from "mithril/stream"
import { app, App } from "./app"
// Only for using Meiosis Tracer in development.
import meiosisTracer from "meiosis-tracer"
const update = stream()
const states = stream.scan(merge, app.Initial(), update)
const actions = app.A... |
'use strict';
var CI = process.env.CI;
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai-sinon', 'browserify'],
files: [
'./node_modules/angular/angular.js',
'./node_modules/angular-mocks/angular-mocks.js',
'./node_modules/chai-as-promised/lib/chai-as-promised.js... |
/* @flow */
import {exec, execSync} from 'child_process';
import {createHash} from 'crypto';
let {platform}: Object = process,
win32RegBinPath = {
native: '%windir%\\System32',
mixed: '%windir%\\sysnative\\cmd.exe /c %windir%\\System32'
},
guid: Object = {
darwin: 'ioreg -rd1 -c IOP... |
var EnvelopesList = {
currentEnvelopeID : null,
/*scrollTimer: null,*/
init: function(){
$('#envelopes').on('dblclick', '.envelope:not(.global)', function(e){
Common.openModalLink('/envelopes/' + $(this).attr('envelope_id') + '/edit', 'Edit Envelope');
});
$('#envelopes').on('dblclick', '.group-name', fu... |
import AbstractFractal from './abstract'
export default class WeightedFractal extends AbstractFractal {
}
|
/*
A simple drawing application for touch devices.
Loïc Fontaine - http://github.com/lfont - MIT Licensed
*/
define([
'require',
'text!templates/partial/quick-action.html'
], function (require, quickActionTemplate) {
'use strict';
var _ = require('underscore'),
Backbone ... |
version https://git-lfs.github.com/spec/v1
oid sha256:763276fa1707f56f52f8d2035a3e32e1d8f75ff9e168757b3e9f5a4cb6561a30
size 14120
|
module.exports = require('./lib/bowl');
|
/**
* Helper for git
*/
'use strict'
const co = require('co')
const path = require('path')
const execcli = require('execcli')
const childProcess = require('child_process')
const { EOL } = require('os')
const fsHelper = require('./fs_helper')
module.exports = Object.assign(exports, {
hasChange (dirname) {
let ... |
/*
jquery.removeClassWithPrefix - A jQuery plugin that removes the class of an element based on the prefix supplied.
Version: 1.0
Author: Michael Lawrence (michael.lawrence@rhythmagency.com)
Copyright: 2013 Rhythm Interactive
TODO: Provide documentation for this plugin.
*/
'use strict';
(function () {... |
!function(a,b,c,d){"use strict"}(jQuery,window,document); |
version https://git-lfs.github.com/spec/v1
oid sha256:e57d49b20de255ed68d95e8d42ba7bd1c1ad682317e7de0d5f6a2568d5b79b59
size 1571
|
import dom from '../../src/js/utils/dom'
describe('dom.js', () => {
describe('#createElement()', () => {
beforeEach(() => {
document.body.innerHTML = ''
})
afterEach(() => {
document.body.innerHTML = ''
})
it('should create a new div at the end of the body', () => {
dom.create... |
/*global angular*/
angular.module('phoenixeye')
.directive('katex', katex);
katex.$inject = [
'katex'
];
function katex (katex) {
var directive = {
restrict: 'E',
scope: {
},
link: link
};
return directive;
function link (scope, element) {
katex.render(element.text(), element[0])... |
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter, Route } from 'react-keeper'
import PageHome from 'pages/home/';
const rootRoute =
<HashRouter>
<PageHome.route />
</HashRouter>;
ReactDOM.render( rootRoute, document.getElementById('App') );
|
Package.describe({
'name': 'steffo:meteor-accounts-saml',
'summary': 'SAML Login (SP) for Meteor. Works with OpenAM, OpenIDP and provides Single Logout.',
'version': '0.0.1',
'git': 'https://github.com/steffow/meteor-accounts-saml.git'
});
Package.on_use(function(api) {
api.use(['rocketchat:lib'], 'server');
api... |
'use strict';
module.exports = (obj) => {
console.log('obj', obj);
};
|
export default class Grouper {
constructor(objectToGroup) {
this.objectToGroup = objectToGroup;
}
byName() {
const property = 'name';
const toBeGrouped = this.objectToGroup;
const grouped = {};
toBeGrouped.forEach(item => {
const nameStart = item[property].toString();
con... |
// LICENSE : MIT
"use strict";
import { UseCase } from "almin";
import cartRepository, { CartRepository } from "../infra/CartRepository";
import AppLocator from "../AppLocator";
export default class CheckoutCartUseCase extends UseCase {
static create() {
const customer = AppLocator.customer;
return ... |
var GlobalObject = require("./nodemmo/global");
var Player = require('./nodemmo/objects/player');
var ServerCore = require("./server");
var ConsoleLib = require("./consolelib");
var Global = new GlobalObject();
var GameServer = new ServerCore();
var NConsole = new ConsoleLib();
NConsole.writeLine("==================... |
/**
* @module App
* @submodule views/FolderView
*/
define([
'backbone', 'jquery', 'underscore', 'views/TopView', 'instances/contextMenus', 'text!templates/folder.txt'
],
function(BB, $, _, TopView, contextMenus, tplFolder) {
/**
* View for Folder in feed list
* @class FolderView
* @constructor
... |
/**
* Hooks into the global Plupload instance ('uploader'), which is set when includes/admin/metaboxes.php calls media_form()
* We hook into this global instance and apply our own changes during and after the upload.
*
* @since 1.0
*/
(function( $ ) {
$(function() {
if ( typeof uploader !== 'undefined'... |
'use strict';
angular.module('shufabeitie.home', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'home/home.html',
controller: 'HomeCtrl'
});
}])
.controller('HomeCtrl', ['$scope', '$http', function($scope, $http) {
$scope.faties = [];
$h... |
var adminapp = angular.module('adminapp', [
'ngRoute',
'AdminAppControllers',
'ui.bootstrap',
'ngResource',
'adminServices'
]);
adminapp.config(['$routeProvider', '$injector',
function($routeProvider, $injector) {
// var angularSecure = $injector.get('angularSecure');
// console.log(JSON.st... |
"use strict";
var Basic= require('../Phase.Basic/Host.js');
var DATA = require('./Data.js');
var SunRaise = function (dataPkg) {
Basic.call(this, dataPkg);
this.data = DATA;
};
SunRaise.prototype = Object.create(Basic);
SunRaise.prototype.constructor = SunRaise;
module.exports = SunRaise; |
$(document).ready(function () {
$('#submitform').click(function () {
alert('Hey');
});
}) |
vti_encoding:SR|utf8-nl
vti_author:SR|OMCORP\\saten.kumar
vti_modifiedby:SR|OMCORP\\saten.kumar
vti_timelastmodified:TR|26 May 2006 15:17:05 -0000
vti_timecreated:TR|26 May 2006 15:17:05 -0000
vti_cacheddtm:TX|26 May 2006 15:17:05 -0000
vti_filesize:IR|3582
vti_extenderversion:SR|6.0.2.6551
vti_backlinkinfo:VX|
|
var options = module.exports = {};
options.provider = process.env.TELCOM_PROVIDER;
options.sid = process.env.TELCOM_SID;
options.token = process.env.TELCOM_TOKEN; |
// All code points in the `Zl` category as per Unicode v3.0.1:
[
0x2028
]; |
Ext.define('Category.controller.Generic', {
extend: 'Ext.app.Controller',
stores: ['Generic'],
models: ['GenericModel'],
refs: [{
ref: 'genericlist',
selector: 'genericlist'
},
{
ref: 'buttonAdd',
selector: 'viewport button[action=addAction... |
/**
* Script to set up the css of the main page if javascript is enabled
*/
$(document).ready(function()
{
setup();
$(window).resize(function() {
$('.container').unbind();
$('.slide-nav').unbind();
setup();
});
});
function setup()
{
var viewport = $('.container').width();
var slide = $('.slid... |
'use strict';
/* Controllers */
//Count better name as input
//TODO extract tax cal lib or service and test it
define(
["angular", "hkTaxCal"], function(angular, calculator) {
// http://www.ird.gov.hk/eng/ese/st_comp_2012_13/stcfrm.htm
//test case: calculation compare with them, extract js there... |
var STATE_INTRO = me.state.USER + 0;
me.sys.pauseOnBlur = false;
/* Game namespace */
var game = {
// an object where to store game information
data : {
// score
score : 0
},
//Object to contain all the screens
Screen: {},
// Run on page load.
"onload" : function () {
... |
export const DEFAULTS = {
/**
Increases or decreases depending on scroll direction
@private
@property currentPage
@type Integer
@default 0
*/
currentPage: 0,
/**
@private
@property extraParams
@type Object
@default null
*/
extraParams: null,
/**
Used as a marker ... |
var webpack = require("webpack");
var path = require("path");
module.exports = {
entry: "./js/index.jsx",
output: {
path: __dirname,
filename: "./dist/bundle.js"
},
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
components: path.join(__dirname, "js/components"),
actions... |
var clients = new function() {
this.id = 0;
this.init_form = function() {
var c = $('.client-form');
var place = 0;
$('.cf-field-place', c).change(function() {
place = $('.cf-field-place', c).val();
$('.cf-only-place', c).hide().filter('.cf-only-place-'+place).show();
var placeClasses = ['fa-skype',... |
import React, { PropTypes } from 'react'
import CodeIcon from 'react-icons/lib/fa/code'
import { connect } from 'react-redux'
import { show } from '../../ducks/rawView'
const propTypes = {
className: PropTypes.string,
contentTitle: PropTypes.string.isRequired,
rawContent: PropTypes.oneOfType([
PropTypes.arra... |
// TODO use custom content type for design-time model
export const mimeType = {
json: 'application/json',
};
export default mimeType;
|
myApp.controller('relatorioController', ['$scope', '$rootScope', function($scope, $rootScope){
$rootScope.tituloPagina = 'Relatório';
$scope.relatorio_cliente = function(){
window.location.href = '#!/relatorio_cliente';
};
$scope.relatorio_pedido = function(){
window.location.href = '#!/relatorio_pedido';
... |
/**
* 管理员编辑脚本
*/
var page = {
urlParam: Public.urlParam(),
urlParamId: -1,
allRoleList:[],
hasLoaded: false,
saveFormDom: $("#save-form"),
idDom: $('#id'),
nameDom: $('#name'),
sel2MultiDom: $('#sel2Multi'),
mobileDom: $('#mobile'),
us... |
var Contacts = require('../models/Contact');
var express = require('express')
var router = module.exports = express.Router();
//Endpoint which retrieves all contacts
router.get('/', function(req, res){
Contacts.retrieveAll().then(function(contacts){ res.send({Contacts: contacts})
});
});
//Endpoint which post... |
var RouteAuth_1 = require("./RouteAuth");
var RestServiceOptions = (function () {
function RestServiceOptions() {
this.alwaysIncludeEmptyRequestParams = false;
this.defaultRouteAuthentication = RouteAuth_1.RouteAuth.None;
}
return RestServiceOptions;
})();
exports.RestServiceOptions = RestSe... |
import ajax from '../ajax';
import transforms from '../transforms';
const id = 'sanfrancisco-muni';
const name = 'San Francisco Muni';
const latitude = 37.771902;
const longitude = -122.424147;
const apiUrl = 'https://publicdata-transit.firebaseio.com/sf-muni/vehicles.json';
function fetch() {
return ajax(apiUrl)... |
/**
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize modern exports="amd" -o ./modern/`
* Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.6.0 <http://underscorejs.org/LICENSE>
* Copyright 2009-2014 Jeremy Ashkenas, DocumentCloud and Inv... |
IskunApp.controller('timelineController', ['$scope', '$http', 'fileUpload', function ($scope, $http, fileUpload) {
$scope.page = "";
$scope.url = "/api/users/posts/";
$scope.isBusy = true;
$scope.minPostId = 0;
$scope.maxPostId = 0;
$scope.isReady=false;
$scope.po... |
export const undo = {"viewBox":"0 0 16 16","children":[{"name":"path","attribs":{"fill":"#000000","d":"M8 1c-2.209 0-4.209 0.896-5.657 2.343l-2.343-2.343v6h6l-2.243-2.243c1.086-1.086 2.586-1.757 4.243-1.757 3.314 0 6 2.686 6 6 0 1.792-0.786 3.401-2.032 4.5l1.323 1.5c1.661-1.466 2.709-3.611 2.709-6 0-4.418-3.582-8-8-8z"... |
(function(angular) {
'use strict';
angular
.module('homeThingsIo')
.run(runBlock);
/** @ngInject */
function runBlock($log,mqttSocket,Datasource) {
$log.debug('runBlock end');
mqttSocket.onConnect (function(){
console.dir("mqtt running");
mqttSocket.subscribe("toto");... |
import compute from "./compute";
const update = () =>
new Promise((resolve, reject) => {
NEXT(require("../../update")(reject, true, resolve));
});
it("should support adding and removing runtimes", async () => {
expect(await compute()).toBe(42);
await update();
expect(await compute()).toBe(42);
await update();... |
export default class Logger {
constructor(logLevel) {
this._logLevel = logLevel;
this.LogLevel = Logger.LogLevel;
this._styles = {
error: 'color: yellow; background: #FF4040',
warn: 'color: #FF4040; background: #eed482',
info: 'color: blue',
d... |
/**
* Created by jeffg on 7/1/14.
*/
import TextArea from "../views/textarea";
var FocusTextArea = TextArea.extend({
didInsertElement: function() {
this.$().focus();
}
});
export default FocusTextArea;
|
require( '../setup' );
var request = require( 'request' ).defaults( { jar: false } );
var autohost = require( 'autohost' );
describe( 'Autohost Integration', function() {
var host;
var auth = require( '../../src/index.js' )( {} );
before( function( done ) {
host = autohost( {
authProvider: auth,
port: 8898... |
import Router from "vue-router";
Vue.use( Router );
var routes = [ {
path: "/",
component( resolve ) {
return require( [ "../features/project/list.vue" ], resolve );
}
}, {
path: "/project",
component( resolve ) {
return require( [ "../features/project/list.vue" ], resolve );
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.