code stringlengths 2 1.05M |
|---|
import createLinkStrategy from "./linkStrategy";
import Link from "../../components/Link";
const createLinkDecorator = ({ entityType }) => ({
strategy: createLinkStrategy({ entityType }),
component: Link,
});
export default createLinkDecorator;
|
import RangeParam from 'fivetwelve/lib/param/RangeParam.js'
import DmxDevice from './DmxDevice.js'
export default class StairvilleAF150 extends DmxDevice {
constructor(options) {
super(Object.assign({}, options, {
params: {
amount: new RangeParam(1, { min: 0, max: 255 })
}
}))
this.... |
/**
* Fake Broken jQuery for Javascript Syntax Testing
*
*/
(function( window, undefined ) {
// Can't do this because several apps including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
// Support: Firefox 18+
//"use stric... |
/**
* @author xeolabs / https://github.com/xeolabs
*/
import {ShadowShaderSource} from "./shadowShaderSource.js";
import {Program} from "../program.js";
import {stats} from "../../stats.js";
const ShadowRenderer = function (hash, mesh) {
this._hash = hash;
this._shaderSource = new ShadowShaderSource(mesh);
... |
var Frex = require('frex.js');
var app = Frex();
app.configure(function() {
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(app.router);
app.use(Frex.static(__dirname + '/public'));
});
app.listen(8000, function() {
console.log('website is ready.');
});
|
var Trend = React.createClass({
render: function(){
return (
<li className="">
<a href={this.props.url}>{this.props.name}</a>
</li>
);
}
});
var Trends = React.createClass({
getTrends: function(){
$.ajax({
url: this.props.url,
dataType: 'json',
cache: false,
success: fun... |
(function () {
var u, d, t;
u = location.href;
if (document.getSelection) {
d = document.getSelection();
} else {
d = '';
};
t = document.title;
void(open('http://localhost:5000/bookmarks/add?bookmark_url='
+ encodeURIComponent(u)
+ '&description=' + encodeURIComponent(d)
+ '&title=... |
import _ from 'lodash';
import wpi, { OUTPUT } from 'wiringpi-node';
import EventEmitter from 'events';
import NanoTimer from 'nanotimer';
/**
* Node's EventEmitter module
* @external EventEmitter
* @see {@link https://nodejs.org/api/events.html}
*/
/**
* A Bunyan `Logger` instance
* @ext... |
describe("Reload", function(){
beforeEach(function(){
setFixtures("<div id='testfixture'>");
jasmine.clock().install();
});
it("reloads the element from the server", function(){
var ajaxSpy = spyOn($, 'ajax').and.callFake(function(options){
options.success("foo");
});
var behavior = ... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.10.1-master-e26a275
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.subheader
* @description
* SubHeader module
*
* Subheaders are special list tiles that deline... |
var mocha = require('mocha'),
expect = require('chai').expect,
sinon = require('sinon'),
sandbox,
exporter = require('./export'),
childProcess = require('child_process'),
mkdirp = require('mkdirp')
;
describe('export', function(){
beforeEach(function(){
sandbox = sinon.sandbox.create();
})... |
$(document).ready(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('#flash-pop-up').fadeOut();
$('#back-to-top').fadeIn();
} else {
$('#back-to-top').fadeOut();
}
});
$(function () {
$("#flash-pop-up").fadeIn(... |
var _ = require('underscore');
var util = require('util');
var yargs = require('yargs');
var HttpError = require('../errors/http');
var ValidationError = require('../errors/validation');
var RestAPI = require('oae-rest');
var _yargs = new yargs()
.usage('Usage: config-clear -k <key> [-k <key> ...] [--tenant=<ten... |
import marked from 'marked';
import faqMarkdown from '../markdown/faq.md';
export default () => (
<div className="container faq">
<h1>FAQ</h1>
<p>These Frequently Asked Question are real questions of developers started with BEM, answered by the GetBEM community.
Feel free to <a href="https://github.com/getbem/... |
var gulp = require('gulp');
var path = require('path');
var del = require('del');
var gulpif = require('gulp-if');
var sass = require('gulp-sass');
var minifyJS = require('gulp-uglify');
var minifyCSS = require('gulp-clean-css');
var minifyHTML = require('gulp-htmlmin');
var pump = require('pump');
var argv = require('... |
var _ = require('lodash')
, logger = require('../logger')
, EntityHelper = require('./entity_helper')
, Client = require('../entities/client')
, p = require('../misc/promise')
, util = require('util')
var Clients = EntityHelper.extend({
constructor: function (application, options)
{
... |
define([
"bootstrap",
], function () {
function resizeHeaderSearch() {
var mainLogoWidth = $("#main-logo").outerWidth();
var mainMenuWidth = $("#main-menu").outerWidth();
$("#header-search").css("padding-left", mainLogoWidth + "px");
$("#header-search").css("padding-right", main... |
/**
* Module dependencies.
*/
var connect = require('connect')
, Router = require('./router')
, methods = require('methods')
, middleware = require('./middleware')
, debug = require('debug')('express:application')
, locals = require('./utils').locals
, View = require('./view')
, url = require('url')
... |
const scene = document.querySelector('a-scene')
const sky = document.querySelector('a-sky')
const objectContainer = document.querySelector('#object-container')
function getRandomNumber(x, y) {
return Math.floor(Math.random() * x + y)
}
const totalSteps = getRandomNumber(17, 10)
const totalRotations = getRandomNumbe... |
var foo = function() {
alert('Debug is set');
var bar = "Hello World";
};
|
'use strict';
require('../../../src/utils/niType');
require('../../../src/utils/niLoop');
const sampleArray = require('../../fixtures/model/queryBuilder/select.fix');
const assert = require('chai').assert;
const NIQueryBuilder = require('../../../src/model/niQueryBuilder');
describe('NIQueryBuilder', () => {
describ... |
var Template = function(episodes) {
function episodeLockups(){
output = ``
for(i=0; i<episodes.length; i++){
episode = episodes[i]
output += `<lockup view="episode" episode="${episode.id}" series="${episode.series.id}">
<img src="${episode.image ? episode.image : resourceLoader.BASEURL +... |
describe('fiveApi.docs.monsters', function() {
var $controller;
beforeEach(module('fiveApi'));
beforeEach(module('fiveApi.apiService'));
beforeEach(module('fiveApi.docs'));
beforeEach(module('fiveApi.docs.monsters'));
beforeEach(module('ui.router'));
beforeEach(inject(function(_$controller_) {
$cont... |
const cache = require('memory-cache');
module.exports = {
getToken: async (appid, secret) => {
log4.Info('===获取token====');
const url = `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${appid}&secret=${secret}`;
const response = await fetchData(url, 'GET');
... |
/**
* @requires module:mysql
*
* @author Cyrus Sarkosh
*
* @module handleDisconnect
* @desc Creates a connection to mysql and handles the PROTOCOL_CONNECTION_LOST error. On success, the connection variable is made globally accessible to the express instance.
* @param {object} config The configuration to connect... |
var async = require('async');
var _ = require('lodash');
/*
* hydrate_options.types {Array} - List of types to hydrate
* hydrate_options.depth {Number} - number of levels to hydrate. default is 1 and means that we send back the data from get() for models and entities.
* If depth is 0, then we send back the entity t... |
var express = require('express');
var app = express();
var compression = require('compression');
var port = process.env.PORT || 1337;
app.get('/', function(req, res) {
res.sendFile(__dirname + '/dist/index.html');
});
app.get('/playground', function(req, res) {
res.sendFile(__dirname + '/dist/playground.html');
... |
(function () {
'use strict';
var exports = window.SIM || {};
window.SIM = exports;
exports.LIMB_COLORS = {
left_pes: 'DodgerBlue',
right_pes: 'DarkOrange',
left_manus: 'DarkOliveGreen',
right_manus: 'DarkOrchid'
};
/**
*
*/
function drawMidline() {
var lineMaker = d3.svg.line... |
import React from 'react'
import Share from './../../_model/Share'
export default React.createClass({
render() {
return (
<Share
title = "React.js + LaTeX"
description = "Toy app exploring how LaTeX can be used with React.js."
type = "article"
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import * as actions from '../../actions';
class ArtistDetail extends Component {
componentWillMount() {
this.props.findArtist(this.props.params.id);
}
componentWillReceiveProps(nextProps) {
... |
"use strict";
let numbersValidator = require('./validators/numbers.validator.js');
let validValidator = new numbersValidator(6, 7, 7);
console.log(`valid: ${validValidator.validate()}`);
|
//Icon ##################################################################################
var ms = require("../ms.js");
module.exports = function icon() {
var drawArray1 = [];
var drawArray2 = [];
var gbbox = new ms.BBox({ x1: 50, x2: 150, y1: 50, y2: 150 });
var icons, iconColor;
//This is the building blo... |
//Local lang
import en from './en.js';
import zh from './zh-CN.js';
//Element lang
import Een from 'element-ui/lib/locale/lang/en'
import Ezh from 'element-ui/lib/locale/lang/zh-CN'
module.exports = {
'zh-CN': Object.assign(zh, Ezh),
'en': Object.assign(en, Een)
} |
import React from 'react'
export default class Saved extends React.Component {
static propTypes = {
saved: React.PropTypes.bool,
className: React.PropTypes.string.isRequired,
}
static defaultProps = {
className: 'frigb-saved pull-right',
}
render() {
const { saved, className } = this.props
... |
'use strict';
var app = app || {};
(function(module){
const load = {};
load.homePage = () => {
$('.nav-links a').removeClass('active-link');
$('.aboutUsAll').hide();
$('.toilet-form').hide();
$('.bored-main').hide();
$('.mainContent').fadeIn();
$('.homeLink').addClass('active-link');
... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import invariant from 'invariant';
import _ from 'lodash';
import Immutable from 'immutable';
import moment from 'moment';
import classnames from 'classnames';
//
import Menu from '@material-ui/core/Menu';
import MenuL... |
/**
* @module app.backgroundlayer
*/
const exports = {};
import './backgroundlayer.css';
import ngeoSourceAsitVD from 'ngeo/source/AsitVD.js';
import EPSG21781 from 'ngeo/proj/EPSG21781.js';
import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerImage from 'ol/layer/Image.js';
import olLayerT... |
class Test {}
/**
* @param {Test} a
* @returns {Test}
* @typecheck
*/
function test(a) {
__executeTypecheck__("test", "a", a, Test);
return __executeTypecheck__("test", "return", a, Test);
}
|
/*!
* Readingbar jQuery plugin
*
* @author : http://twitter.com/nicovanzyl
* @author : http://twitter.com/wixelhq
* @url : https://github.com/Wixel/readingbar.git
* @copyright: 2016 Wixel
* @license : MIT license
* @version : 1.1
*/
(function($) {
$.fn.viewportOffset = function() {
var offset... |
var Chess = require('chess.js').Chess;
var opposite = require('chessground').util.opposite;
module.exports = function(cfg) {
cfg = cfg || {};
cfg.color = cfg.color || 'white';
cfg.fen = cfg.fen || "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
var chess = new Chess(cfg.fen);
return {
"game... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.0-rc.5-master-3a0f323
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.tooltip
*/
angular
.module('material.components.tooltip', [ 'material.core' ])
.direc... |
//Autogenerated by ../../build_app.js
import nutrition_order_supplement_component from 'ember-fhir-adapter/serializers/nutrition-order-supplement-component';
export default nutrition_order_supplement_component; |
const version = require('child_process').execSync('git describe --always', { cwd: __dirname }).toString().trim();
module.exports = {
is: "project",
name: "Aspects Buildsystem module",
"envs=": { is: 'group',
"node=": { is: 'environment' },
},
"Files=": { is: 'group', elements: [
{ is: 'group', nam... |
/**
* @author v.lugovksy
* created on 16.12.2015
*/
(function () {
'use strict';
angular.module('HomeCash.pages.dashboard')
.service('dashboardPieChart', dashboardPieChart);
/** @ngInject */
function dashboardPieChart() {
}
})(); |
// @flow
import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { PasswordField } from './password-field';
import { passwordFieldUpdate } from '../actions';
import { selectPropsPasswordField } from '../selectors';
import { getStoreKey } from '../../reducer';
function mapDispatch(dispatch... |
import { mount } from '@vue/test-utils'
import { waitNT, waitRAF } from '../../../tests/utils'
import BToast from './toast'
describe('b-toast', () => {
beforeAll(() => {
// Prevent multiple Vue warnings in tests
jest.spyOn(console, 'warn').mockImplementation(() => {})
})
afterAll(() => {
console.war... |
"use strict";
exports.insertPharmaQueue = function(conn, queue, cb){
var sql = "insert into pharma_queue set pharma_state = ?, visit_id = ?";
var args = [queue.pharma_state, queue.visit_id];
conn.query(sql, args, function(err, result){
if( err ){
cb(err);
return;
}
cb(undefined, ... |
/**
** Kevin's comments: Off to a good start here, but why not use variables for color? Hard coded numbers make it extremely
difficult to tweak and design.
**/
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
noLoop();
}
function draw() {
//top rect
fill(116,71,114);
rect(0,0,w... |
/*
* Fixed-To-Mobile Number Mapper
* Copyright (c) 2015 Sebastian Schumann
* This code is released under the MIT License.
* The license is available in the LICENSE file distributed with the project.
*/
var f2m = angular.module('f2m-app', []);
f2m.controller('bodyController', ['$scope', '$http', function($scope, ... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define({openInApp:"{appName} uygulamas\u0131nda a\u00e7",view:"G\u00f6r\u00fcnt\u00fcle"}); |
const fs = require('fs');
const path = require('path');
const test = require('tape');
const load = require('load-json-file');
const write = require('write-json-file');
const distance = require('@turf/distance').default;
const { point, round } = require('@turf/helpers');
const rhumbDistance = require('./').default;
con... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.10.1-rc1
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.chips
*/
/*
* @see js folder for chips implementation
*/
angular.module('material.components.chips', [
'... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdMonochromePhotos(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 16v3.6c3.5 0 6.4 2.9 6.4 6.4 0 3.5-2.9 6.4-6.4 6.4V36c5.5 0 10-4.5 10-10s-4.5-10-10-10zm16-6c2.2 0 4 1.8 4 4v24c0 2.2-1.8 4-4 4H8c-2.2 0... |
// All code points in the `ASCII` category as per Unicode v4.1.0:
[
0x0,
0x1,
0x2,
0x3,
0x4,
0x5,
0x6,
0x7,
0x8,
0x9,
0xA,
0xB,
0xC,
0xD,
0xE,
0xF,
0x10,
0x11,
0x12,
0x13,
0x14,
0x15,
0x16,
0x17,
0x18,
0x19,
0x1A,
0x1B,
0x1C,
0x1D,
0x1E,
0x1F,
0x20,
0x21,
0x22,
0x23,
0x24,
0x25,
0... |
const isFunction = require("lodash/isFunction")
const includes = require("lodash/includes")
const intersection = require("lodash/intersection")
const without = require("lodash/without")
const concat = require("lodash/concat")
const assignCtx = require("uiks/core/assign")
const group = require("uiks/reaks/group")
const ... |
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
//res.send('respond with a resource');
var exec = require('child_process').exec, child;
child = exec('java -Xmx1200m -Dproduction=true -Djava.net.preferIPv4Stack=true -Dsun.java2d... |
// @flow
/**
* Find and return a nested object value.
*
* @param object to crawl
* @param path Property path
* @returns {any}
*/
export default function getNestedFieldValue(object : Object, path : Array<string>): any {
path = path || [];
object = object || {};
var value = object;
// walk down the prope... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
const express = require('express');
const validate = require('express-validation');
const expressJwt = require('express-jwt');
const paramValidation = require('../../config/param-validation');
let authCtrl = require('../controllers/auth');
const config = require('../../config/env');
const router = express.Router(); //... |
// tagcloud
(function(){
[].forEach.call( document.querySelectorAll('[tagcloud]'), function(cloud) {
// Find all tagcloud items with a weight defined and add them to this array
var weights = [].slice.call(document.querySelectorAll('[tagcloud-weight]'))
.map(function(el){ retu... |
var ActionTracker = function () {
'use strict';
var storage,
timeSeed,
options = {},
callbacks = {};
function constructor() {
storage = new Storage();
timeSeed = new TimeSeed();
}
function setCallbacks(callbacksObj) {
callbacks = callbacksObj;
}
function start(list, cfg... |
/*
Abstract data importer to fetch equities
Equity:
---------
An equity object should contain the following attributes:
{
isin: The ISIN unique equity id
wkn: The WKN unique equity id
name: The name of the equity
currency: e.g. EUR or USD
latestPrice: The cu... |
import { trackAndCatch } from '../../observables/observables';
import { VIEW_GIST_FETCH_DATA, VIEW_GIST_SET_STATE } from './view_gist_actions';
export default (action$, store, { api }) => (
action$.ofType(VIEW_GIST_FETCH_DATA)
.switchMap((action) => {
const { rawUrl } = action.payload;
return api.fe... |
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var newsSchema = new Schema({
// 标题
title: String,
// 内容
content: String,
// 作者
author: String,
// 发布时间
time: {
type: String,
default: Date.now()
},
images: Array
})
var News = mongoose.model('News', newsSchema)
module.export... |
/**
* Adds padding to the body for the header.
*/
(function() {
// var onResize = function() {
// // apply dynamic padding at the top of the body according to the fixed navbar height
// var body = jQuery("body");
//
// body.css("padding-top", jQuery(".navbar-fixed-top").height());
... |
import React from 'react'
import { findDOMNode } from 'react-dom'
import { render } from '../TestUtils'
import { Simulate } from 'react-addons-test-utils'
import Immutable from 'immutable'
import List from './List'
describe('List', () => {
const array = []
for (var i = 0; i < 100; i++) {
array.push(`Name ${i}`... |
"use strict";
module.exports = {
backspace: 8,
tab: 9,
enter: 13,
shift: 16,
ctrl: 17,
alt: 18,
pause: 19,
break: 19,
capsLock: 20,
escape: 27,
pageUp: 33,
pageDown: 34,
end: 35,
home: 36,
leftArrow: 37,
upArrow: 38,
rightArrow: 39,
downArrow: 40,... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+relay
*/
'use strict';
require('configureForRelayOSS');
const GraphQLCompilerContext = require('Gra... |
import Controller from '@ember/controller';
import { isBlank } from '@ember/utils';
import { computed } from '@ember/object';
import { or } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { later } from '@ember/runloop';
import { resolve, reject } from 'rsvp';
import ENV from '... |
// keywords: js, javascript, uuid generator
/**
* An Universal Unique ID generator
*
* @return {String} The new UUID.
*/
function uuid() {
function S4() {
return ("0000" + Math.floor(
Math.random() * 0x10000
).toString(16)).slice(-4);
}
function S8() {
return ("00000000" + Math.floor(
... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('shoppingList', [
'shoppingList.index',
'shoppingList.version',
]);
// .
// config(['$routeProvider', function($routeProvider) {
// $routeProvider.otherwise({redirectTo: '/view1'});
// }]); |
/**
* Remove whitespace filter
* @Param text
* @return string
*/
clankDocs.filter('removewhitespace', function () {
return function(text) {
return String(text).replace(/\s/g, "");
};
}); |
// Karma configuration
// Generated on Mon Jun 01 2015 15:24:49 GMT+0800 (中国标准时间)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keywor... |
use philly_tech_calendar;
db.calendars.insert({cal_id:'bv1dmjq3fd16ks12042ejoa0ug@group.calendar.google.com', name:'Philly Group1'});
db.calendars.insert({cal_id:'n72tsjpj1gkr0vn4udnvg80k7o@group.calendar.google.com', name:'Philly Group2'});
|
const React = require('react')
const PropTypes = require('prop-types')
const uppyPropType = require('./propTypes').uppy
const h = React.createElement
class UppyWrapper extends React.Component {
constructor (props) {
super(props)
this.refContainer = this.refContainer.bind(this)
}
componentDidMount () {... |
var Backbone = require('backbone')
var ItineraryWalkStep = Backbone.Model.extend({
defaults: {
distance: null,
relativeDirection: null,
absoluteDirection: null,
streetName: null,
exit: null,
stayOn: null,
bogusName: null,
lon: null,
lat: null
}
})
module.exports = ItineraryWalk... |
var keys="notset";
// Function to send a message to the Pebble using AppMessage API
// We are currently only sending a message using the "status" appKey defined in appinfo.json/Settings
function sendStatus(status) {
Pebble.sendAppMessage({"status": status}, messageSuccessHandler, messageFailureHandler);
}
// Called ... |
'use strict';
module.exports = resolveRootURL;
function resolveRootURL(config) {
return config.rootURL || '';
}
|
function updateObject(srcObj, destObj) {
for (var key in destObj) {
if(destObj.hasOwnProperty(key) && srcObj.hasOwnProperty(key)) {
destObj[key] = srcObj[key];
}
}
}
function compare(a,b) {
if (a.id > b.id)
return -1;
if (a.id < b.id)
return 1;
return 0;
}
Object.size = f... |
import app from './app';
import http from 'http';
import glob from 'glob';
import log4js from 'log4js';
import config from '../../config';
import { Utils } from './app/utils';
export class System {
constructor() {
this.logger = log4js.getLogger('system');
this.port = Utils.normalizePort(process.e... |
#!/usr/bin/env node
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];ret... |
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');
describe('msb:editorconfig', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../generators/editorconfig'))
.on('end', done);
});
it('creates .editorconfig', f... |
/**
* @file TreeSelect component
*/
import React, {Component, createRef} from 'react';
import PropTypes from 'prop-types';
import isArray from 'lodash/isArray';
import classNames from 'classnames';
import Dropdown from '../Dropdown';
import Tree from '../Tree';
import TextField from '../TextField';
import Checkbox ... |
describe('appController', function () {
var test;
beforeEach(function () {
var
storageService = {
'get' : function () { return 'getValue'; }
},
spies = {
'storageService' : {
'get' : spyOn(storageService, 'get').and.callThrough()
}
},
dependenci... |
/* jshint -W117, -W030 */
describe('blocks.exception', function() {
var exceptionHandlerProvider;
var mocks = {
errorMessage: 'fake error',
prefix: '[TEST]: '
};
beforeEach(function() {
module('blocks.exception', function($provide, _exceptionHandlerProvider_) {
excep... |
search_result['366']=["topic_00000000000000B9_props--.html","StatusVideoCompose Properties",""]; |
var cluster_0 = {
"Limch1":[1.2284474666055,-0.860668693039697,-0.606977054524655,1.40574903822665,-0.0619948828084739,-0.379839904583293,1.37797894734317,-0.0747622429994453,-0.999077812224923,1.0136008792587,-0.673577411324757,-1.36887832992878],
"Satb2":[1.44620080036378,-0.982622692493135,-1.35627195240121,1.48... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var HewanSchema = new Schema({
name: String
});
module.exports = mongoose.model('Hewan', HewanSchema); |
version https://git-lfs.github.com/spec/v1
oid sha256:2256d926933d3a2804f8eaaff81d4477e295d744aca8e8d54999c9478e91ac1a
size 2303
|
/**
* Created by grizet_j on 9/21/2015.
*/
var Ray = require('../../src/ray.js');
var Vector3 = require('../../src/vector3.js');
var Sphere = require('../../src/sphere.js');
var Triangle = require('../../src/triangle.js');
var Aabb3 = require('../../src/aabb3.js');
var TEST = require('./test_utils.js');
var vector_... |
$(window).scroll(function() {
$("div#vert_counter").text("px:" +$(window).scrollTop());
});
$(window).scroll(function() {
$("div.vert_parallax").css({
"top": ($(window).scrollTop()*1) + "px"
}).text("Regular:"+ $(window).scrollTop());
});
$(window).scroll(function() {
$("#parallax_wrap div:... |
// Comments are above the syntax they describe (unless they are on the same line as syntax)
// Makes a given web page element updatable (unique to Meteor)
// We have multiple web page elements, so instead declaring them as updatable individually,
// we created a function to reduce redundancy.
// function accepts two i... |
if (!(Session.getOnce && Session.getOnce.constructor && Session.getOnce.constructor === Function)) {
Session.getOnce = function(key) {
var v = Session.get(key);
return Session.set(key, void 0), v;
};
}
|
/**
* Imports selected studies from local into worklist
* @param filesToImport Files located in the client machine to import
*/
importStudies = function(filesToImport, importCallback) {
if (filesToImport.length < 1) {
return;
}
var fileUploadStatus = {
numberOfFilesUploaded: 0,
nu... |
'use strict';
angular.module('gc.loginController', [
'ngSecurityService'
]).controller('LoginController', [
'$scope', '$window', 'SecurityService',
function LoginController($scope, $window, SecurityService) {
function findById(id) {
return $window.document.getElementById(id);
}
// XXXXXXXXXXX... |
import gql from 'graphql-tag'
import { operationFieldsFragment } from './fragments'
export const createOperationMutation = gql`
mutation createOperation($operation: OperationInput!) {
operation: createOperation(operation: $operation) {
...operationFields
}
}
${operationFieldsFragment}
`
export con... |
'use strict';
/*!
* TODO: Description.
*/
var dgram = require('dgram');
var util = require('util');
var ip = require('ip');
var debug = require('../debug')('discovery:UdpBroadcast');
var Manager = require('../manager');
var Defaults = {
DGRAM_TYPE: 'udp4',
PORT: 44201,
INTERVAL: 3000,
MULTICAST_ADDRESS: '224... |
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
function setSessionCookie(cname,cvalue) {
document.cookie = cname + "=" + cvalue +... |
const { bookshelf } = require('../db/database')
require('./class')
require('./messages')
require('./academics')
require('./students')
const Teachers = bookshelf.Model.extend({
tableName: 'teachers',
class: function() { return this.belongsToMany('Students').through('Class')},
message: function() { return this.be... |
function init() {
var json = { title: "Product Feedback Survey Example", showProgressBar: "top", pages: [
{questions: [
{ type: "matrix", name: "Quality", title: "Please indicate if you agree or disagree with the following statements",
columns: [{ value: 1, text: "Strongly Disagr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.