text
stringlengths
7
3.69M
import Color from 'color'; import { pick } from 'lodash'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import IconButton from 'material-ui/IconButton'; import SvgIcon from 'material-ui/SvgIcon'; import TextField from 'material-ui/TextField'; import Toggle from 'material-ui/T...
import React, { useState } from "react"; import { Link } from "react-router-dom"; // import "../index.css"; import { AiTwotoneHome, AiOutlineSearch } from "react-icons/ai"; import { FcAbout, FcAdvertising } from "react-icons/fc"; import { MdPermContactCalendar } from "react-icons/md"; import { RiMenu4Line } from "react...
function setupPageJump(){ const VID = "JUMP_PAGE"; const TYPE_TOP = "▲"; const TYPE_BOTTOM = "▼"; if(!document.querySelector(VID)){ addDiv(TYPE_TOP); addDiv(TYPE_BOTTOM); } function addDiv(type){ var div = document.createElement("div"); div.className = VID; ...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var OfferSchema = Schema({ shop_id: {type: String, required: true}, name: {type: String, required: true}, description: String, image: String, price: {type: Number, required: true, default: 0}, until: {type: Date, required: true}, ...
import View from 'famous-creative/display/View'; const Curves = FamousPlatform.transitions.Curves; export class Card extends View { constructor(node, options) { super(node, options); this.model = options.model; let perspective = 600; let zTransform = this.model.i * 350...
import React, {useState} from "react"; import './hamburger.css'; function Hamburger() { const [isActive, setIsActive] = useState(false) function handleActive() { setIsActive(!isActive) } // const { active, loading } = this.props; return ( <div className="ham" onClick={() => handleActive()} ...
(function() { 'use strict'; angular .module('iconlabApp') .config(stateConfig); stateConfig.$inject = ['$stateProvider']; function stateConfig($stateProvider) { $stateProvider .state('tache', { parent: 'entity', url: '/tache?page&sort&search', ...
function grid2D(){ this.x = 0; this.y = 0; this.w = 0; this.h = 0; this.bAX = 0; this.bAY = 0; this.fC = ""; this.sC = ""; this.lW = ""; this.render = function(x, y, w, h, bAX, bAY, fC, sC, lW, ctx){ var bSIX = w / bAX; var bSIY = h / bAY; ctx.fillStyle = fC; ctx.strokeStyle = sC; ctx.lineWidth ...
const FuncToken = artifacts.require('./FuncToken.sol') const Test = artifacts.require('Test.sol') module.exports = function(deployer) { deployer.deploy(FuncToken) deployer.deploy(Test) }
import api from "../../config/api"; export const getSearch = (query) => { return async (dispatch) => { dispatch({ type: "SEARCH_LOADING" }); try { const { data, status } = await api.search(query); if (status > 199 && status < 300) { dispatch({ type: "SEARCH_SUCCESS", data }); } ...
Ext.define('InvoiceApp.view.Main', { extend: 'Ext.tab.Panel', xtype: 'main', requires: [ 'InvoiceApp.view.Invoices', 'InvoiceApp.controller.Main', 'Ext.data.proxy.JsonP' ], config: { tabBarPosition: 'bottom', items: [ { ...
const mongoose = require('mongoose') const FeedbackSchema = new mongoose.Schema({ email: { type: String, required: true, trim: true }, actionId: { type: mongoose.Schema.Types.ObjectId, ref: 'Action', required: true }, like: { type: Boolean, default: true }, participation: { type: Boolean }, createdAt: { type...
import React, { useEffect } from 'react'; import { connect } from 'dva'; import { Layout, Form, Input, Button, Select, InputNumber, DatePicker } from 'antd'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import "./addTest.scss" const { Content } = Layout; const { Option } = Select; // const { MonthPicker, Ran...
import React from 'react'; import {List, ListItem} from 'material-ui/List'; import MdIconStarBorder from 'material-ui/svg-icons/toggle/star-border'; import MdIconStar from 'material-ui/svg-icons/toggle/star'; import MdIconSupervisorAccount from 'material-ui/svg-icons/action/supervisor-account'; import MdIconBook from '...
const EventEmitter = require('events'); var url ='http://mylogger.io/log'; class Logger extends EventEmitter{ log(message) { console.log(message); this.emit('messageLogged', {id:1, url:'http://'}); } } module.exports=Logger; //module.exports.endPoint=url;
// GENERATED CODE -- DO NOT EDIT! 'use strict'; var grpc = require('@grpc/grpc-js'); var nifi_pb = require('./nifi_pb.js'); function serialize_org_apache_nifi_processors_grpc_FlowFileReply(arg) { if (!(arg instanceof nifi_pb.FlowFileReply)) { throw new Error('Expected argument of type org.apache.nifi.processors...
import React, { useContext } from 'react'; import {Container, Row,Col} from 'react-bootstrap' import logo from '../../Image/logo.svg' import { Link } from "react-router-dom"; import { FaAlignRight ,FaSearchLocation} from "react-icons/fa"; import './MenuArea.css' import { UserContext } from '../../App'; const MenuArea =...
import Jsonp from 'js/jsonp' import {ERR_OK,recommendParams} from './config' export const getSongs = (mid) => { const url = 'https://c.y.qq.com/v8/fcg-bin/fcg_v8_singer_track_cp.fcg'; const data = Object.assign({},recommendParams,{ g_tk: 1928093487, hostUin: 0, needNewCode: 0, p...
const cases = [ ]; class ShareCaseData { AddCaseShareData(caseid, sharedWith, tobeShared, tobeRemoved) { let caseData = this.getCaseWithId(caseid); if (caseData !== null) { // caseData.sharedWith = sharedWith; // caseData.markedForShare = tobeShared; // c...
/******************************************* * This script is the initialisation of the main FINT user interface. * Each tab needs to be initialised and then renewed each time it is focused/activated * The tabs are initialised when the script first runs * The functions in the object activateFunctions provide activa...
import React from 'react' import Controller from "./Controller"; function BreakIncrement(props) { const{handleClick}=props; return ( <div> <Controller id="break-increment" handleClick={handleClick} arrow="Up" /> </div> ) } export default BreakIncrement
import React from "react"; import "./App.css"; import Main from "./components/Main"; import { rootReducer } from "./redux/reducers/index.js"; import { createStore, applyMiddleware, compose } from "redux"; import { Provider } from "react-redux"; import thunk from "redux-thunk"; import { persistReducer } from "redux-per...
import Layout from '../components/wrapper'; import { Container, Grid, Header } from 'semantic-ui-react'; import Contests from '../components/contests'; import factory from '../../ethereum/factory'; class Index extends React.Component { static async getInitialProps({ req }) { const deployedHotOrNots = awai...
var reportServices = angular.module('SelectCargoService', ['ngResource']); reportServices.factory('SelectCargo', ['$resource', function($resource){ return $resource('/termodva/rest/termo/cargo/', {}, { query: { method: 'GET', isArray: true }, }); }]);
import styled from "styled-components"; export const CaptionText = styled.h1` font-size: 34px; font-weight: bold; color: #000; text-align: center; margin-top: 68px; `;
import axios from 'axios'; import { RECEIVE_LIST, getList, handleChargedListBoolean, CREATE_LIST, handleCreatedListBoolean, handleCreatedListSuccessMessage, DELETE_LIST, handleIsDeletedList, handleUpdateListBool, UPDATE_LIST, handleOpenInputUpdate, clearNameInput, } from 'src/store/reducers/list...
const router = require('express').Router(); const controller = require('./gameController'); router.param('accessCode', controller.params); router.route('/:accessCode') .get(controller.getOne); router.route('/') .post(controller.createGame); router.put('/:accessCode/join', controller.joinGame); router.put('/:ac...
import React from 'react'; import './LoadingIndicator.scss'; const LoadingIndicator = (props) => { return ( <div className="lds-wrapper"> <div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div> </div> ) }; export default LoadingIndicator;
import React from 'react'; import './ContactList.css' import Profile from './Profile' class ContactList extends React.Component { render() { return ( <div id='contacts-list'> <h1> Contacts </h1> <Profile /> <Profile /> <Profile /> ...
/** * @license * Copyright (C) 2009 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 l...
angular.module('myapp') .config(function config ($stateProvider) { $stateProvider.state('common.home', { url: '/home', views: { 'main@common': { controller: 'HomeCtrl', templateUrl: 'pages/home/template.html' ...
// O(2^n) const fibonacci = (n) => (n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2)); // O(n) const memoizedFibonacci = (n) => { const arr = new Array(n); if (n <= 1) { arr[n] = n; return n; } if (!arr[n - 1]) { arr[n - 1] = memoizedFibonacci(n - 1); } if (!arr[n - 2]) { arr[n - 2] = memoizedFibonacci(...
var redis = require('redis'); var client = redis.createClient(6379, '172.21.0.102', null); client.select(0); client.KEYS('*', function(err, result){ console.log(result); for(var a in result){ console.log(a + '--' + result[a]); client.DEL(result[a], function(err, result){ console.log('DEL result: ' + resu...
// JavaScript Function
/* eslint-disable import/no-commonjs */ // pathToWrapper should contains named export - WrapperWidget. WrapperWidget is predefined. // Default export doesnt work module.exports = [// { name: 'Button', pathInRenovationFolder: 'ui/button.j', pathInJSFolder: 'ui/button.js' }, // { name: 'CheckBox', pathInRenovationFolder:...
// import zhLocale from 'element-ui/lib/locale/lang/zh-CN' // const cn = { // message: { // 'hello': '你好,世界', // 'msg': '提示', // } // } // export default cn; const cn= { //登录 login:{ title:'用户登录', placeholder_username:'请输入账户', placeholder_password:'请输入密码', VerificationCode:'请输入验证码'...
const app = require('./app'); const express = require('@feathersjs/express'); const proxyApp = express(); const http = require('http'); proxyApp.use('/api/v1', app); const server = http.createServer(proxyApp); app.setup(server); module.exports = server;
/* eslint-disable import/no-extraneous-dependencies */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { linkTo } from '@storybook/addon-links'; import Home from '../src/home/Home'; import Tweet from '../src/components/Tweets'; import ...
function randomColor() { const ColorKey = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "A", "B", "C", "D", "E", "F"]; var colorHex = "#"; for (var i = 0; i < 6; i++) { const randomKey = Math.floor(Math.random() * 15); colorHex += ColorKey[randomKey]; } return colorHex; } class Circle { constructor({ origin, spee...
// express const express = require('express') const app = express() // mongoose const mongoose = require('mongoose') // handlebars const exphbs = require('express-handlebars') // dateformat const dateFormat = require("dateformat") // body-parser const bodyParser = require('body-parser') // port const PORT = 3000 // rec...
'use strict'; const config = require('config'); const util = require('util'); const banks = require('../banks'); const tools = require('../tools'); const db = require('../db'); const fetchUrl = require('fetch').fetchUrl; module.exports = IPAYServlet; function IPAYServlet(bank, fields, charset) { this.bank = (typ...
(function(){ 'use strict'; angular .module('everycent.transactions.importers') .factory('FcbImporter', FcbImporter); FcbImporter.$inject = ['DateService']; function FcbImporter(DateService){ var service = { convertFromBankFormat: _convertFromFCBankFormat, convertFromCreditCardFormat: _...
const Discord = require('discord.js'); const client = new Discord.Client(); client.once('ready', () => { console.log('joy ♡ is online!'); }); client.login('NDg3MDQ3NTM2OTEwMDA4MzMw.W5BsXQ.PpVgDQcEVkVVO5QrpbqH8FJ98SE');
import React, {useState} from 'react'; import './App.scss'; import Sidebar from "./components/Sidebar"; import Chat from "./components/Chat"; import {Provider} from "react-redux"; import {PersistGate} from "redux-persist/integration/react"; import {store, persistor} from "./store"; import Notification from "./component...
import React from 'react'; import "./ProjectCard.css" import { useState } from 'react'; import { render } from 'react-dom'; import Project from "../Project/Project" /*localStorage.setItem('projects', JSON.stringify([ { projectTitle: "Black Box", projectDeadline: 87, projectTea...
class AppService{ constructor($http){ 'ngInject'; this.http = $http; this.jquerry = $; this.callback; } getXmlAsObject(str){ var xml = this.jquerry.parseXML(str); var json = this.xmlToJson(xml); var json = json.Children[0]; return json; } isPercentValue(strValue){ if(strValue !=...
Function.prototype.inherits = function(superclass) { var Surrogate = function() {}; Surrogate.prototype = superclass.prototype; this.prototype = new Surrogate(); }; function MovingObject () {}; MovingObject.prototype.move = function() { console.log("moving!"); }; function Ship () {} Ship.inherits(MovingObje...
$(function(){ // 获取当前位置 getLocationFun(); /* 微信中不隐去.header */ var ua = window.navigator.userAgent.toLowerCase(); /*if(ua.match(/MicroMessenger/i) == 'micromessenger'){ $(".header").show(); }*/ $(".header .returnBtn").click(function(){ if(ua.match(/MicroMessenger/i)...
import React, { useState, useEffect } from 'react'; import { useParams } from 'react-router-dom' import { useSelector } from 'react-redux'; import { makeStyles } from '@material-ui/core/styles'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@mat...
"use strict"; var core_1 = require('@angular/core'); var FooDirective = (function () { function FooDirective() { } FooDirective.decorators = [ { type: core_1.Directive, args: [{ selector: '[foo]' },] }, ]; /** @nocollapse */ FooDirective.ctorParameters...
import React, { Component } from 'react'; // BackgroundColor import { AnimatedBg, Transition } from 'scroll-background'; // SlideShow import HomeSlideShow from './HomeSlideShow.js'; import "../node_modules/react-image-gallery/styles/css/image-gallery.css"; // Particles import { DawnParticles, NightParticles } from '...
import Html from "../../Html/Html"; import Api from "../../Api/Api"; export default class UnknownBlock { constructor() { this.rootDataURL = Api().getRootURL() + "unknown"; console.log(this.rootDataURL); } renderContent(requestedData) { const main = Html().select(".main"); const content = this.generateConte...
'use strict'; function render_nomenclature(parent = 'render', data) { var div = $('#'+parent); div.empty(); div.append('' + '<div class="table-responsive">\n' + '<table class="table">\n' + '<thead>\n' + '<tr>\n' + '<th>Название</th>\n' + '<th class="text-ri...
import { createUseStyles } from "react-jss"; import sizes from "../utils/breakpoints"; const useStyles = createUseStyles({ main: { width: "80%", margin: "0 auto", paddingTop: "5rem", [sizes.down("laptopSm")]: { width: "90%", }, [sizes.down("mobileLg")]: { width: "100%", }, }...
define([ "dojo/_base/declare", "dojo/date/locale", // locale.format "dojo/date/stamp", // stamp.fromISOString stamp.toISOString "dijit/_CssStateMixin", "dijit/_Widget", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "dijit/form/TimeTextBox", "epi/shell/widget/_ValueRequi...
import React from 'react'; import { View, } from 'react-native'; import { LogoTitle } from '../../../components/header'; import Gallery from 'react-native-image-gallery'; import { FilePicturePath } from '../../../utilities/index'; import Strings from '../../../language/fr'; export class ArchiveGalleryScreen exte...
/* Write a function that accepts a number as a parameter and checks if the number is prime or not. Note: A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. */ "use strict" function primeNum(number){ for(var i = 2; i < number; i++){ if(number...
const express = require("express"); const bodyParser = require("body-parser"); const date = require(__dirname+"/date.js"); const app = express(); let list=[]; app.use(bodyParser.urlencoded({extended:true})); app.use(express.static("public")); app.set('view engine', 'ejs'); app.listen(8080,function(){ console.log("ser...
export default from './OrderTable';
import React from "react"; import { Parallax } from "react-scroll-parallax"; const ParallaxImage1 = () => { return ( <Parallax className="custom-class" y={[-20, 20]}> <img src="https://picsum.photos/420/380" alt="" /> <img src="https://picsum.photos/420/380" alt="" /> <img src="https://picsum.p...
"use strict" import React from 'react'; import {connect} from 'react-redux'; //smart component import {bindActionCreators} from 'redux'; import {Modal, Panel, Well, Row, Col, Button, ButtonGroup, Label} from 'react-bootstrap'; import {deleteCartItem, updateCart, getCart} from '../../actions/cartActions'; class Cart ex...
import caseApi from '@/api/case' import clientApi from '@/api/client' import commonJS from '@/common/common' import candidateForCaseApi from '@/api/candidateForCase' import selectCase from '@/components/main/dialog/selectCase/selectCase.vue' import selectCandidate from '@/components/main/dialog/selectCandidate/selectCa...
import React, { Component } from "react" class File extends Component{ constructor(props){ super(props) this.state = { drag: false, } this.fileUpload = React.createRef(); this.dropRef = React.createRef() } handleDrag = (e) => { e.preventDefault() ...
const { ObjectType } = require('database').models; const updateObjectTypes = require('utilities/operations/objectType/updateTopWobjects'); /** * Make any changes you need to make to the database here */ exports.up = async function up(done) { await updateObjectTypes(true); done(); }; /** * Make any changes that...
import ruleParser from '../utils/ruleParser' describe('ruleParser tests', () => { it('Parses correct file format', () => { try { ruleParser('testData.txt') expect(true).toBe(true) } catch { expect(true).toBe(false) } }) it('Doesn`t parse an incorrect file', () => { try { ...
var Objects = []; var canvas = document.getElementById("main"); canvas.width = 700; canvas.height = 500; canvas.style.width = canvas.width + "px"; canvas.style.height = canvas.height + "px"; var ctx = canvas.getContext('2d'); Game = {}; Game.paused = false; Game.fps = 60; Game.Gravity = 10; Art = {}; KeysDown = { ...
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; import { buildStepDocuments, jsSearchIndex } from '@cucumber/suggest' import { ExpressionFactory, ParameterTypeRegistry } from '@cucumber/cucumber-expressions' import { configure } from '../dist/src/index' (function () { // create div to avoid needing...
/** * * @type {DataTable|Component} */ var dtc = Component.factory('DataTable', 'dtc'); var data = randomData(); dtc.option({ source: { url: '/data.json', dataSrc: 'items' }, useSelectCheckbox: true }); function randomData() { var result = [], ids = _.range(1, _.random(30, 5...
import React from 'react' import 'bootstrap/dist/css/bootstrap.min.css'; import {Link} from "react-router-dom" function NavBar(){ return( <div> <nav className="navbar navbar-dark bg-dark"> <Link class="badge badge-dark" to="/">Home</Link> <Link class="badge badge...
const playlistModel = require("../../models/playlists") const playlistVideoModel = require("../../models/playlistvideos"), dateTime = require('node-datetime'), fieldErrors = require('../../functions/error'), errorCodes = require("../../functions/statusCodes"), constant = require("../../functions/constan...
'use strict'; function authService($rootScope, $http, $q, $localStorage, Constants) { var serviceBase = Constants.AuthenticationService; var authServiceFactory = {}; var _authentication = { isAuth: false, userName: "", firstName: "", lastName: "", token: "" }; ...
class Pong { constructor(mode) { this._mode = mode; this._gameObjects = []; this._scoreP1 = this._scoreP2 = 0; this._speedMultiplier = 1; this._speedIncrement = 0.07; } preload() { this._soundWall = loadSound('assets/wall.wav'); this._soundPaddle ...
import React, { Component } from 'react'; import '../style/1.css'; import{ Link } from "react-router-dom"; import {connect} from "unistore/react"; import {actions} from './store'; import {withRouter} from "react-router-dom"; import {Redirect} from "react-router-dom"; import axios from 'axios'; class ProductDetail ext...
const log = require("metalogger")(); // eslint-disable-line no-unused-vars const _ = require("lodash"); const hutil = require("../hutil"); class SirenPlugin { constructor(message) { if (typeof message !== 'object') { this.doc = JSON.parse(message); } else { this.doc = _.clone(messa...
var mongoose = require('mongoose') var Message = mongoose.model('Message') var Comment = mongoose.model('Comment') module.exports = { show: function(req, res) { Message.find({}, function(err, data) { res.json({posts: data}) }) }, create: function(req, res) { ...
/* Copyright (c) 2010 Mike Desjardins Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
function solve(arr){ let bestNumber = 0; let counter = 1; let bestSequence = 0; for (let i = 0; i < arr.length - 1; i++) { if (arr[i] === arr[i + 1]) { counter++; }else{ counter = 1; } if (counter > bestSequence) { bestSequen...
import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { Route, Switch, Redirect, useParams, useRouteMatch } from 'react-router-dom'; import 'chartjs-plugin-annotation'; import { isEmpty } from 'underscore'; //css import 'assets/css/device-view.css'; // others import ...
fabrikAdminForm = new Class({ Extends: PluginManager, initialize:function(plugins, lang){ this.parent(plugins, lang); this.opts.actions = [{'value':'front','label':Joomla.JText._('COM_FABRIK_FRONT_END')},{'value':'back','label':Joomla.JText._('COM_FABRIK_BACK_END')},{'value':'both','label':Joomla.JText...
import React from "react"; import PropTypes from "prop-types"; import { connect } from "react-redux"; import firebase from "firebase/app"; import "firebase/firestore"; class Users extends React.Component { constructor(props) { super(props); this.state = { users: [] }; this.followButtonClicked ...
const {Command} = require('discord.js-commando'); const low = require('lowdb'); const FileSync = require('lowdb/adapters/FileSync'); const adapter = new FileSync('storage/bot.json'); const db = low(adapter); const trelloYello = require('trello-yello'); const key = require('../../key'); module.exports = class extend...
var gameData = require("gameData"); var confige = require("confige"); var ZhaJinHuaLogic = require("ZhaJinHuaLogic"); cc.Class({ extends: cc.Component, properties: { }, onDestory:function(){ console.log("gameScene onDestory!!!!!!") if(confige.curUsePlatform == 1) jsb.reflec...
const http = require('http'); const net = require('net'); const httpProxy = require('http-proxy'); const proxy = httpProxy.createProxyServer(); let requestCount = 0; const server = http.createServer((req, res) => { const requestToProxy = req; requestToProxy.headers.pprcount = requestCount; requestCount += 1; ...
import {combineReducers} from 'redux'; import { GET_CATPRODUCTOS_SUCCESS, SAVE_CATPRODUCTOS_SUCCESS, DELETE_CATPRODUCTOS_SUCCESS, EDIT_CATPRODUCTOS_SUCCESS} from "../../actions/catalogos/catProductosActions"; function list(state=[], action){ switch(action.type){ case GET_CATPRODUCTOS_SUCCESS: r...
import React, { Component } from 'react'; class Home extends Component { adv = { advOption: [ { id: 1, name: 'http://demo.posthemes.com/pos_organica/layout6/img/cms/cms_6.1.jpg' }, { id: 2, name: 'http://demo.posthemes.com/pos_organica...
/* eslint-env node */ 'use strict'; function randomAmount() { return Math.round(Math.random()*5000); } function randomInt() { return Math.floor(Math.random() * 10); } function randomSuffix() { return new Array(4).fill(true).map(_ => randomInt()).join(''); } function randomDate() { let date = new Date() - (M...
'use strict'; var express = require('express'); var router = express.Router(); var models = require('../models'); var Page = models.Page; var User = models.User; router.get('/', function(req, res, next) { Page.findAll({ attributes: ['title', 'urlTitle'] }) .then(function(foundPage){ res.render('index', { pag...
export class AccorionConstructor { constructor(options) {} }
import React from 'react' import { Card, CardContent, CardMedia, Typography } from '@material-ui/core' import { useGlobalContext } from '../../../context/menu-context' import useStyles from './styles' export default function Category({ image, title }) { const classes = useStyles() const { selectedCategory, ca...
/* * Copyright (C) 2021 Radix IoT LLC. All rights reserved. */ mangoHttpInterceptorFactory.$inject = ['MA_BASE_URL', 'MA_TIMEOUTS', '$q', '$injector']; function mangoHttpInterceptorFactory(mangoBaseUrl, MA_TIMEOUTS, $q, $injector) { /** * @ngdoc service * @name ngMangoServices.maHttpInterceptor *...
import React from "react"; import { useLocation } from "react-router-dom"; import styles from "./NoMatch.module.css"; function NoMatch() { let location = useLocation(); return ( <div className={styles.nomatch}> <b>No match for:</b> <code>{location.pathname}</code> </div> ); } export default NoMat...
var messages = require('../config/messages'); module.exports = function (err, callback) { let ErrorMessage = ""; if (typeof err === 'string') { ErrorMessage = err; } else if (err.errors) { ErrorMessage = err.errors[Object.keys(err.errors)[0]].message; } else if (err.code) { Erro...
var cfg = require("../../utils/cfg.js"); var app = getApp() var that; let query= { uuid: "", cuser: "", checkres: 999999, time: "", done: 999999, page: 1, pagesize: 10, totalPage:1, begin:0, end:0 }; Page({ data: { tasks:[] }, getTasks: function () { var that=this wx.request({ ...
import express from 'express'; import bodyParser from 'body-parser'; import dotenv from 'dotenv'; //importing the Routes import ridesRoute from './routes/rides'; // Configure dotenv dotenv.config() const app = express(); // App to Use these app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.jso...
import React, { useEffect, useState } from "react"; import Modal from '@material-ui/core/Modal'; import Input from '@material-ui/core/Input'; import Grid from '@material-ui/core/Grid'; import Alert from '@material-ui/lab/Alert'; import Button from '@material-ui/core/Button'; import TextField from "@material-ui/co...
class Wall { constructor(x, y) { this.x = x; this.y = y; } } class Pairs { constructor(a, b, dist) { this.origin = a; this.destination = b; this.distance = dist; } } var cur_stat; var arrWall = new Array(); var intervalVisited; var intervalPath; var type = ""; var x_sta...
var path = require("path"); module.exports = function(app) { app.get("/", function(req, res) { res.sendFile(path.join(__dirname, "../public/signup.html")); }); app.get("/login", function(req, res){ res.sendFile(path.join(__dirname, "../public/login.html")); }) app.get("/main", function(req, res){ ...
// CLOSEST IS USED TO WORK WITH THE CLOSEST ELEMENT OF AN ELEMENT let btn = document.querySelector('.btn') btn.addEventListener('click',event=>{ //console.log(event.target) // IF YOU WILL DO THIS THEN IT WILL SHOW BUTTON OR MAIN2 let close = event.target.closest('.main2') console.log(close) // NOW IT WILL...
define([ "backbone", "modules/note/notes-nav" ], function (Backbone, NotesNav) { "use strict"; var Player = Backbone.View.extend({ _timeout: null, _currentNote: 0, repeat: true, initialize: function (options) { this._song = options.song; this.notesNav = new NotesNav({model: this._song}); $("#a...
const MockApp = require('../../nodeMock/app'); class MockUtil{ async setMockResponse(method, endpoint, callback) { await MockApp.stopServer(); if (method === 'GET') { await MockApp.onGet(endpoint, callback); } if (method === 'POST') { await MockApp.onPost(e...