text
stringlengths
7
3.69M
import axios from 'axios'; const instance = axios.create({ // baseURL: 'https://quiz-admin-api.priyoschool.com/admin/api' baseURL: 'http://68.183.186.191:8765', responseType: 'blob', }); instance.interceptors.request.use(function (config) { console.log('A request is made to Priyo quiz'); console.log('Inject...
// pages/orderteacher/orderteacher.js Page({ /** * 页面的初始数据 */ data: { bgpic: null, tid: null, openid: '', teacherid: '', classsigns: null, userInfo:"", orderState: [0, 0, 0, 0], warming: false, orderArray: null, orderList: [] }, /** * 生命周期函数--监听页面加载 */ onL...
module.exports = function (censusBase) { this.getMapOwnership = function (worldId, zoneId, callback) { var query = censusBase.createQuery('map'); query.setLanguage('en'); query.where('world_id').equals(worldId); query.where('zone_ids').equals(zoneId); censu...
const uuidV4 = require('uuid/v4') function RegisterASiteAction (APIService) { function run (siteData) { const method = 'registerASite' const id = uuidV4() const params = { siteData } const body = { method, params, id } return APIService.run(body) } return { run } } export default Register...
//ipc 管道通讯 var cp = require('child_process'); //只有使用fork才可以使用message事件和send()方法 var n = cp.fork('./child.js'); n.on('message',function(m){ //接收子进程消息 console.log(m); }) n.send({"message":"hello"}); //发送到子进程
import * as React from "react"; import { NavigationContainer } from "@react-navigation/native"; import { createStackNavigator } from "@react-navigation/stack"; import DashboardScreen from "../screens/DashboardScreen"; import AboutScreen from "../screens/AboutScreen"; import ProjectsScreen from "../screens/ProjectsScree...
const { Usuario } = require('../database/models') const userController = { index: async (req, res) => { const users = await Usuario.findAll(); console.log(users) } } module.exports = userController
/* You are given an initial 2-value array (x). You will use this to calculate a score. If both values in (x) are numbers, the score is the sum of the two. If only one is a number, the score is that number. If neither is a number, return 'Void!'. Once you have your score, you must return an array of arrays. Each sub ...
const LEVEL = { LOG: 0, WARN: 1, ERROR: 2, }; let _level = 2; class Log { static setLevel(level) { _level = level; } constructor(name) { this.name = name; } log(message) { this._log(Log.LEVEL.LOG, message); } warn(message) { this._log(Log.LEVEL.W...
const path = require('path'); module.exports = { publicPath: '/static/src/vue/dist/', outputDir: path.resolve(__dirname, '../static/src/vue/dist/'), filenameHashing: false, runtimeCompiler: true, devServer: { writeToDisk: true, }, };
module.exports = (sequelize, DataTypes) => { const User = sequelize.define("user", { id : { type: DataTypes.INTEGER, // 구분용 primaryKey : true, autoIncrement: true }, name : { type: DataTypes.STRING, // 닉네임 allowNull: false ...
import React from "react"; import "./Nav.css"; function Nav({ goHome, route, goOut }) { return ( <nav className="Nav"> <h3 className="navText"> {route === "home" ? <p onClick={goOut}>Sign Out</p> : null} </h3> </nav> ); } export default Nav;
class Shape { constructor(canvas) { this.canvas = document.getElementById("canvas"); this.context = this.canvas.getContext('2d'); this.fontSize = 100;//字体大小 this.dotGap = 15;//点间隙 }; resize() { var canvas = this.canvas; var context = this.context; //ca...
Ext.onReady(function () { Ext.define('gigade.EdmContentNewReport', { extend: 'Ext.data.Model', fields: [ { name: "trace_day", type: "string" }, { name: "openPerson", type: "int" }, { name: "openCount", type: "int" }, { name: "avgPerson", type: "string" }, { ...
require('./env') require('should') const { db } = require('ben7th-fc-utils') const UserStore = require('../lib/UserStore') describe('UserStore', () => { before(async () => { await UserStore.__clear() await UserStore.createByLoginAndPassword({ login: 'ben7th1', password: '123456' }) await UserStore.crea...
var addFood,feed; var fedTime, lastFed; let food = []; var h; var milk,ml; var foods, foodStock; var dog,happyDog; var database; function preload(){ //Load images here happyDog=loadImage("images/dogImg.png"); sadDog=loadImage("images/dogImg1.png"); ml=loadImage("images/Milk.png") } function setup(){ databas...
var menuState = { create: function(){ //prevent page from moving around this.input.keyboard.addKeyCapture([Phaser.Keyboard.UP, Phaser.Keyboard.DOWN, Phaser.Keyboard.LEFT, Phaser.Keyboard.RIGHT, Phaser.Keyboard.SPACEBAR]); nowPlaying = false; resetNav(); drawPatternBG("#888800", "222277"); //b...
//window.server = 'http://192.168.1.101:8080/MMS'; // window.server = 'http://192.168.43.244:9080/MMS'; // window.server='http://192.168.1.102:8080/MMS' // dist环境 // window.server="http://10.22.224.110:30011/MMS" window.xxx="china"
import React, { Component } from 'react'; import anime from 'animejs'; import './logo.scss'; const logoViewBox = '0 0 700 100'; const letterColors = { capitalT: '#6F146D', r: '#6F146D', e: '#6F146D', }; /** * A component to hold the animated logo for the website so that users can be * wowed as soon as they lan...
var Sceney = require('./index') var imageUrls = [ 'https://images.thetrumpet.com/51e9636a!h.300,id.9292,m.fill,w.540', 'https://c1.staticflickr.com/1/572/22607522004_1380a87e79_b.jpg' ]; var sceney = Sceney.init([process.env.CLARIFAI_CLIENT_ID, process.env.CLARIFAI_CLIENT_SECRET], function () { sceney.rateImage...
'use strict' const rand = require('../src/util.js') test('it should random array', () => { const array = ['666', '2', '123', '69'] expect(array).toContain(rand(array)) })
const mongoose = require('mongoose') mongoose.connection.on('open', () => console.log("db connected")) async function mongodbConn( host ){ try { await mongoose.connect( `${host}`, {useNewUrlParser: true, useUnifiedTopology: true} ) } catch( e ){ console....
var mongoose = require('mongoose'); var Schema = require('mongoose').Schema; var UserSchema = new Schema({ local: { username: {type : String, unique : true}, password: String }, info: { lastConnection: { type: Date, default: Date.now }, ...
var port = process.env.PORT || 5000; var app = require('express')(); var server = require('http').Server(app); server.listen(port); app.get('/',function(req,res){ res.sendFile(__dirname + '/index.html'); }); // Chargement de socket.io var io = require('socket.io')(server); var connectedUsers = []; // Quand on ...
#!/usr/bin/env node const path = require('path'); const childProcess = require('child_process'); try { childProcess.execFileSync( 'php', [path.join(__dirname, '../external/phpcs.phar'), ...process.argv.slice(2)], { stdio: 'inherit' } ); } catch (e) { process.exit(e.status); }
var redLetters = require('../assets/js/solve/redLetters.js') test('empty returns true', () => { expect(redLetters([])).toBeTruthy() }); test('finds right coordinate', () => { var coords = [0, 1, "5", "5"] expect(redLetters()).toBeTruthy() });
import React from 'react'; import { connect } from 'react-redux'; import { Redirect, Route } from 'react-router-dom'; const ProtectedRoute = ({ component: Component, ...protectedRouteProps }) => ( <Route {...protectedRouteProps} render={props => protectedRouteProps.isLogged ? <Component {...props} /> :...
movieDBApp.controller('MovieListController', function MovieListController($scope, movieDataService, $log, $routeParams, $location) { $log.info($location); const params = { sort: $routeParams.sort || 'title', page: $routeParams.page || 0, size: $routeParams.size ...
'use strict' const helmet = require('helmet') const bodyParser = require('body-parser') const cors = require('cors') const expressDeliver = require('express-deliver') const customExceptions = requireRoot('services/customExceptions') const appManager = requireRoot('./appManager') const parameters = requireRoot('../par...
var dgram = require('dgram'); var http = require('http'); var sys = require('sys'); var fs = require('fs'); var url = require("url"); var path = require("path"); http.createServer(function(req, res) { //debugHeaders(req); if (req.headers.accept && req.headers.accept == 'text/event-stream') { if (req.url == '/...
define([ 'react', 'jquery','properties' ], function(React, $,properties) { var BootstrapButton = React.createClass({ render: function() { return ( <a {...this.props} href="javascript:;" role="button" className={(this.props.className || '')}> {this.props.data} ...
import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { useFilmsContext } from '@/components/films-provider/films-provider'; import './list-item.scss'; const ListItem = ({ film }) => { const [statusClass, setStatusClass] = useState(''); const { checkAnswer } = useFilmsContext()...
import React, {Component} from 'react'; import { Table,Modal, Button,Input,Radio,message } from 'antd'; const Search = Input.Search; export default class Linknext extends Component{ constructor(props){ super(props) this.state={ dataSource:{}, // 列表数据 current:1 // 当前页数 ...
function judgeVegetable (vegetables, metric) { let currentWinnerIndex = 0; for (let veg in vegetables) { if (vegetables[veg][metric] > vegetables[currentWinnerIndex][metric]) { currentWinnerIndex = veg; } } return vegetables[currentWinnerIndex].submitter; } const vegetables = [ { submitter...
'use strict' import React from 'react' import PropTypes from 'prop-types' import c from 'classnames' import ThePeerStyle from './ThePeerStyle' import { htmlAttributesFor, eventHandlersFor } from 'the-component-util' import { TheVideo } from 'the-video' import newPeer from './helpers/newPeer' import { get } from 'the-w...
import React from "react"; import { Link } from "react-router-dom"; export default ({ product }) => { return ( <div className="card"> <li> <div className="card-image"> <img src={require(`../assets/images/${product.image}`)} alt={product.title} /> </div> ...
import * as PUTbooks from '../requests/PUTBooks.request' import * as GETBooks from '../requests/GETBooks.request' import * as POSTBooks from '../requests/POSTBooks.request' describe('PUT Books', () => { it('Alterar o primeiro livro da lista', () => { GETBooks.allBooks().then((responseAllBooks) => { ...
var single=require("./somethingSingle"); single.hello(); single.hello(); single.hello(); single.hello(); var single1=require("./somethingSingle"); single1.hello(); single1.hello(); single1.hello(); single1.hello(); console.log(single===single1);//true //这里single1和single是同一个对象 module.exports=single;
import React from 'react'; const SkillComponent = (props)=>{ return( <div className='skill-component'> <h1>{props.skill}</h1> <div className='skill-loader'> <div></div> <div></div> </div> </div> ) } export default SkillComponent;
var characterService = require('./../services/character'); module.exports.lookupCharactersByName = function (query, limit, req, res, next) { characterService.lookupCharactersByName(query, limit, function (error, response) { if (error) { return res.json(new Error('Could not looking characters')...
import * as userReducer from '../../reducers/users-reducer'; describe('users reducer', () => { it('should return our initial state', () => { const expectation = {}; expect(userReducer.activeUser(undefined, {})).toEqual(expectation); }); it('should allow me to add active user to state', () => { cons...
// FINCAD // React Assignment - Janurary 28, 2017 // Chedwick Montoril // License MIT // React-* dependencies. import React from 'react'; // Internal dependencies. import PostCard from './PostCard.component'; /** * Post List component. */ class PostList extends React.PureComponent { // eslint-disable-line react/pr...
$(document).ready(function () { var leftBtn = $('#char-carousel').find('.left-arrow-wrapper'); var rightBtn = $('#char-carousel').find('.right-arrow-wrapper'); var gauls = $('.info-text .gauls'); var romans = $('.info-text .romans'); var teutons = $('.info-text .teutons'); var showDescription ...
const Discord = require('discord.js') const config = require('../config.json') const storage = require('../util/storage.js') const currentGuilds = storage.currentGuilds const overriddenGuilds = storage.overriddenGuilds const failedLinks = storage.failedLinks const pageControls = require('../util/pageControls.js')...
import { dateFormat } from "../../helpers/dateformat"; const Post = ({ title, date, content }) => { return ( <main className="post individual"> <h1>{title}</h1> <small className="date">{dateFormat(date)}</small> <section dangerouslySetInnerHTML={{ __html: content }}></section> <style jsx>...
function runTest() { FBTest.openNewTab(basePath + "search/6454/issue6454.html", function() { FBTest.openFirebug(function() { FBTest.selectPanel("html"); var tasks = new FBTest.TaskList(); tasks.push(searchTest, "testing", false, 14); tasks.push(se...
import { useEffect, useState } from "react"; import { useQuery, useSubscription } from '@apollo/react-hooks'; import { GET_SEASON } from '../../graphql'; import LoadScreen from "../LoadScreen/LoadScreen"; import { getUniqueRandoms } from "./GameLogic"; import PickCard from './PickCard/PickCard'; import './Game.css'; im...
import React, { Component } from 'react'; import Container from 'react-bootstrap/Container' import Form from 'react-bootstrap/Form' import Button from 'react-bootstrap/Button' class CreateBooking extends Component { // TODO // Fetch rooms and populate form fields with Names and IDs. constructor(props) ...
const jwt = require("jsonwebtoken"); const User = require("../models/User"); const key = process.env.SECRET; module.exports.createToken = ({ _id, email }) => jwt.sign({ id: _id, email }, key); module.exports.authCheck = (req, res, next) => { const { authorization } = req.headers; if (!authorization) return...
$(document ).ready(function() { var basepath = $("#basepath").val(); /* On change project change servier*/ $(document).on("change", "#project", function() { getTipper(basepath); }); $('#syncReportBtn').on('click',function(e){ e.preventDefault();...
class Event { constructor(sender) { this._sender = sender this._listeners = [] } attach (callback) { this._listeners.push(callback) } notify (args) { this._listeners.forEach( data => { data(this._sender,args) }) } } export default Event
import axios from 'axios' export default axios.create({ baseURL: 'https://watchtrade-api.herokuapp.com', // timeout: 1000, headers: { 'Content-Type' : 'application/x-www-form-urlencoded', 'Authorization' : 'Bearer '+localStorage.getItem("accessToken") } });
import {showContent} from './service/showContent'; import {addActiveClass} from './service/addActiveClass'; const showTabs = (elementSelectorCSS, tabsElemCSS) => { const tabs = document.querySelector(elementSelectorCSS); const tabElements = document.querySelectorAll(tabsElemCSS) showContent('.tabcontent', ...
module.exports = { builder: new (require('./command-builder'))(), Runner: require('./runner') };
import * as React from 'react'; import DashboardIcon from '@material-ui/icons/Dashboard'; import AssignmentIcon from '@material-ui/icons/Assignment'; import StorageIcon from '@material-ui/icons/Storage'; import PeopleIcon from '@material-ui/icons/People'; import NotificationsIcon from '@material-ui/icons/Notifications'...
const Sequelize = require('sequelize'); module.exports = function(sequelize, DataTypes) { return sequelize.define('LoginAsCustomer', { secret: { type: DataTypes.STRING(64), allowNull: false, primaryKey: true, comment: "Login Secret" }, customer_id: { type: DataTypes.INTEGER, ...
/** * Created by Drew on 1/10/2015. */ var fs = require('fs'), path = require('path'), Plates = require('plates'), React = require('react'); var STATIC_BASE_HTML; fs.readFile( path.join(__dirname, '../', 'public', 'base.html'), { encoding: 'utf-8'}, function(err, template) { STATIC_...
const express = require('express'); const router = express.Router(); const connection = require('../config/connectDB'); // DB 연결 및 쿼리작성 변수 /** * @swagger * tags: * name: scanKitchen * description: 사용자 위치 반경내의 급식소 검색 * definitions: * scanResults: * type: object * properties: * id: * ...
import create from '../src/js/utils/create.js'; describe('create method', () => { test('should create div element by default', () => { const config = {}; const expected = '<div></div>'; const result = create(config); expect(result).toMatchSnapshot(expected); }); test('shou...
var barsetNumber; try { $("#btnOpen").click(function (e) { // RULE: All Input validations must be met. var Form = document.getElementById("frmBarset"); if (Form.checkValidity()) { e.preventDefault(); ShowConfirmation(); } }); $("#btnConfirmBarsetNumb...
// NAVBAR ButterCake.plugin('navbar', function () { var $toggler = $('.navbar .toggler'); // NAVBAR RESPONSIVE BREAKING POINTS // $('.navbar').each(function () { if ($(this).hasClass('expand-sm')) { $(this).attr('data-toggle', ButterCake.settings.breakPoints.sm); } else if ($(this).hasClass('e...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _pluginBase = _interopRequireDefault(require("../core/plugin-base")); var _index = require("../utils/index"); var _index2 = _interopRequireDefault(require("../index")); function _interopRequireDefault(obj) ...
import React from 'react'; import IconHome from '@material-ui/icons/Home'; function SidebarData(){ return ( <div> title: "HOME" icon: <IconHome/> link: "/home" </div> ) } export default SidebarData;
'use strict'; angular.module('system').controller('IndexController', ['$scope', function($scope) { } ]);
const initialState = [ { id: '1', user: 'peter', body: '用 React 配合上 Meteor 来制作成一个单页面应用( SPA ) 架构的聊天室', course: '1' }, { id: '2', user: 'billie', body: '学完课程之后,可以自己搭建一个网站了', course: '1' }, { id: '3', user: 'Jay', body: 'React 框架的最佳入门课程', course: '1' }, { ...
import React, { Component } from 'react'; import {Col,Row,Form, Icon} from 'antd'; import './footer.css'; export default class Footer extends Component { render(){ return( <footer className="footer"> <div className="overlay"></div> <Row> <Col span={24} className="footer-top">联系我们<...
import React, { Component } from 'react'; import { Container, Row, Col } from 'reactstrap'; import Layout from '../../../components/account/accountLayout'; import AccountCard from '../../../components/account/accountCard'; import AccountNav from '../../../components/account/accountNav'; import DashboardHeader from '.....
'use strict'; (function(){ document.addEventListener('DOMContentLoaded',function(){ var oBox=document.getElementById('box'); var oUl=oBox.children[0]; var aLi=oUl.children; var aBtn=document.querySelectorAll('#box ol li'); oUl.style.width=aLi[0].offsetWidth*aLi.lengt...
export default { getAllSendingInfo:{ url:'scm/logistic/getAllSendingInfo' } }
import React from 'react'; const ListItem = ({item}) => { return ( <li>{item}</li> ) } const RenderList = ({list}) => { return ( <ol> {list.map(({name, url}, i) => <ListItem item={name || list[i]} key={url || i}/>)} </ol> ) } export default RenderList; /* item = { name:...
import React from 'react'; import Counter from 'components/Counter'; /** * React component implementation. * * @author dfilipovic * @namespace ReactApp * @class FactItem * @extends ReactApp */ const FactItem = (props) => ( <div className="fact"> <div className="fact-number timer"> <span className="factor ...
var renderer = new THREE.WebGLRenderer({canvas: document.getElementById("myCanvas"), antialias: true}); renderer.setClearColor(0xFFFFFF); renderer.setPixelRatio(window.devicePixelRatio); renderer.setSize(window.innerWidth, window.innerHeight); var camera = new THREE.PerspectiveCamera(35,window.innerWidth / window.inne...
const jwt = require('jsonwebtoken'); const jwtSecret = require('../../config').jwtSecret; module.exports = { requiresLogin: (req, res, next) => { const token = req.body.token || req.cookies.token; if (token) { jwt.verify(token, jwtSecret, (err, decoded) => { if (err) { return next(new...
//inherits from Base /** * Constructs the Species object * @constructor * @param options * @returns {Species} */ function Species(options){ //call to super constructor Base.call(this,options); //add species specific properties /* * bBoundaryCondition: false bIsConstant: false color: {iRed: 0, iGreen: 0...
export { default } from '@upfluence/ember-upf-utils/types/user';
/** * Created by a on 2017/10/23. */ //Express的路由 const express = require("express"); const constroller = require("../controller/peoplecontroller"); //获取路由对象 const router = express.Router(); // router.route("/login.do") // .get(constroller.getUser) // .post(constroller.postUser); router.get("/roleMan.do"...
import axios from "axios"; const URL = "http://localhost:3333/smurfs"; //Action types: export const FETCHING = "FETCHING_SMURFS"; export const FETCHED = "FETCHED_SMURFS_SUCCESS"; export const ERROR = "SMURFS_ERROR"; export const ADDING = "ADDING_SMURF"; export const ADDED = "ADDED_SMURF"; export const DELETING = "DELE...
exports.run = function(client, message, args) { message.member.addRole('308783051826135041'); message.reply('your role as been updated!'); }
import { Widget } from "../widget.js"; import { UI } from "../ui.js"; import { importCss } from "../../utils.js"; class InputController extends Widget { /** * Input controller constructor * @param {UI} ui parent UI */ constructor(ui) { super(ui); /** * Widget title ...
import React, {Component} from "react"; import {ScrollView, StyleSheet, View} from 'react-native'; import {Button, Input, Text} from "react-native-elements"; import strings from "../strings"; import {boundMethod} from "autobind-decorator"; import {getAuthedAPI} from "../api"; import {ACTION_TYPES, createAction} from '....
import React, { Component, PropTypes } from 'react' import { connect } from 'react-redux' import { loginUser } from '../actions/LoginActions.js' import HomeNavbar from '../components/HomeNavbar' import HomeFooter from '../components/HomeFooter' import { Link } from "react-router"; export default class About extends Co...
import React, {Component} from 'react'; import { Table, Icon, Divider } from 'antd'; export default class AllMatt extends Component{ constructor(props){ super(props); this.state={ data:null, } } render(){ return ( <div> <ul i...
import React from "react" import styled, { createGlobalStyle } from "styled-components" import SEO from "./seo" import Navbar from "./navbar" import ScrollToTop from "./scrollToTop" /* Colour Pallette Main: #0074b8 Accent: #ECA400 Background: #202020 Alt Background: #191919 Footer Background: #131418 Text: #efefef Al...
/*jslint es6 */ "use strict"; const {describe, it} = require("mocha"); describe("projectMembers", function () { const chai = require("chai"); const expect = chai.expect; const chaiAsPromised = require("chai-as-promised"); const sinon = require("sinon"); const factory = require("../...
// @flow import type { InEnv } from "./in-env"; import { Env, pure, liftA2, fetch, alias, run } from "./in-env"; export type Expr = Var | Let | Num | Plus | Times ; export class Var { name: string; constructor(name: string) { this.name = name; } } export class Let { name: string; value: n...
const a = require('../../constants/action'); const initialState = { textinput: '', pulldown: '5', target_id: '', } export default function room_talk_detail(state = initialState, action) { switch (action.type) { case a.ROOM_DETAIL_INIT: return Object.assign({}, state, { textinput: '', ...
import React, { useRef } from 'react'; import axios from 'axios'; import { useStore } from '../store/store'; import { setBlogs } from '../store/blogActions'; const AddPost = () => { const inputTitleRef = useRef(); const inputBodyRef = useRef(); const inputUserIdRef = useRef(); const { dispatch } = useStore();...
const TelegramBot = require('node-telegram-bot-api') const mongoose = require('mongoose') const config = require('./config') const helper = require('./helper') const _ = require('lodash') const geolib = require('geolib') const keyboard = require('./keyboard') const kb = require('./keyboardButtons') const database = req...
import { getQueryString } from './getQueryString'; describe('getQueryString', () => { it('should return the right string', () => { const actual = getQueryString({ test: 1, hello: 'hello', dontIncludeEmptyStrings: '', dontIncludeUndefined: undefined, include0: 0, includeFalse: ...
$( document ).ready(function(){ var timeLeft = 15; // countdown start time var timerId = setInterval(countdown, 1000); // de-crementing one sec at a time var numRight = 0; // correct answer array var messages = ["Wow! Were you born in Cleveland?", // array for messages called based upon 'Meh, you did "OK"', // answ...
// ------------ Global ---------------- var http = require('http'); var express = require('express'); var path = require('path'); var mongoose = require('mongoose'); var passport = require('passport'); var app = express(); var server = http.createServer(app); var socketIO = require('socket.io'); var io = socke...
const UserData = [ {id: 1, name: 'Suparman', registered: '2018/01/01', role: 'Guest', status: 'Pending'}, {id: 2, name: 'Sapardi', registered: '2018/01/01', role: 'Member', status: 'Active'}, {id: 3, name: 'Suparjo', registered: '2018/02/01', role: 'Staff', status: 'Banned'}, {id: 4, name: 'Sujatmiko', register...
$(document).ready(function(){ $('#btn-menu').click(function(){ if ( $ ('.btn-menu span').attr('class') == 'icon-menu') { $ ('.btn-menu span').removeClass('icon-menu').addClass('icon-cross'); $ ('.menu-link').css({'left': '0'}); } else { $ ('.btc-menu span').removeClass('icon-cross').addClass('icon-m...
export { post as postCallMeBack } from './post';
import name from '../../../api/dictionary/name'; import {pageSize, pageSizeType, description, searchConfig} from '../../globalConfig'; const filters = [ {key: 'supplierPriceCode', title: '系统编号', type: 'text'}, {key: 'supplierId', title: '供应商', type: 'search'}, {key: 'contractCode', title: '合同号', type: 'text'}, ...
/* Design a cash register drawer function checkCashRegister() that accepts purchase price as the first argument (price), payment as the second argument (cash), and cash-in-drawer (cid) as the third argument. cid is a 2D array listing available currency. The checkCashRegister() function should always return an object...
import React, { Component } from 'react'; import {Form, FormGroup, Col, Row, Container, Button, Label, Input} from 'reactstrap' import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import * as userActions from '../actions/userActions' class UpdateAccountForm extends Component { constructor(...
const util = require('util') const log = (data) => console.log(util.inspect(data, {showHidden: false, depth: Infinity, colors: true})) // Returns UUIDV4 string const uuidv4 = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { const r = Math.random() * 16 | 0, v = c == 'x' ? r : (r...
// Declaring a Hashmap using the JS Map constructor let firstHashmap = new Map(); // Declaring and initializing a new hashmap object let secondHashmap = new Map([ [1, "first"], [2, "second"], [3, "third"], ]); console.log("firsthashmap:", firstHashmap); console.log("secondHashmap:", secondHashmap); console.log...
let foo = "bar" const obj1 = { name: "JC", email: "id@server.com" } const arr = [1, 'blue', true, {ISBN: 145}] const arr2 = [5, 99, 200, 6, 32, 33] const add = (num1, num2)=>{ return (num1 + num2) } const doMath = (...args) => { if (args.length == 1) { return args[0] * args[0] } else { swit...