text stringlengths 2 1.04M |
|---|
// This is to be used by "module.js" (and "module.coffee") example(s).
// There should NOT be a "universe.coffee" as only 1 of the 2 would
// ever be loaded unless the file extension was specified.
"use strict";
exports.answer = 42;
exports.start = function () {
console.log('Starting the universe....');
} |
export default function formatTitle(column, columnFormat) {
// Get format tag from end of column name (if supplied):
let fmt = columnFormat;
// Remove the format tag from the column name (only if preceded by
// an underscore):
let colname = column.replace("_"+fmt,"");
let suffix = "";
... |
/*!
* Copyright 2016 Google 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 required by appli... |
import React from "react"
import { Link, graphql } from "gatsby"
import Bio from "../components/bio"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { rhythm } from "../utils/typography"
class BlogIndex extends React.Component {
render() {
const { data } = this.props
con... |
const State = {};
export default State; |
/**
* HYPERLOOP GENERATED - DO NOT MODIFY
*
* This source code is Copyright (c) 2018 by Appcelerator, Inc.
* All Rights Reserved. This code contains patents and/or patents pending.
*/
var $dispatch = Hyperloop.dispatch,
$init,
$imports;
/**
* CoreText//Applications/Xcode.app/Contents/Developer/Platforms/iPhon... |
// Only out put CommonJS and ES module for node and bundlers.
import meta from "./package.json"
import babel from "rollup-plugin-babel"
import { minify } from "terser"
function compressor(options = { compress: true, mangle: true }) {
return {
name: "terser",
renderChunk(source) {
return minify(source, ... |
<div class="material-slider">
<div class="track">
<div class="track-on"></div>
<div class="handle">
<div class="arrow"></div>
<div class="val"></div>
</div>
</div>
</div>
//# sourceMappingURL=page.js.map |
assert.equal(require('./reexporter'), 'default export'); |
import React from "react";
import BestSeller from "../modules/bestSellers/BestSellers";
import { shallow, configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
configure({ adapter: new Adapter() });
window.alert = jest.fn();
it("BestSeller correct heading", () => {
const wrapper = shallow(<BestSe... |
/* eslint consistent-return:0 */
const resolve = require('path').resolve
const express = require('express')
const argv = require('minimist')(process.argv.slice(2))
const ngrok = (process.env.NODE_ENV !== 'production' && process.env.ENABLE_TUNNEL) || argv.tunnel
? require('ngrok')
: false
const logger = require('... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'colordialog', 'it', {
clear: 'cancella',
highlight: 'Evidenzia',
options: 'Opzioni colore',
selected: 'Seleziona il colore',
title: 'Selezionare... |
const _ = require('lodash')
const BaseLauncher = require('../../../lib/launchers/base')
const EventEmitter = require('../../../lib/events').EventEmitter
describe('launchers/base.js', () => {
let emitter
let launcher
beforeEach(() => {
emitter = new EventEmitter()
launcher = new BaseLauncher('fake-id', ... |
/*!
* Copyright (c) 2015-2016, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required by ... |
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import _ from 'underscore';
import mem from 'mem';
import { Subscriptions, Messages } from '../../../models';
import { hasPermission } from '../../../authorization';
import { call } from '../../../ui-utils/client';
let userLanguage = 'e... |
import React, { Component } from 'react'
class GameFormOne extends Component {
render() {
if (this.props.currentStep !== 1) {
return null
}
return(
<div className="form-group">
<label htmlFor="gameName">Game Name:</label>
<input
className="form-control"
... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var EventData = require('./eventdata');
var Promise = require('bluebird');
var EventEmitter = require('events').EventEmitter;
var util = require('util');... |
/**
* The subclasses of this class provide actions to perform upon {@link Ext.form.Basic Form}s.
*
* Instances of this class are only created by a {@link Ext.form.Basic Form} when the Form needs to perform an action
* such as submit or load. The Configuration options listed for this class are set through the Form's... |
import React from 'react'
import ReactDOM from 'react-dom'
export function render(components = window) {
Array.from(document.querySelectorAll('div[data-component-name]')).forEach(
dom => {
const componentName = dom.getAttribute('data-component-name')
if (!componentName)
return console.error('... |
// vim:set ts=4 sts=4 sw=4 st:
// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
// -- I... |
/**@preserve GeneXus Java 10_3_12-110051 on February 11, 2021 3:42:17.31
*/
gx.evt.autoSkip = false;
gx.define('tcontrato', false, function () {
this.ServerClass = "tcontrato" ;
this.PackageName = "" ;
this.setObjectType("trn");
this.setOnAjaxSessionTimeout("Warn");
this.hasEnterEvent = true;
this.... |
/**** Header Js ***/
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
$(window).scroll(function () {
var scroll = $(window).scrollTop();
if (scroll >= 200) {
$(".site-header").addClass("sticky-1");
} else {
$(".site-header").removeClass("sticky-1");
}
if (scroll >= 300) {
... |
import React, { useEffect } from "react";
import useForm from "../src";
import delay from "./fixtures/delay";
const Form = () => {
const { debug, errors, pending, register, resetForm, onSubmit } = useForm(
{
sports: {
label: "Sports",
schema: [
{
id: "required",
... |
import React, { useState } from "react";
import { connect } from "react-redux";
import { Row, Col } from "antd";
import DefaultTemplate from "../../../templates/default";
import {
GroupMappingTable,
GroupTree,
GroupMappingCreate,
} from "../../../UI/molecules";
import { CommonFunctions } from "../../../../utils... |
import * as React from "react"
import PropTypes from "prop-types"
import { graphql, Link, StaticQuery } from "gatsby"
import { FaTwitter, FaFacebook } from 'react-icons/fa';
const { removeSortIndex,toTitleCase } = require('../../lib/str');
function doNode(node, siteTitle) {
//console.log(`node.name:${node.name}`);
... |
import Dummy from "./Dummy";
export default Dummy |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(React.createElement("path", {
d: "M17 16.99c-1.35 0-2.2.42-2.95.8-.65.33-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.95c1.35 0 2.2-.42 2.95-.8.65-.33 1.17-.6... |
import styled from "styled-components";
export const Wrapper = styled.div`
color: var(--white);
background: var(--darkGrey);
border-radius: 20px;
padding: 5px;
text-align: center;
h3 {
margin: 10px 0 0 0;
}
p{
margin: 5px 0;
}
`;
export const Image = styled.img`
... |
import {BufferGeometry, DefaultLoadingManager, DirectionalLight, FileLoader, Float32BufferAttribute, Group, HemisphereLight, Mesh, MeshPhongMaterial, PerspectiveCamera, PointLight, Scene, SpotLight} from "three";
/**
* Babylon loader is used to load babylon files.
*
* @author mrdoob / http://mrdoob.com/
* @author... |
// store global shared data
module.exports = {} |
import React from 'react';
import ThemeContext from '../../contexts/ThemeContext';
const withTheme = WrappedComponent => {
return function WithTheme(props) {
return (
<ThemeContext.Consumer>
{theme => <WrappedComponent {...props} theme={theme} />}
</ThemeContext.Consumer>
);
};
};
exp... |
'use strict'
process.env.BABEL_ENV = 'web'
const path = require('path')
const webpack = require('webpack')
const MinifyPlugin = require("babel-minify-webpack-plugin")
const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = req... |
import join from 'lodash/join'
export default (format) => {
let d = new Date(),
T = {};
let datetime = '',
_format = format && format.split('') || 'M-D-Y h:m:s'.split('');
T.Y = d.getFullYear()
T.M = d.getMonth() + 1
T.D = d.getDate()
T.h = d.getHours()
T.m = d.getMinutes()... |
dojo.provide("dojo.nls.dojo_pt-br");dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pt_br");dijit.nls.loading.pt_br={"loadingState":"Carregando...","errorState":"Desculpe, ocorreu um erro"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.... |
/*
| Copyright 2017 Esri
|
| 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 writ... |
window.addEventListener('load', init);
// Globals
// Available Levels
const levels = {
easy: 8,
medium: 5,
hard: 3
};
// To change level
const currentLevel = levels.medium;
let time = currentLevel;
let score = 0;
let isPlaying;
// DOM Elements
const wordInput = document.querySelector('#word-input');
const cu... |
import React, { Component } from 'react';
import { NavLink } from 'react-router-dom';
import styles from './MainNavbarComponent.css';
class MainNavbarComponent extends Component {
render() {
return (
<nav className = { styles['main-navbar'] }>
<ul>
<li><NavLink to = '/'>Home</NavLink></li... |
(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.defineMode("diff",function(){var a={"+":"positive","-":"negative","@":"meta"};return{token:function(b){var c=b.string.s... |
exports.min = function min(array) {
if (!Array.isArray(array) || array.length === 0) {
return 0;
} else {
return Math.min.apply(null, array);
}
}
exports.max = function max(array) {
if (!Array.isArray(array) || array.length === 0) {
return 0;
} else {
return Math.max.apply(null, array);
}
}... |
// Generated by CoffeeScript 1.12.7
(function() {
module.exports = {
"library": {
"identifier": {
"id": "DiabeticFootExam",
"version": "1.0.0"
},
"schemaIdentifier": {
"id": "urn:hl7-org:elm",
"version": "r1"
},
"usings": {
"def": [
{... |
/**
* Created by Alex on 28/05/2016.
*/
import BinaryField from './Field';
import { assert } from "../../assert.js";
/**
*
* @param {String} name
* @constructor
*/
function Type(name) {
assert.equal(typeof name, "string", `Name must be of type "string", instead was "${typeof name}"`);
/**
*
* ... |
/**
* Author: Pierre Lepers
* Date: 09/12/2013 17:21
*/
var UNCOMPRESSED = 0,
DEFLATE = 1,
LZMA = 2,
AWD_FIELD_INT8 = 1,
AWD_FIELD_INT16 = 2,
AWD_FIELD_INT32 = 3,
AWD_FIELD_UINT8 = 4,
AWD_FIELD_UINT16 = 5,
AWD_FIELD_UINT32 = 6,
AWD_FIELD_FLOAT32 = 7,
AWD_FIELD_FLOAT64 = 8,
AWD_FIELD_BOOL = 21,
AWD_FIELD... |
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('students', {
id: {
type: Sequelize.INTEGER,
allowNull: false,
autoIncrement: true,
primaryKey: true,
},
name: {
type: Sequelize.STRING,
allowNull: false,
... |
//@flow
import CoreUINavbar from '@scality/core-ui/dist/components/navbar/Navbar.component';
import Dropdown from '@scality/core-ui/dist/components/dropdown/Dropdown.component';
import { type Item as CoreUIDropdownItem } from '@scality/core-ui/src/lib/components/dropdown/Dropdown.component';
import { useEffect, useLayo... |
$(document).ready(function(){
(function(e){
var handler = StripeCheckout.configure({
key: "{{ publishable_key }}",
token: function(token) {
// You can access the token ID with `token.id`.
// Get the token ID to your server-side code for use.
stripe.make_payment_log(token, {{ frappe.form_dict|json }... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _pure = require('recompose/pure');
var _pure2 = _interopRequireDefault(_pure);
var _svgIcon = require('../../svg-icon');
var _svgIcon2 = _interopRequireD... |
mycallback( {"TOTAL FED-NONFED AMOUNT": "734.63", "Activity is Direct Candidate Support": "", "PAYEE CITY": "Shawnee", "EXPENDITURE DATE": "20100921", "PAYEE SUFFIX": "", "EXPENDITURE PURPOSE DESCRIP": "payroll", "PAYEE LAST NAME": "Martin", "PAYEE FIRST NAME": "Lauren", "Activity is Direct Fundraising": "", "BACK REFE... |
const express = require("express");
const {
getPosts,
createPost,
deletePost,
likePost,
unlikePost,
} = require("../controllers/posts");
const router = express.Router();
router.get("/", getPosts);
router.post("/", createPost);
router.delete("/:id", deletePost);
router.patch("/:id/likePost", likePost);
rout... |
/**
* @license
* Video.js 5.0.0-rc.32 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/master/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License... |
/**
* @license Highstock JS v7.2.1 (2019-10-31)
*
* Indicator series type for Highstock
*
* (c) 2010-2019 Daniel Studencki
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.e... |
// @flow
/* eslint-env mocha */
// import assert from 'power-assert'
// import locale from '.'
describe.skip('ja locale', function () {
}) |
'use strict';
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var Q = require('q'); /* jshint ignore:line */
var _ = require('lodash'); /* jshint ignore:line */
var util = require('util'); /* jshin... |
const EventEmitter = require("events");
const dgram = require("dgram");
const crypto = require("crypto");
const packet = require("./lib/packet");
class PaperCup extends EventEmitter {
constructor(udpSocket) {
if(typeof udpSocket != undefined) {
if(!(socket instanceof dgram.Socket)) {
throw new TypeError("soc... |
/*
@license
dhtmlxGantt v.5.2.0 Standard
This software is covered by GPL license. You also can obtain Commercial or Enterprise license to use it in non-GPL project - please contact sales@dhtmlx.com. Usage without proper license is prohibited.
(c) Dinamenta, UAB.
//# sourceMappingURL=locale_hr.js.map |
import React from 'react';
import spinner from '../scss/spinner.module.scss';
const Spinner = () => (
<div className={spinner.loading} />
);
export default Spinner; |
import {Command, commands, terminal} from 'tramway-command';
import Logger from 'tramway-core-logger';
import { RequiresLocalesError } from '../errors';
const {InputOption} = commands;
const {SuccessMessage, ErrorMessage, Message} = terminal;
export default class UpdateTranslationCommand extends Command {
locales... |
'use-strict';
const moment = require('moment');
const stringRandom = require('string-random');
const connection = require('../db/config');
const Sequelize = require('sequelize');
const models = require('../db/po/models');
const errorHandler = require('../util/handleInternalError');
const log = require('../logger');
... |
var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var indexRouter = require('../routes/index');
var usersRouter = require('../routes/users');
var app = express();
// view engine setup
ap... |
$(document).ready(function () {
$('#datepicker').datepicker({
format: "yyyy-mm-dd",
autoclose: true,
todayHighlight: true,
});
function validasiSaldo(e) {
let saldo = $('.saldo').val();
let namaAkun = $('#no_reff').val();
if (saldo == '') {
e.preventDefault();
swal({
type: 'error',
title:... |
function fillPassword(url, id_postfix) {
const passwordTimeout = 5000;
const getButton = jQuery('#download_' + id_postfix)[0];
const copyButton = jQuery('#clipboard_' + id_postfix)[0];
jQuery.getJSON(url, function(data) {
setPassword(data);
setTimeout(resetPassword, passwordTimeout);
... |
import React from 'react'
import Menu from '../Menu'
import Footer from '../Footer'
import styled from 'styled-components'
const Main = styled.main`
background-color: var(--black);
color: var(--white);
flex: 1;
padding-top: 50px;
padding-left: 5%;
padding-right: 5%;
`;
function PageDefault({c... |
'use strict';
exports.bar = require('./bar');
exports.line = require('./line');
exports.pie = require('./pie');
exports.candlestick = require('./candlestick'); |
import React from 'react'
import IconFlask from "../assets/flask.svg"
const About = () => (
<div className="About">
<IconFlask className = "About__logo-icon" />
<div className ="About__title-box">
<h1 className="About__title-box__title">Eklectic Alchemy</h1>
<p className="About__ti... |
/**
*
* Quick Logcat
* Copyright 2019 Google 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
*... |
// The Statistics strategy uses the measure of each end-start time for each
// query executed against the db to calculate the mean, variance and standard deviation
// and pick the server which the lowest mean and deviation
var StatisticsStrategy = exports.StatisticsStrategy = function(replicaset) {
this.replicaset = ... |
'use strict'
/**
* @typedef {import('interface-datastore').Datastore} Datastore
* @typedef {import('./types').Backends} Backends
* @typedef {Required<import('./types').Options>} Options
*/
/**
*
* @param {Backends} name
* @param {string} path
* @param {Options} options
* @returns {Datastore}
*/
function cre... |
/**
* Kendo UI v2019.3.1023 (http://www.telerik.com/kendo-ui)
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.... |
"use strict";
$(document).ready(function() {
var chatbg = $(window).height()-57;
$('.chat-bg').css('min-height', chatbg);
var a = $(window).height() - 70;
$(".user-box").slimScroll({
height: a,
allowPageScroll: false,
color: '#000'
});
// search
$(".searc... |
import PropTypes from "prop-types";
import React from "react";
import { getCols, helpers, setTitle } from "../util";
import { DataTable, NewWindowLink } from "../components";
const MostGamesNoPlayoffs = ({ players, stats, userTid }) => {
setTitle("Most Games, No Playoffs");
const superCols = [
{
... |
import React from 'react';
import {Link} from 'gatsby'
import AboutImage from '../../assets/images/about/about-img10.png'
import AboutShape from '../../assets/images/about/about-shape1.png'
import StarIcon from '../../assets/images/star-icon.png'
import OurMissionShape from '../../assets/images/our-mission/our-mission... |
/*global require, _, GLGE, window */
require.def('gma/utils/render',
['gma/base', 'gma/utils/base'],
function(gma) {
/** @module gma */
/**
* Sets options on a GLGE object
* @param obj {object} The object we are setting options on
* @param opts {Objec... |
import React from "react";
import PropTypes from "prop-types";
// import SwipeableViews from "react-swipeable-views";
import HorizontalTimeline from "../../src/Components/HorizontalTimeline";
// import HorizontalTimelineConfigurator from "./HorizontalTimelineConfigurator";
export default class HorizontalTimelineConte... |
import { useEffect } from 'react'
import useStore from 'lib/store'
const useDarkmodeSwitch = () => {
const isDarkmode = useStore((state) => state.isDarkmode)
useEffect(() => {
document.documentElement.className = isDarkmode ? 'dark' : 'light'
}, [isDarkmode])
return null
}
export default useDarkmodeSwit... |
var SpaceRing = function(size, num) {
var PARTICLE_PARAM = "aParticleParam";
var geo = new SQR.Geometry()
geo.attr(PARTICLE_PARAM, 4);
var numParticles = 30000;
var params = [];
for(var i = 0; i < numParticles; i++) {
params.push(Math.random() * SQR.twoPI, Math.random() * 0.3... |
import React from 'react';
import { shallow, mount } from 'enzyme';
import thunk from 'redux-thunk';
import configureMockStore from 'redux-mock-store';
import { BrowserRouter as Router } from 'react-router-dom';
import Signup, { signupComponent } from './index';
const middlewares = [thunk];
const mockStore = configure... |
// Darken a color
function darkenColor(colorStr) {
// Defined in dygraph-utils.js
var color = Dygraph.toRGB_(colorStr);
color.r = Math.floor((115 + color.r) / 2);
color.g = Math.floor((108 + color.g) / 2);
color.b = Math.floor((199 + color.b) / 2);
return 'rgb(' + c... |
import React, { Component } from 'react';
import { Text, View, Image, StyleSheet } from 'react-native';
export default class NewMonitor extends Component {
render() {
return (
<View style={ styles.container }>
<View style={{ alignItems: 'center'}}>
<Text style={ styles.monitorTitle }> { ... |
/// <reference path="../_namespace.js" />
/// <reference path="../datetime.js" />
(function () {
var formatTime = conference.formatTime;
var videoSection = document.querySelector(".video");
var video = videoSection.querySelector("video");
var controls = videoSection.querySelector(".video-contro... |
import React from 'react'
import styled from '@emotion/styled'
import { useTranslation } from 'react-i18next'
import { useDocumentTitle, useScrollTo } from '../components/hooks'
import mq, { useMediaMin } from 'mediaQuery'
import { H2 as DefaultH2 } from '../components/Typography/Basic'
import Map from '../component... |
// Styles
import './styles/main.scss'
// Static
import chatView from './static/chat.html'
// Images
import blipIcon from './images/brand-logo.svg'
// Utils
import Constants from './utils/Constants.js'
import StorageService from './utils/StorageService.js'
import { NotificationHandler } from './utils/NotificationHand... |
function counterCreator() {
var count = 0;
var increment = function () {
return ++count;
};
var getCount = function () {
return count;
};
return {increment, getCount};
}
var counter = counterCreator();
console.log(counter.increment());
console.log(counter.increment());
con... |
import Vue from 'vue';
import Vuetify from 'vuetify';
import Vuelidate from 'vuelidate'
import VueRouter from 'vue-router';
import axios from 'axios';
import App from './App.vue';
import store from './store/store';
import { routes } from './routes';
// import 'materialize-css/dist/css/materialize.css';
// import 'mat... |
module.exports = {
wrap: function (content, classes = '') {
return `<div class="wrapper p-4 ${classes}">${content}</div>`
},
columns: function (content) {
return `<div class="grid grid-cols-1 md:grid-cols-2 gap-6">${content}</div>`
},
cols: function (content, bgcolor) {
return `<div class="${bgcolor}">${co... |
const express = require('express');
const path = require('path');
const sql = require('mssql');
const dbConfig = require('../dbConfig');
const router = express.Router();
/* GET category page */
router.route('/')
.get((req, res, next) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/h... |
const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
const API_URL = 'https://rickandmortyapi.com/api/character/';
const xhttp = new XMLHttpRequest();
const fetchDataFromAPI = url => {
return new Promise((resolve, reject) => {
xhttp.onreadystatechange = () => {
const response = JSON... |
import React from 'react';
import { fireEvent, render } from '@testing-library/react';
import { ErrorDialogTestable } from './ErrorDialog';
const mockDispatch = jest.fn();
const makeExample = () => render(
<ErrorDialogTestable errorMsg="foobar" dispatch={mockDispatch} showError={true}/>
);
test('Sends dismissError ... |
import path from 'path'
import fs from 'fs'
import { isAddress } from './utils'
/**
*
*/
const defaultConfig = {
nativeContracts: {
bridge: '0x0000000000000000000000000000000001000006',
remasc: '0x0000000000000000000000000000000001000008'
}
}
const config = checkConfig(Object.assign(loadConfig(), defau... |
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported XLSX */
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
var XLSX = {};
function make_xlsx_lib(XLSX){
XLSX.version = '0.17.4';
var current_codepage = 1200, current_ansi = 1252;... |
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import About from './customer/About';
import Home from './employee/Home';
import Locations from './customer/Locations';
import { default as MenuCustomer } from './customer/Menu';
import { default as MenuEmployee } from './employee/Menu';
impor... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import Header from '../Header'
import Footer from '../Footer'
const Layout = ({ children }) => {
retur... |
import {
fetchResultsBegin,
fetchResultsSuccess,
} from '../search-actions';
describe('synchronous search actions', () => {
test('fetch results begin should return an object with type', () => {
const actual = fetchResultsBegin();
expect(typeof actual).toBe('object');
expect(actual.type).toBeDefined(... |
import React from 'react'
import GettingStarted from '../components/GettingStarted'
import { ThemeProvider } from 'styled-components'
const theme = {
spacing: 4,
palette: {
primary: '#007bff'
}
}
const about = () => {
return (
<ThemeProvider theme={theme}>
<div>
<GettingStarted />
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const colors = {
almostBlack: "#181A1B",
lightBlack: "#2F3336",
almostWhite: "#E6E6E6",
white: "#FFF",
white10: "rgba(255, 255, 255, 0.1)",
black: "#000",
black10: "rgba(0, 0, 0, 0.1)",
primary: "#1AB6FF",
g... |
import RepoItem from './RepoItem';
export default RepoItem; |
/*! formstone v0.7.15 [carousel.js] 2015-08-19 | MIT License | formstone.it */
|
define(
"dojox/editor/plugins/nls/ko/LocalImage", ({
insertImageTitle: "이미지 삽입",
url: "이미지",
browse: "찾아보기...",
text: "설명",
set: "삽입",
invalidMessage: "올바르지 않은 이미지 파일 유형",
prePopuTextUrl: "이미지 URL 입력",
prePopuTextBrowse: "또는 로컬 파일 찾아보기"
})
); |
'use strict';
export const MAIN_COLOR = '#00BFA5';
export const SECOND_COLOR = '#FFD600';
export const CHART_HEIGHT = 35; |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
// Loaded before Metronic app.js
import '../plugins'; |
// 路由前置守卫
// 进行登录拦截的控制(后面自己写) |
const User= require('./User');
const Merchandise = require('./Merchandise');
const Posting = require('./Posting');
User.hasMany(Posting, {
as: 'poster',
foreignKey: "user_id"
})
User.hasMany(Posting, {
as: 'bidder',
foreignKey: 'bidder_id'
})
Posting.belongsTo(User, {
as: 'poster',
foreignKey: 'user_id'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.