code stringlengths 2 1.05M |
|---|
var searchData=
[
['cache',['Cache',['../classCache.html',1,'']]],
['conversation',['Conversation',['../classConversation.html',1,'']]]
];
|
'use strict';
function curry (fn) {
var args = Array.prototype.slice.call(arguments, 1);
return function () {
var nextArgs = Array.prototype.slice.call(arguments),
allArgs = args.concat(nextArgs);
return fn.apply(this, allArgs);
};
}
function compose () {
var args = Array.... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*
* @flow
*/
/**
* Get a hash for the provider object. Hashes are unique per-hasher, so if you have two different
*... |
//Categories service used to communicate Categories REST endpoints
(function () {
'use strict';
angular
.module('categories')
.factory('CategoriesService', CategoriesService);
CategoriesService.$inject = ['$resource'];
function CategoriesService($resource) {
return $resource('api/categories/:cate... |
'use strict';
var Transform = require('readable-stream').Transform;
var inherits = require('inherits');
var deepMatch = require('./lib/deepMatch');
var wrap = require('./lib/wrapMessage');
var jschan = require('jschan');
function noop() {}
function Graft() {
if (!(this instanceof Graft)) {
return new... |
'use strict';
// Declare app level module which depends on views, and components
var accountModule = angular.module('accountModule', []);
var partnerModule = angular.module('partnerModule', []);
var dodoModule = angular.module('dodoModule', []);
angular.module('myApp', [
'ngMaterial',
'ngRoute',
'myApp.v... |
"use strict";
const root = require('./helpers.js').root
const ip = require('ip');
exports.HOST = ip.address();
exports.DEV_PORT = 3000;
exports.E2E_PORT = 4201;
exports.PROD_PORT = 8088;
exports.UNIVERSAL_PORT = process.env.PORT || 8000;
exports.SHOW_WEBPACK_BUNDLE_ANALYZER = false;
/**
* These constants set whethe... |
function report(str) {
console.log(str);
}
function vec3(x,y,z) { return new THREE.Vector3(x,y,z); }
SCENE = {};
SCENE.getCard = function(boxW, boxH, rotZ)
{
boxD = 0.1;
if (!rotZ)
rotZ = 0;
//report("getImageCard "+imageUrl);
var material = new THREE.MeshLambertMaterial(
{ color: 0xdd... |
#!/usr/bin/env node
var mkdirp = require('yeoman-generator/node_modules/mkdirp')
var path = require('path')
var fs = require('fs')
var win32 = process.platform === 'win32'
var homeDir = process.env[ win32? 'USERPROFILE' : 'HOME']
var libPath = path.join(homeDir, '.generator-lego', 'node_modules')
var configPath = path... |
exports.platform = function () {
switch(process.platform){
case 'win32':
dep='win';
break;
case 'linux':
case 'mac':
dep=process.platform;
}
return 'node-' + dep;
}; |
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requ... |
var add = require('./add');
QUnit.test('add example', function () {
// add function returns sum of numbers
QUnit.equal(add(2, 3), 5);
// it also concatenates strings
QUnit.equal(add('foo', 'bar'), 'foobar')
}); |
/*
* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
* See LICENSE in the project root for license information.
*/
/**
* This sample shows how to:
* - Get the current user's metadata
* - Get the current user's profile photo
* - Attach the photo as a file attachment to an email... |
(function($,window){
})(Zepto,window); |
module.exports = require('./src/angularjs-dependencies-wrapper'); |
//////////////////////////////////////////////////////////////////////////
// //
// This is a generated file. You can view the original //
// source in your browser if your browser supports source maps. //
// ... |
describe('async methods', () => {
it('commits multiple valid inserts to the database', done => {
const methodUnderTest = async (unitOfWork) => {
const insert = { method: 'insert' };
await new unitOfWork.Users(getUserWithEmail('1')).save(null, insert);
await new unitOfWork.Us... |
'use strict';
var CurrentCourseStore = require('../../../js/stores/CurrentCourseStore');
var CourseActions = require('../../../js/actions/CourseActions');
require('../../../utils/createAuthenticatedSuite')('Store: CurrentCourse', function() {
it('should be empty on init', function(done) {
(CurrentCourseSt... |
export * from './PythonHome';
export * from './PythonNav';
|
const JSONBox = require("../JSONBox");
const rmdir = require("rmdir");
const appRootDir = require("app-root-dir");
const Q = require("q");
const path = require("path");
const async = require("asyncawait/async");
const await = require("asyncawait/await");
const expect = require("chai").... |
const SafeHarborModules = require('./SafeHarborModules');
const SafeHarborInverters = require('./SafeHarborInverters');
module.exports = () => {
SafeHarborModules();
SafeHarborInverters();
}
|
'use strict';
describe('Controller: MainCtrl', function () {
// load the controller's module
beforeEach(module('tallytextApp'));
var MainCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
MainCtrl = $cont... |
'use strict'
const React = require('react');
import {Sidebar} from 'react-semantify';
const UISidebar = React.createClass({
render : function() {
return (
<Sidebar className="ui top sidebar menu push scale down" init={true}>
<a className="item">
Our company
</a>
<a classNa... |
const express = require('express');
const app = express();
const port = 8080;
app.get('/', (req, res) => {
res.send('Hello World\n');
});
app.listen(port, () => {
console.log(`application is listening on port ${port}...`);
}); |
/*! Backstretch - v2.0.4 - 2013-06-19
* http://srobbin.com/jquery-plugins/backstretch/
* Copyright (c) 2013 Scott Robbin; Licensed MIT */
(function (a, d, p) {
a.fn.backstretch = function (c, b) {
(c === p || 0 === c.length) && a.error("No images were supplied for Backstretch");
0 === a(d).scrollT... |
'use strict';
var request = require('request')
var uuid = require('node-uuid')
var env = require('./env')
var World = function World(callback) {
var self = this
this.collection = null
this.lastResponse = null
this.doc1 = null
this.doc2 = null
this.generateCollectionId = function() {
this.collectio... |
var gulp = require('gulp');
gulp.task('default', function() {
console.log("Currently there are no available tasks. There will be!");
});
/**
* Builds the client files into a jar and moves it to the 'build/client' folder.
*/
/*
gulp.task('build-client', function() {
return gulp.src('.')
.pipe() // Build source/c... |
/***********************************************
gruntfile.js for jquery-bootstrap
https://github.com/fcoo/jquery-bootstrap
***********************************************/
module.exports = function(grunt) {
"use strict";
//***********************************************
grunt.initConfig({
"fco... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'], ['z', 'x', 'c', 'v', 'b', 'n', 'm']];
module.exports = exports['default']; |
/**
* @file 棱镜配置文件
*/
var pkg = require('./package.json');
module.exports = {
appid: pkg.appid,
name: pkg.name,
desc: pkg.description,
host: `https://${pkg.appid}.h5app.alipay.com/www/`,
pages: [
{
entry: 'index.html',
src: './src/pages/index/index.js',
title: '首页',
desc: '首页 -... |
import { isNull } from '../checks/isNull';
import { isObject } from '../checks/isObject';
import { mustSatisfy } from '../checks/mustSatisfy';
/**
* @hidden
*/
function beObject() {
return "be a non-null `object`";
}
/**
* @hidden
*/
export function mustBeNonNullObject(name, value, contextBuilder) {
mustSat... |
export default Ember.Handlebars.makeBoundHelper(function(price) {
var number = parseFloat(price/100).toFixed(2),
dollar = number.split('.')[0],
cents = number.split('.')[1],
dollars = dollar.split('').reverse().join('')
.replace(/(\d{3}(?!$))/g, '$1,')
.split('').reverse().join('... |
angular.module('fdb.directives', ['mcus.directives']);
angular.module('fdb.services', ['mcus.services']);
angular.module('fdb.filters', []);
angular.module('fdb', ['fdb.services', 'fdb.directives', 'fdb.filters']).
controller('UserFrontendCtrl', function($scope, $http, $timeout, $filter, $location) {
// $scope.dele... |
import React from "react";
import styled from "styled-components";
import Img from "gatsby-image";
import { graphql } from "gatsby";
import Center from "../components/center";
import ResponsiveContainer from "../components/responsive-container";
import Inset from "../components/inset";
import Text from "../components/t... |
var fs = require('fs');
var path = require('path');
var log = require('./logging').logger;
var Project = module.exports;
Project.PROJECT_FILE = 'ionic.config.json';
Project.OLD_PROJECT_FILE = 'ionic.project';
Project.OLD_V2_PROJECT_FILE = 'ionic.config.js';
Project.PROJECT_DEFAULT = {
name: '',
app_id: '' // esli... |
'use strict';
var q = require('q');
var announcer = require('pd-api-announcer');
var methodNomen = require('./nomenclt');
var nm = require('./parenthood-nomenclt');
module.exports = function (Parent, Child) {
var hasChildName = methodNomen.ifOwns(Child);
Parent[hasChildName] = function (parentSid, childSid) {
... |
export const ic_local_atm = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2... |
'use strict';
var inherits = require('util').inherits;
var _ = require('lodash');
var GremlinMethod = require('../function');
function GetPropertiesMethod() {
GremlinMethod.call(this, 'getProperties', arguments[0]);
}
inherits(GetPropertiesMethod, GremlinMethod);
GetPropertiesMethod.prototype.run = function(ele... |
var gsc_basicmatch = /[a-z0-9]/i;
function gsc_getquery(elt, q)
{
q = ltrim(q);
q = q.replace('\s+', ' ');
if (q.length == 0 || !gsc_basicmatch.test(q)) {
gsc_emptyresults(elt);
return '';
}
if (elt.currentQuery && (elt.currentQuery == q || elt.tempQuery == q))
... |
/**
* @class Oskari.mapframework.domain.AbstractLayer
*
* Superclass for layer objects copy pasted from wmslayer. Need to check
* if something should be moved back to wmslayer. Nothing else currently uses this.
*/
Oskari.clazz.define('Oskari.mapframework.domain.AbstractMapLayerModel',
/**
* @method create called... |
var _ = require('underscore'),
check = require('validator').check,
sanitize = require('validator').sanitize,
later = require('later'),
util = require('./util'),
condition = require('./condition');
var Rules = {
types: [
'trigger',
'schedule'
],
alertTypes: {
'email': {
// later
},
'sms': {
//... |
var keystone = require('keystone'),
async = require('async');
exports = module.exports = function(req, res) {
var view = new keystone.View(req, res),
locals = res.locals;
// Init locals
locals.section = 'ideas';
locals.page.title = 'Ideas - Evilcome';
locals.filters = {
category: req.params.category
};
... |
var should = require('should');
var sinon = require('sinon');
var Chintz = require('../lib/main');
var atomName = 'test-atom';
var moleculeName = 'test-molecule';
var invalidName = 'invalid-element-name';
var called;
describe('prepare', function() {
describe('with no arguments', function() {
it('return... |
const createSortDownIcon = (button) => {
button.firstChild.remove();
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('height', '12');
svg.setAttribute('viewBox', '0 0 503 700');
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.set... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$(function () {
$('[data-toggle="popover"]').popover();
$('.main-hide-div').hide();
$('#UserTab a').click(funct... |
module.exports = (api) => {
api.cache(true);
return {
presets: [
[
"@babel/preset-env",
{
useBuiltIns: "usage",
corejs: 3,
},
],
],
};
};
|
import * as React from "react";
import Slide from "../../components/slide";
const bgImage = require("../../images/hulk-feriggno-bixby.jpg");
class ImageSlide extends React.Component {
render() {
return (
<span/>
);
}
}
export default (
<Slide key="intro-cli-productivity-illustration" bgImage={bgI... |
const fetch = require("isomorphic-fetch");
function getUrl(query, variables) {
const urlRoot = `http://localhost:3000/graphql?query=${query}`;
if (variables == null) {
return urlRoot;
} else {
return urlRoot + `&variables=${JSON.stringify(variables)}`;
}
}
function run(query, variables) {
const url... |
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosAnalytics extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M256,32C141.174,32,46.544,118.404,33.54,229.739C32.534,238.354,32,247.114,32,256c0,1.783,0.026,3.561,0.067,5.333
C3... |
self.postMessage(0);
self.addEventListener('message', function (msg) {
if (msg.data === 'Hello') {
self.postMessage(1);
}
else if (msg.data instanceof self.ArrayBuffer) {
var view = new Int32Array(msg.data);
if (view[0] === 2) {
self.postMessage(3);
}
}
});
|
YUI.add('yui2-button', function(Y) {
var YAHOO = Y.YUI2;
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.2r1
*/
/**
* @module button
* @description <p>The Button Control enables the creation of rich, graphic... |
'use strict';
if (/^((?!chrome).)*safari/i.test(navigator.userAgent)){
alert("We have detected you are using Safari. Please switch to Chrome or Firefox to properly use this app.");
}
var weekAbbrev = {
Mo: "monday",
Tu: "tuesday",
We: "wednesday",
Th: "thursday",
Fr: "friday",
Sa: "saturda... |
// autocomplet : this function will be executed every time we change the text
function autocomplet() {
var min_length = 0; // min caracters to display the autocomplete
var keyword = $('#code0').val();
if (keyword.length >= min_length) {
$.ajax({
url: 'ajax_refresh.php',
type: 'POST',
data: {keyword:keywor... |
'use strict';
angular.module('core').controller('HomeController', ['$scope', 'Authentication',
function($scope, Authentication) {
// This provides Authentication context.
$scope.authentication = Authentication;
$scope.alerts = [
{
icon:'glyphicon-user',
color:'btn-success',
total:'20,408',
... |
"use strict";
let keyMirror = require('react/lib/keyMirror');
module.exports = keyMirror({
INITIALIZE: null,
CREATE_AUTHOR: null,
UPDATE_AUTHOR: null,
DELETE_AUTHOR: null
}); |
module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-gh-pages');
... |
var Encore = require('@symfony/webpack-encore');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env... |
const Assigner = require('assign.js')
let assigner = new Assigner()
const fp = require('fastify-plugin')
const WebSocket = require('ws')
const url = require('url')
module.exports = {
addWSServer: function (paths, wsOptions = {}) {
return fp((fastify, opts, next) => {
const lib = opts.library || 'ws'
if (li... |
var _ = require('underscore');
var keystone = require('../../');
var utils = keystone.utils;
/**
* Content Class
*
* Accessed via `Keystone.content`
*
* @api public
*/
var Content = function () {};
/**
* Loads page content by page key (optional).
*
* If page key is not provided, returns a hash of all page c... |
var winston = require('winston');
var fs = require('fs');
var presets = {};
function presetsAction(player, values, callback) {
var value = decodeURIComponent(values[0]);
if (value.startsWith('{'))
var preset = JSON.parse(value);
else
var preset = presets[value];
if (preset) {
winston.info("Preset ... |
export const UPDATE_TREE_FILTER = 'SIMPR_UPDATE_TREE_FILTER';
export const fireUpdateTreeFilter = (filter) => ({
type: UPDATE_TREE_FILTER,
payload: {
filter
},
});
|
function MetricConfiguationDataView(metricConfiguration)
{
var DynamicPropertyType = {
Boolean : 1,
Int : 2,
Double : 3,
String : 4,
Color : 5,
Percent : 6
};
var _items = [];
var _rows = [];
var _currentColumnId = 0;
var enabledColumnId... |
module.exports = {
livereload: {
options: {
livereload: '<%= express.options.livereload %>'
},
files: [
'<%= yeoman.currentDir %>',
'<%= yeoman.demo %>/**/*.html',
'<%= yeoman.demo %>/**/*.js',
'<%= yeoman.styles %>/{,*/}*.css',
... |
import { createStore } from 'redux'
import { combineReducers } from 'redux';
import { todoReducer } from '../todo-reducer';
import { appReducer } from '../app-reducer';
const todoApp = combineReducers({
todos: todoReducer,
app: appReducer
})
export const store = createStore(todoApp);
store.getState()
// outputs... |
version https://git-lfs.github.com/spec/v1
oid sha256:dd32b7eaa7daed7371af2e06195ec013df98eb5920727aaf459d9419ef607ff9
size 21785
|
version https://git-lfs.github.com/spec/v1
oid sha256:2624aaed17536733cabbaeeac1e3b7c75455924c253869c12a812940c3e1241f
size 1195
|
if (Meteor.isClient) {
// counter starts at 0
Template.main.helpers({
});
Template.main.events({
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
|
/* global fetch */
import React from 'react';
import { render } from 'react-dom';
import { Link } from 'react-router';
function Home() {
return (
<div className="container">
<h2>Who are you?</h2>
<Link to="/caseHandler">A Case Handler</Link>
{' or '}
<Link ... |
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... |
import AppDispatcher from '../dispatcher/AppDispatcher';
import AppConstants from '../constants/AppConstants';
const ActionTypes = AppConstants.ActionTypes;
export function showMenu() {
AppDispatcher.dispatchViewAction(ActionTypes.SHOW_MENU);
}
export function hideMenu() {
AppDispatcher.dispatchViewAction(Action... |
/**
* Created by suman on 09/05/16.
*/
var core = require('chanakya'),
http = require('http'),
Q = require('q');
core.validator('isPhoneno', function (message) {
var deferred = Q.defer();
http.get('http://apilayer.net/api/validate?access_key=eba101687da317945a45f798464256da&number=' + message + '&country_c... |
import {FileSelect} from 'widget/fileSelect'
import {Form, form} from 'widget/form/form'
import {FormCombo} from 'widget/form/combo'
import {Layout} from 'widget/layout'
import {Panel} from 'widget/panel/panel'
import {activatable} from 'widget/activation/activatable'
import {compose} from 'compose'
import {msg} from '... |
import * as ActionTypes from '../constants/constants';
const initialState = {
isAuthenticated: false,
isFetching: false,
loaded: false,
message: ''
};
const authReducer = (state = initialState, action) => {
switch (action.type) {
case ActionTypes.REQUEST_CHECK_TOKEN:
return {
...stat... |
function isString(value) {
if (typeof value !== 'string' || value === '' || value === null) {
return false;
}
return true;
}
function isNumber(value) {
if (typeof Number.parseInt(value, 10) !== 'number'
|| Number.isNaN(value) || value === null) {
return false;
}
return t... |
'use strict';
/*!
* Snakeskin
* https://github.com/SnakeskinTpl/Snakeskin
*
* Released under the MIT license
* https://github.com/SnakeskinTpl/Snakeskin/blob/master/LICENSE
*/
import Snakeskin from '../core';
Snakeskin.addDirective(
'op',
{
block: true,
group: 'op',
logic: true
}
);
|
import mongoose from 'mongoose';
const friendSchema = mongoose.Schema({
"id": Number,
"gender": String,
"firstName": String,
"lastName": String,
"email": String,
"ipAddress": String,
"job": String,
"company": String,
"birthDate": Date,
"latitude": String,
"longitude": String,
});
const Friend = ... |
import { isSticky } from '~/lib/utils/sticky';
describe('sticky', () => {
const el = {
offsetTop: 0,
classList: {},
};
beforeEach(() => {
el.offsetTop = 0;
el.classList.add = jasmine.createSpy('spy');
el.classList.remove = jasmine.createSpy('spy');
});
describe('classList.remove', () =>... |
import React from 'react';
import { assert } from 'chai';
import { createShallow, getClasses } from '../test-utils';
import CardContent from './CardContent';
describe('<CardContent />', () => {
let shallow;
let classes;
before(() => {
shallow = createShallow({ untilSelector: 'CardContent' });
classes = ... |
(function() {
"use strict";
var src$parser$$default = (function() {
"use strict";
/*
* Generated by PEG.js 0.9.0.
*
* http://pegjs.org/
*/
function peg$subclass(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent... |
require('dotenv').config({silent:true});
var feathers = require('feathers');
var bodyParser = require('body-parser');
var rest = require('feathers-rest');
var socketio = require('feathers-socketio');
var fms = require('../lib');
var AutoService = fms.AutoService;
const hooks = require('feathers-hooks');
const errorHan... |
// Math.extend v0.5.0
// Copyright (c) 2008-2009 Laurent Fortin
//
// 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 use, ... |
module.exports = {
dimension: 'overworld',
config: {
robotName: 'rob',
accountName: 'admin',
serverIP: '127.0.0.1',
serverPort: 8080,
tcpPort: 3001,
posX: 4,
posY: 4,
posZ: 4,
orient: 0,
raw: true,
},
internalInventory: {
meta: {
'size': 64,
'side': -1,... |
/**
* general purpose formatters
*
* @author Tim Golen 2014-02-12
*/
define(['rivets'], function(rivets) {
/**
* casts a value to a number
*
* @author Tim Golen 2013-10-22
*
* @param {mixed} value
*
* @return {number}
*/
rivets.formatters.number = function (value) {
return +value;
};
/**
*... |
(function() {
'use strict';
/**
* Get the main module (shared for Workout).
*/
angular.module(appName)
/**
* Login Controller.
*/
.controller('ConfirmBookingController', ConfirmBooking);
ConfirmBooking.$inject = ['$state', '$filter', '$http', 'config', '$loc... |
"use strict";
var dns = require('dns'),
os = require('os');
// Because localtunnel doesn't work reliably enough,
// hack the config to point at the local ip.
module.exports = function(ctx, done){
if(ctx.environment !== 'development'){
// Only run this hack in dev for real.
return done();
}... |
var Message = require('../models/message');
exports.create = function(req, res) {
new Message({
senderID: req.body.senderID,
senderAlias: req.body.senderAlias,
acceptorID: req.body.acceptorID,
acceptorAlias: req.body.acceptorAlias,
subject: req.body.subject,
content: req.body.content
}).sav... |
import { createAction, createThunkAction } from 'redux/actions';
import { getShortenUrl } from 'services/bitly';
import { saveAreaOfInterest } from 'components/forms/area-of-interest/actions';
export const setShareData = createAction('setShareData');
export const setShareUrl = createAction('setShareUrl');
export con... |
import React from 'react'
const DefaultLayout = ({ children }) => {
return (
<div className="layout" style={{ width: '100%', height: '100%' }}>
{children}
</div>
)
}
export default DefaultLayout
|
var connect = require('..');
var assert = require('assert');
var app = connect();
app.use(connect.bodyParser());
app.use(function(req, res){
res.end(JSON.stringify(req.body));
});
describe('connect.bodyParser()', function(){
it('should default to {}', function(done){
app.request()
.post('/')
.end(f... |
module.exports = exports = require('./lib/rhetorical'); |
(function() {var implementors = {};
implementors["tokio_fs"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/sys/unix/ext/fs/trait.DirEntryExt.html\" title=\"trait std::sys::unix::ext::fs::DirEntryExt\">DirEntryExt</a> for <a class=\"struct\" href=\"tokio_fs/struct.DirEntry.html\" title... |
'use strict';
import { Schema } from 'mongoose';
import shortid from 'shortid';
const EntrySchema = new Schema({
_id: { type: String, unique: true, default: shortid.generate },
stepRef: { type: String, ref: 'Step' },
name: String,
value: String,
dateCreated: { type: Date, default: Date.now },
dateUpdated:... |
import { strToEl } from '../utils';
export default class Ripple {
constructor() {
this.container = strToEl('<div class="ripple"></div>');
}
animate() {
this.container.classList.remove('animate');
this.container.offsetLeft;
this.container.classList.add('animate');
}
}
|
import React from 'react';
import PropTypes from 'prop-types';
import Button from 'components/Button';
Main.propTypes = {
showLoginForm: PropTypes.func.isRequired,
showSignUpForm: PropTypes.func.isRequired
};
export default function Main({ showLoginForm, showSignUpForm }) {
return (
<main>
<Button
... |
import Reflux from 'Reflux';
import cartActions from '../actions/cartActions.js';
import _ from 'lodash';
// Items to fill onFillCart action
let items = [
{
title: 'Iphone 12',
price: '129',
id: 1
},
{
title: 'Galaxy S14',
price: '119',
id: 2
},
{
title: 'Siemens A52',
price: '... |
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function () {
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd)var e = jQuery.fn.select2.amd;
return e.define("select2/i18n/nb", [], function () {
return {
inputTooLong: function (e) {
var t = e... |
var detector = (function () {
function foodCollision(snake, food, ui) {
var snakeHeadX = snake.parts[0].getPosition().x;
var snakeHeadY = snake.parts[0].getPosition().y;
var foodX = food.getPosition().x;
var foodY = food.getPosition().y;
if(snakeHeadX === foodX && snakeHeadY... |
'use strict';
var ANONYMOUS_USER_ID = "55268521fb9a901e442172f8";
var mongoose = require('mongoose');
//var Promise = require("bluebird");
var dbService = require('@colabo-knalledge/b-storage-mongo');
var mockup = { fb: { authenticate: false }, db: { data: false } };
var accessId = 0;
function resSendJsonProtected(r... |
function transformPath(decisionPath) {
var path = []
for (var i=1; i<decisionPath.length; i++) {
var node = {
feature: decisionPath[i-1].feature,
side: decisionPath[i].side == 'left' ? "<=" : ">",
threshold: decisionPath[i-1].threshold.toPrecision(5),
featureIdx: decisionPath[i-1].featureIdx,
level:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.