text
stringlengths
7
3.69M
/* begin copyright text * * Copyright © 2016 PTC Inc., Its Subsidiary Companies, and /or its Partners. All Rights Reserved. * * end copyright text */ /* jshint node: true */ /* jshint strict: global */ /* jshint camelcase: false */ 'use strict'; var chalk = require('chalk'); var debug = require('debug')("vxs:perf...
import React from "react"; import { View } from "react-native"; // styles import styles from "../styles/main"; const Wrapper = ({ children }) => { return <View style={[styles.wrapper, styles.alignCenter]}>{children}</View>; }; export default Wrapper;
import S3 from 'aws-sdk/clients/s3' const awsConfig = { accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, Bucket: process.env.S3_BUCKET_NAME, endpoint: `http://s3.us-east-1.amazonaws.com/${process.env.S3_BUCKET_NAME}`, region: process.env.AWS_REGION, s3BucketEnd...
import {applyMiddleware, combineReducers, createStore} from 'redux'; import {createOffline} from '@redux-offline/redux-offline'; import offlineConfig from '@redux-offline/redux-offline/lib/defaults'; import {mySaga, sagaMiddleware} from "./actions"; import {composeWithDevTools} from "redux-devtools-extension"; const r...
import React from 'react' import { StyleSheet, Text, View } from 'react-native' import { Button, HelperText, TextInput } from 'react-native-paper' import {useFormik} from 'formik' import * as Yup from 'yup' import Toast from "react-native-root-toast"; export default function Buy(props) { const {product} =props ...
import React, { Component, PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import Board from '../components/Board'; import Button from '../components/Button'; import * as chessActions from '../actions/ChessActions'; import { SAVED_GAME_URL } from '../constant...
const jwt = require('jsonwebtoken'); exports.createUserToken = async user => { return await jwt.sign({ userId: user.id, }, process.env.JWT_SECRET_KEY, { expiresIn: '3d' }); };
const dotenv = require('dotenv'); dotenv.config(); const {LOG_CONSOLE_LEVEL, LOG_LOCAL} = process.env; const glob = require('./globs'); module.exports = { local: LOG_LOCAL, service: glob.moleculer.namespace, console: { level: LOG_CONSOLE_LEVEL }, labelExtractors: ['moleculer'] };
export default { root:{ flexGrow:1, }, navbar:{ height:"11vh", background: "linear-gradient(90.98deg, rgba(196, 196, 196, 0.18) 0%, rgba(196, 196, 196, 0.72) 100%)", }, logo:{ flexGrow:1, height:"10vh", } };
import * as React from 'react'; import { Text, View, StyleSheet, Image, Switch } from 'react-native'; export default class HarryPotter extends React.Component { constructor(){ super(); this.state = { name: 'Harry', showName: false } this.onChange = this.onChange.bind(this); } onCha...
let that = ''; App({ domain: '', data: { }, onLaunch: function () { that = this; that.getSystemInfo() }, getSystemInfo(){ // 获取 wx.getSystemInfo({ success: function(res) { console.log(res.statusBarHeight) that.globalData.statusBarHeight = res.statusBarHeight }, ...
// UT Austin LASE Database interaction application // Designed to support web and native // G. Michael Fitzgerald // Written with IPP Summer 2020 interns! // Sam Kim // Hien (Taylor) Truong // Julia Shea // NOTE: this change must be implemented manually after yarn installation in // order for text selection to work ...
import React from 'react'; const withFilterCustomers = BaseComponent => ({ list, email }) => { const transformedProps = list.filter(customer => customer.email === email) return <BaseComponent list={transformedProps} /> } export default withFilterCustomers;
(function () { 'use strict'; angular .module('emu.views.profile', ['emu.profile', 'emu.user', 'emu.fx']) .controller('ProfileController', ProfileController); function ProfileController(profile, user, currentUser) { var self = this; self.user = user; ...
import initialData from "./initialData"; import { ADD_DEVISE_CARD, ADD_HOME_CARD } from "./Type"; const reducer = (state = initialData, action) => { switch (action.type) { case ADD_DEVISE_CARD: state.listHomes[action.homeID].listDevices.push({ id: state.listHomes[action.homeID].listDevices.length, ...
//higher order function let calc = function(func, first, second){ func(first, second); } let multiply = (a, b ) => console.log('The product of two numbers is '+(a *b)); calc(function(a, b ){ console.log('The product of two numbers is '+(a *b)); }, 6,6); let greet = () => console.log("Hello, Good morning!!")...
const router = require('express-promise-router')() const authController = require('../controllers/auth') const authenticate = require("../helpers/authenticate") router.route('/').post(authController.addUser) router.route('/signin').post(authController.signInUser) router.route('/signout').get(authenticate.isAdmin, auth...
const path = require('path'); const http = require('http'); const express = require('express'); const app = express(); const publicPath = path.resolve(__dirname, 'public'); app.use(express.static(publicPath)); app.get('/', (req, res) => { res.end('Welcome to my homepage!'); }); app.get('/about', (req, res) => { ...
var info_url = "../info/"; // 获取信息列表(后台管理) function FindByCategoryIdPaging_info(ppCategoryId, ppPageIndex, ppPageSize, ppCallBack) { $.post(info_url + "find_by_categoryid_paging", { categoryid : ppCategoryId, pageindex : ppPageIndex, pagesize : ppPageSize, rdm : Math.random() }, function(ppData) { ppCall...
/*-----------------------------*/ /* Libs Utils */ /*-----------------------------*/ if (!Node.prototype.clean) { Node.prototype.clean = function(){ for(var i = 0; i < this.childNodes.length; i ++){ var child = this.childNodes[i]; if(child.nodeType === 8 || child.nodeType === 3 ){ ...
import React,{useEffect} from "react"; import "./Allposts.css"; import {GrFormView,GrEdit} from 'react-icons/gr'; import {MdDateRange} from 'react-icons/md'; import { connect } from "react-redux"; import axios from "axios"; import { Link } from "react-router-dom"; import { HaphSpinner } from "../../../components/Spinne...
import * as actionTypes from "./actionTypes"; let nextLogId = 0; export const setLog = value => { let logs; if(localStorage.getItem("logs") === null) { logs = [] } else{ logs = JSON.parse(localStorage.getItem("logs")) } logs.push({id: nextLogId,...value}) localStorage.setItem("logs", JSON.strin...
import React from 'react'; import { View, } from 'react-native'; import { Container, Button, Text, Icon } from 'native-base'; import { Col, Row, Grid } from "react-native-easy-grid"; import { LogoTitle, Menu, UploadIcon } from '../../../components/header'; import { Departments, Users, Equipments, Fourniseurs } fro...
/** * A classic use of Sockpress with session support (RAM) */ // Load library import sockpress from 'sockpress' // Create new engine using default session controller const app = sockpress({ secret: 'key' }) // Register sample http routes app.get('/index', (_, res) => { res.send('Hello!') }) app.post('/update...
const formatUrlParameters = function(paramsString, delimiter) { const formattedParams = {}; const paramsArray = paramsString.split(delimiter); for (let i = 0; i < paramsArray.length; i++) { const keyValuePairArray = paramsArray[i].split('='); formattedParams[keyValuePairArray[0]] = keyValuePairArray[1];...
function Avatar(user) { return hyperHTML.wire(user, ':avatar')` <img class=avatar src=${user.avatarUrl} alt=${user.name}>`; } function UserInfo(user) { return hyperHTML.wire(user, ':user-info')` <div class="user-info"> ${Avatar(user)} <div class="user-info-name"> ${user.name} </div> ...
var searchData= [ ['hipeextension_0',['HipeExtension',['../md_README.html',1,'']]] ];
var db = global.load_library('Database'); global.load_model = function(name) { var fs = require('fs'); if(typeof name == 'string') { var path = global.APPLICATION_PATH('models/'+name+'.js'); var isExist = fs.existsSync(path) if(isExist) { var model = require(path) return new model(db); }else {...
const readlineSync = require("readline-sync"); let name = readlineSync.question('Can you give me your name please?'); let firstname = readlineSync.question('Can you give me your firstname please?'); let city = readlineSync.question('Can you give me your city please?'); console.log("Hello " + " " + name + " " + firstnam...
/* @flow */ export default Object.freeze({ get types() { return { log: 1, trace: 2, debug: 3, info: 4, warn: 5, error: 6, none: 7 }; }, get range() { return { min: this.types.log, max: this.types.none }; } });
<?php /** This file is part of KCFinder project * * @desc File related functionality * @package KCFinder * @version 2.51 * @author Pavel Tzonkov <[email protected]> * @copyright 2010, 2011 KCFinder Project * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 * @lic...
define([ 'jquery', 'siViewerData', 'jquery-ui', 'kendo', 'siViewerNamespace', 'table-Grid-API', 'window/tableWindow/com.spacetimeinsight.viewer.window.baseTableWindow', 'dialogBox', 'window/com.spacetimeinsight.i18N.window', 'window/com.spacetimeinsight.i18N.window.regional', ], ...
(function () { 'use strict'; angular.module('AdBase').controller('orgcontactsController',orgcontactsController); orgcontactsController.$inject = ['$scope','orgcontactService','countryService']; function orgcontactsController($scope,orgcontactService,countryService){ var self = this ; ...
const { merge } = require('webpack-merge'); const common = require('./webpack.common'); module.exports = merge(common, { mode: 'development', entry: { main: './src/index.ts' }, module: { rules: [ { test: /\.css$/, use: [ 'style-loader', { loader: 'css-loa...
var googlehome = require('google-home-notifier'); var sounds = [ 'https://yambal.github.io/static-mtral/cuckoo_12.mp3', 'https://yambal.github.io/static-mtral/cuckoo_01.mp3', 'https://yambal.github.io/static-mtral/cuckoo_02.mp3', 'https://yambal.github.io/static-mtral/cuckoo_03.mp3', 'https://yambal.github.io/sta...
function (newDoc, oldDoc, userCtx) { function require(field, message) { message = message || "Document mist have a " + field; if (!newDoc[field]) throw({forbidden: message}); }; if (newDoc.type == "post") { require("title"); require("created_at"); require("body"); ...
define([ 'client/views/graph/component' ], function (Component) { var Axis = Component.extend({ position: 'bottom', tickPadding: 6, orient: 'bottom', classed: null, // Not implemented; override in configuration or subclass getScale: function () { throw ('No scale defined.'); }, ...
import mongoose from "mongoose"; const ExchangeSchema = new mongoose.Schema({ chainId: { type: Number, required: true }, name: { type: String, required: true }, factory: { type: String, required: true }, router: { type: String, required: true }, }); export default mongoose.models.Exchange || mongoose.model("E...
db.exercises.insert([ { name: 'Pull Ups', muscle: 'Lats', level: 1, description: 'Grab the pull up bar with an overhand grip. Place your hands around shoulder widith apart. Pull yourself up until your chin is above the bar. Lower yourself down.' }, { name: 'Push Ups', ...
import React, { Fragment } from "react"; import Slider from "react-slick"; // import { Link } from "react-router-dom"; const CastCarousel = ({ carouselName, config, cast }) => { const settings = { dots: false, arrows: true, slidesToShow: 9, infinite: false, slidesToScroll: 1, responsive: [ ...
// import React, { useState, useEffect } from 'react' // import { // AppRegistry, // StyleSheet, // Text, // View, // Image, // ScrollView, // TouchableOpacity, // Button, // StatusBar, // // ScrollView // } from 'react-native'; // import auth from '@react-native-firebase/auth';...
import { companies, userStories, users, tickets, projects } from '../db' const infoAll = () => { return { companies, userStories, users, tickets, projects } } export default infoAll
import Vue from 'vue'; import Router from 'vue-router'; import Course from '@/components/Course'; import Courses from '@/components/Courses'; Vue.use(Router); export default new Router({ mode: 'history', scrollBehavior() { return { x: 0, y: 0 }; }, routes: [ { path: '/', redirect: () => { ...
import React, { Fragment } from "react"; import { FaEnvelope } from "react-icons/fa"; import { MdPhoneInTalk } from "react-icons/md"; import { ImLocation } from "react-icons/im"; import { Container, Row, Col } from "reactstrap"; import "./style.css"; export default function ContactInfo() { let iconStyles = { pa...
var _baseEnt = function( type, scene ) { this.self = ( (typeof(type) == "string") ? BABYLON.Mesh["Create"+type](type, 6.0, scene) : type ); this.dispose = true; } _baseEnt.prototype._get = function(a) { return {'x':this.self[a].x, 'y':this.self[a].y, 'z':this.self[a].z}; } _baseEnt.prototype._set = function( a, ...
var KT = require('./KTMain'); var Utils = require('./KTUtils'); var Vector2 = require('./KTVector2'); function TextureCube(posX, negX, posY, negY, posZ, negZ, params){ this.__kttexture = true; var gl = KT.gl; if (!params) params = {}; this.params = params; this.minFilter = (params.minFilter)? params.minFilter...
$.fn.bootstrapSwitch.defaults.onColor = 'success'; $.fn.bootstrapSwitch.defaults.offColor = 'danger'; var baseurl = window.location.pathname.split("/"); var currentPage = baseurl[baseurl.length - 1]; addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); $(document).ready(function () { i...
const express = require("express"); const server = express(); const routes = require("./routes"); //procura arquivs .ejs dentro de view e executa server.set("view engine","ejs"); //middleware //habilitar arquivos staticos ex: css e images server.use(express.static("public")) server.use(routes) server.listen(proce...
import { createStore, applyMiddleware } from 'redux'; import reduxSaga from 'redux-saga'; import rootReducer from './rootReducer'; import rootSaga from './rootSaga'; const initialState = {}; const sagaMiddleware = reduxSaga(); const store = createStore( rootReducer, initialState, applyMiddleware(sagaMiddleware)...
class MoviesController { // I initialize the controller. constructor( movieService ) { this._movieService = movieService; } // --- // HANDLER METHODS. // --- // I create a movie with the provided name. createMovie( request, response, next ) { this._movieService .createMovie( request.rc.user.id, ...
var gulp = require('gulp'), minifycss = require('gulp-minify-css'), concat = require('gulp-concat'), rename = require('gulp-rename'), uglify = require('gulp-uglify'), fontmin = require('gulp-fontmin'); //压缩css gulp.task('minifycss', function() { return gulp.src('src/css/*.css') //需要操作的文件 ...
import React from "react"; import {connect} from "react-redux"; import {RegisterAccordionAC, ToggleAccordionAC} from "../redux/ux/accordionReducer"; import {generateRandomKey} from "../tools/idGenerator"; const mapStateToProps = state => { return { accordions: state.ux.accordion.accordions, } } const ...
/** *资源菜单类 */ Ext.define('ESSM.model.sys.Resource',{ extend: 'Ext.data.Model', fields: ['id','code','name','type','parentCode','sort','status','uri'] });
import React from 'react'; import ReactDOM from 'react-dom'; import Cast from './Cast'; import Story from './Story'; class Auto extends React.Component{ constructor(props){ super(props) } render(){ return( <section className='auto_holder' > <Story landing={this.props.landing} choice...
var dlgsmime_8c = [ [ "smime_key_flags", "dlgsmime_8c.html#a5afcdba2c41648c28445a5c22a0d0bb0", null ], [ "smime_make_entry", "dlgsmime_8c.html#ae537ba9b6cf5d61ef1590f71514e052a", null ], [ "dlg_select_smime_key", "dlgsmime_8c.html#a0f2785b8d1ac46c70ffdab491475b4f6", null ], [ "SmimeHelp", "dlgsmime_8c.h...
import React from "react"; import PropTypes from "prop-types"; import { connect } from "react-redux"; import { userLogout } from "../../../redux/reducers/logout"; const LogoutModal = props => { const { toggleModal, onLogoutButtonClicked } = props; return ( <div className="container"> <button className="c...
const { baseResolver } = require('../../../libaries/apollo-resolver-creator') const { productWithRecommendation, } = require('../../../libaries/wishlist-matched-percentage') const isAdmin = require('../../../libaries/role-checker') const product = baseResolver.createResolver(async (root, args, context) => { let pr...
const filterRestaurants = (restaurants) => restaurants .filter((restaurant) => !restaurant.is_closed) .sort((a, b) => (a.distance > b.distance ? 1 : -1)) .slice(0, 10); module.exports = filterRestaurants;
var Name="Kunal"; var Age=14; console.log(Name,"is",Age,"years old")
'use strict' const ajax = ( () => { const request = (options) => { let _options = { url: '', method: 'get', dataType: 'json', data: [], onsuccess: function(){}, onerror: function(){} }; _options = Object.assign(_options, options); //method and dataType to lowercase _options.method = _...
import React,{ useEffect,useState } from 'react' import {View,StyleSheet,FlatList, ActivityIndicator} from 'react-native' import { Car } from '../components/Car' import {AppHeaderIcon} from '../components/AppHeaderIcon' import { HeaderButtons,Item } from 'react-navigation-header-buttons' import { useDispatch,useSelecto...
// This is a refs proposal that uses callbacks instead of strings. The callback // can be easily statically typed and solves most use cases. // When a ref is attached, it gets passed the instance as the first argument. // When a ref is detached, the callback is invoked with null as the argument. // refs on DOM nodes ...
const ejs = require('ejs'); //ejs模版引擎 const fs = require('fs'); //文件读写 const path = require('path'); //路径配置 //传给EJS的数据 let data={ title:'nice to meet you~' } //将目录下的mail.ejs获取到,得到一个模版 const template = ejs.compile(fs.readFileSync(path.resolve(__dirname, 'mail.ejs'), 'utf8')); //将数据传入模版中,生成HTML const html = templa...
const n = 626331; function solution(num) { let answer = 0; while (num != 1 && answer != 500) { if (num % 2 === 0) num /= 2; else num = num * 3 + 1; answer++; } if (answer === 500) answer = -1; return answer; } console.log(solution(n));
import axios from "../../helpers/axios" import { productConstants } from "./constants"; export const getProductsBySlug = (slug) => { return async dispatch => { const res = await axios.get(`/products/${slug}`); if(res.status === 200){ dispatch({ type: productConstants.GET...
var inDevMode = process.env.NODE_ENV === 'development' const baseUrl = inDevMode ? 'http://localhost:7777/api/' : '/api/' console.log('In dev mode: ' + inDevMode + '; url: ' + baseUrl) export function getCrimes() { var url = baseUrl + 'crimes' console.log('Fetching crimes from: ' + url) return $.get(url) }
exports.userMutations = ` createUser(userInput: UserInput): User handleBoughtCourse(courseId: String!, amountPaid: Float!): User handlePayout(receiver: String!, amount: Float!): User uploadProfileImage(image: String!): User changeUserInfo(name: String, email: String): User forgotPassword(email: String): Use...
(function() { 'use strict'; angular.module('roster') .config(function($breadcrumbProvider) { $breadcrumbProvider.setOptions({ templateUrl: '/breadcrumb.view.html', prefixStateName: 'home' }); }) .config(['$locationProvider', '$stat...
const express = require('express'); const app = express(); app.get('/', function (req, res) { res.send("this is home page") }); app.get('/about', function (req, res) { res.send("this is about page") }); app.get('/login', function (req, res) { res.send("this is login page : get") }); app.post('/login', f...
import {connect} from 'react-redux'; import React from 'react'; import * as actions from './actions'; import _ from 'lodash'; import Menu from './menuElement'; import Container from './svgContainer'; const App = React.createClass({ propTypes : { members: React.PropTypes.arrayOf( React.PropTypes.oneOfType(...
function setup(){ createCanvas(windowWidth, windowHeight); strokeWeight(5); } function draw(){ background(204); for (var i = 20; i < 400; i += 20) { //if the i is smaller than 400 line(i, 0, i + i/2, 80); // } } function windowResized(){ resizeCanvas(w...
/** * Created by aayang on 10/26/16. */ 'use strict'; angular.module('planner').controller('PlannerController', ['$scope', 'events', '$stateParams', '$location', 'Authentication', function ($scope, events, $stateParams, $location, Authentication) { $scope.authentication = Authentication; $scope....
var supertest = require('supertest'); var chai = require('chai'); var app = require('../src/app'); var nconf = require('../src/lib/nconf'); describe('article.js: posts controller', function() { var jwtToken = '', respData; var data = { title: 'Hello World', content: 'This post is created by unit testing', ...
import React from 'react'; import styles from './style.module.css'; export default function CheckBox({ label }) { const [checked, setCheck] = React.useState(false); const handleClick = () => { setCheck(!checked); }; return ( <div className={styles.root}> <button type="button" className={styles...
import React, { Component } from 'react'; import tableStyle from './style/table-style.css'; export default class Table extends Component { render() { return( <h2 className='tx-table'>Table!</h2> ); } }
const arrayDemo = () => { console.log("----------------------------------------------------------") console.log("All array examples"); console.log("----------------------------------------------------------") let arr1 = []; console.log(arr1); arr1.push("Vamsy") arr1.push("Sagar") a...
'use strict'; function newElement() { let li = document.createElement("li"); let inputValue = document.querySelector("#input").value; let text = document.createTextNode(inputValue); li.appendChild(text); if (inputValue === "") { alert("Надо что-то написать"); } else { document.querySelector("#ul")....
/* eslint-disable import/newline-after-import */ // initialize tracer const express = require('express') const CLSContext = require('zipkin-context-cls') const {Tracer} = require('zipkin') const {recorder} = require('./recorder') const ctxImpl = new CLSContext('zipkin') const localServiceName = 'backend service' const...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Word Guesser Starter Code</title> </head> <body> <div id="guess_display"></div> <form id="guess_form"> <label>Guess a letter: <input type="text" id="guess_input"> </...
import * as firebase from 'firebase'; import { CARRIER_USER_TYPE } from '../utils/constants/users'; import { store } from '../redux/store'; export async function updateUserProfile(request) { const { user } = store.getState().globalReducer; const root = firebase.database().ref(); let response = {}; const update...
import axios from 'axios'; const baseAddress = 'https://reqres.in/api'; class JsonApi { static getAlpUsers() { return axios.get(baseAddress + '/users'); } } export default JsonApi;
jQuery(function () { $('.toast').toast({ animation: true, delay: 5000 }); $('#forgotPasswordLink').on('click', function () { alert('Функция восстановления пароля пока недоступна'); }); $('#loginForm').validate({ rules: { email: { required: true, ...
// package: example // file: example.proto var example_pb = require("./example_pb"); var grpc = require("grpc-web-client").grpc; var Ping = (function() { function Ping() {} Ping.serviceName = "example.Ping"; return Ping; })(); Ping.PingMe = { methodName: "PingMe", service: Ping, requestStream: false, r...
import { LitElement, html } from '@polymer/lit-element'; // import { PageViewElement } from './../../../components/page-view-element'; import '@polymer/paper-material' import '@polymer/iron-pages' import '@polymer/paper-icon-button' // //import "@polymer/iron-icons/iron-icons"; import bulmaStyles from '../../../style/b...
import React, { Component } from 'react' class PlusMinus extends Component { state = { value: 4 } plusClick = (e) => { const newValue = this.state.value + 1 this.setState({ value: newValue }) } minusClick = (e) => {...
exports.up = function(knex, Promise) { return knex.schema.createTable('barang', function(table) { table.increments(); table.string('nama'); table.string('harga'); table.integer('kategori_id', 11); }); }; exports.down = function(knex, Promise) { return knex.schema.dropTable('barang'); };
import { createRoutine } from 'redux-saga-routines'; import { GET_ALL_EMPLOYEES, GET_EMPLOYEES, GET_DEPARTMENT, GET_ALL_DEPARTMENT, GET_CONST_EMPLOYEES, GET_CONST_ALL_EMPLOYEES, DELETE_EMPLOYEES, } from './constants'; export const getEmployeesAction = createRoutine(GET_EMPLOYEES); export const getAllEmpl...
// Map DB config into format for sequelize-cli migrations module.exports = { "development": require('./development.json').database, "production": require('./production.json').database, "test": require('./test.json').database, }
function isNum(num){ return !isNaN(num); } function postEval(postfix){ const base = postfix.split(" "); console.log(base); // console.log(isNum(base[0])); // console.log(isNum(base[5])); const len = base.length; for (var i=0;i<len;i++){ if(isNum(base[i])){ base[i] = par...
import React from 'react' import { Link } from 'react-router-dom'; function Choice() { return ( <div> <div className="row"> <div className="col-md-6 col-lg-6 womenchoice"> <Link to="/womenchoice"> <div className="subhead"> ...
import ConTimeDown from './src/ConTimeDown' /* istanbul ignore next */ ConTimeDown.install = function(Vue) { Vue.component(ConTimeDown.name, ConTimeDown); }; export default ConTimeDown;
import $ from 'jquery'; import Flip from '../Flip' export default class FlipCounter { constructor(minValue, maxValue, initValue) { this.MIN_VALUE = minValue; this.MAX_VALUE = maxValue; if(initValue && this.MIN_VALUE <= initValue <= this.MAX_VALUE) this._currentValue = initValue; // random value e...
(function () { angular.module('Application').service('toastService', ['$mdToast', 'appService', function ($mdToast, appService) { /* Toast */ var last = { bottom: true, top: false, left: false, right: true }; var toastPosition = angular...
import { configure, mount } from 'enzyme'; import React from 'react'; import Adapter from 'enzyme-adapter-react-16'; import Button from '@material-ui/core/Button'; import AuthForm from '../AuthForm'; configure({ adapter: new Adapter() }); describe('<AuthForm />', () => { const renderedComponent = mount(<AuthForm...
import { logger } from "./logger" /** * Handle error occured from controller. * @param {object} error - error object * @param {object} res - express response object */ const errorHandler = (error, res) => { if (!error.message.includes('[step failed]')){ logger('error',error.stack) } res.status(...
(function () { 'use strict'; angular.module("common").service('storageService', storageService); storageService.$inject = ['$window']; function storageService($window) { this.setItem = function (id, item, persistToLocalStorage) { if (persistToLocalStorage) { $win...
//import React from 'react'; import React from "react"; import WeeklyCalendar from "./WeeklyCalendar"; import Card from "react-bootstrap/Card"; import moment from "moment"; const greenColor = "#36D745"; const blueColor = "dodgerblue"; const redColor = "#F73D3D"; const graycolor = "#6c757d"; const yellowcolor = "#ffc10...
const Leave = require("../leaves.model"); const LeaveTypesSeeds = require("../leaveType.model"); const leaveRequest = async (req, res, next) => { try { let leave = await Leave.find({ reportingManagerId: req._id }).populate( "userId leaveData", "name" ); if (!leave) { return res.status(4...
const express = require('express'); const app = express(); app.get('/courses', (request, response) => { return response.json({courses: ['course1', 'course2', 'course3']}); }) app.listen(3333, () => { console.log('no ar') });
export const MODEL_ATTACHMENT_INFO_ONE = { fields: [ { title: "Attach Debit Note", key: "DebitNoteAttachments", type: "files" }, { title: "Attach Others", key: "OthersAttachments", type: "files" } ], lang: "debit-create" }; export const MODEL_ATTACHMENT_INFO_TW...