code stringlengths 2 1.05M |
|---|
import Ember from 'ember';
const {
Route
} = Ember;
export default Route.extend({
model(params) {
return this.get('store').findRecord('item', params.id);
}
});
|
app.service('UserService', function (FIREBASE_URL, $firebase) {
var connectedUsersRef = new Firebase(FIREBASE_URL + 'whiteBoard/connectedUsers');
this.userRef = null;
this.setCurrentUser = function(user) {
this.userRef = connectedUsersRef.push(user);
this.userRef.onDisconnect().remove();
... |
const server = require('./server')
const port = process.env.PORT || 3000
server.listen(port, () => {
console.log('Listening on port %s', port)
})
|
/* eslint-disable */
const NODE_ENV = process.env.NODE_ENV;
if (NODE_ENV !== 'development' && NODE_ENV !== 'production') {
throw new Error('NODE_ENV must either be set to development or production.');
}
global.__DEV__ = NODE_ENV === 'development';
global.requestAnimationFrame = function(callback) {
setTimeout(cal... |
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Favorites', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
userId: {
type: Sequelize.STRING
},
... |
var group___d_m_a_ex =
[
[ "DMAEx Exported Types", "group___d_m_a_ex___exported___types.html", "group___d_m_a_ex___exported___types" ],
[ "DMAEx Exported Functions", "group___d_m_a_ex___exported___functions.html", "group___d_m_a_ex___exported___functions" ],
[ "DMAEx Private Functions", "group___d_m_a_ex___... |
var relativeImports = /import\s*{[a-zA-Z\,\s]+}\s*from\s*'\.\/[a-zA-Z\-]+';\s*/g;
var nonRelativeImports = /import\s*{?[a-zA-Z\*\,\s]+}?\s*from\s*'[a-zA-Z\-]+';\s*/g;
var importGrouper = /import\s*{([a-zA-Z\,\s]+)}\s*from\s*'([a-zA-Z\-]+)'\s*;\s*/;
exports.extractImports = function(content, importsToAdd){
var matche... |
'use strict';
module.exports = function(app) {
// Root routing
var core = require('../../app/controllers/core.server.controller');
app.route('/').get(core.index);
app.route('/check').put(core.check);
};
|
const AuthUtil = require('../thulib/auth')
const User = require('../models/user')
const updateCourseInfo = require('./update_course_info')
const updateCurriculumInfo = require('./update_curriculum_info')
const updateScheduleInfo = require('./update_schedule_info')
const taskScheduler = require('./task_scheduler')
cons... |
/**
* Created by hbzhang on 8/5/15.
*/
'use strict';
angular.module('mean.helpers').factory('AllWidgetData',['$resource','$rootScope', function($resource,$rootScope) {
var allwidgets=[
{
name: 'Announcement',
data: []
},
{
name:... |
import JoiBase from 'joi';
import {postHandlerFactory, getHandlerFactory} from './common';
import FullDateValidator from '../../../../shared/lib/joi-full-date-validator';
const Joi = JoiBase.extend(FullDateValidator);
const schema = Joi.object().keys({
'day': Joi.number().integer().min(1).max(31).required().label('... |
var getDefaultViewController = function () {
var defaultView = getSetting('defaultView', 'top');
defaultView = defaultView.charAt(0).toUpperCase() + defaultView.slice(1);
return eval("Posts"+defaultView+"Controller");
};
// Controller for all posts lists
PostsListController = FastRender.RouteController.extend({... |
'use strict';
const Gitlab = require('gitlab');
const async = require('async');
const utils = require('./utils');
const moment = require('moment');
class GitLabWrapper {
constructor(config, notifier) {
this.config = config;
this.client = null;
this.projects = {};
this.u... |
const gulp = require('gulp');
const size = require('gulp-size');
const sass = require('gulp-sass');
const plumber = require('gulp-plumber');
const cleanCss = require('gulp-clean-css');
const sourcemaps = require('gulp-sourcemaps');
const autoprefixer = require('gulp-autoprefixer');
/**
* Copy app.css to dist/ without... |
import React, { Component } from 'react';
import axios from 'axios';
import { Router, Link } from 'react-router';
import { Button } from 'react-bootstrap';
export default class trueMenu extends Component {
constructor(props) {
super();
this.state = {
displayCreateBoard: false,
displayJoin: false... |
/* eslint-disable no-param-reassign */
import Vue from 'vue';
export default {
namespaced: true,
state: {
cache: null,
},
mutations: {
setCache(state, value) {
state.cache = value;
},
},
actions: {
get({ state, commit }, cache = true) {
... |
$(function () {
$('.imageUploadMultiple').each(function (index, item) {
var $item = $(item);
var $group = $item.closest('.form-group');
var $innerGroup = $item.find('.form-group');
var $errors = $item.find('.errors');
var $input = $item.find('.imageValue');
var flow =... |
export class App {
constructor (router) {
this.router = router;
}
configureRouter (config, router) {
this.router = router;
config.map([
{ name: 'orders', route: ['', 'orders'], moduleId: 'modules/orders/index', nav: true, title: "Orders" }
, { name: 'order'... |
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import routes from './routes';
import configureStore from './store/configureStore';
import '../resources/f... |
function solve(input){
let result=input.toString();
let sum=0;
let count=0;
while(input>=1){
sum+=input%10;
count++;
input=Math.floor(input/10);
}
while(sum/count<=5){
sum+=9;
count++;
result+='9';
}
console.log(result)
}
solve(101); |
import Zip from 'adm-zip';
/**
* @param {Type}
* @return {Type}
*/
export default function (filePath) {
let courseZip = new Zip(filePath);
let courseFileScanner = {
getZipObject: () => {
return courseZip;
},
getCourseFiles: () => {
return courseZip.getEntries().filter(courseFileScanner... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-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.
*/
// ESLint configuration
// http://eslint.org/docs/user-... |
function getShortMessages(messages) {
return messages.map(function(m) {
return m.message;
}).filter(function(message) { return message.length < 50; })
}
module.exports = getShortMessages;
|
'use strict';
angular.module('users').controller('AuthenticationController', ['$scope', '$http', '$location', 'Authentication',
function($scope, $http, $location, Authentication) {
$scope.authentication = Authentication;
// If user is signed in then redirect back home
if ($scope.authentication.user) $location.... |
/* ========================================================================
* DOM-based Routing
* Based on http://goo.gl/EUTi53 by Paul Irish
*
* Only fires on body classes that match. If a body class contains a dash,
* replace the dash with an underscore when adding it to the object below.
*
* .noConflict()
* ... |
//{block name="backend/connect/store/import/local_products"}
Ext.define('Shopware.apps.Connect.store.import.LocalProducts', {
extend : 'Ext.data.Store',
autoLoad: false,
pageSize: 10,
fields: [
{ name: 'Article_id', type: 'integer' },
{ name: 'Detail_number', type: 'string' },
... |
import Microcosm from 'microcosm'
describe('History node children', function() {
const action = n => n
it('can determine children', function() {
const repo = new Microcosm()
const a = repo.append(action)
const b = repo.append(action)
repo.checkout(a)
const c = repo.append(action)
expec... |
// The algorithm used to determine whether a regexp can appear at a
// given point in the program is loosely based on sweet.js' approach.
// See https://github.com/mozilla/sweet.js/wiki/design
import {Parser} from "./state"
import {types as tt} from "./tokentype"
import {lineBreak} from "./whitespace"
export class To... |
import {eventMixin} from "./event"
export class MarkedRange {
constructor(from, to, options) {
this.options = options || {}
this.from = from
this.to = to
}
clear() {
this.signal("removed", this.from)
this.from = this.to = null
}
}
eventMixin(MarkedRange)
class RangeSorter {
constructor... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('receive-for', 'Integration | Component | receive for', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any... |
// Invoke 'strict' JavaScript mode
'use strict';
var app = angular.module('dashboards', ['ngMaterial']);
// Create the 'Dashboards' controller
angular.module('dashboards').controller('DashboardsController', ['$scope','$http','$q','$mdDialog','$window','$timeout' ,'$routeParams', '$location', 'Authentication', 'Dash... |
var process = function (json) {
var x = 0,
r = Raphael("chart", 2350, 550),
labels = {},
textattr = {"font": '9px "Arial"', stroke: "none", fill: "#fff"},
pathes = {},
nmhldr = $("#name")[0],
nmhldr2 = $("#name2")[0],
lgnd = $("#legend")[0],
usrnm = $(... |
import Vue from 'vue';
import Vuex from 'vuex';
import * as actions from './actions';
import mutations from './mutations';
import state from './state';
Vue.use(Vuex);
export default () =>
new Vuex.Store({
actions,
mutations,
state,
});
|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'templates', 'km', {
button: 'ពុម្ពគំរូ',
emptyListMsg: '(មិនមានពុម្ពគំរូត្រូវបានកំណត់)',
insertOption: 'ជំនួសក្នុងមាតិកាបច្ចុប្... |
var twimap;
twimap = require("twimap");
var Twit = require("twit");
var util = require("util");
var _current_index = -1;
var _followers_list ;
var thanks_temp;
thanks_temp = [
"Dear %s, thank you for following :)",
"%s = awesome. Me = grateful for following :)",
"Is there no limit to your awesomeness %s? ... |
import { expect } from 'chai';
import { validateRegister, validateLogin } from '../../src/universal/validation/authValidation';
describe('validation', () => {
describe('validateRegister', () => {
it('passes for acceptable details', () => {
const username = 'username';
const password = 'password';
... |
const NUM_HASHES = HASHES.length;
function verify(id, accessCode) {
var token = id.replace(/\s+/g, '').toLowerCase() + accessCode;
for (var i = 0; i < NUM_HASHES; ++i) {
var result = CryptoJS.AES.decrypt(HASHES[i], token).toString(CryptoJS.enc.Latin1);
if (/^https?:\/\/[^\s]+$/.test(result)) {
... |
const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const CMD = 'MODE';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler... |
export { default } from './BottomNavigation';
export { default as BottomNavigationAction } from './BottomNavigationAction';
|
// @flow
import * as React from 'react'
import {StyleSheet, Image, Alert} from 'react-native'
import {Column, Row} from '../components/layout'
import {ListRow, Detail, Title} from '../components/list'
import type {StoryType} from './types'
type Props = {
onPress: string => any,
story: StoryType,
thumbnail: false |... |
{
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.stopPropagation) {
event.stopPropagation();
} else if (typeof event.cancelBubble !== "unknown") {
event.cancelBubble = true;
}
this.isPropagationStopped = emptyFunction.thatReturnsTrue;
}
|
// saskavi.js
// client side script for calling saskavi functions
//
(function() {
"use strict";
var Saskavi = function(fbRoot, uid) {
if (!uid)
throw new Error("uid not supplied, an authenticated user id is required");
this.rpcBus = fbRoot.child("__saskavi-rpc").child(uid);
};
function isFunction(functi... |
function checkNeighbours(arr, i) {
var result,
inputArray,
position;
if (arr == null) {
inputArray = document.getElementById('numbersArray2').value.split(' '),
position = +document.getElementById('num6').value;
} else {
inputArray = arr,
position = i;
}
... |
'use strict';
var $ = require('./main')
, getViewportRect = require('./get-viewport-rect')
, getElementRect = require('./get-element-rect');
module.exports = $.showInViewport = function (el/*, options*/) {
var vpRect = getViewportRect()
, elRect = getElementRect(el)
, options = Object(argume... |
'use strict';
require('babel/register');
// controls application file
let app = require('app');
// control main window
let BrowserWindow = require('browser-window');
let mainWindow = null;
// quite when all windows are closed
app.on('window-all-closed', () => {
if (process.platform != 'darwin') {
... |
[comment /**]
[comment Plain text doesn't have any special ]
[comment indentation. {][comment&tag @link][comment foo}]
[comment&tag @fileoverview][comment Doesn't have any special]
[comment indentation.]
[comment&tag @see][comment https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Cl... |
var path = require('path')
var AtomicFile = require('atomic-file')
function id (e) { return e }
var none = {
encode: id, decode: id
}
module.exports = function (dir, name, codec) {
codec = codec || require('flumecodec/json')
var af = AtomicFile(path.join(dir, name+'.json'), '~', none)
var self
return self =... |
angular.module('ModuleGlobal').service('LoginService', ['$http', 'urlService', function($http, urlService) {
var self = this;
var url = urlService.getLoginUrl();
var connected = false;
self.identifier = '';
self.isConnected = function() {
return connected;
};
self.connect = fun... |
import React from 'react';
import {Link} from "react-router";
import Subheading from '../components/Subheading';
import Portfolio4col from '../components/Portfolio/Portfolio4col';
export default class Layout extends React.Component {
constructor() {
super();
this.state = {
title:"Welcome ... |
/*****************************************************************************/
/* PayRunResultModal: Event Handlers */
/*****************************************************************************/
import Ladda from 'ladda';
Template.PayRunResultModal.events({
});
/*************************************************... |
/* global Mousetrap */
import { typeOf } from '@ember/utils';
import { get } from "@ember/object";
export function bindKeyboardShortcuts(context) {
const shortcuts = get(context, 'keyboardShortcuts');
if (typeOf(shortcuts) !== 'object') {
return;
}
context._mousetraps = [];
Object.keys(shortcuts).forEa... |
/**
* Transforms __ref to ref
* @param {object} props
* @returns {object}
* @private
*/
export default (oldProps = {}) => {
const { __ref, ...props } = oldProps
if (!__ref) return oldProps
return { ...props, ref: __ref }
}
|
sdkaskdj
|
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import {
getDatePicker,
selectDateTime,
} from 'ember-date-components/test-support/helpers/date-picker';
import { selectTime } from 'emb... |
export var SKIP_DJ_START = 'moderation/SKIP_DJ_START';
export var SKIP_DJ_COMPLETE = 'moderation/SKIP_DJ_COMPLETE';
export var MOVE_USER_START = 'moderation/MOVE_USER_START';
export var MOVE_USER_COMPLETE = 'moderation/MOVE_USER_COMPLETE';
export var REMOVE_USER_START = 'moderation/REMOVE_USER_START';
export var REMOVE... |
export { default } from 'supertree-auth/login/serializer';
|
import Ember from 'ember';
import DS from 'ember-data';
import ModelDefinition from './model-definition';
import FixtureBuilderFactory from './fixture-builder-factory';
var FactoryGuy = function () {
var modelDefinitions = {};
var store = null;
var fixtureBuilderFactory = null;
var fixtureBuilder = null;
/**... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './GridItem.css';
const placeholder = require('../../assets/imgholder.png');
class GridItem extends Component {
static defaultProps = {
aspect: "cover",
};
constructor(props) {
super(props);
... |
/*global describe, beforeEach, it*/
'use strict';
var assert = require('assert');
describe('wpsite generator', function () {
it('can be imported without blowing up', function () {
var app = require('../app');
assert(app !== undefined);
});
});
|
const jwt = require("jsonwebtoken");
module.exports = (UserModel, Config, CryptoHelper) => {
function _transformUser (user) {
return {
"id": user._id,
"name": user.name,
"isAdmin": user.isAdmin,
"created": user.createdAt,
"updated": user.updatedAt
}
}
async function signI... |
var express = require('express');
var app = express();
app.use(function(req,res,next){
console.log(req.url);
next();
});
app.all('/jsonp',function(req,res){
var data = req.query;
var callback = data.cb;
res.send(callback+'({s:["a","a2","a3"]})');
});
app.listen(8080); |
var EpubParser;
//var sax = require('./sax');
EpubParser = (function() {
var jszip = require('node-zip');
var zip, zipEntries;
var xml2js = require('xml2js');
var parser = new xml2js.Parser();
var request = require('request');
var fs = require('fs');
function extractText(filename) {
//console.log('extract... |
class Button {
constructor(arg) {
arg.type = 'button'
this.element = buildElement(arg)
this.addTo = function(parentId) {
var parent = document.getElementById(parentId)
parent.appendChild(this.element)
}
}
}
class Input {
constructor(arg) {
arg.type = 'input'
this.element = bu... |
var group__eth__mac__interface__gr =
[
[ "Ethernet MAC Events", "group__ETH__MAC__events.html", "group__ETH__MAC__events" ],
[ "Ethernet MAC Control Codes", "group__eth__mac__control.html", "group__eth__mac__control" ],
[ "Ethernet MAC Timer Control Codes", "group__eth__mac__time__control.html", "group_... |
(function($){
$(document).ready(function(){
/**
* @type {Object}
*/
var app = {
delay_before_gridSquares_animation: 365,
gridSquares_AnimationTiming: 350,
btwEach_gridSquares_animationDelay: 50,
/**
* Init the app.
*/
init: function() {
// Display the best score of the player or save the d... |
var mongo = require('../');
var db = mongo.db('192.168.0.103/test');
// var db = mongo.db('127.0.0.1/test');
var myconsole = require('myconsole');
var foo = db.collection('foo');
setInterval(function() {
foo.insert({foo:'foo'}, function(err, result){
if(err) return myconsole.error(err);
foo.count(function(err, ... |
// Only publish invitation codes for the logged in user
Meteor.publish("invitations", function (all) {
if(!this.userId)
return [];
// XXX in the future the admin page requires to fetch
// all invitations. Then do somehting with 'all'.
return Invitations.find({$or: [ {broadcastUser: this.userId},
... |
require=(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];return s(n?n:e)... |
const {CookieJar} = require('tough-cookie');
const {cookieToString, jarFromCookies, cookiesFromJar} = require('..');
describe('jarFromCookies()', () => {
it('returns valid cookies', done => {
const jar = jarFromCookies([{
key: 'foo',
value: 'bar',
domain: 'google.com'
}]);
jar.store.ge... |
import React from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import { recosActions } from '../../core/recos';
import { getRecommenders, getReco } from '../../core/recos';
import { isEditing } from '../../core/loading';
import Header from '../Header';
import TextField... |
var fs = require('fs')
var path = require('path')
module.exports.getConfig = getConfig
var env = process.env.NODE_ENV || 'development'
var configDirs = fs.readdirSync(path.resolve(__dirname, '../config'))
var configObj = {}
configDirs.forEach(function(dirName) {
if (dirName.indexOf('.') !== 0) {
// skip hidde... |
'use strict'
const { test } = require('tap')
const Fastify = require('..')
const {
codes: {
FST_ERR_DEC_ALREADY_PRESENT,
FST_ERR_MISSING_MIDDLEWARE
}
} = require('../lib/errors')
test('Should throw if the basic use API has not been overridden', t => {
t.plan(1)
const fastify = Fastify()
try {
f... |
import React from "react";
import { storiesOf } from "@storybook/react";
import { withKnobs, boolean } from "@storybook/addon-knobs";
import centered from "@storybook/addon-centered/react";
import DarkModeKnobWrapper from "./DarkModeKnobWrapper";
import Heart from "../components/dots/Heart";
import Pride from "../com... |
define(function(require) {
/**
* The Promises/A+ compliance test suite
*
* Converted from https://github.com/promises-aplus/promises-tests
* Thanks @domenic and A+ team for this massive work!
**/
require('spec/base/promiseSpec/aplus/2.1.2');
require('spec/base/promiseSpec/aplus/2.1.3');
require('s... |
import React from 'react'
import { Image, Reveal } from 'shengnian-ui-react'
const RevealExampleHidden = () => (
<Reveal animated='small fade'>
<Reveal.Content visible>
<Image src='/assets/images/wireframe/square-image.png' size='small' />
</Reveal.Content>
<Reveal.Content hidden>
<Image src=... |
/* global appSettings */
var
$result,
$resultContainer,
$resultsButton,
$resultsPane,
$renderingLabel,
$window = $(window),
path = require('path'),
_ = require('lodash'),
isEnabled = true,
messenger = require(path.resolve(__dirname, '../messenger')),
renderer = require(path... |
/**
* @license Angular v4.2.6
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('rxjs/BehaviorSubject'), require('rxjs/Subject... |
(function(forp, $){
/**
* BarChart Class
*/
forp.BarChart = function(conf) {
forp.Graph.call(this, conf);
this.tmp = null;
this.restore = function() {
if(this.tmp) {
this.ctx.clearRect(0, 0, this.element.width, this.element.height);
... |
const Parse = require('./parser');
describe('test_parse', () => {
describe('test_parse_key_values', () => {
it('should return the key values specified in the config from the body', () => {
const config = {
keys: ['to', 'from'],
};
const request = {
body: {
to: 'inbound... |
var Connection = require(['tedious']).Connection;
var config = {
userName: 'masproject2017',
password: 'MAS.2017',
server: 'masproject.database.windows.net',
// If you are on Microsoft Azure, you need this:
options: { encrypt: true, database: 'AdventureWorks' }
};
var connection = new Conn... |
const PlayerError = require('./errors.js').UnknownPlayerIdException;
const Player = require('./player.js');
const Map = require('./map.js');
const Resources = require('./resources.js');
const Virus = require('./virus.js');
class Game {
constructor(playerId, id, tick, timeLeft, players, resources, map, viruses) {
... |
var assert = require("assert")
var RequestSet = require("../lib/request_set")
var node = {
request: function () {}
}
var unhealthy = {
request: function (options, callback) { callback({ message: 'no nodes'}) }
}
function succeeding_request(options, cb) {
return cb(null, {}, "foo")
}
function failing_request(opti... |
/**
* Created by sakura on 16/3/28.
*/
// $(function () {
// $('#myTab a:last').tab("show");
// })
document.getElementById("btn-normal").disabled = ''; |
// 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... |
var Helper = require("@kaoscript/runtime").Helper;
module.exports = function() {
function min() {
return ["female", 24];
}
let foo = Helper.namespace(function() {
const [gender, age] = min();
return {
gender: gender,
age: age
};
});
console.log(foo.age);
console.log(Helper.toString(foo.gender));
}; |
module.exports = {
SearchClient: require("./ddg/search-client")
} |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mongoose = require('mongoose');
var _mongoose2 = _interopRequireDefault(_mongoose);
var _validator = require('validator');
var _findOrCreatePlugin = require('./find-or-create-plugin');
var _findOrCreatePlugin2 = _interopRequireDef... |
/*
* Copyright (C) 2014 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration. All Rights Reserved.
*/
/**
* @exports BMNGOneImageLayer
* @version $Id: BMNGOneImageLayer.js 2942 2015-03-30 21:16:36Z tgaskins $
*/
define([
'../layer/Ren... |
var SimpleSuperclass = Hotcake.define(SimpleSuperclass,
{
ctor: function ()
{
this.value = 100;
},
incrementReturn: function ()
{
this.value += 100;
return this.value;
}
});
var SimpleSubclass = Hotcake.define(SimpleSubclass,
{
returnValue: function ()
{
... |
enyo.kind({
name: "bootstrap.Breadcrumb",
tag: "ul",
classes: "breadcrumb",
defaultKind: "bootstrap.MenuItem",
});
|
'use strict';
module.exports = {
"plugins": [],
"recurseDepth": 10,
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"sourceType": "module",
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"... |
import * as actions from './actions';
import mutations from './mutations';
import getters from './getters';
const state = {
transactions: [],
businesses: []
};
export default {
state,
actions,
mutations,
getters
};
|
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 90, window.innerWidth / window.innerHeight, .1, 1000 );
var renderer = new THREE.WebGLRenderer();
var container = document.getElementById('container');
container.appendChild(renderer.domElement);
renderer.setSize(window.innerWidth, window.inner... |
function registerListeners() {
window.addEventListener("keydown", function(event) {
switch (event.keyCode) {
case 87: // w
keyStatus[0] = true;
break;
case 65: // a
keyStatus[1] = true;
break;
case 83: // s
keyStatus[2] = true;
break;
case 68: // d
keyStatus[3] =... |
export class Validation {
constructor() {
this.errors = [];
}
get validationArray() {
return [];
}
get valid() {
let self = this;
return this.validationArray.reduce((isValid, isPartValid) => {
if(!isPartValid) return isValid;
... |
var helper = require('../support/spec_helper');
var ORM = require('../../');
describe("Model keys option", function () {
var db = null;
before(function () {
db = helper.connect();
});
after(function () {
return db.closeSync();
});
describe("if model id is a property", functio... |
function loadProjects(loadTarget) {
console.log(loadTarget);
$('.filter li').removeClass();
$('#filter-' + loadTarget).addClass('active');
var isLoaded = true;
switch (loadTarget) {
case 'all':
renderProjects(featured);
$('.load-more').removeClass('display-none');
$('.more-work').removeClass('isLoaded'... |
require('dotenv').config();
const api_key = process.env.MAILGUN_API_KEY;
const domain = process.env.MAILGUN_DOMAIN;
const mailgun = require('mailgun-js')({apiKey: api_key, domain: domain});
const list = mailgun.lists('subscriberlist@example.com');
const data = {
from: 'Dylan <me@... |
/**
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
generate: require("./lib/generate"),
createFixer: require("./lib/fixer"),
}
|
define([
'../core',
'../var/rnotwhite',
'./accepts'
], function (jQuery, rnotwhite) {
function Data () {
// Support: Android<4,
// Old WebKit does not have Object.preventExtensions/freeze method,
// return new empty object instead with no [[set]] accessor
Object.defineProperty(this.cache = {}, 0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.