text stringlengths 2 1.05M |
|---|
//Genre information and a list of movies
//functional component because not utilizing state
import React from 'react';
import MoviesContainer from '../containers/MoviesContainer';
import GenreEdit from './GenreEdit'
import {Container} from 'react-bootstrap';
const Genre = (props) => {
// let genre = pr... |
/**
* @license Angular v9.1.6
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
import { Injectable, Inject, ɵstringify, NgModule, Directive, Component, Pipe, createPlatformFactory, COMPILER_OPTIONS, Injector, CompilerFactory } from '@angular/core';
import { TestComponentRenderer, ɵMetadataOverride... |
import { expect } from 'chai';
import util from './util';
describe('Prdocuts API', () => {
describe('fetch', () => {
it('should throw an error when no token', () => {
const fsapi = util.getFullSlate({
key: util.getKey()
});
expect(() => fsapi.products()).to.throw('FullSlate token miss... |
#!/usr/bin/env node
'use strict';
const spawnSync = require('../common/cross-spawn-sync');
function checkWorkspaceDependencies() {
let workspacesInfo = getWorkspacesInfo();
if (!workspacesInfo) {
console.error(`Couldn't generate Yarn's workspace root information.`);
return;
}
let count = countMismatc... |
import * as api from "../api/api";
// ---------------------------- Class Methods ------------------------------
export const createClass = async (Class, user, Classes, setClasses) => {
try {
const newClass = {
name: Class.name,
subcode: Class.subcode,
subject: Class.subject,
instructor: {... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{MBP6:function(e,t,n){"use strict";n.r(t),n.d(t,"IonActionSheetController",function(){return i});var o=n("euO/"),i=function(){function e(){this.actionSheets=new Map}return e.prototype.actionSheetWillPresent=function(e){this.actionSheets.set(e.target.overlayId,e.... |
const config = {
...require('../../build.config'),
__SERVER__: false,
__CLIENT__: true,
__SSR__: false,
__TEST__: false,
__API_URL__: process.env.API_URL || 'http://localhost:8080/graphql',
__WEBSITE_URL__: process.env.WEBSITE_URL || 'http://localhost:8080'
};
module.exports = config;
|
/*
* Copyright (c) 2015-2025 Phoinex Scholars Co. http://dpq.co.ir
*
* 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 u... |
import {storiesOf} from "@storybook/react";
import * as React from 'react';
import ScalableFormAntdMobile from 'scalable-form-antd-mobile';
import './index.less';
const storiesWithMobile = storiesOf('AntDesignMobile', module);
export default class FormMobileExample extends React.PureComponent {
constructor(args) {
... |
/**
* Copyright 2020 The Lovefield Project 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... |
jui.define("chart.brush.bargauge", [], function() {
/**
* @class chart.brush.bargauge
*
* @extends chart.brush.core
*/
var BarGaugeBrush = function(chart, axis, brush) {
/**
* @method draw
*
* @protected
* @return {TransformElement}
*/
... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+react_native
* @flow
*/
'use strict';
const React = require('react');
const LogBoxContainer = requi... |
exports.init = function(console) {
if (process.env.NODE_ENV === 'dev' ||
process.env.NODE_ENV === env) {
// console.log('LogSuppress is suppressing all console output.');
if (typeof console.log == 'function') {
console.log = function() { };
console.log('You should no... |
import React from 'react';
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
// A theme with custom primary and secondary color.
// It's optional.
const theme = createMuiTheme({
typography: {
useNextVariants: true,
},
palette... |
// This utility function returns a unique URL friendly representation of project
// For example, "Frontend Development" gets converted as "frontend-development"
export default function (baseString) {
return baseString.replace(/[^0-9a-zA-Z- ]/g, "").trim().replace(/\s+/g, "-").toLowerCase()
}
|
import React from "react";
const UserInfo = props => {
return (
<div className="user__info">
<p className="user__row">
<span>Email: {props.email}</span>
</p>
<p className="user__row">
<span>Department: {props.department}</span>
</p>
<p className="user__row">
... |
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicati... |
/*
Utility function to fetch required data for component to render in server side.
This was inspired from https://github.com/caljrimmer/isomorphic-redux-app/blob/73e6e7d43ccd41e2eb557a70be79cebc494ee54b/src/common/api/fetchComponentDataBeforeRender.js
*/
import { matchPath } from 'react-router-dom';
import { matchRoute... |
import ChartOperator from "./chart-operator"
import ContainerJS from "container-js"
import DateWithOffset from "date-with-offset"
import _ from "underscore"
import CandleSticks from "src/viewmodel/chart/candle-sticks"
import Numbers from "src/utils/numbers"
import Dates ... |
/*
* date: 2019-05-28
* desc:
*/
export {parseTime} from '~/utils';
// 省略字符串,如果字符串的长度超过指定长度,则省略展示。
export function ellipsisStr(str, length) {
length = length || 100;
let result = str;
if (str.length > length) {
result = str.slice(0, length) + '...';
}
return result;
}
export function broadcastStatu... |
export class StringComparisonService {
static getLevenshteinDistance(first, second) {
const firstLength = first.length;
const secondLength = second.length;
if (firstLength === 0) {
return secondLength;
}
if (secondLength === 0) {
return secondLength;... |
//返回值的函数
import axios from 'axios'
import { Loading } from 'element-ui';
export function AxiosReturn(url,params){
const api='http://www.mmkashop.com/api/v1/'
let that=this
var myUrl=api+url
return axios.post(myUrl, params).then(function(res) {
return res.data
// if (res.data.status === 200) {
... |
/**
* Displays the simulation data
*/
import React from "react"
import "./simDataTable.css"
class SimulationDataTable extends React.Component {
constructor(props) {
super(props);
this.state = {
showTable: false
}
}
toggleTable() {
this.setState(prevState => ... |
function analyticsChart () {
//calculate 12 months random users
//calculate 12 levels of customers
var startNum = Math.floor( Math.random() * 5000) + 5000;
var visitors = new Array(12);
var customers = new Array();
var magicX = .5;
visitors[0] = startNum;
customers[0] = Math.floor(vis... |
//=require angular-source/components/marketData/ticker/ticker.module
'use strict';
angular.module('marketData.ticker').service('TickerService', [
'$http', function ($http) {
return {
query: function () {
return $http.get('api/getTickerInfo');
}
};
} ]); |
/**
* Copyright (c) 2015-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.
*
* @format
... |
const fs = require('fs');
const DIST_LIB_PATH = 'dist/payment-request/';
const README_PATH = 'README.md';
const ASSETS_PATH = 'projects/demo/src/assets';
const PATH_TO_README = DIST_LIB_PATH + README_PATH;
copyExtraFiles();
function copyExtraFiles() {
if (!fs.existsSync(README_PATH)) {
throw new Error('R... |
import * as tld from '#/common/tld';
import cache from './cache';
import { getOption, hookOptions } from './options';
tld.initTLD(true);
const RE_MATCH_PARTS = /(.*?):\/\/([^/]*)\/(.*)/;
let blacklistRules = [];
hookOptions((changes) => {
if ('blacklist' in changes) resetBlacklist(changes.blacklist || '');
});
cons... |
/* @flow */
import React from "react";
import ReactMarkdown from "react-markdown";
import Helmet from "react-helmet";
import { makeTitle } from "../routes";
import icons from "../icons";
import Query from "../queries/query";
import StaticPage from "./StaticPage";
import pageQuery from "../queries/content/page.js";
imp... |
import addMilliseconds from 'date-fns/addMilliseconds';
import addSeconds from 'date-fns/addSeconds';
import addMinutes from 'date-fns/addMinutes';
import addHours from 'date-fns/addHours';
import addDays from 'date-fns/addDays';
import addWeeks from 'date-fns/addWeeks';
import addMonths from 'date-fns/addMonths';
impo... |
/*! For license information please see chunk.07887fd1117e655def19.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4920,1823],{63207:(e,t,r)=>{"use strict";r(65660),r(15112);var i=r(9672),n=r(87156),o=r(50856),s=r(43437);(0,i.k)({_template:o.d`
<style>... |
import { Fragment } from 'react';
import './SupportPopupInput.css';
const SupportPopupInput = (props) =>{
//set onChange method to use debounce maybe.
return(
<Fragment>
<input
className="support__input"
type="number"
value={props.amount} ... |
"use strict";(self.webpackChunkgatsby_portfolio=self.webpackChunkgatsby_portfolio||[]).push([[170],{4170:function(e,o,c){c.r(o),c.d(o,{theme:function(){return t}});var t="{\n --deckgo-highlight-code-carbon-background: #2a2734;\n --deckgo-highlight-code-carbon-color: #eeebff;\n --deckgo-highlight-code-token-atrule: #... |
var status = 0;
var itemType = 0; // 1 = Equip, 2 = Scrolls, 3 = Misc
// Type 1 : Equips
items_sel1 = [1004031, 1442298, 1102399, 1703999];
items_name1 = ["Monster Energy Cap (Hat)", "Monster Energy Can (Polearm)", "WRS Wings (Cape)", "WRS Scythe (Polearm)"];
items_amount1 = [1, 1, 1, 1];
items_price1 = [15, 15, 100, 1... |
var NAVTREEINDEX175 =
{
"classv8_1_1internal_1_1_representation.html#a8bdd97567badb1040967d90910c76c54":[2,0,4,3,1289,8],
"classv8_1_1internal_1_1_representation.html#a8ebdb3d2ad2e45a01e769410bd620a3f":[2,0,4,3,1289,11],
"classv8_1_1internal_1_1_representation.html#a9da652c4a0d3e474f8b63d50708b46ba":[2,0,4,3,1289,10],
... |
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* 'Super' model which is extended for individual models. */
/* */
/* Assumes table ... |
import { select as d3_select } from 'd3-selection';
import { geoMetersToLat, geoMetersToLon } from '@id-sdk/math';
import {
utilArrayIntersection, utilArrayUnion, utilDeepMemberSelector,
utilEntityOrDeepMemberSelector, utilEntitySelector, utilGetAllNodes
} from '@id-sdk/util';
import { t } from '../core/local... |
import React from 'react'
import ScheduledWorkshop from './scheduled-workshop'
import get from 'lodash/get'
import {css} from '@emotion/core'
function UpcomingWorkshops({events, headline}) {
return (
<div>
{events.length ? (
<div
css={css`
margin-top: -30px;
positi... |
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Reusable object
var W = [];
var K = [];
// ROTATE: function(a, n) { return a << n | (a >>> (32 - n)) }
// for ( var... |
import React from "react";
import { Fragment } from "react/cjs/react.production.min";
function Post(props) {
return (
<Fragment>
<div>
<div className="post">
<div className="card-avatar">
<div className="card-avatar-left">
... |
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.1.1
build: 47
*/
YUI.add("lang/datatype-date-format_it",function(A){A.Intl.add("datatype-date-format","it",{"a":["dom","lun","mar","mer","gio","ven","sab"],"A":["domenica",... |
(function() {
'use strict';
angular
.module('nonoApp')
.controller('InstructionsController', InstructionsController);
/** @ngInject */
function InstructionsController($stateParams, $http) {
var vm = this;
var type = $stateParams.type;
var collectionMode = $stateParams.collectionMode;
s... |
import React from "react"
import "./footer.css";
import { Link } from "gatsby"
export default function MainFooter(props) {
return(
<div>
© {new Date().getFullYear()}
<Link href={props.homepagelink}> {props.companyname}</Link>
</div>
)
}
|
// @flow
/* global window, localStorage */
import type {LocaleNameType} from './const';
import {localeConst} from './const';
export type SetLocaleType = {|
+type: 'locale__set-locale',
+payload: {|
+localeName: LocaleNameType,
|},
|};
export function setLocale(localeName: LocaleNameType): SetLoc... |
/*
* 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 may ... |
module.exports = function() {
return process.env.NODE_ENV + ':' + process.env.FOO;
};
|
class Triangle {
g;
size;
p1;
p2;
p3;
center;
color;
lineThickness;
hitArea;
flip;
fill;
curD;
targetD;
curV;
targetV;
a;
maxSpeed;
target;
radius;
freq;
curRadius;
curFreq;
radius;
circleVector;
circleTick;
... |
import React from 'react'
import { render } from '@testing-library/react'
import HvacStatusIcon from '../HvacStatusIcon'
describe('<HvacStatusIcon />', () => {
it('should render <HvacStatusIcon /> component', () => {
expect(render(<HvacStatusIcon />)).not.toBeNull()
})
})
|
import { obtainTerrain } from "@woosh/meep-engine/engine/ecs/terrain/util/obtainTerrain.js";
// import { seededRandom } from "@woosh/meep-engine/core/math/random/seededRandom.js";
import { EngineConfiguration } from "@woosh/meep-engine/engine/EngineConfiguration.js";
// import ScriptSystem from "@woosh/meep-engine/engi... |
module.exports = class Sample {
constructor(param) {
this.param = param;
}
};
|
var AppServer = require('../lib/AppServer');
var assert = require('assert');
describe('AppServer', function() {
it('should be callable', function() {
assert.equal(typeof AppServer, 'function');
});
}); |
import update from './update.js';
// even though Rollup is bundling all your files together, errors and
// logs will still point to your original source modules
console.log('if you have sourcemaps enabled in your devtools, click on main.js:5 -->');
update(); |
import React from 'react';
import { parse } from 'react-docgen';
import CodeExample from '../../../components/CodeExample';
import ComponentHeader from '../../../components/ComponentHeader';
import PropTypeDescription from '../../../components/PropTypeDescription';
import Demo from './Demo';
// eslint-disable-next-lin... |
//=============================================================================
// AutoTextFeed.js
// ----------------------------------------------------------------------------
// Copyright (c) 2017 n2naokun(柊菜緒)
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ... |
const fs = require('fs');
const through = require('through2').obj;
const PluginError = require('plugin-error');
const PLUGIN_NAME = 'gulp-inject-css';
module.exports = function () {
'use strict';
const PATTERN = /<\!--\s*inject-css\s*(.*?)\s*-->/gi;
function styleInject(file, _enc, callback) {
if (file.is... |
import React from "react";
import ScrollTo from "./ScrollTo";
import SetActiveItem from "./SetActiveItem";
import logo_white from "../assets/images/halografix_light.svg";
import logo_dark from "../assets/images/halografix_primary.svg";
import menu_light from "../assets/images/menu-light.svg";
import menu_dark from "../... |
import styled from "styled-components";
import Colors from "theme/Colors";
// import tw, {theme} from "twin.macro";
export const Container = styled.div`
background: #ffffff 0% 0% no-repeat padding-box;
border-radius: 10px;
-webkit-border-radius: 10px;
box-shadow: 0px 3px 6px #00000029;
overflow: hidden;
max-widt... |
'use strict'
const usuarios = require('./usuarios.js')
const sesiones = require('./sesiones.js')
const maestros = require('./maestros.js')
const movimientos = require('./movimientos.js')
module.exports = (app) => {
usuarios(app, '/api/pub/usuarios')
sesiones(app, '/api/pub/sesiones')
maestros(app, '/api/pu... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
require('../styles/scss/video-react.scss');
var _index = require('./index');
Object.keys(_index).forEach(function(key) {
if (key === 'default' || key === '__esModule') return;
Object.defineProperty(exports, key, {
enumerable: tru... |
/*!
* enquire.js v2.1.2 - Awesome Media Queries in JavaScript
* Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/enquire.js
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
! function(a, b, c) {
var d = window.matchMedia;
"undefined" != typeof module && module.exports ? modul... |
import React from 'react';
import { useConnection } from './ConnectionProvider';
function ConnectOverlay() {
const { connectWallet } = useConnection()
return (
<div className="blur-bg">
<button className="clickable center" onClick={connectWallet}>Connect</button>
</div>
);
}
e... |
import { Link } from 'react-router-dom';
import styled from 'styled-components';
export const PricingSection = styled.div`
padding: 100px 0 160px;
display: flex;
flex-direction: column;
justify-content: center;
background: #4b59f7;
`;
export const PricingWrapper = styled.div`
display: flex;
flex-directi... |
/**
* @fileOverview interval shapes
* @author dxq613@gmail.com
* @author sima.zhang1990@gmail.com
* @author huangtonger@aliyun.com
*/
var Util = require('../../util');
var Shape = require('./shape');
var PathUtil = require('../util/path');
var GPathUtil = require('@antv/g').PathUtil;
var Global = require('../../g... |
import React from 'react';
import { Link } from 'react-router-dom';
import logo from '../Images/favicon.svg';
import PropTypes from 'prop-types';
import './EmptyPagePlaceholder.css';
export default function EmptyPagePlaceholder({ msg, linkTo, linkToMsg }) {
return (
<div className="placeholder-container">
... |
window.common = (function({ $, common = { init: [] }}) {
const stepClass = '.challenge-step';
const prevBtnClass = '.challenge-step-btn-prev';
const nextBtnClass = '.challenge-step-btn-next';
const actionBtnClass = '.challenge-step-btn-action';
const finishBtnClass = '.challenge-step-btn-finish';
const subm... |
const { GraphQLServer } = require("graphql-yoga");
const { Query } = require("./resolvers/Query");
const { Mutation } = require("./resolvers/Mutation");
const resolvers = {
Query,
Mutation
};
const titles = [
{
id: `title-0`,
title: "new post"
}
];
const server = new GraphQLServer({
typeDefs: "./src... |
'use strict';
const Express = require('express');
const Axios = require('axios');
const NodeCache = require('node-cache');
const LAUNCHER_META_ENDPOINT = 'https://launchermeta.mojang.com';
const VERSION_MANIFEST_URI = `${LAUNCHER_META_ENDPOINT}/mc/game/version_manifest.json`;
const CACHE_MANIFEST = 'versionManifest'... |
// This example adds a search box to a map, using the Google Place Autocomplete
// feature. People can enter geographical searches. The search box will return a
// pick list containing a mix of places and predicted search terms.
// This example requires the Places library. Include the libraries=places
// parameter whe... |
import React from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';
const features = [
{
title: ... |
'use strict';
const path = require('path');
const confusingBrowserGlobals = require('confusing-browser-globals');
module.exports = {
extends: path.join(__dirname, 'index.js'),
env: {
node: false,
browser: true,
},
rules: {
'no-restricted-globals': [
'error',
...confusingBrowserGlobals,
],
},
};
|
'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actua... |
import './index.scss';
import $ from 'jquery';
import assets from './assets';
import header from '../partials/header';
import footer from '../partials/footer';
function Ecosystem(router, api) {
this.router = router;
this.templateIndex = require('./index.html');
}
Ecosystem.prototype = {
index: function () {
... |
import { combineReducers } from 'redux';
import user from './reducers/user';
import auth from './reducers/auth';
import events from './reducers/events';
import loading from './reducers/loading.reducer';
import error from './reducers/error.reducer';
import event from './reducers/event.reducer';
export default combineR... |
var createScene = function (engine, canvas) {
var scene = new BABYLON.Scene(engine);
// Setup camera
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
camera.setPosition(new BABYLON.Vector3(-10, 10, 0));
camera.attachControl(canvas, true);
// Lights
... |
import React, { useRef, useEffect } from 'react';
import { graphql } from 'gatsby';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import styled from 'styled-components';
import { srConfig } from '@config';
import sr from '@utils/sr';
import { Layout } from '@components';
import { Icon } fro... |
var pageNumber = 0;
var hasAppend = false;
var hasMoreContent = true;
$("#simplePostList").scroll(function(){
viewH =$(this).height(),//可见高度
contentH =$("#simplePostUl").height(),//内容高度
scrollTop =$(this).scrollTop();//滚动高度
//if(contentH - viewH - scrollTop <= 100) { //到达底部100px时,加载新内容
if(scrollTop/(con... |
const express = require("express");
const router = express.Router();
const Register = require("./controllers/register");
const Login = require("./controllers/login");
const PatientControllers = require("./controllers/patient-controllers");
const ProfessionalControllers = require("./controllers/professional-controllers... |
window._ = require('lodash');
try {
require('bootstrap');
} catch (e) {}
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window... |
import React, {useEffect, useState, useRef} from "react";
import {useDispatch, useSelector} from "react-redux";
import {connect} from "./redux/blockchain/blockchainActions";
import {fetchData} from "./redux/data/dataActions";
import * as s from "./styles/globalStyles";
import styled from "styled-components";
import './... |
/**
* Mnemonist Typed Array Helpers
* ==============================
*
* Miscellaneous helpers related to typed arrays.
*/
/**
* When using an unsigned integer array to store pointers, one might want to
* choose the optimal word size in regards to the actual numbers of pointers
* to store.
*
* This helpers d... |
const path = require("path"),
webpack = require("webpack"),
HtmlWebpackPlugin = require("html-webpack-plugin"),
AutoDllPlugin = require("autodll-webpack-plugin")
module.exports = {
entry: {
app: [path.resolve(__dirname, "src/index.tsx")],
vendor: ["react", "react-dom"],
},
output: {
filename: "... |
var express = require('express');
var vfutils = require('./utils/utils.js');
var MyLog = require('./utils/MyLog.js');
var redis = require('redis');
var app = express();
var bodyParser = require('body-parser');
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: ... |
mycallback( {"CONTRIBUTOR OCCUPATION": "MD", "CONTRIBUTION AMOUNT (F3L Bundled)": "500", "ELECTION CODE": "G2010", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "Self-Employed", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "4033 3rd Avenue", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CAND... |
import React from "react";
import { mount } from "enzyme";
import Description from "./Description";
describe("<Description />", () => {
it("renders description", () => {
const wrapper = mount(<Description description="Hello world"/>)
expect(wrapper.find('Description').text()).toBe("Hello world")
});
});
|
/*
* forgerock-sample-web-react
*
* index.js
*
* Copyright (c) 2021 ForgeRock. All rights reserved.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import React, { useEffect } from 'react';
import { NativeModules } from 'react-native';
... |
/**
* Created by xingo on 2017/02/18.
*/
let socketIO = require('socket.io');
let wsController = require('../wsController');
function startSocketIO(server) {
let ws = socketIO(server);
ws = ws
.of('/ws');
wsController.setWebSocket(ws);
}
module.exports = startSocketIO; |
var searchData=
[
['da_145',['da',['../structieee80211__mgmt.html#a4c18dc4a47a10b48ae9df9efa44958a1',1,'ieee80211_mgmt']]],
['deauth_146',['deauth',['../structieee80211__mgmt.html#a28550d689526a864c41436d63c212450',1,'ieee80211_mgmt']]],
['delay_5fbound_147',['delay_bound',['../structwmm__tspec__element.html#a07d... |
//from system
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Grid, Row, Glyphicon } from 'react-bootstrap';
import {URL_BASE} from '../../helper/constant'
import { history } from '../../route/history';
import DashboardHeader from '../../components/DashboardHeader';
import Foot... |
const { day09_1, day09_2 } = require("./index");
describe.skip("Day 09 Part 1", () => {});
describe.skip("Day 09 Part 2", () => {});
|
const calculateWeightedResults = (
runSimulation,
simulationCount,
doorsCount,
) => {
let games = []
for (let i = 0; i < simulationCount; i++) {
games.push(runSimulation(doorsCount))
}
const totalResults = games.reduce((totalResults, gameResult) => [
totalResults[0] + gameRe... |
import React from "react";
import "@testing-library/jest-dom/extend-expect";
import { render } from "@testing-library/react";
import { App } from "./App";
it("render content", () => {
const filter = { category: "Categoria", year: "Año" };
const { asFragment } = render(<App filter={filter} />);
expect(asFragment(... |
"use strict";
const stringUtils = require("ember-cli-string-utils");
const useTestFrameworkDetector = require("../test-framework-detector");
module.exports = useTestFrameworkDetector({
description: "Generates a mixin unit test.",
locals: function(options) {
let projectName = options.inRepoAddon
? option... |
define(
"dojo/cldr/nls/en-au/currency", //begin v1.x content
{
"AUD_symbol": "$",
"USD_symbol": "US$"
}
//end v1.x content
); |
const gutil = require('gulp-util');
const webpack = require('webpack');
const _ = require('lodash');
const { scripts: scriptsConfig } = require('./../config.js');
const handleError = require('./../utils/handleError.js');
const { browserSync } = require('./browserSync');
const scriptsTask = function scripts(done) {
... |
import React, { useState, useEffect} from "react";
import api from 'services/api'
import "./styles.css";
function App() {
const [repositories, setRepositories ] = useState([])
useEffect(() => {
api.get('repositories').then(response => {
setRepositories(response.data)
})
}, [])
async function ... |
module.exports = {
name: 'avatar',
aliases: ['icon', 'pfp'],
description: 'Get profile picture of a user',
args: true,
usage: '<user>',
execute(message, args) {
if (!message.mentions.users.size) {
return message.channel.send(
`Your avatar: ${message.author.displayAvatarURL}`
);
}... |
var fs = require('fs')
var crunchify = require('.')
fs.readFile('./test.css', 'utf8', function (err, css) {
if (err) return console.error(err)
console.log('original:\n' + css)
console.log('crunchy:\n' + crunchify(css))
})
|
// Create function for Data plotting (Bar, gauge, bubble)
function getdata(tm) {
d3.json("Resources/basketball_table.json").then(function (nbaData) {
// console.log(nbaData);
// var trying = Object.values(nbaData);
// // console.log(trying);
// var code = nbaData.value();
// console.log(code);
... |
import { Icon } from 'antd';
import React from 'react';
import styles from './ThemeColor.less';
const Tag = ({ color, check, ...rest }) => {
return (
<div
{...rest}
style={{
backgroundColor: color,
}}
>
{check ? <Icon type="check" /> : ''}
</div>
);
};
const ThemeColor ... |
'use strict';
// YOU KNOW WHAT TO DO //
/**
* each: Designed to loop over a collection, Array or Object, and applies the
* action Function to each value in the collection.
*
* @param {Array or Object} collection: The collection over which to iterate.
* @param {Function} action: The Function to be applied to ea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.