text
stringlengths
7
3.69M
const config = require('../../project.config') const proPlayers = require('../data/pro-players.json') const heroes = require('../data/heroes.json') export function mapAccountToPlayer(playerObject) { const heroData = heroes.heroes.find(hero => hero.id === playerObject.hero_id) const heroName = heroData ? heroData.n...
import React from 'react'; import Button from '@material-ui/core/Button'; import TextField from '@material-ui/core/TextField'; import {Typography} from '@material-ui/core'; import AddIcon from '@material-ui/icons/Add'; import IconButton from '@material-ui/core/IconButton'; import Chip from '@material-ui/core/Chip...
const templateCreateCells = require('../createCells.pug'); const eventEmitter = require('events'); class View extends eventEmitter { constructor() { super(); this._startButtonBind(); this._pauseButtonBind(); this._changeCellStateBind(); this._unfocusInputsBind(); } drawField(modelFieldHeigh...
const MegaClient = require("simple-discord"); module.exports = new MegaClient.Comando({ nombre: "dragono", alias: ["dragono"], descripcion: "Easter-egg2", cooldown: 3, permiso_cooldown: "ADMINISTRATOR", ejecutar: (client, message, args) => { if(client.comandos.size <= 0) return message.channel.send("...
import { connect } from 'react-redux'; import Profile from './profile'; import { fetchSummoner } from '../../actions/summoner_actions'; import { fetchMatches } from '../../actions/match_actions'; import { summonerSoloQueue, summonerQueues } from '../../reducers/selectors'; const mapStateToProps = (state, {params}) => ...
import React from 'react'; import ShowUserNames from './showusernames' import ChatBox from './chatbox' import ShowMessages from './showmessages' import {connect} from 'react-redux' class Messages extends React.Component { state={ otherUser : null, messageBox:null, messages:[] } showUserNames = () ...
export default class IdentityTransmutter { construct(source, property, response) { // if (response !== undefined) { // throw new Error('IdentityTransmutter must be the first middleware to be executed'); // } return Reflect.get(source, property); } // instance(source, args, response) { // p...
process.env.NODE_ENV = 'test'; let mongoose = require("mongoose"); let models = require('../models/models'); let Menu = models.Menu; let chai = require('chai'); let chaiHttp = require('chai-http'); let app = require('../app'); let should = chai.should(); chai.use(chaiHttp); describe('Menu', () => { beforeEach(...
/*eslint-env browser */ var startTime, timeOut, SPACE_CODE = 32, E_CODE = 101, THOUSAND = 1000; let circle, times, result, arrayOfTimes = []; function init(){ let startButton = document.querySelector(".button"); startButton.addEventListener("click", startExperiment); document.addEventListener("keypress", ...
let option=document.getElementById("options"); let closed=document.getElementById("close"); option.addEventListener("click",(e)=>{ let el=document.getElementById("active"); let el2=document.getElementById("activelg") el.classList.toggle("hidden"); el2.classList.toggle("lg:hidden"); }) closed.addEventL...
const { Router } = require('express') const {createUser} = require('../../controllers/users') const route = Router() route.post('/', async (req ,res) => { try { const user = await createUser( req.body.user.username, req.body.user.email, req.body.user.password ) res.status(201).send({...
/** * Followers Widget */ import React, { Component } from 'react'; import { Card, CardBody } from 'reactstrap'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import Button from '@material-ui/core/Button'; // intl messages import IntlMessages from 'Util/IntlMessages'; ...
/* * ext-connector.js * * Licensed under the Apache License, Version 2 * * Copyright(c) 2010 Alexis Deveria * */ methodDraw.addExtension("Connector", function(S) { var svgcontent = S.svgcontent, svgroot = S.svgroot, getNextId = S.getNextId, getElem = S.getElem, addElem = S.addSvgElementFromJson, sel...
import React from 'react'; import PropTypes from 'prop-types'; import { Layer, Text, } from 'react-konva'; // this component takes in charge all related to the square // names witch are: ABCD anf A'B'C'D'. const Annotation = ({ blackStroke, fontSize, squareNodeA, squareNodeB, }) => ( <Layer> <Text ...
OC.L10N.register( "settings", { "Couldn't send reset email. Please contact your administrator." : "Die E-Mail zum Zurücksetzen konnte nicht versendet werden. Bitte kontaktiere Deinen Administrator.", "Email sent" : "E-Mail wurde verschickt", "Delete" : "Löschen", "Share" : "Teilen", "Invalid...
$(document).ready(function () { var leftSidebar = $('#leftSidebar'); leftSidebar.hide(); // Set handler for Left Sidebar $('#toggleSidebar').on('click', function () { leftSidebar.toggle(); }); //Set tooltip $('[data-toggle="tooltip"]').tooltip(); // Call print $("#callP...
import React from 'react'; import {StyleSheet, Text, View} from 'react-native'; import Slider from '@react-native-community/slider'; import TrackPlayer,{useProgress} from 'react-native-track-player' const formatTime = (secs) =>{ let minutes = Math.floor(secs / 60) let seconds = Math.ceil(secs - minutes * 60); ...
import { filterCourses } from '../mongodb/courses'; export default { description: 'Filter courses API', notes: 'Return details of courses on a particular filter', tags: ['api', 'courses'], cors: true, async handler(request, h) { try { if (!request.auth.isAuthenticated) { return h.redirect('...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function loadAsset(player, entry, callback) { player.getAssetData(`assets/${entry.storagePath}/shader.json`, "json", (err, data) => { player.getAssetData(`assets/${entry.storagePath}/vertexShader.txt`, "text", (err, vertexShader) =...
// super messy code oops // the actual diffusion part is pretty simple /** * Converts tensors to viewable blob images (much easier to deal with than base64) * @param {Tensor} tensor - RGB, CHW, float32 tensor to convert to image blob * @returns Promised Blob */ function tensorToBlobAsync(tensor) { const canvas...
import React, { Component } from 'react' import telescope from '../assets/telescope.jpg' export class Navbar extends Component { render() { return ( <div className='navbar'> <h1 id='navbarTitle'>Job Explorer <img src={telescope} alt='telescope' /> </h1> </div> ...
// Flint Tool Maker // for DanIdle version 4 // Produces more advanced (aka less primitive) tools out of flint, sticks and twine import { blockOutputsItems, blockHasWorkerPriority, blockDeletesClean } from "./activeBlock.js"; import { blockHasSelectableCrafting } from "./blockAddon_HasSelectableCrafting.js...
/** * Created by Mac on 1/30/2016. */ doStuff = function(){ numPpl = getInt("txtNumPpl") numPizzas = getInt("txtNumPizzas") addHtml("txtOutput", "Numppl="+numPpl + " NumPizzas="+numPizzas+"<br><br>") remainder = numPizzas % numPpl html = "Num slices per person = " + Math.floor(numPizzas / numPp...
'use strict'; const faker = require('faker') module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.bulkInsert('Characters', [{ name: faker.name.findName(), money: faker.random.number(), admin: true, createdAt: faker.date.past(), updatedAt: faker....
import React from 'react'; import './Contact.css'; import contactImg from './contact.jpg'; import github from '../../../src/icons/github-brands.svg'; import fcc from '../../../src/icons/free-code-camp-brands.svg'; import stack from '../../../src/icons/stack-overflow-brands.svg'; import linkedin from '../../../src/icons...
function Bullet (x=0,y=-1,vx,vy,color="yellow",ctx,width=10,height=10,ay) { this.x = x; this.y = y; this.vx = vx; this.vy = vy; this.color = color; this.ctx = ctx; this.width = width; this.height = height; this.ay = ay; } Bullet.prototype.draw = function () { this.ctx.save(); this.ctx.beginPath(); this.ctx.rec...
//jshint esversion:6 const express = require('express'), app = express(), path = require('path'), cors = require('cors'), request = require('request'), fs = require('fs'), jsonfile = require('jsonfile'), router = express.Router(), config = require('../client/src/config.j...
import User from "../../src/model/User.js"; import UserRepository from "../../src/repository/UserRepository"; import { PrismaClient } from '@prisma/client'; describe('UserRepository', () => { const prisma = new PrismaClient(); beforeAll(async () => { await prisma.$connect(); }); afterEac...
import React from 'react' import { connect } from 'react-redux' import { Desktop, Tablet, Mobile } from '../components/footer' const Container = ({ viewport: { type } = {}, ...props }) => { if (type === 'Mobile') { return ( <Mobile {...props} /> ) } else if (type === 'Tablet') { return ( <T...
window.onscroll = function() {myFunction()}; function myFunction() { var winScroll = document.body.scrollTop || document.documentElement.scrollTop; var element = document.getElementById("header"); if (winScroll > 100) { element.classList.add("shadow-bottom"); } else { element.class...
$(document).ready(function () { //Toggle menu $('.menu-btn').click(function () { $('.menu ul').slideToggle(); //Button-menu $('.line-btn:nth-child(2)').toggle(); $('.line-btn:nth-child(1)').toggleClass('line-rotate-1'); $('.line-btn:...
request.symbol request.companyName request.marketcap //needs formatting request.beta request.week52high request.week52low request.dividendRate request.dividenYield request.exDividendDate request.returnOnEquity request.EBITDA request.returnOnAssets request.profitMargin request.quote.latestPrice request.quote.peRatio
'use strict'; var gulp = require('gulp'), sass = require('gulp-sass'), cleanCSS = require('gulp-clean-css'), autoprefixer = require('gulp-autoprefixer'), webserver = require('gulp-webserver'), concat = require('gulp-concat'), uglify = require('gu...
import React from 'react' import PropTypes from 'prop-types' const LanguageItem = ({lang, selectedLanguage, onItemClick}) => ( <li style={selectedLanguage === lang ? {color: '#d0021b'} : null} onClick={() => onItemClick(lang)}> {lang} </li> ) // LanguageItem.propTypes = { // lang: PropTypes.string.i...
'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var WorkoutSchema = new Schema({ created: Date, duration: Number }); module.exports = mongoose.model('Workout', WorkoutSchema);
// Same functionality with /api/pairs/[chainId].js // Having issue on passing the list of records. // vercel discuttion: https://github.com/vercel/next.js/discussions/27555 import dbConnect from "../util/dbConnect"; import Token from "../models/Token"; export default async function getPairList(_chainId) { await dbC...
var express = require('express'); var router = express.Router(); var isAdmin = require("../middleware/isAdmin"); const Controller = require('../controllers/brandsController'); router.get('/', Controller.getAllBrands); router.get('/:id', Controller.getBrand); router.post('/', isAdmin, Controller.addBrand); router.delet...
import React, { useReducer } from 'react'; import UserContext from './userContext'; import userReducer from './userReducer'; import { SHOW_USER_INFO, GET_USERS_INFO, UPDATE_USER_INFO, DELETE_USER, USER_ACTIVE, } from '../../types/index'; import axios from '../../config/axios'; const UserState = props => { const ...
import {Template} from 'meteor/templating'; import {AutoForm} from 'meteor/aldeed:autoform'; import {alertify} from 'meteor/ovcharik:alertifyjs'; import {fa} from 'meteor/theara:fa-helpers'; import {lightbox} from 'meteor/theara:lightbox-helpers'; import fx from 'money'; // Lib import {createNewAlertify} from '../../....
const resEl = document.getElementById("res"); const x1 = prompt("Enter first number"); const x2 = prompt("Enter second number"); const res = x1 + x2; resEl.innerHTML = res; /* ============= Example 2 */ // Что не так с этой функцией /* function trimLower(text) { return text.trim().toUpperCase(); } trimLower("He...
/* * 判断终端设备类型 */ function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var flag = ""; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = Agents[v]; break; } } //console.log(f...
/* eslint-disable import/extensions */ /** * @description And gate is one of three many fundamental gate available in the simulator. * The following class handles the logic and functioning of the AndGate simulator component * @module AndGate * @requires Scopes * @requires Node * @requires helpers * @see helpers ...
import React, { Component } from "react"; import { Navbar, Nav } from "react-bootstrap"; class Menu extends Component { render() { return ( <> <Navbar expand="lg" className="w-100 p-0 m-0 navbar transparent "> <Navbar.Toggle className="navbar-toggler-menu" aria-controls="here" /> ...
// FOR > data awal ke akhir const cars = ['Honda', 'Toyota', 'Suzuki', 'Daihatsu', 'Ford'] for(let i = 0; i < cars.length; i++){ console.log(`${[i]} - ${cars[i]}`); } // FOREACH cars.forEach(function(r, i, a) { // (variabel/isi, index, array) console.log(`${i} - ${r}`); console.log(a); }) // MAP object co...
import * as R from "ramda"; import uuidv1 from "uuid/v1"; import { createServices } from "./services"; import { transforms } from "./transforms"; export const pages = { home: { id: "HomePage", tab: "Home" }, beerList: { id: "BeerListPage", tab: "Beer" }, beerDetails: { id: "BeerDetailsPa...
import React, { Component } from 'react'; import {Link} from 'react-router-dom'; import 'react-bootstrap'; import {loginUser} from './server/Server.js' class Login extends Component{ constructor(props) { super(props); this.state={ email:"", pass:"", resp:"", authText:"" ...
import PrismService from "../../services/prism.servise"; export const UI_CHANGE_THEME = 'UI_CHANGE_THEME' export const UI_PRISM_SHOW_LOADER = 'UI_PRISM_SHOW_LOADER' export const UI_PRISM_HIDE_LOADER = 'UI_PRISM_HIDE_LOADER' export const uiChangeTheme = (theme) => ({ type: UI_CHANGE_THEME, payload: { theme }...
import React, { Component } from 'react'; import Expo, { DangerZone } from 'expo'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as ExpoPixi from 'expo-pixi'; import { StyleSheet, View, Dimensions, TouchableOpacity, } from 'react-native'; import { Button } from '../...
NameIDBuilder = Java.type("org.opensaml.saml.saml2.core.impl.NameIDBuilder"); XMLObjectAttributeValue = Java.type("net.shibboleth.idp.attribute.XMLObjectAttributeValue"); AuthnRequest = Java.type("org.opensaml.saml.saml2.core.AuthnRequest"); logger = Java.type("org.slf4j.LoggerFactory").getLogger("net.shibboleth.idp.a...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ContainerFactory_1 = require("../utilities/ContainerFactory"); const ArtWork_1 = require("./ArtWork"); /** * html上のページごとの漫画情報を管理する */ class Manga extends ArtWork_1.ArtWork { constructor(pixivJson) { super(); this.ma...
let progress = document.querySelector('.progress'); function showProgress(message, percent) { console.log(message + ' (' + (percent * 100).toFixed(0) + '%)'); if (percent === 0) { progress.style.display = 'block'; progress.classList.remove('progress_hidden'); } progress.querySelector(...
(function(window, _, angular, undefined) { 'use strict'; /** * @name OnhanhOrder * @description OrderModule */ var orderModule = angular.module("app.order", []); 'use strict'; /** * @name OnhanhOrder * @description OrderConfig */ orderModule .config(['$stateProvider',...
var { defineSupportCode } = require('cucumber'); const reportLogger = require('../../../../codeceptCommon/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); const allWorkPage = require('../../pageObjects/workAllocation/...
import db from '../../../db/index.js' import { getUserFromLoginSession } from '../user' export const readEatRows = async (userId) => { return new Promise((resolve, reject) => { db.query(` SELECT * FROM eat WHERE user_id = $1 AND time > current_date - interval '6 day' ORDER BY time DESC ` ...
import React from 'react'; import Amplify, { API, Storage, Predictions, PubSub } from 'aws-amplify'; import ModuleCanvas from './canvas'; import ModuleLoading from './loading'; import ModuleWinner from './winner'; import {DRAWTIME, DOODLES} from '../../../constants'; import {getImageByteData} from '../../../helper'; im...
/** sb2musicxml.js Convert scratch project to MusicXML for singing voice synthesis MIT License Copyright (c) 2018 Hiroaki Kawashima 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 wi...
 //angular.module('sharedServices').service('ServerErrorService', function ($uibModal, $scope) { // var that = this; // //$rootScope.$on('ServerErrorOccurred', function (data) { // // var modalInstance = $uibModal.open({ // // animation: true, // // templateUrl: 'App.views/errormodal....
import QueryString from 'querystring'; import { isEmpty } from 'lodash'; import QueryDispatcher from './QueryDispatcher'; // Global Constants const TTL = Infinity; /** * @typedef {Object} DocumentRecord * * @property {Record} data - immutable record * @property {MetaObject} meta - meta object */ /** * @typedef...
#!/usr/bin/env node const fs = require("fs"); const os = require("os"); const opn = require("opn"); const path = require("path"); const underscore = require("underscore"); const folders = require("platform-folders"); const settings = require("./settings"); const processor = require("./scripts/processor"); const confi...
export const config = { username: "jumboFED", password: "jumbofrontendcodeproject", api_base_url: "https://api.themoviedb.org/3", api_key: "6ed12e064b90ae1290fa326ce9e790ff", card_image_base: "https://image.tmdb.org/t/p/w300_and_h450_bestv2/", backdrop_base: "https://image.tmdb.org/t/p/w1000_an...
const qs = require('qs') const Mock = require('mockjs') let usersListData = Mock.mock({ 'data|100': [ { 'id|+1': 1, name: '@cname', nickName: '@last', phone: /^1[34578]\d{9}$/, 'age|11-99': 1, address: '@county(true)', isMale: '@boolean', email: '@email', cre...
$(document).ready(function(){ //If guest is true, hide the profile icon var guest = window.localStorage.getItem('guest'); console.log(guest); if (guest == 'true'){ console.log("Guest is true"); //hide the profile icon $('#profileBtn').hide(); } else { console.l...
import React from 'react'; import { useSelector } from 'react-redux'; import styled from 'styled-components'; const Container = styled.div` width: 100%; text-align: right; color: ${({ theme }) => theme.primaryRed}; padding: 1rem 1rem 0 1rem; `; const ValidationErrors = () => { const location = useSelector(s...
import _ from 'lodash'; import assrt from 'assert'; import { Handler } from './handler'; import { getLogger } from './logger'; class Router { constructor () { this.routes = new Map(); this.logger = getLogger(); } route (url, handler, errHandler, handlerClass = Handler) { assrt(url instanceof RegExp)...
import Vuex from 'vuex' import api from '../api/index' import slugify from './slugify' const store = () => { return new Vuex.Store({ state: { menuIsActive: false, posts: [], currentPost: {}, categories: [] }, actions: { async nuxtServerInit ({ commit }, {store, isClient, isSe...
//console.log("aventador"); const createError = err => { return { error: err }; }; module.exports = createError;
angular.module('app') .factory('AuthenticationService', function($q, appConfig, $ionicPlatform) { var self = {}; console.log('appConfig', appConfig); self.currentUser = null; crud.configure({ base: appConfig.apiURL, protocol: appConfig.apiProtocol }); self.checkStatus = function() { var de...
function solve(lostFights, helmetPrice, swordPrice, shieldPrice, armorPrice){ let helmetBrokenCounter = 0; let swordBrokenCounter = 0; let shieldBrokenCounter = 0; let finalHelmetCounter = 0; let finalSwordCounter = 0; let finalShieldCounter = 0; let finalArmorCounter = 0; while (los...
import { html, css, LitElement } from 'lit-element'; class Main extends LitElement { static get styles() { return [ css` :host { flex: 1; display: block; box-sizing: border-box; } :host div { border: 1px dashed cyan; } ` ]; ...
import React from 'react'; const withTest = Component => props => { if (window.location.href.includes('localhost')) { console.log(props); } return <Component>{props.children}</Component>; }; export default withTest;
import React, { useState } from 'react' import '../css/header.css' import AccountCircleIcon from '@material-ui/icons/AccountCircle'; import SearchIcon from '@material-ui/icons/Search'; import ShopIcon from '@material-ui/icons/Shop'; import Drawer from '@material-ui/core/Drawer'; import { useSelector } from 'react-redux...
import EventPreview from '../Common/Event/EventPreview'; import React from 'react'; const EventList = props => { if (!props.events) { return ( <div className="article-preview">Loading...</div> ); } if (props.events.length === 0) { return ( <div className="article-preview"> No upc...
import { decorate, observable, action } from 'mobx'; import { api } from '../services'; class PostList { posts = []; loadAll = async () => { const posts = await api.Posts.all(); this.posts = posts; } add = async (post) => { try { const response = await api.Posts.add(post); this.posts ...
'use strict'; module.exports = { apiKey: "AIzaSyCQirXTGX-g2_rTK179gUsRgV9lKsQ9ZXk", authDomain: "thunder-sharks-movies.firebaseapp.com", };
import Blog from "./Blog"; const BlogList = ({ posts }) => { let i = 0; return ( <div className="blog-list"> {posts.map(post => ( <Blog post={post} caller={"bloglist"} key={i++}></Blog> ))} </div> ); }; export default BlogList;
$( "#goButton" ).click(function() { var groupName = document.getElementById("group").value; $.get( "./create.php", { group: groupName } ) .done(function( data ) { if (data == 'exists' || data == 'Success!') window.location.href = "./go.php?group=" + groupName; else alert('Something went wrong. :( Reload the...
import _ from 'lodash'; const projectRoles = roles => ( _.map(roles, ({ name, todo }) => ` > - *${name}*: ${todo}\n `) ); const renderProjects = (slackId, projects) => ({ fallback: 'Po\'s Projects', author_name: 'Projects', author_icon: ':beers:', color: 'warning', text: !projects.length ? `Here are...
/*1) Crear una función que recorrar el arreglo alumnos e indique cuantos están aprobados, cuantos están desaprobandos teniendo en cuenta que la nota mínima aprobatoria es 13. Saca el promedio de las notas aprobadas, promedio de notas desaprobadas y el promedio total de notas. Indicar el nombre y la carrera en un consol...
const express = require("express"); require('./connection') // require('./crud') const app = express(); app.listen(5000, () => { console.log(`Server is listening on port 5000`); });
const ec2 = require('@aws-cdk/aws-ec2') const ecs = require('@aws-cdk/aws-ecs') const elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2') const ecr = require('@aws-cdk/aws-ecr') const cdk = require('@aws-cdk/core') class EcsFargateSingleServiceStack extends cdk.Stack { /** * * @param {cdk.Construct} scope ...
// Your web app's Firebase configuration var firebaseConfig = { apiKey: "AIzaSyB7avU0P9YGoQSJbphC-lH3SclS180CT-c", authDomain: "chat-ddf84.firebaseapp.com", databaseURL: "https://chat-ddf84-default-rtdb.firebaseio.com", projectId: "chat-ddf84", storageBucket: "chat-ddf84.appspot.com", messagingSender...
/** * LINKURIOUS CONFIDENTIAL * Copyright Linkurious SAS 2012 - 2018 */ 'use strict'; // external libs const _ = require('lodash'); const PUBLIC_FIELDS = ['type', 'targetType', 'targetName']; const TYPES = { READ: 'read', WRITE: 'write', // read + edit + delete EDIT: 'edit', NONE: 'none', DO: 'do' }; c...
describe('Home', () => { beforeEach(() => { cy.visit('http://localhost:3000') }) it('has the correct title', () => { cy.title().should('equal', 'React App') }) it('has links', () => { cy.contains('EIMSBÜTTELER TV').click() cy.contains('Teams') }) })
const router = require('express').Router(); const faker = require('faker'); const Product = require('../models/product'); const Review = require('../models/review'); const Category = require('../models/category'); //batch of existing Product ids const prodIds = [ "5d3a08492a420740584cad50", "5d3a08492a420...
var qs = require('q-stream'); var assert = require('assert'); var seq = require('../sequence-stream'); describe("sequence-stream", function() { it("should combine a sequence of streams", function() { var results = []; var a = qs(); var b = qs(); var c = qs(); var p = seq([a, b, c]) .pipe(...
import dbConnection from "./msSqlWrapper"; import {getTimestamp, toBasicString} from "../utils"; async function registerUserInDB(email, password, privateKey, publicKey, authorityLevel, forename, surname, companyName, creationDate, blocked) { const queryString = `INSERT INTO users (email, password, privateKey, pub...
/* * @Author: cash * @Date: 2021-11-05 17:07:07 * @LastEditors: cash * @LastEditTime: 2021-11-05 17:08:18 * @Description: file content * @FilePath: \hdl-try\src\views\productCenter\productCategory\hook\initTable.js */ import {t} from "@/common/i18n.js"; const columns = [ { title: t('productCenter.sortingC...
/* * productSearchCriteriaService.js * * Copyright (c) 2016 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ 'use strict'; /** * Creates the service used to interact with the product search box. */ (function() { angular.module('productMaintenance...
const Scope = require("./Scope"); var EnqueueSymbol = function(ctx, enclosingScope, defaultPackageName){ this.setNameWithPackage(ctx, ctx.model_type().getText(), defaultPackageName); this.enclosingScope = enclosingScope; this.definitions = {}; }; EnqueueSymbol.prototype = Object.create(Scope.prototype); En...
/** * @file A jQuery wrapper for ColdFusion websockets. The plugin function is {@link jQuery.ws}. The configuration object is {@link jQuery.ws.config}. This plugin is written in ES6, but the package includes a build command that transpiles (and minifies) it to ES5 using {@link https://babeljs.io/|Babel}. * @author ...
import React, { useState } from 'react'; import { Button, Paper, TextField, useTheme } from '@material-ui/core'; import { useDispatch } from 'react-redux'; import { MAKE_POST } from '../app/actions'; import { EDIT_POST } from '../app/actions'; function PostForm({ id, onClose, defaultTitle, defaultDescription }) { co...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { connect } from 'react-redux'; import { getBooks } from 'Actions/bookActions'; import { getAuthors } from 'Actions/authorActions'; import { fetchGenres } from 'Actions/genreActions'; import { loadP...
import React from 'react'; import Item from './item.js'; const List = (props) => { return ( <ul> {props.list.map((item, i) => <Item key={item.id} link={item.volumeInfo.infoLink} image={item.volumeInfo.imageLinks ?...
'use strict'; var debug = require('debug')('plugin:ldap'); var ldap = require('ldapjs'); function sendError(res,code,msg) { var errorInfo = { "code": code, "message": msg }; res.writeHead(code, { 'Content-Type': 'application/json' }); res.write(JSON.stringify(errorInfo)); res.end(); } module.exports.init = f...
function deleteRows() { document.Form1.action = "/delete"; document.Form1.submit(); // Submit the page } function edit() { if (document.querySelectorAll('input[type="checkbox"]:checked').length <= 1) { document.Form1.action = "/edit"; document.Form1.submit(); // Subm...
const { resolve } = require('path'); const webpack = require('webpack'); const merge = require('webpack-merge'); const { root, src, dist } = require('../config'); const CopyPlugin = require('copy-webpack-plugin'); module.exports = merge.smart(require('./webpack.base'), { target: 'electron-main', entry: { ...
import React, { Component } from 'react'; import { View, Text } from 'react-native'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { fetchUser } from '../redux/actions/index'; export class Main extends Component { componentDidMount() { this.props.fetchUser(); ...
/** * Created by Aniket */ var app = angular.module("app", ['angular-md5', 'ngRoute', 'angularUUID2', 'ngCookies' , 'angularUtils.directives.dirPagination' , 'ngCart']) app.config(['$routeProvider','$sceProvider', function ($routeProvider, $sceProvider) { $sceProvider.enabled(false); ...
var path = require("path"); module.exports = function(app){ app.get("/survey", function(req, res){ res.sendFile(path.join(__dirname, "/../public/survey.html")) }); // this routes to "home" if anything other than "/survey" is entered in URL app.get("*", function(req, res){ res.sendFile(pa...
'use strict'; module.exports = function (app) { function ExpressUtils() { this.backupBody = function (req, res, next) { req.oldBody = req.body; next(); }; this.normalizeBody = function (req, res, next) { var body = req.body, i; ...