code stringlengths 2 1.05M |
|---|
var UI = require('ui');
var ajax = require('ajax');
var Vector2 = require('vector2');
var webserver = decodeURIComponent(localStorage.getItem('webserver') ? localStorage.getItem('webserver') : 'webserver');
var qvserver = localStorage.getItem('qvserver') ? localStorage.getItem('qvserver') : 'qvserver';
var files = l... |
import Ember from 'ember';
var PluginsPopularRoute = Ember.Route.extend({
titleToken: 'Popular'
});
export default PluginsPopularRoute;
|
/**
* Created by Hernandes on 21/04/2016.
*/
function PessoaModel(m){
var self = this;
var base = new BaseModel();
ko.utils.extend(self,base);
self.PessoaID = ko.observable().defaultValue(0).extend({required:true});
self.Nome = ko.observable('').extend({required:true,editable:true});
... |
goog.provide('ol.DeviceOrientation');
goog.provide('ol.DeviceOrientationProperty');
goog.require('goog.events');
goog.require('goog.math');
goog.require('ol.Object');
goog.require('ol.has');
/**
* @enum {string}
*/
ol.DeviceOrientationProperty = {
ALPHA: 'alpha',
BETA: 'beta',
GAMMA: 'gamma',
... |
var send = require("./index")
module.exports = sendJson
/* sendJson := (HttpRequest, HttpResponse, Value | {
body: Value,
headers?: Object<String, String>,
statusCode?: Number
})
*/
function sendJson(req, res, value, replacer, space) {
if (!value || (!value.statusCode && !value.header... |
process.env.NODE_ENV = 'production'
var ora = require('ora')
var rm = require('rimraf')
var path = require('path')
var chalk = require('chalk')
var webpack = require('webpack')
var config = require('../config')
var webpackConfig = require('./webpack.prod.conf')
var spinner = ora('building for production...')
spinner... |
var duplex = require('duplexer')
var through = require('through')
module.exports = function (counter) {
var countries = {}
function count(input) {
countries[input.country] = (countries[input.country] || 0) + 1
}
function end() {
counter.setCounts(countries)
}
return duplex(through(count, end), c... |
export default function() {
let directive = {
restrict: 'E',
replace: true,
scope: {
ad: '='
},
templateUrl: './directives/adCard/template.html',
controller: ['$scope', ($scope) => {
if ($scope.ad.thumbnail) {
$scope.ad.previewImg = `${$scope.ad.thumbnail.base_url}/card/${$scope.ad.thumbnail.path... |
var app = require('app'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.
// Report crashes to our server.
require('crash-reporter').start();
// Keep a global reference of the window object, if you don't, the window will
// be closed a... |
import React from 'react';
import styled from 'styled-components';
import Item from './Item';
import parchment from '../assets/parchment.png';
import chest from '../assets/chest.png';
const Container = styled.div`
background: url(${parchment});
position: relative;
height: 286px;
width: 303px;
align-self: center;... |
var config = this.window ? {} : module.exports;
config.Rjs = {
environment: "browser",
rootPath: "../",
sources: [
"build/Reality.combined.replaced.js",
],
tests: [
"test/**/*.js"
]
};
|
/*
cryptr is a simple aes-256-gcm encrypt and decrypt module for node.js
Copyright (c) 2014 Maurice Butler
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 l... |
'use strict';
/* global Parse */
angular.module('main').factory('ParseFile', function ($q) {
return {
upload: function (base64) {
var defer = $q.defer();
var parseFile = new Parse.File('image.jpg', { base64: base64 });
parseFile.save({
success: function (savedFile) {
defer.... |
var Counter = require('./counterEvented.js');
var c = new Counter(1);
c.increment();
c.on('even', function(){
console.log('even! ' + c.count);
return;
}); |
//数据的视觉映射
// 数据可视化是 数据 到 视觉元素 的映射过程(这个过程也可称为视觉编码,视觉元素也可称为视觉通道)。
// data ----> graph
//使用visualmap提供通用的视觉映射 visualmap 属性有 1.图形类别symbol 2.图像大小symbolSize 3.颜色color 4.透明度opacity 5.颜色透明度 colorAlpha
// 6.颜色明暗度colorLightness 7.颜色饱和度colorSturaction 8.色调colorHue
//数据和维度
// 引入 ECharts 主模块
var echarts = require('echarts/lib/e... |
'use strict';
var React = require('react');
var mui = require('material-ui');
var SvgIcon = mui.SvgIcon;
var DeviceSignalCellularConnectedNoInternet2Bar = React.createClass({
displayName: 'DeviceSignalCellularConnectedNoInternet2Bar',
render: function render() {
return React.createElement(
SvgIcon,
... |
/**
* Created by tkachenko on 14.04.15.
*/
ATF.invoke(['$directiveProvider', 'utils', 'jQuery'], function ($directiveProvider, utils, $) {
$directiveProvider.register('$On', {
link: function (name, $el, scope, args, vars) {
var __vars = vars||{};
if (!args[0] || !args[1]) {
... |
import Constants from '../constants';
import LinkDrawable from './link';
import SphericalPortalLinkMesh from '../mesh/spherical-portal-link';
/**
* Represents a portal link that follows the surface of a sphere.
*
* Hooray for custom shaders, etc!
*/
class SphericalPortalLinkDrawable extends LinkDrawable {
/**
... |
/**
* @fileOverview js-itm: a Javascript library for converting between Israel Transverse Mercator (ITM) and GPS (WGS84) coordinates.<p>
* <a href="http://code.google.com/p/js-itm/">http://code.google.com/p/js-itm/</a>
* @author Udi Oron (udioron at g mail dot com)
* @author forked from <a href="http://www.nearby.o... |
var models = require('../models');
var Message = models.Message;
var User = require('../proxy').User;
var messageProxy = require('../proxy/message');
var mail = require('./mail');
exports.sendReplyMessage = function (master_id, author_id, topic_id, reply_id) {
var message = new Message();
message.type = 'reply';
... |
import Services from '../src/lib/services';
const _ = require('lodash');
require('db-migrate-mysql');
const expect = require('unexpected');
const request = require('./request.func');
let rds;
class Email {
// eslint-disable-next-line
sendHtml() {
return Promise.resolve();
}
}
class Slack {
// eslint-dis... |
#!/usr/bin/env node
var JavaScriptBuffer = require('../type-inference'),
fs = require('fs'),
clc = require('cli-color');
var filename = process.argv[2];
var text = fs.readFileSync(filename, {encoding:"utf8"});
var lines = text.split(/\r?\n|\r/);
var buffer = new JavaScriptBuffer;
buffer.add(filename, text);
va... |
var espeak = require('node-espeak');
espeak.initialize();
espeak.onVoice(function(wav, samples, samplerate) {
});
espeak.speak("hello world!");
|
'use strict';
/**
* Module dependencies.
*/
var express = require('express'),
consolidate = require('consolidate'),
mongoStore = require('connect-mongo')(express),
flash = require('connect-flash'),
helpers = require('view-helpers'),
assetmanager = require('assetmanager'),
config = require('..... |
// @flow
import { transformFileSync, type babel } from 'babel-core';
import pluginReactIntl from 'babel-plugin-react-intl';
import pluginReactIntlAuto from 'babel-plugin-react-intl-auto';
import pathOr from 'ramda/src/pathOr';
import compose from 'ramda/src/compose';
import type { AbsolutePath } from '../../../../typ... |
/**
* Copyright (c) 2013, FeedHenry Ltd. All Rights Reserved.
*
* Class which exposes collection of utility / helper functions for managing user sessions.
* - Creates new session for valid user.
* - Validates session for incoming requests.
* - Returns the session object associated to the specified sessionId.
* -... |
// @flow
import getKeys from "./getKeys";
import type {Composite} from "./types";
/**
* Returns true if composite has no own enumerable keys (is empty) or false
* otherwise
*/
const isEmpty = (composite: Composite): boolean =>
getKeys(composite).length === 0;
export default isEmpty;
|
// 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... |
this.NesDb = this.NesDb || {};
NesDb[ 'EFA19C34C9DC95F7511AF979CAD72884A6746A3B' ] = {
"$": {
"name": "Arkanoid",
"altname": "アルカノイド",
"class": "Licensed",
"subclass": "3rd-Party",
"catalog": "TFC-AN-5400-10",
"publisher": "Taito",
"developer": "Taito",
"region": "Japan",
"players": "1",
"date": "... |
// Karma configuration
// Generated on Tue Jan 06 2015 16:30:03 GMT-0800 (PST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: 'browser',
// frameworks to use
// available frameworks: https://npmjs.org/browse/ke... |
var searchData=
[
['screeningsolver',['ScreeningSolver',['../classhdim_1_1internal_1_1_screening_solver.html',1,'hdim::internal']]],
['sgd',['SGD',['../classhdim_1_1hdim_1_1_s_g_d.html',1,'hdim::hdim']]],
['sgd_5fsr',['SGD_SR',['../classhdim_1_1hdim_1_1_s_g_d___s_r.html',1,'hdim::hdim']]],
['softthres',['SoftTh... |
(function () {
'use strict';
angular
.module('openSenseMapApp')
.controller('EditBoxLocationController', EditBoxLocationController);
EditBoxLocationController.$inject = ['$scope', 'boxData', 'notifications', 'AccountService', 'Box'];
function EditBoxLocationController ($scope, boxData, notifications,... |
function foo<T = string>() {} |
/**
* For proper JSON escaping for use as JS object literal in a <script> tag
* For your education: http://timelessrepo.com/json-isnt-a-javascript-subset
*
* Javascript implementation of http://golang.org/pkg/encoding/json/#HTMLEscape
*/
'use strict';
var ESCAPE_LOOKUP = {
'&': '\\u0026',
'>': '\\u003e',
'... |
import styled from 'styled-components';
import Stones from '../Stones';
const StyledStones = styled(Stones)`
display: inline-block;
width: 100%;
min-height: 30px;
div {
display: inline-block;
width: 20px;
height: 20px;
border: 1px solid #000000;
border-radius: 50%;
margin: 0 1px 0 0;
... |
var plain = require('./workers/plain.js');
var NodeMover = require('./modules/NodeMover').NodeMover;
var PixiGraphics = require('./modules/PixiGraphics').PixiGraphics;
module.exports.main = function () {
var _layoutIterations = 1000;
var _layoutStepsPerMessage = 25;
//--simple frame-rate display for rende... |
function SignupController()
{
// redirect to homepage when cancel button is clicked //
$('#account-form-btn1').click(function(){ window.location.href = '/#section-3';});
// redirect to homepage on new account creation, add short delay so user can read alert window //
$('.modal-alert #ok').click(function(){ setTimeo... |
'use strict';
function posix(path) {
return path.charAt(0) === '/';
};
function win32(path) {
// https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
var result = splitDeviceRe.exec(pa... |
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import uiBoostrap from 'angular-ui-bootstrap';
import angularJwt from 'angular-jwt';
let librariesModules = angular.module('app.libraries', [
uiRouter,
uiBoostrap,
angularJwt
]);
export default librariesModules; |
ar_menu=new Array('downloaded','featured','popular','new','free','random');
str=1;
id_component=0;
ctype_component="";
flag_auto=true;
res="";
function zcomponent(id,ctype,page)
{
if(id!=id_component)
{
document.getElementById('home_boxes').innerHTML = "";
}
str=page;
var req = new JsHttpRequest();
... |
import Ember from 'ember';
import config from './config/environment';
import googlePageview from './mixins/google-pageview';
const Router = Ember.Router.extend(googlePageview, {
location: config.locationType
});
Router.map(function() {
this.route('routes', function(){
this.route('route', { path: "/:route-id"... |
import assert from 'assert'
import { planetposition, julian, sexagesimal as sexa } from '../src/index.js'
import data from '../data/index.js'
describe('#planetposition', function () {
describe('position2000', function () {
it('Mars at 2415020.0', function () {
// Mars 1899 spherical data from vsop87.chk.
... |
//Pathway model
var FormModel = function () {
var self = this;
self.id = undefined;
self.name = undefined;
self.dataElements = []
ko.track(self);
self.previewForm = function(){
console.log('need to add form preview here')
... |
version https://git-lfs.github.com/spec/v1
oid sha256:3e0c436bb4be5a94bea0b2ce84121c3a8c6fbe226e7559f80cd0db5b4b93fdb0
size 17334
|
(function () {
window.onload = function () {
var stage,
layer,
layerBG,
ball,
constants,
onJump,
isOver;
stage = new Kinetic.Stage({
container: 'kinetic-container',
width: document.body.clientWidth,
... |
"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... |
/**
* MIT License
*
* Copyright (c) 2017 ITGorillaz
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, mo... |
(function($){
DashboardModel = Backbone.Model.extend({
url: "/sync"
});
SyncStatusModel = Backbone.Model.extend({
url: "/sync/status"
});
DeleteModel = Backbone.Model.extend();
DashboardView = Backbone.View.extend({
el: $("#form_block"),
events: {
"click .sync-now": "syncNow",... |
const Homeassistant = require('./../index')
// Connect to home-assistant
let ha = new Homeassistant({
host: '192.168.1.166'
})
ha.connect()
.then(() => {
// subscribe to state changes
ha.on('state:media_player.spotify', data => {
console.log(data)
})
// access current state
console.log(... |
/**
* Created by whobird on 17/4/10.
*/
var winResizeDuration=null;
$(document).ready(function(){
if(!IsPC()){
window.location="./index.html";
return;
}
//project init
//start
$("img.lazy").lazyload({
event : "sporty",
effect : "fadeIn"
});
setPage();
... |
import config from './config';
describe('config', function(){
it('should exist', function(){
expect(config).to.be.an('object');
});
it('should contain the required keys', function(){
expect(config.ngxDirective).to.be.an('object');
expect(config.ngxDirective.name).to.be.a('string');
});
});
|
/**
* Created by tushar.mathur on 26/01/16.
*/
'use strict'
import test from 'ava'
import splitRange from '../src/splitRange'
test((t) => {
t.same(splitRange(100, 2), [[0, 49], [50, 100]])
t.same(splitRange(100, 3), [[0, 32], [33, 65], [66, 100]])
})
|
"use strict";
var Q = require("q");
var winston = require("winston");
var check = require('validator').check;
var Rule = function() {};
Rule.prototype.initializeFromJson = function(json) {
var self = this;
return Q.fcall(function() {
if(!json) throw new Error("JSON was not provided.");
if(!j... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Tevent_1 = require("../../../events/Tevent");
class TagentEvent extends Tevent_1.Tevent {
constructor(type, eventData = null, cancelable = true) {
super(type, eventData, cancelable);
}
}
TagentEvent.FAILURE = "FAI... |
var http = require("http");
var server = http.createServer(function(request, response) {
response.writeHead(200, { "Grip-Hold": "response",
"Grip-Channel": "mychannel",
"Grip-Timeout": "60"});
response.write('<b>Hello {{name}}</b>!');
response.end();
});
... |
// ./index.js contains imports to redisClient, which should be mocked in unit tests.
jest.mock('src/lib/redisClient');
// Avoid loading src/lib/queue, which really connects to redis
jest.mock('src/lib/queues', () => ({}));
import { graphql } from 'graphql';
import { schema } from './';
/**
* Executes graphql query a... |
'use strict';
const fs = require('fs');
const path = require('path');
const test = require('ava');
const mockFs = require('mock-fs');
// const writeArtifacts = require('../../../lib/artifacts').writeArtifact;
const writeArtifacts = require('../../../lib');
test.afterEach(() => mockFs.restore());
test('should inclu... |
//filters.js eventsApp.filter('durations'
'use strict';
describe('durations', function(){
beforeEach(module("eventsApp"));
it('should return "Half Hour" when given a 1', inject(function(durationFilter){
expect(durationFilter(1)).toEqual('Half Hour');
}))
it('should return "1 Hour" when given a 2', inject(function... |
function SeamCarver(ctx) {
var w = ctx.canvas.width;
var h = ctx.canvas.height;
var imgd = ctx.getImageData(0, 0, w, h);
var pix = imgd.data;
var img = [];
for (var i = 0; i < h; i++) {
img.push(new Uint32Array(w));
for (var j = 0; j < w; j++) {
img[i][j] = (pi... |
import Ember from 'ember';
export default Ember.Mixin.create({
getMailsFromMailThreadByThreadId: function getMailsFromMailThreadByThreadId(mailThreadId) {
return this.store.find('mail-thread').then(function(mailThreads) {
return mailThreads.filterBy('id', mailThreadId)[0];
}).then(function(mailThread) {
ret... |
var express = require('express'),
logger = require('morgan'),
bodyParser = require('body-parser'),
cookieParser = require('cookie-parser'),
session = require('express-session'),
passport = require('passport');
module.exports = function (app, config) {
app.set('views', config.rootPath, '/server/views');
a... |
var assert = require('assert'),
cascade = require('../index');
var TestComplete = function(){}
TestComplete.prototype = new Error();
TestComplete.prototype.constructor = TestComplete;
var test = module.exports = {
// generates a macro context
"context" : function( initialVal, result ){
var funcs =... |
/**
* Super-Cache for Browser
*
* @author Zongmin Lei <leizongmin@gmail.com>
*/
var CacheManager = require('./lib/manager');
var MemoryStore = require('./lib/store/memory');
var LocalStore = require('./lib/store/local');
module.exports = exports = CacheManager;
exports.MemoryStore = MemoryStore;
exports.LocalSto... |
module.exports = {
light: {
background1: 'rgba(227,227,227,.95)',
background2: 'rgba(204,204,204,.95)',
background2hover: 'rgba(208,208,208,.95)',
foreground1: 'rgba(105,105,105,.95)',
text1: 'rgba(36,36,36,.95)',
text2: 'rgba(87,87,87,.95)'
},
dark: {
background1: 'rgba(35,35,35,.95)... |
class MetaProperty {
constructor (options) {
this.type = 'MetaProperty'
Object.assign(this, options)
}
}
module.exports = MetaProperty
|
"use strict";
var _getSert = require("../getsert");
var generateCode = require("../../../src/utils/code-generator");
class StorageDataUtil {
getSert(input) {
var ManagerType = require("../../../src/managers/master/storage-manager");
return _getSert(input, ManagerType, (data) => {
return... |
/*
Copyright 2008-2009 University of Cambridge
Copyright 2008-2009 University of Toronto
Licensed under the Educational Community License (ECL), Version 2.0 or the New
BSD license. You may not use this file except in compliance with one these
Licenses.
You may obtain a copy of the ECL 2.0 License and BSD License at
h... |
import React from 'react';
import Examples from './Examples';
var node = document.getElementById('main');
window.render = function(){
React.render(<Examples />, node);
};
window.unmount = function() {
React.unmountComponentAtNode(node);
};
window.render(); |
;(function() {
'use strict';
var listOfProgrammingLanguages = {
restrict: 'E',
templateUrl: '/directives/tpl/cd-programming-languages-list',
bindings: {
programmingLanguages: '<'
},
controller: ['cdProgrammingLanguagesService', function (cdProgrammingLanguagesService) {
var ctrl = t... |
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || "Component";
}
export default getDisplayName;
|
// Ember Extensions
Ember.ArrayProxy.prototype.flatten = Array.prototype.flatten = function() {
var r = [];
this.forEach(function(el) {
r.push.apply(r, Ember.isArray(el) ? el.flatten() : [el]);
});
return r;
};
// jQuery Additions
jQuery.fn.exists = function() { return this.length > 0; };
|
/*
* Glue - Robust Go and Javascript Socket Library
* Copyright (C) 2015 Roland Singer <roland.singer[at]desertbit.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either versi... |
/**
* Created by wangqi on 16/6/3.
*/
function ServiceValidationError(code, message, field) {
Error.captureStackTrace(this, this.constructor);
this.type = 'UserLevelServiceRequestError';
this.name = 'ServiceValidationError';
this.message = message || 'Unauthenticated Access Token';
this.code = c... |
var _ = require('underscore')
, path = require('path')
, passport = require('passport')
, AuthCtrl = require('./controllers/auth')
, UserCtrl = require('./controllers/user')
, User = require('./models/User.js')
, userRoles = require('../client/scripts/routingConfig').userR... |
/**
* Copyright 2012-2018, 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: 'gu',
dictionary: {},
format: {
days: ['ર... |
import {TOGGLE_IS_VAT_PAYER} from '../actions';
export function isVATPayer(state = false, action) {
switch (action.type) {
case TOGGLE_IS_VAT_PAYER:
return !state;
default:
return state;
}
} |
/*
* This file is part of the xPack distribution
* (http://xpack.github.io).
* Copyright (c) 2017 Liviu Ionescu.
*
* 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
* restrict... |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { DenseMatrixDependencies } from './dependenciesDenseMatrixClass.generated';
import { matrixDependencies } from './dependenciesMatrix.generated';
import { typedDependencies } from './dependenciesTyped.generated';
import { createSmaller } from '../... |
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var coveralls = require('gulp-coveralls');
gulp.task('pre-test', function () {
return gulp.src(['lib/**/*.js', '!lib/micro-whalla.js', '!lib/helpers.js'])
.pipe(istanbul({ ... |
class TeaKnowledgeController {
constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) {
'ngInject'
this.API = API
this.$state = $state
// let TeaKnowledges = this.API.service('teakns', this.API.all('users'))
let TeaKnowledges = this.API.service('teaknowledges', this.API.al... |
'use strict';
/**
* @ngdoc function
* @name liteAppManagesystemApp.controller:AboutCtrl
* @description
* # AboutCtrl
* Controller of the liteAppManagesystemApp
*/
angular.module('liteAppManagesystemApp')
.controller('AboutCtrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
... |
/**
* @license AngularJS v1.2.16
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {'use strict';
/**
* @description
*
* This object provides a utility for producing rich Error messages within
* Angular. It can be called as follows:
*
* var exampleMinE... |
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
* @author Chad Engler https://github.com/englercj @Rolnaaba
*/
/**
* Originally based on https://github.com/mrdoob/eventtarget.js/ from mr Doob.
* Currently takes inspiration from the nodejs EventEmitter, EventEmitter3, and smokesignals
*/
/**
... |
var globalArgsTest = 'nothing to see here';
new Test.Unit.Runner({
test$A: function(){
this.assertEnumEqual([], $A({}));
},
testToArrayOnArguments: function(){
function toArrayOnArguments(){
globalArgsTest = $A(arguments);
}
toArrayOnArguments();
this.assertEnumEqual([], globalArgsTe... |
export const generateGuid = () => {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return `${s4() + s4()}-${s4()}${s4()}`;
};
export default {
generateGuid,
};
|
module.exports = require('./lib/Redback');
|
import React, { Component } from 'react';
import CatagoryBox1 from '../CatagoryBox1';
import { BgBox } from './style';
function BackgroundBox (props) {
const {bcolor} = props;
const {data} = props;
const cata = data.map((d,i) => <CatagoryBox1 data={d} key={i} />);
return (
<BgBox bcolor={bcolor}>
... |
var playState = {
create: function(){
var background = game.add.sprite(0, 0, 'cidade');
background.width = 1300;
background.height = 650;
graphics = game.add.graphics(0, 0);
groupCidade = game.add.group();
groupCidade.inputEnableChildren = true;
var x = 1... |
version https://git-lfs.github.com/spec/v1
oid sha256:d33a38aa03c6c04c3b54d84dbf40da10270e517a1f2ca5ed32486bd757d16cd0
size 455
|
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Exam Schema
*/
var GroupSchema = new Schema({
group_name: {//分组名称
type: String,
default: ''
},
group_type: { //分组类型
type: String,
default: '',
trim: true
},
group_created:{//分组数据入库时间... |
/**
* Example
* @version 0.0.1
*/
var MetaReponse = require('./MetaResponse');
var MetaData = require('./MetaData');
var MetaError = require('./MetaError');
var data1 = new MetaData();
var mr = new MetaReponse();
data1.setId(3);
data1.setType('recipe');
data1.addAttribute('title', 'Risotto al funghi');
dat... |
import { Class as Model } from 'meteor/jagi:astronomy';
import * as Errors from './errors.js';
export function init(config) {
config.collection = new Mongo.Collection(config.collectionName);
config.model = Model.create({
name: config.modelName,
collection: config.collection,
fields: co... |
"use strict";
/* tslint:disable */
var load_themed_styles_1 = require("@microsoft/load-themed-styles");
var styles = {};
load_themed_styles_1.loadStyles([{ "rawString": ".ms-FocusTrapZoneBoxExample{border:dashed 1px #ababab}.ms-FocusTrapComponent{border:#000 2px solid;padding:5px}" }]);
module.exports = styles;
/* tsli... |
export default function VuxTableColumnDefinition (options) {
return {
...{
key: 'id',
label: 'Id',
isDisabled: false,
isHidden: false,
isSortable: false,
isSorting: false,
sortDirection: 'desc',
isFilterable: false,
displayComponent: null,
editComponent:... |
'use strict'
const MongoClient = require('mongodb').MongoClient
const muri = require('muri')
const chai = require('chai')
const expect = chai.expect
const assert = chai.assert
const chaiSubset = require('chai-subset')
chai.use(chaiSubset)
chai.should()
const stringConnection = 'mongodb://localhost:27017/lambda-mongo... |
//= require ./src/module
//= require_tree ./src/services
//= require_tree ./src/controllers
//= require_tree ./src/directives |
(function($){
$.applyBulkSelectTable = function(obj, settings) {
var lastClickedElement = null,
lastClickedChecked = false,
lastClickedIndex = null;
var applyClass = function(obj, className, checked) {
if(checked)
obj.addClass(className);
else
obj.removeClass(className);
};
obj.... |
/**
* IconElement is often mixed into other classes to generate an icon.
* Icons are graphics, about the size of normal text. They are used to aid the user
* in locating a control or to convey information in a space-efficient way. See the
* [OOUI documentation on MediaWiki] [1] for a list of icons
* included in th... |
/**
* Created by Yang on 2/11/16.
*/
import { createSelector } from 'reselect';
const selectForgetPasswordPage = () => (state) => state.get('forgetpassword');
const selectEmail = () => createSelector(
selectForgetPasswordPage(),
(forgetPasswordState) => forgetPasswordState.get('email')
);
const selectError = (... |
import {assert} from 'chai'
import {toConsole} from '../src/destinations'
import {Message} from '../src/message'
import {addDestination} from '../src/output'
import {assertContainsFields} from '../src/testing'
describe('toConsole', function() {
/** @test {toConsole} */
it('performs a noop if no suitable meth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.