text stringlengths 65 6.05M | lang stringclasses 8
values | type stringclasses 2
values | id stringlengths 64 64 |
|---|---|---|---|
import _ from "lodash";
// import Plugin from "@ckeditor/ckeditor5-core/src/plugin";
import {modelAttrName, createCommentElement, viewAttrName} from "./commands/element";
import CreateCommand from "./commands/create";
import DeleteCommand from "./commands/delete";
import ReflowCommand from "./commands/reflow";
import U... | JavaScript | CL | 4a31e6198780baa51f805ed6d0e825aa03b972a46f6c15fefaff03a207d5609d |
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import Enzyme from 'enzyme';
import {shallow} from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import toJson from 'enzyme-to-json'; //added this line
import Create from './Create';
Enzyme.configure({ adapter: new ... | JavaScript | CL | ade6653fb6fb13d81e9266da4033f3262f5f1191e134d68285b5668b21cf7668 |
'use strict';
/////////////////////////////////////
/* Problem 1 (this is your demo that we'll solve in class)
Write a function called sum() that takes in two numbers as arguments and then returns an array where the first element is the sum of those numbers, and the second element is a concatenated string that EXACTLY ... | JavaScript | CL | 7deb6706b1a98e8cedebb2234c5fadd48d680d3567b31cc3b6512b3a9880f9a6 |
/**
* Copyright (c) 2012-2015 Netflix, Inc. 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 requir... | JavaScript | CL | 56420e387ee1467eb885902c24d921695056d4c454ed4607c00c9606866ae360 |
import React from 'react';
import { BrowserRouter, Switch, Route, withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import { Typography, Grid } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
import styles from '../styles/deliveryStyles';
import Items from './... | JavaScript | CL | 860f10cd4fb2c4b5fc904d54ee376aec7499af50a9e7652e94a1af27f1ae1dc1 |
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const TSLintPlugin = require('tslint-webpack-plugin')
const { s3BasePathFromEnv } = require('./helper')
const { baseWebpack } = require('./webpack.base.config')
const baseProdWebpack = {
mode: 'production',
}
module.exports = [
... | JavaScript | CL | c9c1a2241c3fca14c49794aedc2c492bd3d583b05e30a871e0989b0e568e0a01 |
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _stream = require("stream");
var _duplexify = _interopRequireDefault(require("duplexify"));
var _merge = _interopRequireDefault(require("merge2"));
var _unzip = _interopRequireDefault(require("../fs/unzip"));
var _parseFile = _interopRequireDe... | JavaScript | CL | fca6c4ee7d743c507779f4bc34ddd56fbd4355e56f27620284654938291070c6 |
import React, {Component, Fragment} from 'react';
import queryString from "query-string";
import {environments as environmentsData} from "../../config/sample-data";
import * as constants from "../../config/constants/environments";
import ButtonIcon from "../../components/common/ButtonIcon";
import Divider from "../../c... | JavaScript | CL | 1692fb461966ad642f3b02e33c72cccf35b92bf4d360d17e39a712a18d2962e3 |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(b/169279800): Pull out test code that media app and help app have in
// common.
/**
* Promise that signals the guest is ready to receive test me... | JavaScript | CL | 658c08a2d3011f00d2e33d2f7b96f68231b0a364c082b5aff5c4e70d8ed3169b |
import React, {Component} from 'react';
import {Platform, StatusBar, StyleSheet, Text, View} from 'react-native';
import { Tabs } from './router';
import {LoginStack} from './router';
import {createRootNavigator} from './router';
import LoadingScreen from './screens/LoadingScreen.js';
import firebase from 'react-nati... | JavaScript | CL | ad0d1222b6fba0493725980defa58c6c4a760c8a741ff4688a1c8f26b088de58 |
const router = require('express').Router();
const db = require('../util/db');
const util = require('../util/util');
const inputCleaningFunctions = require('../util/inputCleaningFunctions');
const tableName = 'requestForm';
const specialFieldTypeNamesAndValueFormats = {
checkbox: 'array',
multiselect: 'array'
};
... | JavaScript | CL | 5716d0e71e54331bfd62f80f18b573eab5210dcdc6c1674ffc5ab0a0e48c1c48 |
import Node from './node';
import Matcher from './matching/matcher';
const ALWAYS_TRUE = () => true;
/*
* Small penalty applied when a SubNode matches. This helps the algorithm
* prefer less parser matches. So if a parser P1 can match (A | A B) and
* another one P1 matches (B) this penalty helps cases where P1 is ... | JavaScript | CL | 76284b653d977f5533814e397e7f342836a08b4f6261a749b1670aa5453b38f2 |
/**
* The MdHub uses messages sent via window.postMessage to
* talk with each module.
*/
class PostMessage {
constructor(MdHub) {
this._MdHub = MdHub;
this.lastMessage = null;
// IE 8 and 9 can only sent postMessages with string data
this.sendAsString = false;
}
/**
* Verify if the actual ... | JavaScript | CL | d4e7ef6f198c2d9b4323840357f34b17c7be8423f06ab2640473eb7c6deebf0f |
import { SimpleStorage } from '@cogitojs/demo-app-contracts'
import { EthereumForSimpleStorage } from 'test-helpers'
import { proxiesFromBlobs } from './proxiesFromBlobs'
describe('proxiesFromBlobs', () => {
let blobs
let web3
const setupContractsBlobs = () => {
const baseName = SimpleStorage().contractName... | JavaScript | CL | 59e8eb09151703975e9bafd3dc8296f2264b29bc6d09ee25a240dc7d55bad5f3 |
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
/**
* devServer
*
* @param {Objects} options - options for webpack-dev-server
* @return {Objec... | JavaScript | CL | b1095d6257a5d8143c0722dd01cc1d36a5c4c347eb45a1d2b9b9318a5fd2eeaf |
const { db, failsafe } = require('../utils/db');
const request = require('request-promise');
const { to: pWrapper } = require('await-to-js');
const debug = require('../utils/debug');
const retry = require('p-retry');
const path = require('path');
const indexer = require('../init/indexer');
const { unraw } = require('un... | JavaScript | CL | 6bdd4969d9acbfe22915fcb06697b8be4204f30fc09450e2e1b7ecf086053b66 |
/*
* Flipdish Open API v1.0
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codeg... | JavaScript | CL | 567b48128ec7336c1538b5872b32008d7d19d2c5015fda279f2c0724e5ccac00 |
const E2eHelpers = require('../../../../platform/testing/e2e/helpers');
const Timeouts = require('../../../../platform/testing/e2e/timeouts');
const PageHelpers = require('./feedback-tool-helpers');
const testData = require('./schema/maximal-test.json');
const FormsTestHelpers = require('../../../../platform/testing/e2... | JavaScript | CL | e64ad48b8f71b79c69b38282adb19fd7a03af7665066195d96da899212dd66db |
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/picture/picture"],{
/***/ 63:
/*!************************************************************************************!*\
!*** F:/uni-app/xiaochengxu/myUniapp/main.js?{"page":"pages%2Fpicture%2Fpicture"} ***!
\************************************... | JavaScript | CL | e627ce8b36f20d89a2690d21035aeb2c6f7bbe5319538a50023b1f35336c8cf4 |
import _ from 'lodash/fp';
import localForage from 'localforage';
import queryString from 'query-string';
import { fetchJson } from 'utils/fetch';
import { getExp } from 'utils/exp';
import { achievements, initialAchievementState } from 'utils/achievements';
import { parseDate } from 'utils/date';
import { getScoreWit... | JavaScript | CL | 9e7de281204823a33e3ea00c88d0b3e23b2f277200b6069d7830284ffb1bafa1 |
import { getLastItem } from "./array";
import { isArray, isNumber, isObject } from "./assertion";
import { fromEntries, objectKeys } from "./object";
export var breakpoints = Object.freeze(["base", "sm", "md", "lg", "xl", "2xl"]);
export function mapResponsive(prop, mapper) {
if (isArray(prop)) {
return prop.map(... | JavaScript | CL | 5307ab51593556fb430ccd361740bc836ae0949cb90063f260dd7a2a3c69035f |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
// css
import styles from './MenuPage.module.css';
// redux
import getMenu from '../../redux/operations/menuOperations';
import {
getLoader,
getModal,
getModalSignUp,
getModalLogIn,
getModa... | JavaScript | CL | d4b01a69dc2203703bc8830cf314e748f3577d70bd65ad74f7edc694b1a99d90 |
//=============================================================================
// Name: ser_io (ser.io)
//
// Auth: Vicente Iborra
//
// Desc: This file/namespace holds a number of classes which are used to
// abstract out some of the EA specific I/O concerns.
//==================================================... | JavaScript | CL | 34358bc4e14d58fb2356c7423c16b06907b1ce7ee529078f21b8635d2abad198 |
import React, { Children, Fragment } from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';
import splitUsing from '../utils/splitUsing';
import splitWhen from '../utils/splitWhen';
import { isMdxType } from '../utils/mdx';
import usePageLayout from '../hooks/usePageLayout';
const BREA... | JavaScript | CL | 1fc3536609e16872a370e3ea0ccd3e0e4de32ba87ad1c279c4c61162b01167ff |
/*!
* async-exec-cmd <https://github.com/tunnckoCore/async-exec-cmd>
*
* Copyright (c) 2015 Charlike Mike Reagent, contributors.
* Released under the MIT license.
*/
/* jshint asi:true */
'use strict'
var test = require('assertit')
var cmd = require('./index')
test('should throw when only function is given', f... | JavaScript | CL | bd98f1b07be30c2c02f217a7557c62bcea6c10c1e89144a2e446b64fa0e894e2 |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import store from './store'
import { Toast, Loading } from 'vant'
import axios f... | JavaScript | CL | fce14283158be2c3d00df8bc4f4444fe82d71c9251a75070577e8fdc7832dbc3 |
({
doInit : function(component, event, helper) {
try
{
var isFlow = component.get("v.isFlow");
var objectDataMap = component.get("v.objectDataMap");
helper.doInitMethodApex(component,event,helper); //both setup and maintenance
//END francesca.ribezzi 16/07/19
if(isFlow){ ... | JavaScript | CL | 7cdef58574852202d73f903297305fd181f031bb40d95ab1579ddd46a91c6de5 |
module.exports = {
extends: '@ultimaker/stylelint-config/scss',
rules: {
// To be removed once @extends are gone
'at-rule-blacklist': null,
// To be removed once line-heights are unitless
'declaration-property-unit-blacklist': null,
// Only here to supress nesting-depth w... | JavaScript | CL | a26f9113bf9b9b405ed735699a03977a0a00fc9c9cccc79e4d8ebdea94369dfe |
import React, {useState} from 'react';
import {connect, useSelector} from 'react-redux'
import {useFirestoreConnect, isLoaded, isEmpty, firestoreConnect} from 'react-redux-firebase'
import {makeStyles} from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import CircularProgress from '@material-... | JavaScript | CL | afc4bf2c671babf2209fe157304f62f55d6ed2ecdc6968b14dd202c62b1c10e2 |
import { combineReducers } from 'redux';
import * as reducers from './reducers';
const rootReducer = combineReducers({
authentication: reducers.authentication
});
export default rootReducer;
| JavaScript | CL | 7a5838e1af3a8e1b49f14cae46fbc618969498e94ad5af2b047f669b3c9766c8 |
'use strict';
/*
This is used by electron to setup the application.
It spawns an extra browser window loading `index.html`.
*/
var electron = require('electron');
/*
Hooks for serving files
*/
// This is kind of a middle-ware, establising a hook on file requests
// asking configured hook to handle the file request... | JavaScript | CL | 98ed371e9fbd418a3aad7aa811ed074a70241d10f1f5496d100c903d6aecd8f7 |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Layout from '../components/layout';
import { makeFeedsRequest } from '../actions/feeds.actions';
import { filterDistinctChannelIds } from '../helpers/utils';
import { serverActions } from '../actions/s... | JavaScript | CL | 5057cc05647c4aab48f1957b1fddf1a643b059a9fba427f4198a136f07572292 |
'use strict';
///////////////////////////////////////
// Modal window
const modal = document.querySelector('.modal');
const overlay = document.querySelector('.overlay');
const btnCloseModal = document.querySelector('.btn--close-modal');
const btnsOpenModal = document.querySelectorAll('.btn--show-modal');
const nav = ... | JavaScript | CL | be058044518cc6d4def932d1cab60d58ac027a609dff3cc69f544f43c1fe2b1a |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import TeamMemberCard from './presentational/TeamMemberCard'
import NumberDisplay from './presentational/NumberDisplay'
import { WidthProvider, Responsive } from "react-grid-layout";
import { saveLayoutToLocalStorage, getLayoutFromLocalStora... | JavaScript | CL | 27c48794c26cba25a2dea5609cfd1faaa03082d0103467055b77c83d3508d9f9 |
/*
This file is part of mongojs. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/KisanHub/mongojs/master/COPYRIGHT. No part of mongojs, including this file, may be copied, modified, propagated, or distributed except ... | JavaScript | CL | 4841066c52e1fd6ffcaa6a7e0dc6db5f19a2fbfd3ccd988bcc3468cbee48d33b |
import {TemplateGatherer} from 'src/common/template-gatherer';
import {ControlProperties} from 'src/common/control-properties';
import {TemplatingEngine} from 'aurelia-templating';
import {initialize} from 'aurelia-pal-browser';
import {Container} from 'aurelia-dependency-injection';
import {KendoConfigBuilder} from 's... | JavaScript | CL | f1a444443af7326bf5edc844f7215289fafeb31a177e2d6f2d5afb1c3a4ecaf7 |
import React, { useEffect, useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useHistory, useParams } from "react-router-dom";
import onClickOutside from "react-onclickoutside";
import { Link, animateScroll as scroll } from "react-scroll";
import MenuModal from "src/modules/menu/c... | JavaScript | CL | 36395c9dd13648b71494588b89343ae51a962466621a9312155a16c4b42f377b |
'use strict';
/**
* __________________JS template for popup__________________
*
* It will be wrapped with an anonymous function with
* that is called after loading this file
*/
/**
* It overloads and extends the instance of parent PopupObject
*
* @see _common/js/popup-object.js
*/
Object.assign(
$Popup, ... | JavaScript | CL | dcb4030e93a54bc68875e2f4fdc6f9c7cf29a57297a01f3fde390fd2d7adfc56 |
/**
* Transcriptor
*/
var APP_NAME = 'Transcriptor'
var GC_API_KEY = '__PASTE_YOUR_KEY_HERE__'
var LABEL_ENQ = '#GAS/transcriptor-enq'
var LABEL_DEQ = '#GAS/transcriptor-deq'
var RECIPIENT_ADDRESS = 'example+ml@gmail.com'
var REPLY_TO_ADDRESS = 'example+transcriptor@gmail.com'
/**
* Specify the language used in targ... | JavaScript | CL | b21dd151ba25f8fe17581a31d40966cea0546c70f6151e5932f5f8a5372c00b9 |
'use strict'
let readline = require('readline');
/**
* Text based input and output wrapper.
*/
class View {
/**
* @param {NodeJS.Socket} reader
* @param {NodeJS.Socket} writer
*/
constructor(reader, writer) {
this.reader = reader;
this.writer = writer;
this._cli = readline.createInterfac... | JavaScript | CL | 452c3f9d47ce56831e78a61be6a4c1bda31441bad3a19558e49ceb1d3aea333c |
//This is an example code for Navigation Drawer with Custom Side bar//
import React, { Component } from 'react';
//import react in our code.
import {
View,
StyleSheet,
Dimensions,
Image,
TouchableOpacity,
Platform,
Text,
Settings,
} from 'react-native';
// import all basic components
import { Icon } fr... | JavaScript | CL | fdbddbbd0694dadf38dbee52b8809ca3280abaaf9719aa7e5963143faec33b73 |
#!/usr/bin/env node
const readline = require('readline');
const utils = require('./utils');
const output = require('./output'); // Small utility for conveniently writing to stdout by Mike Bostock
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
// In... | JavaScript | CL | cae3c92976f0483947471852d0d2ff8fe80c7e2b4bf6694ef47133bba704cdd1 |
import React, { PureComponent, Fragment } from 'react';
import moment from 'moment';
import { connect } from 'dva';
import router from 'umi/router';
import Link from 'umi/link';
import {
Row,
Col,
Card,
Form,
Input,
Select,
Icon,
Button,
Dropdown,
Menu,
DatePicker,
Modal,
Steps,
Radio,
Div... | JavaScript | CL | c8b5000442285b2b30f2c2392c8664b278eb24333eea8a7d5cdeca46f657c296 |
const webpack = require ('webpack');//引入webpack
const opn = require ('opn');//打开浏览器
const merge = require ('webpack-merge');//webpack配置文件合并
const path = require ('path');
const baseWebpackConfig = require ('./webpack.base.conf');//基础配置
let config = merge (baseWebpackConfig, {
output: {
path: path.resolve (__dirn... | JavaScript | CL | 26bb1c7e9d2411f63bc959f46e9a4a9a11af427435edfb408ecb7167e49d89e8 |
/// <reference types="cypress" />
describe('VO management with role VO admin', () => {
const dbVoName = 'test-e2e-vo-from-db';
const dbGroupName = 'test-group-from-db';
const dbApplicationItemTextFieldName = 'input-test';
const dbVoManager = 'vo-manager-2';
const dbUser = 'test';
const addedAttribute = 'n... | JavaScript | CL | 02b5540b3982698e0dd5503fc811ef8efa63a96b534b6a8b72d8e15ad771e43a |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... | JavaScript | CL | 14266c85c47c97697d1362426d05b980113904ea48b5978833277770b51d570e |
/*
Software License Agreement (Apache 2.0)
Copyright (c) 2020, The MITRE Corporation.
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
https://www.apache.org/licenses/LICENSE-2... | JavaScript | CL | f622c4e202705461248e474b84608c82c9f8d69b475da8addf7e3f6562160314 |
import React, { Component } from 'react';
import { SwipeableDrawer } from '@material-ui/core';
import classes from './index.module.css';
import Navigation from '../../components/Navigation';
import { connect } from 'react-redux';
import * as actions from '../../store/actions';
import Toolbar from '../../components/Tool... | JavaScript | CL | 029bbced63ac9486ec1c7d8184c67f6fcc929368c1f1bce46b3528f66cdb9db3 |
var phone = require('./locales/common/phone');
/**
* namespace ngFaker.phone
*/
function Phone(ngFaker) {
/**
* returns a random phone number
*
* @method phoneNumber
* @returns {string} random phone number
* @param {{intl: boolean}} options the options for generating a phone number.
* If it is tr... | JavaScript | CL | 70280004174c33deb1c77571fdfc2056bab2fddf692514b5075a2f6c2f43a7b8 |
import React, { Component, PropTypes } from "react";
import { composeWithTracker } from "react-komposer";
import { bindActionCreators } from "redux";
import { connect } from "react-redux";
import { ReactionCore } from "meteor/reactioncommerce:core";
import ProductImageGallery from "../components/productDetail/images/Pr... | JavaScript | CL | 1667e2ced6ae6070d0cb2ffdbc60265834d57eef4009baa787a2198217f2ff35 |
/**
* A view pager that allows for pagination in the horizontal direction.
* Right now, there are a number of limitations built into the system. Namely:
* - It only supports pagination in the horizontal direction.
* - It supports exactly two pages.
*/
const React = require('react');
const ReactDOM = require('re... | JavaScript | CL | 520bfe1f0a00cef10da7d687148e1f1d28d3c4ecdda964e58e487712397c1617 |
/* Import styles */
import "@assets/common/Tabs.scss";
/* Import framework */
import React from "react";
/* Import custom components */
import TabsPane from "@app/common/Tabs/TabsPane";
import TabsLink from "@app/common/Tabs/TabsLink";
/**
* Renders a navigation tabs.
*
* @param {Array} children
* @returns {stri... | JavaScript | CL | 034b0593463a28dd2cdeaf70e406a5f9a580683d9d49a4a04d1c300a7489e090 |
const ethers = require('ethers');
const {
DepoCrowdsaleContract,
DepoCrowdsaleContractWithWallet
} = require('./config-blockchain.js');
const WalletService = require("./wallet-services");
const constants = require('./constants.json');
class CrowdsaleService {
static async getOwner() {
return aw... | JavaScript | CL | 4e7bf8c264fdd8f0642296ea3a9071ca5dda969a345d7ce72df091c2fe879955 |
#!/usr/bin/env node
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const Terser = require('terser');
const { cli, searchFiles, UTF8, ...fs } = require('./utils');
// Parse CLI options and arguments.
const { args, options } = cli(['cwd']);
// Use the --cwd CLI option if on... | JavaScript | CL | edbc2c34bd96e1083b86d17954d866ba95fc0edc7cc7eecf557ec64ae875729a |
/**
* @module @justinc/combine-validations
*/
const curry = require('lodash.curry')
/**
* A Validation is a value of [Folktale](http://docs.folktalejs.org/en/latest/index.html)'s
* [Validation](http://docs.folktalejs.org/en/latest/api/data/validation/Validation.html) type.
* @typedef {Object} Validation
*/
/**... | JavaScript | CL | 82da3902580c68ed582bf24feb2ec35f22aa4e0c2236c04bc71ddb2a5a703a9e |
//~~~~~~~~~~~~~~~~~~~~~~~~~~SETUP~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Require routes
var express = require("express");
//require mongoose
var mongoose = require("mongoose");
//Require scraping stuff (fun fun fun)
var axios = require("axios");
var cheerio = require("cheerio");
//Grab models
var db = require("./models/art... | JavaScript | CL | 8687ecb8f8dbf75c12841cab9a43ed4ec4bfbee88840e44c4afc5b14068a95b6 |
//> This file is part of Ymacs, an Emacs-like editor for the Web
//> http://www.ymacs.org/
//>
//> Copyright (c) 2009-2012, Mihai Bazon, Dynarch.com. All rights reserved.
//>
//> Redistribution and use in source and binary forms, with or without
//> modification, are permitted provided that the following conditions ar... | JavaScript | CL | 1200fafbadb2d8df55597dcc6fe96d2f2b3b39b2aa1926471b87bd7a32216a1e |
// Import general dependencies
const _ = require('lodash');
const { v4: uuid } = require('uuid');
// Load and register the skip feature
require('@cypress/skip-test/support');
// Import commands.js
require('./commands/commands');
// Import api commands.js
require('./commands/api-commands');
// Import fixture command... | JavaScript | CL | 2c2b236c069d05af73235c2ea3ecf261faa28ee1f43063ad63d35fb1d878f54a |
import React, { Component } from 'react';
// Create new context
const MyContext = React.createContext();
// Create the Provider that will pass down state and methods to the rest of the application.
class MyProvider extends Component {
state = {
name: '10up',
age: 8,
};
render() {
... | JavaScript | CL | 976131ebc247e263d952d4dbcd402f1d594209ed03f97c34efd438bbc8612dca |
renderContent({"book":{"id":1990,"name":"斗罗大陆3龙王传说","keywords":"斗罗大陆3龙王传说,斗罗大陆3龙王传说最新章节","description":"斗罗大陆3龙王传说最新章节由网友提供,《斗罗大陆3龙王传说》情节跌宕起伏、扣人心弦,是一本情节与文笔俱佳的玄幻小说,爱看小说免费提供斗罗大陆3龙王传说最新清爽干净的文字章节在线阅读。","author":"唐家三少","brief":"伴随着魂导科技的进步,斗罗大陆上的人类征服了海洋,又发现了两片大陆。魂兽也随着人类魂师的猎杀无度走向灭亡,沉睡无数年的魂兽之王在星斗大森林最后的净土苏醒,它要带领仅存的族人,向人类复仇!唐舞麟立志... | JavaScript | CL | 10868d5e1dc1874c5b4e277d31e18a3df3a630577cf61071d073ffd1ea2f7f58 |
/**
* Check if the given array or object is empty.
*/
export function isEmpty(data) {
if (Array.isArray(data)) {
return data.length === 0;
}
return Object.keys(data).length === 0;
}
/**
* Iterates over own enumerable string keyed properties of an object and
* invokes `iteratee` for each property... | JavaScript | CL | a27efe8704d7b0d1b2780ffaf8a9d960049b743292380756f944dc0860a9e6a4 |
/**
* A simple dependency graph
*/
/**
* Helper for creating a Topological Sort using Depth-First-Search on a set of edges.
*
* Detects cycles and throws an Error if one is detected (unless the "circular"
* parameter is "true" in which case it ignores them).
*
* @param edges The set of edges to DFS through
* ... | JavaScript | CL | c0e2cfe19dd00ce146737e67d785044553e1fd3d624ab3154f1e61a011dc5d66 |
/**
* @file contract method
* @author atom-yang
*/
import {
getAddressObjectFromRep,
getRepForAddress,
getHashObjectFromHex,
getRepForHash,
getTransaction,
Transaction
} from '../util/proto';
import {
isBoolean,
isFunction,
noop,
uint8ArrayToHex
} from '../util/utils';
import {
inputAddressForm... | JavaScript | CL | dcc9e187d5b8441a207dbd8562e81441e4e54c8635a57b5404e4a5f999e8031d |
/**
--| ADAPTIVE RUNTIME PLATFORM |----------------------------------------------------------------------------------------
(C) Copyright 2013-2015 Carlos Lozano Diez t/a Adaptive.me <http://adaptive.me>.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance wi... | JavaScript | CL | ea7ac07e7cbcd75e240cf12938101c748a044bbbf731ba89302e5040f5e9735e |
import {
CheckBoxMesh,
CheckBoxSprite,
ClickableMesh,
ClickableSprite,
MouseEventManager,
RadioButtonManager,
RadioButtonMesh,
StateMaterialSet,
} from "..";
import {
AmbientLight,
BoxGeometry,
Color,
MeshBasicMaterial,
PerspectiveCamera,
Scene,
SpriteMaterial,
TextureLoader,
WebGLRend... | JavaScript | CL | b70dce35dd7e048bcaff33b0e7404a7f23a0f920f127b1f78a98418e1235d583 |
const spawn = require('child_process').spawnSync;
const spawnAsync = require('child_process').spawn;
const process = require('process');
const Bottleneck = require("bottleneck/es5");
function getClientIp(req) { // https://stackoverflow.com/a/14382990/619493
var ipAddress;
// Amazon EC2 / Heroku workaround to get ... | JavaScript | CL | 8b1a023416de4f121611d1e191fe53bc2dc5b9a9f73a5059a6d5274a6f0633f5 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Returns information about the platform this function is being run on.
* @internal
*/
export function getRuntimeInfo() {
return `BROWSER-VERSION; Browser ${getReleaseInfo()}`;
}
function getReleaseInfo() {
if (typeof self === "un... | JavaScript | CL | 5151c44a78656667f49314e816c77d94478f58dcdc8acaa7bcefeac0ce790fb0 |
import { app, BrowserWindow, ipcMain, dialog } from 'electron'; // eslint-disable-line
import { join } from 'path';
import { homedir } from 'os';
import { cancel, download } from './download';
/**
* Set `__static` path to static files in production
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-st... | JavaScript | CL | cd8c2657aed6b40ed47cb014cab65c58b365e6b227237a01b18d6749830727b5 |
const express = require('express');
const path = require('path');
const http = require('http');
const request = require('request-promise');
const bodyParser = require('body-parser');
const app = express();
const GoogleOAuth2Strategy = require('passport-google-oauth').OAuth2Strategy;
const passport = require('passport')... | JavaScript | CL | c3e8b287ef895450197aa44d136db17579770a33f43d3b592b86208dc630ab7f |
YUI.add("yuidoc-meta", function(Y) {
Y.YUIDoc = { meta: {
"classes": [
"Adapter",
"Adapter.OData",
"Adapter.Offline",
"ApplicationInitializer",
"ApplicationInstance",
"ApplicationInstanceInitializer",
"ArrayContainsHelper",
"ArrayHelper",
"A... | JavaScript | CL | a169a6abb3da0ea11f1bc9c221c900501136df289ceed1cbcf8af70571d59d59 |
import Vue from 'vue';
import Router from 'vue-router';
const _import = require('./_import_' + process.env.NODE_ENV);
// import Full from '@/containers/Full'
// import Full2 from '@/containers/Full2'
// import VisitorFull from '@/containers/VisitorFull';
//
// import Buttons from '@/views/components/Buttons';
// imp... | JavaScript | CL | adb058f83ff29f4126d98d421761d4401b23292643bf0d9ba3c5455947e3eee4 |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {expectCodeIsEqual, FakeWritable} from '../src/TestHelpers';
import {
emitNotificationDef,
emitRequestDef,
emitResp... | JavaScript | CL | a05b8293252f4df90dbf6150be9f10895acdd3e7119f8e7469b0eaeebd4329a5 |
/**
* This class implements data and functionality required for AVSDF layout per
* circle.
*
*
* Copyright: i-Vis Research Group, Bilkent University, 2007 - present
*/
let LGraph = require('layout-base').LGraph;
// -----------------------------------------------------------------------------
// Section: Initial... | JavaScript | CL | 0f417e6ec42078c62377f83290732e0acfd6e807105ae5ffd3083bae6756496d |
/*
********************************************
Copyright © 2021 Agora Lab, Inc., all rights reserved.
AppBuilder and all associated components, source code, APIs, services, and documentation
(the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
accessed, used, modified, or di... | JavaScript | CL | f5c2b572e6c1467c37a071120c77561cf98390aec3cc1962b5f7fa8d37e53c98 |
import React,{Component} from 'react';
import {render} from 'react-dom';
import {Section , Container , Header, Title, InputContainer, Input, ListaContainer} from './styles/styles.js';
import io from 'socket.io-client';
class App extends Component{
constructor(){
super();
this.state = {
... | JavaScript | CL | 2cf75d4b20e2b1a21e9a913aa94109f56cf76c0b7c8f71b0e06a9ced92f1c7f0 |
module["exports"] = [
"11. Октомври",
"12. Македонска Народноослободителна Ударна Бригада",
"13. Август",
"13. Ноември",
"14. Декември",
"15. Македонски Корпус",
"20. Октомври",
"23. Октомври",
"50. Македонска Дивизија",
"8. Март",
"8. Септември",
"9. Мај",
"Аврам Пишевски",
"Австралиска",
... | JavaScript | CL | b6d776dd47c2bd96700f898130dbed9a14ed5f997c9cb3f4d027e2c2265f8cbf |
/** @jsx jsx */
import { jsx } from "@emotion/core";
import theme from "../../config/theme";
import SectionHeader from "../SectionHeading";
import JumpOffset from "../JumpOffset";
import Markdown from "../controls/Markdown";
const AboutUs = ({
sectionTitle = "O nás",
imageUri = "https://i.imgur.com/NXerfN2.jpg",
... | JavaScript | CL | 65cfbcd6931698a30d746579e0f3423231fe299b2cffe3f1e27b27bfd5942c1d |
'use strict'
const Empresa = use('App/Models/Empresa')
const Database = use('Database')
/** @typedef {import('@adonisjs/framework/src/Request')} Request */
/** @typedef {import('@adonisjs/framework/src/Response')} Response */
/** @typedef {import('@adonisjs/framework/src/View')} View */
/**
* Resourceful controller ... | JavaScript | CL | f7fa7ac49ecc85e7aecb579178f7a9c948d751ca24ba500a7de2cdffa319be96 |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
define("mojo/services/location/interfaces/location.mojom", [
"mojo/public/js/bindings",
"mojo/public/js/codec",
"mojo/public/js/connection",
... | JavaScript | CL | ee29189313ff6e240e1049a6262671f80e3afc66559aaf37c189038cda4828fc |
import*as Common from"../common/common.js";import*as Components from"../components/components.js";import*as Host from"../host/host.js";import*as PerfUI from"../perf_ui/perf_ui.js";import*as SDK from"../sdk/sdk.js";import*as UI from"../ui/ui.js";import{ProfileFlameChartDataProvider}from"./CPUProfileFlameChart.js";import... | JavaScript | CL | cbdf7437d48c5a56407704d4dc06dfc0bd256ff6d262fe8fbea0b0f758c8c8e7 |
require('dotenv').config();
const express = require('express'),
app = express(),
extend = require('util')._extend,
request = require('request'),
i18n = require('i18next'),
slack = require('./routes/slack');
app.use(require('body-parser').json());
app.use('/slack', slack);
//i18n settings
require('./config/... | JavaScript | CL | 38dd2c453252421554bf6e3c0f92e5a3f38b1c969e0cdde33e6eaa17b71c1060 |
import React, { useEffect } from "react"
import axios from "axios"
// import { Link } from "react-router-dom"
import { connect } from "react-redux"
import { updateUser, updateRegisteredClans } from "../../ducks/reducer"
import AccountImage from "./AccountImage/AccountImage"
import Notification from "./Notification/Noti... | JavaScript | CL | 15203beb0cb88d723113b69f17e20929a3ce149f321ad1235e7024db7082ec4f |
import React from 'react'
import { graphql } from 'gatsby'
// import { mapEdgesToNodes, filterOutDocsWithoutSlugs } from '../lib/helpers'
// import BlogPostPreviewGrid from '../components/blog-post-preview-grid'
import Container from '../components/container'
import GraphQLErrorList from '../components/graphql-error-li... | JavaScript | CL | 71f8b6becd4eba2badd8fdc0c47ee66d4fcb6dcf67fed6a37289059a56f03d41 |
/**
* @author troffmo5 / http://github.com/troffmo5
*
* Google Street View viewer for the Oculus Rift
*
* Modified by jpleitao / http://github.com/jpleitao
*/
// Parameters
// ----------------------------------------------
var QUALITY;
var DEFAULT_LOCATION;
var SHOW_SETTINGS;
var NAV_DELTA;
var FAR;
var USE_DEPT... | JavaScript | CL | 4110e2b31a218d6276755ffc467ff3159d6390208becd1453bc4747c149a6c41 |
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import PageTitle from 'REUSE/components/pageTitle/pageTitle';
import Locale from 'REUSE/locales/locale';
// TEMPORARY IMPORTS FROM CLIENT-REACT
import HtmlUtils from 'APP/utils/htmlUtils';
import WindowLocationUtils from 'APP/utils/windowLoca... | JavaScript | CL | 91b258504b8ee3e6fad15ead0cefbd1a1104fc1badd69cce7aba22e7ee83128f |
/**
* @fileOverview Pivot Grid rows viewmodel
* @author Najmeddine Nouri <najmno@gmail.com>
*/
'use strict';
/* global module, require */
/*jshint eqnull: true*/
var axe = require('./orb.axe');
var axeUi = require('./orb.ui.axe');
var uiheaders = require('./orb.ui.header');
/**
* Creates a new instance of rows ... | JavaScript | CL | af300536645fcbc74e76c5e3ed8fcab60f4659e52f7787e495886711589508a8 |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _times = _interopRequireDefault(require("lodash/times"));
var _helpers = require("./... | JavaScript | CL | 4496bdb22d33a9b274a890cd713db040019bf8b3e2ad658c9a12acdd803fc2e9 |
"use strict";
(function () {
class QuillLoader extends THREE.Loader {
load(url, onLoad, onProgress, onError) {
const scope = this;
const loader = new THREE.FileLoader(this.manager);
loader.setPath(this.path);
loader.setResponseType("arraybuffer");
loader.setWithCredentials(this.withCredentials);
... | JavaScript | CL | 9c3766c2edbc82057c57ed0bcd71b54768ed45c6fa6501207c8e6cebbc7f4151 |
/*
Crie um array com 5 items (tipos variados).
*/
let arr = [1, "snazzy", /wild-regex/, undefined, true];
/*
Crie uma função chamada `addItem`, que irá adicionar itens no array criado.
A função deverá retornar o array atualizado.
*/
const addItem = (arr, item) => arr.concat(item);
/*
Adicione um novo array ao array c... | JavaScript | CL | 38c8c9a393bbdc9e5b9ca3adca89720892f1db52dd6c64f0407c35052dc180fd |
const express = require('express');
const chalk = require('chalk');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const compression = require('compression');
const helmet = require('helmet');
const defaultOptions = {
bodyParser: true,
compression: true,
helmet: true,
};
module.e... | JavaScript | CL | ad608aad4665440d09bf3b7af87c2b6bc5df2d78ee8c37ab59b7083bf0aa0d20 |
import { message } from 'antd';
import moment from 'moment';
import { call, all, modify } from '@ixinwu-ngp/web-core';
import { qsParse } from '@ixinwu-ngp/web-framework';
import {
fetchGetDataSetData,
fetchGetGroupTypeData,
fetchEditDataSetData,
} from '../../services/common';
// 获取页面列表数据
export function* getDa... | JavaScript | CL | d0d2e0c7f3e4673923ef4f9938b86c2077325385282b89ee41671a0aa39acdd5 |
var util = require('util'),
cache = {};
/**
* @param {Function} BaseAgent Agent constructor (http.Agent, https.Agent or something had similiar public API)
* @returns {Function} AdvancedAgent constructor
*/
function advancedAgentFactory(BaseAgent) {
/**
* http.Agent successor which fire 'socketRemoved' ... | JavaScript | CL | 201e711781f1a16540471725061ae1189dbea426efd2c84c9ca34d4dabe9943d |
function nameGen(type){var nm1=["Abhijit","Abhiru","Acalavarman","Acyut","Adratipin","Agnitejas","Agnivay","Ahina","Ahinas","Ahovirya","Ajatashatru","Ajitashatru","Akopa","Alikayu","Amitaujas","Anadhristi","Anangi","Angarasetu","Anuharant","Anuvaktar","Apratimaujas","Aradhin","Arijit","Aristakarman","Asadha","Asadhi","... | JavaScript | CL | f5159b7cc0d541b44d5489bf1edc91ac28b77f4009a9f60fa8cd332a2507843c |
require('../spec_helper')
const { makeDataContext, setCtx, getCtx } = require('../../lib/makeDataContext')
setCtx(makeDataContext({}))
const cp = require('child_process')
const fse = require('fs-extra')
const os = require('os')
const path = require('path')
const _ = require('lodash')
const { expect } = require('chai... | JavaScript | CL | 6e9a56d3d0f083ff382a7d891e1bc00b0f95b22ca8f46f82134f911fa3b776e2 |
import merge from "./merge"
/**
* Blends two values together based on their type.
* If both are objects this would result in a new object with the second value's props merged onto the first's.
* If the first value is an array, this would result in a new array with the second value concatenated onto the first value.... | JavaScript | CL | 80cf15f4555ffd39cdc1ad5e881f1c738931ab38504503adbeb7aac6073f144b |
/*
DUCK MODULE register.js 🦆
MUST export default a function called reducer()
MUST export its action creators as functions
MUST have action types in the form npm-module-or-app/reducer/ACTION_TYPE
MAY export its action types as UPPER_SNAKE_CASE, if an external reducer needs to listen for them, or if it is a pu... | JavaScript | CL | 99b2afbac91dc05c197cc3a874cea53cf20fc3adb71fb69eb90b2b1059fb4971 |
// for phoenix_html support, including form and button helpers
// copy the following scripts into your javascript bundle:
// * https://raw.githubusercontent.com/phoenixframework/phoenix_html/v2.3.0/priv/static/phoenix_html.js | JavaScript | CL | 76469568e95460413c75d97feedade6eb527541feb7bd73e32d1ff6b649618d2 |
/*
* This file is to be included by beaver contest tasks, it defines a basic
* implementation of the main functions of the task object, as well as a grader.
*
* Task can overwrite these definitions.
*
*/
/************************************************************************
* Untouched parts from beaver-tas... | JavaScript | CL | b4bc7e9267ab2e2b7fdb0d27eb458b30fe335a63e94dd37a2e9f7fef15c2b836 |
"use strict";
const _ = require('lodash');
/**
* Serializer Class used to serialize Sequelize
* Model attributes.
*
* @class Serializer
* @extends RestSequelize.Object
* @namespace RestSequelize
*/
class Serializer {
/**
* Serializes the payload obtained from the database to
* be flushed to the client.
... | JavaScript | CL | a2a6f86f1735a99bf8b9d17d047518d4a5a73e31ca67214b6c72e88ce3e73088 |
import debug from 'debug';
import { Permissions } from 'discord.js';
import { guildEmbed } from '../../lib/helpers/embeds';
const log = debug('Notification');
export const info = {
name: 'notification',
hidden: true,
description: 'Alerts the bot owner to events or problems with the bot.',
permissions: [Permis... | JavaScript | CL | ff7b5e9fc1e2a69c8a30977d4b4396c4e3b34f9ecd219f1224ee2d7c43e0d46d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.