text stringlengths 7 3.69M |
|---|
import React from 'react';
import { Redirect } from 'react-router-dom';
import PostApi from "../../services/PostApi";
import PostCardList from './PostCardList';
import { Layout, Pagination } from 'antd';
import PopitHeader from "../PopitHeader";
import PopitFooter from "../PopitFooter";
import '../popit.css';
const {... |
import { expect } from 'chai';
import { REHYDRATE } from 'redux-persist';
import agents from './agents';
import * as actionTypes from '../constants/actionTypes';
import * as statusTypes from '../constants/status';
import { TestProcessBuilder, TestAgentBuilder } from '../test/builders/api';
describe('agents reducer', ... |
import Permissions from 'react-native-permissions'
import LocationHelper from './location';
export default class PermissionsHandler {
static permissionTypes = Object.freeze ({
"LOCATION" : "location",
"CAMERA" : "camera",
"MICROPHONE" : "microphone",
"PHO... |
function Transaction(balance = new Balance(), dataValidation = new DataValidation()) {
this.transactions = [];
this.balance = balance;
this.dataValidation = dataValidation;
}
Transaction.prototype.withdraw = function (date, value) {
this.dataValidation.validate(date, value);
const returnedBalance = this.bala... |
import { formatSalary, isAValidNumber, transformDate, isMonthValid, isDayValid } from '..';
describe('#formatSalary', () => {
it('returns formatted string with valid inputs', () => {
expect(formatSalary(60000)).toEqual('60,000 USD per year');
expect(formatSalary(600)).toEqual('600 USD per year');
});
});
... |
//---------path模块-----
//1.路径的解析
var path=require('path');
var myPath=path.normalize(__dirname+'/input.txt'); //normalize()方法解析路径返回完整路径,__dirname是代变量
// console.log(myPath);
//2.路径的结合,合并,路径最后不会带目录分隔符
var myPath=path.join('path1', '/path2/aa', 'baz/asdf');
// console.log(myPath); // path1/path2/aa/baz/asdf
//3.在当前... |
import React, {Component} from 'react';
import BackgroundImage from './BackgroundImage.js';
import LeftArrow from './LeftArrow.js';
import RightArrow from './RightArrow.js';
import CircleButtons from './CircleButtons.js';
class BackgroundContainer extends Component {
constructor(props) {
super(props);
... |
define(function(require, exports, module){
var G=require('../../c/js/globale');
require('../../c/js/registerHelper');
require('../../c/js/zepto.lazyload');
var Tpage=require('./page.handlebars');
var main = {
init:function(){
var self=main;
... |
'use strict';
const inspiration = require('./TheMindOfAGustin');
/**
* https://api.slack.com/docs/message-formatting
* @param predicate
* @param message
* @returns {number}
*/
function formatSlackMessage(message) {
return {
response_type: 'in_channel',
text: message,
attachments: [],... |
const projectInitialState = {
m_no: '',
m_introduce: '',
m_school: '',
m_degree: '',
m_major: '',
m_inyear: '',
m_outyear: '',
m_skill: '',
experience: [],
};
export default function (state = projectInitialState, action) {
switch (action.type) {
case 'CREATE_RESUME_REQUEST': {
return { ...sta... |
var nextPhraseGenerator = (function () {
var slangPhrases = [
", yeah!",
", this is crazy, I tell ya.",
", can U believe this?",
", eh?",
", aw yea.",
", yo.",
"? No way!",
". Awesome!"
],
current = 0;
... |
function getCopyRight(){
today = new Date();
myDate = today.getFullYear();
copy = "© Copyright 200x -" + myDate + " hogehoge All rights reserved.";
return copy;
} |
import * as assert from 'assert'
import * as _ from 'lodash'
// Actions
const PATHWAY_LOADING_SUCCESS = 'pathways/pathway/PATHWAY_LOADING_SUCCESS'
const PATHWAY_ADD_NODE = 'pathways/pathway/PATHWAY_ADD_NODE'
const PATHWAY_DELETE_NODE = 'pathways/pathway/PATHWAY_DELETE_NODE'
const SIDEBAR_CREATE = 'pathways/pathway/SIDE... |
import React, { Fragment, useContext, useEffect } from 'react';
import { Button, Select, Form, Input } from 'antd';
import './style.css';
import { multiStepContext } from '../StepContext';
import DataRestaurants from '../data/dishes.json';
const { Option } = Select
const validateMessages = {
required: 'Value is n... |
/*color Palette:
dark blue: 85, 91, 110
blue: 137, 176, 174
light blue: 190, 227, 219
white: 250, 249, 249
pink: 255, 214, 186 */
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
import Display from "./display.js";
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
const X = ... |
import { storage } from '@xmini/x-mini/lib/index';
import api from '../../api/index';
// import { sa } from '../../utils/shence.js';
// console.warn('=======store user.js api', api)
let userInfo = storage.get('userInfo') || {};
console.log(userInfo);
function isLogin(data = {}) {
return !!(data.token && data.user_i... |
const initState = {
activeTab: "dashboard",
};
const sideNavReducer = (state = initState, action) => {
switch (action.type) {
case "CHANGE":
return {
activeTab: action.data,
};
default:
return state;
}
};
export default sideNavReducer;
|
var number = new Buffer('123456789');
console.log(number.toString());
var slice = number.slice(3,6);
console.log(slice.toString());
slice[0] = '#'.charCodeAt(0);
console.log(slice.toString());
slice[slice.length - 1] = '#'.charCodeAt(0);
console.log(slice.toString());
console.log(number.toString()); |
module.exports = {
port: process.env.PORT || 5000,
DB: {
uri: 'mongodb://localhost:27017/cookbook-test2',
options: { useNewUrlParser: true, useUnifiedTopology: true },
},
};
|
function happy() {
if(document.getElementById('exampleInputName2').value<=0){
sweetAlert("输入错误", "请输入>=0的数据","error");
return false;
}
else if(document.getElementById('exampleInputName2').value>99){
sweetAlert("输入错误", "请输入<100的数据","error");
return false;
}
else{
$('tr').remove();
var n = parseInt(documen... |
import React, { Component } from 'react';
import Item from './item';
import './style.scss';
export default class Form extends Component {
static isObj(obj) {
return obj && typeof(obj) === 'object';
}
constructor(props) {
super(props);
}
shouldComponentUpdate(nextProps) {
return nextProps.valu... |
import { useEffect, useState } from "react"
import banner from "../banner.jpg"
import { Link } from "react-router-dom";
const Banner = () => {
const [search, setSearch] = useState();
const [find, setFind] = useState([]);
const [word, setWord] = useState("");
useEffect(() => {
setSearch([... |
import React from 'react';
import {
Silence,
Affirmations,
Visualization,
Exercise,
Reading,
Scribing,
Chinese,
} from './Savers';
function isSunday() {
return (new Date()).getDay() === 0;
}
function Sunday() {
return (
<React.Fragment>
<Chinese text="I complete a lesson in Duolingo." />
... |
const httprequest = new XMLHttpRequest();
httprequest.open("GET", "http://localhost:2000/getSupermarkets");
httprequest.send();
httprequest.onreadystatechange = function () {
if (httprequest.status === 200 && httprequest.readyState === 4) {
document.getElementById("container").appendChild(createTable(JSON.p... |
import React, { Component } from "react";
class CountUp extends Component {
state = {
diffStr: ""
};
componentDidMount() {
setInterval(() => {
let diffstring =
(new Date().getTime() - this.props.start.getTime()) / 1000;
diffstring = diffstring.toFixed(0);
this.setState({ diffStr... |
var firebase = require('firebase');
// connect to Firebase
// Initialize Cloud Firestore through Firebase
var config = {
apiKey: "AIzaSyAUv8Qv0jrVbJYX5iDr-WE-n4MPGJfM5ms",
authDomain: "bioandes-2019.firebaseapp.com",
databaseURL: "https://bioandes-2019.firebaseio.com",
projectId: "bioandes-2019"
};
firebase.in... |
const express = require('express');
var path = require('path');
const app = express();
var bodyParser = require('body-parser');
const session = require('express-session');
const passport = require('passport');
const flash = require('connect-flash');
const jwt = require('jsonwebtoken');
const {check,validationResult} = ... |
var createError = require('http-errors'); // errors 모듈
var express = require('express'); // expresss 모듈
var path = require('path'); // path 모듈
var cookieParser = require('cookie-parser'); // 쿠키 모듈
var expressSession = require('express-session'); // 세션 모듈
var FileStore = require('... |
import React, {Component} from "react";
import ReactDOM from "react-dom";
class Counter extends Component{
state={
value:this.props.cont.value,
tags:["tag1","tag2"]
};
/* constructor(){
super()
// console.log("constructor",this);
this.handleIncrement=this.handleIncrem... |
'use strict';
module.exports = (sequelize, DataTypes) => {
var isDescendentOf_cache={};
var isAncestorOf_cache={};
var Organization = sequelize.define('Organization', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
parentId: ... |
/**
* class to store all blocks and their possible offsets
*
* @author MrXeth
*/
export default class Tetrominos
{
//#region all blocks
static none = {
color: 0x0
}
static ghost = {
color: 0x808B96
}
static i = {
color: 0x85C1E9,
coords: 0x7042
}
... |
'use strict';
angular.module('nameInput', []); |
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const User = require('../models/user.js');
const usersController = {};
usersController.create = (req, res) => {
const salt = bcrypt.genSaltSync();
const hash = bcrypt.hashSync(req.body.password_digest, salt);
User.findByUserName(req.... |
// Select Elements
// ===============
const wordEl = document.getElementById("word");
const wrongLettersEl = document.getElementById("wrong-letters");
const playAgainBtn = document.getElementById("play-button");
const popup = document.getElementById("popup-container");
const notification = document.getElementById("noti... |
const Messenger = require('../composers/messenger');
const PlayerController = require('../../database/controllers/player.js');
function initializeMessengerEvent(message, client) {
client.sendPacket(new Messenger.InitializeMessengerComposer());
PlayerController.getFriends(client.player.id).then((friends) => {
... |
/*
================================
Coder: Emily Yu
Date: 02/11/2019 - 02/23/2019
Main Related Files: textAdventureGame.html, textGameStyle.css
Description:
Text adventure game where player types in instructions to forward the story.
Feature within This Javascript File:
User interface related events are l... |
require('colors/safe')
|
/**
* Created by woody on 2015/11/10.
*/
angular.module('myapp').factory('JumpUtil', ['$rootScope','$state','$ionicViewSwitcher',function($rootScope,$state,$ionicViewSwitcher){
var alertRes = {
addBackInfo : function(data){
$rootScope.barkInfoArray[$rootScope.barkInfoArray.length]=data;
... |
$(document).ready(function () {
$('.elemento').resizable();
}); |
/*
Requires manual maintanance
Groups different Agent status Reasons, used to sort agent statuses & give a color (components/AgentSection/)
*/
const free = ['Login', 'Sisäänkirjaus']
const call = ['JÄLKIKIRJAUS', 'PUHELU (Sisään)', 'PUHELU (Ulos)', 'SÄHKÖPOSTI (Sisään)', 'SÄHKÖPOSTI (Ulos)', 'WRAPUP TIME', 'CA... |
var marker1, marker2, marker3, marker4;
var poly, geodesicPoly;
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 12
, center: {
lat: 9.9656553
, lng: -84.1201701
}
});
map.controls[google.maps.Contr... |
import {createContainer} from '../addEditPageContainer';
import showDialog from '../../../../standard-business/showDialog';
import helper,{fetchJson} from '../../../../common/common';
const URL_ADD_CONFIG = '/api/basic/defaultOutput/reciversConfig';
// 为EditDialog组件构建状态
const buildEditDialogState = (config,tableItem... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsLocalBar = {
name: 'local_bar',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 5V3H3v2l8 9v5H6v2h12v-2h-5v-5l8-9zM7.43 7L5.66 5h12.69l-1.78 2H7.43z"/></svg>`
};
|
var args = process.argv;
console.log(args[2]);
|
const studants = [
{ name: 'Anna', grade:6 },
{ name: 'John', grade:4 },
{ name: 'Maria', grade:9 }
]
const isApproved = student => student.grade >= 9
const approvedStudents = students.filter(isApproved)
|
const {mysql} = require('../qcloud');
module.exports = async ctx => {
const {id} = ctx.request.query;
ctx.state.data = await mysql('books').select().where('id', id).first();
await mysql('books').where('id', id).increment('count', 1);
};
|
import React from 'react';
const ResumeLink = React.forwardRef((props, ref) => (
<a href="../pdf/files/ResumeMWills.pdf"></a>
))
export default ResumeLink; |
import React from 'react';
import './App.css';
import axios from 'axios';
import { useEffect } from 'react';
import { useState } from 'react';
import {BrowserRouter as Router, Route, Switch} from 'react-router-dom';
import SharedQuote from './SharedQuote';
import ShareButton from './ShareButton'
export default funct... |
"use strict";
var request = require('request');
var assert = require('assert');
var fs = require('fs');
var common = require('../../common');
var csMock = require('../mock/customerSuccess');
var customerMock = require('../mock/customerSession');
var baseUrl = common.baseUrl;
var localUrl = common.localUrl;
describe(... |
module.exports = {
singlePortrait: require('./single-portrait')
}
|
/* See license.txt for terms of usage */
/*global define:1*/
define([
"firebug/firebug",
"firebug/lib/trace",
"firebug/lib/array",
"firebug/lib/css",
"firebug/lib/dom",
"firebug/lib/domplate",
"firebug/lib/events",
"firebug/lib/locale",
"firebug/lib/object",
"firebug/lib/persist... |
import React from "react";
import { storiesOf } from "@storybook/react";
import { withKnobs } from "@storybook/addon-knobs";
import { getStoryName } from "storybook/storyTree";
import A11yStory from "./examples/test/A11y";
import ScreenerStory from "./examples/test/Screener";
import ShowcaseStory from "./examples/Showc... |
function validate(field, regex) {
if (regex.test(field.value)) {
field.className = 'form-control valid';
} else {
field.className = 'form-control invalid';
}
}
function validateInputs(inputs, patterns) {
let valid = true;
inputs.forEach((input) => {
let regex = patterns[inpu... |
const Report = require('../models').Report;
const create = async function (req, res) {
const body = req.body;
try {
if(!body){
return ReS(res, 'Bad request', 400);
}else {
let objReport = await Report.findOne({idReporter:body.idReporter, idPersonBeingReported: body.idPersonBeingReported});
if(objReport)... |
'use strict';
var Ticks = function(newWorld) {
var mudSecLen = newWorld.config.mudMinute;
var previousTick = Date.now()
var ticks = this;
var gameLoop = function() {
var now = Date.now();
if (previousTick + mudSecLen <= now) {
previousTick = now
ticks.gameTime(newWorld);
}
if (Date.now() - prev... |
(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/house_circles/_event_item" ], {
"3f8e": function(e, n, t) {
t.d(n, "b", function() {
return o;
}), t.d(n, "c", function() {
return c;
}), t.d(n, "a", function() {});
var o = function() {
... |
var d3 = require('d3');
var crossfilter = require('crossfilter');
module.exports = function(data) {
var self = this;
self.dateFormat = d3.time.format('%B %d %Y');
self.data = data;
self.ndx = null;
self.transform = function() {
self.data.forEach(function(d) {
d.dd = self.dateF... |
if (window === top) {
window.addEventListener('keyup', function (e) {
if (e.ctrlKey && e.keyCode === 68) {
var description = window.getSelection().toString(),
url = "http://pinboard.in/add?jump=close&url="
+ encodeURIComponent(window.location) + "&title="
... |
import { Sprite, window, Res } from 'alpha'
// 加载背景图片
export default class Bg extends Sprite {
constructor(props) {
super({
name: 'wecome背景',
width: window.innerWidth,
height: window.innerHeight
})
this.init()
}
init() {
const that = this
Res.loadImage({
url: '/image/w... |
import { makeStyles } from '@material-ui/core/styles';
import { createMuiTheme } from "@material-ui/core/styles";
export const useStyles = makeStyles({
root: {
width: "100%",
overflowX: "auto",
},
menuItemDefault: {
color: "#a1bbd6"
},
menuItemActive: {
color: "#0090E6 !important",
fontWe... |
/**
* 所有群列表
*/
Ext.define('eapp.view.duocaijiayuan.GroupListAll',
{
extend: 'Ext.dataview.List',
xtype:'grouplistallview',
config:
{
title:'群列表',
iconCls: 'info',
cls:'textcolor7',
store:null,
itemTpl:
[
'<div style="width: 98%">'... |
const Discord = require("discord.js")
const client = new Discord.Client()
const config = require("./config.json")
const db = require("quick.db")
const fs = require("fs");
client.on("ready", () => {
console.log(`Logged in discord Bot name:${client.user.username}`)
})
const prefix = config.prefix
client.commands = n... |
const MacrosService = {
macrosSoFar(meals, usrMacros) {
let protein = 0;
let carbs = 0;
let fats = 0;
meals.forEach(meal => {
protein += parseInt(meal.protein);
carbs += parseInt(meal.carbs);
fats += parseInt(meal.fats);
});
const macros = { protein, carbs, fats };
con... |
import React from 'react'
import CustomIcon from '../CustomIcon'
const CaretRight = (props) => (
<CustomIcon {...props}>
<path d="M7.09524 22L17 12L7.09524 2" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
</CustomIcon>
)
export default CaretRight
|
import { allHeads } from "./HeadsDataProvider.js"
import { HeadComponent } from "./HeadsHTMLConverter.js"
const entryLog = document.querySelector(".content--right")
export const headList= () => {
const heads = allHeads()
console.log(heads)
let HeadHTMLRepresentations = ""
for (const head... |
'use strict';
const scriptInfo = {
name: 'Channel Token',
desc: 'Give a IRC user a unique token that identifies them to a channel',
createdBy: 'IronY'
};
const moment = require('moment');
const Models = require('bookshelf-model-loader');
const logger = require('../../lib/logger');
const randToken = require('rand-... |
const replaceRefs = (obj, searchStr, replaceStr) => {
if (!obj) {
return;
}
if (typeof obj === 'string') {
return obj;
}
if (Array.isArray(obj)) {
return obj.map(k => replaceRefs(k, searchStr, replaceStr));
} else if (typeof obj === 'object') {
return Object.assign(
{},
...Object... |
import path from 'path';
import getConfigKey from './getConfigKey';
const getFilePath = (location, fileName) => {
const address = getConfigKey("address");
const currentDir = location.pathname;
const url = address + path.join(currentDir, fileName);
return url;
};
export default getFilePath;
|
/*
Author: Marco Santomo
Updated: June 2016
*/
$(function() {
$('#alertMe').click(function(e) {
e.preventDefault();
$('#successAlert').slideDown();
});
$('a.pop').click(function(e) {
e.preventDefault();
});
$('a.pop').popover();
$('[rel="tooltip"]').tooltip();
});
function sendMail()... |
// 환경 변수에 따라 설정 달리함
if (process.env.NODE_ENV === 'production') {
// 환경변수 production 일 때 ./prod를 요청
module.exports = require('./prod');
} else {
// 환경변수 development 일 때 ./dev 요청
module.exports = require('./dev');
} |
({
/**
* Do Init
*
* @param {Component}
* component
* @param {Event}
* event
* @param {Helper}
* helper
* @return {}
*/
doInit : function(component, event, helper) {
var parentGroupId = component.get("v.parentGroupId");
if (!$A.util.isEmpty(parentGroupId)) {
... |
// @flow
import React from "react";
import { useState, useEffect } from "react";
import moment from "moment";
import { OPERATION_LIST_ENTITIES } from "lk/operations.js";
import { getLKQuery } from "../../redux/actions.js";
function loadLog( importId, setIsLogLoading, setIsLogLoadingError, setLog )
{
let dataWithO... |
import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faUser,
faEnvelopeOpen,
faCalendarTimes,
faMap,
faPhone,
faLock,
faGreaterThan,
} from "@fortawesome/free-solid-svg-icons";
function UserData({ isLoading, showUserData, title, subTitle, newRandomUser }) ... |
const express = require("express");
var router = express.Router();
const mongoose = require("mongoose");
const Student = mongoose.model("Student");
router.get("/", (req, res) => {
res.render("studentFilter/addOrEdit", {
viewTitle: "SEARCH STUDENT BY"
});
});
router.post("/", (req, res) => {
// console.log(r... |
(function () {
'use strict';
/**
* @ngdoc service
* @name marketing.factory:Marketing
*
* @description
*
*/
angular
.module('marketing')
.factory('Marketing', Marketing);
function Marketing($http,consts) {
var MarketingBase = {};
MarketingBase.sendMessageToClients = functio... |
#!/usr/bin/env node
var minimist = require("minimist"),
args;
args = minimist(process.argv.slice(2), {
alias: {
d: "domain",
h: "help",
p: "project",
t: "token",
u: "user",
v: "version"
}
});
function format(data) {
return data.reduce(function (accumula... |
/*Problem 3. Underage people
Write a function that prints all underaged persons of an array of person
Use Array#filter and Array#forEach
Use only array methods and no regular
loops (for, while)*/
var arr = [ { names: 'ivan', age: 115, gender: true },
{ names: 'petur', age: 12... |
#!/usr/bin/env node
import * as fs from 'fs'
import { renderFile } from './render/typescript'
import { readDirectory } from './parse/read'
import { parseModule } from './parse/parse'
async function main() {
const inDir = process.argv[2]
const outFile = process.argv[3]
const rootDirectory = await readDirectory... |
function submitCustomerForm(event) {
let customerDetails = customerInformations("customer_form");
addCustomerRow(customerDetails, "customers_list");
// Those 2 lines must been commented for Gatling test
// cleanForm("customer_form");
// event.preventDefault();
}
function addCustomerRow(custom... |
//Define your S3 site buckets and regions, as well as site-specific datatypes
var SITES = [
{
name: 'Site Number One',
markdown_bucket: 'site-one-markdown',
assets_bucket: 'site-one-assets',
site_bucket: 'site-one-site',
aws_region: 'us-east-1',
... |
const assert = require('assert');
const Human = require('../src/Human.js');
const Computer = require('../src/Computer.js');
const Tictactoe = require('../src/Tictactoe.js');
describe("Tic Tac Toe App Test", function() {
let testBoard, grid;
let playerOne = new Human('Player1', 'x');
let playerTwo = new Human('Play... |
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { Link } from 'react-router';
import { renderField, renderFieldFocus } from '../helpers/render_field';
class ChangePasswordForm extends Component {
render() {
const { handleSubmit } = this.props;
return(
<f... |
require('should');
const _ = require('lodash');
const DiscountedCashFlow = require('../src/DiscountedCashFlow');
describe('DiscountedCashFlow', async () => {
describe('getGrowthRateForYear', () => {
it('should get 0.1 for all years', () => {
const growthRates = [0.1];
for (
let yearIndex = 0;... |
import { createStore } from "vuex";
import {shipments} from "./shipments";
export default createStore({
state: {
// just a fake login for fun
userName: "",
},
getters: {
getUserName(state){
return state.userName
}
},
mutations: {
setUserName(state, payload) {
state.userName = p... |
import { createSlice } from '@reduxjs/toolkit';
import {
postPhoto,
postPostcard,
} from '../services/api';
import {
setResponseError,
// changeInputFieldValue,
} from './commonSlice';
const initialState = {
writePageIndex: 0,
inputFields: {
isPrivate: true,
secretMessage: {
value: '',
... |
'use strict';
var catalogo = require('../models/catalogue');
var jose = require('node-jose');
const mongoose = require('mongoose');
var jwt = require('jsonwebtoken');
/**
@description Retorna el catálogo completo de la aplicación
**/
module.exports.catalogueGET = function catalogueGET(req, res, next) {
catalogo... |
//todo --> Variables
const boton = document.getElementById('boton');
const insertar = document.getElementById('insertar');
const insertarDos = document.getElementById('insertarDos');
const alerta = document.getElementById('alerta');
const amiga = document.getElementById('amiga');
//todo --> EventListeners
eventList... |
import React from "react";
import Progress from "./Progress";
export default {
title: "form/Progress Bar",
component: Progress,
};
export const ProgressBar = () => <Progress />;
|
const express = require('express')
const {urlPageScraper, repoUrls, endingUrl} = require('./url_scraper')
const server = require('./backend/server')
const readline = require('readline')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
// you need to manually iterate this url ... |
var expect = require('chai').expect;
describe('DependencyValidator', function() {
it('exists', function() {
var DependencyValidator = require('./dependency_validator.js');
expect(DependencyValidator).to.not.be.undefined;
});
});
describe('DependencyValidator', function() {
it('takes input', function() {
var ... |
import React from 'react'
import TestMenu from '../components/TestMenu'
const TestLayout = (props) => {
return (
<React.Fragment>
<TestMenu/>
{props.children}
</React.Fragment>
)
}
export default TestLayout
|
import React, { useEffect, useContext } from 'react';
import { Link } from 'react-router-dom';
import RecipeContext from '../hooks/RecipeContext';
import recipeRequest from '../services/recipeRequest';
import { Header, Footer } from '.';
import '../Style/mainScreen.css';
function ExploreFoodIngredients() {
const {
... |
'use strict';
var emitter = require('./emitter');
var mongoose = require('mongoose');
var Board = mongoose.model('board', require('../config/schemas/board'));
var Event = mongoose.model('event', require('../config/schemas/event'));
module.exports = function(req) {
var boardQuery = Board.find({'members.isAc... |
//@ts-check
import * as React from "react";
const { PureComponent } = React;
import { expect } from "chai";
import { render, act } from "reshow-unit";
import sinon from "sinon";
import { createReducer } from "reshow-flux-base";
import useConnect from "../useConnect";
describe("useConnect Unmount Test", () => {
con... |
import React from 'react';
import {connect} from "react-redux";
import {bindActionCreators} from 'redux';
import increase from "../../actions/increase";
import decrease from "../../actions/decrease";
import setStep from "../../actions/setStep";
const Controls = ({setStep, increase, decrease, currentValue, step}) => {
... |
const express = require("express");
const Stripe = require("stripe");
const cors = require("cors");
// const captureWebsite = require("capture-website");
const nodemailer = require("nodemailer");
const sharp = require("sharp");
const path = require('path');
//stripe
const app = express();
const stripe = new Strip... |
import React from "react"
export default () => {
return <div>Comment box</div>
}
|
import http from 'k6/http';
const url = 'https://httpbin.test.k6.io/patch';
export default function () {
const headers = { 'Content-Type': 'application/json' };
const data = { name: 'Bert' };
const res = http.patch(url, JSON.stringify(data), { headers: headers });
console.log(JSON.parse(res.body).json.name)... |
import {SERVICE_URLS} from '../constants/serviceUrl';
import * as types from '../constants/actiontypes';
import axios from 'axios';
import toastr from 'toastr';
/*get equipment category*/
let getEquipmentCategory=(token)=>{
const url=SERVICE_URLS.GET_EQUIPMENT_LIST;
var config = {
headers: {'Autho... |
var express = require('express');
var exec = require('node-exec-promise').exec;
var router = express.Router();
var fs = require('fs');
const util = require('util');
const readFile = util.promisify(fs.readFile);
require('dotenv').config();
let id = process.env.API_KEY;
let updateFreq = process.env.UPDATE_FREQUENCY;
let... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.