text
stringlengths
7
3.69M
module.exports = (req, res) => { return res.render('main/index', { title: 'Admin Ecommerce', layout: 'layouts/base', }) }
Ext.define('Crossings.news.model.NewsModel',{ getAllNews: function(params, callback) { setTimeout(function() { callback({test: 'all news', name: '<b>Tester</b>', age: true, time: new Date()}) }, 1) } })
/* In this kata, your goal is to write a function which will reverse the vowels in a string. Any characters which are not vowels should remain in their original position. Here are some examples: reverseVowels("Hello!"); // "Holle!" reverseVowels("Tomatoes"); // "Temotaos" reverseVowels("Reverse Vowels In A String") ...
import React, { Component, PropTypes } from 'react'; import { View, Text, ListView, ActivityIndicator, StyleSheet } from 'react-native'; import { connect } from 'react-redux'; import { fetchPostList } from '../../modules/Post'; import { showProgress, showBackgroundProgress } from '../../modules/Progress'; import PostIt...
class InformationsWHR { constructor() { this.inputsRadio = [...document.getElementsByName('gender')] this.inputWaist = document.querySelector('input.waistwhr'); this.inputHips = document.querySelector('input.hipswhr'); this.btnStartWHR = document.querySelector('button.startwhr'); ...
import React, { Component } from 'react'; import axios from 'axios'; import { BrowserRouter, Route, Redirect, Switch } from 'react-router-dom'; // import { AuthConsumer } from 'react-check-auth'; // import { AuthProvider } from "react-check-auth"; import Menu from './components/Menu'; import Homepage from './...
import { DATA_LOADING, GET_WEATHER_DATA } from '../Constants/constants'; const intState = { city: '', country: '', temp: '', max_temp: '', min_temp: '', day: '', date: '', time: '', loading: false }; export const weather = (state = intState, action) => { switch (action.type) {...
import React from "react"; import PropTypes from "prop-types"; import styles from "./styles.module.scss"; import { Divider, Button, } from 'semantic-ui-react' import ReactSVG from 'react-svg'; import { NETWORK, NETWORK_TYPE } from "../../config/constants" const ModelVerifier = (props, context) => ...
var ajv = require('ajv'); var _ = require('lodash'); var model_data = require('../../data/data-models/sample_model'); var env = new ajv(); var transformErrorMessage = function(errorArray){ var message = "" errorArray.reduce(function(errormessage,error){ message += "Exception in " errormessage ...
import './scss/style.scss' import bootstrap from 'bootstrap' import $ from 'jquery' import Flickity from 'flickity' import imagesLoaded from 'flickity-imagesloaded' import BeerSlider from 'beerslider' /* SLIDER */ const slider = new BeerSlider(document.getElementById('beer-slider')) /* CAROUSEL */ const mainCarouse...
import React from 'react'; import { connect } from 'react-redux'; import { Col, Row, Table } from 'antd'; function NewProgressCharts(props) { //hardcoded child data const childData = [ { name: 'SubmarineBoy', MissionsCompleted: 7, TotalPoints: 460, TotalWords: 100, key: '1', }...
/** * Insertion Sort * * Sort an array of numbers in ascending order * * Time complexity: O(n^2) worst and average case, O(n) best case * Space complexity: O(1) */ /** * @param {number[]} arr * @return {number[]} */ const insertionSort = arr => { for (let i = 1; i < arr.length; i++) { let val = arr[i];...
import Filter from './Filter.js'; import { useTranslation } from "react-i18next"; function Filters( props ) { const { t } = useTranslation(); const updateState = ( state ) => { props.setState( state ); props.setCounty( '' ); } return ( <div className="filters o-well block block__sub"> <h2>...
/** * 将 平级的 array 数据 转化成 树形数据 */ export const convertArrayToTree = (arrayDatas, id = 'id', pId = 'parentId') => { function exists(data, parentId) { for (let i = 0; i < data.length; i++) { const element = data[i]; if (element[id] == parentId) return true; } return false; } if (!arrayData...
/* Server software for handling remote account manager and private * SDN. */ require('./sdn.js'); require('./manager.js'); require('./accounts.js');
import axios from 'axios'; const getLoggedInUser = async () => { try { const { data } = await axios.get('/catsapi/v1/auth/me'); return data; } catch (error) { return false; } }; export default getLoggedInUser;
/** * Created by zrz on 2016/5/31. * @version 1.0.0 created 动态化参数传递 */ "use strict"; //根据形参内容的不同生成不同key的实例 var Good = function (_) { var that = this; if (_ && typeof _ === 'object' && Object.keys(_).length > 0) { for (var i in _) { if (_.hasOwnProperty(i)) { that[i] = _[...
import React from 'react'; import PropTypes from 'prop-types'; function TestCount(props) { return ( <div className="testCount"> VALIDATION <span>{props.counter}</span> of <span>{props.total}</span> </div> ); } TestCount.propTypes = { counter: PropTypes.number.isRequ...
const express = require('express'); const mongoose = require('mongoose'); const passport = require('passport'); const LocalStrategy =require('passport-local'); const expressSession =require('express-session'); const User = require("./models/userModel"); const app = express(); const bodyParser = require('body-parser'); ...
function alphabeticalOrder(input) { return (''+input).split('').sort().join(''); } module.exports.alphabeticalOrder = alphabeticalOrder;
var user = { login : "Vitaliy", password : 0990094989, loginOk : function() { alert(this.login + "Enter in site"); }, loginFail : function() { alert(this.login + "Failed in site"); }, checkPassword : function() { ask("Your password?",this.password, this.loginOk.bind...
function dropElements(arr, func) { var trueAtIndex = -1; // Loop until func is true for (var i = 0; i < arr.length; i++) { if (func(arr[i])) { trueAtIndex = i; break; } } // if func was never true if (trueAtIndex === -1) { return []; } return arr.slice(trueAtIndex, ar...
var searchData= [ ['execcommand',['execCommand',['../sh__command_8c.html#a1431ad5263e7ffa4775841cd4d172944',1,'sh_command.c']]] ];
const express = require('express'); const router = express.Router(); const mongoose = require('mongoose'); const User = require('../models/user'); // REGISTER new USER router.post('/', (req, res, next) => { const user = new User({ _id: mongoose.Types.ObjectId(), rut: req.body.rut, ...
"use strict";define(['jquery','knockout'],function($,ko){var init=function(koObject){} var onSave=function(koObject){} return{init:init,onSave:onSave}});
function DlgSelectDataset2(mapContainer,obj,options) { options=options||{}; options.rtl=(app.layout=='rtl'); options.showOKButton=false; options.dialogSize=BootstrapDialog.SIZE_WIDE; options.cancelButtonTitle='Close'; DlgTaskBase.call(this, 'DlgSelectDataset2' //,(options.title || 'Select Document') ...
var mongoose = require('mongoose'); var Token = require('../models/token'); var Staff = require('../models/staff'); var Agent = require('../models/agent'); var fs = require('fs'); var SHA256 = require("crypto-js/sha256"); var moment = require('moment'); // Insert a new Slider record exports.IsTokenValid = function(Ac...
require("angular-paging/dist/paging"); angular.module("Blog", [ "bw.paging" ]); require("../controllers/blogController"); require("../controllers/commentController");
/* eslint-disable unicorn/prevent-abbreviations */ async function logout(request, res) { request.session.data = null; return res.status(200).json(); } const mockRequest = (sessionData) => { return { session: {data: sessionData} }; }; const mockResponse = () => { const res = {}; res.status = jest.fn()....
/* * ROOTSCOPE VARIABLES (maintained throughout trip): * loop (East or West) --> post to server at start of trip * copilotID (Brother kerberos) --> post to server at start of trip * currentLocation (String name of location)) * Route (Array of locations objects) * isDriving (true or false) - indicates whethe...
$(document).ready(function() { $( "#testMessage" ).click(function() { var d = "message=" + $( "#message" ).val(); $.post( "/administration/send_test_message", d, function( data ) { alert( data ); }); }); });
export default { typography: {}, };
/* Description: Your task is to remove all consecutive duplicate words from string, leaving only first words entries. Example: Input: 'alpha beta beta gamma gamma gamma delta alpha beta beta gamma gamma gamma delta' Output: 'alpha beta gamma delta alpha beta gamma delta' */ const removeConsecutiveDuplicates = ...
/** * A simple store that has predefined data. It uses the {@link Example.model.Kitten} * model for it's fields definition. */ Ext.define('Premio.store.Kittens', { extend: 'Ext.data.Store', requires: ['Premio.model.Kitten'], config: { model: 'Premio.model.Kitten', data: [ { ...
'use strict'; /** * @ngInject */ function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) { $locationProvider.html5Mode(true); $stateProvider .state('Game', { url: '/', title: 'Game', views: { 'game': { templateUrl: 'game.html', controller: 'GameCtrl as game' }, '...
$(document).ready(function(){ $('#best_move_button').click(function(){ console.log($('#color :selected').val()) chrome.tabs.query({active: true, currentWindow: true},function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {message: "bestMove"}); }); }); });
import { RESTDataSource } from "apollo-datasource-rest"; export class NewsAPI extends RESTDataSource { articleReducer({ source, author, title, url, publishedAt } = {}) { return { id: `news-${source.id}`, title, author, url, time: publishedAt, source: "News", }; } asyn...
import "./App.css"; import Header from "./Component/Header"; import { Box, Grid } from "@material-ui/core"; import ProfileStatus from "./Component/ProfileStatus"; import ProfileDetails from "./Component/ProfileDetails"; import GeneralInfo from "./Component/GeneralInfo"; function App() { return ( <div className="A...
import React from 'react'; //Does not do much at the moment const Layout = (props) => { // const styledChildren = props.children.map((c, i) => { // console.log(c.props.height); // const cloneProps = { // key: i, // style: { // height: `${c.props.height}%` // } // }; // const clone = React.cloneEl...
var Clan = require('./routes/clan'); var Dashboard = require('./routes/dashboard'); var Event = require('./routes/event'); var Giftcode = require('./routes/giftcode'); var Leaderboard = require('./routes/leaderboard'); var Message = require('./routes/message'); var Tracking = require('./routes/tracking'); var User = re...
var class_eye_poke_handler = [ [ "SetEyePokeEnabledState", "d0/d61/class_eye_poke_handler.html#a4e2133c5a000939cf5969d01abed5f50", null ], [ "Start", "d0/d61/class_eye_poke_handler.html#a9b17c44168a2a33e96881d9745368e8b", null ], [ "StopMouthMoving", "d0/d61/class_eye_poke_handler.html#a74e5f44df7517892602c...
import React, { Component } from 'react'; import { Button, Table, Input, Select, message } from 'antd'; import { Link } from 'react-router'; const Option = Select.Option; const { TextArea } = Input; export default class Check extends Component { constructor(props) { super(props); this.state = { data: ...
'use strickt'; let clock = document.getElementById("clock"); let color = document.getElementById("color"); function getTime() { let time = new Date(); let h = time.getHours(); let m = time.getMinutes().toString().length < 2 ? "0" + time.getMinutes().toString() : time.getMinutes().toString(); let s = ...
var name; var track; var achievements; var points; var student; var message; var search; var searchTrack; var on = true; function print(message){ var output = document.getElementById('output'); output.innerHTML = message; } function getStudentReport(student){ var report = "<h2>Name: " + student.name + "</h2>"; ...
import express from 'express'; import methods from './methods'; import validation from './validation'; const router = express.Router(); // Routing for the resource router.get('/', validation.getList, methods.getList); router.get('/:userId', validation.get, methods.get); export default router;
'use strict'; function Promise(fn){ let value = null, deferreds = [], state = 'pending', handle = (deferred)=>{ if(state == 'pending'){ deferreds.push(deferred); return; } var ret = deferred.onFulfilled(value); deferred.resolve(ret); }, resolve = (newValue)=>{ if(newValue && typeof new...
import React, {useState, useEffect} from "react" import {StyleSheet, ScrollView} from "react-native"; import LikeCard from '../components/LikeCard'; import Loading from '../components/Loading'; import {firebase_db} from '../firebaseConfig'; import Constants from 'expo-constants'; export default function LikePage({navi...
import React, { useState, useEffect } from "react"; import { useParams } from "react-router"; import Layout from "../components/layout.jsx"; import DetailsLayout from "../components/detailsLayout.jsx"; import conf from '../configs/user.js'; import axios from '../utils/axios.js'; export default function User(props){ ...
import React from 'react'; import './Dashboard.css'; import employeeList from "../data/EmployeeList.json"; import Employee from './Employee'; function DashboardPage() { return ( <div className="employeeContainer"> {Object.keys(employeeList.user).map((key)=>{ return <Employee employee ={employeeList...
import React from "react"; import PropTypes from "prop-types"; import classNames from "classnames"; import * as constants from "@paprika/constants/lib/Constants"; import * as sc from "./Textarea.styles"; const Textarea = React.forwardRef((props, ref) => { const textareaRef = React.useRef(null); const resize = () ...
function rm2SafeMode() { var walls = Game.rooms.W5S18.find(FIND_STRUCTURES, { filter: (s) => (s.structureType == STRUCTURE_WALL || s.structureType == STRUCTURE_RAMPART) && s.hits < 100 }); var t = Game.getObjectById('605821ec0c8afa45c192ab92'); var enemiesInRoom = t.pos.findInRange(FIN...
Content.makeFrontInterface(568, 320); //declarations const var Label1 = Content.getComponent("Label1"); const var Panel2 = Content.getComponent("Panel2"); const var Panel3 = Content.getComponent("Panel3"); //sampler const var sampleList = Sampler.getSampleMapList(); const var sampler1 = Synth.getSampler("Sam...
import "./index.css"; class BreadCrumbs { constructor(props) { this.breadCrumbWrapper = document.createElement("div"); this.listBreadCrumb = [...props.listBreadCrumb]; this.OnSelected = props.onSelected; } getCurrentBreadCrumb() { return this.listBreadCrumb[this.listBreadCrumb.length - 1]; } ...
/* global: window.ChessBoard */ import { Meteor } from 'meteor/meteor' import { $ } from 'meteor/jquery' import React from 'react' import { Antares } from '/imports/antares/' import Actions from '/imports/antares/actions' const chessboardId = 'chessboard-js' let rebindChessBoard = ({ game, orientation }) => { let...
var mongoose = require('mongoose'); var express = require("express"); var app = express(); var cors = require("./config/cors"); var bodyParser = require("body-parser"); app.use(bodyParser.json()); app.use(cors); const passport = require("passport"); app.use(passport.initialize()); app.use(passport.sessio...
jQuery(document).ready(function () { jQuery("#block-menu-menu-iseek3-main-menu > ul.nav > li.leaf:nth-child(6) > a").click(function (e) { e.preventDefault(); e.stopPropagation(); jQuery('#toolkit-anchor').ScrollTo({ duration: 0, easing: 'linear' }); }); });
export default { player: 'html5-video-player', mainContainer: 'video-container' }
import AuthService from "./service"; import BaseResponse from "../../middleware/base-response"; import BasicAuthMiddleware from "../../middleware/basic-auth"; export default class AuthController extends BaseResponse { login = async (req, res) => { const { login, password } = req.body; try { const user...
import React from 'react' import './SideStories.css' function SideStories() { return ( <div className="side-area"> <div className="top-side"> <h3 className="side-story-headline"> How Toyota Went From Making the Prius to Resisting an All-Electric Push ...
const mongoose = require("mongoose"); // import country model const Country = mongoose.model("countries"); // function to handle a request to get all countries const getAllCountries = async (req, res) => { try { const all_countries = await Country.find(); res.render('countries.pug', {...
// Used to toggle the menu on small screens when clicking on the menu button function myFunction() { var x = document.getElementById("navDemo"); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; } else { x.className = x.className.replace(" w3-show", ""); } } functio...
/** * This is the navigator you will modify to display the logged-in screens of your app. * You can use RootNavigator to also display an auth flow or other user flows. * * You'll likely spend most of your time in this file. */ import React from 'react'; import { Text, StyleSheet, TouchableOpacity, View, ...
import React from 'react' import SubNav from "./subNav"; import MyVideo from "./myVideo"; import MyColumn from "./myColumn"; import MyFavorite from "./myFavorite"; import MyPhoto from "./myPhoto"; import MyInfo from "./myInfo"; import '../css/main.scss' import MyData from "./myData"; import Post from "./post";...
import React, { useReducer } from 'react'; import { authReducer, initialState } from '../reducers/authReducer'; import { login,logout } from '../actions/authAction'; export const Login = () => { const[state, dispatch] = useReducer(authReducer, initialState) return ( <div> <h1>Login</h1> ...
'use strict'; /** * @ngdoc function * @name githubExplorerApp.controller:MainCtrl * @description * # MainCtrl * Controller of the githubExplorerApp */ angular.module('githubExplorerApp') .controller('MainCtrl', function ($scope, $location) { var _parseRepo = function(repoStr) { repoStr = repoStr.repl...
/** * Using the useTransition for locking a button while waiting a result and not locking the UI * @module Experiences/Experience2 */ import React, { useTransition, useState, Suspense } from 'react' import { dataFetcher } from '@services/FakeApi' const initialData = { read: () => { return { foo: 'initial' } ...
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; const Constraint= Matter.Constraint var bob1 var bob2 var bob3 var bob4 var bob5 var rope1,rope2,rope3,rope4 var holder1,holder2,holder3,holder4 var f function setup() { createCanvas(800, 700); f=true ...
/** @jsxImportSource theme-ui */ import Link from "next/link"; import { useRouter } from "next/router"; import { Button } from "theme-ui"; const Page = () => { const router = useRouter(); const { id } = router.query; return ( <div sx={{ variant: "containers.page" }}> <h1>Note {id}</h1> {/* <Butt...
//------------------------------------------------------------------------------ // FINANCIAL MANAGER v1.0 //------------------------------------------------------------------------------ // by Alex Dyagilev //------------------------------------------------------------------------------...
module.exports = { h2oCw: { title: "H2O Plus", id: "h2o-cw", slug: "h2o-plus-e-commerce-website", type: "page", subtitle: "e-commerce site", description: "Continuously evolving a brand to stay relevant and raising the quality...
// Copyright 2013 - UDS/CNRS // The Aladin Lite program is distributed under the terms // of the GNU General Public License version 3. // // This file is part of Aladin Lite. // // Aladin Lite is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publis...
const onError = require('../../error'); const respond = require('../../respond'); const { utils: { strings } } = require('@iondv/core'); module.exports = (req, res) => respond(['auth'], (scope) => { try { const user = scope.auth.getUser(req); let base = strings.getBase('frontend'); res .set('Conte...
import { app, query } from 'mu'; app.get('/book-reports', async function( req, res ) { let reportsData = await getReports(); let jsonData = reportsDataToJsonApiObject(reportsData); res.send( jsonData ); }); async function getReports(){ const results = await query(` PREFIX ext: <http://mu.semte.ch/vocabula...
/** * @fileOverview contains queries used on the database. * @author Gustavo Amaral */ 'user strict'; /** * The SQL query to create the session's table. The table is created * only if it not exists. * @constant * @type {string} */ const createSessionTableSQL = `CREATE TABLE IF NOT EXISTS Session ( UUID t...
/* global QUnit */ /** * Before doing the test, import extended-css-iframejs-injection.txt to AdGuard */ window.addEventListener('DOMContentLoaded', () => { QUnit.test('1. Test rules injection into iframe created by JS', (assert) => { const frame = document.querySelector('#case1 > #frame1'); cons...
import React from 'react'; import './SearchBar.css'; export const SearchBar = ({ filterProducts, isFilteringByCategory }) => { if (isFilteringByCategory) { if (document.getElementById('productSearch')) { document.getElementById('productSearch').value = ''; } } return ( <input id="productS...
$(document).ready(function() { //------------- jGrowl notification -------------// setTimeout(function() { $.jGrowl("<i class='icon16 i-checkmark-3'></i> Login is successfull", { group: 'success', position: 'center', sticky: false, closeTemplate: '<i class="icon16 i-close-2"><...
/* * C.Extension.UI.UI //TODO description */ 'use strict'; dust.helpers.include = function (chunk, context, bodies, params) { return chunk.map(function (chunk) { var extension_context = context.stack.head._context; C.Extension.UI.Include.call(extension_context, params.src, function (err) { ...
import fs from 'fs' import fs_promise from 'fs-promise' import knex from 'knex' import os from 'os' import path from 'path' import {isObject} from 'lodash' const directories = [ 'Application Data/Skype', 'AppData/Roaming/Skype', 'Library/Application Support/Skype', '.Skype' ] .map(dir => path.join.apply(null...
var searchData= [ ['awake',['Awake',['../class_object_pool.html#ad94dc76a38c1ce6273fe9a25590e2e7aa9ca8bcac74fbf1f118cc3589aeca836f',1,'ObjectPool']]] ];
const TextReadController = require('./controller.readText') module.exports = {TextReadController}
/** * CSS -webkit-user-drag property * The non-standard `-webkit-user-drag` CSS property can be used to either make an element draggable or explicitly non-draggable (like links and images). See the standardized [draggable attribute/property](/mdn-api_htmlelement_draggable) for the recommended alternative method of ac...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Header from './components/Header/Header'; import Footer from './components/Footer/Footer'; // Import Style import styles from './App.css'; export class App extends Component { constructor(props) { super(props); this.state =...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _actions = require('./../actions'); /** * active when some people update * @param {Object} client * @param {Object} event */ function UpdateEvent(client) { for (var _len = arguments.length, event = Array(_len > 1 ? _len - 1 : ...
/** * 事件 * @date :2014-12-01 * @author kotenei (kotenei@qq.com) */ define('km/event', [], function () { var Event = function () { this.topics = {}; this.subId = -1; } Event.prototype.on = function (topic, func) { if (!this.topics[topic]) { this.topics[topic] = []; ...
const { app } = require('electron'); const dialog = require('./dialog'); const parseAppURL = require('../lib/parse-app-url'); const requestGithubAccessToken = require('../lib/github-api'); const { ipcMain: ipc } = require('electron-better-ipc'); const APP_SCHEMA = 'ssh-git'; function registerAppSchema() { app.se...
import PropTypes from 'prop-types'; const Filter = ({ onChangeFilter }) => { return ( <div> <p>Find contacts by name</p> <input type="text" onChange={onChangeFilter} /> </div> ); }; Filter.propTypes = { onChangeFilter: PropTypes.func.isRequired, }; export default Filter;
const urlParams = new URLSearchParams(window.location.hash.substring(1)); const headers = { 'Authorization': `Bearer ${urlParams.get('access_token')}`, 'Content-Type': 'application/json' }; var deviceId = ""; var player; window.onSpotifyWebPlaybackSDKReady = () => { const token = urlParams.get('access_tok...
import Product from './Product'; import Profile from './Profile'; import Jaringan from './Jaringan'; import Splash from './Splash'; import Login from './Login'; import Register from './Register'; import Dashboard from './Dashboard'; import Menu from './Menu'; import Keranjang from './Keranjang'; import DetailProduct fr...
import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/core/styles'; import { Link } from 'react-router-dom'; import { Typography, IconButton, Grid, List, ListItem, } from '@material-ui/core'; import MailOutlineIcon from '@material-ui/...
/** * mallActions * @params getState() 读取redux的store */ import * as actionTypes from "./actionTypes"; import * as requestApi from "../config/requestApi"; // 请求商品分类列表 export function fetchGoodsCategoryLists(data) { return (dispatch, getState) => { dispatch({ type: actionTypes.FETCH_GOODSCATEGORYLISTS, d...
import Container from "../components/Container"; import CarouselComp from "../components/Carousel"; import Items from "../components/Items"; import Footer from "../components/Footer"; import dataService from "../services/data"; const Index = () => { const { newItems, topSelling, itemsCarousel } = dataService; re...
import * as Benchmark from 'benchmark'; import * as lfo from 'waves-lfo/common'; import * as Meyda from 'meyda'; export function getFftSuites(buffer, bufferLength, sampleRate, log) { const suites = [256, 1024, 4096].map((frameSize) => { return function(next) { const numFrames = Math.floor(bufferLength /...
import axios from 'axios'; import qs from 'qs'; let url = 'https://1e4e3372.ngrok.io'; export const api = { login: '/login', check: '/check', points: '/points', logout: '/logout', register: '/register', clear: '/clear', recheck: '/recheck', events: '/events', }; export class Api { static check(x, ...
import {Link} from 'react-router-dom' import debounce from 'lodash/debounce' import {connect} from 'react-redux' import LabeledInput from '../common/LabeledInput' import {getPatientList} from '../../actions/patients' import React, {Component} from 'react' class PatientList extend...
const express = require('express'); global.fetch = require('node-fetch'); const config = require('universal-config'); const Unsplash = require('unsplash-js').default; const unsplashToJson = require('unsplash-js').toJson; //---------------without universal config------------------- // const api = require('./config/se...
import { each, mapValues, isObject, assign } from 'lodash' var styleDefaultsFns = [] export function addStyleDefaults(fn) { styleDefaultsFns.push(fn) } export function applyStyleDefaults(viewName, props) { if (!styleDefaultsFns.length) { return } if (typeof props.style == 'number') { console.warn("TODO: setS...
export default { setUser (state, user) { state.user = user }, setUserPlaylist (state, playlist) { state.userPlaylist = playlist } }
import React, { useState } from 'react' import uuid from '../node_modules/uuid/dist/v4' import './style.css' function TodoApp() { const [todo, setTodo] = useState('') const handleChange = e => { setTodo(e.target.value) } const [todoList, setTodoList] = useState([]); const handleSubmi...
const buttonSearch = document.querySelector('main .row_text a'); const modal = document.querySelector('#modal'); const close = document.querySelector('#modal .header a'); buttonSearch.addEventListener('click', () => { modal.classList.remove('hide'); // abre opoção pesquisar }); close.addEventListener('click', () ...