text stringlengths 2 1.05M |
|---|
import {
GET_FEATURES,
ADD_FEATURE,
REMOVE_FEATURE,
TOGGLE_FEATURE,
UPDATE_FEATURE_GROUPS,
UPDATE_FEATURE_USERS,
UPDATE_FEATURE_PERCENTAGE,
} from './actionTypes';
export const addFeature = feature => ({
type: ADD_FEATURE,
payload: feature,
})
export const removeFeature = feature ... |
var express = require('express');
var app = express();
app.use(express.static('public'));
// //setup for local development
// app.get("/data", function (req, res) {
// const content = require('./service/content.json');
// res.send(content);
// });
app.listen(3000); |
var expect = require("chai").expect;
module.exports = function(helpers) {
var items = ["a", "b", "c"];
var count = 0;
var component = helpers.mount(require.resolve("./index"), {
items: items,
count: count
});
expect(
helpers.targetEl.firstElementChild.getAttribute("data-count")
).to.equal("0"... |
define(['dart_sdk'], function(dart_sdk) {
'use strict';
const core = dart_sdk.core;
const typed_data = dart_sdk.typed_data;
const collection = dart_sdk.collection;
const _native_typed_data = dart_sdk._native_typed_data;
const dart = dart_sdk.dart;
const dartx = dart_sdk.dartx;
const typed_buffers = Obje... |
import Env from './env'
let config = {
env: Env,
'development': {
'WEIBO_AUTH_URL': 'http://127.0.0.1:8080/api/auth/loginTest',
'domain': '127.0.0.1',
'QQ_AUTH_URL': 'http://127.0.0.1:8080/api/auth/loginTest',
env: Env
},
'production': {
'WEIBO_AUTH_URL': 'https:... |
'use strict';
const UNIX_EPOCH = 'Thu, 01 Jan 1970 00:00:00 GMT';
const COOKIE_EXPIRE = 'Fri, 01 Jan 2100 00:00:00 GMT';
const COOKIE_DELETE = `=deleted; Expires=${UNIX_EPOCH}; Path=/; Domain=`;
const DEFAULT_ACCESS = {
guests: true, // allow access for non-authenticated connections
logged: true, // allow access ... |
const {
serialize,
deserialize
} = require('../../../../lib/serializers/numberSerializer')
describe('Number Serializer', () => {
it('should correct serialize and deserialize numbers', () => {
expect(deserialize(serialize(0))).to.be.eql(0)
expect(deserialize(serialize(1.1))).to.be.eql(1.1)
expect(dese... |
ClassicEditor
.create( document.querySelector( '#description' ), {
language: 'pt-br',
// toolbar: [ 'heading', '|', 'bold', 'italic', 'link' ]
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} ); |
var gulp = require('gulp');
var gutil = require('gulp-util');
var jade = require('gulp-jade');
var gulpLiveScript = require('gulp-livescript');
var sass = require('gulp-sass');
var paths = {
jade: ['./jade/**/*.jade'],
ls: ['./livescripts/**/*.ls'],
sass: ['./sass/**/*.sass']
};
gulp.task('default', ['jade', 'l... |
import { rowsAir, tableRock } from "../../../utils";
import { getAttribute } from "@util/attribute";
let rowsA = [
{ key: "dmg1", chs: "1- Normal Attack Damage" },
{ key: "dmg2", chs: "2- Normal Attack Damage" },
];
let rowsB = [
{ key: "bDmg1", chs: "Charge Attack Damage -1" },
]
export default function... |
import {Feature} from "../../utils/feature.js";
export default new Feature({
id: 'bluetooth',
name: 'Bluetooth',
description: [
`The <b>Web Bluetooth API</b> is a low-level API allowing Web applications to pair with the nearby Bluetooth Low Energy-enabled peripheral devices and access their services exposed.... |
// This file handles various upgrade procedures
// when file syntax changes between versions.
// const util = require('./util.js');
// const fs = require('fs');
module.exports = {
// Takes inputs:
// fromVersion, which is the version we are upgrading from
// toVersion, which is the version we are upgrading to
... |
// stage types
export const MAIN = 'MAIN';
export const QUALIFYING = 'QUALIFYING';
export const CONSOLATION = 'CONSOLATION';
export const VOLUNTARY_CONSOLATION = 'VOLUNTARY_CONSOLATION';
export const PLAY_OFF = 'PLAY_OFF';
export const validStages = [
MAIN,
QUALIFYING,
CONSOLATION,
PLAY_OFF,
VOLUNTARY_CONSOL... |
const connections = require("../app/database");
class LabelService {
async create(name) {
const statement = `INSERT INTO label (name) VALUES(?);`;
const [result] = await connections.execute(statement, [name]);
return result;
}
async getLabelByName(name) {
const statement = `SELECT * FROM label WHERE name = ... |
import styled from "styled-components"
const AwardsSectionWrapper = styled.div`
padding: 85px 0;
.heading {
padding-right: 103px;
}
.col:nth-of-type(odd) {
.awards-item {
margin-right: 10px;
}
}
.awards-item-wrapper {
display: inline-flex;
flex-wrap: wrap;
justify-content: sp... |
'use strict';
let angular = require('angular');
module.exports = angular.module('spinnaker.core.deploymentStrategy.none', [])
.config(function(deploymentStrategyConfigProvider) {
deploymentStrategyConfigProvider.registerStrategy({
label: 'None',
description: 'Creates the next server group with no im... |
import sum from './calculations/sum.js'
import validateAddends from './validations/validate-addends.js'
async function add(...addends) {
validateAddends(addends)
return sum(addends)
}
export default add
|
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, global.BootstrapTable = factory(global.jQuery));
}(this, function ($) { 'use ... |
function ChoseFile(buttonName) {
document.getElementById(buttonName).click();
}
function ReadImageData(img, fileobj) {
// img -- image element
img.onload = function() {}
var reader = new FileReader();
reader.onload = function(evt) {
img.src = evt.target.result;
}
reader.readAsDataURL(fileobj);
}
... |
// Call the dataTables jQuery plugin
$(document).ready(function() {
$('#dataTable').DataTable({
"order": [[0, "desc"]]
});
}); |
import * as React from "react"
import { Link } from "gatsby"
const Layout = ({ location, title, children }) => {
const rootPath = `${__PATH_PREFIX__}/`
const isRootPath = location.pathname === rootPath
let header
if (isRootPath) {
header = (
<h1 className="main-heading">
<Link to="/">{title}... |
const fs = require ("fs");
const utils = require ("daveutils");
const feedRead = require ("davefeedread");
const urlTestFeed = "http://feeds.wnyc.org/radiolab";
const timeOutSecs = 30;
const whenstart = new Date ();
feedRead.parseUrl (urlTestFeed, timeOutSecs, function (err, theFeed) {
if (err) {
console.log (err.... |
import React, { useState, useContext, useEffect } from "react";
import { Paper, ButtonGroup, IconButton, Button } from "@material-ui/core";
import { Link } from "react-router-dom";
import ModeCommentOutlinedIcon from '@material-ui/icons/ModeCommentOutlined';
import ThumbDownOutlinedIcon from '@material-ui/icons/ThumbD... |
// This file was procedurally generated from the following sources:
// - src/dstr-binding/obj-ptrn-id-init-skipped.case
// - src/dstr-binding/default/async-gen-func-named-expr-dflt.template
/*---
description: Destructuring initializer is not evaluated when value is not `undefined` (async generator named function expres... |
const axios = require('axios');
const keys = require('../config/APIkeys');
async function requestGasPrice(){
var gasPrice;
await axios.get('https://www.etherchain.org/api/gasPriceOracle')
.then(function (response) {
gasPrice = response.data;
})
.catch(function (error) {
console.log(er... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("placeholder","cy",{title:"Priodweddau'r Daliwr Geiriau",toolbar:"Daliwr Geiriau",name:"Enw'r Daliwr Geiriau",invalidName:"Dyw'r daliwr geiria... |
// Imports: GraphQL
import { gql } from "apollo-server-express";
// GraphQL: TypeDefs
const typeDefs = gql`
type Company {
_id: String!
name: String
email: String
password: String
hash: String
description: String
data: String
}
type User {
_id: String!
name: String
email:... |
// ==UserScript==
// @name backpack.tf - Miscellaneous Extensions
// @description Adds more options for sorting items in backpacks (currently Sorting for paints, spells, levels, scm price, classified listings) and other stuff which I would have liked (including highlighting spells, autocompleting spell names, ... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, browserHistory } from 'react-router';
import ReduxPromise from 'redux-promise';
import reducers from './reducers';
import routes from './routes';
c... |
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// 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/LICENSE-2.0
//
// Unl... |
import React from 'react';
import PlusIcon from 'ps-react/PlusIcon';
export default function PlusIconExample() {
return <PlusIcon />;
}
|
/*
Copyright 2017 Ziadin Givan
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/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Typography from 'material-ui/Typography';
import Grid from 'material-ui/Grid';
import Button from 'material-ui/Button';
import Divider from 'material-ui/Divider';
import PaddedContent from '../../../../../common... |
import React, { useContext } from 'react';
import {
ViewPropTypes,
TouchableOpacity,
StyleSheet,
View,
Text,
Image,
} from 'react-native';
import PropTypes from 'prop-types';
import Color from 'color';
import { ThemeContext } from '../theme';
const CLOSE_IMG = require('../assets/images/cancel.png');
const... |
const target = {
// id: 'target',
foo: 'bar',
baz: 'qux'
};
const handler = {
// get() {
// return 'handler override';
// }
// get(trapTarget, property, receiver) {
// // console.log(trapTarget === target);
// // console.log(property);
// // console.log(receiver === proxy);
// return ... |
if (require.main === module) {
const args = process.argv.slice(2)
const releaseChannel = args[0]
const vscodeVersion = args[1]
if (releaseChannel === 'latest') {
console.log(`::set-output name=tag_name::${vscodeVersion}`)
console.log(`::set-output name=asset_name::philodendron`)
} else {
console.... |
const { ChallengeStatus } = require('../models');
const { validationResult } = require('express-validator');
module.exports = {
store: async (req, res) => {
const transaction = await ChallengeStatus.sequelize.transaction();
try {
const errors = validationResult(req);
... |
const minutes = 9;
const the_interval = 0.3 * 60 * 1000;
// Move the mouse across the screen as a sine wave.
const robot = require('robotjs');
const txtgen = require('txtgen');
// Speed up the mouse.
robot.setMouseDelay(2);
const twoPI = Math.PI * 2.0;
const screenSize = robot.getScreenSize();
const height = screenS... |
/*global describe, beforeEach, it */
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
describe('yotest generator', function () {
beforeEach(function (done) {
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
... |
angular.module('MyApp', ['ngResource', 'ngMessages', 'ngAnimate', 'toastr', 'ui.router', 'satellizer'])
.config(function($stateProvider, $urlRouterProvider, $authProvider) {
$stateProvider
.state('home', {
url: '/',
controller: 'HomeCtrl',
templateUrl: 'partials/home.html'
})
... |
import React from 'react';
import PropTypes from "prop-types";
import get from 'lodash/get';
import Highlight from 'react-highlight.js';
import Scrollbars from "react-custom-scrollbars";
import TextField from '@material-ui/core/TextField';
import Typography from '@material-ui/core/Typography';
import Box from '@mater... |
$(function() {
consoleInit();
start(main);
});
const DBALL_CHEF_ABI = [{"inputs":[{"internalType":"contract DBallToken","name":"_dball","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"uint256","... |
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version ... |
define({
tocChooseTemplate: 'Atlasīt lapas veidni',
newPage: 'Jauna lapa',
pages_upper: 'Lapas',
content_upper: 'Saturs',
body_upper: 'Pamatteksts',
tocLoading: 'Ielādē',
addPage: 'Pievienot lapu',
addLink: 'Pievienot saiti',
addFolder: 'Pievienot mapi',
addDialog: 'Pievienot logu',
mak... |
const constants = {
TILESIZE: 8,
}
export default constants |
module.exports=require('../../decode-ranges.js')('wlYHh7BAAhSABAghCBAj8BvkAIADADADALALAAAZAIADADADALAxshA4NA_AAAJMAEAAABABAI4NYOGhVF') |
dojo.provide("sketchSpaceDesigner.designer.modes.Select");
dojo.require("sketchSpaceDesigner.designer.modes.Edit");
dojo.require("dijit.form.Button");
dojo.declare("sketchSpaceDesigner.designer.modes.Select", [sketchSpaceDesigner.designer.modes.Edit], {
isOutlineMouseDown: false,
isMoving: false,
minMarqueeSize... |
'use strict';
// ---------------------------------------------------------------------------
const hitbtc = require ('./hitbtc');
const { PermissionDenied, ExchangeError, ExchangeNotAvailable, OrderNotFound, InsufficientFunds, InvalidOrder } = require ('./base/errors');
const { TRUNCATE, DECIMAL_PLACES } = require ('... |
/*jshint esversion: 9 */
/*
File: ../keeper/src/data/cars.js
*/
const cars = [
{
model: "Honda Civic",
coloursByPopularity: ["black", "silver"],
speedStats: {
topSpeed: 140,
zeroToSixty: 8.5
}
},
{
model: "Tesla Model 3",
coloursByPopularity: ["red", "white"],
speedStats: ... |
import React from "react";
import Layout from "../components/layout";
import { graphql, useStaticQuery } from "gatsby";
import thumbnailImg from "../images/pages/dove-dormire.jpg";
import PageContainer from "../components/styled/PageContainer";
import Hero from "../components/styled/Hero";
import { HeroTitle, HeroSubTi... |
/* global angular */
(function (app) {
"use strict";
app.controller("admin1referalController",
["$scope", "assignmentsListService", "teachers", "AECListService", "StudentsService", '$modal', 'notify', '$http', '$localStorage',
function ($scope, assignmentsService, teachers, aec, stude... |
import React from 'react';
import { View, StyleSheet, Text } from 'react-native';
import Colors from '../constants/colors';
const NumberContainer = (props) => {
return (
<View style={styles.container}>
<Text style={styles.number}>{props.children}</Text>
</View>
);
};
const styles = StyleSheet.creat... |
ko.extenders.numeric = function (target, precision) {
// Create a writeable computed observable to intercept writes to our observable.
var result = ko.computed({
read: target, //always return the original observables value
write: function (newValue) {
var current = target(),
... |
export * from './components/store-notices-container';
export * from './context';
|
/**
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
* ... |
// The MIT License (MIT)
// Copyright (c) 2021 Oguzhan Soykan
// 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... |
(function (angular, $, _) {
angular.module('crmMailing', [
'crmUtil', 'crmAttachment', 'crmAutosave', 'ngRoute', 'ui.utils', 'crmUi', 'dialogService'
]);
angular.module('crmMailing').config([
'$routeProvider',
function ($routeProvider) {
$routeProvider.when('/mailing', {
template: '<di... |
'use strict';
var Message = require('../message');
var inherits = require('util').inherits;
var umbrucore = require('umbrucore-lib');
var BufferReader = umbrucore.encoding.BufferReader;
var BufferWriter = umbrucore.encoding.BufferWriter;
var $ = umbrucore.util.preconditions;
function GetMnListDiffMessage(args, option... |
'use strict'
const gulp = require('gulp')
const sass = require('gulp-sass')
const clipboard = require('gulp-clipboard')
const copy = require('copy-paste').copy
const log = require('fancy-log')
const p = require('path')
const fs = require('fs')
const paths = {
input: 'scss/styles.scss',
output: './web_root/scripts/... |
import React, { useEffect} from 'react';
export const PinMap = (props) => {
useEffect(()=>{
},[])
return(
props.fill?
<PinMapIco />
://or
<PinMapFillIco />
)
}
const PinMapFillIco = (props) => {
return(
<svg xmlns="http://www.w3.org/2000/svg" width=... |
//
// Charts
//
'use strict';
//
// Sales chart
//
var SalesChart = (function () {
// Variables
var $chart = $('#chart-sales-dark');
// Methods
function init($this) {
var salesChart = new Chart($this, {
type: 'line',
options: {
scales: {
yAxes: [
{
... |
import React from 'react';
import { View, Text, StyleSheet, Linking } from 'react-native';
const styles = StyleSheet.create({
boxStyle: {
flexDirection: 'column', alignItems: 'center', alignItems: 'center', backgroundColor: 'white',
padding: 10, marginTop: 10, margin: 5,
shadowColor: "#000", shadowOffse... |
import React from 'react';
import { observer } from 'mobx-react';
import { useRouter } from 'next/router';
import CompleteResetPassword from '@@/components/CompleteResetPassword';
import Layout from '@@/components/Layout';
import { sendNewUserEmail } from '@@/utils/API';
const SetPassword = () => {
const router = u... |
"use strict";
//local imports
const { newState } = require("../../../../../schemas");
const { actions } = require("../../../../../scripts/client/state/actions/actions");
const { testReducer } = require("../../../test-helpers");
//list clear state
test("reducer accepts LIST_CLEAR_STATE actions", () => {
const { l... |
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
parserOptions: {
ecmaFeatures: {
js: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'react',
'react-hooks',
],
rule... |
const config = require('../config');
const mongojs = require('mongojs');
const logger = require('winston');
require('sugar').extend();
function stringId2ObjectId(obj) {
if (obj) {
Object.keys(obj).forEach((key) => {
if (key === '_id') {
if (typeof obj[key] == 'string') {
obj[key] = mongo... |
var searchData=
[
['updatebeatcount_218',['UpdateBeatCount',['../class_performance_indicator.html#a1dc851536bf2e405aef31fe7958d51a6',1,'PerformanceIndicator']]],
['updatedynamicvalues_219',['updateDynamicValues',['../class_controller_data_updater.html#a7583f24652a79ee14fdf35387948586c',1,'ControllerDataUpdater']]],... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=/users/hansl/sources/hansl/angular-cli/src/webpack.js.map |
import React, {Component} from 'react'
import {PropTypes} from 'prop-types'
import {SummaryPos} from './index'
class Summary extends Component {
constructor(props) {
super(props);
}
static propTypes = {
schedulerData: PropTypes.object.isRequired,
summary: PropTypes.objec... |
/**
* Not type-checking this file because it's mostly vendor code.
*/
/*!
* HTML Parser By John Resig (ejohn.org)
* Modified by Juriy "kangax" Zaytsev
* Original code by Erik Arvidsson (MPL-1.1 OR Apache-2.0 OR GPL-2.0-or-later)
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
*/
import { makeMap, no... |
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactBootstrap=t(require("react"),require("react-dom")):e.ReactBootstrap=t(e.React,e.ReactDOM)}(... |
import ButtonDropdowns from './ButtonDropdowns';
import ButtonGroups from './ButtonGroups';
import Buttons from './Buttons';
import BrandButtons from './BrandButtons';
export {
ButtonDropdowns, ButtonGroups, Buttons, BrandButtons
}
|
load("201224b0d1c296b45befd2285e95dd42.js");
// |jit-test| error:recursion
x = /x/;
z = [];
y = Object.defineProperty(z, "valueOf", {
get: function() {
+y;
for (var i = 0; i < 1; i++) {
a = x.exec(0);
}
}
})
z + '';
|
'use strict';
const dummySubscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
var authorizationToken = null;
var subscriptions = null;
var mpnIdMap = {};
console.log('[Azure Partner Help Extention] start script.js');
var port = chrome.runtime.connect( { name: "my-background-port"} );
// This delay process is imp... |
/* Flot plugin for selecting regions of a plot.
Copyright (c) 2007-2013 IOLA and Ole Laursen.
Licensed under the MIT license.
The plugin supports these options:
selection: {
mode: null or "x" or "y" or "xy",
color: color,
shape: "round" or "miter" or "bevel",
minSize: number of pixels
}
Selection ... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[245],{309:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return a})),n.d(t,"metadata",(function(){return s})),n.d(t,"rightToc",(function(){return c})),n.d(t,"default",(function(){return l}));var i=n(3),r=n(7),o=(n(0),n(442)),a={id:"kratos-identit... |
import popover from './popover.vue';
export default popover;
|
function(doc) {
if (doc._id.substr(0,2) == "o." && !doc.finished) {
emit(doc.timeModified,null);
}
} |
/**
* @fileoverview Rule to disallow assignments to native objects or read-only global variables
* @author Ilya Volodin
* @deprecated in ESLint v3.3.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//----------------------------------... |
'use strict';
// Declare app level module which depends on views, and components
angular
.module('myApp', [
'ngMaterial',
'ui.router',
'LocalStorageModule',
'angular-loading-bar',
'md.data.table',
'toaster',
'ngAnimate',
'directives',
'services',
'providers',
'login',
'easymongo',
'... |
'use strict'
var Parser = require('jsonparse')
, through = require('through')
/*
the value of this.stack that creationix's jsonparse has is weird.
it makes this code ugly, but his problem is way harder that mine,
so i'll forgive him.
*/
exports.parse = function (path, map) {
var header, footer
var par... |
var slugify = require('slugify')
// import slugify from 'slugify'
const text1 = slugify('This is a simple text...')
const text2 = slugify('This is a simple text...', '**')
console.log(text1)
console.log(text2) |
var Statistics = require('./statistics');
var Tile = require('./tile').Tile;
var Metatile = require('./tile').Metatile;
module.exports = Scheme;
require('util').inherits(Scheme, process.EventEmitter);
function Scheme() {
throw new Error('not instantiable');
}
Scheme.types = {
file: require('./filescheme'),
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("... |
///////////////////////////////////////////////////////////////////////////
// Copyright © Esri. All Rights Reserved.
//
// 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:/... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var HarmonyModulesHelpers = exports;
HarmonyModulesHelpers.getModuleVar = function(state, request) {
if(!state.harmonyModules) state.harmonyModules = [];
var idx = state.harmonyModules.indexOf(request);
if(i... |
$(window).on("scroll", function () {
if ($(this).scrollTop() > 200) {
$(".navbar").addClass("transparent");
// $(".navbar").stop().animate({opacity: 0});
}
else {
$(".navbar").removeClass("transparent");
// $(".navbar").stop().animate({opacity: 1});
}
});
$(window).on("sc... |
'use strict';
const Controller = require('egg').Controller;
class HomeController extends Controller {
async index() {
this.ctx.body = 'hi, ' + this.app.plugins.tsSequelize.name;
}
}
module.exports = HomeController;
|
// @flow weak
const { jsdom } = require('jsdom');
function createDOM() {
global.document = jsdom('');
global.window = document.defaultView;
Object.keys(document.defaultView).forEach((property) => {
if (typeof global[property] === 'undefined') {
global[property] = document.defaultView[property];
}
... |
'use strict';
const { users } = require('../models/index.js');
module.exports = async (req, res, next) => {
try {
if (!req.headers.authorization) { next('Invalid Login') }
const token = req.headers.authorization.split(' ').pop();
const validUser = await users.authenticateToken(token);
req.user = ... |
import { expect } from 'chai';
import { PrebidServer as Adapter, resetSyncedStatus } from 'modules/prebidServerBidAdapter/index.js';
import adapterManager from 'src/adapterManager';
import * as utils from 'src/utils';
import { ajax } from 'src/ajax';
import { config } from 'src/config';
import events from 'src/events';... |
/**
* 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... |
import React, { Component } from 'react';
import client from '../../data/contentful';
import FontAwesome from 'react-fontawesome';
import styles from './styles.scss';
import NavBar from '../navbar/';
class Hero extends Component {
constructor() {
super()
this.state = {
tangoBanner: ''
}
}
com... |
/**
* Created by Administrator on 2017/9/12 0012.
*/
var _ =require('underscore');
var Player = require('./Player');
var zhuoguiMgr = function () {
this.guiNum = 0;
this.di = 0;
this.gui = [];
this.players = [];
this.seatIndex = 0;
this.trun = 0;
this.countBySeat = {};
this.playersByS... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M7 3v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2H9c-1.1 0-2 .9-2 2zm2.5 12.5c.29-.12.55-.29.8-.48l-.02.03 1.01.39c.23.09.49 0 .61-.22l.84-1.46c.12-.21.07-.49-.12-.64l-.8... |
var capitalAlphabet = ['Q','W','E','R','T','Y','U','I','O','P','A','S','D','F','G','H','J','K','L','Z','X','C','V','B','N','M'];
var alphabet = ['q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m'];
var special = ['`','~','!','@','#','$','%','^','&','*','(',')','_','=... |
"use strict";
/**
* Created by ngtmuzi on 2018/2/10.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const lodash = require("lodash");
exports.default = pave;
/**
* 展平对象
* {a:1, b:{c:1,d:{e:[2]}}} -> {a:1,'b.c':1,'b.d.e':[2]}
* @param obj
* @param pre
* @param split
* @returns {*}... |
/*
* Copyright 2022 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
var fs = require('fs')
var path = require('path')
var test = require('tape')
var tempDir = require('temporary-directory')
var spawn = require('./helpers/spawn.js')
var help = require('./helpers')
var dwebx = path.resolve(path.join(__dirname, '..', 'bin', 'cli.js'))
test('clone - default opts', function (t) {
help.s... |
import { DecimalChanta } from "../../lib/b2c6/mathematics/DecimalChanta";
test('Testing Instantiating of DecimalChanta', () => {
let a = new DecimalChanta(11.5);
expect(a.toString()).toBe("11.5");
DecimalChanta.precision = 97;
a = new DecimalChanta("11.53461417109910741112325789012312343877777333399043434... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.