text
stringlengths
7
3.69M
var albumPicasso = { title: 'The Colors', artist: 'Pablo Picasso', label: 'Cubism', year: '1881', albumArtUrl: 'assets/images/album_covers/01.png', songs: [ {title: 'Blue', duration: '161.71', audioUrl: 'assets/music/blue'}, {title: 'Green', duration: '103.96', audioUrl: 'assets/music/green'}, {title: 'Red'...
import React, { Component } from 'react'; import {View, Text, Platform, Image} from 'react-native'; class InfoScreen extends Component { static navigationOptions = ({ navigation }) => { return { tabBarVisible : false, headerTintColor: "#fff", headerStyle : { ...
import React, { PropTypes } from 'react' import API from 'API' import { Button } from 'forms/material/Material' import LoginStore from 'LoginStore' import Notification from 'NotificationActions' import WebStorage from 'WebStorage' import { Card, CardContent, CardTitle, CardFooter } from 'Card' import { Map, Marker, La...
module.exports = { up: (queryInterface, Sequelize) => { return Promise.all([ queryInterface.createTable('VerificationToken', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, UserId: { type: S...
import express from 'express'; import session from 'express-session'; import morgan from 'morgan'; import cookieParser from 'cookie-parser'; import bodyParser from 'body-parser'; import http from 'http'; import socketIo from 'socket.io'; import socketioJwt from 'socketio-jwt'; import api from './routes/api'; import { i...
import { handleActions } from 'redux-actions'; import { GET_TAGS, BUILD_CLOUD, } from './actions'; const initialState = { tags: [], cloudElements: [], }; const tagsReducer = handleActions( { [GET_TAGS]: (state, action) => ({ ...state, tags: action.payload, }), [BUILD_CLOUD]: (state, action) => ({ ...
const axios = require('axios') const Redis = require('ioredis') const redis = new Redis() const movieURL = 'http://localhost:5001/movies' const seriesURL = 'http://localhost:5002/series' class EntertainController { static async getAllCategories(req, res) { try { const cache = await redis.get('cache') ...
import React from "react"; import { Link } from "react-router-dom"; import "./css/footer.css" export default class Footer extends React.Component { render() { return ( <footer> <br /> <div className="container"> <div className="row"> <div id="firstFooterColumn" classNa...
import React from 'react'; import ReactDOM from 'react-dom'; import * as style from './style.less'; class Modal extends React.Component { constructor() { super(); this.state = { div: null, }; if (typeof window === 'object') { this.state.div = document.createElement('div'); } } c...
let http = require("http"); let url = require("url"); let fs = require("fs") let port = 9090; let addTask = ` <h1 style = "text-align : center">Task Planner<h1/> <h3 style = "text-decoration: underline">Add Task<h3/> <form action="/store" method="get"> <label>Emp Id: </label> <input type="t...
import React from 'react'; import PropTypes from 'prop-types'; import Cell from './Cell'; const rowStyle = { display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "center", } const columnStyle = { display: "flex", flexDirection: "column", justifyContent: "center", ...
import _ from 'underscore'; import restify from 'restify'; import { Router } from 'restify-router'; const router = new Router();; // Get all statistics of users router.get('/:group/users', (req, res, next) => { next(); }); // Get all statistics of users router.get('/plugins', (req, res, next) => { next(); });...
//***pedir datos por teclado */ var nombre = prompt("Ingrese su nombre"); console.log("Este es mi nombre",nombre); alert(nombre); var edad = prompt("Ingrese su edad"); console.log("Esta es mi edad",edad); alert(edad); //** variables numericas */ var num = 5; console.log("num",num) //** variables de texto */ var p...
function solve(args) { args = args.map(Number); let sumOfNumbers = 0; let sumOfInversedValueOfNumbers = 0; let concatedNumbers = ''; function calculateSum(args) { let sum = 0; for (let num of args) { sum += num; } return sum; } function sumOfTheI...
$(document).ready(function(){ var $texto; var $tabla = $('tbody'); $('button').click(function(){ $texto = $('input[name="texto"]').val(); $tabla.append('<tr><td>'+$texto+'</td><td><button>borrar</button></td></tr>'); }); $tabla.on('click', 'button', function(){ $(this)....
'use strict'; module.exports = function(app) { var product = require('../controllers/productController'); // todoList Routes app.route('/rest/v1/products') .get(product.list_all_products) .post(product.create_a_product); app.route('/rest/v1/product/:productId') .get(product.read_a_product) .put(product.update_a_pro...
/** * Created by gaspardchavardes on 13/01/2017. */ class ProjectPage { constructor () { this.state = { page: 0 } } init () { this.pageCount = this.items.length } increment () { this.state.page === 3 ? this.state.page = 0 : this.state.page++ this.next() } decrement () { ...
import { StyleSheet } from 'react-native' const style = StyleSheet.create({ farmDetails: { flexDirection: 'row', paddingVertical: 12, }, farmLogo: { height: 32, width: 32, marginRight: 12, }, h1: { fontFamily: 'MontserratBold', fontSize: 24, lineHeight: 42, }, h2: { fo...
/** * 图片的Utils类 * Created by yuansc on 2017/3/13. */ "use strict"; const config = require('config'); const path = require('path'); let ImageUtils = module.exports = {}; /** * 根据文件path 生成对外的url * @param {String} filePath 文件绝对路径 * @returns {String} url 对外地址 */ ImageUtils.genUrlByPath = function (filePath) { ret...
const express = require('express'); const next = require('next'); const path = require('path'); const url = require('url'); const cookieParser = require('cookie-parser'); const logger = require('morgan'); const cors = require('cors'); const mongoose = require('mongoose');...
import React from 'react' function Navbar() { return ( <div > <nav className='nav'> <img className='logo' src='assets/logo.png' alt='Logo' /> <ul className='list'> <li className='list_item'> About</li> <li classNam...
import React, { Component } from 'react' import * as api from "../../api" export default class Voter extends Component { state = { thumbed: 0 } render() { const { thumbed } = this.state let { votes, article_id, comment_id } = this.props votes += thumbed; return ( <div className="artic...
module.exports = function () { return async function (event) { event.mappings = event.mappings.map(x => { const launches = x.roles.length > 0 ? x.roles.map(roleId => { return { stateMachineName: 'auth0_removeMappingForm_1_0', title: `Remove ${roleId} mapping`...
import { FETCHING_ASSESSMENT, FETCHING_ASSESSMENT_SUCCESS, FETCHING_ASSESSMENT_FAILURE, REMOVE_FETCHING_ASSESSMENT, UPDATE_RESPONSE, SUBMIT_RESPONSE, PROCESSING_RESPONSE_ERROR, CHECK_RESPONSE, UPDATE_PERSONAL_INFO, RETURN_PREVIOUS_QUESTION, } from '../actions/types'; const initialState = { isFetc...
import AbstractComponent from './abstract-component.js'; const FIRST_LETTER_INDEX = 4; const LAST_LETTER_INDEX = 11; const getMonthAndDate = (day) => { return day.slice(FIRST_LETTER_INDEX, LAST_LETTER_INDEX); }; export default class MainTrip extends AbstractComponent { constructor(cities, days) { super(); ...
const state ={ cart : localStorage.getItem('cart')?JSON.parse(localStorage.getItem('cart')) :{} } export default state
const connection = require('../db/config'); const User = {}; const cleanUser = (user) => ({ ...user, passwordHash: 'hidden' }) User.create = (userInfo, callback) => { connection.query( `INSERT INTO user (username, passwordHash) VALUES ( ?, ...
const mongoose = require('mongoose'); const uniqueValidator = require('mongoose-unique-validator'); const projectsSchema = new mongoose.Schema({ title: { type:String, unique:true }, client:{ type:String }, budget:{ type:Number }, targets:{ type:Arra...
var PagerComponent = function() { var offset; var limit; this.createdCallback = function() { var _this = this; this.querySelector("z-pager-tooltip[data-type='for']") .addEventListener("click", function(e) { if (this.classList.contains("disabled")) { return; } ...
// !include ../stores/DeviceStore.js var DeviceListView = React.createClass({ deviceListUpdateCallbackId: null, getInitialState: function() { return { 'deviceList': [], 'activeIndex': null }; }, componentDidMount: function() { this.deviceListUpdateCal...
import React, { Component } from 'react'; import Drawer from 'material-ui/Drawer'; import MenuItemLink from 'component/MenuItemLink'; import AppBar from 'material-ui/AppBar'; class NavDrawer extends Component { render() { const { open, closeNav } = this.props; return ( <Drawer open={open} docked={false...
const rules = [ { find: /M.+/ }, { find: /;.+/ }, { find: /G92.+/ }, { find: /G90.+/ }, { find: /M104.+/ }, { find: /E.+/ }, { find: /G92.+/ }, { find: /G90.+/ }, { find: /M109.+/ }, { find: /E.+/ } ] export { rules }
import Axios from 'axios'; import {showMessage, storeData} from '../../utils'; import {setLoading} from './global'; const API_HOST = { url: 'https://test-api-campus.herokuapp.com/api/v1', }; export const signUpAction = (dataRegister, navigation) => (dispatch) => { // post through api Axios.post(`${API_HOST.url}...
import Taro, { Component } from "@tarojs/taro"; import { View, Text, Button } from "@doctorwork/components"; import HybridBridage from "../../utils/GTAHybridBridge"; import "./listDetailItem.styl"; export default class ListDetailItem extends Component { componentWillMount() {} componentDidMount() {} componentW...
import * as moment from 'moment' const PostIntro = (props) => { return ( <> <p className="time">{moment(props.post.created_on).format("Do MMMM YYYY")}</p> <div style={{width: "100%", maxHeight: "300px", overflow: "hidden", borderRadius: "5px"}}> <picture> {/* WebP */...
export const SIGN_IN = 'signIn'; export const SIGN_OUT = 'signOut'; export const ROLE_MENU_LIST = 'getRoleMenu'; export const GET_ONLINE_USER_INFO = 'getOnlineUserInfo'; export const IS_ONLINE = 'isOnline'; export const USER_MANAGE_LIST = 'getUserManageList'; export const ADD_USER = 'addUser'; export const EDIT_...
// /////////////////////////////// // Set up firebase // /////////////////////////////// // Import firebase elements we need import * as firebase from 'firebase/app' import 'firebase/auth' import 'firebase/database' import config from './helpers/firebase-config' // /////////////////////////////// // Import functions...
fetch = require("node-fetch"); const [CreateComment, CreateReply] = require("./comment_classes.js") class Scraping { // main_list will contain all of the comment instances // video_id is the youtube-id in the video url // limit_max_comment represents the limit the user entered in the url constructor(video_i...
$('#menu_consultar').on('click',function(){ $('#menu_consultar').addClass("active"); $('#menu_cadastrar').removeClass("active"); $('#menu_deletar').removeClass("active"); $('#menu_alterar').removeClass("active"); $('#consultar').css('display',''); $('#cadastrar').css('display','none'); ...
require("dotenv").config(); const firebase = require("firebase"); const admin = require("firebase-admin"); firebase.initializeApp({ apiKey: process.env.FB_KEY, authDomain: process.env.FB_AUTH_DOMAIN, databaseURL: process.env.FB_DB_URL, projectId: process.env.FB_PROJECT_ID, storageBucket: process.env.FB_STOR...
import React from 'react' import { Router } from 'react-router' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import routes from './routes' import theme from './base/materialUiTheme' // We can't use pure function here because in that case hot reloading won't work // eslint-disable-next-line react...
import React from 'react' import List from '../List' import { getRect, calculateDimensions, activateDropdown } from './helpers.js' export const initialState = { active: false, dropdownStyle: { top: 'auto', bottom: 'auto', left: 'auto', right: 'auto', maxHeight: 'auto', width: 'auto' } } ...
// 跑 Test 時,隱藏 console.error global.console.error = () => {};
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Link } from 'react-router'; import ReactMarkdown from 'react-markdown'; import { get, put } from '../shared/http'; import Loading from '../components/Loading'; class Editor extends Component { constructor(props){ super(...
//Linked to a spreadsheet on Andrew's account. Don't change //Handles the saving of data through a Map like structure //Saves everything into a spreadsheet //Stored as key value pairs. var prev = 0; function DataMap(live){ url='https://docs.google.com/spreadsheets/d/176z44O-mgCBX20skzYfsT7Kx1yibE4jguVcvXEHpn3M/edit...
class Dustbin{ constructor(x,y){ this.x=x; this.y=y; this.dustbinWidth=200; this.dustbinHeight=100; this.wallThick=10; this.angle=0; this.image=loadImage("dustbingreen.png"); this.bottomBody=Bodies.rectangle(this.x,this.y,this.dustbinWidth,thi...
var config = require('config.json') var configJSON = JSON.parse(config)
import React from 'react'; import {Link} from 'react-router-dom'; import './style.css'; import {deleteTopic, getAllTopics} from '../../../services/ref-data/topic'; import {TopicManagerTableHeaderRow,TopicManagerTableBodyRow} from './topic-manager-table-row'; export default class TopicManagerComponent extends React.Co...
import React, {useEffect, useState} from 'react'; import {useSelector, useDispatch} from 'react-redux'; import {View, TextInput, Button} from 'react-native'; import styles from './TodoScreen.style'; import {addDataTodo, RemoveMuchData} from '../../redux/actions'; import CardText from '../../components/CardText'; const...
var array = [1,3,5,7,9,11,,11,12]; var binary =binarySearch(array,11); if(binary > 0){ console.log("result found at position",binary); } else{ console.log("result not found"); } function binarySearch(array,x){ var low =0 , high =array.length-1 , mid; while(low<=high) { mid = Ma...
const initialState = { nodes: [], edgesAndCost: [], }; function searchForArray(haystack, needle) { var i, j, current; for (i = 0; i < haystack.length; ++i) { if (needle.length === haystack[i].length) { current = haystack[i]; for (j = 0; j < needle.length-1 && needle[j] === current[j]; ++j); ...
/** * 城市切换公用函数 * @returns {undefined} */ $(function () { $('#pro').change(function () { $.ajax({ type: "post", url: $(this).data('url'), data: 'pro_id=' + $('#pro').val(), dataType: "json", success: function (data) { $('#city').html(data); } }); }); $('#city').change(function () { $.aj...
import axios from 'axios'; export default class APIManager { static instance; constructor() { if (APIManager.instance) { return APIManager.instance } this._url = "" this._params = {} this._data = {} this._header = {} APIManager.instance = this } //get...
module.exports = { 'secret': 'SWFGSewrsdXVCQEWRdsftdgewtw', 'ConnectionString' : { user: 'sqldb', password:'MilgaDbsql12!', database:'milga_test', server:'milgadbsrv.database.windows.net' , port: 1433, options: { encrypt: true } } };
import React from 'react'; import ReactDOM from "react-dom"; import App from "./App"; // функция выводи сообщения function MessagesUsers(props) { let arr = props.msg, content = arr.map((elem) => <div className="row mt-2"> <span className="col-6">{elem.name}</span> <span className="col...
var assert = require('assert') var proxyquire = require('proxyquire') var _ = require('lodash') var fixtures = require('./blkqt.fixtures') require('terst') /* global describe, it EQ */ /* eslint-disable no-spaced-func */ var atomStub = { '@noCallThru': true // for proxyquire } var ipcStub = { '@noCallThru': true...
'use strict'; import LivingThing from './LivingThing'; import Eukaryota from './Eukaryota'; class Animal extends Eukaryota { } export default Animal;
/** * Copyright (c) Kipras Melnikovas 2018 * The main server file */ /** load .env environment variables to process.env */ if (process.env.HEROKU != "true") { require("./utils/loadDotenv")("../.env"); // FOR HEROKU ONLY } const express = require("express"); const mongoose = require("mongoose"); const path = requ...
/* begin copyright text * * Copyright © 2016 PTC Inc., Its Subsidiary Companies, and /or its Partners. All Rights Reserved. * * end copyright text */ /*global module*/ /* jshint node: true */ /* jshint strict: global */ /* jshint camelcase: false */ 'use strict'; var debug = require('debug')('arpublish:content.up...
import styles from './Monitor.less'; import React from 'react'; import {Row,Col ,Tabs} from 'antd'; import SimpleColumnChart from '../../component/SimpleChart/SimpleColumnChart'; import CurveChart from '../../component/SimpleChart/CurveChart'; import MeterShart from '../../component/SimpleChart/MeterChart'; const cit...
/** * Copyright 2016 Google Inc. * * 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 FRONTEND_PORT = 8080 const BACKEND_PORT = 8081 const webpack = require('webpack') const WebpackDevServer = require('webpack-dev-server') const express = require('express') const compression = require('compression') const config = require('./webpack.config') const moment = require('moment') new WebpackDevServer(...
let words = [ { "word": "home", "translate1": "дом", "translate2": "домик", "translate3": "хата", "translate4": "хатка" }, { "word": "door", "translate1": "дверь", "translate2": "дверька" }, { "word": "deal", "translate1...
$(function () { var count = 0; var images = ["./images/mainvisual.jpg", "./images/1.jpg", "./images/2.jpg", "./images/3.jpg"]; function imgChange() { $('#imgArea').css('background-image', 'url(' + images[count] + ')'); if (count == 3) { count = 0; } else { count = count + 1; ...
import React from 'react'; import { View, Text, ActivityIndicator, ScrollView, } from 'react-native'; import Cart from '../../common/Cart.js'; import Operation from '../../common/Operation.js'; import NavBar from '../../common/NavBar'; export default function () { return ( <View class="all"> ...
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; import {StyledIconButton} from "./IconButton.style"; const IconButton = function ({icon, ...props}) { return ( <StyledIconButton className="iconButton" {...props}> <FontAwesomeIcon icon={icon} /> </StyledIconButton> ); }; export default...
import React from 'react' import { CSSTransition } from "react-transition-group" function wrapAnimation(WrapedComponent){ return class extends React.Component{ render(){ let dir = this.props.location.state?this.props.location.state.dir:"left" return( <CSSTransiti...
module.exports = { secret: process.env.NODE_ENV === 'production' ? process.env.SECRET : 'secret', admin: process.env.NODE_ENV === 'production' ? process.env.ADMIN : 'testtest' }
import setAuthorizationToken from "../utils/setAuthorizationToken"; import {isEmpty} from "lodash"; import {setCurrentUser} from "../Actions/Creators/currentUser"; import jwt from 'jsonwebtoken'; import { store } from '../index' export default function checkAuthrizationToken() { let jwtToken = localStorage.jwtToke...
const qsort = (list) => { if(list.length <= 1) { return list; } else { const pivot = list.shift(); return list.filter((x) => x < pivot).push(pivot).push(list.filter((x) => x >= pivot)); } }; let test = [5,4,3,2,1]; console.log(qsort(test));
import connectHistoryApiFallback from 'connect-history-api-fallback' const history = connectHistoryApiFallback({ rewrites: [ { from: /^\/articles\/static.*$/, to(context) { const staticPathWithHistory = context.parsedUrl.pathname.replace('/articles', '') return `/${staticPathWithHisto...
const imgArray = ['images/img1.jpg', 'images/img2.jpg', 'images/img3.jpg', 'images/img4.jpg', 'images/img5.jpg', 'images/img6.jpg', 'images/img1.jpg', 'images/img2.jpg', 'images/img3.jpg', 'images/img4.jpg', 'images/img5.jpg', 'images/img6.jpg']; const shuffArr = shuffleImages(imgArray); const cards = docum...
import { default as update_190802 } from './190802.js'; import { default as update_191115 } from './191115.js'; export const updates = { 190802: update_190802, 191115: update_191115, };
// actionsTypes export const actionsTypes = { ADD_TO_FAVORITES_LIST: 'ADD_TO_FAVORITES_LIST', REMOVE_FROM_FAVORITES_LIST: 'REMOVE_FROM_FAVORITES_LIST', ADD_TO_ORDERS_LIST: 'ADD_TO_ORDERS_LIST', REMOVE_FROM_ORDERS_LIST: 'REMOVE_FROM_ORDERS_LIST', UPDATE_ORDERS_LIST: 'UPDATE_ORDERS_LIST', }; // acti...
import { combineReducers } from "redux"; import hebcal from "./hebcal"; export default combineReducers({ hebcal });
/* eslint-disable prettier/prettier */ import React,{useEffect,useState} from 'react' import { IconButtonPropType } from '../propTypes/ComponentPropTypes' import './style.css' export const IconButton = ( { children, size="medium", variant='simple', onClick, color='', disableRipple= false ...
import React from "react"; import Head from 'next/head' import Image from 'next/image' import Link from "next/link" import styles from "../styles/Home.module.css" import NavLink from './../components/NavLink' import styled from 'styled-components' const NavStyle = styled.nav` a { &[aria-current] { ...
function aaa(){ console.log('aaa func'); } var a = 0; module.exports.aaa = aaa; module.exports.a = a;
var searchData= [ ['t_5fcola',['t_cola',['../structt__cola.html',1,'']]] ];
var planets = ["images/mercury.jpg","images/venus.jpg","images/earth.jpg","images/mars.jpg","images/jupiter.jpg","images/saturn.jpg","images/uranus.jpg","images/neptune.jpg","images/pluto.jpg"]; var img = document.getElementById("planet"); var num = 0; var names = ['Mercury','Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn...
import test from "ava"; import http from "http"; import createApp from "../server/app.js"; import createLogger from "../server/logger.js"; import { getResponse, getDocument, createRealWeb, createFakeGames, } from "./_setup.js"; async function assertResponse(t, server, path, status = 200) { const res = await...
enyo.depends( "source/Mhd.js", "source/Main.js", "source/Help.js", "source/Mhd.css" );
const express = require('express') const session = require('express-session') require('dotenv').config() const {SESSION_SECRET, SERVER_PORT} = process.env const checkForSession = require('./middlewares/checkForSession') const ctrlSwag = require('./controllers/swag_controller') const ctrlAuth = require('./controllers/au...
import React from 'react'; import { Container, Row, Col } from 'reactstrap'; import './header.css'; import { IoIosHelpCircle, IoMdListBox } from "react-icons/io"; const Logotipo = require("./Logo-Bloop.png"); export default class HeaderLayuot extends React.Component{ render (){ return ( <Conta...
import React from 'react' import GlobalStyles from './GlobalStyles' export function Card({ code, origin, destination, name, children }) { return( <div> <GlobalStyles/> <style jsx> { ` h2 { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Ro...
import React from 'react'; import {View,Text,StyleSheet} from 'react-native'; export default class DetailScreen extends React.Component{ constructor(){ super(); this.state={ data:{}, url: `http://localhost:5000/planet?name=${this.props.navigation.getParam("star_name" )}` ...
"use strict"; /* Copyright [2014] [Diagramo] 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 in writi...
app.controller('loginNavController', function ($scope, $state, loginModal, $rootScope, $cookieStore) { var _Club = 1; var _CommISTO = 2; var _ScoreKeeper = 3; var _ClubText = "Club"; var _CommISTOText = "CommISTO"; var _ScoreKeeperText = "ScoreKeeper"; $scope.logOut = function () { ...
// Authentications const { Router } = require('express'); const router = Router(); const pool = require('../database'); const { isLoggedIn, isNotLoggedIn, verifyAdmin, isUser } = require('../lib/auth'); // add order router.post('/add', isUser, async (req, res) => { // generate order try { // get id use...
function solve() { let convertElement = document.querySelector('#container button'); let toElement = document.querySelector('#selectMenuTo'); let binaryOption = document.createElement('option'); binaryOption.value = 'binary'; binaryOption.textContent = 'Binary'; toElement.appendChild(binaryOpti...
window.onload=function (){ function loadTree() { $.post(window.location.href + '?getTree', {data: null}, function (response) { response = (JSON.parse(response)).reverse(); var Tree = ""; for (var i = 0; i < response.length; i += 1) { if (response[i].com...
import $ from 'jquery'; // const openNav = () => { // document.getElementById('myNav').style.width = '100%'; // }; // const closeNav = () => { // document.getElementById('myNav').style.width = '0%'; // }; // const openNav_1 = () => { // document.getElementById('myNav_1').style.height = '100%'; // }; // const clo...
import { CREATE_USER, GET_USER } from '../actions/action'; let initialState = []; export default (state = initialState, action) => { switch (action.type) { case CREATE_USER: return [...state, action.payload]; case GET_USER: return action.payload; default: return state; } };
var crypto = require('crypto') function hash256 (buffer) { return sha256(sha256(buffer)) } function sha256 (buffer) { return crypto.createHash('sha256').update(buffer).digest() } module.exports = { sha256: sha256, hash256: hash256 }
'use strict'; let chalk = require('chalk'); let events = { eventRegistry: function () { this.sigint(); }, sigint: function () { process.on('SIGINT', function() { console.log(chalk.red('\nNano has shutdown')); process.exit(0); }); } } module.exports = events;
var path = require('path'); var webpack = require('webpack'); var env = require('./env.json') || {}; module.exports = { cache: true, progress: true, entry: { infinigui: './src/scripts/infinigui.es6' }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js' }, module: { loaders: [ // Expo...
import React from 'react'; import cohort from '../cohort'; import StudentForm from './StudentForm'; import PairForm from './PairForm'; const App = () => { return ( <> <PairForm cohort={cohort} /> <StudentForm cohort={cohort} /> </> ); }; export default App;
import {createSlice} from '@reduxjs/toolkit' const userSlice = createSlice({ name:'user', initialState:null, reducers: { login:(state, action) => { return action.payload }, logout:(state) => { return null } } }) export const selectUser = state => s...
const CreditReducer = ( state = { amount: 0 , currency: "", duedate:0 , repay:0} , action ) => { switch(action.type){ case 'SET_CREDIT': return { amount: action.payload.amount , currency: action.payload.currency, duedate:action.payload.duedate , repay: action.payload.repay }...
/** * Copyright 2021-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. * * Messenger For Original Coast Clothing * https://developers.facebook.com/docs/messenger-platform/getting-started...