text
stringlengths
7
3.69M
const func = (word, prefix = 'hi') => { if (word) { return `${prefix}${word}`; } return (word) => { prefix = `${prefix}i`; return func(word, prefix); } } /* func("world") --> returns --> hiworld func()("world") --> returns --> hiiworld func()()("world") --> returns --> h...
import React from 'react' import { shallow } from 'enzyme' import App from '../../refactor/components/App' import * as GameContext from '../../refactor/GameContext' const MockConsumer = () => (<div id="MockConsumer" />) const MockProvider = () => (<div id="MockProvider" />) GameContext.default = { Consumer: MockCon...
var Reflux = require('reflux'); var Actions = Reflux.createActions([ 'getPokemons', 'getPokemon', 'searchPokemon', 'changeFilter' ]); module.exports = Actions;
import {connect} from 'react-redux'; import {loadMenu, dropRedirect, clickBurger, clickApplyBurger, clickCancelBurger, clickNewBurger, clickFinishOrder} from '../redux/actions'; import Main from './Main'; import {selectUserName, selectRedirect, selectMenuMap, selectBurgerSelected, selectBurgerOrder, selectI...
var ResultSet = function(tbl) { this.result = tbl.data; this.getResultSet = function() { return this.result; } }; module.exports = ResultSet;
import React, { Component } from 'react'; import './LoginForm.scss'; import { Link } from 'react-router-dom'; import { IconContext } from 'react-icons'; import { FaGoogle, FaFacebookSquare } from 'react-icons/fa'; import { GoogleLogin } from 'react-google-login'; import FacebookLogin from 'react-facebook-login/dist/fac...
(function (dm) { var s = { insertSort: (function () { var insertSort = function (arr, func) { /*@param array arr 待排序数组*/ func = func || function (prev, current) { if (prev > current) return 1; ...
import { actions } from './../actions' const initialState = { mobileMenu: false, } export default function workspace(state = initialState, { type }) { switch (type) { case actions.openMobileMenu: return { ...state, mobileMenu: true, } case actions.closeMobileMenu: return ...
function sendMessage() { var request = new XMLHttpRequest(); request.open( "POST", "https://discord.com/api/webhooks/742864526373945505/8ICR6Jl3yY8OtZydV9bhjMjIJSNQcz_bZICA7LKLfRlF4KZz79L-5lshMdCEP370Zn9e" ); request.setRequestHeader("Content-type", "application/json"); var message_content = document....
export const server = { url : 'http://192.168.0.4:3333' }
green_25_interval_name = ["玉井","鹿陶洋","楠西","密枝","雙溪","茶水站","第一莊","第三莊","嘉義農場","大茅埔","大埔"]; green_25_interval_stop = [ ["玉井站","玉安街口","玉田里"], // 玉井 ["後旦","竹圍","鹿陶廟","鹿陶","埔頭子","大林路口","鹿陶洋","東西煙"], // 鹿陶洋 ["油車","楠西橋","楠西區圖書館","楠西區公所","楠西街","楠西","楠西國中","水庫路口"], // 楠西 ["檨仔坑","山頂","風窗","埤仔坑","密枝南","密枝","密枝北"], // 密枝 ["東勢坑","坊...
var requestJson; $(document).ready(function () { $("#addItemInListBtn").click(function () { let item = $("#inputItemInList").val(); let amount = $("#inputItemAmount").val(); if (amount == "") { alert("Enter Amount") } else if (!item == "") { var code; ...
var searchData= [ ['input_5fnumber_54',['input_number',['../classclasses_1_1nag_1_1_nag.html#a0cc27ba2edc3da1e1c92002f35f39782',1,'classes.nag.Nag.input_number(self)'],['../classclasses_1_1nag_1_1_nag.html#a0cc27ba2edc3da1e1c92002f35f39782',1,'classes.nag.Nag.input_number(self)']]] ];
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState === 4 && this.status === 200) { ...
module.exports = { PORT: 3001, DB_CLUSTER_NAME: 'barnpals-cluster-name', DB_PASSWORD: 'password123', DB_USER: 'exampleUser', };
/* * Login Action Creator */ //dependencies import { GET_CATEGORIES, GET_CURENT_CATEGORY, GET_CURENT_PRICELIST, GET_PRICELISTS, LOGIN, GET_OVERVIEW, GET_USERS , CREATE_GROUP, GET_GROUPS, GET_CURRENT_USER, UPDATE_USER, ...
import {Bar} from 'vue-chartjs' export default{ extends:Bar, data() { return { label: [1,2,3,4,5,6,7,8,9,10], } }, props: ['data','value'], mounted() { //alert(this.label) this.renderBarChart(); }, computed: { chartData: function() ...
//only for dev mode needs to be removed on prod import devBundle from "./devBundle"; import { config } from "./../config/config"; import app from "./express"; import mongoose from "mongoose"; mongoose.Promise = global.Promise; mongoose.connect(config.mongoUri, { useNewUrlParser: true, useCreateIndex: true, useU...
import React, { useMemo } from "react"; import ContentHeader from "./helpers/content-header"; import ExperienceDetails from "./helpers/experience-details"; import moment from "moment"; function WorkExperience() { const date = useMemo(() => { const currentTime = moment(); const joiningDateDiff = currentTime.d...
import { useState } from 'react'; import marked from 'marked'; import './Note.css'; const Note = ({ text='', id, onDeleteNote, onTextUpdate}) => { const [isEditing, setIsEditing] = useState(false); const toggleEditor = () => { setIsEditing(prevValue => !prevValue); }; return ( <div className="note"> ...
var Utils = require('utils'), _ = require('underscore'), Handlebars = require('handlebars/runtime')['default']; var Self; module.exports = Self = { template: function (item, id) { var tiposMidia = '<option value="Youtube">Youtube</option>' + '<option value="Flickr">Flickr</option>' + '<option value="Ins...
import Organization from '../../db/models/Organization' import User_Organization from '../../db/models/User_Organization' export default async function(src, args, ctx) { try { return await Organization.create( { ...args, users: [ { userId: args.creatorId, r...
// Sign In View // ============= // Includes file dependencies define([ "firebase", "jquery", "backbone", "auth", "debug" ], function( Firebase, $, Backbone, Auth, Debug ) { // Extends Backbone.View var entrySignInView = Backbone.View.extend({ el: $("#signInView"), events: { "click #signInButton"...
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { createTranslate } from '../locales/translate' import ReduxToastr from 'react-redux-toastr' import { ActionCreators as AuthActions } from '../modules/authentication/acti...
let registerForm = document.querySelector("#register-form"); registerForm.addEventListener("submit", registerHandler); let loginForm = document.querySelector("#login-form"); loginForm.addEventListener("submit", loginHandler); let url = "http://localhost:3030/users"; async function registerHandler(e) { e.preventD...
const mazo = document.getElementById("mazo"); const tablero = document.getElementById("tablero"); const cambiarJugador = document.getElementById("cambiarjugador"); const tl = gsap.timeline(); let cantidadCartasPozo = 0; // Mazo de prueba, funciona con mayusculas y minusculas. const mazoCartas = [ "1Y", "3Y", "1B"...
"use strict"; import { arryLi } from "./arryBase.js"; // const inpDocType = document.querySelector("#inpDocType"), divPageTypes = document.createElement('div'), divTypes = document.createElement('div'), resultTypesDiv = document.createElement('div'), noDocDiv = document.querySelector('#noDocDiv'...
var express = require('express'); var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http) var treedoc = require('./treedoc.js'); var converter = require('./converter.js'); var fs = require('fs'); var siteID = 0; var tree; var docs = require('./docType.js'); require...
const User = require('../models/user'); /* refresh_user_token function updates the token of the user given the id and the new token. It extracts the id and token from the request body then updates the token of the associated user */ exports.refresh_user_token = (req, res, next) => { if (req.body.id ...
import KulinariaDataSource from '../../data/dataSource'; import UrlParser from '../../routes/url-parser'; import { createRestaurantDetailTemplate, errorMessageTemplate } from '../templates/template-creator'; import Scroll from '../../utils/scroll'; import LikeButtonInitiator from '../../utils/like-button-presenter'; im...
const conexionMysql = require("../../DB/conexionMysql"); const { formatearDateMysql } = require('../../helpers'); /** * Reserva una plaza de cierta experiencia. 👍 * @param {} req * @param {*} res * @param {*} next */ async function reservarExperiencia(req, res, next) { let conexion; try { con...
let word = prompt('Введите слово').toLowerCase(); // if(!isNaN(+word) && word !== '') { // alert('Число не подходит'); // } else if(word === '') { // alert('В строке пусто'); // } else if(word === word.split('').reverse().join('')) { // console.log(true); // } else { // console.log(false); // } let va...
var Vector = require("./vector"); /** * Creates a complex number * @constructor * @extends Vector * @param {number} x - The real part * @param {number} y - The imaginary part */ function Complex(x, y) { Vector.call(this, x, y); } Complex.prototype = Object.create(Vector.prototype); /** * Multiplies two com...
define(['require'], function(require) { 'use strict'; var ngApp, ls, _siteid; ls = location.search; _siteid = ls.match(/[\?&]site=([^&]*)/)[1]; ngApp = angular.module('app', ['ngRoute', 'ui.bootstrap', 'ui.tms', 'ui.xxt', 'http.ui.xxt', 'notice.ui.xxt', 'service.matter', 'protect.ui.xxt']); ngAp...
import { Link } from "gatsby" import React from "react"; import CoupleAC from "./AbigailCaio/coupleAC"; import CoupleMK from "./MarlenaKyle/coupleMK"; import CoupleOT from "./OliviaTJ/coupleOT"; import CoupleSL from "./SirleyLamont/coupleSL"; import CoupleRA from "./RoshniAllwyn/coupleRA"; import "./couples.scss"; con...
var searchData= [ ['gettimestamp_8',['getTimeStamp',['../functions_8h.html#ab01f25e9d4ea3af4aaae53a6524e1229',1,'functions.h']]] ];
const parseLang = fileName => { const lang = fileName.replace(" ", "").split("."); return lang[lang.length - 1]; } export { parseLang }
import Vue from 'vue' import Vuex from 'vuex' import { db } from "../firebase" Vue.use(Vuex) export const GET_PROJECTS = 'GET_PROJECTS' export const SET_CURRENT_PROJECT = 'SET_CURRENT_PROJECT' export const REMOVE_CURRENT_PROJECT = 'REMOVE_CURRENT_PROJECT' export const GET_PROJECT_TASKS = 'GET_PROJECT_TASKS' export c...
"use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function _classCallCheck(instance,...
import PropTypes from 'prop-types'; import PropsInit from '../../Utils/PropsInit'; import { Colors } from '../../Theme'; export default props=(Component) => { propTypes={ containerStyle: PropTypes.oneOfType([PropTypes.object,PropTypes.array]), valueStyle: PropTypes.oneOfType([PropTypes.object,PropTypes.array...
require.config({ // baseUrl in this config means path relative to index.html // 1. if no data-main defined then baseUrl relative to the folder where require.js lies // 2. if data-main defined then baseUrl relative to the folder where data-main="xxx" lies // 3. if in require.config({baseUrl: 'xxx'}...
// Functor 函子 // 面向对象写法 class Container { constructor (value) { this._value = value } map (fn) { return new Container(fn(this._value)) } } let r = new Container(5) .map(x => x + 1) .map(x => x * x) console.log(r) // Container { _value: 36 }
/* ------------------------------------ sec219 現在時刻とsetTimeout後の時刻を表示するサンプル -------------------------------------*/ function sec219() { let time219 = document.querySelector('#time219'); time219.innerHTML = '起動時の時刻' + new Date().toLocaleTimeString(); setTimeout(() => { time219.innerHTML = 'setTimeout後の時刻' + new Da...
//Tipos de comunicación: /*File communication (EXPRESS): +El cliente pide al servido un archivo (Ex: playerImg.png) mywebsite.com :2000 /client/playerImg.png URL = DOMAIN PORT PATH*/ /*Package communication (Socket.io): +El cliente envia datos al servidor (Ex: input) ...
var shequhudong=document.getElementById("shequhudong"); var shouQ=document.getElementById("shouQ"); var weixinGZH=document.getElementById("weixinGZH"); var weixinQZ=document.getElementById("weixinQZ"); var guangfangWB=document.getElementById("guangfangWB"); var tipsPlayer=document.getElementById("tipsPlayer"); var t...
class EditorCtrl { constructor(Articles, article, $state) { 'ngInject'; this._Articles = Articles; this._$state = $state; if (!article) { this.article = { title: '', description: '', body: '', tagList: [] }; } else { this.article = article; } } submit() { this.isSubmitting...
///////////////////////////////////////////// //////////////// EXPORTING REQUIRED MODULES const crypto = require('crypto'); // it is build in node module so no need to install it. const mongoose = require('mongoose'); const validator = require('validator'); const bcrypt = require('bcryptjs'); /////////////////////////...
import Settings, { HIDE_FROM_EVERYONE_OPTION } from '../settings/index.js'; import { CSS_PREFIX } from '../module.js'; import { icon, emptyNode, img, div, span, appendText } from './html.js'; import { updateCustomAttributeRow } from './custom-attribute-display.js'; import * as attributeLookups from '../attribute-lookup...
import { connect } from 'react-redux'; import LoadSettings from '../components/LoadSettings'; import { GetSettings } from '../utils/db'; import { SCALE_CHANGED } from '../actions/file'; import { setImageScale } from '../features/note/noteSlice'; // this is obsolete function asyncLoadSettings() { return (dispatch) =>...
function Hidden(x, y){ this.x = x; this.y = y; this.width = 15; this.height = 20; } Hidden.prototype.draw = function(){ ctx.drawImage(hiddenPaper, this.x, this.y, this.width, this.height); }
const {Schema, model, Types} = require('mongoose') const schema = new Schema({ _idList: Schema.Types.ObjectId, title: {type: String, required: true}, completed: {type: Boolean,default: false} }) module.exports = model('Todo', schema)
import React from "react"; import "./Logo.css"; const Logo = () => { const onMenuEvent = (e) => { const navigation = e.target.parentNode.parentNode.parentNode; navigation.classList.toggle("open"); e.target.attributes[0].value = (navigation.classList.contains("open")) ? "chevrons-left" : "ch...
const path = require('path'); const express = require('express'); const PORT = process.env.PORT || 3000; const { FORGE_CLIENT_ID, FORGE_CLIENT_SECRET, MODEL_URN } = process.env; if (!FORGE_CLIENT_ID || !FORGE_CLIENT_SECRET || !MODEL_URN) { console.warn('Some of the following env. variables are missing: FORGE_CLIEN...
export default { transformers: { name: 'index.js', options: { useEslintrc: false, envs: ['browser'], rules: { 'no-unused-vars': 2, quotes: [1, 'single', 'avoid-escape'] } } } }
var express = require('express'); var path = require('path'); var less = require('express-less'); exports.initialize = function(app, RedisStore){ app.set('port', process.env.PORT || 3000); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(express.favicon()); app.use(exp...
import React, { Component } from 'react' import { Text, View, Image } from 'react-native' export const ImageCard = ({ img, score }) => { return ( <View> <Text> textInComponent </Text> <Image style={{ width: '100%', height: 250 }} source={img} ...
import React from 'react'; import { Link } from "react-router-dom"; import { AssignmentOutlined, ChatBubbleOutline, DashboardOutlined } from "@material-ui/icons"; import ListItem from "@material-ui/core/ListItem"; import ListItemIcon from "@material-ui/core/ListItemIcon"; import ListItemText from "@material-ui/core/L...
import React, { Component } from 'react' import styled from 'styled-components' import { Table, HeaderRow, HeaderCell, BodyRow, BodyCell, TableThumb, Sorter } from '../../mia-ui/tables' import { Link, NextA } from '../../mia-ui/links' import { Button } from '../../mia-ui/buttons' import PropTypes from 'pr...
import React from "react"; import styled from "styled-components"; const Wrapper = styled.div` width: 100%; display: flex; justify-content: center; `; const Loading = props => ( <Wrapper className="Loading"> <p>Loading...</p> </Wrapper> ); export default Loading;
const io = require('socket.io')(); // handling client connection io.on('connection', (client) => { // here you can also respond to events being emitted from the client client.on('subscribeToTimer', (interval) => { console.log('client is subscribing to timer with interval ', interval); setInterval(function ...
import React from "react"; class Link extends React.Component { render() { let {title, url} = this.props.link; return ( <div className="link"> <a href={url}>{title}</a> </div> ); } } export default Link;
/** @jsx jsx */ import StyledComponent, { Container } from '../StyledComponent'; import { css } from '@emotion/react'; import styled from '@emotion/styled/macro'; import { jsx } from 'theme-ui'; const Pumpkin = styled(StyledComponent)` bottom: 0; left: 20px; background: #c54c17; width: 100px; height: 80px; ...
const categoryController = require('../controllers/categoryController'); module.exports = (app) => { app.route('/categories') .post(categoryController.createCategory) .get(categoryController.getAllCategories) .delete(categoryController.deleteAllCategories); app.route('/categories/:cate...
import React from 'react' import { ListOfCategories } from './components/listOfCategories' import { ListOfPhotoCard } from './components/listOfPhotoCard' import { GlobalStyle } from './GlobalStyles' const App = () => { return ( <> <GlobalStyle /> <ListOfCategories /> <ListOfPhotoCard /> </>...
import React, { Component } from 'react' import styled from 'styled-components' import Div from 'components/Div' import HeightTransition from 'components/HeightTransition' export default class HeightTransitionExample extends Component { state = { show1: false, show2: false, show3: false } render() ...
import React, { Component } from 'react'; import {Link} from 'react-router-dom'; class Footer extends Component { render() { return ( <footer> <div className="container-fluid"> <div className="row"> <div className="footerHeader"> </div> </div> ...
const bcrypt = require('bcryptjs') module.exports = { getMembersByCompany: (req, res) => { const { co_id } = req.params const db = req.app.get("db") db.getTeamMembers({ co_id }) .then(results => { res.status(200).send(results) }) }, deleteMember: (req, res) => { const { team_...
var csv = require('fast-csv'); var q = require('q'); var Fridge = require('../model/fridge'); var Ingredient = require('../model/ingredient'); /** * Parser strategy for fridge data * * @param {string} contents * @returns {q@call;defer.promise} */ module.exports.getModel = function(contents...
"use strict"; var Model = require('./../models/user.model'); var CustomError = require('./../utils/custom-error'); var mongoose = require('mongoose'); // Get All function getAll(req, res, next){ Model.getAll((err, objects)=>{ if(err){return next(err);} if(!objects){return next(new CustomError('No data found...
/** * Contrôleur de l'application. */ var ApplicationController = function($scope, $location, $cookies) { /** * Données de l'application */ $scope.main = { brand: "[[Planning]]", name: "Thomas GIRAULT" }; /** * Méthode page spécifique */ $scope.isSpecificPage =...
var searchData= [ ['trie',['Trie',['../classTrie.html',1,'']]], ['trienode',['TrieNode',['../classTrieNode.html',1,'']]] ];
import React from "react"; import logo from "../assets/download.png"; import axios from "axios"; import { Outlet, Link } from "react-router-dom"; class artist extends React.Component { render() { return ( <div> <div className="header"> <header> <img src={logo} /> ...
// ==UserScript== // @name 修改弹幕流基础件 // @version 0.2 // @namespace https://github.com/shugen002/userscript // @description 修改直播弹幕流基础件 // @license MIT // @author Shugen002 // @match https://live.bilibili.com/* // @match https://live.bilibili.com/blanc/* // @exclude https://l...
var my_url="Initial value"; var spsheet= SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/1GZr1yOOvi-R76HKKdFQy-6p204-ZgBy-rSuqix0OpC8/edit#gid=0'); var ssheet = spsheet.getSheets(); var sheet = ssheet[0]; function doGet(e) { if(e.parameter.row!=null && e.parameter.col!=null) { //var userPr...
import React from 'react'; const Home = () => { return ( <div> <div className="JumboBanner"> <h1>Mighty Muf'ler</h1> <h2>Arizona's Quality Shop since 1979</h2> </div> <div className="Margins"> <div className="TwoColumnGrid"> <div className="Padding"> ...
var MovementSystem = System.extend('MovementSystem', function(input) { this.input = input; this.zeroSpeedThreshold = 0.001; this.nodes = {movables: []}; this.lastDelta = 1/30; }, { aspects: { movables: Aspect.all(['Movement', 'RigidBody', 'GroundSensor']) ...
/** * Renders a view into a DOM element and runs assertions against it * Locale calls simply return the key value * @param {Object} view View under test * @param {Function} assertions Method containing assertions * @param {Object} options Rendering options * @param {Function} [options.environment=undefined] Gets ...
import React from 'react'; import './search.styles.scss'; import { connect } from 'react-redux'; import { setSearchField } from '../../redux/search/search.actions'; import { searchUser } from "../../redux/user/user.actions"; import { searchPost } from "../../redux/post/post.actions"; class Search extends React.Compone...
import React from 'react'; import escapeRegExp from 'escape-string-regexp' class Places extends React.Component { // state ={ // query:'' // } // A function to update the input the query state with the input // updateQuery=(query)=>{ // this.setState({query: query.trim()}) // } render(){ const {myPlaces, que...
import React, { Component } from 'react'; import Web3 from 'web3'; import './App.css'; import Color from './contracts/Color.json'; function colorHexToString(hexStr) { return '#' + hexStr.substring(2); } function colorStringToBytes(str) { if (str.length !== 7 || str.charAt(0) !== '#') { throw new Error('invali...
import ActionTimer from '..'; describe('ActionTimer', () => { it('.start() runs interval, that increments tick value every second', () => { const timer = new ActionTimer(); timer.start(); const result = new Promise(resolve => { global.setTimeout(() => { timer.cancel(); resolve(); ...
import React from "react"; import "./DoctorBatchCard.css"; import {withRouter} from 'react-router-dom' class DocterBatchCard extends React.Component { processRequest(){ const patient = JSON.parse(localStorage.getItem("userToken")) let d = new Date(); if(patient){ const body = JSON.stringify(...
import React from "react"; // Components: import Placeholder from "../Placeholder"; const Practice = () => { return <Placeholder title="Practice" />; }; export default Practice;
import Home from "./Pages/Home/home"; import Design from "./Pages/Editors/Editors"; import React from "react"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; function App() { return ( <div> <Router> <Switch> <Route exact path="/" component={Home} /> <R...
const fs = require('fs') const path = require('path') const { camelCase, replace, forEach } = require('lodash') const modelPath = path.join(__dirname, '../models') const modelFiles = fs.readdirSync(modelPath) const createModelName = (file) => camelCase(replace(file, '.js', '')) const models = {} const modelsCreator...
var coinChange = function(coins, amount) { let ans = dp(coins, amount, {}) if (ans === Number.MAX_VALUE) {return -1} return ans }; function dp(coins, amount, h) { if (amount === 0) {return 0} if (amount < 0) {return -1} if (h[amount]) {return h[amount]} let min = Number.MAX_VALUE let in...
import { gql } from '@apollo/client' export const GET_SERIES = gql` { getAllSeries { _id poster_path } } `; export const GET_ONESERIES = gql` query getSeriesById($_id: ID) { getSeriesById(id: $_id) { _id poster_path overview popularity title tags }...
/** * Copyright 2016 Google Inc. * * 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...
var searchData= [ ['knight_2ehpp',['knight.hpp',['../knight_8hpp.html',1,'']]] ];
var tableid=0; function setData() { var key=document.getElementById("key").value; var value=document.getElementById("value").value; localStorage.setItem(key,value); document.getElementById("key").innerHTML=""; document.getElementById("value").innerHTML=""; } function renderTable() { var newTable ...
import React from "react"; import product7 from "./images/product-7.jpg"; import product8 from "./images/product-8.jpg"; import product9 from "./images/product-9.jpg"; import product10 from "./images/product-10.jpg"; function RecentProduct() { const styleRecent = { position: "relative", padding: "30px 0", }...
import AuthPage from '../pageobjects/AuthPage' describe('auth', () => { const page = new AuthPage() it('init', () => { page.open() page.screenshot('init') }) it('change lange', () => { page.changeLange() page.screenshot('change lange') }) it('register', () => { page.register() pa...
'use strict'; //public createTable(tableName: String, attributes: Object, options: Object, model: Model): Promise const Sequelize = require('sequelize'); let attributes = { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, uuid: { unique: true, allo...
const fs = require('fs') const glob = require("glob") const px2vw = require("postcss-px-to-viewport") const webpack = require('webpack') const path = require('path') const resolve = dir => { return path.join(__dirname, dir) } const pages = {} let entries try { // 获取相关入口 entries = glob('src/pages/*/index.js', {...
// @flow /* ********************************************************** * File: types/appWideActionTypes.js * * Brief: Type def for Actions that span the entire app * * Authors: Craig Cheney * * 2017.09.18 CC - Document created * ********************************************************* */ export type updatePendingActi...
'use strict' module.exports = { NODE_ENV: '"production"', AIRTABLE_API_KEY: '"keyysM2h2Va9vpmru"', AIRTABLE_BASE: '"appH4DsvAZMNZ3VJU"' }
import { cons } from 'hexlet-pairs'; import { randomPositiveInt, isYesNoAnswer, isEven } from '../utils'; import startGame from '../game'; const getProblem = () => { const num = randomPositiveInt(); const answerText = isEven(num) ? 'yes' : 'no'; return cons(`${num}: `, answerText); }; const startBrainEvenGame =...
import useStyles from "../styles/main-style"; function ImageStructure({ planetName, images }) { const { img } = useStyles(); return ( <img className={img} src={images.internal} alt={`${planetName} internal structure`} /> ); } export default ImageStructure;
/** * This is essentially a Level class, which delegates logic to each game object where possible */ var statePlay = function () { var self = this, playerStartX = 15, playerStartY = -10, paintColor, platformVerticalSpacing = 56, platformHeight = 10, // State info ...
$(window).on('load', function(event) { $('body').removeClass('preloading'); // $('.load').delay(1000).fadeOut('fast'); $('.loader').delay(1000).fadeOut('fast'); }); $(document).ready(function() { $('.button-menu-mobile').click(function(event) { $('.is_menu').toggleClass('show-button-menu-mobile'); }); $('.cat...