text stringlengths 2 1.04M |
|---|
import _ from 'lodash';
import React from 'react';
import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines';
function average(data){
return _.round(_.sum(data)/data.length)
}
export default (props) => {
return (
<div>
<Sparklines height={120} width={180} data={props.data}>... |
/**
Write a function that checks if an array of person contains only people of age (with age 18 or greater)
Use only array methods and no regular loops (for, while)
*/
var arr = [
{name: 'Ivan', lastName: 'Ivanov', age: 13},
{name: 'Pesho', lastName: 'Peshev', age: 21},
{name: 'Bay', lastName: 'Ivan', ag... |
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "../jquery.validate.js"], factory );
} else if (typeof module === "object" && module.exports) {
module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
/*
* Translated defau... |
// const id = window.location.search.split('?').pop()
// const socket = new WebSocket(
// `wss://connect.websocket.in/v2/${id}?token=${config.token}`
// );
// // Connection opened
// socket.addEventListener('open', function(event) {
// document.addEventListener('keyup', e => {
// const text = document.getElem... |
import React from 'react';
import AppNavigator from './Navigation/AppNavigator';
import { firebaseConfig } from './config';
import * as firebase from 'firebase';
if(!firebase.apps.length){
firebase.initializeApp(firebaseConfig);
}
export default function App() {
return<AppNavigator/>;
} |
// Global constant variables
var conSQLConnection = "digital-account::DigAccMessage",
conSchema = "\"DigAcc\"",
conMessageTable = "digital-account.data::DigAccMessage.Message",
conEventTable = "digital-account.data::DigAccMessage.Event",
conSubscriberTable = "digital-account.data::DigAccMessage.Subscriber",
conUse... |
/**
* Access Token Storage
*
* Copyright(c) 2013 Christophe Hamerling <christophe.hamerling@gmail.com>
* MIT Licensed
*/
var express = require('express')
, viewHelpers = require('./middlewares/view')
, mongoStore = require('connect-mongo')(express)
, flash = require('connect-flash');
module.exports = func... |
const path = require('path')
const { merge } = require('webpack-merge')
const ESLintPlugin = require('eslint-webpack-plugin')
const StylelintPlugin = require('stylelint-webpack-plugin')
const common = require('./webpack.common.js')
module.exports = merge(common, {
mode: 'development',
module: {
rules: [
... |
import React from 'react'
import { Link } from 'gatsby'
import headerStyles from './header.module.scss'
import FaAlignJustify from 'react-icons/lib/fa/align-justify'
import FacebookIcon from '@material-ui/icons/Facebook'
import { Button } from 'react-bootstrap';
import { OutboundLink } from "gatsby-plugin-google-analyt... |
import React from 'react';
import PropTypes from 'prop-types';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import FlipCard from './FlipCard';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faQuestion, faTimes} from '@fortawesome/free-solid-svg-icons';... |
/*!
* ${copyright}
*/
// Ensure that sap.ui.unified is loaded before the module dependencies will be required.
// Loading it synchronously is the only compatible option and doesn't harm when sap.ui.unified
// already has been loaded asynchronously (e.g. via a dependency declared in the manifest)
sap.ui.getCore().loa... |
/*!
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
* v4.0.28.1 - 2018-04-27
* |
const baseConfig = require("../../../jest.config");
module.exports = {
...baseConfig,
name: "popups-modals-shell",
preset: "../../../jest.config.js",
coverageDirectory: "../../../coverage/libs/shell/popups-modals-shell",
snapshotSerializers: [
"jest-preset-angular/AngularSnapshotSerializer.js",
"jest... |
// Scalars
const IdScalar = require('../../scalars/id.scalar');
// Schemas
const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema');
// Inputs
const StructureDefinitionInput = require('../../inputs/structuredefinition.input');
// Resolvers
const {
structuredefinitionCreateResolver,
str... |
define(function(require, exports, module) {
var tree = require('treehugger/tree');
if (!Function.prototype.curry) {
Function.prototype.curry = function() {
var fn = this,
args = Array.prototype.slice.call(arguments);
return function() {
return fn.apply(this, args.concat(Arr... |
const { join } = require('path');
const { defaults: tsjPreset } = require('ts-jest/presets');
module.exports = {
preset: 'ts-jest',
transform: { ...tsjPreset.transform },
testEnvironment: 'jsdom',
rootDir: join(__dirname, '..'),
testMatch: ['**/__tests__/**/*.{ts,tsx}', '**/?(*.)test.{ts,tsx}'],
testPathIg... |
/* eslint-disable
camelcase,
handle-callback-err,
max-len,
one-var,
standard/no-callback-literal,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnece... |
/**
* ShowMe project controller script for the action "create".
*
* @author Andrey Klimenko <andrey.iemail@gmail.com>
*/
// Namespace for project the controller
if (typeof doctorFrontend.controllers.hospital == 'undefined') {
doctorFrontend.controllers.hospital = {};
}
doctorFrontend.controllers.hospital.crea... |
import React from 'react';
export class ContentFilterInput extends React.Component {
constructor(props){
super(props);
this.handleInputChange = this.handleInputChange.bind(this);
}
componentWillUnmount(){
this.props.onChange('');
}
handleInputChange(event) {
... |
TC.feature = TC.feature || {};
if (!TC.Feature) {
TC.syncLoadJS(TC.apiLocation + 'TC/Feature');
}
/*
* Polygon
* Parameters: coords, array of array of 2 element arrays of numbers; options, object
*/
TC.feature.Polygon = function (coords, options) {
const self = this;
TC.Feature.apply(self, arguments)... |
// 1234213421341234234 |
//// [Protected9.ts]
class C {
constructor(protected p) { }
}
//// [Protected9.js]
var C = (function () {
function C(p) {
this.p = p;
}
return C;
})(); |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.MainHeading = void 0;
var _react = _interopRequireDefault(require("react"));
var _clsx = _interopRequireDefault(require("clsx"));
var _Translate = require("@docusaurus/Translate");
var _themeCommon = require("@... |
/*!
* OpenUI5
* (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides default renderer for control sap.ui.unified.Menu
sap.ui.define([],
function() {
"use strict";
/**
* Currency renderer.
*
* @version 1.73.2
* @... |
// Copyright 2019 Tad Lebeck
//
// 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 wr... |
// module.exports = {
// hooks: {
// 'pre-commit': 'pretty-quick --staged'
// }
// } |
// @flow
// import nodejs bindings to native tensorflow,
// not required, but will speed up things drastically (python required)
// import "@tensorflow/tfjs-node";
// import "@tensorflow/tfjs-node-gpu";
import * as faceapi from "face-api.js";
// implements nodejs wrappers for HTMLCanvasElement, HTMLImageElement, Imag... |
import React, { Component } from 'react'
import Link from 'gatsby-link'
import injectSheet from 'react-jss'
import Button from './Button'
import {
getFormData,
handleFormSubmit as submitForm
} from '../helpers/google-form'
import { colors, fonts, dimensions } from '../theme'
const styles = {
container: {
... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/3.38/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/core/charts/utils/plots/ClusteredBars",["dojo/_base/declare","./_ClusteredBarsBase"],function(k,l){return k(l,{_drawB... |
import "./Error.scss"
export default function Error() {
return (
<div className="main-error">
<div className="main-error-image " >
<div className="main-error-image__centered" >WELCOME TO KIEZ HAMBURG!</div>
<img width="1250px" src="https://images.unsplash.com/p... |
module.exports = {
pages: {
index: {
entry: `./src/pages/index/main.js`,
template: `./static/index.html`,
title: `index`,
chunks: [`chunk-vendors`, `chunk-common`, `index`],
},
about: {
entry: `./src/pages/about/main.js`,
template: `./static/about.html`,
title: `a... |
/*
* Copyright 2017 dialog LLC <info@dlg.im>
* @flow
*/
import type { ThemeOverride, StyleOverride } from '../../types';
import { StyleSheet } from 'react-native';
import { Color, Padding } from '../../styles';
const getStyles = (theme: ThemeOverride, styleOverride: StyleOverride) => {
const style = {
contai... |
module.exports = {
"extends": "airbnb-base",
"rules" :{
"new-cap" : 0,
"no-useless-concat" : 0,
"no-restricted-globals" : 0,
"no-sequences" : 0,
"camelcase" : 0,
"no-undef" : 0,
"block-scoped-var" : 0,
"class-methods-use-this" : 0,
"import/extensions" : 0,
"no-r... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import AppNavigator from './navigators/AppNavigator';
import {THEME_COLORS} from "./constants/constants";
import ThemeFactory, {ThemeColors} from "./commons/ThemeFactory";
import {Alert, BackHandler, Linking... |
import React from 'react';
export const Login = props => (
<svg viewBox="0 0 20 20" {...props}><path d="M9.76 0C15.417 0 20 4.477 20 10S15.416 20 9.76 20c-3.191 0-6.142-1.437-8.07-3.846a.644.644 0 01.115-.918.68.68 0 01.94.113c1.678 2.095 4.24 3.343 7.016 3.343 4.915 0 8.9-3.892 8.9-8.692 0-4.8-3.985-8.692-8.9-8.692... |
const
should = require('should'),
sinon = require('sinon'),
KuzzleMock = require('../../mocks/kuzzle.mock'),
RealtimeController = require('../../../lib/api/controllers/realtimeController'),
Request = require('kuzzle-common-objects').Request,
BadRequestError = require('kuzzle-common-objects').errors.BadReque... |
import React, { Component } from 'react';
import Modal from './component/Modal';
import axios from 'axios';
axios.defaults.xsrfCookieName = 'csrftoken'
axios.defaults.xsrfHeaderName = 'X-CSRFToken'
class App extends Component {
constructor(props) {
super(props);
this.state = {
viewCompleted: false,
... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @emails o... |
//
// Created by CaoTao, 2018/03/09
//
/*
* LeetCode link:
* https://leetcode.com/problems/missing-number/description/
*/
/**
* @param {number[]} nums
* @return {number}
*/
var missingNumber = function(nums) {
var length = nums.length
// item may overflow
var totalSum = length * (length + 1) / 2
var sum... |
$(function() {
$(document).on('keyup', '.main-search-input', function() {
//$('#main_nav_collapse').collapse('hide');
main_search($(this));
});
$(document).on('click', '.hide-search', hide_search);
$(document).on('click', '.search-item-link', function(e) {
e.stopImmediatePropa... |
/**
* Copyright 2016 The AMP HTML 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
*
* Unless require... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
If S contains any character that is not a radix-R digit,
then let Z be the substring of S consisting of all characters before
the first such character; otherwise... |
import genres from './genres.js';
function givesGenresNames(genreId) {
const genreName = genres.find(num => genreId === num.id);
if (genreName) {
return genreName.name;
} else {
return 'Other';
}
}
function givesGenresArr(genreIds) {
const genresArr = genreIds.map(givesGenresNames);
if (genresArr... |
var path = require( 'path' ),
beautifyLibPath = path.join( path.dirname( require.resolve( 'js-beautify' ) ), 'lib' ) + path.sep,
files = [
beautifyLibPath + 'beautify.js',
beautifyLibPath + 'beautify-css.js',
beautifyLibPath + 'beautify-html.js',
path.join( __dirname, '/client.js' )
];
module.exports = {
n... |
const sanitizeNumericValue = (value) => (Number.isNaN(value) ? 0 : value)
const sanitizeNumericValues = (values) => values.map(
(value) => sanitizeNumericValue(value)
)
const sanitizeWithinRange = (value, min, max) => Math.max(
min,
Math.min(
max,
sanitizeNumericValue(value)
)
)
expor... |
import React, {
Component,
PropTypes,
} from 'react';
import {
View,
Platform,
StyleSheet,
Text,
Animated,
Dimensions
} from 'react-native';
import { Button } from '@components/ui/';
import { AppColors, AppStyles, AppSizes} from '@theme/';
import { ButtonGroup } from 'react-native-ele... |
import React from 'react';
import classes from './Dialog.module.css'
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faTimes} from "@fortawesome/free-solid-svg-icons/faTimes";
const Dialog = (props) => {
return (
<div className={classes.modalWrapper}>
<div className={cla... |
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/r... |
class AppError extends Error {
/**
* @param {Error} error original error object
* @param {String} controllerName name of controller where error ocurred
* @param {String} controllerMethod name of method where error occurred
* @param {Number} status HTML Status code (if applicable)
*/
constructor(error... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var iconHelpers = require('@carbon/icon-helpers');
var PropTypes = _interopDefault(require('prop-types'));
var React = _interopDefault(require('react'));
function _typeof(obj) { if (typeof... |
import React, { useEffect } from 'react';
import {
BrowserRouter as Router,
Switch,
Route,
Redirect
} from "react-router-dom";
import Login from './pages/login';
import { DEFAULT_USER } from './config';
import Home from './pages/home';
import Layout from './components/layout';
import './styles/global.scss';
im... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define({transparency:"Pr\u016fhlednost",suggested:"Doporu\u010den\u00e9",recent:"Posledn\u00ed",more:"V\u00edce",moreColorsTooltip:"Umo\u017e\u0148uje zobrazit dal\... |
import StoreHeading from '@/components/StoreHeading'
import ProductListings from '@/components/ProductListings'
import { getAllProducts} from '@/lib/shopify'
function IndexPage({ products }) {
return (
<div className="mx-auto max-w-6xl">
<StoreHeading />
<ProductListings products={products} /> ... |
"use strict";
document.getElementById('button').addEventListener('click', (event) => {
event.preventDefault();
const num = parseFloat(document.getElementById('number').value);
if (isNaN(num)) {
document.getElementById('output').innerHTML = `<p class="text-warning">Please enter a valid value</p>`;
... |
/*
Copyright 2019 The Tekton Authors
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... |
AUI.add('aui-form-textfield', function(A) {
var Lang = A.Lang,
getClassName = A.getClassName,
NAME = 'textfield',
CSS_TEXTFIELD = getClassName(NAME);
var Textfield = A.Component.create(
{
NAME: NAME,
ATTRS: {
selectOnFocus: {
value: false
},
allowOnly: {
value: null,
validator: functi... |
'use strict';
const Resource = require('resourcejs');
const async = require('async');
const vm = require('vm');
const _ = require('lodash');
const debug = {
error: require('debug')('formio:error'),
action: require('debug')('formio:action')
};
const util = require('../util/util');
const moment = require('moment');
... |
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 = Reflect.decorate(d... |
'use strict';
exports.init = function(req, res){
if (req.isAuthenticated()) {
res.redirect(req.user.defaultReturnUrl());
}
else {
res.render('signup/index', {
oauthMessage: '',
oauthTwitter: !!req.app.config.oauth.twitter.key,
oauthGitHub: !!req.app.config.oauth.github.key,
oauthF... |
import SpotifyWrapper from 'spotify-wrapper';
const spotify = new SpotifyWrapper({
token: 'BQAA3Pj1t_ZXq53Xgmvu6933ZFDhH4BBnlcpGL_3cPLM_rjhSyO8mAhjJd_HJF7O2yPdujNO3RQ1g32jz9JA7EVDUXQZ-0PmSL9qzCJbfEZAha106UUB2DvmJoV3kCT_CUyyzn8aqkQZ',
});
export default spotify; |
import * as Preact from '#preact';
import {boolean, number, select, withKnobs} from '@storybook/addon-knobs';
import {withAmp} from '@ampproject/storybook-addon';
export default {
title: 'amp-twitter-1_0',
decorators: [withKnobs, withAmp],
parameters: {
extensions: [
{
name: 'amp-twitter',
... |
/* jshint esversion: 6 */
var paddle = paddle || {};
var flatbuffers = flatbuffers || require('./flatbuffers');
var protobuf = protobuf || require('./protobuf');
paddle.ModelFactory = class {
match(context) {
const identifier = context.identifier;
const extension = identifier.split('.').pop().toL... |
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueLazyload from 'vue-lazyload'
require('normalize.css')
require('./assets/scss/base.scss')
import loading from './assets/img/loading.gif'
Vue.config.productionTip = false
Vue.use(VueLazyload,{
loading:... |
var express = require('express'),
bodyParser = require('body-parser'),
app = express();
app.use(function (req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
app.use(bodyParser.u... |
import getLeadingTone from './';
describe('getLeadingTone', () => {
it('should return leading tone in correct diatonic scale', () => {
const scale = ['C', 'D', 'E', 'F', 'G', 'A', 'B'];
expect(getLeadingTone(scale)).toBe('B');
});
it('should return leading tone in correct diatonic scale', () => {
co... |
(function(d){d['zh-cn']=Object.assign(d['zh-cn']||{},{a:"无法上传的文件:",b:"块引用",c:"加粗",d:"倾斜",e:"下划线",f:"Insert image or file",g:"标题类型",h:"标题",i:"图像小部件",j:"输入图片标题",k:"图片通栏显示",l:"图片侧边显示",m:"图片左侧对齐",n:"图片居中",o:"图片右侧对齐",p:"媒体小部件",q:"左对齐",r:"右对齐",s:"居中",t:"两端对齐",u:"对齐",v:"插入媒体",w:"URL不可以为空。",x:"不支持此媒体URL。",y:"编号列表",z:"项目列表",aa:... |
import hoistStatics from 'hoist-non-react-statics'
import invariant from 'invariant'
import { Component, PropTypes, createElement } from 'react'
import Subscription from '../utils/Subscription'
import storeShape from '../utils/storeShape'
let hotReloadingVersion = 0
export default function connectAdvanced(
/*
s... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.default = f()}... |
{
"name": "yaml.js",
"url": "https://github.com/jeremyfa/yaml.js.git"
} |
var searchData=
[
['abstractdao',['AbstractDAO',['../classsrc_1_1interfacebdd_1_1_abstract_d_a_o_1_1_abstract_d_a_o.html',1,'src::interfacebdd::AbstractDAO']]],
['abstractdao_2epy',['AbstractDAO.py',['../_abstract_d_a_o_8py.html',1,'']]],
['address',['address',['../classsrc_1_1system_1_1_position_1_1_position.htm... |
import electron from 'electron';
import React, {useState, useEffect} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {connect, CropperContainer} from '../../containers';
import {handleKeyboardActivation} from '../../utils/inputs';
const getMediaNode = async deviceId => ne... |
(function ($) {
"use strict";
/// <summary>takes a string and repeats it "n" times.</summary>
/// <param name="num" type="Number">times to repeat the string</param>
/// <returns>rep = '*'.repeat(5); // rep = '*****'</returns>
String.prototype.repeat = function (num) {
return new Array(num... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const error_code_1 = require("../error_code");
const address_1 = require("../address");
const value_chain_1 = require("../value_chain");
const block_1 = require("./block");
const chain_1 = require("./chain");
... |
/**
*
* ©2016-2017 EdgeVerve Systems Limited (a fully owned Infosys subsidiary),
* Bangalore, India. All Rights Reserved.
*
*/
// Setting /designer route.
// To install designer run bower install designer
// Path to designer should be /client/bower_components or /public/bower_components or /web/bower_components
//... |
/**
@description 文档常见参数service
@author shuxiaokai
@create 2020-10-08 22:10
*/
const Service = require("egg").Service;
class DocsParamsService extends Service {
/**
@description 新增文档常用参数控制器
@author shuxiaokai
@create 2020-10-08 22:10
@param... |
module.exports = function(gulp, data, util, filename){
'use strict';
// Utility functions for gulp plugins.
// @see https://www.npmjs.com/package/gulp-util
var gutil = require('gulp-util');
// Conditionally run a task
// @see https://www.npmjs.com/package/gulp-if
var gulpif = require('gulp-if');
// gulp plug... |
export function toast(message, color = 'dark', duration = 2000) {
const toast = document.createElement('ion-toast');
toast.message = message;
toast.duration = duration;
toast.color = color.toLowerCase();
toast.position = 'top';
document.body.appendChild(toast);
return toast.present();
} |
import { connect } from 'react-redux';
import InvoiceList from "../components/invoices/InvoiceList";
import { setSelectedInvoice } from '../actions/invoices';
import { NavigationActions } from 'react-navigation';
const getVisibleInvoices = (invoices, searchText) => {
if(!searchText){
return invoices;
... |
const User = require("./User");
const Session = require("./Session");
exports.get = (lien, cb) => {
if (Session.isAuthenticated(lien)) {
return lien.redirect("/");
}
lien.data = {
email: "",
password: ""
};
cb();
};
exports.post = (lien, cb) => {
if (Session.isAuthentic... |
// Version: v1.0.pre
// Last commit: 7955b85 (2012-08-03 14:50:17 -0700)
(function() {
/*global __fail__*/
if ('undefined' === typeof Ember) {
Ember = {};
if ('undefined' !== typeof window) {
window.Em = window.Ember = Em = Ember;
}
}
Ember.ENV = 'undefined' === typeof ENV ? {} : ENV;
if (!('MANDATORY_S... |
/**
* Created by bruce on 2017/1/18.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import {Card, Checkbox, Button} from 'antd';
class TodoItem extends React.Component {
constructor(props) {
super(props);
this.state = {
done: props.done || false,
};
}
... |
import Vue from 'vue'
import axios from 'axios'
import qs from 'qs'
Vue.prototype.$http = axios // 这样设置就可以在组件内用 this.$http 使用axios了
axios.defaults.baseURL = 'http://localhost:9000'
const axiosRq = async(type = 'POST', url = '', data = {}) => {
let result
type = type.toUpperCase()
if (type === 'GET') {
... |
/**
* @license
* This file is a added by Yoshiaki Takata, 2017.
* The original Blockly files as well as this file are provided
* under Apache License 2.0.
*
* Visual Blocks Language
*
* Copyright 2012 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the... |
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors ma... |
const { Telegraf } = require('telegraf');
const getGraniBot = require('../modules/GraniBot');
const graniBot = getGraniBot(process.env.BOT_TOKEN);
const {__} = require('../modules/Messages');
const {makeAdminMenu, makeGroupsMenu} = require('../bot_menus');
module.exports = {
async new (ctx) {
if (!ctx.ses... |
import React, { Fragment, Component } from "react";
import { Button } from "helpers/reactstrap";
import {
FaBan,
FaFolderOpen,
FaFolder,
FaUpload,
FaShare,
FaRegFileVideo,
FaRegFileAudio
} from "react-icons/fa";
import ObjPreview from "../TacticalMap/3dObjPreview";
import Measure from "react-measure";
imp... |
const express = require ("express");
const exphbs = require("express-handlebars");
const bodyParser = require("body-parser");
const mongoose = require("mongoose");
const cheerio = require("cheerio");
const request = require("request");
const axios = require("axios");
const logger = require("logger");
const db = requir... |
import {createValidator, required, maxLength, mustChooseAnItem} from 'utils/validation';
const widgetValidation = createValidator({
description: [required, maxLength(255)],
platformId: [required, mustChooseAnItem],
// tags: [required, mustChooseAnItem]
});
export default widgetValidation; |
(function () {
'use strict';
angular
.module('listing.routes')
.config(routeConfig);
routeConfig.$inject = ['$stateProvider', '$urlRouterProvider'];
function routeConfig($stateProvider, $urlRouterProvider) {
$urlRouterProvider.rule(function ($injector, $location) {
var path = $location.path... |
import React from "react"
import styled from "@emotion/styled"
import {colors} from "../styles/global"
/* eslint-disable */
const CtaContainer = styled.div`
background-color: ${colors.blue};
text-align: center;
color: ${colors.white};
padding: 30px 20px;
position: relative;
&:before {
content: "";
... |
var YWYlhyChat = {
alert: function (opts) {
var self = this;
var divdom = jQuery('<div style="position: absolute;top: 0;left: 0;height: 100%;width: 100%;background: rgba(0,0,0,.5);z-index: 99999;">')
jQuery(document.body).append(divdom);
var memodom = jQuery('<div style="width: 80%... |
const path = require('path')
const glob = require('glob-all')
const logger = require('./logger')
const { MODES, getDefaults } = require('./utils')
function nuxtPurgeCss (moduleOptions) {
const { srcDir, purgeCSS = {} } = Object.assign({}, this.options)
Object.assign(purgeCSS, moduleOptions)
logger.start('Loa... |
/*CLASS*/
function ConnectorHelperBase(connector) {
BaseObject.apply(this,arguments);
this.$connector = connector;
}
ConnectorHelperBase.Inherit(BaseObject,"ConnectorHelperBase");
ConnectorHelperBase.prototype.get_connector = function() {return this.$connector;} |
import * as React from 'react';
import wrapIcon from '../utils/wrapIcon';
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", className: className },
React.crea... |
var parent = require('../../es/array/flat');
module.exports = parent; |
import { Dependency, Section } from './dependency'
import { describe, it } from 'mocha'
import { expect } from 'chai'
describe('Dependency', () => {
it('should have as default unknown section as name', () => {
let dependency = asDependency().build()
expect(dependency).to.have.property('name', 'unknown depen... |
import { __decorate } from "tslib";
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { CarouselComponent } from './carousel.component';
import { SlideComponent } from './slide.component';
import { CarouselConfig } from './carousel.config';
import { ButtonsModule } from '.... |
const DB = require('../config/database.config');
module.exports = {
addCategoryGet: (req, res) => {
res.render('category/add');
},
addCategoryPost: (req, res) => {
let category = req.body;
DB.mongo.addCategory(category).then(() => {
res.redirect('/');
}).catch((... |
import React from 'react';
import PropTypes from 'prop-types';
import {
Stack,
StackItem,
SparklineChart,
BillboardChart,
HeadingText,
navigation,
Button,
ChartGroup,
PlatformStateContext
} from 'nr1';
import { splitPageUrl } from '../utils';
import { timeRangeToNrql } from '@newrelic/nr1-community';... |
import webpack from 'webpack';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin';
import { NODE_ENV, __DEV__, hasType, resolve } from './config';
const options = {
sourceMap: __DEV__,
};
const cssLoaders = manualInject => [
manual... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.