text
stringlengths
7
3.69M
'use strict'; // Register `availList` component, along with its associated controller and template angular. module('availList'). component('availList', { templateUrl: 'avail-list/avail-list.template.html', controller: ['Avail', '$scope', function AvailListController(Avail, $scope) { this.av...
import Layout from '../views/layout/Layout' const finance = [{ path: '/finance', component: Layout, name: 'finance', redirect: '/finance/list', meta: { title: 'financeMgr', icon: 'el-icon-s-finance', code: '5' }, children: [{ path: 'list', name: 'financeList', meta: { title: 'financeList', icon...
import React from "react"; import styles from "./MercuryParsed.css"; export default class MercuryParsed extends React.Component { render() { return <div> <div className={styles.background} onClick={this.props.close}> </div> <div className={styles.container}> ...
import {createQueryBuilder, getRepository} from 'typeorm'; import {getConnection} from "typeorm"; import {Content} from '../entity/Content'; import {Provider} from '../entity/Provider'; import {Downloads} from '../entity/Downloads'; import {Category} from '../entity/Category'; import {Region} from '../entity/Region';...
module.exports = { fetchAllDrinks(success, source){ $.ajax({ url: "api/drinks", data: source, success(resp){ success(resp); } }); }, fetchSingleDrink(id, success){ $.ajax({ url: `api/drinks/${id}`, success(resp){ success(resp); } }); }, ...
// packages installed const express = require("express"); const path = require("path"); const fs = require("fs"); const { v4: uuidv4 } = require("uuid"); // express app configured to port 3000 const app = express(); const PORT = process.env.PORT || 3000; app.use(express.urlencoded({ extended: true })); app.use(expre...
/*============================================ = Application / Global = ============================================*/ const RADIU = {}; // Alerts function alertUser(message, klass) { flash = $("<div></div>") .attr("class", "alert alert-" + klass) .attr("role", "alert") .text(message); ...
sap.ui.jsview("root.view.App", { getControllerName: function () { return "root.view.App"; }, createContent: function (oController) { // to avoid scroll bars on desktop the root view must be set to block display this.setDisplayBlock(true); this.app = new sap.m.SplitApp(); //this.a...
import React from 'react'; import Helmet from 'react-helmet'; const Services = () => { return ( <> <Helmet> <title>Services page</title> <meta name="description" content="services" /> <meta name="robots" content="INDEX,FOLLOW" /> </Helmet> <h2>Services page</h2> </> ...
var BaseUrl = "http://" + window.location.host; var SiteUrl = "http://" + window.location.host + "/shop"; // var ApiUrl = "http://121.196.201.195"; var ApiUrl = "http://" + window.location.host + "/mobile"; // var ApiUrl = "http://" + document.domain + "/mobile"; //121.196.201.195 var pagesize = 10; var WapSiteUrl = "h...
/** * HW 6-1 Write an aggregation query that will determine the number of unique companies with which an individual has been associated. **/ db.companies.aggregate( [ { $match: { "relationships.person": { $ne: null }}}, { $project: { name: 1, relationships: 1, _id: 0 } }, { $unwind: "$relationships" ...
import React from "react"; const PersonForm = ({ onSubmit, newName, handleNameChange, newNum, handleNewNum, }) => { return ( <form onSubmit={onSubmit}> <h2>add a new</h2> <div> name: <input value={newName} onChange={handleNameChange} /> </div> <div> numbe...
import { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import Immutable from 'immutable'; import { getAuthorSelector } from './../../selectors/authors'; import { loadAuthorDetails } from './../../actions/authors'; class AuthorDetails extends Component { static propTypes = { author:...
// common import Bridge from '../../common/sink/Bridge'; import Logger from '../../common/sink/Logger'; import DataRecorder from '../../common/sink/DataRecorder'; import SignalRecorder from '../../common/sink/SignalRecorder'; // client only import BaseDisplay from './BaseDisplay'; import BarChartDisplay from './BarCha...
var express = require('express'); var router = express.Router(); var company = require('../server/controllers/company'); /* GET company listing. */ router.get('/', function(req, res, next) { //console.log("first test"); company.getCompanyList(req,res); }); router.post('/', function(req, res, next){ //cons...
import {Component} from "react"; import ReactDOM from "react-dom"; import {QueryString} from "../pack/util"; const List = class extends Component{ constructor(){ super(); this.getData = userClass => { $.ajax({ url : this.props.href, success : data => { userClass.setState({ currentIndex : this...
import React from 'react' import { Row, Col, Button } from 'react-bootstrap' export default function Footer() { return ( <Row style={{ backgroundColor: "#999", minHeight: '10vh', display: 'flex', alignItems: 'center' }}> <Col style={{ textAlign: "center" }}>Want to have a stall, contact or co-operate</Col>...
import React, { Component } from 'react' import { BigNumber } from 'bignumber.js'; export default class Index extends Component { componentDidMount() { /* * * 加 plus * 减 minus * 乘 multipliedBy * 除 dividedBy * */ /**decimalPlaces([dp[,rm]]) 精度调整 ** * dp 小数位数 * rm round mode...
import Vue from 'vue'; import swal from 'sweetalert2'; const DEFAULT_CONFIG = { confirmButtonText: 'OK', cancelButtonText: 'Cancel', reverseButtons: true, allowEnterKey: false, focusConfirm: false }; const WARNING_CONFIG = { type: 'warning', showCancelButton: true, titleText: '', t...
import React from 'react' function MemesGeneratorHeader() { return ( <header> <div className="container"> <h1 className="text-center">Memes Generator</h1> </div> </header> ) } export default MemesGeneratorHeader
class vec3 { constructor(x, y, z) { this.x = x; this.y = y; this.z = z; } get length() { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); } get sqrlen() { return this.x * this.x + this.y * this.y + this.z * this.z; } a...
// Sample formController test // Inspired by the angular form directive tests at // https://github.com/angular/angular.js/blob/v1.2.x/test/ng/directive/formSpec.js // Load the app // Definition included in test for completeness var app = angular.module('FormApp', []); app.run(function($templateCache) { var form =...
import React, { Component } from 'react'; import AutoForm from 'react-auto-form'; import styled from 'styled-components'; import { Box, Heading, Image, Text, Button, TextInput, Select, CheckBox, RadioButton, Anchor } from 'grommet'; import Layout from '../components/layout'; import Field from '../components/Field'; i...
import React from "react" import axios from "axios" import { connect } from "react-redux" import FormContainer from "./Form/index" import Buttons from "./Buttons/index" import Joi from "joi-browser" import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap" class CreatePartyPage extends React.Comp...
import React from 'react'; import { Layout, Menu } from 'antd'; import './App.css'; import { BrowserRouter, Route} from 'react-router-dom'; import { NavLink } from 'react-router-dom'; import Start from './components/Start/Start' import Introduction from './components/Introduction/Introduction' import Components from '....
//Copyright 2012, John Wilson, Brighton Sussex UK. Licensed under the BSD License. See licence.txt function _3DEdge(startpoint,endpoint) { this.startpoint = Vector4.Create(startpoint) ; this.endpoint = Vector4.Create(endpoint) ; this.normal = Vector4.Create() ; this.vector = Vector4.Create() ; this.class...
import { headerView } from "../views.js" import DataServices from '../services/DataServices.js' export default class HeaderController { constructor(element) { this.element = element // header HTML element this.visitorname = DataServices.getAuthUserName() // obtengo el nombre del usuario registrado...
/* ------------------------ */ /* -- API Router -- */ /* ------------------------ */ exports.test = function(req,res) { db.Team.findAll({where: {status: 'active'}, attributes: ['short_name', 'id'] }).success(function(teams) { var picks = ["AFC-North-Bengals", "AFC-South-Colts", "AFC-East-Dolphins", "AFC-W...
import React from "react" import styled from "styled-components" const NavbarC = (props) => ( <Wrapper className={props.className}> <MainWrap> <Header onClick={props.titleOnlick}>{props.title}</Header> <MenuWrap> {props.menus.map((v,i) => ( <MenuTitleWrap key={i} onClick={v.onCli...
/* * grunt-mincer * https://github.com/pirxpilot/grunt-mincer * * Copyright (c) 2012 Damian Krzeminski * Licensed under the MIT license. */ var Mincer = require('mincer'); exports.init = function(grunt) { 'use strict'; var exports = {}; exports.mince = function(src, dest, include, helpers, engines, con...
import React, { useState, useEffect } from 'react'; // TEMPORARY - Commenting out as this will be utilized once we render the implementation of the working activities display feature. Utilize components as necessary. // import { CurrentActivity } from './CurrentActivity'; // import { NextActivity } from './NextActivit...
angular .module('altairApp') .controller("dataFormsController56", ['$scope', 'mainService', '$stateParams', function($scope, mainService,$stateParams) { /*mainService.withdomain("post", "/getPlanListByForm/181").then(function(data) { console.log(data); });*/ $scope.proleGrid1 = { dataSo...
const path = require("path"); const router = require("express").Router(); const userRoutes = require("./userRoutes"); const projectRoutes = require("./projectRoutes"); const projectformRoutes = require("./projectformRoutes"); router.use("/users", userRoutes); router.use("/projects", projectRoutes); router.use("/projec...
const gulp = require('gulp'); const del = require('del'); gulp.task('clean-dev', function(cb) { del(['dist/dev/**']).then(function() { cb(); }); }); //clear all prod folders and tmp dir gulp.task('clean-prod', function(cb) { del(['.tmp/**', 'dist/prod/**']).then(function() { cb(); }); });
'use strict'; angular.module('app.channels') .controller('MessagesCtrl', ['$scope', 'ChannelMessages', 'Socket', 'Users', 'channel', 'messages', 'user', 'focus', function($scope, ChannelMessages, Socket, Users, channel, messages, user, focus) { var self = this; self.messages = messages; self.ch...
import React from 'react'; import FA from 'react-fontawesome'; import Tile from 'components/tiles/tile.js' import WebGL3D from './webGL3D.js'; import Cam from './cam.js'; export default class Print extends React.Component { constructor(props) { super(props); this.state = { } } st...
// let mainObject = { // a: 11, // b: 8, // c: { // x: 5, // y: { // g: 12, // h: 25, // i: 'опа-ча!', // j: null, // }, // }, // } // let mainObject = ['Привет', ['эта', 'хрень'], ['вроде', ['работает']]]; fun...
/** * Created by nonesome on 16/3/31. */ ;(function(win) { var canvas=document.getElementById('canvas'); var ctx=canvas.getContext('2d'); var Round = { init: function() { Round._bind(); Round.canvas(); }, _bind: function() { var $sprite = $("#J_s...
AppController = FlowRouter.group({ triggersEnter: [function(context, redirect) { if(!Meteor.userId()) { Session.set("loginRedirectContext", "Redirect"); redirect('/'); } }] }); FlowRouter.route('/', { name: 'home', action() { BlazeLayout.render("HomeLayo...
import { Link } from "react-router-dom"; function Welcome(props) { return ( <> <div className="heading"> <h1>Welcome to ScaffoldZoid</h1> </div> <div className="description"> <div className="image"> <img src="https://cdn.pixabay.com/photo/2014/...
$(document).ready(function() { var prewidth = 12; var windowHeight = $(window).height(); var menuBarHeight = $(".navbar-fixed-top").height() + $(".binMenuBar").height() + (($("section").outerHeight(true) - $("section").outerHeight()) / 2); var codeContainerHeight = windowHeight - menuBarHeight; $("....
'use strict'; const debug = require('debug')('debug:new-user'); const User = require('../../model/user.js'); const testData = require('./test-data.js'); module.exports = function() { debug('creating new user'); return new User(testData.exampleUser) .generatePasswordHash(testData.exampleUser.password) .then(u...
import React, { useState } from 'react' import PropTypes from 'prop-types' // import DrawerMenu from 'rc-drawer' import { Box, IconButton } from 'theme-ui' import { FaBars, FaTimes } from 'react-icons/fa' // import useScrollDisabler from '@components/useScrollDisabler' import Loadable from '@loadable/component' import ...
class PointsBar extends HTMLElement{ constructor(){ super(); this.upvotes=0; this.downvotes=0; } static get observedAttributes(){ return ["vote","key",'upvotes','downvotes']; } connectedCallback() { this.upvotes=parseInt(this.getAttribute("upvotes")); this.downvotes=parseInt(this.getAttribute("downvote...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsFlightLand = { name: 'flight_land', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.5 19h19v2h-19zm7.18-5.73l4.35 1.16 5.31 1.42c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5....
$(document).ready(function() { "use strict"; var av_name = "schematicRepCON"; var av = new JSAV(av_name); // Slide 1 av.umsg("Suppose that we have a regular expression $r$. We want to find a simple representation for the NFA that accepts $r$."); av.displayInit(); // Slide 2 av.umsg("The NFA should ...
/* See license.txt for terms of usage */ define([ "firebug/firebug", "firebug/lib/trace", "firebug/lib/events", "firebug/lib/string", "firebug/debugger/debuggerLib", "firebug/debugger/script/sourceFile", "firebug/debugger/script/sourceLink", ], function(Firebug, FBTrace, Events, Str, Debugg...
var app = { initialize: function() { this.bindEvents(); }, bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceReady: function() { /*document.getElementById('myFetchBtn').addEventListener('click', app.checkForUpdate);*/ ...
(function(){ "use strict"; angular .module("ngGamebase") .factory("gamesFactory", function($http){ function getGames(){ return $http.get('data/data.json') } return { getGames: getGames } }) })();
import { expect } from "chai"; import { render, cleanIt } from "reshow-unit"; import useMounted from "../useMounted"; describe("test useMounted", () => { afterEach(() => { cleanIt(); }); it("basic test", () => { let hackGlobal; const Foo = () => { hackGlobal = useMounted(); return null; ...
import { RECIEVE_POST, NEW_POST } from "../actions/actionCreators"; export const initialState = { postscontent: { posts: [], newpost: [] }, postlistbtn: false, postdetailbtn: false, newpostbtn: false, npost: { title: "", body: "" } }; function posts(state = initialState.postscontent.post...
head.load( {file:'node_modules/jquery/dist/jquery.min.js'}, {file:'node_modules/angular/angular.js'}, {file:'node_modules/angular-storage/dist/angular-storage.min.js'}, {file:'node_modules/angular-route/angular-route.min.js'}, {file:'node_modules/angular-filter/dist/angular-filter.min.js'}, {file:'nod...
// pages/login/firstlogin/firstlogin.js var app = getApp(); Page({ /** * 页面的初始数据 */ data: { userinfo: null, image:null, index:"https://qczby.oss-cn-shenzhen.aliyuncs.com/others/login.jpg" }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 ...
import React from 'react'; // import { Link } from 'react-router-dom'; import './css/css/normalize.css'; import './css/css/bootstrap.min.css'; import './css/css/font-awesome.min.css'; import './css/css/main.css'; class Index extends React.Component{ render(){ return( <div> <p>Salom</p> </di...
document.getElementById("t1").innerHTML = test(); const createProfile = (name, age, gender) => ({ name, age, gender }); function test() { Object.keys(createProfile("test", 20, "M")); }
'use strict'; angular.module('reports') .config(function($stateProvider) { $stateProvider.state('reports.all', { url: '', templateUrl: 'app/reports/all/all.html', controller: 'ReportsAllCtrl', controllerAs: 'reportsAllCtrl', data: { label: 'Reports' } }); });
var searchData= [ ['main_20page',['Main Page',['../index.html',1,'']]], ['md_5frencoder',['MD_REncoder',['../class_m_d___r_encoder.html',1,'MD_REncoder'],['../class_m_d___r_encoder.html#af6c2681d275807aa35d05c77bbfcab7a',1,'MD_REncoder::MD_REncoder()']]], ['md_5frencoder_2ecpp',['MD_REncoder.cpp',['../_m_d___r_en...
import axios from 'axios' class AuthService { constructor() { this.app = axios.create({ baseURL: `${process.env.REACT_APP_BASE_URL}`, withCredentials: true }) } login = (mail, pwd) => this.app.post('/login', { mail, pwd }) signup = (mail, pwd, name) => this.app...
const Slider = ` <!-- ##### Hero Area Start ##### --> <section class="hero-area hero-post-slides owl-carousel"> <!-- Single Hero Slide --> <div class="single-hero-slide bg-img bg-overlay d-flex align-items-center justify-content-center" style="background-image: url(img/bg-img/front1.jpg);"> <!-- Post Co...
// hello.test.js, again import React from "react"; import { render, unmountComponentAtNode } from "react-dom"; import { act } from "react-dom/test-utils"; import pretty from "pretty"; import Login from "./login"; let container = null; beforeEach(() => { // setup a DOM element as a render target container = docum...
'use strict'; const bcrypt = require('bcrypt'); const User = require('../models/user'); const jwt = require('jsonwebtoken'); const config = require('../../config'); module.exports.create = (req, res, next) => { const query = User.findOne({ email: req.body.email }).exec(); query.then(function(user) { if(user)...
import React from 'react'; import style from './product-description.css'; import Heading from '../../tags/heading/heading.jsx'; import Poster from '../../tags/poster/poster.jsx'; import Button from '../../tags/button/button.jsx'; export default ({ title, href, className, children }) => ( <div className={['produ...
(function() { // 这些变量和函数的说明,请参考 rdk/app/example/web/scripts/main.js 的注释 var imports = [ 'rd.controls.Table','css!base/css/table3.0Style','css!rd.styles.IconFonts','rd.attributes.theme' ]; var extraModules = [ ]; var controllerDefination = ['$scope', main]; function main(scope) { ...
var RoboHydraHead = require("robohydra").heads.RoboHydraHead; var RoboHydraJsonHead = require("../robohydra-json-head").RoboHydraJsonHead; var find = require("lodash/fp").find; var cvs = require("./cvs"); exports.getBodyParts = function(conf) { return { heads: [ RoboHydraJsonHead('/cv', () => c...
import React from 'react'; import styled from 'styled-components'; import {FormattedMessage } from 'react-intl'; const H2 = styled.h2` text-align: center; margin: 20px auto; font-size: 2em; `; export default () => ( <H2><FormattedMessage id="PAGE_NOTFOUNT_VALUE"/> (404)</H2> );
export default (r, f, s) => { /** * @return {number} residence time */ const residence = () => { if (r) return r if (!f) throw new Error('Flow not defined.') return s / f } /** * @return {number} flow rate */ const flow = () => { if (f) return f if (!r) throw new Error('Residence ...
import React from "react"; import "./Featured.css"; const Featured = () => { return ( <div className="featured-wrapper"> <div className="featured-bottle"> <div className="featured-bottle-img"></div> <div className="featured-bottle-blob"></div> <div className="featured-bottle-ring"><...
import React, {Component} from 'react'; import Country from './country'; require('../scss/style.scss'); class App extends Component { constructor() { super(); this.state = { search: '', imageSrc: '', country: '', countries: [] } } h...
export const MSG = { INPUT_PLAYER: '자동자 이름을 입력해주세요.', MAX_PLAYER: '자동차 이름은 최소 1자에서 최대 5자까지 입력할 수 있습니다.', INPUT_COUNT: '시도 횟수를 입력해주세요.', FORWARD: '⬇️', CONGRATULATIONS: '🎇🎇🎇🎇축하합니다!🎇🎇🎇🎇', }; export const PLAYER_STATE = { FORWARD: 'forward', STOP: 'stop', };
import * as ActionTypes from '../redux/ActionTypes'; // const initialState = { // items: [], // item: {} // } export const FaReducer = (state = { isLoading: true, errMess: null, data: {} }, action) => { switch (action.type) { case ActionTypes.SUCCESS: return { ...state, isLoading: fa...
var moduloT=angular.module("T",[]); var moduloA=angular.module("A",["T"]); var moduloB=angular.module("B",[]); var app=angular.module("app",["A","B"]); app.value("tamanyoInicialRectangulo",{ ancho:5, alto:3 }); function Rectangulo(tamanyoInicial) { this.ancho=tamanyoInicial.ancho; th...
import React from "react" import '../index.css' function MyInfo(){ return ( <div id="myinfo"> <h1>Masnoon Junaid</h1> <p>All I do is a flex</p> <p>I don't need a reason</p> <ul > <li className="list">Japan</li> <li className="list">Turkey</li> <li className="list">...
import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; import { BrowserRouter } from "react-router-dom"; import UserDataProvider from "./context/userDataProvider"; import MusicDataProvider from "./context/musicDataProvider"; ReactDOM.render( <BrowserRouter> <UserDataProvider> ...
'use strict'; const dataAccessLayer = require('../sdk/db/dataAccessLayer.js'); const constants = require('../utilities/constants'); class Resolvers { constructor(dbLayer = dataAccessLayer) { this.dataAccessLayer = dbLayer; this.getDevice = this.getDevice.bind(this); this.getDevices = this.getDevices.bind...
import React,{ Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from './resource/connect'; class SwitchButton extends Component{ static propTypes = { themeColor: PropTypes.string, onSwitchColor: PropTypes.func } handleSwitch(color){ if(this.prop...
/* author:黄浩华 * date:2014年8月27日 15:57:29 * ver:0.3 * * 使用前:必须在引用jq后引用此js * * 使用案例: * var popup=new H.showpopup({ title:"欢迎", text:"欢迎使用红棉", vertical:"bottom", Horizontal:"right", width:200, color:"red", closeEvent:"delet", isBlack:false, }); */ var H=function(){ this.showpo...
/** * Copyright 2013, 2015 IBM Corp. * * 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 law or agreed to...
const superKey = "name"; const superValue = "Bruce"; const obj = { [superKey] : superValue } obj.value = 'fsdfsd'
var dauQuery = function(){ // get jql script params for active users query, return result is daus this month var newDAUActiveUserScript = $('#jql-dau-active-users').html(); newDAUActiveUserScript = $.trim(newDAUActiveUserScript); //placeholders for graph var DAUs = {} var dauData ={} MP.ap...
import React, { Component } from 'react' import {Breadcrumb} from 'sub-antd'; import './sysBreadCrumbsNav.scss' export default class SysBreadCrumbsNav extends Component { constructor(props){ super(props); } render() { return ( <div className='navigator'> <Br...
var simpletree = require('../'), assert = require('assert'); var tree = new simpletree.Tree(); assert.equal(tree.getData('/'), null); tree.createNode('/node1', { data: 1 }); var result = tree.getData('/node1'); assert.ok(result); assert.ok(result.data); assert.equal(result.data, 1); tree.setDa...
(function(){ 'use strict'; angular.module('yrzb.controllers') .controller('AppCtrl', function($rootScope, $scope, $util, $api, $publicApi, $ui, $state, $ionicHistory, $sessionStorage, $location) { // 用于controller之间传参数的全局对象 $scope.rootTransferParams = {}; // 跳转方法 $scope.toPage = $util.toPage; ...
/* home/scripts.js Copyright (C) 2012 David Yamnitsky 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, me...
module.exports = angular.module('stf.uixml-analysis', [ require('stf/filter-string').name, require('stf/socket').name ]) .factory('UiXmlAnalysisService', require('./uixml-analysis-service'))
const inquirer = require('inquirer'); const fs = require('fs'); const Manager = require('./Manager'); const Engineer = require('./Engineer'); const Intern = require('./Intern'); function init(){ initHTML(); makeManager(); } function makeManager(){ inquirer .prompt([ { type:'inpu...
const { src, dest, series, } = require('gulp'); const rename = require('gulp-rename'); const imageResize = require('gulp-image-resize'); const plumber = require('gulp-plumber'); const notify = require('gulp-notify'); const config = require('./config.js'); function buildIcons(cb) { config.iconSizes.forEach(functi...
import {types} from "mobx-state-tree"; import {v4 as uuidv4} from 'uuid' const Error = types.model('Todo',{ id: types.optional(types.identifier, () => uuidv4()), type: types.string, content: types.string, show: types.optional(types.boolean, true), }) export default Error
'use strict'; require("angular"); require("angular-route"); require("angular-cookies"); require("angular-resource"); require("angular-loading-bar"); require("./core/core.module.js"); require("./manager-list/manager-list.module.js"); require("./manager-detail/manager-detail.module.js"); require("./client-list/client-l...
var express = require('express'); var app = express(); var server = require('http').Server(app); var path = require('path'); var Food = require('./models/foodSchema').Food; var Component = require('./models/componentSchema').Component; var cors = require('cors'); var bodyParser = require('body-parser'); var port = pro...
'use strict' const faker = require('faker') module.exports = function createCustomer () { const addresses = [] const amount = Math.ceil(Math.random() * 3) for (let i = 0; i < amount; i++) { addresses.push({ address: faker.address.streetAddress(), addressId: faker.random.uuid() }) } ret...
export default router => { router.get('test', async(ctx,next) => { ctx.body = "test"; await next(); }) }
// Retrieve info from the create form document.querySelector('#email').value = localStorage.getItem('mail'); function login() { let userValid = (localStorage.getItem('mail') == document.querySelector('#email').value); let passValid = (localStorage.getItem('psw') == document.querySelector('#pass').value); if (userV...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const diplomasSchema = new Schema({ title: { type: String, required: true }, beschrijving: { type: String, required: true }, school: {type: String, required: true}, startDatum: { type: String, required: true }, endDatum: { type:...
/** * Copyright: Daniel Bunzendahl * License: MIT * * Koa Sub-Domain Constructor. * @param {Object} sub Subdomain can be also a FQDN or a wildcard like *.example.com * œparam {Object} r Can be a generator function or a Koa-router * @api public */ function Subdomain(sub, r){ if (!(this instanceof Subdomain)){ ...
$(document).ready(function() { $("form#sentence").submit(function(event) { var sentArray = $("input#sentence").val().split([" "]); var newArray = []; sentArray.forEach(function(word) { if (word.length >= 3){ newArray.push(word); }; }); var reverseArray = newArray.reverse()....
describe('P.views.programs.schedule.DateEdit', function() { 'use strict'; var View = P.views.programs.schedule.DateEdit; describe('render', function() { beforeEach(function() { this.model = new Backbone.Model(); this.view = new View({ model: this.model }); }); it('must not ...
import React, { useState } from "react" import { useDispatch } from "react-redux" import { Form, Button } from "react-bootstrap" import { loginByCredentials } from "../reducers/loginReducer" const Login = () => { const [username, setUsername] = useState("") const [password, setPassword] = useState("") const d...
'use strict'; // Import chai. let chai = require('chai'), path = require('path'); // Tell chai that we'll be using the "should" style assertions. chai.should(); // Import the various creatures class. let Animal = require(path.join(__dirname, '../lib', 'animal')); let Dragon = require(path.join(__dirname, '../lib',...
/****************************************************************************** * Compilation: node AddressBook.js * * Purpose: Program which is used to maintain an address book. An address * book holds a collection of entries, each recording a person's * first and last names, address...
//=:======pour le bouton Post=:=======:=======:=======:=======:=======:=======:=======:=======:=======:====== (avant on le mettait dans un autre js genre highchart.js var index = {}; index.start = function () { document.addEventListener("keydown", index.on_click);// pour evenment quand on appui sur une touche docume...