code stringlengths 2 1.05M |
|---|
/**
* @list dependencies
**/
var mocha = require('mocha');
var should = require('should');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var timestamps = require('../');
mongoose = mongoose.createConnection('mongodb://localhost/mongoose_timestamps')
mongoose.on('error', function (err) {
con... |
class ScheduleRow{constructor(time,title,description,location,link){this.time=time;this.title=title;this.description=description;this.location=location;this.link=link}}
class ActivityRow{constructor(name,description,time,location,more){this.name=name;this.description=description;this.time=time;this.location=location;th... |
/**
* Player Entity
*/
game.PlayerEntity = me.Entity.extend({
/**
* constructor
*/
init:function (x, y, target_x, target_y) {
// call the constructor
this._super(me.Entity, 'init', [x, y, {width : 32, height : 32}]);
this.renderable = new me.AnimationSheet(0, 0, {
... |
'use strict';
module.exports = function(kbox, pantheon) {
// node modules
var format = require('util').format;
// npm modules
var _ = require('lodash');
// Kalabox modules.
var Promise = kbox.Promise;
// Load some boxmods
var log = kbox.core.log.make('PANTHEON CREATE EVENTS');
/*
* Returns t... |
'use strict';
/**
* Module dependencies.
*/
var path = require('path'),
mongoose = require('mongoose');
/**
* Article middleware
*/
var articleByID = function(req, res, next, id) {
if (!mongoose.Types.ObjectId.isValid(id)) {
return res.status(400).send({
message: 'Article is invalid'
});
}
... |
/* TODO
Landscape
*/
//< Menu
app.addMenuItem({
cName: 'Tab Cropper',
cParent: submenu_name,
cExec: "tabCropper()"
});
//< Code
tabCropper = app.trustedFunction( function()
{
app.beginPriv();
if (app.activeDocs.length==0){
app.alert({ cTitle: 'Error: No Document', cMsg: "Please open a ... |
const sampleData = {
events: [
{
id: '1',
title: 'Trip to Empire State building',
date: '2018-03-21T18:00:00',
category: 'culture',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sollicitudin ligula eu leo tincidunt, quis scelerisque magna dapibus. S... |
var Promise = require('bluebird'),
_ = require('lodash'),
hbs = require('express-hbs'),
path = require('path'),
pfs = require('./promised-fs'),
ignore = ['node_modules', 'bower_components', '.DS_Store', '.git', 'Thumbs.db'],
readHbs = hbs.create(),
readThemeStructure,
... |
/**
* @fileoverview Chrome window manager logic code.
* @author Jakzo
*/
/**
* Manages a session (set of tabs within a window).
* @constructor
* @param {Object} options
* @param {?Window} options.window The window object this session is associated
* with.
* @param {?Array.<Session.Tab>} options.tabs A l... |
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: config.locationType,
//rootURL: config.rootURL
});
Router.map(function() {
this.route('home', {
path: '/'
});
this.route('header');
this.route('item');
this.route('empty');
this.rou... |
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];}}}return target;};var _jsxFileName='src/RectangleButton.j... |
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = (env) => {
const isDevBuild = !(env && env.prod);
const extractCSS = new ExtractTextPlugin('vendor.css');
return [{
stats: { modules: false },
... |
BlazeComponent.extendComponent({
onCreated() {
this.ownerFilter = new ReactiveVar(false);
},
isOwnerFilter() {
return this.ownerFilter.get();
},
setOwnerFilter(tf) {
return this.ownerFilter.set(tf);
},
events() {
return [{
'click .js-toggle-label-filter'(evt) {
evt.prevent... |
/**
* Developer: Stepan Burguchev
* Date: 8/19/2015
* Copyright: 2009-2016 Comindware®
* All Rights Reserved
* Published under the MIT license
*/
"use strict";
import template from './templates/mentionEditor.hbs';
import { Handlebars } from '../../libApi';
import dropdown from '../../dropdown/... |
constant_switch_1: {
options = { dead_code: true, evaluate: true };
input: {
switch (1+1) {
case 1: foo(); break;
case 1+1: bar(); break;
case 1+1+1: baz(); break;
}
}
expect: {
bar();
}
}
constant_switch_2: {
options = { dead_code: true, evaluate: true };
input: {
switch (1) {... |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
/*
* winston.js: Top-level include defining Winston.
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*
*/
require.paths.unshift(require('path').join(__dirname));
var winston = exports;
// Expose version
winston.version = [0, 2, 9];
//
// Include transports defined by default by winston
//
winston.transports = requ... |
const autoKeys = ['id', 'createdAt', 'updatedAt'];
export default (schema = {}, data, crypto, method = () => {}) => {
if (data === undefined) return undefined;
const props = {};
let value;
Object.keys(schema).forEach((key) => {
value = data[key];
// props[key] = value;
// if (value && crypto && t... |
var path = require("path");
describe('Plugin', function() {
var startingDir = process.cwd();
var jbPresentDir = path.join(startingDir, 'test/jade-brunch/present');
var defAsset = "app/assets";
before(function(){ process.chdir(jbPresentDir); });
it('should be an object', function() {
var plugin = new Pl... |
module("serialize", { teardown: moduleTeardown });
test("chadQuery.param()", function() {
expect(22);
var params, settings;
equal( !( chadQuery.ajaxSettings && chadQuery.ajaxSettings.traditional ), true, "traditional flag, falsy by default" );
params = {"foo":"bar", "baz":42, "quux":"All your base are belong to... |
/**
* @license
* (c) 2015 Juan Diaz (jucardi)
* http://github.com/jucardi/slickgrid
*
* Based on
* Michael Leibman's SlickGrid v2.2
* http://github.com/mleibman/slickgrid
*
* Distributed under MIT license.
* All rights reserved.
*
* Jucardi.SlickGrid v1.0
*
* NOTES:
* Cell/row DOM manipulations are ... |
function JoyStick() {
//Data
this._inputActions = new InputActions();
this.connected = false;
this._gamePad = navigator.getGamepads()[0];
this._lastJoystickState = new JoystickState();
//Functions
this.getInputActions = function ()
{
//Get Current Game Pad (Player 1)
... |
var PUSH_SPEED;
var pushers = [];
function pusher_init()
{
PUSH_SPEED = TILE_SIZE;
}
function pushers_update(dt)
{
var len = pushers.length;
for (var i = 0; i < len; ++i)
{
var entity1 = pushers[i];
for (var j = 0; j < len; ++j)
{
if (i == j) continue; // Cannot pu... |
var fs = require("fs"),
_ = require("underscore"),
evento = require("evento");
;
function ExportTo() {
};
ExportTo.prototype = {
request: null,
exportVersion: function()
{
fs.writeFile(this.request.exportPath, this.getVersionData(), _.bind(this.onWriteFile, this))... |
import React from 'react';
import styles from './styles.css';
class DashboardProfile extends React.Component {
render() {
return (
<div >
<div className={ styles.dashboardLeft}>
<a className={ styles.cover }></a>
<div >
<a className={styles.DashboardProfileAvatar}>
<img className={st... |
var express = require('express');
var http = require('http');
var path = require('path');
var favicon = require('serve-favicon');
var morgan = require('morgan');
var methodOverride = require('method-override');
var bodyParser = require('body-parser');
var errorHandler = require('errorhandler');
require('./logConfig');
... |
/* Detecting Mobile Clients
*
* This is a small snippit of code that allows one to check if the browser
* viewing this page is mobile or not. Not completely working, as Firefox
* on the mac is seen as mobile which it is not.
*
* This function is global to all JS files.
*
*/
// Source
// http:// stackoverflow.c... |
import moment from 'moment';
import React, { Component } from 'react';
import {
View,
ListView,
Text,
StyleSheet,
} from 'react-native';
class ResumoView extends Component {
render() {
let {
totalJogos,
somatorioApostas,
somatorioComissao,
} = th... |
// slotgame.js
//
// 競技プログラミング
//
// * @category game
// * @author Yuya Kawai
// * @copyright copyright © 2015 Yuya Kawai. All Rights Reserved.
// * @license http://www.opensource.org/licenses/mit-license.html MIT License
// * @version 1.0
//
// IE10まではconstが非対応のためあえて使わない
//const var REEL_NUM = 3;
//cons... |
'use strict';
var should = require('should'),
request = require('supertest'),
path = require('path'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
express = require(path.resolve('./config/lib/express'));
/**
* Globals
*/
var app, agent, credentials, user, _user, admin;
/**
* User route... |
module.exports = {
description: "",
ns: "react-material-ui",
type: "ReactNode",
dependencies: {
npm: {
"material-ui/svg-icons/hardware/router": require('material-ui/svg-icons/hardware/router')
}
},
name: "HardwareRouter",
ports: {
input: {},
output: {
component: {
title... |
/// <reference path="../build/out/fullcalendar.min.js" />
fc.sourceNormalizers = [];
fc.sourceFetchers = [];
var ajaxDefaults = {
dataType: 'json',
cache: false
};
var eventGUID = 1;
function EventManager(options, _sources) {
var t = this;
// exports
t.isFetchNeeded = isFetchNeeded;
t.fetchEvents = fetch... |
var Container = typeof Buffer !== "undefined" ? Buffer //in node, use buffers
: typeof Int8Array !== "undefined" ? Int8Array //in newer browsers, use webgl int8arrays
: function(l){ var a = new Array(l); for(var i = 0; i < l; i++) a[i]=0; }; //else, do something similar
function BitField(data, opts){
if(!(th... |
'use strict';
module.exports = function(text) {
return ('\n' + text).replace(/(\r\n|\r|\n)\[[0-9:]{8}\] /g, '\n').slice(1);
};
|
'use strict'
const iftype = require('iftype')
function CustomType(){
}
//----------------------------
// Check if type is 'string'
//----------------------------
iftype(123).is('string') // => false
iftype(function foo(){}).is('string') // => false
iftype(new CustomType()).is('string') // => false
iftype(["foo", "ba... |
"use strict"
Object.defineProperty(exports, "__esModule", {
value: true,
})
exports.Polygon = undefined
var _defineProperty2 = require("babel-runtime/helpers/defineProperty")
var _defineProperty3 = _interopRequireDefault(_defineProperty2)
var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-o... |
ph.module(
'playhouse.input'
)
.defines(function()
{
ph.KEY =
{
MOUSE1 : -1,
MOUSE2 : -3,
MWHEEL_UP : -4,
MWHEEL_DOWN : -5,
BACKSPACE : 8,
TAB : 9,
ENTER : 13,
PAUSE : 19,
CAPS : 20,
ESC : 27,
SPACE : 32,
PAGE_UP : 33,
PAGE_DOWN : 34,
END : 35,
HOME : 36,
LEFT_ARROW : 37,
UP_ARR... |
import React, { Component } from 'react'
import ReferralForm from './ReferralForm'
import getStatusIcon from './StatusIcon'
import { Card,
CardHeader,
CardText,
Paper } from 'material-ui'
const style = {
referralOptions :{
display: 'flex',
justifyContent: 'space... |
/*
* The MIT License
*
* Copyright 2014 Timo Behrmann, Guillaume Chauvet.
*
* 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... |
var app=angular.module('dashBoardApp')
app.factory('SessionService', ['$http', function($http) {
var loadSessionData = function() {
return $http.get("/session/");
};
return {
loadSessionData: function() {
return loadSessionData();
}
};
}]); |
import React from 'react';
import { Link } from 'react-router';
import Filter from './Filter';
import Helmet from 'react-helmet';
const Filters = React.createClass({
render() {
return (
<div className="monster-filters row col-sm-12">
<Helmet
title={ 'Monster Manager: Encounter Management Tools for GMs... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M5 5v14h14V5H5zm11 9h-4v3l-5-5 5-5v3h4v4z" opacity=".3" /><path d="M12 7l-5 5 5 5v-3h4v-4h-4zm7-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1... |
// Generated by IcedCoffeeScript 1.8.0-a
(function() {
module.exports = function(arg) {
return ('' + arg).replace(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/gm, '\\').replace(/\n/g, "'\n'").replace(/^$/, "''");
};
}).call(this);
|
/*!
* Vue.js v2.4.2
* (c) 2014-2018 Evan You
* Released under the MIT License.
*/
/* */
// these helpers produces better vm code in JS engines due to their
// explicitness and function inlining
function isUndef (v) {
return v === undefined || v === null
}
function isDef (v) {
return v !== undefined && v !== ... |
var vows = require("vows"),
assert = require("assert"),
d3 = require("d3"),
crossfilter = require("../");
var suite = vows.describe("crossfilter");
var testData = [
{date: "2011-11-14T16:17:54Z", quantity: 2, total: 190, tip: 100, type: "tab", tags: [1,2,3]},
{date: "2011-11-14T16:20:19Z", quantity: 2... |
import {
compile,
compileOptions,
RESOLUTION_MODE_TRANSFORMS,
STRICT_MODE_TRANSFORMS,
registerPlugin,
unregisterPlugin,
} from '../../index';
import { moduleFor, AbstractTestCase, RenderingTestCase } from 'internal-test-helpers';
moduleFor(
'ember-template-compiler: default compile options',
class exte... |
import StaticSiteGeneratorPlugin from 'static-site-generator-webpack-plugin';
import reactRouterToArray from 'react-router-to-array';
import grommetBaseWebpack from 'grommet-toolbox/lib/webpack.dist.config';
import path from 'path';
import routes from './src/js/routes';
const staticConfig = {...grommetBaseWebpack};
g... |
version https://git-lfs.github.com/spec/v1
oid sha256:08babec85d70eb637bd22096e03a1cb9e6182bfe50e17c712a774196a2d2f1de
size 29868
|
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [ 'ui.router', 'ngCookies','myApp.blog','myApp.admin', 'myApp.view1', 'myApp.view2', 'myApp.event', 'myApp.emit'
]).config([ '$stateProvider', '$urlRouterProvider', '$locationProvider',
function($stateProvide... |
goog.provide('ol.MapBrowserEvent');
goog.provide('ol.MapBrowserEvent.EventType');
goog.provide('ol.MapBrowserEventHandler');
goog.provide('ol.MapBrowserPointerEvent');
goog.require('goog.asserts');
goog.require('ol');
goog.require('ol.Coordinate');
goog.require('ol.MapEvent');
goog.require('ol.Pixel');
goog.require('o... |
/**
* @classdesc Button custom web component
* @class button
* @property {string} color Available color is blue and red
* @property {string} icon Button icon, using font awesome. Ex. fa-calendar etc. For icon list see <a href="http://fontawesome.github.io/Font-Awesome/icons/">http://fontawesome.github.io/Font-Aweso... |
/*! UIkit 2.14.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
// Based on Zeptos touch.js
// https://raw.github.com/madrobby/zepto/master/src/touch.js
// Zepto.js may be freely distributed under the MIT license.
;(function($){
if ($.fn.swipeLeft) {
return;
}
var touch = {}... |
describe('toString', function() {
it('returns a configured string', function() {
var foo = { bar: function() { return 3 } };
jack.stub(foo, 'bar');
assert(foo.bar.toString() === '[TestDouble bar]');
});
});
|
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');
var fs = require('fs-extra');
beforeEach(() => {
return helpers.run(path.join(__dirname, '../generators/html'))
.inTmpDir((dir) => {
fs.copySync(path.join(__dirname, '../generators/app/templ... |
#!/usr/bin/env node
'use strict';
/* eslint-disable no-shadow, no-console */
const WebpackDevServer = require('webpack-dev-server');
const fs = require('fs');
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const webpa... |
// Copyright (c) 2017 John Grube johnegrube@gmail.com
// Description: SoSOFS server
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const net = require("net");
let logger = require("bristol");
const config = require("../config.json");
let client;
function connectionHandler(connection) {
... |
import fs from 'fs-extra-promise';
import Path from 'path';
import R from 'ramda';
import readdirp from 'readdirp';
import { Observable } from 'rxjs';
import { formatDevNameVersion } from './util/format';
// unix or windows paths
const ENDS_NODE_MOD_RE = /[\\/]node_modules$/;
/*
Special directory tree filter for f... |
$(window).load(function(){
'use strict';
$(".menuDefault").sticky({ topSpacing: 80, });
});
$(document).ready(function(){
/* RESPONSIVE MENU JS */
jQuery('nav').meanmenu();
/* BACKGROUND BACKSTRETCH JS */
$.backstretch([
/*Change the images url for change t... |
module.exports = function(blockList) {
// The blockList
this.blockList = blockList;
/*
A crafting recipe looks like the following:
- result (a block returned from the blocklist)
- amount (amount of blocks returned from the crafting)
- requirements (an array of 9 texture_na... |
// Important modules this config uses
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const OfflinePlugin = require('offline-plugin');
// PostCSS plugins
const cssnext = require... |
'use strict';
/* App Module */
var phonecatApp = angular.module('phonecatApp', [
'ngRoute',
'ui.bootstrap',
'phonecatAnimations',
'phonecatControllers',
'phonecatFilters',
'phonecatServices'
]);
phonecatApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/phones', {... |
var classhryky_1_1reduction_1_1_int =
[
[ "base_type", "classhryky_1_1reduction_1_1_int.html#ae608658dae381b8a1cc5b61ed71543d2", null ],
[ "heap_type", "classhryky_1_1reduction_1_1_base.html#ae7f7c04222f3bb069251fedf2afc051f", null ],
[ "this_type", "classhryky_1_1reduction_1_1_int.html#a24a89f763bdcfe8ca14... |
$package("org.mathdox.formulaeditor");
$identify("org/mathdox/formulaeditor/MathCanvasFill.js");
$require("org/mathdox/formulaeditor/MathCanvas.js");
$main(function(){
org.mathdox.formulaeditor.MathCanvas.addFont(50,
{cmbx10:[[5,5,0],[7,5,0],[6,5,0],[6,5,0],[5,5,0],[6,5,0],[6,5,0],[6,5,0],
[6,5,0],[6,5,0],[6,5,0],[... |
'use strict';
var d3 = d3;
var stackedHorizontalBarChart = {};
stackedHorizontalBarChart.draw = function(parent) {
var _data = null,
chartWidth = 300,
barHeight = 28,
_mouseClick = function() {},
_selection = d3.select(parent);
function component() {
_selection.each(func... |
var Fs = require('fire-fs');
var Path = require('fire-path');
global.__app = {
initCommander: function ( commander ) {
// TODO:
},
init: function ( options, cb ) {
// initialize ./.settings
var settingsPath = Path.join(Editor.appPath, '.settings');
Fs.ensureDirSync(settings... |
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-postcss');
grunt.initConfig({
sass: {
options: {
sourcemap: 'none',
noCache: true
},
prod: {
options: {
style: 'expanded'
},
files: {
'dist/css-tooltip.css': 'src/css-tool... |
'use strict';
angular.module('users').controller('AuthenticationController', ['$scope', '$http', '$location', 'Authentication', '$timeout', '$mdDialog', 'Users',
function($scope, $http, $location, Authentication, $timeout, $mdDialog, Users) {
$scope.authentication = Authentication;
// some routing actions
$sc... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:admin/users/new', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
var controller = this.subject();
assert.ok(controller... |
/*global angular */
'use strict';
describe('Unit: ExampleFilter', function() {
var $filter;
beforeEach(function() {
// instantiate the app module
angular.mock.module('app');
// mock the filter
angular.mock.inject(function(_$filter_) {
$filter = _$filter_;
});
});
... |
import useWebChatAPIContext from './internal/useWebChatAPIContext';
export default function useUsername() {
return [useWebChatAPIContext().username];
}
|
import Vue from "vue";
const _ = require('lodash');
/**
* Produces the translation of content for a given key. The translation dictionary
* is stored in window.i18n, which is obtained from the connected js file at the
* address api/js/app.min.js (laravel route: 'frontend.lang.js').
*
* @param {String} key. Trans... |
var http = require('http');
var server = http.createServer(function (req, res) {
res.writeHead(200, {
'Content-Type': 'text/html'
});
res.write('<h1>Hello Node.js</h1>');
setTimeout(function () {
res.end('<pre>' + JSON.stringify(req.headers, null, 2) + '</pre>');
}, 500);
});
server.... |
/**
* Created by quanpower on 14-8-23.
*/
var nstatic = require('node-static');
var JSONStream = require('JSONStream');
var config = require('../config');
var getYo = require('./getYo');
var whoAmI = require('./whoAmI');
var getData = require('./getData');
var logData = require('./logData');
var logEvent = require... |
/*
* ember-model-generator
* https://github.com/zooshme/ember-model-generator
*
* Copyright (c) 2014, Ovidiu Spatacian-Tarnu
* Licensed under the MIT license.
*/
'use strict';
var gulp = require('gulp'),
install = require('gulp-install'),
conflict = require('gulp-conflict'),
template = require('gulp... |
'use strict';
const assert = require('assert');
const Browscap = require('../src/index.js');
suite('checking for issue 1636. (12 tests)', function () {
test('issue-1636-A ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:7.0.1) Gecko/20171016 Postbox/5.0.20"]', function () {
const browscap = new Browscap();
... |
const createRenderer = require('../')
const createContext = require('pex-context')
const vec3 = require('pex-math/vec3')
const GUI = require('pex-gui')
const random = require('pex-random')
const normals = require('geom-normals')
const createSphere = require('primitive-sphere')
const ctx = createContext()
const rendere... |
// @Routes for Server --> API for movies list and history
var app = require('express')();
var mongoose = require('mongoose');
var movieList = require('./listmodel');
var history = require('./historymodel');
// @@ Movie List API section
// # Get the list and send to client
app.get('/mlist', function(req, res... |
// Override the default confirm dialog by rails
$.rails.allowAction = function(link) {
if (link.data('confirm') == undefined) {
return true;
}
$.rails.showConfirmationDialog(link);
return false;
};
$.rails.confirmed = function(link) {
link.data('confirm', null);
link.trigger('click.rails');
};
$.rail... |
module.exports = {
server: {
port: 8080
},
mysql: {
}
}; |
import { createComponent } from 'inferno-alef'
const center = props => ({
padding: 10,
justifyContent: 'center',
alignItems: 'center',
textAlign: 'center',
flexDirection: 'column',
flex: props.flex || 1,
fontFace: {
fontFamily: 'Lato',
src: [
'https://fonts.gstatic.com/s/lato/v11/qIIYRU-oRO... |
import React, { Component } from "react";
import "./App.css";
import profiles from "./examples/data";
import { Simple, Highlighted } from "./examples";
import { Portals } from "react-githubish-mentions";
console.log("Portal", Portals);
class App extends Component {
render() {
return (
<div className="App"... |
import Ember from 'ember';
export default Ember.TextField.extend({
classNames: ['form-control'],
didInsertElement () {
this.floatLabel();
this.maxRangeValidation();
},
onChangeValue: Ember.observer('value', function() {
this.floatLabel();
this.maxRangeValidation();
}),
floatLabel() {
... |
module.exports = function( grunt ) {
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
watch: {
scripts: {
files: [
"app/js/*"
],
tasks: [
"concat:scripts"
]
... |
// Domain routing and port forwarding
//
// Used for mapping hosts and domains to localhost, so you can open TCP
// connections with friendly hostnames to test against the local server.
//
// Can also map any source port to any destination port, so you can use port 80
// to access localhost server running on unprivileg... |
'use strict';
var csrf;
var suburl;
function initCommentPreviewTab($form) {
var $tabMenu = $form.find('.tabular.menu');
$tabMenu.find('.item').tab();
$tabMenu.find('.item[data-tab="' + $tabMenu.data('preview') + '"]').click(function () {
var $this = $(this);
$.post($this.data('url'), {
... |
import PropTypes from "prop-types";
import React, { Component } from "react";
import CheckBoxFilter from "./CheckBoxFilter";
import { createDefaultObjectFrom } from "../../../utils";
class CheckBoxFilterContainer extends Component {
constructor(props) {
super(props);
this.onValueChange = this.onValueChange.... |
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/jax/output/SVG/autoload/multiline.js
*
* Implements the SVG output for <mrow>'s that contain line breaks.
*
* ---------------... |
'use strict';
angular.module('thrApp').controller('QuestionnaireDialogController',
['$scope', '$stateParams', '$modalInstance', 'entity', 'Questionnaire', 'Workorder',
function($scope, $stateParams, $modalInstance, entity, Questionnaire, Workorder) {
$scope.questionnaire = entity;
$scope.w... |
"use strict"
var net = require('net')
var cluster = require('cluster')
var log = require('debug')(require('./package.json').name + ' ' + process.pid)
var EventEmitter = require('events').EventEmitter
var which = require('which')
var path = require('path')
module.exports = function(opts) {
var port = opts.port
... |
/**
* A simple test case that determines if elements, specified by a selector,
* exist or not.
*
* The test fails for elements that are found and a case is created for each
* one. The test passes is the selector finds no matching elements.
*/
quail.basefontIsNotUsed = function (quail, test, Case, options) {
va... |
'use strict'
export function makeHttpRequest (method, url, body, callback) {
// method should be "GET" or "POST"
var request = new XMLHttpRequest()
request.onreadystatechange = function () {
if (this.readyState === 4) {
if (this.status === 200) {
callback(request.responseText, null)
} e... |
import {
BufferGeometry, Points, Vector3, Float32BufferAttribute,
InterleavedBuffer, InterleavedBufferAttribute, Matrix4, Vector4
} from '../Three';
import { STATION_ENTRANCE } from '../core/constants';
import { PointIndicator } from './PointIndicator';
const _position = new Vector4();
const _ssOrigin = new Vector4... |
'use strict';
/**
* @ngdoc overview
* @name sproutApp.services
*
* @description
* This `sproutApp.services` module contains the services of the app.
*/
angular.module('sproutApp.services', []);
|
export const recordDataTableDefaultState = {
currentPage: 1,
recordsPerPage: 25,
keyValues: [],
summaryValues: [],
sortFields: [{ field: 'DATE_MODIFIED', descending: true }],
records: [],
totalSize: 0,
availableOwners: [],
onlyMyOwnRecords: false,
ownerIds: [],
}
export const ge... |
'use strict';
export default class SearchHeaderController {
/*@ngInject*/
constructor($state) {
this.state = $state;
this.query = $state.params.query || '';
}
makeSearch() {
let shouldRefresh = this.state.current.name != 'search';
this.state.go('search', {
query: this.query
}, {
... |
class ActionController extends ModelController {
/*constructor(model, parent) {
super(model, parent);
}*/
getActions() {
return [
{'action': 'moveUp' , 'caption': 'Move Up' },
{'action': 'moveDown' , 'caption': 'Move Down' },
{'action': 'delete... |
'use strict';
const express = require('express');
const router = express.Router();
router.get('/default', (req, res) => {
res.send('index')
})
module.exports = router
|
const [{a}] = 0;
|
import React, {Component} from 'react';
import PropTypes from 'prop-types';
function getStyles(props, context) {
const {tableRowColumn} = context.muiTheme;
const styles = {
root: {
paddingLeft: tableRowColumn.spacing,
paddingRight: tableRowColumn.spacing,
height: tableRowColumn.height,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.