text
stringlengths
7
3.69M
import {extractIngredient} from "../ingredients"; describe("should extract correct ingredients", () => { it(" should work with fractions < 1", () => { const {measurement, quantity, name} = extractIngredient("1/2 cup chopped nuts, optional") expect(measurement).toEqual("cup"); expect(quantit...
{ "header" : { "navbar" : { "UPLOAD" : "上传", "new" : { "NEW" : "新建", "PROJECT" : "项目", "TASK" : "任务", "USER" : "用户", "EMAIL" : "Email" }, "NOTIFICATIONS" : "消息" } }, "aside" : { "nav" : { "HEADER" : "统一用户管理", "DASHBOARD" : "Dashboard", ...
import React from 'react'; import PropTypes from 'prop-types'; import './Pagination.scss'; const Pagination = ({ search, currentPage, totalPages, clicked }) => { let pagination = null, firstPage = null, previousPage = null, nextPage = null, lastPage = null; if (currentPage > 2) { firstPage = <span on...
app.directive('base', function(){ return { scope: {}, templateUrl: "templates/base.html", } })
import axios from 'axios' axios.defaults.baseURL = 'http://localhost:4000' // 响应拦截 axios.interceptors.response.use(function(res){ return res.data },function(err){ return Promise.reject(err) }) // 首页theme export let getThemeHot = () =>{ let theme = axios.get('/getThemeHot') return theme.then((res)=>{ ...
import React from 'react' import Layout from '../components/layout' const work = () => ( <Layout> <p>This is the page for my work history.</p> </Layout> ) export default work
import React from 'react' import {View, Text,StyleSheet, SafeAreaView, ScrollView, Image, ViewBase, TouchableOpacity, Linking} from 'react-native' import Swiper from "react-native-swiper" export default function Entertainment(){ return( <ScrollView> <SafeAreaView style={{flex:1}}> <View style={{m...
import React from 'react'; import { findBubbleProduct } from '../../services/BubbleService'; class BubbleDetail extends React.Component { componentDidMount() { findBubbleProduct(this.props.match.params.bubbleId).then(item => { this.setState({ bubbleItem: item }); }); } constructor...
import './menu.js' import './contactsform.js'
import { NodeModel as Model } from 'storm-react-diagrams'; import lodash from 'lodash'; import { defaultProps, TYPE } from './props'; class NodeModel extends Model { constructor(props) { const ownProps = lodash.clone(defaultProps); lodash.merge(ownProps, props); super(ownProps[TYPE]); this.props = ow...
// Then, write code that gathers each of these form input values and places them into one array. // Front-end logic $(document).ready(function() { $("#favoriteThings form").submit(function(event) { var favoriteThings = ["food", "sports", "movie", "book", "socialApp"]; favoriteThings.forEach(function(favorit...
import React, { Component, useState, useEffect, setState } from 'react'; import getBlockchain from './ethereum.js'; import axios from 'axios'; class App extends Component{ constructor(props) { super(props) this.state = { account: '', decentragram: null, images: [], loading: true ...
import React from 'react'; import { Circle } from '.'; export default { title: 'Circle', component: Circle, }; const Template = args => <Circle {...args} />; export const FirstStory = Template.bind({}); FirstStory.args = {};
const express = require('express'); const router = express.Router(); //Controllers // const user = require('../controllers/users.controller'); // const category = require('../controllers/categories.controller'); // const product = require('../controllers/products.controll...
({ choseVolunteer : function(cmp, event, helper) { helper.choseVolunteer(cmp, event); }, nameInputChange : function(cmp, event, helper) { helper.handleNameSearchChange(cmp); }, removeChosenVolunteer : function(cmp, event, helper) { helper.resetChosenVolunteer(c...
import React from 'react'; import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'; import { Icon } from 'leaflet'; import logoIcon from '../assets/icons/iconMarker.png' export default function MapLocal() { const local = new Icon({ iconUrl: logoIcon, iconSize: [50], iconAnch...
export default `#version 100 precision highp float; attribute vec2 pos; varying vec2 uv; void main() { gl_Position = vec4(pos, 0.0, 1.0); uv = pos / 2.0 + 0.5; }`;
$(() => { $('#boton').on('click', function () { $('#boton').off(); $.get("servidor.php") .done(function (datos) { for (let index = 0; index < datos.length; index++) { for (let index2 = 0; index2 < datos[0].length; index2++) { co...
/** * https://developers.facebook.com/docs/messenger-platform/send-api-reference/audio-attachment * https://developers.facebook.com/docs/messenger-platform/send-api-reference/file-attachment * https://developers.facebook.com/docs/messenger-platform/send-api-reference/image-attachment * https://developers.facebook.c...
import React from 'react'; import SectionTitle from '../../section-title/SectionTitle'; import HeaderWithTitle from '../../section-header-with-title/HeaderWithTitle'; import './style.scss'; class Experience extends React.Component { state = { posts: { post_1: { title: 'Pierwsza praca', year...
var CONFIG = require('config'); /** * HTTP Codes */ LOGIN_REQUIRED = 601; /** * Paths */ LIB_DIR = __dirname + '/'; BUCKETS_DIR = __dirname + '/../buckets/'; SUBSCRIBERS_DIR = __dirname + '/../subscribers/'; CLIENTS_DIR = CONFIG.dirs.clients; /** * Channels */ CHANNEL_VARIATIONS = 'variations'; CHANNEL_GOALS =...
const {merge} = require('webpack-merge') const path = require('path') const {execSync} = require('child_process') const detect = require('detect-port') const inquirer = require('inquirer') const chalk = require('chalk') const CopyPlugin = require('copy-webpack-plugin') const common = require('./webpack.common.js') le...
// Copyright 2017 Joseph W. May. 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 applica...
let canPartition = function(num) { //TODO: Write - Your - Code let result = resolve(num, [], []); return result; }; function sum(arr) { let result = 0; for (let i = 0; i < arr.length; i++) { result += arr[i]; } return result; } function resolve(num, left, right) { if (left.length > 0 && right.len...
exports.convert = function (req, res) { var browser = require('../lib/util/browser'); browser.render(req.rawBody, function (type, binaryData) { res.set({ 'Content-Type': 'image/' + type }); res.send(binaryData); }); };
let express = require('express') let bodyParser = require('body-parser') let cors = require('cors') let jwt = require('jsonwebtoken') const sqlsp = require('sqlstoreprocedure') require('events').EventEmitter.defaultMaxListeners = Infinity; let config = require('./config') // sp = new sqlsp(config.dbconexion.user, conf...
// Set up ---------------------------------------------------------------------------------------------------------------------------------------------- require("dotenv").config(); var keys = require("./keys.js"); var Spotify = require('node-spotify-api'); var Twitter = require('twitter'); var spotify = new Spotify(ke...
//challenge 1 function checkTwoNumbers(x, y){ return x === 75 || y===75 || (x + y) === 75; } console.log(checkTwoNumbers(75, 6)); //challenge 2 function areaOfTriangle(x, y, z) { var perimeter = (x + y + z)/2; var area = Math.sqrt(perimeter*((perimeter-x)*(perimeter-...
/* global moment */ /* global app */ /* global factory */ app.service('scoreService', ['$http','configurationService','socketFactory',function($http, configurationService,socketFactory ) { var self = this; this.scores = {}; //We received an update about the game status socketFactory.on("server:game:status"...
'use strict' var express=require('express'); var SurveyController=require('../controllers/surveyController'); var md_auth=require('../middlewares/autheticated'); var api= express.Router(); api.post('/createSurvey',md_auth.ensureAuth,SurveyController.createSurvey); api.put('/updateSurvey/:id',md_auth.ensureAuth,Surve...
// first alternate copy var myArray = [1, 2, 3, 4]; var myOtherArray = myArray.slice(); myArray.pop(); console.log(myOtherArray); myArray = [1, 2]; console.log(myOtherArray); // second alternate copy myArray = [1, 2, 3, 4]; myOtherArray = myArray.map(elements => elements) myArray.pop(); console.log(myOtherArray);...
import React, {PropTypes, Component} from 'react'; import SelectItem from 'react-select-item'; import 'react-select-item/example/select-box.css'; import './styles.css'; export default class Panel extends Component { static propTypes = { symbolChangeHandler: PropTypes.func, segmentChangeHandler: PropTypes.fun...
import React from 'react' export default function SearchBar() { return ( <div> <input type="text" placeholder="Search your city location"/> </div> ) }
 String.prototype.endWith = function (str) { if (str == null || str == "" || this.length == 0 || str.length > this.length) return false; if (this.substring(this.length - str.length) == str) return true; else return false; return true; } String.prototype.startWith = f...
Vue.use(VueHtml5Editor, { showModuleName: true, image: { sizeLimit: 512 * 1024, upload: { url: '/upload' }, compress: { width: 2000, height: 2000, quality: 80 } } }); new Vue({ el: "#app", data: { UserId...
--- --- {% include js/googleanalytics.js %} {% include js/disqus.js %} {% include js/CSSNakedDay.js %}
import React from 'react' import { Container ,Row ,Col } from 'react-bootstrap' export default function OurVal() { return ( <Container className="py-5"> <Row> <Col lg={6} md={6} xs={12}> <h2>OUR VALUES </h2> </Col> <Col lg={6} md={6} xs={12}> <Row> <Col lg={6} md={6} xs={12}> <div > <div c...
/** * Remove the `key` keys/values from the blocks within a draft-js raw object * @param {Object} raw draft-js raw object * @return {Object} The passed object sans `key` keys/values */ export default function removeBlockKeys (raw) { const copy = Object.assign({}, raw) copy.blocks.forEach((block) => { delet...
let Promotora = (sequelize, Datatypes) => { let promotora = sequelize.define( 'Promotora', { cnpj:{ type: Datatypes.BIGINT, primaryKey: true, allowNull: false } }, { tableName: "promotora", ...
Tennisify.Views.MeetingInvitees = Backbone.ErrorView.extend({ template: JST['meetings/invite'], events: { "click .add-player": "addPlayer", "click .remove-player": "removePlayer", "click .cancel-invites": "cancelInvites", "click .save-invites": "render", "input .player-input": "getUsers", }, ...
import Vue from 'vue'; import App from './App'; import router from './router'; import axios from 'axios'; import * as dd from 'dingtalk-jsapi'; // Element UI import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; // 样式表 import '../static/css/main.css'; import '../static/lib/font-awesome/css...
function showContent(id) { if (id == 'about') { $("#mainblock").hide(); $("#about").show(); $("#contact").hide(); $("#block1").hide(); $("#block2").hide(); $("#block3").hide(); } if (id == 'contact') { $("#mainblock").hide(); $("#about").hide()...
import { renderString } from '../../src/index'; describe(`Process all inner expressions as plain text`, () => { it(`unnamed case 0`, () => { const html = renderString(`{% raw %} The personalization token for a contact's first name is {{ contact.firstname }} {% endraw %}`); }); });
const root = null; function track(d){ if(root === null){ root = new RankNode(d); }else{ root.insert(d); } } function getRankOfNumber(d){ return root.getRank(d); } class RankNode{ constructor(data){ this.data = data; this.leftSize = 0; this.left = null; ...
/** * 车位类型的前端控制JS * 作者:吕淑兰 * */ $(function(){ var rows=2; var page=1; var pageCount=0; //嵌入列表页面 $("div#parkTypemaincontent").load("parkType/list.html",function(){ //操作列表的方法 //取得车位类型的列表,分页模式 function getListInfo(){ $.getJSON("parkType/list/all/page",{page:page,rows:rows},function(data...
'use strict' const p = require('path') module.exports = { install(less, pluginManager, functions) { const { tree } = less functions.add('img-url', function imgUrl (value) { return new tree.URL(new tree.Quoted('"', p.join('/img', value.value)), this.index, this.currentFileInfo) }) } }
import { default as transducer } from './transducer'; import { default as walk } from './walk'; import { default as chart } from './chart'; import { default as store } from './store'; import { Edge, EdgeSemantics, EdgePresentation } from './edge'; import { SnapshotSemantics, SnapshotPresentation } from './snapshot'; im...
'use strict' const request = require('request') const payload = require('./payload') module.exports = async function ({ uri, slice }) { return new Promise((resolve, reject) => { request.post({ uri, headers: { 'Content-Type': 'application/json' }, json: payload({ ...slice }) },...
'use strict' const fs = require('fs') const path = require('path') const directives = require('./_directives') /** * API defines GraphQL schema. * @class Api - a API class */ class Api { /** * Scan the files in the given directory matching with a particular suffix. * @param {string} directory The location o...
/** * description: webpack打包入口 * Created Date: 2018-01-10 5:36:08 pm * Author: Haven * ----- * Last Modified: * Modified By: * ----- */ const formatCurrentTime = require('./formatCurrentTime') module.exports = { formatCurrentTime }
import React, { useEffect } from "react"; const NotFound = ({ history }) => { useEffect(() => { !localStorage.getItem("token") && history.push("/"); }, []); return <div> NotFound</div>; }; export default NotFound;
$(function () { init(); function init() { $.ajax({ type:"GET", url:"/book/simBookList", async:true, dataType: "json", success:function (data) { if(data.code==="0"){ var len = 6;//data.data.bookInfos.length,...
function mostrar() { let mes; mes = document.getElementById("txtIdMes").value; switch (mes) { //puedo hacerlo en el orden de meses o tambien puedo colocar a enero con los otros case "Enero": alert("Este mes tiene 30 o más días"); break; case "Febrero": alert("Este mes no tiene más de 29 días....
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.services' is found in services.js // 'starte...
import React, { Component } from "react"; import MultiStep from "./MultiStep"; import { steps } from './index'; class Setup extends Component { render () { return ( <div className="uk-section"> <h2>Let's set your profile up</h2> <p>We just need a few more things and we can get your profi...
jest.mock('@lodgify/fetch-helpers'); jest.mock('../utils/getUrl'); jest.mock('./utils/getQueryString'); jest.mock('./utils/getPathname'); jest.mock('../utils/setFunctionName'); import { getJSON, // eslint-disable-next-line import/named getJSONReturnValue, } from '@lodgify/fetch-helpers'; import { ORIGIN } from ...
window._UXK_Components.ACTIONSHEET = { props: function (dom) { return { title: $(dom).attr('title') ? $(dom).attr('title').split(',') : [], cancelTitle: "取消", dangerIndex: $(dom).attr('dangerIndex') ? parseInt($(dom).attr('dangerIndex')) : -1, }; }, setPro...
define(['jquery', 'cfgs', 'API', 'core/core-modules/framework.event', 'core/core-modules/framework.ajax', 'core/core-modules/framework.base64', 'core/core-modules/framework.block', 'core/core-modules/framework.dialog', 'core/core-modules/framework.generator', 'core/core-modules/framework.layout', ...
import React, { Component } from 'react'; import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'; import axios from 'axios'; // components import Home from './Home'; import NotFound from './NotFound'; // redux import { Provider, connect } from 'react-redux'; import thunk from 'redux-thun...
//Get element to write win total. var winCount = document.getElementById("winCount"); var lossCount = document.getElementById("lossCount"); var guessCount = document.getElementById("guessCount"); var charGuess = document.getElementById("charGuess"); //Initialize the game numbers and output var wins = 0; var losses = ...
import dotenv from "dotenv"; dotenv.config(); export const config = { client: "mysql2", connection: { host: process.env.HOST, user: process.env.USERDB, password: process.env.PASSWORDDB, database: process.env.DATABASE, }, };
"use strict"; var mysql = require("mysql"); var _ = require("underscore"); var config = require('./config'); var pool = mysql.createPool({ host: config.dbHost, user: config.dbUser, password: config.dbPassword, database: config.dbName }); function getPartidas(nick, callback) { getPartidasAbierta...
document.getElementById("btn01").addEventListener("click", function(event){ event.preventDefault(); }); //disable checkbox counntry document.getElementById("country_select").disabled = true; function popup() { var nettotal = 0; //Check checkbox values var ck_box01 = document.getElementById('checkbox01...
const express=require("express") const app=express() const axios=require("axios"); app.use(express.json()) //middleare to set he headers app.use((req,res,next)=>{ res.setHeader('Access-Control-Allow-Origin','http://localhost:3000'); next() }) //send the category data app.get("/category",async(req,res,next)=>{...
/***************************************************************** ** Author: Asvin Goel, goel@telematique.eu ** ** A plugin for embedding tweets. ** ** Version: 1.0.0 ** ** License: MIT license (see LICENSE.md) ** ******************************************************************/ window.RevealEmbedTweet = window.Re...
'use strict'; var _ = require('lodash'); module.exports = _.merge(_.cloneDeep(require('../base/Model')), { attributes: { itemname: { type: 'text', defaultsTo: '' }, itemdescription: { type: 'text', defaultsTo: '' }, listingid...
$(function() { $('#orderNotice input[name="publication[]"]:last') .parents('p') .after('<p id="totalPurchase" class="checkbox">Total: <span class="price">$0.00</span></p>'); $('#orderNotice input[name="publication[]"]') .click(function () { var total = 0; ...
var clusters = 9; getId = function(i, j, data){ var square = (j)*100 + (100 - i); if(data.hasOwnProperty(square)){ return data[square]; } else return 0; }; var gdt = function gridData(dt) { var data = new Array(); var xpos = 1; //starting xpos and ypos at 1 so the stroke will sh...
var markService = (function () { var url = 'http://marks.gz.bcebos.com/1.json?authorization=bce-auth-v1%2F3C6wefc3LtpFadgfRHn6dfMw%2F2016-10-05T15%3A47%3A56Z%2F-1%2Fhost%2Fd103d0f13999e6512e1baf0e8ce1bcad94436b8dd14a161e8f269c50945d2e52'; var config = { endpoint: "http://gz.bcebos.com", //传入Bucket所在区域域名 ...
const toggleNewDoseForm = () => { const zone = document.querySelector('.add-dose'); if (zone) { zone.addEventListener('click', (event) => { const formElement = document.querySelector('.add-dose-form'); formElement.classList.toggle('d-none'); formElement.scrollIntoView(true); } ) } } ex...
import colors from 'vuetify/es5/util/colors' export default { // Global page headers: https://go.nuxtjs.dev/config-head server: { port: 8080 // default: 3000 }, head: { titleTemplate: '%s - JOYREPUBLIC', title: 'Home', htmlAttrs: { lang: 'en' }, meta: [ { charset: 'utf-8' ...
/* * Copyright (C) 2009-2014 SAP SE or an SAP affiliate company. All rights reserved */ jQuery.sap.require("sap.ca.ui.charts.ChartRenderer"); jQuery.sap.declare("sap.ca.ui.charts.LineChartRenderer"); /** * @class LineChart renderer. * @static */ sap.ca.ui.charts.LineChartRenderer = sap.ui.core.Renderer.extend(sap...
import React from 'react' import classNames from 'classnames' const MemberItem = ({type,member,selectEvent}) => { // console.log(member) const selectedClass = classNames({ 'unselected': true, 'icon-gi':true, 'selected': true, }) const unselectedClass = classNames({ 'icon-...
angular.module("tbs.contact", []).controller("ContactController", function ContactController($rootScope, $scope) { $rootScope.title = "联系我们"; });
const helpers = { getDataById: (dataArray, id) => dataArray.filter(data => data.id === id)[0] || {}, sortById: (data = []) => data.sort((a, b) => a.id - b.id), addToLocalStorage: (label, data) => localStorage.setItem(label, JSON.stringify(data)), getFromLocalStorage: label => localStorage.getItem(label), g...
// 文件base64 export default (response) => { const raw = window.atob(response); const uInt8Array = new Uint8Array(raw.length); // eslint-disable-next-line no-plusplus for (let i = 0; i < raw.length; i++) { uInt8Array[i] = raw.charCodeAt(i); } const link = document.createElement('a'); const blob = new Bl...
console.log('sup+++++++++++++++++++++') ///Projectiles // class Bullet{ // constructor(x,y, radius){ // this.x = x; // this.y = y; // this.radius = 10; // this.startRadius = 0; // this.endRadius = Math.PI * 2; // this.direction = 1; // this.color = 'crimson' // } // draw(){ /...
/** * Created by cly on 16/12/26. */ import React,{Component} from "react"; import { AppRegistry, StyleSheet, Text, View, Platform, TouchableOpacity } from 'react-native'; import selector from "./selector"; import actions from "./actions"; import {connect} from "react-redux"; import {Button} from ...
// load environmental variables require('dotenv').load(); var _ = require('lodash'); var assert = require('chai').assert; var GoogleContacts = require('../'); describe('GoogleContacts API', function () { var gContacts = new GoogleContacts({ clientId: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_...
//dug http://localhost:8080/DefendTheTown/ var ScreenX = 1024; var ScreenY = 640; var config = { type: Phaser.AUTO, parent: 'content', width: 1024, height: ScreenY, physics:{ default: 'arcade', arcade: { gravity: {y:300}, debug: false } }, sc...
module.exports = { GRClient: require('./lib/client').GRClient }
let wordCount = 2; // the '2' is considered a truthy string but '0' would be a falsey string if (wordCount) { console.log("Great! You've started your work!"); } else { console.log('Better get to work!'); } //this will display "Great! You've started your work!" let favoritePhrase = ''; // the ' ' is considered a f...
import React from 'react'; import Login from './Login'; import Dashboard from './Dashboard/Dashboard'; import Navigation from './Navigation'; import Modal from './Dashboard/Modal'; import Loader from './Loader'; export default class App extends React.Component { constructor(props) { super(props); t...
import React, {useState}from 'react' import {Group} from '../../domain/group' const AddGroups = (props) => { const [groupName, setGroupName] = useState(''); return( <div className = "grouplist_group grouplist_newGroup"> <div> <span>그룹 이름: </span> <input type = 'text' onChange =...
import React, { Component } from 'react'; import { Link, NavLink, Route, Switch } from 'react-router-dom'; class App extends Component { render() { return ( <div id='container'> <header><NavLink exact to='/'>Home</NavLink></header> <Menu/> <sectio...
/** * Javascript for CommPlan */ // Validation function entryValidate() { var errMsg = ''; if ($('#frmNoOfDays').val() == "") { errMsg = "\t" + '{lang_invalid_quantity_client_quota}'; $('#frmNoOfDays').focus(); } if (errMsg == '') { return true; } alert('{lang_correct_the_following}' + "\n\n" + e...
import React, { Component } from "react"; import { withStyles } from "@material-ui/core/styles"; import Input from "@material-ui/core/Input"; import InputLabel from "@material-ui/core/InputLabel"; import MenuItem from "@material-ui/core/MenuItem"; import FormHelperText from "@material-ui/core/FormHelperText"; import Fo...
let app = getApp(); let baseUrl = app.globalData.baseUrl; const utils = require('../../utils/util.js') const regeneratorRuntime = require('../../lib/runtime') var page = 1; Page({ data: { unsure:'未确认', showAlert:false, statuIndex:null, deductIndex:0, deducted:1, statuId:'', deduct:[ ...
export const UPDATE_SPOTIFY_LOGIN = 'UPDATE_SPOTIFY_LOGIN' export const LOGOUT_SPOTIFY = 'LOGOUT_SPOTIFY' const API_ENDPOINT = 'https://api.spotify.com/v1' export const updateSpotify = (accessToken, expirationDate) => { return { type: UPDATE_SPOTIFY_LOGIN, accessToken, expirationDate } } ...
describe('P.models.workouts.Session', function() { "use strict"; var Model = P.models.workouts.Session; describe('initialize()', function() { it("should construct exercises collection from sets attr", function() { var sets = [{ exercise: "Snatch", sets: [{ reps: 5 }] ...
import React from 'react' import {View} from 'react-native' import {createMaterialBottomTabNavigator} from 'react-navigation-material-bottom-tabs' import {SYSTEM_ROUTES} from "../constants"; import {TabBarIcon} from "../components"; import {InformPetNavigator} from "./InformPetNavigator"; import {HelpPetNavigator} from...
function diplayWindChill() { let temp = document.getElementById("hdnHighTemp").value; let windspeed = document.getElementById("hdnWindspeed").value; let windchill = "N/A"; if (temp <= 50 && windspeed > 3) { windchill = calcWindChill(temp, windspeed) + " &#8457;"; } document.getElementByI...
import nodeForge from 'node-forge'; import crypto from 'crypto'; import project from '~/config/project'; import defaultAvatar from '~/assets/images/default-avatar.jpg'; import docFile from '~/assets/images/doc-file-format-symbol-black.svg'; import docxFile from '~/assets/images/docx-file-format-black.svg'; import xlsFi...
import {put, takeLatest} from 'redux-saga/effects'; import {AUTH_REQUEST} from "../types"; import {authFailure, authSuccess} from "../actions"; function* authSagaWorker (action) { try { // const response = yield axios.post('http://localhost:3001/users', { // login: action.payload.login, // password: ...
// group shipments based on the carrier. // this is done only once when fetching data // and make rest of calculation easier export const _groupShipments = (arr, groupBy) => { return arr.reduce((acc, cur) => { let prop = cur[groupBy]; if (!Object.prototype.hasOwnProperty.call(acc, prop)) { acc[prop] = ...
export const htmlReference = { fButton: 'f-btn', cButton: 'c-btn', dropdownToggle: '.dropdown-toggle', searchInput: 'search-input', searchButton: 'search-button', langEN: 'lang-EN', langRU: 'lang-RU', imageButton: 'image-btn', speechButton: 'speech-button', }; export const cssRefere...
export * from './sw.generator';
/* Manejo del DOM */ //llamamos a la data, quedandonos un array de objetos const allPokemon = window.POKEMON.pokemon; // verificar nuestra data //console.log(allPokemon); // creamos nuestra funcion para crear cada caja contenedora de pokemons function cardCreation(allPokemon) { //recorremos esa data para cada elem...
'use strict'; let itemWrap = document.getElementById('itemWrap'); //Check the viewed goods function checkViewed() { if( localStorage.getItem('viewed') ) { viewedId = localStorage.getItem('viewed'); } } //Show viewed item on the page function showViewdItem() { let viewedItem; for(let i = 0; i < window.ca...
import { storiesOf } from '@storybook/vue' import { CSSReset, Progress as KProgress, Stack, Box } from '..' storiesOf('UI | Progress', module) .addDecorator(story => ({ components: { CSSReset, Box, story: story() }, template: ` <Box w="full" maxWidth="400px" mx="auto" mt="8" p="3"> <CSSReset></...