text
stringlengths
7
3.69M
require('virtual-dom')
/* * `merge` agreegates any number of sources as if they were one. It doesn't * change values in any way. * * It's usage is slightly different than other processors. Here's the general * syntax: * * ``` * const mergedSource = merge(sourceA, sourceB) * const subscriber = process(mergedSource) * ``` * * ``` ...
module.exports = { plugins: [ ['module-resolver', { root: ['./'], alias: { '@': './', actions: './src/store/actions', components: './src/components/', reducers: './src/store/reducers/', }, }], ], };
describe('Test Module Context', function () { var moduleContext = require('../../../lib/util/module-context'); var should = require('should'); it('should fail with no specified module', function () { (function () { moduleContext(); }).should.throw('No module specified'); }); it('should fail with inv...
'use strict'; const mongoose = require("mongoose"); //const validator = require("mongoose-validate"); const Schema = mongoose.Schema; const adminSchema = new Schema({ fname: String, lname: String, phone: { type: String, lowercase: true, required: true, validate: { ...
import React, {Component} from 'react'; import DeckGL from '@deck.gl/react'; import {GridLayer, HeatmapLayer} from '@deck.gl/aggregation-layers'; import {LineLayer, PolygonLayer, ScatterplotLayer} from '@deck.gl/layers'; import {WebMercatorViewport} from '@deck.gl/core'; import {Map} from 'react-map-gl'; import STORMS ...
import produce from "immer" import * as types from "./constants" const initialState = { loading: false, list: [], meta: {} } export const reducer = (state = initialState, action) => produce(state, draft => { switch (action.type) { case types.GET_LIST_REQUESTED: dra...
require("../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/building/_components/_top_guide" ], { "05e4": function(n, e, o) { Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0; var t = { props: { ...
locbean.controller('resultCtrl', function($scope, $rootScope, $ionicPlatform, $cordovaBeacon){ console.log('resultCtrl'); var brIdentifier = 'ibeacon'; var brUuid = '01122334-4556-6778-899a-abbccddeeff0'; var brMajor = null; var brMinor = null; var brNotifyEntryStateOnDisplay = true; $scope.beacons...
$(() => { /* * Denne er ikke i bruk men har tatt den med fra forelesning notat for kommer sikkert til å trenge den kanskje i dunno hahaha * * * */ const id = window.location.search.substring(1); const url = "Kunde/hentEn?" + id; $.get(url, (kunde) => { $("#id").val(kunde.id); ...
const fs = require('fs') const request = require('superagent') const cheerio = require('cheerio') const dir = require('../config/savedir') const authorId = require('../config/authorid') const childurl = require('../config/childurl') const cookie = require('../config/cookie') const repeat = require('../api/repeat') cons...
import React from 'react'; import { Container } from 'semantic-ui-react'; const Footer = () => { return ( <Container className="Footer"> <h3>Thanks for taking a look around. <a href="mailto:tylerhueter08@gmail.com">Contact</a> me & let me know what you think.</h3> </Container> ); }; e...
const links = document.querySelectorAll('a[href^="#"]'); links.forEach((link) => { link.addEventListener("click", (e) => { e.preventDefault(); let href = link.getAttribute("href").replace("#", ""); let target = document.getElementById(href); const rect = target.getBoundingClientRect().top; const o...
var sqlite3 = require('sqlite3').verbose(); var db = new sqlite3.Database('./SSNocDB.db'); var helper = require('./Helper'); // Sometimes only by check the db can we know if input is correct //whether the callback is suitable for the controller is judged in controller //Identifier is user or id ? maybe I will achieve ...
function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(getUserLoc); } else { console.log("Could not find your location"); } } // var User = function(userloc, userLat, activity) { // this.userloc = userloc; // this.userLat = userLat; // this.activity = activit...
import Logos from './Logos.svelte'; export { Logos };
const Sauce = require('../models/sauces') const fs = require('fs') // RETOURNE LA LISTE DES SAUCES exports.getSauces = (req, res, next) => { Sauce.find() .then(sauces => {res.status(200).json(sauces)}) .catch(error => {res.status(404).json({error})}) } // RETOURNE UNE SAUCE exports.getSauce = (req...
const React = require('react'); var Place = React.createClass({ render: function() { return <div className='place' key={this.props.place.id}> <h1 className='name'>{this.props.place.name}</h1> <div className='rating'>{this.props.place.rating}</div> </div> } }); module.exports = Place;
exports.mutations = { setTab: (state, tabName) => (state.currentTab = tabName), setSidBarTab: (state, tabName) => (state.currentSidBarTab = tabName), setSearchProgressValue: (state, flag) => (state.searchProgress = flag), setAmountOfDataItemValue: (state, amount) => (state.amountOfDataItem = amount), set...
for(var i = 0; i < 81; i++) { var scriptId = 'u' + i; window[scriptId] = document.getElementById(scriptId); } $axure.eventManager.pageLoad( function (e) { }); gv_vAlignTable['u21'] = 'center';document.getElementById('u51_img').tabIndex = 0; u51.style.cursor = 'pointer'; $axure.eventManager.click('u51', u51Click); I...
//模块实现模块 var viewCommand = (function(){ var tpl = { //展示图片结构模板 product: [ '<div>', '<img src="{{src}}"/>', '<p>{{text}}</p>', '</div>' ].join(''), //展示标题结构模板 title: [ '<div class="title">', '<div class="main">', '<h2>{{title}}</h2>', '...
//Variables const formulario = document.querySelector('#formulario'); const listaTareas = document.querySelector('#lista-tareas'); let tarea = []; //Event Listener EventListener(); //cuando el usuario agreega nueva tarea function EventListener(){ formulario.addEventListener('submit',agregarTarea); //cuand...
(function () { angular .module('myApp') .controller('AdminSetUseController', AdminSetUseController) AdminSetUseController.$inject = ['$state', '$scope', '$rootScope']; function AdminSetUseController($state, $scope, $rootScope) { $rootScope.setData('showMenubar', true); $r...
import React from 'react'; class Panel extends React.Component{ constructor(props){ super(props); } componentWillMount(){ document.title = this.props.title + ' - 创易汇'; } render(){ return ( <div className="col-xs-12 col-sm-9 content"> <div className="panel panel-default"> <div className="panel-he...
/** * Mongoose extension which makes sure that the slugs are unique no matter what. * Has minimum configuration operations, as it is suposed to be used for in house * developement. * @author Marius Kubilius <marius.kubilius@gmail.com> * @param schema * @todo add lithuanian accents. */ slugify = function(schema)...
//Loops ////DO WHILE LOOPS /* loops always start with a value of 0 var lcv1 = 0; do { lcv1 = lcv1 + 1 console.log(lcv); } while ( lcv1 < 6 ); var lcv = 2; // create a do while loop thay counts to 20 by 2's do { lcv = lcv + 2 console.log(lcv); } while ( lcv < 20); //create a do while loop that counts from...
const stargazer = require('./wallets/stargazer'); const stellarkey = require('./wallets/stellarkey'); const wallets = [ 'Centaurus', 'Papaya', 'Stargazer', 'Stellarkey' ]; const getStellarQR = (params) => { switch (params.wallet.toLowerCase()) { case 'stellarkey': return stellarkey.getQR(params); ...
import KoaRouter from "koa-router"; import controllers from "../controllers/index"; const router = new KoaRouter(); router .get("/public/get", function(ctx, next) { ctx.body = "public api!"; }) .post("/api/addAuthor", controllers.test.TestController.addAuthor) .get("/public/getAuthorList", controllers.tes...
sap.ui.define([ "sap/ui/core/UIComponent" ], function(UIComponent) { "use strict"; return UIComponent.extend("com.sap.ui5con2019.d3js.Component", { metadata : { manifest : "json" }, init: function() { UIComponent.prototype.init.apply(this, arguments); this.getRouter().initialize()...
let raceNumber = Math.floor(Math.random() * 1000); // give everyone a random number let registeredEarly = true; let age = 49; if (age > 18 && registeredEarly){ console.log(`this is your number ${raceNumber} and your race time will be at 9.30`) } else if(age > 18 && !registeredEarly){ console.log(`this is your nu...
import styled from '@emotion/styled'; const Modal = styled.div` z-index: 10; position: fixed; top: 0; left: 0; background: ${props => props.theme.colors.blackTransparent}; width: 100vw; height: 100vh; `; export default Modal;
const GEO_TYPES = [ 'box', 'cone', 'cylinder', 'octahedron', 'sphere', 'tetrahedron', 'torus', 'torusKnot', ]; function init () { const scene = new THREE.Scene (); const clock = new THREE.Clock (); // initialize objects const objMaterial = getMaterial ('basic', 'rgb(255, 255, 255)'); const ...
import dashify from "dashify"; import { useState } from "react"; import Link from 'next/link' import { openLoading } from "../myFunctions"; import { auth, db, storage } from "../utils/fire-config/firebase"; import { useRouter } from "next/router"; const Signup = () => { const router = useRouter() const [content, s...
import React from 'react' import 'scss/activity/birthday.component.scss' export default class Birthday extends React.Component { constructor (props) { super(props) this.state = {} } render () { return ( <div className='transition-group'> <div className='birthday'>birthday</div> <...
describe.only('my suite', () => { test.only('one of my .only test', () => { expect(1 + 1).toEqual(2); }); }); describe('my other suite', () => { // Should fail, but isn't even run test('my only true test', () => { expect(1 + 1).toEqual(1); }); });
alert("oi, salveeeeeeeeeeeeeeeeeeeeeeeeee")
P.views.getTemplate = function() { if (!this.template && this.templateId) { if (window.Templates[this.templateId]) { this.template = window.Templates[this.templateId]; } } return this.template; }; P.views.serializeData = function() { if (!this.model) { return; } if (this.model.toTmplCtx...
import Vue from 'vue' import VueRouter from 'vue-router' import TodoList from '@/views/todo-list/TodoList.vue'; import Author from '@/views/author/Author.vue'; Vue.use(VueRouter) const routes = [ { path: '/', name: 'Home', component: TodoList, }, { path: '/author', ...
const keystone = require('keystone'); const simpleYoutubeApi = require("simple-youtube-api") const KttvVideo = keystone.list('KttvVideo'); const youtube = new simpleYoutubeApi(process.env.GOOGLE_API_KEY); //console.log(youtube); //Channel ID - UCaSM4GqhbaVmRT7fmmFmR1w exports.processAllVideos = () => { let count =...
//модалки ниже export const editPopup = '.popup_profile_edit'; export const addPopup = '.popup_profile_add'; export const imgPopup = '.popup_profile_image'; export const avatarUpdatePopup = '.popup_avatar_update'; export const deletePopup = '.popup_card-delete'; //кнопки открытия модалок ниже export const editBtn = do...
import editorDispatcher from '../dispatcher/editorDispatcher'; import CONSTANTS from '../constants'; var editorActions = { create(data, silent) { editorDispatcher.dispatch({ action: CONSTANTS.EDITOR.CREATE, data: data, silent: silent }); }, update(data, silent) { editorDispatcher.dispatch({ acti...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import styles from './goldPackage.scss'; import { imagePath } from '../../../utils/assetUtils'; import * as actions from '../../../components/TalkToWeddingPlanner/actions'; import { bindActionCreators } from 'redux'; import { connect } from '...
/** * thunk-redis - https://github.com/thunks/thunk-redis * * MIT Licensed */ const util = require('util') const thunks = require('thunks') const EventEmitter = require('events').EventEmitter const tool = require('./tool') const Queue = require('./queue') const initCommands = require('./commands').initCommands co...
import orderRepository from '../repositories/orderRepository.js' const orderController = () => ({ getOrders: async (req, res) => { try { const orders = await orderRepository.get() res.json(orders) } catch (error) { res.status(400).json({ message: 'Unable to list orders' }) ...
import React from "react"; import "./Films-form.css"; const FilmForm = ({ getCharacters }) => ( <div id="form" className="form__body"> <h2 className="form__header">Пошук персонажів по епізоду</h2> <div className="form"> <div className="input-box"> <input id="someID" classNam...
import styled from 'styled-components' export const BusinessStyle = styled.div` width: 6.86rem; margin: 0.24rem 0.24rem; img{ width: 6.86rem; height: 1.5rem; border-radius: 0.2rem; } ` export const HotListStyle = styled.div` width: 100%; padding: .28rem .32rem; .main{ w...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsFlipToFront = { name: 'flip_to_front', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3a2 2 0 002 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9a2 2 0 00-2 2v10a2 2 0 002 2h10c1.1 0 2-.9 ...
let express = require('express'); let router = express.Router(); let Department = require('../models/Department'); let Ids = require('../models/IdsNext');// 引入模型 //-----------------------------------新增部门---------------------------------------- router.post('/add', (req,res) => { console.log('-------------添加部门-...
import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import "../../assets/styles/components/Navigation.scss"; const Navigation = () => { // const [activeClasses, setActiveClasses] = useState(""); const changeActiveButton = (event) => { document.querySelector(".nav-wrapper .active"...
var searchData= [ ['y',['y',['../classde_1_1telekom_1_1pde_1_1codelibrary_1_1ui_1_1layout_1_1_p_d_e_absolute_layout_1_1_layout_params.html#a844c7afc130c41137faf536595d1d970',1,'de::telekom::pde::codelibrary::ui::layout::PDEAbsoluteLayout::LayoutParams']]] ];
import React, { Component } from 'react' export default class Detail extends Component { state = { data:[ {id:'1',title:'好消息1',content:'中国加油1'}, {id:'2',title:'好消息2',content:'中国加油2'}, {id:'3',title:'好消息3',content:'中国加油3'}, {id:'4',title:'好消息4',content:'中国加油4'...
import React from 'react' import { connect } from 'react-redux'; import { getMonthName } from "../CommonFunctions/CommonFunctions"; import axios from "axios"; import { updateEngineering, deleteEngineering } from '../../actions/listAction'; import { showList } from '../../actions/listAction'; import { DELETE_ENGINEERING...
import {apiRequest} from './Base'; import {signUpUrl} from '../Constants'; export const signUpRequest = (parameters, block) => { return apiRequest(signUpUrl, 'POST', parameters, block); };
var chai = require('chai'); var assert = chai.assert; var Person = require('../src/person'); var bob = new Person('Bob Ross'); it('Person', function() { assert.deepEqual( Object.keys(bob).length, 6, 'Object.keys(bob).length should return 6.' ); assert.deepEqual( bob instanceof Person, true...
import React from "react"; import styled from "styled-components"; import Tootltips from "../Tooltips/Tooltips"; const Container = styled.div` width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; flex-direction: column; color: rgba(255, 255, 255, 0.74); `; const Item = ...
const mongoose = require('mongoose') const Schema = mongoose.Schema const CommentSchema = Schema({ Commentname: String, email: String, password: String }) const Comment = mongoose.model('Comment', CommentSchema) module.exports = Comment
'use strict' const Sequelize = require('sequelize') module.exports = { actived: { type: Sequelize.BOOLEAN, defaultValue: true }, removed: { type: Sequelize.BOOLEAN, defaultValue: false } }
module.exports = (sequelize, DataTypes) => { const Series = sequelize.define('Series', { backdrop_path: DataTypes.STRING, genres: { type: DataTypes.STRING, get: function() { return JSON.parse(this.getDataValue('genres')); }, set: function(val) { ...
import React,{Component} from "react" import style from "./weiyuyuemodel.mcss" import {DatePicker} from 'antd' import moment from 'moment'; import 'moment/locale/zh-cn'; import { Select } from 'antd'; import { Cascader } from 'antd'; import { TimePicker,message} from 'antd'; const options = [{ value: 'zhejiang', la...
const fs = require('fs'); const should = require('should'); const httpMocks = require('node-mocks-http'); const models = require('../../../server/models'); const VendorController = require('../../../server/controllers/vendors/controller'); let res, error, req, mockVendor; describe('Vendor Controller', () => { 'use...
document.addEventListener('DOMContentLoaded', (event) => { window.addEventListener('load', function () { window.scrollTo(0, 0); }); window.addEventListener('scroll', function () { navbarScroll(); }); function navbarScroll() { var y = window.scrollY; if (y > 2) { $('.header-co...
import React, { Component } from 'react' import { BrowserRouter as Router, Route } from 'react-router-dom' import Home from './home' import NewSeries from './newSeries' import EditSeries from './editSeries' import NavBar from './navBar' import Series from './Series' const About = () => <section className="intro-sectio...
//document.getElementById("click").onclick = changeColor(); document.addEventListener('DOMContentLoaded', function () { // DOMContentLoaded Will load after DOM loaded var el = document.getElementById("myBtn"); el.addEventListener('click', changeColor) // var el = document.getElementById("btnAdd"); // ...
module.exports ={ consumer_key:' EUv1FVaIlrzVM50HUmrhfMvQm', consumer_secret:' fsGn8hFZwn3iOo7OxtQCbB50WYhEewm1ntLH4jiRHkUTO393pm', access_token_key:'997136808415707138-qxjkgOJA99zYfBXH2jA765osqqRFHcO', access_token_secret:'PpILUHwFV7IGOOg6UJLifxXArDoFu614qvLEdIkr2kO56' };
function calculaCombustivel() { var tempo = prompt("Quanto tempo de viagem?"); var velocidadeMedia = prompt("Qual foi sua velocidade média?"); var distancia = tempo * velocidadeMedia; var litros = distancia / 12; console.log( `Sua velocidade média foi de ${velocidadeMedia}km/h, o tempo gasto na viagem foi ${tem...
import {PropTypes} from 'prop-types'; export const PersonType = PropTypes.shape({ Person: PropTypes.shape({ name: PropTypes.shape({first: PropTypes.string.isRequired, last: PropTypes.string.isRequired, title: PropTypes.string.isRequired}), email: PropTypes.string.isRequired, phone: PropTypes.string.isReq...
/** * Represents a table at a card game. */ var Table = { /** * The number of players in the table. * @private * @type {Number} */ size: undefined, /** * An array that stores the players and their locations on the table. * @private * @type {Array} */ players: un...
import express from 'express'; import {postOption, fetchJsonByNode} from '../../../common/common'; import {host} from '../../globalConfig'; let api = express.Router(); //新增字典 api.post('/addDic', async(req,res) =>{ res.send(await fetchJsonByNode(req, `${host}/dictionary-service/dictionary/service/tenant/insert`,post...
import React, { Component } from 'react'; import {View,Text,Modal, TextInput,TouchableOpacity,StyleSheet, ScrollView,Alert,FlatList,} from 'react-native'; import firebase from 'firebase'; import db from '../config'; import MyHeader from '../MyHeader'; import { ListItem } from 'react-native-elements'; export defa...
console.log("community")
var LCInfoField = React.createClass({ render: function() { var _this = this; // Make sure that all props provided are arrays. if (!(_this.props.infoField instanceof Array)) { _this.props.infoField = [_this.props.infoField]; } // Determine how the view should be displayed...
// JavaScript Document /*搜索框部分脚本*/ (function() { var p=$("#wrap_absolute>p"); var popUp=$("#wrap_absolute"); var dropDownList=$("#search_b"); var input=$(".material .search_a_input"); popUp.hover(function(){popUp.css("display","block");},function(){popUp.css("display","none");}); p.hover(function(){popUp.css("dis...
import React, { Component } from 'react' import { StatusBar, View, Text, Image, TouchableOpacity } from 'react-native' import { connect } from 'react-redux' import { Images } from '../Themes' // Styles import styles from './Styles/OnBoardingScreenStyle' class OnBoardingScreen extends Component { static navigationOp...
// libraries import React from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; // components import Brand from './Brand'; // styled elements import g from './../js/global'; import List from '../elements/List'; const Header = () => { // + styles const HeaderContainer = st...
'use strict'; angular .module('dashCtrl', ['ui.router', 'ngAnimate', 'satellizer', 'ngDragDrop', 'ui.bootstrap']);
import React from 'react'; import { Breadcrumb, BreadcrumbItem, Row, Col } from 'reactstrap'; import s from '../styles/Dashboard.module.scss'; export default function Dashboard() { return ( <div className={s.root}> <Breadcrumb> <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem> <BreadcrumbItem ...
import React from "react"; import Button from 'react-bootstrap'; class Home extends React.Component{ constructor(props){ super(props); this.state = { age : props.Age, status : 0, HomeLink : props.InitialHomeLink }; setTimeout(() => { t...
function checkEmptyElement(element) { var fe = element; if ( fe.val() == '' ) { fe.css({'border-color':'#ff0000'}) setTimeout(function(){ fe.removeAttr('style'); },500); return true; } return false; }; function checkNaNElement(element) { var fe = element; if ( isNaN(fe.val()) ) { fe...
bznsPreview: { Comment: { comment:String, userId:Number }, bznsProfile: { bizName:String, bizAddress:String, bizcategory: { catId:Number, catName:String }, bizcity:String }, Rating: { totalReviews:Number, avgRating:Number } }
"use strict"; let done = document.querySelector(".btn-success"); let taskName = document.querySelector("#taskName"); let actionState = document.querySelector("#actionState"); let date = document.querySelector("#date"); let listItems = document.querySelector(".list-group"); let addNew = document.querySelector("#inputTod...
var Long = require('long'); var NBT = require('../dist/PowerNBT'); var assert = require('assert'); describe('NBT.NBTTagLong', function(){ describe('constructor', function(){ it('should be equal 0' , function(){ assert.equal(0, new NBT.NBTTagLong()); assert.equal(0, new NBT.NBTTagLo...
import { SHOW_LIST, UPDATE_DEVOPS, EXPORT_LIST, UPDATE_ENGINEERING, DELETE_DEVOPS, DELETE_ENGINEERING } from '../constants/types' const initialState = { items: [], item: {} } export default function (state = initialState, action) { switch (action.type) { case SHOW_LIST: return { ...
import React from 'react'; import './announcements.css'; import DeleteAnnouncement from './deleteAnnouncement.js' import EditAnnouncement from './editAnnouncement.js' import { TiDelete } from 'react-icons/ti'; import ReactQuill from 'react-quill'; import "react-quill/dist/quill.bubble.css"; export default c...
// Get from query hash String.prototype.getQueryHash = function (name, defaultVal) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\#&$]" + name + "=([^&#]*)"), results = regex.exec(this); return results == null ? (defaultVal == undefined ? "" : defaultVal) : decodeURICompon...
const { Router } = require("express"); const routes = Router(); const CategoryController = require("../controllers/category") routes.post('/', CategoryController.post); routes.get('/', CategoryController.get); routes.put('/:id', CategoryController.put); routes.delete('/:id', CategoryController.delete); module.exports...
import ProductCart from "../ProductCart"; import "./styles.css"; function ShoppingCart({ currentSale, removeProduct, setCurrentSale }) { const initial = currentSale .reduce((acc, element) => (acc += element.price), 0) .toFixed(2); return ( <div className="shoppingCart"> <header className="shoppi...
const fs = require('fs'); const path = require('path'); const shell = require('child_process').execSync; exports.default = async context => { const projectRoot = path.join(__dirname, '..'); const studioMainPath = path.join(projectRoot, 'projects', 'studio-main'); console.log('Copy Renderer...'); if (!fs.exist...
'use strict'; const path = require('path'); module.exports = appInfo => { const config = exports = { mysql: { // 单数据库信息配置 client: { // host host: '127.0.0.1', // 端口号 port: '3306', // 用户名 user: 'root', // 密码 password: '123456', // ...
// -- HTTP const httpData = { baseUrl: null, headers: {}, timeout: 10000 } const http = {} Object.defineProperty(http, 'baseUrl', { get: function () { return httpData.baseUrl }, set: function (newValue) { httpData.baseUrl = newValue } }) Object.defineProperty(http, 'headers', { get: functio...
import app from '../lib/app'; export default { tracks: { library: { // Tracks of the library view all: null, // All tracks sub: null, // Filtered tracks (e.g search) }, playlist: { all: null, sub: null, }, }, tracksCursor ...
import React, { useContext, useState } from "react"; import "./Login.css"; import google from "../../images/google.png"; import { UserContext } from "../../App"; import { useHistory, useLocation } from "react-router"; import { handleGoogleSignIn, initializeLoginFramework } from "./LoginManager"; const Login = () => { ...
// Filename: views/Search.FilterView.js // Search Filter View // --------------- define([ 'cat', 'jquery', 'underscore', 'backbone', 'marionette', 'ev', 'models/Filter', // 'text!templates/search-filter-simple.html', 'jquery.chosen' ], function(cat, $, _, Backbone, Marionette, ev, Filter, searchFilterTpl){ ...
import { GET_DOGS, ADD_DOG, DELETE_DOG, DOGS_LOADING, DOGS_LOADING_FAIL } from '../actions/types'; const initialState = { dogs: [], loading: false }; export default function(state = initialState, action) { switch (action.type) { case GET_DOGS: return { ...state, dogs: [...act...
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import Board from '../components/Board'; import BackToGames from '../components/BackToGames'; import { fetchGames } from '../actions/games'; import { playerAction } from '../actions/game'; import { IN_PROG...
export const fetchWithCount = async (count) => { const response = await fetch(`http://localhost:3000/api/v1/tossups/${count}`); if(!response.ok) { throw Error('Hmm something went wrong please refresh the page') } return response.json(); } export const fetchWithOptions = async (count, selectedCategories) =>...
var Phaser = Phaser || {}; var GameTank = GameTank || {}; var game = new Phaser.Game(512, 416, Phaser.CANVAS, 'game'); game.state.add("BootState", new GameTank.BootState()); game.state.add("PreloadState", new GameTank.PreloadState()); game.state.add("StartState", new GameTank.StartState()); game.state.add("GameState",...
import styled from "styled-components/macro" export const Container = styled.ul` margin: 0; padding: 1rem 0 0 0; > a { text-decoration: none; } ` export const MenuItem = styled.li`` export const MenuItemTop = styled.div` display: flex; align-items: center; transition: .1s linear background-color; ...
import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import styles from './Button.css'; const VARIANT = { PRIMARY: 'PRIMARY', SECONDARY: 'SECONDARY', NO_OUTLINE: 'NO_OUTLINE', }; const SIZE = { LARGE: 'LARGE', MEDIUM: 'MEDIUM', SMALL: 'SMALL', SQUARE: ...
var mongoose = require('mongoose'); var RegionSchema = new mongoose.Schema({ name: {type: String, required: true }, emails : [String], isDelete : {type : Boolean, default : false } }); var Region = mongoose.model('Region', RegionSchema); module.exports =Region;
/** * Created by alidad on 6/17/14. */ console.log("loading app"); angular.module('mypoc', ['ngRoute','ngResource']) .config([ '$routeProvider' ,'$locationProvider','$compileProvider','$logProvider', function ($routeProvider,$locationProvider,$compileProvider,$logProvider) { $logProvider.debugEnabled(tru...