code stringlengths 2 1.05M |
|---|
// In this example, I use Pillars.js framework for HTTP server and controllers. But Take in mind that Textualization is a standalone library!!
var project = require("pillars");
// Start http server built-in in pillars.js
project.services.get('http').start();
// Include textualization library
var i18n = require("textua... |
var discoverable = require('../src/index');
discoverable.search(['test', 'test2'], function( address ) {
console.log('Discovered server address', address);
}); |
'use strict';
const joi = require('joi');
module.exports = {
host: joi.string().required(),
port: joi.number().min(1),
partition: joi.string(),
varyByHeaders: joi.array(),
staleIn: joi.number().min(1).required(),
expiresIn: joi.number().min(1).required(),
onCacheMiss: joi.func()
};
|
var gulp = require('gulp'),
nodemon = require('gulp-nodemon');
gulp.task('default',function(){
nodemon({
script: 'app.js',
ext: 'js',
env:{
port:8000
},
ignore:['./node_modules/**']
})
.on('restart',function(){
console.log('Restarting');
}... |
import toDate from '../../toDate/index.js'
var MILLISECONDS_IN_DAY = 86400000
// This function will be a part of public API when UTC function will be implemented.
// See issue: https://github.com/date-fns/date-fns/issues/376
export default function getUTCDayOfYear (dirtyDate, dirtyOptions) {
var date = toDate(dirty... |
/* global app:true */
(function() {
'use strict';
app = app || {};
app.Record = Backbone.Model.extend({
idAttribute: '_id',
defaults: {
_id: undefined,
name: {},
course: {
name: '',
semester: '',
year: 1970
},
games: [],
status: {
id: ... |
const gulp = require('gulp');
const loadPlugins = require('gulp-load-plugins');
const del = require('del');
const glob = require('glob');
const path = require('path');
const isparta = require('isparta');
const Instrumenter = isparta.Instrumenter;
const manifest = require('./package.json');
const mainFile = manifest... |
/**
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = {
moduleType: 'locale',
name: 'am',
dictionary: {},
format: {
days: ['ሰ... |
window.URL = window.URL || window.webkitURL;
window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
window.connectedNodes = {};
var editor = new Editor();
jsPlumb.bind("ready", function() {
jsPlumb.setContainer($("#storyBlocks"));
});
mapboxgl.acces... |
if (typeof (window) === 'undefined') {
var loki = require('../../src/lokijs.js');
var suite = require('../helpers/assert-helpers.js').suite;
}
describe('loki', function () {
var db,
users,
jonas;
function docCompare(a, b) {
if (a.$loki < b.$loki) return -1;
if (a.$loki > b.$loki) return 1;
... |
////////////////////////////////
// HELPER REACT CLASSES //
////////////////////////////////
var Editable = React.createClass({displayName: "Editable",
render: function() {
if (this.props.editMode) return this.props.input;
return (React.createElement("span", null, this.props.value));
}
})... |
/* First script in learning nodejs*/
var http = require("http");
var express = require("express");
var fs = require("fs");
var events = require("events");
http.createServer(function (request, response) {
// Send the HTTP header
// HTTP Status: 200: OK
// Content Type: text/plain
response.writeHead(20... |
/** @license
* onlyModal - MIT License
* Copyright (c) 2013 Joby Elliott
* http://go.byjoby.net/onlyModal
*
* 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 wit... |
console.log('headings'); |
'use strict';
var expect = require('chai').expect;
var createBoomError = require('../index');
var CustomErrors = require('./customErrors');
describe('createBoomError', function () {
it('should create a boom error with a string message', function () {
var StringError = createBoomError('StringError', 404, 'strin... |
'use strict';
let Config = require('./../../../build/server/config');
let Mailer = require('./../../../build/server/plugins/mailer');
let expect = require('chai').expect;
describe('Mailer', () => {
it('returns error when read file fails', (done) => {
Mailer.sendEmail({}, 'path', {})
.then((info)... |
(function() {
'use strict';
angular
.module('http').factory('DataService', DataService);
DataService.$inject = ['$http', '$q'];
function DataService($http, $q) {
console.info('DataService');
var BASIC_URL = 'http://localhost/Laravel/JWT/public/api/',
... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h5v-2H4v-6h18V6c0-1.11-.89-2-2-2zm0 4H4V6h16v2zm-5.07 11.17l-2.83-2.83-1.41 1.41L14.93 22 22 14.93l-1.41-1.41-5.66 5.65z" />
, 'CreditScoreOutli... |
var _; //globals
describe("About Applying What We Have Learnt", function() {
var products;
beforeEach(function () {
products = [
{ name: "Sonoma", ingredients: ["artichoke", "sundried tomatoes", "mushrooms"], containsNuts: false },
{ name: "Pizza Primavera", ingredients: ["roma", "sundried tom... |
'use strict'
const AbstractError = require('./abstractError')
class MalformedRequestError extends AbstractError {
constructor(messageArg) {
super(messageArg, 'The request was malformed.', 400)
}
}
module.exports = MalformedRequestError
|
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
export const ProgressBar = props => {
if (props.pct === 100) {
setTimeout(() => props.onAnimationComplete(), props.duration)
}
return (
<Wrapper {...props}>
<Bar {...props} />
</Wrapper>
)
}
... |
module.exports = {
"root": true,
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"mocha": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
... |
// Commented by Leo Matthew.S
// 20-Jul-2015
// Use "orion generate model" to create new models
// ...
// Also creates files in server/publications
Stocks = new Mongo.Collection('Stocks');
Stocks.attachSchema(
new SimpleSchema({
productId: {
type: String
},
productName: {
... |
'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 { observer } from 'mobx-react'
import { FlexGrid, Svg, Content } from 'components'
import { classNames, getDateDifference } from 'helpers'
import s from './ItemNumbersData.sass'
import viewsIcon from 'icons/ui/views.svg'
import favoriteIcon from 'icons/ui/favlorite-bg.svg'
const getF... |
export const AUTH_USER = 'auth user'
export const UNAUTH_USER = 'unauth user'
export const AUTH_ERROR = 'auth error'
export const FETCH_MESSAGE = 'fetch message' |
const gulp = require("gulp");
const config = require("../config").config;
const eslint = require("gulp-eslint");
// ESLintでlintします。
gulp.task("eslint", () => {
return gulp
.src(`${config.jsSourceDir}${config.jsSourcePath}**/*.js`)
.pipe(eslint())
.pipe(eslint.format())
// lintエラーのときはタスクの実行を失敗とする
// .pipe(e... |
Meteor.methods({
callProcessing: function() {
this.unblock();
return HTTP.post(Meteor.settings.processingUrl)
}
});
|
exports.server = {
redis_port: 6379,
redis_host: 'localhost',
// redis_socket: '/var/run/redis/redis.sock'
// redis_auth: 'password'
// redis_db_number: 2
// listen_ip: '10.0.1.2'
tcp_port: 80,
udp_port: 80,
access_log: true,
acl: {
// restrict publish access to private n... |
var fs = require('fs')
var path = require('path')
var through = require('through2')
var test = require('tap').test
var filter = require('../')
var Queue = require('../lib/queue')
var lorem = path.join(__dirname, 'lorem-ipsum.txt')
var foo = path.join(__dirname, 'foo.txt')
test('filter.filter (passthrough)', function... |
/**
* Copyright (c) 2011-2012 Jeff Hoefs <soundanalogous@gmail.com>
* Released under the MIT license. See LICENSE file for details.
*/
JSUTILS.namespace('BO.io.SoftPot');
BO.io.SoftPot = (function() {
var SoftPot;
// private static constants:
var TAP_TIMEOUT = 200,
FLICK_TIMEOUT = 200,
PRESS_TIMER_... |
/*
* @name wowBook
*
* @author Marcio Aguiar
* @version 1.0
* @requires jQuery v1.7.0
*
* Copyright 2010 Marcio Aguiar. All rights reserved.
*
* To use this file you must to buy a license at http://codecanyon.net/user/maguiar01/portfolio
*
* Date: Wed Dec 8 10:05:49 2010 -0200
*/
;(function($) {
$.wowBook ... |
/**
* Dieses HTML-Attribut kennzeichnet einen Behälter (z.B. <div>) für drei
* (optionale) klickbare Elemente (z.B. <button>), die folgende Wirkungen haben:
* - Datei aus einem Dialog auswählen lassen
* - Dateiauswahl aufheben, sodass dann keine Datei gewählt ist
* - Inhalt der aktuellen Datei unter einem beliebi... |
var bcrypt = require("bcrypt"),
crypto = require("crypto");
module.exports = (function() {
var User = {};
User.writable = [
"email",
"password",
"first_name",
"last_name",
"privacy_level",
"username"
];
User.public_read = [
"gravatar_url",
"id",
"username"
];
... |
var domainMeta = {
domain: "metamodel",
domainId: "dbb35f7c-b91d-e1a3-513c-46f476f5272e",
domainTitle: "dumy data",
description: "This is a demo model"
};
var representations =
[
{
"type": "App.draw.node.Phase",
"id": "38413ef3-2b12-3db2-d0a2-e1861e20c4b7",
... |
'use strict';
var angular = require('angular');
require('moment');
require('angular-route');
require('angular-cookies');
require('angular-moment');
require('angular-resource');
require('ng-token-auth');
var app = angular.module('smallVictories', ['ngRoute', 'ngResource', 'ng-token-auth', 'angularMoment']);
require(... |
// @flow
/**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support... |
version https://git-lfs.github.com/spec/v1
oid sha256:531e9817e88c7f1ebf28ed72a367bdf42387cdafa58ed6bd59c5b48db2c3437e
size 809
|
version https://git-lfs.github.com/spec/v1
oid sha256:d151c46ebdc96cfcf63223ce02b73a5c4600de7b95bd3effeb83a7da4a00ecc6
size 4075
|
version https://git-lfs.github.com/spec/v1
oid sha256:13948e6abb22b95a8ec41f2e3f7b7fa8aa07cb0b71d751c04c8d654632730d8f
size 25121
|
version https://git-lfs.github.com/spec/v1
oid sha256:9e5176d10d6e5010bbd80f352042c109e350d00be599a52403fb651fbf5e8b0d
size 200657
|
import Ember from 'ember';
export default Ember.Route.extend({
localStorage: Ember.inject.service(),
model: function () {
var ls = this.get('localStorage');
ls.setItem('thing', {name: 'thing1'});
return ls.getItem('thing');
}
});
|
import format from '../datetime/format'
export function zero (n) {
return n < 10 ? '0' + n : n
}
export function splitValue (value) {
let split = value.split('-')
return {
year: parseInt(split[0], 10),
month: parseInt(split[1], 10) - 1,
day: parseInt(split[2], 10)
}
}
export function getPrevTime ... |
//import rng from '../utilities/randomNumberGenerator'
//import loggerActions from '../actions/logger-actions'
export const ADD_TASK = 'ADD_TASK'
//export const UPDATE_MORALE_FOR_PERSON = 'UPDATE_MORALE_FOR_PERSON'
//export const UPDATE_PERSON = 'UPDATE_PERSON'
let ctr = 1
export function addTask(){
return (dis... |
import {expect} from 'chai';
/* istanbul ignore next */
const controllers = {
regular: function RegularCtrl() {
},
array: ['foo', function ArrayCtrl(foo) {
}],
$inject: function $InjectCtrl(bar) {
}
};
controllers.$inject.$inject = ['bar'];
export {expectPass, expectFail, link, controllers};
function ex... |
//require the http and url modules
var http = require('http');
var url = require('url');
var cluster = require('cluster');
//Port
const PORT=8080;
//extract query variable
function getqv(str, variable) {
var vars = str.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decod... |
webpackJsonp([0],{
/***/ 269:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_I... |
import React from 'react';
import FileLabel from './FileLabel';
export default function ImageLoader(props) {
return (<FileLabel accept={"image/*"} label={props.force ? "Add Image File" : "Update Image File"} readFile={props.readFile} loaded={props.loaded} />)
}
|
import { Subscription } from './Subscription';
import { noop } from './utilities';
/**
* Creates a new Observable
* @param {Function} observerCallback
*
* @example
* const obs$ = new Observable((observer) => {
* for (let i = 0; i < 10; ++i) {
* observer.next(i);
* }
*
* observer.complete();
* });
... |
import * as Sentry from '@sentry/node';
import schedule from 'node-schedule';
function reportingErrors(handler) {
return async () => {
try {
await handler();
} catch (error) {
console.error(error);
Sentry.withScope((scope) => {
Sentry.captureException(`CronError: ${error.message}`)... |
'use strict';
const Pipe = require('ng1-decorators').Pipe;
@Pipe
class IsOnFilter {
constructor(feature) {
this._featureService = feature;
this.transform = this.transform.bind(this);
}
transform(featureName) {
return this._featureService.isOn(featureName);
}
}
module.exports = IsOnFilter;
|
"use strict";
module.exports = {
SELF: "SELF",
METRICS: "METRICS",
INFRASTRUCTURE: "INFRASTRUCTURE",
INTERNAL_DEPENDENCY: "INTERNAL_DEPENDENCY",
EXTERNAL_DEPENDENCY: "EXTERNAL_DEPENDENCY",
INTERNET_CONNECTIVITY: "INTERNET_CONNECTIVITY"
};
|
'use strict';
define(['app'], function (app) {
var NavbarController = function ($scope, $location, config, authService) {
var appTitle = 'Customer Management';
$scope.isCollapsed = false;
$scope.appTitle = (config.useBreeze) ? appTitle + ' Breeze' : appTitle;
$scope.highlight = f... |
const blah = "blah"
|
var Channel = require('./schema/channel');
var User = require('./schema/user');
var Message = require('./schema/message');
var async = require('async');
var shortId = require('shortid');
/**
* User 정보가 조회
* @name retrieveUser
* @function
* @param {object} input - JSON 형태의 data
* @param {callback} done - 조회 후 수행할... |
var zmq = require('zmq')
, publisher = zmq.socket('pub');
var log = require('bunyan').createLogger({name:"registry/publisher"});
module.exports = {
bind: (protocol, port, cb) => {
publisher.bindSync(`${protocol}://*:${port}`);
cb();
},
whois: (service_name) => {
log.info('Who is: ', service_name, "... |
/// <reference path="TweenMax.js" />
/// <reference path="jquery.js" />
// sửa lại tween cho chạy bằng timer là 1 biến
// viết animation cho caption
//Global
window.fx = {
version: '1.4.8',
Effects3D: 48,
Effects2D: 19,
};
// CSS3 Helper Function
(function ($) {
$.fn.css3 = function (props) {
v... |
exports.acfun = require('./acfun.js');
exports.bangumi = require('./bangumi.js');
exports.bilibili = require('./bilibili.js');
exports.crunchyroll = require('./crunchyroll.js');
exports.iqiyi = require('./iqiyi.js');
exports.letv = require('./letv.js');
exports.mgtv = require('./mgtv.js');
exports.netflix = require('./... |
$(function() {
var map = new BMap.Map("l-map");
var centerPoint = new BMap.Point(120.1769, 30.19078);
var centerIcon = new BMap.Icon("/img/x_star.png", new BMap.Size(32, 32));
var userIcon = new BMap.Icon("/img/location.gif", new BMap.Size(14, 23))
map.centerAndZoom(centerPoint, 11);
// 添加总部标... |
/*
---
name: Function
description: Contains Function Prototypes like create, bind, pass, and delay.
requires: [Type]
provides: [Function]
...
*/
Function.extend({
attempt: function() {
for (var i = 0, l = arguments.length; i < l; i++) {
try {
return arguments[i]();
} catch (e) {}
}
return null;
... |
var classandroid_1_1support_1_1v7_1_1appcompat_1_1_r_1_1layout =
[
[ "abc_action_bar_title_item", "classandroid_1_1support_1_1v7_1_1appcompat_1_1_r_1_1layout.html#aec65987e63e9073748bd15e578bfe898", null ],
[ "abc_action_bar_up_container", "classandroid_1_1support_1_1v7_1_1appcompat_1_1_r_1_1layout.html#aef35fa... |
var mongoose = require('mongoose');
var logger = require(__dirname + '/../helpers/log');
var cryptoTS = require(__dirname + '/../helpers/crypt_auth');
var Booking = require(__dirname + '/models/booking.js');
function copyBooking(sourceBooking, destinationBooking) {
if (sourceBooking.date) destinationBooking.date =... |
//= require jquery-1.11.1.min
//= require bootstrap.min
//= require material
//= require ripples
//= require jquery.tagsinput.min
//= require toc.min
//= require bootstrap3-typeahead
//= require main |
export const ic_star_border_purple500_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-... |
version https://git-lfs.github.com/spec/v1
oid sha256:05878475ec63a9329b8f6558e842ccd82f82929b865ed6321bb7d4c747ca8037
size 11443
|
const context = process.env.NODE_ENV === 'development' ? process.env.NODE_ENV : process.env.REACT_APP_CONTEXT
const APP_URLS = {
development: 'http://localhost:3000',
production: 'http://beta.explore.datasf.org',
staging: 'http://edge.explore.datasf.org'
}
export const DEBUG = (process.env.NODE_ENV !== 'producti... |
var Webpack = require('webpack');
var path = require('path');
module.exports = {
context: __dirname,
devtool: 'eval-source-map',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
path.resolve(__dirname, 'app', 'main.js')],
output: {
path: path.resolve(__di... |
function parseEvent (properties = {}, fields = {}, data, opts = {}) {
const event = {
eventId: properties.messageId,
eventType: fields.routingKey,
resource: properties.appId,
data: data
}
if (opts.isReceiver) {
event.started = new Date()
}
if (properties.headers) {
if (properties.hea... |
import React, { Component } from 'react'
import classNames from 'classnames'
import { Icon, Tooltip, Badge } from 'react-mdl'
export default class LeagueTableRow extends Component {
render () {
const { player, position, clickHandler, winStreaker } = this.props;
const diff = parseFloat(player.points - player.pr... |
/*
* Copyright (c) 2012 Massachusetts Institute of Technology, Adobe Systems
* Incorporated, and other contributors. All rights reserved.
*
* Modified by Jakub Jurovych (equiet)
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files ... |
import React from 'react';
import { parse } from 'react-docgen';
import MethodsRenderer, { columns } from './MethodsRenderer';
// Test renderers with clean readable snapshot diffs
// eslint-disable-next-line react/prop-types
export default function ColumnsRenderer({ methods }) {
return (
<ul>
{methods.map((row, ... |
var mongoose = require('mongoose');
// our models
var Place = require('../models/place');
var Category = require('../models/category');
var ToplevelCategory = require('../models/toplevelCategory')
var Item = require('../models/item');
var Reservation = require('../models/reservation');
var User = require('../models/us... |
var users = (function () {
var CONSTANTS = {
NAME_MIN_LENGTH: 6,
NAME_MAX_LENGTH: 30,
PASSWORD_MIN_LENGTH: 3,
PASSWORD_MAX_LENGTH: 30,
};
function login(username, password) {
validate.valueLength(password, 'Password', CONSTANTS.PASSWORD_MIN_LENGTH, CONSTANTS.PASSWORD_MAX_LENGTH);
validate.ifUndefin... |
/*jshint regexdash:true*/
var rxNumber = /^\s*\d+\s*$/,
me = {DEFAULT_LIMIT: 1000}
/*
** extend(target, src1, src2, ...)
**
** Extend a given object by copying each property of the following object(s) to it.
** The last object in the list wins if there is a name conflict. This is more or less
** the same as Undersco... |
import { expect } from 'chai';
<% if (testType == 'integration') { %>
import { describeComponent, it } from 'ember-mocha';
import hbs from 'htmlbars-inline-precompile';
describeComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleName %>', {
integration: true
}, function () {
it('renders', function (... |
"use strict";
var gulp = require('gulp'),
jscs = require('gulp-jscs'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
mocha = require('gulp-mocha');
var files = ['./src/*.js', './gulpfile.js'];
gulp.task('lint', function () {
return gulp
.src(files)
.pipe(js... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
import React from 'react';
import PropTypes from 'prop-types';
import Styled from 'rsg-components/Styled';
const styles = ({ color, fontFamily, fontSize }) => ({
logo: {
color: color.base,
margin: 0,
fontFamily: fontFamily.base,
fontSize: fontSize.h4,
fontWeight: 'normal',
},
});
export function LogoRende... |
{
var x = scale
.scaleUtc()
.domain([date.utc(2009, 0, 1), date.utc(2010, 0, 1)])
.range(["red", "blue"]),
i = x.interpolate(),
y = x.copy();
x.interpolate(interpolate.interpolateHsl);
test.equal(x(date.utc(2009, 6, 1)), "rgb(255, 0, 253)");
test.equal(y(date.utc(2009, 6, 1)), "rgb(129... |
import { EventEmitter } from 'events';
import Promise from 'pinkie';
import timeLimit from 'time-limit-promise';
import promisifyEvent from 'promisify-event';
import { noop, pull as remove, flatten } from 'lodash';
import mapReverse from 'map-reverse';
import { GeneralError } from '../errors/runtime';
import MESSAGE fr... |
'use strict';
angular.module('eventmanagerApp')
.factory('AuditsService', function ($http) {
return {
findAll: function () {
return $http.get('api/audits/').then(function (response) {
return response.data;
});
},
findBy... |
(define = typeof define != "undefined" ? define : function (deps, factory) {
module.exports = factory(exports, require("../..").Query);
define = undefined;
});
define(["exports", "Query"], function (exports, Query) {
var comparatorMap = {
"eql": "=",
"gt": ">",
"lt": "<",
"... |
//re-implement: Push, Pop, Shift, and Unshift for Array.prototype, without using any library functions. Also add some Mocha tests to verify correctness.
//can only use array.length and assigning by indexing i.e array[i]=
array = [1,2,1,3,3,4]
var rpush = function(array, arg) {
array[array.length]=arg
return arra... |
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var crypto = require('crypto');
var UserMsgSchema = new Schema({
user_friends:String,
msg_content:String,
msg_date:{
type:Date,
default: Date.now
},
user_id: Schema.Types.ObjectId
})
var UserMsg = mongoose.model('UserMsg', UserM... |
import { default as LuaError } from './LuaError';
import { type } from './lib/globals';
let count = 0;
let stringLib, getn;
export function registerLibs(libs) {
// Can't import directly because they'll create a circular dependencies. :(
stringLib = libs.string;
getn = libs.getn;
};
export default class Table {
... |
export {
unstable_detectScrollType as detectScrollType,
unstable_getNormalizedScrollLeft as getNormalizedScrollLeft,
} from '@mui/utils';
|
function $R(start, end, isExclusive) {
var results = [];
var value = start;
while (value >= start && value <= end && (!isExclusive || value < end)) {
results.push(value);
value.succ();
}
return results;
} |
var net = Npm.require('net');
/**
* IRC Constructor
*
* Creates the IRC instance
* @param params optional preferences for the connection
*/
IRC = function IRC(params) {
this.connection = null;
this.buffer = '';
this.options = {
server: (params && params.server) || 'irc.freenode.net',
port: (params &... |
const mocha = require('mocha');
const assert = require('assert');
const KProfileModel = require('../models/profile_model');
const KUserModel = require('../models/user_model');
//describe user model tests
describe('User collection tests', function(){
//tests
it('Mocha works', function(){
assert('Ok' === 'Ok');... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({"esri/widgets/Feature/nls/Feature":{widgetLabel:"Detay",attach:"Ekler",fields:"Alanlar",fieldsSummary:"\u00d6znitelik ve de\u011fer listesi",media:"Ortam",... |
'use strict';
const express = require('express');
const passport = require('passport');
const Promise = require('bluebird');
const Book = require('../models/book');
const User = require('../models/user');
const Chapter = require('../models/chapter');
const Paragraph = require('../models/paragraph');
const router = e... |
Ext.define('Clonos.view.sources.Sources',{
extend: 'Ext.panel.Panel',
controller: 'sources',
alias: 'widget.sources',
itemId: 'sources',
viewModel: {
type: 'sources'
}
});
|
/*
*
* Find more about this plugin by visiting
* http://alxgbsn.co.uk/
*
* Copyright (c) 2010-2012 Alex Gibson
* Released under MIT license
*
*/
(function (window, document) {
function Shake() {
//feature detect
this.hasDeviceMotion = 'ondevicemotion' in window;
//default velocit... |
exports.up = ({schema}) =>
schema
.raw('CREATE EXTENSION IF NOT EXISTS citext')
.createTable('users', t => {
t.uuid('id').primary();
t.specificType('emailAddress', 'citext').unique().index();
t.specificType('name', 'citext').unique().index();
t.timestamp('signedInAt');
t.timestam... |
(function (localStorage) {
/**
* ALL the services in the application are in here.
*/
angular.module('knlServices', [])
/**
* Handles saving and restoring config of the Kentico instance. Is also able to disconnect from the instance.
*/
.factory('knlTargetConfigService', func... |
'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]; } }... |
define(["kanfas", "state","shapes/shapefactory"],
function(Kanfas, State,ShapeFactory){
// manually mock
var canvas = {
getContext: function(){
return true;
}
};
var state = new State(canvas, {}),
kanfas = new Kanfas(canvas, state),
s1 = ShapeFactory.create("Rectangle", {x:0,y:0}),
... |
import Form from '../../../common/auth/form';
import Login from '../Login.react';
import {
expect,
React,
sinon,
TestUtils
} from '../../../../test/mochaTestHelper';
describe('Login component', () => {
const msg = {
auth: {
form: {
button: {
login: 'Login'
},
plac... |
export const getApplication = state => state.undoables.present.application;
export function getProjectGuid (state) {
return getApplication(state).projectGuid;
}
export function getResetPaletteState (state) {
return getApplication(state).resetPalette;
}
export function getGridState (state) {
return getApplicati... |
var sinon = require('sinon');
var tran = require('../');
var Rule = require('../lib/rule');
var ds = require('../lib/ds');
describe('application', function() {
it('should create app', function() {
var app = tran();
app.should.be.ok;
});
it('should be readable and writable');
it('shoul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.