text
stringlengths
7
3.69M
var myApp = angular.module('Blogze', ['ui.router']); myApp.config([ '$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) { // $locationProvider.html5Mode({ // enabled: true, // requireBase: false // }); $stateProvider.state('home...
function randomNumber(min, max) { return Math.random() * (max - min) + min; } function fakecollision(x, y, rad) { this.radius = rad this.movable = false this.x = x this.y = y }; fakecollision.prototype = { }; module.exports = fakecollision;
const lodash = require('lodash'); console.log(lodash.chunk([1,2,3,4,5,6,7,8,9,0], 5));
/* eslint-disable complexity */ 'use strict'; const fs = require('fs'); const iniparser = require('iniparser'); const moment = require('moment-timezone'); const trim = require('lodash/trim'); const yaml = require('js-yaml'); const format = require('./format'); const dest = require('./dest'); const fileStat = require('...
'use strict'; angular.module('launch').factory('Leads', ['$resource', function ($resource) { return $resource('leads/:leadId', { leadId: '@_id' }, { update: { method: 'PUT' } }); } ]);
// Given a string, find out if its characters can be rearranged to form a palindrome. function palindromeRearranging(str) { /* with 0(n) complexity var count_letter={}; var letter; var count=0; for (var i=0;i<str.length;i++){ letter=str[i]; count_letter[letter]=count_letter[letter]||0...
// import React, { useContext, useEffect, useState } from 'react'; // import axios from 'axios'; // import { // CHANGE_FIELD, // INITAILIZE_FORM, // REGISTER_FAIL, // REGISTER_SUCCESS, // } from '../../contexts/auth'; // import { Auth } from '../../contexts/store'; // import Register from '../../components/auth...
import React, { Component } from "react"; import { AppRegistry, View, Text, StyleSheet, TextInput, ScrollView } from "react-native"; import { Container, Content, Card, CardItem, Body } from "native-base"; import { TouchableOpacity } from "react-native-gesture-handler"; import { Rating } from "react-native...
const Song = ({ currentSong, isPlaying }) => { return ( <div className="song-container"> <img src={currentSong.cover} className={`music-image ${isPlaying? 'playing': ''}`} alt={`${currentSong.name} Cover art`} /> <h1>{currentSong.name}</h1> <h3>{currentSong.artist}</h3> </div> ); }; expor...
const { default: axios } = require("axios") const postMessage = async (message) => { return axios.post('/messages' , message) } module.exports = { postMessage }
exports.CodingChallenge = ` type CodingChallenge { title: String! description: String! startingFunctionText: String! returnValue: String! functionName: String! functionParams: String! addedFunctionParams: String! } `;
import { EventHandler } from '../../core/event-handler.js'; /** * Store, access and delete instances of the various ComponentSystems. */ class ComponentSystemRegistry extends EventHandler { /** * Gets the {@link AnimComponentSystem} from the registry. * * @type {import('./anim/system.js').AnimComp...
import React from 'react'; import Marker from './Marker' import MarkerData from './MarkerData' const Destination = () => { return ( <React.Fragment> <section className="destinations" style = {{ background: 'url(/images/destinations-background.png)' }} > <div className="desti...
/* * Copyright (C) 2021 Radix IoT LLC. All rights reserved. */ /** * @ngdoc directive * @name ngMango.directive:maPointEventDetector * @restrict 'E' * @scope * * @description Retrieves data point event detectors, or creates new ones. You can then use a separate input to modify the * detector properties (e...
import React, {PureComponent} from 'react'; import { ActivityIndicator, Dimensions, FlatList, Image, ScrollView, StatusBar, Text, TouchableOpacity, View } from "react-native"; import {Default_Photos} from "../style/BaseContant"; import { BackgroundColorLight, BaseStyles, BlackTextColor, MainBg, MainColor, T...
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {Breadcrumb, Icon} from 'antd'; import Link from '../page-link'; import './style.less'; const Item = Breadcrumb.Item; export default class BreadcrumbComponent extends Component { static propTypes = { dataSource: PropTypes.a...
import React from "react" import { Link } from "gatsby" import Layout from "../components/layout" function About() { return ( <Layout> <h1>About page I'm Alex Nielsen</h1> <p>A web developer in Northern NJ</p> <p> <Link to="/contact">Contact me</Link> </p> </Layout> ) } expo...
import React from 'react'; import { FaStar, FaStarHalfAlt, FaRegStar} from "react-icons/fa"; function Rating(props) { const {rating, numReviews} = props; return ( <div className="rating"> { rating >= 1 ? <span><i><FaStar /></i></span> : rating >= 0.5 ? <span><i><FaStarHalfAl...
'use strict' const log = require('../../../dd-trace/src/log') class Sqs { generateTags (params, operation, response) { const tags = {} if (!params || (!params.QueueName && !params.QueueUrl)) return tags return Object.assign(tags, { 'resource.name': `${operation} ${params.QueueName || params.Queu...
import angular from 'angular'; let Constants = angular .module('app.constants', []) .constant('DEFAULT_STATE', 'app') .constant('DEFAULT_STATE_NO_FTD', 'app.deposit') .constant('AUTHENTICATION_STATE', 'authentication.login') .constant('NOT_FOUND_STATE', 'misc.page-not-found'); export default Constants;
'use strict'; module.exports = function(Dosagemeasurement) { };
const container = document.querySelector('.container') const UNSPLASH_URL = 'https://source.unsplash.com/random/' const rows = 10 const getRandomNumber = () => { return Math.floor(Math.random() * 10) + 300 } for (let i = 0; i < rows * 3; i++) { const img = document.createElement('img') img.src = `${UNSPLASH_UR...
import { createUser, saveUserChange, changeUserName, resetUserWeigths, } from './utils'; import drawChart from './drawChart'; import { LOCALE } from './const'; let lang = 'RU'; window.onload = function work() { const { HELLO, TITLE, CHANGE_NAME, RESET_WEIGHT, SEND_WEIGHT, WEIGHT_ADDE...
import React from "react"; import PropTypes from "prop-types"; import clsx from "clsx"; import { makeStyles } from "@material-ui/styles"; import { Typography, Link } from "@material-ui/core"; const useStyles = makeStyles((theme) => ({ root: { padding: theme.spacing(4), }, })); let currentYear = new Date().get...
import axios from "axios"; import * as SecureStore from "expo-secure-store"; import jwt_decode from "jwt-decode"; async function getValueStore(key) { return await SecureStore.getItemAsync(key); } async function setValueStore(key, value) { await SecureStore.setItemAsync(key, value); } export const Auth = { sign...
module.exports = function($interval) { return { restrict : 'E', templateUrl : 'themes/fullsite/assets/js/directives/carousel/sdCarousel-template.html', link : function(scope, element, attrs) { var carouselItems = require('../../json/carouselItems.json'); var category = attrs.category; va...
import React, { Component } from 'react'; import { View, Text, TextInput, Form } from 'react-native'; import { FormLabel, FormInput, FormValidationMessage, Button } from 'react-native-elements'; class SignInScreen extends Component { render() { return ( <View> <FormLabel>Username</FormLabel> ...
function get_content() { $.getScript(media_url+'js/aux/modals.js', function(){ $.getScript(media_url+'js/aux/journeys.js', function(){ $.getScript(media_url+'js/aux/date.js', function(){ $.getScript(media_url+'js/lib/jquery.keypad.min.js', function(){ $.getScript(media_url+'js/lib/jquery.keypad-...
import tw from 'tailwind-styled-components' /** Div which contains Logo svg */ export const UserDropdownParent = tw.div` h-full relative w-40 `
import React from 'react'; import Container from '../button/container'; import Title from './title'; import Background from '../../images/bubbles.png'; const HowItWorks = props => ( <div style={{backgroundImage: "url(" + Background + ")", backgroundSize: 'cover', width: '100%', height: '750px'}}> <Title classNa...
import React, { Component } from 'react'; class CardTemplate extends Component { render() { return ( <div className="uk-grid uk-margin"> <div className="uk-width-1-3"></div> <div className="uk-width-1-3"> <div className="uk-card uk-card-default uk-card-body"> {this.pro...
$(document).ready(function () { $('#expires').blur(function () { let date = new Date($(this).val()); $('#commentsban-expires').val(date.getTime()/1000); //console.log(date.getTime()); }) })
import eventsEngine from '../events/core/events_engine'; import { removeData, data as elementData } from '../core/element_data'; import Class from '../core/class'; import devices from '../core/devices'; import registerEvent from './core/event_registrator'; import { addNamespace, isTouchEvent, fireEvent } from './utils/...
//app.js App({ //启动后执行 onLaunch: function () { // 展示本地存储能力 var logs = wx.getStorageSync('logs') || [] logs.unshift(Date.now()) wx.setStorageSync('logs', logs) // 登录 wx.login({ success: res => { // 发送 res.code 到后台换取 openId, sessionKey, unionId } }) // 获取用户信息 w...
var teclado={}; // Con esta funcion dejamos definidos los eventos de teclado que usaremos para los disparos y mover nuestra nave. function agregareventoteclado(){ agregarEvento(document,"keydown",function(e){ teclado[e.keyCode]=true; }); agregarEvento(document,"keyup",function(e){ teclado[e.keyCode]=f...
import React, { useState } from "react"; import { SearchBar } from "react-native-elements"; import * as WebBrowser from "expo-web-browser"; function SearchBarComponent(props) { let directionsTo = props.location.split(" ").map(elem => { return elem.replace(",", ""); }); directionsTo = directionsTo.join("+"); ...
/** * Created by hao.cheng on 2017/5/7. */ import React from 'react'; import img from '../style/imgs/404.png'; import img404 from '../style/imgs/404img.jpg' const style = { backgroundImage: 'url(' + img404 + ')', backgroundRepeat: 'no-repeat', backgroundSize: '100% 100%', backgroundAttachmen...
// On créer un élément avec React // @param1: nom du tag // @param2: options // @param3: enfant(s) text ou autre élément React const title = React.createElement('h1', {}, 'Hello world'); // React envoie un objet javascript avec des propriétés // par exemple props, type, ... // checker ce que renvoie le console.log con...
var connection = require("./connection.js"); // Object Relational Mapper (ORM) // The ?? signs are for swapping out table or column names // The ? signs are for swapping out other values // These help avoid SQL injection // https://en.wikipedia.org/wiki/SQL_injection var orm = { selectAll: function () { v...
// pages/balance/rechargeDetail/index.js const app = getApp(); const config = require("../../../utils/config.js"); Page({ /** * 页面的初始数据 */ data: { height: null, typeList: [ "全部", "支出", "收入" ], currentType: 0, balanceValue: 122.5, dateTags: [ "当月", "3个月"...
import React, { useState } from 'react' import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom'; import 'bootstrap/dist/css/bootstrap.min.css'; import Form from './form'; import Menu from './class'; import UserDets from './Add'; import Edit from './edit'; import NewsLink from './linkingnewspage...
import React from 'react'; import {Tabs, Tab} from 'material-ui/Tabs'; import SwipeableViews from 'react-swipeable-views'; import Scroll from 'react-scroll'; import PhotosIndexContainer from '../photos/photos_index_container.js'; import SeascapeContainer from '../tabs/seascape_container.js'; import OtherContainer from ...
module.exports = { pluginOptions: { i18n: { locale: "pl", fallbackLocale: "en", localeDir: "locales", enableInSFC: true } }, pwa: { name: "Equipment Manager" } };
import React from 'react' import god from '../../images/paintings/god.jpg' import PaintingsComponent from "../../components/paintings_component"; const God = () => ( <PaintingsComponent image={god} title={'God'}> <center> <iframe width="90%" height="300" scrolling="no" frameBorder="no" allow="a...
BenchForm = React.createClass({ createBench: function(event){ event.preventDefault(); var lat = event.target[0].value; var lng = event.target[1].value; var desc = event.target[2].value; var seating = event.target[3].value; ApiUtil.createBench({bench: {lat: lat, lng: lng, description: desc, seating: sea...
import wxUtil from '../../utils/wxUtil' import * as Api from '../api' Page({ data: { isLoaded: false, basic: {}, educations: [], works: [], }, onLoad() { this.loadAllInfo() }, onShow() { const app = getApp() app.checkNotice('editedBasic', true, this.updateBasic) app.checkNotic...
var React = require("react"); var Main = (props) => { return ( <div> <h1>Main Render</h1> </div> ); }; module.exports = Main;
var srt = "Alex"; var toExchange = 'x'; var exchange = 'z' function toExchangeFor (toExchange, exchange, srt) { var result=""; for(var i = 0; i < srt.length; i++) { //c = str.charAt(i)// pour garder la lettre if (toExchange == srt.charAt(i)) { result = result + exchange } else { result = result +...
import Axios from "axios"; export const postAction = () => async (dispatch, getState) => { dispatch({ type: "POST_REQ_SEND" }); const token = localStorage.getItem("token"); if (token) Axios.defaults.headers.common["Authorization"] = `Bearer ${token}`; try { const { data } = await Axios.get( "https:/...
var path = require('path'); var fs = require('fs'); //post var formidable = require('formidable'); var dateFormat = require('dateformat'); module.exports = { /**通过formdata上传图片 * 参数1,express请求 * 参数2,静态资源下的路径 * 参数3,回调函数,callback(err,fields,uploadPath),返回错误对象,表单字段和新地址 */ uploadPhoto : functio...
const constant = { title: "한글 초성 검색", showMore: "더보기", searchInputPlaceHolder: "Search...", dataInputPlaceHolder: "데이터 추가하기 (Enter)", }; export default constant;
const express = require("express"); const router = express.Router(); const meals = require("./../data/meals.json"); router.get("/:id", async (request, response) => { console.log(meals); try { const mealId = parseInt(request.params.id); if (isNaN(mealId)) { response.status(400).json({ error: "Id mus...
// все просто! записываем в localStorage бибу) localStorage.setItem('biba', 'biba') // а тут получаем)) console.log(localStorage.getItem('biba'));
import React from 'react'; import axios from 'axios'; import { Button, Form } from 'semantic-ui-react' function UserForm() { const [formState, setFormState] = React.useState({ name: '', age: '', salary: '', hobby: '', }); const changeHandler = (e) => { console.log('e.target.name', e.target.n...
// Libraries import React from 'react'; import ReactDOM from 'react-dom'; import { ThemeProvider } from 'styled-components'; // Components | Utils import UserContextProvider from './contexts/UserContext'; import App from './App'; // Assets import './index.scss'; import { theme } from './globalStyles'; /* eslint-disabl...
import { createAction } from "redux-actions"; export const CREATE_USER = "CREATE_USER"; export const createUser = createAction(CREATE_USER); export const CREATE_USER_SUCCESS = "CREATE_USER_SUCCESS"; export const createUserSuccess = createAction(CREATE_USER_SUCCESS); export const CREATE_USER_FAILED = "CREATE_USER_FAI...
var x=8 % 2 var y=30 % 10 console.log(x) console.log(y)
import test from 'tape' import {h} from 'hastscript' import {toHtml} from '../index.js' test('`option` (closing)', (t) => { t.deepEqual( toHtml(h('option'), {omitOptionalTags: true}), '<option>', 'should omit tag without parent' ) t.deepEqual( toHtml(h('select', h('option')), {omitOptionalTags: ...
import React from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; import { Title, CategoriasButton, TextList, BackgroundApp } from './styled'; export default function Categorias() { return ( <BackgroundApp> <View> <Title>Categorias</Title> </Vi...
import models from "./../../models/index.js"; import { tools } from "./../../../tools/index.js"; import obj from "lodash"; export const resolvers = { Query: { getAllrecipes: async () => { return await models.Recipes.find(); }, }, Mutation: { addRecipe: async (_, { patient, doctor, treatment }) ...
for (let i = 0; i < 1; i++) { console.log('Hello There!') }
/** * Created by Adam on 2016-03-24. */ (function (){ "use strict"; angular.module('blog') .controller('Home', Home); function Home($scope, $http, $timeout, $routeParams, $route, $rootScope, $location){ var home = this; home.restoreSession = fun...
var Util = require('../util'); var Base = require('../base'); /** * a snap plugin for xscroll,wich support vertical and horizontal snap. * @constructor * @param {object} cfg * @param {number} cfg.snapColIndex initial col index * @param {number} cfg.snapRowIndex initial row ...
import React, { useState, useContext } from "react"; import AccountCircleIcon from "@material-ui/icons/AccountCircle"; import { Link, NavLink } from "react-router-dom"; import { useHistory } from "react-router"; import { AuthContext } from "../../Context/AuthContext"; import "./Navbar.css"; export default function Nav...
import React from 'react'; import RadioInput from './RadioInput'; const SelectVehicle = ({ legend, vehicles, selectedPlanet, selectedVehicle, onChangeVehicle, }) => { const formatLabelText = (vehicle) => { return `${vehicle.name} (${ selectedVehicle ? selectedVehicle.name === vehicle.name...
console.log("hello console"); let cartIterate = document.querySelector(".cartIterate"); console.log(cartIterate); let itemObj; let cart = localStorage.getItem("cart"); if (cart == null) { itemObj = []; } else if (cart == "[]") { cartIterate.innerHTML = "<h1 style=color:red; > No Item in Cart </h1>"; } else { it...
var readline = require('readline'); var utility = require('../Utility/utility.js'); var read = readline.createInterface({ input : process.stdin, output : process.stdout }); function quadratic() { read.question("Enter the value of a :", function(a){ read.question("Enter the value of b :", function(...
import React from 'react'; var URLnetowrk = 'http://www.thevirtualpt.com:8080/pt_server/'; export default URLnetowrk;
import Vue from 'vue'; import Router from 'vue-router'; import Profile from './views/Profile.vue'; import Login from './views/auth/Login.vue'; import Register from './views/auth/Register.vue'; import Notifications from './views/Notifications.vue'; import NotificationTemplates from './views/notifications/Templates.vue';...
export default { 'types': { currentlyReading: { id: "currentlyReading", label: "Currently Reading", }, wantToRead: { id: "wantToRead", label: "Want to Read", }, read: { id: "read", label: "Reading", ...
import React, { Component } from 'react' import logo from './logo.svg' import './App.css' import { Dialog, Button, Intent, Popover } from '@blueprintjs/core' class DialogTest extends React.Component { state = { isOpen: true } toggleDialog = () => this.setState({ isOpen: !this.state.isOpen }) ...
'use strict'; (function (){ angular .module("BookApp") .controller("AdminController",AdminController); function AdminController($scope,UserService){ $scope.selectedUserIndex = null; $scope.updateUser = updateUser; $scope.deleteUser = deleteUser; $scope.selectUs...
define(['knockout', 'jquery'], function (ko, $) { var messageBoxViewModel = { Icon: ko.observable(''), Message: ko.observable(''), Type: ko.observable('hidden'), ShowSuccess: function(message) { this.Type("alert-success"); this.Icon("glyphicon-ok"); ...
tunings = { "2": [ {"notes": ['e','a'], "name": "Standard"}, {"notes": ['d','a'], "name": "Drop D"}, {"notes": ['eb','ab'], "name": "1/2 Step Down"}, {"notes": ['db','ab'], "name": "1/2 Step Drop Db"} ], "3": [ {"notes": ['e','a','d'], "name": "Standard"}, {"notes": ['d','a','d'], "name": "Drop D"}, ...
import setupHtmlToAmp from 'html-to-amp'; const htmlToAmp = setupHtmlToAmp(); const html = ` <p>beep booop</p> // if width and/or height is missing of an image the width & height will be // read from the image (since width & height is required in AMP) <img src="http://example.com/image.jpg" /> // youtube, ...
const fs = require('fs'); const request = require("supertest"); const app = require("../src/backend/app"); const knex = require("../src/backend/database"); const testConcerts = require('./test_concerts'); const performanceDate = new Date().toISOString().replace('T', ' ').split('.')[0].replace('Z', ''); beforeAll(asyn...
import React from 'react' import Divider from 'material-ui/Divider' import Paper from 'material-ui/Paper' // components import Table from '../../components/table/Table' // styles import baseStyles from '../../base/base.scss' const SideBarContainer = () => { return ( <Paper className={baseStyles.container} zDept...
import React, { Component } from 'react'; import './student-form.scss'; export default class StudentForm extends Component { state = { id: null, firstName: '', lastName: '', dofb: '', grade: '', isEditMode: false } updateState({id, firstName, lastName...
export default { name: 'BookCard', props: { book: {type: Object}, // component book }, data () { return { selectQuantity : false, // shows a modal to choose the number of books to add quantity : 1, // variable that collects the number of books to add...
/* The input will be a​ single string. Find all​ special words ​starting with #​. Word is invalid if it has ​anything ​other​ ​than​ letters​. Print the words you found without the tag each on a new line. 1. Solve it your way first! 2. Create new array variable and .split(" ") into an array. 3. Create another new a...
/*! * siphash.js - siphash for bcoin * Copyright (c) 2017, Christopher Jeffrey (MIT License). */ 'use strict'; module.exports = require('./js/siphash');
/* USAGE */ /* // Doesn't handle errors get5minuteCandleSticks(1499990400000, 1516460405000, 'BTCUSDT').then((candlesticks) => { console.log(candlesticks) }) */ import binance from 'node-binance-api' // binance.options({ // 'APIKEY': process.env.BINANCEAPIKEY, // 'APISECRET': process.env.BINANCEAPISECRET, //...
import styled from 'styled-components'; export default styled.button` background-color: white; border-radius: 4px; border: 2px solid #ef4136; margin-top: 10px; padding: 10px 5px; color: #ef4136; width: 100%; font-weight: bold; `
const { DataSource } = require('apollo-datasource'); const { Responses } = require('../utils/responses'); class Library extends DataSource { initialize(config) { this.db = config.context.db; } async findById(id) { const result = await this.db.Library.findByPk(id); return result; } async create...
import React from 'react'; import {SingleDayComponent} from "./SingleDayComponent"; import './styles/FiveDayComponent.css' export const FiveDayComponent = ({fiveDayData}) => { return ( <div className="five-day"> {fiveDayData.map((day, index) => { return <SingleDayComponent ...
angular.module('dataCoffee').controller('editCategoria', editCategoria); editCategoria.$inject = ['$scope', '$http', '$routeParams', '$rootScope', '$location']; function editCategoria($scope, $http, $routeParams, $rootScope, $location) { $scope.reset = function (){ $scope.name = ''; } $scope.salv...
window.onload = function(){ createAutocomplete(); } function createAutocomplete(){ var input = document.querySelector('.container > .wrapper > input'), svg = document.querySelector(".container > .wrapper > .icon-select"); svg .style.display = "none"; svg.addEventListener("click", clear); input.addEventListener...
// load q promise library var q = require("q"); module.exports = function(db, mongoose) { // load review schema var ReviewSchema = require("./review.schema.server.js")(mongoose); // create book model from schema var ReviewModel = mongoose.model('ReviewModel', ReviewSchema); var api = { ...
import { hasFlag, countries } from '../index' describe('exports/core', () => { it('should export ES6', () => { hasFlag.should.be.a('function') countries.includes('RU').should.equal(true) }) it('should export CommonJS', () => { const Library = require('../index.commonjs') Library.hasFlag.should.be.a('func...
const api = { key: "c405b7757602550ec70ff322cd5812dc", baseurl: "https://api.openweathermap.org/data/2.5/", }; const searchBox = document.querySelector(".form-control"); const body = document.querySelector("body"); const forecast = document.querySelector(".forecast"); const footer = document.querySelector("footer"...
//Basic server setup that includes sessions and massive //run npm install --save express body-parser express-session dotenv cors massive const express = require('express'); const bodyParser = require('body-parser'); const session = require('express-session'); require('dotenv').config(); const cors = require('cors');//...
const Sequelize = require("sequelize"); const DbConnection = require('./db-connection'); const dbHost = process.env.DB_HOST; const dbPort = process.env.DB_PORT; const dbName = process.env.DB_NAME; const dbUser = process.env.DB_USER; const dbPass = process.env.DB_PASSWORD; const _connectDB = () => { re...
import React from "react"; import { BrowserRouter as Router, Route, Link, Redirect, withRouter } from "react-router-dom"; const fakeAuth = { isLogin: false, authenticate(fn) { this.isLogin = true; setTimeout(fn, 100)// fake async }, signout(fn) { this...
"use strict"; var requireShared = require.main.exports.requireShared; const modPath = require("path"), modUrl = require("url"); const modUtils = requireShared("utils"); exports.init = function (config) { require.main.exports.registerService("res", new Service(config)); }; function Service(c...
import React from 'react'; import { Text, Image, TouchableOpacity, View, StyleSheet, } from 'react-native'; import { colors, fonts, globalStyles } from '../styles/gobalStyles' //accpets a climber object that contains name, pic, totalPoints, and totalFeet export function ClimberWidget( { climber }) { const activeClim...
/** * Draws a line based on a single action. */ export default (ctx, action) => { // Start line ctx.beginPath(); ctx.lineCap = action.brushType; ctx.lineWidth = action.brushSize; ctx.strokeStyle = action.color; // Plot every movement of the line for (let i = 1; i < action.path.length; i++...
const express = require("express"); const router = express.Router(); const { addOrderController, allOrderController, getUserOrders, updateStatus, pendingOrderController, updateFeedbackController, updateRefundController, } = require("../controllers/order"); const { authenticated } = require("../middlewares...
const superagent = require("superagent"); //发送网络请求获取DOM const cheerio = require("cheerio"); //能够像Jquery一样方便获取DOM节点 const nodemailer = require("nodemailer"); //发送邮件的node插件 const ejs = require("ejs"); //ejs模版引擎 const fs = require("fs"); //文件读写 const path = require("path"); //路径配置 const schedule = require("node-schedule")...
let clicked = null; // let comments = []; comments = localStorage.getItem('comments') ? JSON.parse(localStorage.getItem('comments')) : []; setComment(); function toggleMenu() { console.log(document.getElementById("primaryNav").classList); document.getElementById("primaryNav").classList.toggle("hide"); }; ...
import styled from "styled-components"; import Footer from "../Footer/Footer"; import Header from "../Header/Header"; import Container from "../shared/Container"; import { FaCheck } from "react-icons/fa" import UserContext from "../../contexts/UserContext"; import HabitsContext from "../../contexts/HabitsContext"; imp...