code stringlengths 2 1.05M |
|---|
module.exports = {
jwt: {
expire_period :"days",
expire_duration :8,
custom_secret :false
},
rate_limiter: {
windowMs: 10 * 60 * 1000,
max: 0,
delayMs: 0,
keyGenerator: function (req) {
return req.headers.authorization || req.body.client_secret || req.body.client_id ||... |
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prot... |
'use strict';
import React from 'react';
import App from './app/index.js';
const url = 'http://localhost:49199';
React.render(<App url={url} />, document.getElementById('main')); |
/*
* (C) Copyright 2014-2017 Markus Moenig <markusm@visualgraphics.tv>.
*
* This file is part of Visual Graphics.
*
* Visual Graphics is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either versio... |
function sumFibs (num) {
var sum = 1
var fibbs = [ 0, 1 ]
while (num > fibbs[fibbs.length - 1]) {
fibbs.push(fibbs[fibbs.length - 2] + fibbs[fibbs.length - 1])
if (fibbs[fibbs.length - 1] % 2 !== 0 && fibbs[fibbs.length - 1] <= num) sum += fibbs[fibbs.length - 1]
}
return sum
}
var assert = require('... |
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import { createMount, describeConformanceV5, createClientRender } from 'test/utils';
import ToggleButtonGroup, {
toggleButtonGroupClasses as classes,
} from '@material-ui/core/ToggleButtonGroup';
import ToggleButton from '@mat... |
var myDataRef = new Firebase('https://glowing-heat-6919.firebaseio.com/');
$('#messageInput').keypress(function (e) {
if (e.keyCode == 13) {
var name = $('#nameInput').val();
var text = $('#messageInput').val();
myDataRef.push({name: name, text: text});
$('#messageInput').val('');
}... |
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import reducers from 'src/reducers';
let store;
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
if (process.env.NODE_ENV === 'production') {
store = createStore(reducers, applyMiddleware... |
module.exports = function(config) {
config.set({
browsers: ['PhantomJS'],
frameworks: ['browserify','jasmine'],
reporters: ['progress', 'osx', 'mocha'],
preprocessors: {
'spec/**/*.js': [ 'browserify' ],
'src/index.js': [ 'browserify' ]
},
browserify: {
debug: true,
tra... |
const yo = require('../../src/yo.js');
const expect = require('expect.js');
const noValue = undefined;
const hasValue = '123';
const emptyObject = {};
const simpleObject = {a: 1};
describe('Is functions', () => {
it('isPalindrome otto', () => expect(yo.isPalindrome('otto')).to.equal(true));
it('isPalindrome race ... |
var esprima = require('esprima'),
estraverse = require('estraverse');
/**
* @param {!Object} node An Esprima node
* @returns {boolean} Whether the given node represents a block statement
*/
function isBlockStatement(node) {
return node.type === 'BlockStatement';
}
/**
* @param {!Object} node An Esprima node... |
window.ProtoBuf = require("protobufjs");
window.TextFormat = require("protobuf-textformat");
|
import PropTypes from 'prop-types'
import React from 'react'
import styled from 'styled-components'
import {colors} from '../../../constants/colors'
const Container = styled.div`
display: flex;
flex-direction: column;
align-items: center;
margin: 1rem 0;
padding-bottom: 1rem;
border-bottom: 1px solid ${col... |
//็ฎๆฌก
//ใใฉใฆใถๅคๅฎใbody,formใฎid,classไปไธ
//IDไปไธ๏ผIDใใชใๅ ดๅ๏ผ
//ไบๅใณใณใใผใ
//new
// window.onunload = function(){}
// if(window.name != "xyz"){
// location.reload();
// window.name = "xyz";
// }
jQuery.noConflict();
jQuery('html').hide();
jQuery(document).ready(function($){
var undefined;
jQuery('html').show();
//ใใฉใฆใถๅคๅฎใbody,for... |
#!/usr/bin/env node
/**
* @since 150622 13:34
* @author vivaxy
*/
var fs = require('fs');
var getRange = require('./data/get-range');
var filePath = './coordinates.json';
getRange(function (rangeData) {
fs.writeFile(filePath, JSON.stringify(rangeData), function (err) {
if (err) throw err;
console.log('sav... |
// reference the http module so we can create a webserver
// Note: when spawning a server on Cloud9 IDE,
// listen on the process.env.PORT and process.env.IP environment variables
// Click the 'Run' button at the top to start your server,
// then click the URL that is emitted to the Output tab of the console
var mo... |
help.help = [
'!help - list all plugins with help'
, '!help <plugin name> - display help text for <plugin name>'
].join('\n')
module.exports = help
function help(ziggy) {
ziggy.on('message', parse_message)
ziggy.on('pm', parse_pm)
function parse_message(user, channel, message) {
var bits = message.sp... |
import * as types from '../constants/ActionTypes'
//Action creator (func)
export const updateNameFilter = nameTxt => (
//Action (obj)
{
//Action type (type: required prop)
type: types.UPDATE_NAME_FILTER,
nameTxt
}
)
export const updateClubFilter = clubId => ({
type: types.UPDATE_CLUB_FILTER, ... |
'use strict';
module.exports = {
entry: [
'./demo/index'
],
resolve: {
extensions: ['', '.js', '.jsx', '.json', '.md', '.css'],
},
};
module.exports.loaders = [
{
test: /\.css$/,
loaders: ['style', 'css'],
},
{
test: /\.json$/,
loaders: ['js... |
'use strict'
var Seneca = require('seneca')
var Transport = require('../../')
var server = Seneca({ log: 'silent', default_plugins: { transport: false } })
server.use(Transport)
server.add({ foo: 'bar' }, function (message, cb) {
cb(null, { result: 'bar' })
})
server.ready(function () {
server.listen({ type: 'tcp... |
/**
* Created by hongxin on 2015-12-16.
*/
//api : http://webservice.webxml.com.cn/WebServices/TrainTimeWebService.asmx
var soap = require('soap');
var url = 'http://webservice.webxml.com.cn/WebServices/TrainTimeWebService.asmx?wsdl';
function getTrainLine(xStartStation,xArriveStation) {
var args={
... |
import fs from "fs";
import camelize from "camelize";
import {coreOptions as comalCoreOptions} from "comal";
const comalCoreOptionNames = Object.keys(comalCoreOptions);
import isGlob from "is-glob";
import cloneDeep from "lodash/cloneDeep";
import includes from "lodash/includes";
import omit from "lodash/omit";
import... |
(function () {
'use strict';
describe('Guardians Controller Tests', function () {
// Initialize global variables
var GuardiansController,
$scope,
$httpBackend,
$state,
Authentication,
GuardiansService,
mockGuardian;
// The $resource service augments the response obj... |
// # Site Routes
// --------------------------------------
// contains all the routes of the site including pages, and rest api services.
//
// 1. Public Routes
// 2. Admin Routes
//
// requires
// * app
// * config
var app = module.parent.exports.app,
config = module.parent.exports.config,
anyandgo = module.paren... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import './CarouselFade.css';
class Carousel extends Component {
constructor(props) {
super(props);
this.state = {
activeItem: this.props.activeItem
};
}
componentDidMount() {
... |
describe("XHR Proxies", function () {
"use strict";
var originaLPromise;
var mockPromisesToResolveSynchronously = function () {
window.Promise = testHelper.SynchronousPromise;
};
beforeEach(function () {
originaLPromise = window.Promise;
});
afterEach(function () {
... |
import Handler from './Handler.js';
import consts from './consts';
export default class ResponseManager{
constructor(){
this.handlers = [];
this.customHandlers = [];
}
addCustomHandler(handler,resolver){
if (!(handler instanceof Handler))
return this.customHandlers.push(new Handler(handler, re... |
(function() {
'use strict';
angular
.module('app')
.controller('MenubarController', MenubarController);
MenubarController.$inject = [
'$scope',
'$window',
'$state',
'dialogService',
'projectModel',
'notificationService'
];
function MenubarController($scope,
... |
import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import { ScatterChart } from 'react-native-ios-charts';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'stretch',
backgroundColor: 'transparent'
}
});
export defau... |
import {
moduleFor,
test
} from 'ember-qunit';
moduleFor('controller:sessions/index', 'SessionsIndexController', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
// Replace this with your real tests.
test('it exists', function() {
var controller = this.subject()... |
// Import Vue and Vue plugins
import Vue from "vue";
import VueRouter from "vue-router";
import Vuetiful from "../src/main";
import views from "../src/views/views";
function registerPlugins() {
Vue.use(Vuetiful);
Vue.use(VueRouter);
}
function buildRoutes() {
let routes = [];
for (let directoryName ... |
Math.randomInt = function(min, max)
{
return Math.floor((Math.random()*(max - min))+1) + min;
}
Visual = Proto.clone().newSlots({
protoType: "Visual",
layers: null,
renderer: null,
camera: null,
scene: null,
light: null,
downKeys: {},
selectedLayer: null
}).setSlots({
go: function()
{
this.setup()
this... |
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.jade=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s... |
/**
* @file src/plugins/steps.js
* @license MIT
* @copyright 2017 10244872 Canada Inc.
*/
let taskTree
let bustedTasks
/**
* Creates a Hopp-ish object that runs
* subtasks in steps.
*/
const steps = tasks => ({
/**
* Starts all tasks one by one.
*
* @return {Promise} a promise that will be resolved ... |
/**
* Visual Blocks Language
*
* Copyright 2012 Google Inc.
* http://code.google.com/p/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/... |
/* ************************************************************************
Copyright: 2008 - 2014 Hericus Software, LLC
License: MIT License
Authors: Steven M. Cherry
************************************************************************ */
/**
* The cell renderer used for displaying Red, Yellow, Gree... |
/* global Metro */
(function(Metro, $) {
'use strict';
var MyObjectDefaultConfig = {
onMyObjectCreate: Metro.noop
};
Metro.myObjectSetup = function (options) {
MyObjectDefaultConfig = $.extend({}, MyObjectDefaultConfig, options);
};
if (typeof window["metroMyObjectSetup"] !== ... |
/*
Creates the Editor for Respond CMS
*/
var respond = respond || {};
// holds current row and node
respond.currnode = null;
respond.currrow = null;
respond.prefix = '';
// swaps nodes
jQuery.fn.swap = function(b){
b = jQuery(b)[0];
var a = this[0];
var t = a.parentNode.insertBefore(document.createTextNode('')... |
define(["iris", "jquery", "underscore", "text!examples/pcoords.json"],
function (Iris, $, _, ExampleData) {
var PADDING_TOP = 40;
var PADDING_BOTTOM = 40;
var PADDING_SIDES = 20;
var AXIS_WIDTH = 1;
var pcoordId = 0;
/**
* @class ParallelCoordinatesPlot
* Parallel Coordinates Plot.
... |
import express from 'express'
import categoryCtrl from '../controller/category.controller'
import isAuthenticated from '../policies/isAuthenticated'
const router = express.Router()
router.route('/')
.get(categoryCtrl.list)
.post(isAuthenticated, categoryCtrl.create)
router.route('/getLast')
.post(isAuthenticate... |
angular.module('vnstatApp').filter('formatDate', function () {
return function (date) {
return date.year + "-" + date.month + "-" + date.day;
}
});
angular.module('vnstatApp').filter('formatGB', function () {
return function (kb) {
return parseFloat(kb/(1024*1024)).toFixed(2);
}
});
|
'use strict';
angular.module('myApp', [
'ui.router',
'mgcrea.ngStrap',
'myApp.directives',
'myApp.services',
'myApp.homepage',
'myApp.ModalInnerContent',
'underscore',
'ngSanitize'
])
.constant('APP_SETTINGS', {
getUrl: function(url, vars) {
return this.host + this.urls[url];
},
hos... |
import expect from 'expect';
import minnaReducer from '../reducer';
import { fromJS } from 'immutable';
describe('minnaReducer', () => {
it('returns the initial state', () => {
expect(minnaReducer(undefined, {})).toEqual(fromJS({}));
});
});
|
const PACKET = require('../utils/packetCodes');
class Leaderboard {
sortPlayers() {
this.gameServer.manager.players.sort((a, b) => {
// return a.player.score + b.player.score;
if (a.player.score > b.player.score)
return -1;
if (a.player.score < b.player.sc... |
import React from 'react'
import MessageItem from 'src/collections/Message/MessageItem'
import * as common from 'test/specs/commonTests'
describe('MessageItem', () => {
common.isConformant(MessageItem)
common.implementsCreateMethod(MessageItem)
common.rendersChildren(MessageItem)
it('renders an li tag', () =>... |
const userController = require('./../controllers/user');
const homeController = require('./../controllers/home');
const articleController = require('./../controllers/article');
module.exports = (app) => {
app.get('/', homeController.index);
app.get('/user/register', userController.registerGet);
app.post('... |
"use strict";
import _ProteinViewerComponent from './viz/protein_viewer.jsx';
import _VariantViewerComponent from './viz/variant_viewer/variant_viewer.jsx';
var exampleData = require("./variant_viewer_fixture_data.json");
class _VariantViewer {
constructor(options) {
if (typeof options === "undefined") options = ... |
module.exports = function( grunt ){
grunt.registerTask('custom-task-3', function(){
grunt.log.writeln( "custom task 3 complete.");
} );
}; |
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
View,
Text,
FlatList,
ActivityIndicator,
} from 'react-native';
import CameraRoll from "@react-native-community/cameraroll";
import PropTypes from 'prop-types';
import Row from './Row';
import ImageItem from './ImageItem';
const styl... |
'use strict';
//un-fuck javascript:
var oldss = String.prototype.substring;
String.prototype.substring = function(a,b){
return oldss.call(this, a != undefined && a<0?a%this.length+this.length:a,
b != undefined && b<0?b%this.length+this.length:b)
};
// Declare app level module which depends on filters, and serv... |
export const embed = {"viewBox":"0 0 16 16","children":[{"name":"path","attribs":{"fill":"#000000","d":"M9 11.5l1.5 1.5 5-5-5-5-1.5 1.5 3.5 3.5z"}},{"name":"path","attribs":{"fill":"#000000","d":"M7 4.5l-1.5-1.5-5 5 5 5 1.5-1.5-3.5-3.5z"}}]}; |
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
options: {
sourcemap: true,
trace: true,
sassDir: 'examples/sass',
cssDir: '... |
const fs = require('fs');
const parseString = require('xml2js').parseString;
const jsTemplate = fs.readFileSync("./layouts/resolve404.template.js", "utf-8");
const xml = fs.readFileSync('./build/sitemap.xml', 'utf-8');
let urls = {};
let url_list = [];
module.exports = getPermalinks = function() {
parseString(xml... |
/**
* Request a payment for Hospitals
*/
import { Selector } from 'testcafe'
import Helpers from './test_utils/helpers'
import config from './test_utils/config'
const H = new Helpers()
// entry points
const currentProviderName = Selector('h1.home-heading')
const reqPaymentLink = Selector('[href="/request-payment"]... |
import * as types from './action-types';
export function getJOBTags(guilds) {
return {
type: types.GET_JOBOWNERJOB_GUILDS,
guilds
};
}
export function updateJOBGuild(guild) {
return {
type: types.UPDATE_JOBOWNERJOB_GUILD,
guild
};
}
export function updateJOBUser(user) {
return {
type: ty... |
var Twit = require('twit');
var io = require('../app').io;
var TWEETS_BUFFER_SIZE = 3;
var SOCKETIO_TWEETS_EVENT = 'tweet-io:tweets';
var SOCKETIO_START_EVENT = 'tweet-io:start';
var SOCKETIO_STOP_EVENT = 'tweet-io:stop';
var nbOpenSockets = 0;
var isFirstConnectionToTwitter = true;
var T = new Twit({
consumer_key... |
function obtemPreco(cod){
if(cod) {
var url="exemplo1.php?cod="+cod;
requisicaoHTTP("GET",url,true);
}
}
function trataDados(){
var preco = ajax.responseText; // obtรฉm a resposta como string
if(preco=="0.00")
var info = "Preรงo nรฃo encontrado";
else
var info = "O preรงo รฉ R$"+preco;
document.getElementByI... |
$(document).ready(function (){
var serverPath = "ajax/";
var dashboardcbAjaxPath = serverPath + "reg_dashboard-cb.php";
$("#drop-cb-dash").hide();
$("#new-cb-dash").hide();
$("#side-dash-mycb").click(function() {
$("#drop-cb-dash").hide();
$("#new-cb-dash").hide();
$("#up-cb-dash").show();
});
$("#side... |
const params = {
'particles': {
'number': {
'value': 50,
'density': {
'enable': true,
'value_area': 800
}
},
'color': {
'value': '#ffffff'
},
'shape': {
'type': 'circle',
'stroke': {
'width': 0,
'color': '#000000'
},
'... |
/*!
* gin HTML5 Game Engine v1.1.0 dev
* https://github.com/huandu/gin/
*
* Copyright 2011, Huan Du
* Licensed under the MIT license
* https://github.com/huandu/gin/blob/master/LICENSE
*/
/*#{{
replace /GinToolkit\.debug\(/ //GinToolkit.debug(
replace /GinToolkit\.error\(/ //GinToolkit.error(
replace /GinToolki... |
var restify = require('restify'),
bunyan = require('bunyan'),
async = require('async');
var settings = require('./config');
var logger = require(settings.path.root('logger'));
var server = restify.createServer({
name: "keet",
log: logger
});
server.use(restify.acceptParser(server.acceptable));
server.... |
/* ๆงๅถๅฏผ่ชๆ้ฎๅจไฝ */
function nav_click(is_show) {
if (is_show) {
/* ๆพ็คบๅทฆไพงaside */
$('.aside')
.addClass('visible-md visible-lg')
.removeClass('hidden-md hidden-lg')
/* ่ฐๆดๅณไพงๅ
ๅฎน */
$('.aside3')
.removeClass('col-md-13 col-lg-13')
.addClass('col-md-13 col-lg-13');
/* ่ฐๆดๆๅญๅ
ๅฎนๆ ผๅผ */
... |
'use strict';
const chai = require('chai');
const expect = chai.expect;
const Player = require('../lib/player');
const Vector = require('../lib/vector');
describe('Player', function() {
it('has a player type', function(){
let player = new Player(new Vector(5, 5));
expect(player.type).to.eql('player');
... |
const autoprefixer = require('autoprefixer');
const purgecss = require('@fullhuman/postcss-purgecss');
const whitelister = require('purgecss-whitelister');
module.exports = {
plugins: [
autoprefixer(),
purgecss({
content: [
'./layouts/**/*.html',
'./content/**/*.md',
],
safe... |
var hello = require('../drawings/hello.svg')(10, 40);
var createNode = require('svg-node');
var svg = document.getElementsByTagName('svg')[0];
var someLayer = createNode('g');
someLayer.appendChild(hello);
svg.appendChild(someLayer);
|
'use strict';
var countVerticies = require('./countVerticies');
var Promise = require('bluebird');
var limits = {
featureTotal: 50,
featureVertex: 100000,
totalVertex: 100000
};
var TRUE = Promise.resolve(true);
function ringIsClockwise(ringToTest) {
var total = 0,
i = -1,
rLength = ringToTest.length,
... |
// Detects if the current browser is IE.
const isIE = () => {
if (!NODE) {
// This require call returns the running version of IE or undefined
const isIE = require('component-ie');
return isIE;
}
return false;
};
export default {
isIE
};
|
import React, {PropTypes} from 'react';
const AuthorMediaElement = (props) => (
<div className="author">
<div className="author--photo">
<img src={props.photo} alt={props.name}/>
</div>
<div className="author--info">
<span>{props.name}</span>
<small>
<a href={`mailto:${ props.e... |
(function() { 'use strict';
/************************************************************************************
* @ngdoc service
* @name GridService
* @module metricapp
* @requires $http
* @requires REST_SERVICE
* @requires AuthService
*
* @description
* Provides grids management services.
**************************... |
var fs = require('fs');
var array = fs.readFileSync('server/anonnames.txt').toString().split("\n");
export default array;
|
'use strict';
module.exports = function filter(arr, cb) {
var res = arr.slice();
for (var i = arr.length - 1; i >= 0; i--) {
if (cb(arr[i])) {
continue;
}
res.splice(i, 1);
}
return res;
}; |
'use strict';
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
var browserSync = require('browser-sync');
var util = require('util');
function browserSyncInit(baseDir, browser) {
browser = browser === undefined ? 'default' : browser;
var routes = null;
var server = {
... |
'use strict';
import angular from 'angular';
import ctrl from './home-five-controller';
var stateConfig = ($stateProvider) => {
$stateProvider
.state('app.home.five', {
url: '/five',
controller: ctrl,
controllerAs: 'homeFive',
templateProvider: ($templateCa... |
import express from 'express';
import validate from 'express-validation';
import paramValidation from '../../config/param-validation';
import mapperCtrl from '../controllers/mapper.controller';
const router = express.Router(); // eslint-disable-line new-cap
router.route('/')
/** GET /api/mapper - Get list of mapper... |
;(function(win, lib) {
var doc = win.document;
var docEl = doc.documentElement;
var metaEl = doc.querySelector('meta[name="viewport"]');
var flexibleEl = doc.querySelector('meta[name="flexible"]');
var dpr = 0;
var scale = 0;
var tid;
var flexible = lib.flexible || (lib.flexible = {});
if (metaEl) {
... |
'use strict';
var http = require('request');
var Q = require('q');
var RequestClient = function() {};
/**
* Make http request
* @param {object} opts - The options argument
* @param {string} opts.method - The http method
* @param {string} opts.uri - The request uri
* @param {string} [opts.username] - The usernam... |
// Generated by CoffeeScript 1.9.2
module.exports = function(q, option) {
return (q != null ? q.__q : void 0) === 'options' && ((q != null ? q.__p[option] : void 0) != null);
};
|
// Generated by CoffeeScript 1.8.0
var search, setRelatedDOMVisibility;
$(document).on('emoji:ready', function() {
return search($('.speedy-filter').val());
});
search = function(keyword) {
if (keyword == null) {
keyword = '';
}
keyword = keyword.split(" ").pop();
$('.keyword').text(keyword);
keyword ... |
var webdriverjs = require('../../../index.js'),
conf = require('../../conf/index.js'),
tmpConf = {
desiredCapabilities: {
browserName: 'phantomjs'
}
};
/* global beforeEach */
describe('event handling', function() {
describe('is able to emit and listen to driver specific eve... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.WSDatePicker = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next())... |
import React from 'react'
import Link from '../Link'
import FacebookProvider, { Page } from 'react-facebook';
class Aside extends React.Component {
render() {
return (
<div id="colAside">
<div className="row">
<div className="col-md-12 col-xs-6">
</div>
<div className=... |
({* foo() {
yield;
3;
}});
|
/* jshint eqnull:true, noarg:true, noempty:true, eqeqeq:true, bitwise:false, strict:true, undef:true, curly:false, node:true, devel:true, newcap:false, maxerr:50 */
(function () {
"use strict";
// Imports
var fs = require("fs"),
url = require("url"),
path = require("path"),
child_process = require("child_proc... |
"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... |
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.9&appId=452012208471347";
fjs.parentNode.insertBefore(js, fjs);
}
(document, 'script', 'facebook-jssdk'));... |
var game = new Phaser.Game(320,505,Phaser.AUTO,'game'); //ๅฎไพๅgame
game.States = {}; //ๅญๆพstateๅฏน่ฑก
game.States.boot = function(){
this.preload = function(){
if(!game.device.desktop){//็งปๅจ่ฎพๅค้ๅบ
this.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT;
this.scale.forcePortrait = true;
this.scale.refresh();
}
game... |
$(document).ready(function () {
var facecard = $(".face-card");
var width = $(window).width();
newWidth(width);
// PULSE HOVER
$('.company-logos, .button').hover(
/* hover */
function(){$(this).addClass("pulse")},
/* not hovering */
function(){$(this).removeClass("pulse")}
);
... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['sap/m/semantic/SemanticButton'], function(SemanticButton) {
"use strict";
/**
* Constructor for a new AddAction.... |
var JsRoutesRails = (function() {
var routes = {};
<% @routes.each do |helper, path| %>
routes['<%= helper %>'] = function(options) {
return format('<%= path %>', options);
};
<% end %>
function format(string, options) {
var str = string.toString();
for (var option in options) {
str = str... |
const INITIAL_STATE = {
description: 'Ler Livro',
list:[{
_id: 1,
description: 'Pagar fatura',
done: true
},{
_id: 2,
description: 'Reuniรฃo com a equipe',
done: false
},{
_id: 3,
description: ... |
import { mount } from '@vue/test-utils'
import BCardFooter from './card-footer'
describe('card-footer', () => {
it('has root element "div"', async () => {
const wrapper = mount(BCardFooter)
expect(wrapper.is('div')).toBe(true)
})
it('has class card-header', async () => {
const wrapper = mount(BCardF... |
'use strict';
var EventEmitter = require('events').EventEmitter;
exports = module.exports = new EventEmitter();
var mage;
var logger;
var Archivist;
/**
* Default description if none is set on a state object
*/
var NO_DESCRIPTION = 'no description';
const { BAN_GROUP } = require('../modules/auth');
/**
* State... |
// parameter่จญๅฎ
var nextHref = 'index_start.html';
var url = 'https://401wo.cybozu.com/k/guest/1/v1/record.json';
var getAppId = 16;
var getApiToken = "RTuaWLIr0GknCrx5MBpbx3SO0Ej4Q1bNwf1tpDtk";
var imageKey = 'picture';
var adviceKey = 'advice';
var scenarioId = 1;
// ่ตทๅๆ่ชญใฟ่พผใฟ(window.onload)
window.onload = function... |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import PriceCard from './';
import '../style.sass';
storiesOf('PriceCard', module)
.add('Standard', () => (
<PriceCard
title="Standard"
amount="10,-"
currency="โฌ"
pe... |
{
if (capture) {
console.log("Weex do not support event in bubble phase.");
return;
}
if (once) {
var oldHandler = handler;
var _target = target$1;
handler = function(ev) {
var res =
arguments.length === 1
? oldHandler(ev)
: oldHandler.apply(null, arguments)... |
/**
* Serve forms and validating errors
* @author: Nikolay Ermin <keltanas@gmail.com>
*/
(function(w, $, Backbone){
w.formView = Backbone.View.extend({
events: {
'submit' : function() {
this.$el.ajaxSubmit({
dataType: 'json',
beforeSubmi... |
/* MIT License (MIT) - Copyright (c) 2015 HTML5andBeyond.com */
$.fn.iCSS = function(property, value) {
var getStyle = this.attr('style');
if (getStyle == undefined) {
this.attr('style', property + ': ' + value + '!important;')
} else if (getStyle.slice(-1) != ';') {
this.attr('style', getStyle + '; ' + property + ... |
/**
* Direct selector to the notificationList state domain
*/
const selectNotificationList = () => (state) => state.get('notificationList');
export {
selectNotificationList,
};
|
var flowerTools = angular.module('flowerTools',[]);
flowerTools.directive('focusOn', function() {
return function(scope, elem, attr) {
scope.$on(attr.focusOn, function(e) {
elem[0].focus();
});
};
});
flowerTools.directive('focusMe', function($timeout, $parse) {
return {
//scope: true,... |
import { Range } from 'immutable';
class Wrapper {
constructor(r) {
this.range = r;
}
get set() {
return this.range.toSet();
}
get list() {
return this.range.toList();
}
}
export default function range(start, end, step) {
return new Wrapper(Range(start, end + 1, step));
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.