text
stringlengths
7
3.69M
import React from 'react'; import { useFormik } from 'formik'; import * as Yup from 'yup'; import {useDispatch, useSelector} from "react-redux"; import {addUser, usernameChange, roleChange} from "../../../store/actions/app"; import { useHistory } from 'react-router-dom'; const Registration = () => { let users = u...
'use strict' angular.module('soniaSpaApp').factory('articleFactory', function ($http){ var getAll = function(){ return $http({ method: 'GET', url: '/api/article/' }); } return { getAll: getAll } });
game.LoadingScreen = me.ScreenObject.extend({ init : function() { this.parent(true); this.invalidate = false; this.loadPercent = 0; me.loader.onProgress = this.onProgressUpdate.bind(this); this.logo = null; }, onResetEvent: function() { if (this.logo == null) { // init stuff if not yet do...
module.exports = { siteMetadata: { title: `Shreya Shankar`, author: `Shreya Shankar`, description: `Making machine learning work in the real world.`, siteUrl: `http://shreya-shankar.com/`, social: { twitter: `sh_reya`, }, }, plugins: [ { resolve: `gatsby-transformer-remark`...
var name = "John"; var talk = function () { var name = "Sandy"; console.log("My name is", name); } talk(); var walk = function () { console.log(name, "is walking."); } walk();
import React from 'react'; import { Container, ContentListas, ContentListMovies, ContentMovie } from './styles'; export function LinhaDeFilmes({title, items}) { return ( <Container> <h2>{title}</h2> <ContentListas> <ContentListMovies> {items.results.l...
//获取cookie export function getCookie(name) { let cookieStr = document.cookie; if(cookieStr.length==0)return; let arr; let res = null; if (cookieStr.indexOf(';') > -1) { arr = cookieStr.split(';'); arr.forEach((cookie, index) => { let tmp_arr = cookie.split('='); if (tmp_arr[0] == name) { res = tmp_a...
WinJS.Namespace.define('malfiGlobals', { session: [], gridView: true, displayedItemsArray: [], searchedItemsArray: [], searchHistoryArray: [], invokedDiv: null, activeUser: '', activeHost: '', loadingInProgress: false, rootFolder: [], selecteditemsArray: [], c...
$(document).ready(function() { $ludyTrigger = $('.ludy-trigger'); $ludyWrapper = $('.ludy-wrapper'); $ludyTrigger.on('click', function() { $(this).slideUp(400, function() { $ludyWrapper.slideDown(400); }); }); });
// Conceito "chave/valor" const saudacao = 'Opa!'; function exec() { const saudacao = "Diz aí!!!!" return saudacao } // Objetos são grupos aninhados de chaves/valores const cliente = { nome:'Pedro', idade:'32', peso: '76', endereço: { rua: 'Rua dos bobos', numero: 0, } } console.log(saudacao); console.l...
/*************************** * BUSCA BINÁRIA * * Requer um conjunto de dados ORDENADO. * Atua dividindo o vetor sucessivamente em metades aproximadas, * até que o valor de busca seja localizado, ou que o ponteiro * de fim acabe antes do ponteiro de início. Essa última situação * indica que o valor de busca não ...
import React, {Component} from 'react' import { connect } from 'react-redux' import { resetAuthedUser } from '../actions/authedUser' import { NavLink, withRouter } from 'react-router-dom' class Navbar extends Component { state = {showLogout: true}; constructor(props) { super(props); this.s...
$(function () { $("button[name='submit']").click(function (){ //获取注册信息 var username = $("input[name='username']").val().trim(); var password = $("input[name='password'").val().trim(); var gender = $("input[name='gender'").val(); var age = $("input[name='age']").val().trim(); var city = $("select[nam...
'use strict'; module.exports = (sequelize, DataTypes) => { const PrductColor = sequelize.define('PrductColor', { imagepath: DataTypes.TEXT }, {}); PrductColor.associate = function(models) { // associations can be defined here PrductColor.belongsTo(models.Products,{foreignKey:'ProductId'}); PrductC...
import React from 'react'; import styled from 'styled-components'; const StyledLogo = styled.svg` width: 27px; height: 40px; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); animation: 500ms ease-in-out infinite alternate pulse; @keyframes pulse { from { transform: ...
'use strict'; var repos = require('./github/githubRepos'); var issues = require('./github/githubIssues'); var filter = require('./filter/randomFilterStrategy.js'); exports.findIssue = function(req, res) { repos.select(req.params.language, filter.get).then(function (repoName) { return issues.select(repoName, filter...
// The implementation is based on the code in Filament Engine: https://github.com/google/filament // specifically, shaders here: https://github.com/google/filament/tree/24b88219fa6148b8004f230b377f163e6f184d65/filament/src/materials/ssao // --------------- POST EFFECT DEFINITION --------------- // /** * @class * @na...
// eslint-disable-next-line import/named import { NEWSLETTER_SUBSCRIPTION_SUCCESS, NEWSLETTER_SUBSCRIPTION_FAILURE } from './actions'; const initialState = {}; export default function (state = initialState, action) { switch (action.type) { case NEWSLETTER_SUBSCRIPTION_SUCCESS: return action.payload; ...
import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import qs from 'query-string'; import { Redirect } from 'react-router-dom'; @inject('store') @observer export class AuthPage extends Component { componentWillMount() { const parsed = qs.parse(this.props.history.location.has...
const shadow = extend(UnitType, "shadow", { draw(unit) { this.super$draw(unit); Draw.rect("basement-shadow-spinner", unit.x, unit.y, Time.time * 10); Draw.rect("basement-shadow-spinner-outline", unit.x, unit.y, Time.time * 10); Draw.rect("basement-shadow-glow", unit.x, unit.y, Time....
var dir_e0b72804fc6af7ff2a40eccee45fe58a = [ [ "Options", "dir_4b8906d65f34608a697cf4d1b25db375.html", "dir_4b8906d65f34608a697cf4d1b25db375" ], [ "Responses", "dir_47d4e96897544e1c4e9e5c2c5a482c79.html", "dir_47d4e96897544e1c4e9e5c2c5a482c79" ], [ "C1ConnectorContractor.h", "_c1_connector_contractor_8h_sou...
var t = require('./talk') function constructor () { // A function, the same as any other this.blah = 'Aargh' } constructor.prototype.hrm = 'Yeah...' // So what happend? var obj = new constructor // New created an object that inherited from constructor.prototype // Then magically executed constructor in it's conte...
import KeyCodes from 'keycodes-enum'; import AccessibilityModule from '../../index'; describe('ScrollBarData', () => { describe('register role', () => { let cjsScrollBar; let scrollBarEl; let orientationVal; let shouldEnableKeyEvents; beforeEach(() => { cjsScrollBar = new createjs.Shape();...
import { Link } from '@reach/router' import React from 'react' const Game3 = props => { const { loaded, allPlayers, updateStatus } = props; const clickHandler = (player,index,setStatus) => { updateStatus(player,index,setStatus); } return ( <div> <table className="table tabl...
// DETERMINE LOCATION CENTERING function centerFinder(obj) { obj.addEventListener('touchstart', function(e) { this.offset_x = e.x; this.offset_y = e.y; if (typeof this.origin == 'undefined') { this.origin = this.center; } this.zIndex = 50; }); obj.addEventListener('touchmove', function(e) { this.center ...
import React from "react"; import { Field, reduxForm } from "redux-form"; import renderField from "components/FormInputs/renderField"; import authLib from '../../../config/authlib'; class HandoverForm extends React.Component { constructor(props) { super(props); console.log(props); this.state = { lo...
// Main navigation menu function ShowSection(nav_id) { // Button press command differentiation from the URL // INTENDENT USAGE www.shmulman.co.il/index.html?Cost // var Command = URL_Command(); // document.getElementById("Output4").innerHTML = "Command = " + Command; // if (Command == 'Home') {nav_i...
/* eslint-disable no-plusplus */ /* eslint-disable guard-for-in */ const obj = { name: 'мечник', health: 10, level: 2, attack: 80, defence: 40, } export default function orderByProps(object, order) { const arr = [] for (const prop in object) { arr.push({ key: prop, value: object[prop] }) } arr.sort((a, b...
import BaseModel from './BaseModel'; import cards from '../cards'; import AnaliticsCounter from './AnaliticsCounter'; export default class HackerSpaceModel extends BaseModel { constructor() { super('Hacker Space'); this.categories = cards[0].map((name) => ({ name })); this.categoriesStatistics = cards[0]...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const THREE = SupEngine.THREE; class SelectionRenderer extends SupEngine.ActorComponent { constructor(actor) { super(actor, "SelectionRenderer"); this.meshes = []; } setIsLayerActive(active) { for (const mes...
import React from 'react'; import {Image, Text, View} from 'react-native'; import styles from './styles'; export default class MovieCard extends React.Component { render() { const {movie, imageUri} = this.props; return ( <View style={styles.card}> <View style={styles.posterContainer}> ...
function func() { var x = document.getElementById('name').value; numx = parseInt(x); numx = numx + 1; document.getElementById('answer').innerHTML = numx; }
const catchAsync = require('../utils/catchAsync'); const AppError = require('../utils/appError'); const User = require('../models/userModel'); exports.getAllUsers = catchAsync(async (req, res, next) => { const users = await User.find(); if (!users) { return next(new AppError(`There is no User in DataBase!`, 40...
var mumble = require('mumble'); var fs = require('fs'); // var scream = fs.createReadStream('scream.wav'); //fs.readFileSync('scream.wav'); var options = { key: fs.readFileSync( 'key.pem' ), cert: fs.readFileSync( 'crt.pem' ) } /* To generate certificates: key: openssl pkcs12 -in MumbleCertificate.p12 -out key...
/* * dar o npm init, instalar o gulp localmente, fazer o require * não precisa ficar dando npm init ou instal quando instalar mó- *los nas dependências. */ var gulp = require('gulp'); var browserSync = require('browser-sync').create(); const autoprefixer = require('gulp-autoprefixer'); gulp.task('default', functi...
import moment from "moment"; const getYearsAgo = (diff) => Number( moment() .subtract(diff, "years") .format("YYYY"), ); export default getYearsAgo;
const assert = require('assert') const mybase64 = require('../index.js') describe('encode',() => { it('ABCDEF',() => { assert.equal(mybase64.encode('ABCDEF'),'QUJDREVG') }) it('12345',() => { assert.equal(mybase64.encode('12345'),'MTIzNDU=') }) }) describe('decode',() => { it('QUJD...
window.onload = function(){ console.log("hello","World"); var table_body = document.getElementsByTagName("tbody"); for(var i=0;i<10;i++){ var tr=document.createElement("tr"); for(var j=0;j<3;j++){ var td=document.createElement("td"); var inp=document.createElement("inp"); td.appendChild(inp); tr.appe...
import React from "react" import { connect } from "react-redux" import playlist from '../../store/actions/general'; import Link from "../../components/Link/index"; import Image from "../Image/Index" import UserTitle from "../User/Title" import axios from "../../axios-orders" class Player extends React.Component { ...
angular.module('app') .directive('listItem', function($timeout) { var template = angular.my.funcs.template('./blocks/list/list__list-item/list__list-item.html'); template.link = function(scope, elem, attrs) { // for textarea autosize .. scope.$watch('tasks', function() { autosize($(...
import React from 'react'; import {NavLink} from "react-router-dom"; import {Banner} from "../Banner/Banner"; import {Background} from "../Background/Background"; import {Services} from "../Services/Services"; import FeaturedRooms from "../FeaturedRooms/FeaturedRooms"; export const Home = () => { return ( ...
import BaseForm from './BaseForm' export default class ASlider extends BaseForm { constructor(h, formData, obj, vm, type) { super(h, formData, obj, vm, type) return this.initialize } get props() { const { key, obj } = this return { value: this.formData[key] || 0, ...obj.props } ...
import configureMockStore from "redux-mock-store"; import thunk from "redux-thunk"; import mockAxios from "axios"; import {fetchTodos, addTodo,updateTodo, deleteTodo} from "./actionCreator"; const middleware = [thunk]; const mockStore = configureMockStore(middleware); const store = mockStore(); jest.mock('axios'); de...
import Api from './Api'; import { Calling } from './constants'; export default{ GetThread(instaAccount, threadId, limit){ return Api(true, instaAccount).get(Calling["messaging_thread"]+threadId+'/'+limit) }, SendDM(instaAccount, type, message){ return Api(true,instaAccount).post(Calling["messaging_post_text"]+t...
import React from 'react'; import {HashRouter as Router, Redirect, Route, Switch,} from 'react-router-dom'; import Dashboard from './containers/Dashboard'; export default class AppRouter extends React.Component { render() { return ( <Router> <Switch> <Redirect exact from="/" to="/dashboar...
import React from "react"; import ReactDom from "react-dom"; import "./index.scss"; import Display from "./Display"; import DrumPad from "./DrumPad"; class DrumMachine extends React.Component { constructor(props) { super(props); this.state = { drums: [ { letter: "Q", keyCod...
$(function() { // close the overlay navigation when header links are clicked $(".overlay-nav .nav-toc a.header, .overlay-nav .nav-toc a.active.page").attr("data-toggle", "underlay overlay"); // TOCs support three styles: // - box: wrap in a shadowed box and apply TOC styling // - blocks: section TOCs in...
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, TextInput, Button, View } from 'react-native'; const PatientSchema = { name: 'Patients', properties: { name: 'string', bp: 'string' , weight: 'string', temperature: 'string', } }; const Realm = require(...
(function(){ 'use strict'; angular.module('platanus.palletBundle',['ngFileUpload', 'platanus.pallet', 'platanus.docPreview', 'platanus.progress']); })();
export { default as ListBox } from './ListBox';
import React, {useState} from "react"; import {Link, Redirect } from "react-router-dom"; import axios from "axios"; import {rootUrl} from "../utilities/constants"; import {confirmEmailEndpoint} from "../utilities/endpoints"; import {useParams} from "react-router-dom"; import {useForm} from "react-hook-form"; import {...
import { makeActionCreator } from '../../../utils/helpers/redux'; const ORDERS_REQUEST = 'orders/ORDERS_REQUEST'; const ORDERS_SUCCESS = 'orders/ORDERS_SUCCESS'; const ADD_ORDER = 'orders/ADD_ORDER'; const UPDATE_ORDER = 'orders/UPDATE_ORDER'; const DELETE_ORDER = 'orders/DELETE_ORDER'; const FILTER_VIEW_ORDER = 'orde...
"use strict"; const path = require('path') const sqlite3 = require('sqlite3').verbose() const reverse = require('./reverse') function Geocoder(options) { var geocoder = function(options) { this.options = options || {} if (this.options.database === undefined) { this.options.database = path.join(__f...
var _ = require('lodash'); var debug = require('debug')('tipbot:user'); var async = require('async'); var blocktrail = require('blocktrail-sdk'); var pbkdf2 = require('pbkdf2-compat').pbkdf2Sync; var User = function(tipbot, userId, userName, isAdmin) { var self = this; self.tipbot = tipbot; self.id = user...
module.exports = [ { "first_name": "Timothy", "last_name": "Robinson", "job": "Illustrator", "address": "450 Ryan Mountain Apt. 359\nDanielhaven, GU 39375-2283", "image_url": "https://placeholdit.imgix.net/~text?txtsize=55&txt=681x635&w=681&h=635" }, { "first_name": "Michael", "last_na...
function isPalindrome(value){ var value = value.replace(/\W/g, '').toLowerCase(), valueArray = [], palindrome = false; for (i=0; i<value.length; i++) valueArray.push(value.charAt(i)); if (value === valueArray.reverse().join('')) palindrome = true; return palindrome } console.log(isPalindrome("s...
orange_10_interval_name = ["真理<br />大學","北勢寮","麻豆","寮廍里","西庄","隆田","二鎮","六甲","嘉南里","烏山頭<br />水庫","臺南藝<br />術大學"]; orange_10_interval_stop = [ ["大地莊園","真理大學"], // 真理大學 ["四角仔","北勢寮","北勢國小","北勢里"], // 北勢寮 ["油車里","小埤頭","新樓醫院","麻豆轉運站","圓環","電姬戲院","一商前","興中民生路口","麻豆區公所","南勢里","曾文農工","總爺糖廠","臺灣首府大學宿舍","臺灣首府大學"], // 麻豆 ["寮廍里"]...
import React, { Component } from 'react'; import Gif from './Gif'; import 'emoji-mart/css/emoji-mart.css' import { Picker} from 'emoji-mart' import { Smile , Heart} from 'react-feather'; import ContentEditable from 'react-contenteditable' //import ReactTextareaAutocomplete from '@webscopeio/react-textarea-autocomplete...
import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; import { useDispatch, useSelector } from 'react-redux'; import { setPlaylistId } from '../reducer'; import spotifyIcon from '../assets/spotify_icon.png'; import Button from './Button'; import { login } from '../apiU...
var sensationApp = angular.module('sensationApp'); // Home Data: Home page configuration sensationApp.factory('Data', function(){ var data = {}; data.items = [ { title: 'View Menu', icon: 'search', page: 'food-menu-search.html' } //, // ...
import { combineReducers } from 'redux'; import avatar from './profileAvatarReducer'; import info from './profileInfoReducer'; import membership from './membershipReducer'; export default combineReducers({ avatar, info, membership });
var repeat = require('lodash').repeat module.exports.bar = arg => `bar::${repeat(arg, 3)}`
import React from 'react' class ToDoForm extends React.Component { constructor(props) { super(props) this.state = { 'text': '', 'project': 0, 'user': 0, 'is_active': true } } handleChange(event) { this.setState({ ...
/* Fake a Flog.* namespace */ if(typeof(Flog) == 'undefined') var Flog = {}; if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; Flog.RayTracer.Light = Class.create(); Flog.RayTracer.Light.prototype = { position: null, color: null, intensity: 10.0, initialize : function(pos, color, intensi...
var subtractProductAndSum = function(n) { let sumHolder = 0; let sum = n.toString().split(''); let prod = n.toString().split('').reduce((a, b) => a * b); for (let i = 0; i < sum.length; i++) { sumHolder += parseInt(sum[i]); } return prod - sumHolder; };
const Order = require('./model'); const uuidv1 = require('uuid/v1'); module.exports.getOrder = async uid => { return await Order.findOne({'policeInfo.uid': uid}).lean(); }; module.exports.getOrders = async () => { return await Order.find({}).lean(); }; module.exports.createOrder = async data => { data.policeInfo ...
import React from 'react'; import { Link } from "react-router-dom"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; import './App.css'; import StoreModel from './model_more/model'; import HomeView from './site_pages/home.js'; import LinkHandlerCategorys from './site_pages/linkhandlerCategory....
const Calc = require('./calc'); function Indicator() { this.expression, this.name, this.args, this.parse = expression => { var splited = expression.split('_') this.expression = expression this.name = splited[0] this.args = splited.slice(1, splited.length) return this } this.applyTo = ...
const express = require('express') const parser = require('body-parser') const cors = require('cors') const mongoose = require('./db/schema.js') const Photo = mongoose.model('Photo') const app = express() app.set('port', process.env.PORT || 4200) app.use(parser.json()) app.use((cors())) app.get('/api/photos', (req, ...
/* * TODO: tests to test the 'READ' operation of CRUD. * Not sure how to do it here, or why. * Maybe test the authorization. * This test should, too, start the server automatically, when this test * is run. */ /* eslint-disable no-console */ /* eslint-disable no-unused-expressions */ 'use strict'; const assert = requ...
import React from 'react' import TabsClosable from '.' import { boolean } from "@storybook/addon-knobs"; export default { title: 'TabsClosable', component: TabsClosable } export const SimpleTabs = () => { const groupId = 'TABS-CLOSABLE-01' const tabs = [ { id: 'one', label: 'Tab one', ...
import { Client } from 'pg' import { config } from '../../../config' import { chalk } from '../../services/chalk' const dbParams = { connectionString: config.databaseUrl, } if ((config.env && config.env !== 'development') || config.databaseSSL === 'true') { dbParams.ssl = true } export const db = new Client(dbPa...
const app = require('express')(); const router = require('express').Router(); const { body } = require('express-validator'); const { sanitizeBody } = require('express-validator'); const bodyParser = require('body-parser'); const Firestore = require('@google-cloud/firestore'); const cors = require('cors'); const pick = ...
Thorax.Router.create = function(module, props) { return module.exports.router = new (Thorax.Router.extend(_.defaults(props, module)))(); };
let amigo = { nome: 'José', sexo: 'M', peso: 85.4, engordar(p = 0) { console.log('Engordou') this.peso += p } } console.log(amigo.peso) amigo.engordar(2) console.log(amigo) console.log(amigo.nome) console.log(`${amigo.nome} pesa ${amigo.peso}Kg.`) const func1 = (param) => { } const func22 ...
"use strict" var FACILITY_TYPES = { COAL : 'coal', NUCLEAR : 'nuclear', GAS : 'gas', WIND : 'wind', SOLAR : 'solar', HYDRO : 'hydro' }; var GLOBAL_COST_TYPES = { LOBBY : 'lobby', RESEARCH : 'research', ADVERTISE : 'advertise' } function Resources(initialLevels, resourceCosts) { // Amount of that resourc...
import Vue from 'vue' import App from './App.vue' import store from './store' import * as filters from './utils/filters' import 'bootstrap' import 'bootstrap/dist/css/bootstrap.min.css' import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue' import { ModalPlugin } from 'bootstrap-vue' import 'bootstrap/dist/c...
import { zip, Inflater, Deflater } from '../node_modules/zip.js/WebContent/index.js'; zip.Inflater = Inflater; zip.Deflater = Deflater; export { zip }; export { default as Tree } from '@widgetjs/tree/src/index.js'; import { default as Vue } from 'vue'; import { default as VueMaterial } from 'vue-material'; Vue.use(Vue...
var debug = require('debug')('mocha:mongoreporter'), Q = require('q'), mongo = require('mongodb'), dateFormat = require('dateFormat'), now; os = require('os'), snap = require('env-snapshot').EnvSnapshot(); module.exports = mocha_mongo_reporter; function mocha...
// = // env variables for careful module.exports = { environment: 'dev', // this will match databases[option <- ] // main app port port: 3000, // mongodb port (expecte to run on localhost) mongoDbPort: 27017, databases: { dev: 'careship-id-dev', prod: 'careship-id' }, logs: { debug: './logs/...
var assert = require('chai').assert; var rules = require('../src/rules_functions.js'); describe('Alphanumeric rule on a number', () => { it('should return true for 0 and alphanumeric of false', () => { var result = rules.alphanumeric(0, {alphanumeric: false}); assert.equal(result, true); }); it('should return ...
import { ce } from "../helpers/htmlFactory.js"; import auth from "../services/authService.js"; import likesService from "../services/likesService.js"; import movieService from "../services/movieService.js"; import viewFinder from "../viewFinder.js"; let section = undefined; let navLinkClass = undefined; function setu...
'use strict' Function.prototype.bind2 = function (context) { const _this = this const args = Array.prototype.slice.call(arguments, 1) const fNOP = function () {} const returnFun = function () { const bindedArgs = Array.prototype.slice.call(arguments) const ctx = this instanceof fNOP && context ? thi...
;String.prototype.convertDigit=function(){var ret="";var _nums= ["0123456789","၀၁၂၃၄၅၆၇၈၉"];for(var i1=0;i1<this.length;i1++) {ret+=/[0-9]/.test(this.charAt(i1))?_nums[1].charAt(this.charAt (i1)):this.charAt(i1);}return ret;};var datelist={ en: ["sunday","monday","tuesday","wednesday","thursday","friday","s aturda...
import React, {Component} from "react" import PropTypes from "prop-types" import {Tabs, TabPanel, Tab, TabList} from "react-tabs" import uuidV4 from 'uuid/v4' import isUrl from 'is-url' import Favicon from './Favicon' import WebViewWrapper from './WebViewWrapper' export default class TabsArea extends Component { P...
define([ 'client/views/services', 'common/collections/services', 'backbone' ], function (ServicesView, ServicesCollection, Backbone) { describe('Services View', function () { beforeEach(function () { // clear window.location.search window.history.replaceState({}, '', window.location.href.split...
//alert弹窗事件 /** * sendOption-{ "type":1, -1:confirm样式;2:alert样式 "msg":"确定吗?", -显示信息 "yes":"确定", -确定按钮的字样 "cancel":"取消" -取消按钮的字样 "yesParm":{} -yesFun执行时需要的参数 "cancelParm":{} -cancelFun执行时需要的参数 } yesFun:点击确定按钮后执行的函数名 cancelFun:点击取消按钮后执行的函数名 * */ function myAlert(sendOption,yesFun,canc...
import React, { useState, useContext, useEffect } from "react"; import { Row, Col } from "react-bootstrap"; // import Sidebar_Teacher from "./Sidebar_Teacher"; import "../Score.css"; import { TextField } from "@material-ui/core"; import { Input } from "antd"; import Sidebar_Advisor from "./Sidebar_Advisor"; import { Se...
const cp = process.cwd() + "/Controllers/"; const dashboard = require(cp + "DashboardController"); module.exports = function(fastify, opts, next) { fastify.get('/', { preValidation: [fastify.auth] }, dashboard.index) next(); };
import CONSTANTS from '@/utils/interfaces/constants'; const REDUCER_KEY = 'VisualAttention'; const API_PATH = 'visualAttention'; export default CONSTANTS(REDUCER_KEY, API_PATH); export const RESULT_KEY = { TIME: 'time', VIEWED_RINGS: 'viewed_rings', ERRORS: 'errors', CROSS_OUT_RINGS: 'cross_out_rings', ERR...
// uses Factory methods to create an object // create an oject without exposing the instantiation logic // usage: create object conditionally class Car { constructor(options) { this.doors = options.doors || 4; this.state = options.state || 'brand new'; this.color = options.color || 'white';...
import angular from 'angular' import geoMap from './geo-map' import geoInfoMap from './geo-info-map' import calendar from './calendar' import popupCalendar from './popup-calendar' import bindHtmlUnsafe from './bind-html-unsafe' import requestLoading from './request-loading' import ConfirmModal from './confirm-modal' i...
// Importar los modelos const Product = require("../models/product"); const Category = require("../models/category"); const Order = require("../models/order"); const OrderDetail = require("../models/orderDetail"); const User = require("../models/user"); // Importar Moment.js const moment = require("moment"); ...
import { grey, orange, lightOrange } from '../styles/colors' import { experience, mobile } from './breakpoints' import { css } from '@emotion/core' const globalStyles = css` * { box-sizing: border-box; margin: 0; padding: 0; text-rendering: optimizeLegibility; } body { font-family: -apple-sy...
const htmlmin = require("html-minifier") /** * Compresses HTML during production builds. * * @param {string} content HTML content * @param {string} outputPath Path to which the file will be written */ exports.compressHtml = (content, outputPath) => { // If not an HTML file or not a production build, return the ...
var otherPlayers={}; var playerID; var player; function loadGame(){ //cargar espacio loadEspacio(); //cargar jugador initMainPlayer(); listenToOtherPlayers(); window.onunload = function(){ }; window.onbeforeunload = function(){ }; } function listenToPlayer( playerData ) { if(playerID!=playerData....
const Alexa = require('alexa-sdk'); const audioEventHandlers = require('./audioEventHandlers'); const handlers = require('./handlers'); exports.handler = (event, context, callback) => { console.log('\n' + JSON.stringify(event, null, 2)); const alexa = Alexa.handler(event, context, callback); // Replace w...
var common = require('../app/common'); common.connect(); var Permission = require('mongoose').model('Permission'); exports.up = function(next){ var permission = new Permission(); permission.name = 'all'; permission.method = '*'; permission.path = '*'; permission.save(function (err, permission) {...
/** * Created by zhoucaiguang on 2017/3/8. */ /** * Created by work on 2016/3/21. */ "use strict"; let mysql = require('mysql-promise')(); let util = require('util'); const role_1 = require('../configs/role'); const config = role_1.dbConfigs; mysql.configure({ host: config.server, user: config.user, pas...
import React from "react"; import { Link, prefixURL } from "next-prefixed"; import Head from "next/head"; import "../../static/styles/globals.css"; export default class Page extends React.Component { render() { const { children, activePath = "home", title = "Welkom", description = "Kevin...