code stringlengths 2 1.05M |
|---|
var medianRange = require("../util/medianRange");
var RoomCache = function(dispatcher, db, options){
this.dispatcher = dispatcher;
this.db = db;
this.options = options;
this.init();
};
RoomCache.prototype = {
init: function(){
this.dispatcher.on("data:" + this.options.name)
}
};
module.exports = RoomCache; |
/*!
* Vue.js v0.12.12
* (c) 2015 Evan You
* Released under the MIT License.
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define(factory);
else if(typ... |
game.PlayerEntity = me.Entity.extend({
init: function(x, y, settings) {
this.setSuper(x, y);
this.setPlayerTimers();
this.setAttribute();
this.type = "PlayerEntity";
this.setFlags();
//fixing the camera on the player
me.game.viewport.follow(this.pos, me.game.viewport.... |
import * as React from "react";
import Slide from "../../components/slide";
import SlideTitleComic from "../../components/slide-title-comic";
import {
Appear
} from "spectacle";
const bgImage = require("../../images/hulk-feriggno-bixby.jpg");
class ImageSlide extends React.Component {
render() {
return (
... |
version https://git-lfs.github.com/spec/v1
oid sha256:7c0f5855a52d3038406a0db5e8c36784ffc77a180ad8c6b15601537019b6e552
size 1372
|
'use strict';
(function(angular){
/* global moment */
var Module = angular.module('datePicker', []);
Module.constant('datePickerConfig', {
template: 'templates/datepicker.html',
view: 'month',
views: ['year', 'month', 'date', 'hours', 'minutes'],
momentNames: {
year: 'year',
month: 'month',
date: '... |
import * as highlightCondition from '../../../../../../dataServices/utils/highlight-condition-service';
import VcfAnalyzer from '../../../../../../dataServices/vcf/vcf-analyzer';
import {linearDimensionsConflict, NumberFormatter, PixiTextSize, Sorting} from '../../../../utilities';
import {GeneTransformer} from '../../... |
var tape = require('tape')
var stream = require('../')
tape('pipe', function (t) {
t.plan(7 + 2)
var datas = [
Buffer('a'),
Buffer('b'),
Buffer('c'),
Buffer('d'),
Buffer('e'),
Buffer('f'),
Buffer('g')
]
var i = 0
var j = 0
var rs = stream.Readable({
read: function (cb) {
... |
var TackleBox = require('../dist/tacklebox.js').TackleBox;
var Hooks = new TackleBox.Hooks();
var Calculator = function() {
function Calculator(a, b) {
this.a = a;
this.b = b;
}
Calculator.prototype.add = function() {
// This hook will only be called a single time
var beforeAdd = Hooks.callOnc... |
PocApp.module("LoginApp", function (LoginApp, App, Backbone, Marionette, $, _) {
LoginApp.Router = Marionette.AppRouter.extend({
appRoutes:{
'login': 'showLogin'
}
});
var API = {
showLogin: function(){ return LoginApp.Show.Controller.showLogin(); }
};
PocApp.a... |
// Regular expression that matches all symbols in the Glagolitic block as per Unicode v9.0.0:
/[\u2C00-\u2C5F]/; |
import angular from 'angular';
import _ from 'underscore';
import { sum, flatMap } from '../util';
import template from './dimLoadoutPopup.directive.template.html';
angular.module('dimApp')
.directive('dimLoadoutPopup', LoadoutPopup);
function LoadoutPopup() {
return {
controller: LoadoutPopupCtrl,
contro... |
var interpreter = require('./interpreter');
var forms = require('./forms');
var utils = require('./utils');
var defaultEnv = {
lambda: forms.lambda,
define: forms.define,
defmacro: forms.defmacro,
quote: forms.quote,
'if': forms.if,
'<': function (a, b) { return a < b; },
'>': function (a, b) { return a ... |
function foo() {
function count() {
let count = 1;
bar(count);
return count;
}
return count;
}
|
var playerElement,
joliet = this;
function init() {
playerElement = fetchAudioElement(_playerIdentifier);
}
joliet.play = function() {
playerElement.play();
};
joliet.pause = function() {
playerElement.pause();
};
joliet.stop = function() {
joliet.pause();
playerElement.currentTime = 0;
};
... |
import * as actions from './actionTypes'
export function setName(name) {
return { type: actions.SET_NAME, name }
}
export function setAvatar(avatar) {
return { type: actions.SET_AVATAR, avatar }
}
function setQuizzes(quizzes) {
return { type: actions.SET_QUIZZES, quizzes }
}
function setQuiz(quiz) {
return ... |
var DependenciesList = require('./DependenciesList');
function AnalyzerState() {
this.processedFiles = {};
this.depList = new DependenciesList();
this.fileBases = {};
};
module.exports = AnalyzerState;
|
(function(){
//Removes token and returns user to login screen
var logout = function(){
localStorage.removeItem("token");
window.location.href = "/login";
}
var logoutEl = document.getElementsByClassName('signout')[0];
logoutEl.addEventListener('click', function(e){
e.preventDefault();
logout... |
/**
* Copyright (c) 2016-present ZENOME, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict'
var responseGenerator = require('../../util/responseGenerator');
var PublishModel = require('..... |
// 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... |
{
return destinationInsertionPointsTable.get(node);
}
|
import FakeNode from './FakeNode'
import {
walkItemTree,
reattachAll,
restoreRenderedStyles,
saveRenderedStyles
} from '../../src/utils'
var chai = require('chai')
var spies = require('chai-spies')
var assert = chai.assert
chai.use(spies)
chai.should()
console.log(process.env.NODE_ENV)
describe('walkItemTree'... |
var events = require('events');
var util = require('util');
module.exports = Job;
function Job(collection, data) {
this.collection = collection;
if (data) {
// Convert plain object to JobData type
data.__proto__ = JobData.prototype;
this.data = data;
} else {
this.data = n... |
export const getGuildId = (msg) => {
return msg.guild.id;
};
export const getAuthorId = (msg) => {
return msg.author.id;
};
|
'use strict';
var User = require('../models/user');
module.exports = function(app, passport) {
app.post('/api/v_0_0_1/users', function(req, res) {
User.findOne({'basic.email' : req.body.email}, function(err, user) {
if(err) return res.status(500).json(err);
if(user) return res.status(401).json({'ms... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
class AmnesiaReact extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
... |
/**
* SelectPluginItem
* @constructor
* @struct
*/
function SelectPluginItem() {
'use strict';
/**
* Name of the instance
* @type {string}
*/
this.name = '';
/**
* Description
* @type {string}
*/
this.description = '';
/**
* Is Plugin active for instance... |
//缓存选中时间节点
var sjwdNode = "",
sjwdName = "";
function sum(rowcol) {
drawChart.Math_SUM(rowcol);
$(".table-container").html(toHtml());
setTuOption(); // 作图
}
function avg(rowcol) {
drawChart.Math_AVG(rowcol);
$(".table-container").html(toHtml());
setTuOption(); // 作图
}
function max(rowcol)... |
var assert = require('assert');
var Difficulty = require('../eote-model/dice/Difficulty');
var lodash = require('lodash');
describe('Difficulty', function () {
var die = new Difficulty();
describe('#name', function () {
it("name is 'Difficulty'", function () {
assert.equal("Difficulty", die... |
module.exports = {
src: ["Gruntfile.js", "js/*.js", "!js/lib/"],
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
eqnull: true,
browser: true,
unused:false,
globals: {
$: true,
jQuery: tru... |
/* Task Description */
/*
Write a function that sums an array of numbers:
numbers must be always of type Number
returns `null` if the array is empty
throws Error if the parameter is not passed (undefined)
throws if any of the elements is not convertible to Number
*/
function sum(arr) {
var leng... |
import {parseAndGetExpression} from '../../../utils';
import {expect} from 'chai';
describe('ObjectExpression', () => {
it('should return correct type', () => {
expect(parseAndGetExpression('{x}').type).to.equal('ObjectExpression');
});
it('should accept single key', () => {
let expression... |
import React, { Component } from 'react';
import {StyleSheet } from 'react-native';
import { Provider } from 'react-redux';
import configureStore from './store/index';
import {App} from './containers/Home';
import SplashPage from './containers/SplashPage';
export default class App extends Component {
constructor(p... |
define(
//begin v1.x content
({
createLinkTitle: "Lingi atribuudid",
insertImageTitle: "Pildi atribuudid",
url: "URL:",
text: "Kirjeldus:",
target: "Siht:",
set: "Määra",
currentWindow: "Praegune aken",
parentWindow: "Algaken",
topWindow: "Kõige pealmine aken",
newWindow: "Uus aken"
})
//end v1.x content
);
|
Tabset = function(){};
Tabset.initialize = function() {
$$('.tabs').each(Tabset.initOneTabset);
if (window.location.hash != '') {
var tab_with_focus = 'tab_'+window.location.hash.substring(1, window.location.hash.length);
Event.fire(tab_with_focus, 'tabs:tabfocus');
}
}
Tabset.initTab = function(tab, ... |
import { SEARCH_OBJECT_TYPES } from "actions"
import ReportCollection, {
FORMAT_CALENDAR,
FORMAT_MAP,
FORMAT_STATISTICS,
FORMAT_SUMMARY,
FORMAT_TABLE
} from "components/ReportCollection"
import PropTypes from "prop-types"
import React from "react"
import utils from "utils"
const SavedSearchTable = props => {... |
var assert = require("chai").assert
var fs = require("fs")
var exe = require("../lib/exe-append")
describe("append", function() {
describe("with non buffer", function() {
it("should throw error if buffer is too short", function() {
assert.throws(function() {
exe.append("foo", "bar")
}, "Exec... |
/**
* Demo CRUD interface namespace
*/
var CRUD = {
current: 1,
userform: null,
userlist: null,
usergroupslist: null,
selectedGroups: []
};
/**
* Run initialize when jQuery is ready
*/
CRUD.init = function () {
CRUD.userform = $('#containerUserForm');
CRUD.userlist = $('#conta... |
"use strict";
module.exports = function(sequelize, DataTypes) {
var Package = sequelize.define('package', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true,
unique: true
},
company_id: {
... |
/* globals $ */
/*
Create a function that takes a selector and COUNT, then generates inside a UL with COUNT LIs:
* The UL must have a class `items-list`
* Each of the LIs must:
* have a class `list-item`
* content "List item #INDEX"
* The indices are zero-based
* If the provided selector does not selects anyt... |
'use strict'
const { createServer } = require('net')
const EventEmitter = require('events')
const debug = require('debug')('socket.io-monitor')
const protocol = require('./protocol')
/**
* Options:
* - server: boolean = true (start server ? Otherwise just expose the emitter)
* - port: number = 9042
* - host: str... |
import template from '../../tpl/grid.tpl';
import Magic from '../utils/magic';
import $elems from '../utils/elems';
export default class Grid extends Magic {
constructor() {
super();
$elems.body.append(template({ counter: 10 }));
}
}
|
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdRemove(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="38 26 10 26 10 22 38 22" />
</IconBase>
);
}
export default MdRemove;
|
// DATA_TEMPLATE: empty_table
oTest.fnStart("aoColumns.iDataSort");
$(document).ready(function () {
/* Should know that sorting already works by default from other tests, so we can jump
* right in here
*/
var oTable = $('#example').dataTable({
"sAjaxSource": "../../../examples/ajax/sources/ar... |
/* eslint-disable global-require */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './modules/App/App';
const isBrowser = typeof window != 'undefined' && window.document; // eslint-disable-line
// require.ensure polyfill for node
if (typeof require.ensure !== 'function') {
... |
'use strict'
var path = require('path')
, chai = require('chai')
, expect = chai.expect
, helper = require('../lib/agent_helper')
, codec = require('../../lib/util/codec')
, Segment = require('../../lib/transaction/trace/segment')
, Trace = require('../../lib/transac... |
define([
'../core'
], function(cog) {
/**
*
* @namespace math
* @memberof cog
*/
var math = (function() {
return {
radians: function(degrees) {
},
degrees: function(radians) {
},
sign: function(x) {
... |
import React from 'react';
import { Link } from 'react-router';
import expect from 'expect';
import { mount } from 'enzyme';
import MetaField from '../MetaField';
import MetaButtons from '../MetaButtons';
import MetaArray from '../MetaArray';
import MetaObject from '../MetaObject';
import MetaArrayItem from '../MetaAr... |
// @flow
import React from 'react'
import { connect } from 'react-redux'
import * as actionCreators from './action'
class MyComponent extends React.Component {
// Flow工具檢查用
state: { inputValue: string }
constructor(props) {
super(props)
// 在文字輸入時使用state
this.state = { inputValue: '' }
}
// 處... |
var xmlFileName = "xmlfile.xml";
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", xmlFileName, false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML;
x = xmlDoc.getElementsByTagName("person");
function displayUser() {... |
function setup() {
createCanvas(window.innerWidth, window.innerHeight);
}
function draw() {
background(255);
fill(random(255), random(255), random(255));
ellipse(mouseX, mouseY, 100, 100);
}
function windowResized() {
createCanvas(window.innerWidth, window.innerHeight);
} |
'use strict';
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/dinf-app1',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.c... |
import PropTypes from 'prop-types';
import React from 'react';
import {
Card,
CardContent,
Grid,
Typography
} from '@material-ui/core';
import {
contextPropTypes
} from '../../AppContext';
import GardenPlot from './GardenPlot';
export default class GardenDisplay extends React.Component {
static propType... |
#!/usr/bin/env node
const commander = require('commander');
const Config = require('../src/config');
const collect = require('../src/collect');
const { InitCommand } = require('../src/commands');
const { LogService } = require('../src/services');
const command = `${Config.COMMAND} init`;
const program = new commande... |
var DBManager = require('../modules/database-manager')
, db = new DBManager()
, bcrypt = require('bcrypt-nodejs')
, _ = require('underscore');
var table = 'post_category_relationships';
function PostCategoryRelation () {
};
PostCategoryRelation.updateAll = function(id, categories) {
db.destroy(table, 'post... |
typeSearchIndex = [{"l":"All Classes","url":"allclasses-index.html"},{"p":"main","l":"BinaryToDecimalConversion"}] |
var _ = require('lodash');
var utils = require('./utils');
var ajax;
if (typeof XMLHttpRequest !== 'undefined') {
ajax = require('@isoldajs/browser-ajax');
} else {
ajax = function () {
console.warn("AJAX function not implemented, sync won't happen");
}
}
// Map from CRUD to HTTP
var methodMap = {
'crea... |
'use strict';
angular.module('test.controllers', [])
.controller('mainCtrl', ['$scope', 'l10n', '$route', '$location', '$http', 'toaster', function($scope, l10n, $route, $location, $http, toaster) {
var defaultLang = "ua";
$scope.languages = {
ua : {name : 'ua', image : 'ua.gif', locale : 'uk-UA'},
... |
editor.keyboard = new MD.Keyboard();
editor.menu = new MD.Menu();
editor.toolbar = new MD.Toolbar();
editor.rulers = new MD.Rulers();
editor.canvas = new MD.Canvas();
editor.text = new MD.Text();
editor.panel = new MD.Panel();
editor.zoom = new MD.Zoom();
editor.paintBox = {
fill: new MD.PaintBox('#fill_color', 'fill... |
import classnames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import {mergeProps} from 'pui-react-helpers';
import 'pui-css-grids';
export class Row extends React.Component {
static propTypes = {
componentClass: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
gu... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'myApp.view1',
'myApp.view2',
'myApp.version',
'ngMap'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.otherwise({redirectTo: '/view1'});
}]);
|
/*
** Account controller : account.server.controller.js
**
** LCL Back-end
** ballot_g
*/
var mongoose = require('mongoose');
var Account = mongoose.model('Account');
|
'use strict';
/**
* Module dependencies
*/
var acl = require('acl');
// Using the memory backend
acl = new acl(new acl.memoryBackend());
/**
* Invoke Brands Permissions
*/
exports.invokeRolesPolicies = function () {
acl.allow([{
roles: ['admin'],
allows: [{
resources: '/api/brands',
permiss... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _Checkbox = require('./Checkbox.web');
var _Checkbox2 = _interopRequireDefault(_Checkbox);
var _CheckboxItem = require('./CheckboxItem.web');
var _CheckboxItem2 = _interopRequireDefault(_CheckboxItem);
var _AgreeItem = require('./A... |
import React from 'react';
import { Icon, Button } from '../../index';
const IconPage = () => (
<div className="displaySection">
<h2><a href="https://pearson-higher-ed.github.io/design/c/icons/beta">Icons</a></h2>
<div className="elementContainer">
<div className="code">
... |
module.exports = {
remoteUrl:'mongodb://ikunalrai:mlab135@ds027145.mlab.com:27145/stencil-dev',
localUrl: 'mongodb://localhost:27017/stencil-dev',
modulusUrl: 'mongodb://ikunalrai:abc123@jello.modulusmongo.net:27017/roqo2xOb'
}; |
;(function () {
var fixtures = {
'ui_router_app': {
path: './ui_router_app/ui_router_app.js',
deps: ['opbeat-angular', 'offline-js', 'angular', 'angular-ui-router', 'angular-resource'],
options: {
appName: 'ui_router_app',
useNgApp: false,
uiRouter: true,
opbeatCo... |
// @flow
import {
extraArgsNotAllowed,
repeatNotAllowed
} from "../../errors/compatibility";
import I from "../../index";
const id = "id";
const name = 9;
const fn = x => x.name;
let result;
const print = jest.fn(_ => {});
const timer = jest.fn(_ => 0);
I.config({ format: false, print, timer });
afterEach(() ... |
module.exports = function (grunt) {
return {
devSource: {
options: { mode: true },
src: [
'src/**',
'ui_framework/dist/**',
'bin/**',
'webpackShims/**',
'config/kibana.yml',
'!src/**/__tests__/**',
'!src/test_utils/**',
'!src/fixtures/**'... |
'use strict';
/**
* file onyxc_int
*/
var NUM_YV12_BUFFERS = 4;
var MAX_MB_SEGMENTS = 4;
class dequant_factors {
constructor() {
this.quant_idx = 0;
this.factor = [
new Int16Array([0, 0]), //Y1
new Int16Array([0, 0]), // UV
new Int16Array([0, 0]) //Y2
... |
(function _globals() {
var $overlay = $('#overlay')
var $wrapper = $('#wrapper')
var $menuButton = $('#menuButton')
var $menuClose = $('#closeBtn')
var $menuItemsDiv = $('#menuItemsDiv')
var $menuItems = $menuItemsDiv.find('li')
var $prevImage = $('#previewImage')
var $select = $('#sele... |
var assert = require('chai').assert
var validator = require('..')
describe('validator main', function () {
var is_hello
before(function () {
is_hello = validator().match('hello')
})
it('must be a function', function () {
assert.equal(typeof is_hello, 'function')
})
it('must store function names'... |
(function() {
var coopy = null;
if (typeof exports != "undefined") {
if (typeof exports.Coopy != "undefined") {
coopy = exports;
}
}
if (coopy == null) {
coopy = window.daff;
}
var CellView = function() {
}
CellView.prototype.toString = function(d) {
return ""+d;
}
CellView.prototype.equals = funct... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... |
const fs = require("fs"),
base64 = require("base-64/base64.js");
module.exports.readBase64 = function (f) {
return base64.encode(String(fs.readFileSync(f)));
};
|
/**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react'
i... |
// WATCHDOG
var watchdog;
var watchDogTimer;
// INITIATION
var firstLoad=true;
function onFirstLoad(){
$("#timeSlider").val(0);
document.getElementById("timeSlider").style.visibility = 'visible';
document.getElementById("gauge").style.visibility = 'visible';
document.getElementById("scaleLabel").style.visibility =... |
/*
Read-only JSON API
*/
let caps = require('../caps'),
config = require('../../config'),
db = require('../../db'),
express = require('express'),
state = require('../state'),
util = require('./util'),
winston = require('winston');
let app = module.exports = express();
// Use a subapp instead of a router, so ... |
import React from 'react';
import { Scatter } from 'react-chartjs-2';
const scatterChart = ({color = 'blue', values = [], keys = {}, title = ''}) => {
const data = {
datasets: [{
label: `${keys.x} / ${keys.y}`,
fill: false,
pointBackgroundColor: 'rgba(0, 0, 0, 0)',
pointBorderCol... |
import DS from 'ember-data';
var attr = DS.attr,
hasMany = DS.hasMany ;
export default DS.Model.extend({
name: attr('string'),
districts: hasMany('district', { async: false })
});
|
import React from 'react'
class ClaimButton extends React.Component {
render() {
let starIndex = this.props.starIndex;
return(
<button onClick={(event) => this.props.onClaimClick(event, starIndex)}>Claim this star</button>
)
}
}
export default ClaimButton
|
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Wor... |
'use strict';
var winston = require('winston');
var pkg = require('../package.json');
var child_process = require('child_process');
var monitor_runner = require('../lib/monitor_runner');
var configuration_updater = require('../lib/configuration_updater');
winston.info('Codeine Peer - ' + pkg.version);
|
var YTS = {};
function report(str) { console.log(str); }
YTS.YOUTUBE_V3_CLIENT_LOADED = false;
YTS.MONTH_NAMES = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
YTS.API_ACCESS_KEY = 'AIzaSyBuQiHS4B-axfTUpBGNeJlF2J78k962zkc';
/** Initialize portions of page on page load and cre... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
import React from 'react'
import TestUtils from 'react-addons-test-utils'
import expect from 'expect'
import expectJsx from 'expect-jsx'
import { RadioButtonGroup } from 'material-ui/RadioButton'
import getMuiTheme from 'material-ui/styles/getMuiTheme'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
... |
var Bookshelf = require('../config/database');
require('./user-model');
var Info = Bookshelf.Model.extend({
tableName: 'infos',
hasTimestamps: true,
softDelete: true,
user: function() {
return this.belongsTo(User);
}
});
module.exports = Bookshelf.model('Info', Info);
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2016-2020 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
... |
import React, { Component, PropTypes } from 'react';
import styles from './styles';
export default class NavBar extends Component{
render(){
return <ul className={`${styles}`}>
<li>
<i className="anticon anticon-home"></i>
<span>后台首页</span>
</li>
<li>
<i className="anticon anticon... |
import React from 'react';
import PropTypes from 'prop-types';
import { useMediaSources } from '../../../context/MediaSourceContext';
import LoadingPanel from './LoadingPanel';
const { Suspense } = React;
const PlaylistImport = ({
selectedSourceType,
sourceStates,
onShowImportPanel,
onHideImportPanel,
}) => {... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const TeventDispatcher_1 = require("../events/TeventDispatcher");
const express = require("express");
class TrestEndpoint extends TeventDispatcher_1.TeventDispatcher {
constructor(config) {
super();
this.config = nul... |
var searchData=
[
['exitcell',['ExitCell',['../struct_map_1_1_exit_cell.html#a86f2e252462c87d45cb9a8b513e8bed1',1,'Map::ExitCell']]]
];
|
// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute... |
<div>
<MenuItem
onClick={() => {
analytics('Clicked Menu > Progress');
}}
rightIcon={<ProgressIcon />}>My Progress</MenuItem>
<MenuItem
onClick={() => {
analytics('Clicked Menu > Progress2');
}}
rightIcon={<ProgressIcon />}>{true ? "My Progress" : "Not progress"}</MenuItem>
<Me... |
module.exports = {
rules: {},
};
|
(function () {
var sticky = new StickyLayout();;
var fullWidth = new FullWidthLayout();
$(document).ready(function () {
fullWidth.refresh();
sticky.init();
sticky.refresh();
$('[data-full-width-large], [data-full-width-small], .mb-full-width').css('visibility', '');
});... |
module.exports.parse = function(arr){
arr.forEach(function(val){
var matches = val.match(/^-(\w+):("?)([^"]+)\2$/);
if(matches){
module.exports[matches[1]] = matches[3];
}
});
} |
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const {CheckerPlugin} = require('awesome-typescript-loader');
const {createLodashTransformer} = require('typescript-plugin-lodash');
const lodashTransformer = createLodashTransformer();
c... |
import {BufferGeometry, Color, Float32BufferAttribute, LineSegments, LineBasicMaterial, VertexColors, Matrix4, Vector3} from "three";
function SkeletonHelper(object)
{
this.object = object;
var bones = SkeletonHelper.getBoneList(object);
var geometry = new BufferGeometry();
var vertices = [];
var colors = [];
... |
Meteor.publish('records', function() {
return Records.find({});
});
Meteor.publish('singleRecords', function(name) {
check(name, String);
return Records.find({"name": name});
});
Meteor.publish('searchResults', function (query) {
console.log(query);
check(query, {
name: Match.Optional(String),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.