text
stringlengths
7
3.69M
import styled from 'styled-components'; const Footer = (props)=>{ return( <Container> <h3>all rights reserved © Adruich</h3> </Container> ) }; export default Footer; const Container = styled.footer` display:flex; height:50px; background-color: #090b13; justify-content:center; a...
// { "framework": "Vue"} if(typeof app=="undefined"){app=weex} if(typeof eeuiLog=="undefined"){var eeuiLog={_:function(t,e){var s=e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):e});if(typeof this.__m==='undefined'){this.__m=app.requireModule('debug')}th...
define([],function () { var settings = { supportedLanguages : ['pl','en'], roomName : null, userName : null, owner : false, // flag if the user is owner of the session imageSettings : null, // take over from user model useWebWorker:false, // use web worker for reading files enableConso...
$(document).ready(function() { $(document).ready(function() { $.ajax("text.txt", { }).done(function(text) { $('#text').html(text); }); }); $('h2').click(function() { $.getJSON("json.json", function(data) { $('#text2').html('<p>' + data.title + '</p>'); list = '<ul>' for(var i = 0; ...
import React from 'react'; import ReactDOM from 'react-dom'; import Board from './Board'; import Header from './Header'; import Footer from './Footer'; import './index.css'; var destination = document.querySelector("#root") ReactDOM.render( <div> <Header/> <Board/> <Footer/> </div>, destination );
'use strict' exports.generic = require('./generic'); exports.repository = require('./repository'); exports.schedule = require('./schedule'); exports.checkAuthInfo = function(authInfo){ exports.generic.checkUndefinedOrNull(authInfo.userName, 'authInfo.userName'); exports.generic.checkUndefinedOrNull(authInfo.password...
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import Application from 'application'; injectTapEventPlugin(); render(Application, document.getElementById('app'));
import { get, patch, post } from './config'; export const getDesktopMainScreen = async () => await get('compose/desktop-main-screen') export const usersCheck = async (phone, notifyError) => await get('users/check', { phone }, notifyError); export const usersMe = async () => await get('users/me'); export const token...
import React, { Component } from "react"; import { View, Text, StyleSheet, ScrollView, Dimensions } from "react-native"; import { global } from "../style/global"; import { LineChart, BarChart, PieChart, ProgressChart, ContributionGraph, StackedBarChart, } from "react-native-chart-kit"; var colorArr = [ "...
import React, {Component} from 'react'; import ReactDOM from 'react-dom'; import {Provider} from 'react-redux'; import {Router} from 'react-router-dom' import Layout from "./components/Layout"; import store from "./store"; import history from './history'; import "bootstrap/js/src/modal.js"; const app = document.getElem...
import Vue from 'vue' import vuex from 'vuex' Vue.use(vuex); import fortune from "./module/fortune" export default new vuex.Store ({ state : { loginAccount : '' }, modules : { fortune: fortune }, mutations: { updateLoginAccount: function (state,value) { state.lo...
import { all } from 'redux-saga/effects'; import journal from './journal/sagas'; function* rootSaga() { yield all([journal()]); } export default rootSaga;
import { projects } from './_work'; export function get(req, res, next) { res.end(JSON.stringify(projects)); }
const express = require('express'); const router = express.Router(); const Campground = require('../models/campground'); const middleware = require('../middleware'); //INDEX ROUTE - display all campgrounds router.get('/', function(req, res) { Campground.find({}, function(err, allcampgrounds) { if (err) { c...
/***************************************************************** ** Author: Asvin Goel, [email protected] ** ** A plugin for animating slide content. ** ** Version: 0.1.0 ** ** License: MIT license (see LICENSE.md) ** ******************************************************************/ window.RevealAnimate = window...
import React from 'react'; import Enzyme, {mount} from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import QuestionArtistScreen from './question-artist-screen'; import withActivePlayer from '../../hocs/with-active-player/with-active-player'; const QuestionArtistScreenWrapped = withActivePlayer(QuestionArti...
import Reforma from '@reforma/core' import { createField } from '../field' describe('Field', () => { test('primitive type field', () => { const field = createField(Reforma.integer) isField(field) hasType(field, Reforma.integer) canName(field) canSetId(field) canCalc(field) canValidate(fi...
const Lesson = require("../models/Lesson"); const errorWrapper = require("../helpers/error/errorWrapper"); const CustomError = require("../helpers/error/customError"); const getAllLesson = errorWrapper(async (req, res, next) => { return res.status(200).json(res.advanceQueryResults); }); // const getAllLesson = err...
// JavaScript - Node v6.11.0 let room = {'a': 0, 'b': 0, 'c': 0}; let rooms = {'a': room, 'b': room, 'c': room};
export default [ { _tag: 'CSidebarNavTitle', _children: ['Modulo Principal'] }, { _tag: 'CSidebarNavItem', name: 'Dashboard', to: '/', icon: 'cil-speedometer', badge: { color: 'info', text: 'PRINCIPAL', } }, { _tag: 'CSidebarNavItem', name: 'Reportes', t...
const PostModel = require('../models/post') const CommentModel = require('../models/comment') const CategoryModel = require('../models/category') module.exports = { async index(ctx, next) { const pageSize = 10 const currentPage = parseInt(ctx.query.page) || 1 // 分类名 const cname = c...
const initialState = { items:[] } export default function itemsReducer(state = initialState, action) { switch(action.type) { case 'INSERT_ITEM': return { items: [...state.items, action.payload.item] }; case 'REMOVE_ITEM': return { ...
module.exports = { remote: { require: jest.fn(), } };
;(function(window, document) { 'use strict'; /** * Get the value of a querystring * @param {String} field The field to get the value of * @param {String} url The URL to get the value from (optional) * @return {String} The field value */ window.getQueryString = function(field,...
export const colorScheme1 = [ "#7AC2E2", "#689EBE", "#577B9A", "#455A75", "#323C52" ]; export const colorScheme2 = [ "#323C52", "#5E4C74", "#9B5682", "#D46378", "#F8805D" ] export const colorScheme3 = [ "#F8805D", "#FF6373", "#F94B93", "#DF44BA", "#A852E1" ] export const colorScheme4 = [ "#A852E1", "#D2...
export const generateAddresses = (count) => { let res = []; for (let i = 0; i < count; i++) { let address = '0x'; for (let j = 0; j < 40; j++) { address = address + Math.floor(Math.random()*10).toString(); } res.push(address); } return res; }
import React, { useContext, useEffect, useState } from 'react'; import { userContext } from '../../App'; import Header from '../Header/Header'; import './Order.css' const Orders = () => { const [loading, setLoading] = useState(true); const [loggedInUser, setLoggedInUser] = useContext(userContext); const [o...
const R = require('ramda') class DataBase { constructor() { this.db = {} } saveEntity(entity, collection) { const newEntityCollection = R.pipe( R.propOr([],collection), R.concat([entity]) )(this.db) this.db = R.assocPath([collection], newEntityCollection, this.db) } updateEntit...
let pos = 0; const pacArray = [ ['./images/PacMan1.png', './images/PacMan2.png'], ['./images/PacMan3.png', './images/PacMan4.png'], ]; let direction = 0; const pacMen = []; // This array holds all the pacmen // This function returns an object with random values function setToRandom(scale) { return { x: Math....
import Rails from 'rails-ujs' export default class Editable { constructor() { app.document .on('click focus', '[data-editable="update"]', (e) => { this._start(e) }) .on('click', '[data-editable="save"]', (e) => { this._stop() }) .on('click', '[data-editable="cancel"]', (e) => { this._cancel(e) ...
import React from 'react'; import styles from './ImageList.module.css'; import ImageCard from './ImageCard.component'; const ImageList = (props) => { console.log(props.images); return ( <div className={styles.ImageList}> {props.images.map((image) => ( <ImageCard key={image....
var add = { add: function(first, second){ console.log(first + second); } }; module.exports = add
const mongoose = require("mongoose"); mongoose.set("debug", true); mongoose.connect(`${process.env.MONGODB_URI}`); mongoose.Promise = Promise; module.exports.Todo = require("./todo.js");
import { FETCH_DATA, CHANGE_VALUE, SELECT_PROGRESS_BAR, fetchData, changeProgressBarValue, selectProgressBar, default as progressBarDemoReducer } from 'routes/ProgressBarDemo/modules/ProgressBarDemoReducer' describe('(Redux Module) ProgressBarDemo', () => { it('Should export a constant FETCH_DATA.', ()...
import React, { useEffect, useState } from 'react'; import socketIOClient from 'socket.io-client'; import logo from './logo.svg'; import './App.css'; import Namespaces from './components/Namespaces'; import Rooms from './components/Rooms'; import ChatArea from './components/ChatArea'; const username = prompt('What is ...
console.log('js czech'); var app = angular.module('FoodApp', []); app.controller('FoodController', function() { console.log('FoodController loaded'); var self = this; self.message = 'sup'; self.food = 'candy'; }); function Foods() { console.log('food check'); //connect to serve...
import Round from "./round"; export default class Match { constructor(date, opponent, bounty,matchdata=[]) { //match data is supposed to be a json file this.dateStarted = date; this.opponent = opponent; this.reward = bounty; this.currentRound = 0; this.roundData = matchdata; this.rounds =...
import request from '@/utils/request'; export function UploadAvatar(data) { return request({ url: '/profile', method: 'post', data: data, }); } export function getProfile(query) { return request({ url: '/profile', method: 'get', params: query, }); } export function update_password(data)...
import Fonts from './fonts' import Events from './events' import Colors from './colors' import RouteType from './route' import { apiEndpoint, project } from './environment' export { Fonts, Events, Colors, project, RouteType, apiEndpoint, }
const express = require("express"); const router = express.Router(); const passport = require("passport"); const FacebookStrategy = require("passport-facebook").Strategy; require("./facebook-setup.js"); router.get("/facebook-login", passport.authenticate("facebook")); router.get("/success", (req, res) => { res.se...
const { List, Struct, Byte, ui8, b1, Pointer, Variable, ui16, b2, sui16, ByteArr, } = require("../index.js"); const Buffer = require("buffer/").Buffer; const Status = Byte.define( [ ["playerState", b2], ["deviceTime", b1], ["geoData", b1], ["presenceSensor", b1], ["errorFlag...
import React, { Component } from 'react'; import axios from 'axios'; // import './App.css'; import Results from './Results'; import Inputs from './Inputs'; class App extends Component { state = { results: '', queryObj: {}, toptags: [], resultsList: [] } getTopTags = (artist) => { let lastFMu...
const ExamHall = require('../model/examhall'); const { mainUserEnums } = require('../config/enums'); exports.createExamHall = async (req, res) => { try { const body = req.body; if (!body.usedCount) { body.usedCount = body.maxCount; } const examHall = ExamHall(body);...
require('dotenv').config(); const rp = require('request-promise'); const { createUser, getUserInfoWithJoin, insertFbLoginUserTable, insertFBProfile, } = require('../../Model/v1/user'); const UserResponseModel = require('../../responseModel/userResponse'); const { handleAccessTokenAndRemainingTime } = require('...
import React from 'react' export default function Schedule() { return ( <div> <div class="card"> <div class="card-body"> <h5 class="card-title">Schedule</h5> <p class="card-text">To Be Announced...</p> </div> </div> </div> ) }
#!/usr/bin/env node const pug = require('pug') const sass = require('node-sass') const fs = require('fs') const path = require('path') const preocessInputData = new Promise((res, rej) => { const stdin = process.openStdin(); let data = ""; stdin.on('data', function (chunk) { data += chunk; });...
import React from 'react'; const Img = ({ imageSrc, imageAlt, imageClass, onClick }) => { return ( <img src={imageSrc} alt={imageAlt} className={imageClass} onClick={onClick} /> ); }; export default Img;
import React from 'react'; import PropTypes from 'prop-types'; import {withStyles} from '@material-ui/core/styles'; import ExpansionPanel from '@material-ui/core/ExpansionPanel'; import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'; import ExpansionPanelDetails from '@material-ui/core/ExpansionPa...
// JavaScript Document $("document").ready(function() { $("#cheat_frm_link").click(function(){ /*$("#cheat_frm").submit(function(){ });*/ $.ajax({ type: "POST", url: "http://localhost/csrf_demo/transfer.php", data: $("#cheat_frm").serialize(), // serializes the form's elements. ...
import contact01 from '../assets/images/contact-01.png'; import contact02 from '../assets/images/contact-02.png'; import contact03 from '../assets/images/contact-03.png'; import contact04 from '../assets/images/contact-04.png'; import contact05 from '../assets/images/contact-05.png'; export class experienceContact exte...
import React from 'react' import PropTypes from 'prop-types' import NavBar from 'components/organisms/NavBar' import Footer from 'components/organisms/Footer' const MainLayout = ({ title, children, routes, styles }) => ( <div className={styles.wrapper}> <NavBar routes={routes} /> <main className={styles.m...
import React, { Component } from 'react'; import Card from 'react-bootstrap/Card'; import ListGroup from 'react-bootstrap/ListGroup'; import Button from 'react-bootstrap/Button'; class ShowOrders extends Component { constructor() { super(); this.state = { } } render() {...
var data = { "defs": [ "$ Compare (#{files}) with the one from (#{numbers}) minutes ago {8}", "$ 「(#{files})」ファイルが(#{numbers})分前から(変化した|変わった)ところを(#{display}) {8}", "% git diff HEAD '@{#{$2} minutes ago}' #{$1} {8}", "$ Compare (#{files}) with the one from (#{numbers}) hours ago {8}", "$ 「(#{files})」ファイルが(#{num...
import firebase from 'firebase'; require('@firebase/firestore') var firebaseConfig = { apiKey: "AIzaSyCBWgni3eeIzD0GtY57lS669q9Iid9EGJ8", authDomain: "book-santa-568cc.firebaseapp.com", databaseURL: "https://book-santa-568cc.firebaseio.com", projectId: "book-santa-568cc", storageBucket: "book-santa-568cc.app...
module.exports = function (numUno,numDos){ return numUno + numDos }
var webServer = "http://talkypool.cafe24.com/work/enriching"; var imgServer = ""; var wasServer = "http://talkypool.cafe24.com/work/enriching"; var loginType = ""; var pageType = ""; var isIndex = false; var ie = getIE(); var isFlash = swfobject.hasFlashPlayerVersion("1"); var isMobile = jQuery.browser.mobile; i...
import Cycle from '@cycle/core' import { makeDOMDriver, hJSX } from '@cycle/dom' function main({ DOM }) { const decrement$ = DOM.select('.decrement').events('click').map(_ => -1) const increment$ = DOM.select('.increment').events('click').map(_ => +1) const count$ = increment$.merge(decrement$) .scan((x, y) ...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import ViewUI from 'view-design'; import 'view-design/dist/styles/iview.css'; Vue.use(ViewUI); //引入g2 im...
// Variable Names and Normalisation //to make consistent to a standard var resultLinkHref = '#';
import React, { useState } from 'react'; import { Panel, Slider, Divider, Toggle, Progress, InputNumber, Grid, Row, Col } from 'rsuite'; import { Linechart } from '../linechart/linechart'; import { useInterval } from './useInterval' import axios from 'axios' import './actuator.css'; export const Actuator = ({ name })...
import React from 'react'; import './App.css'; import Auth from './components/Auth'; import { BrowserRouter as Router, Route } from "react-router-dom"; import HomeUsers from './containers/HomeUsers'; function App() { return ( <Router> <Route exact path="/" component={Auth}/> <Route path="...
// This file starts our server, we defer to localhost:3000 // if a process port and url are not defined var app = require('./server/server.js'); // var db = require('./server/dbConfig.js'); //only need for database update var port = process.env.PORT || 3000; var url = process.env.URL || 'localhost'; app.listen(port, u...
import { useRouter } from "next/dist/client/router"; import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectProducts } from "../../redux/user/user.selector"; import Head from "next/head"; import Image from "next/image"; import { addItem } fr...
//MEDIUM QUESTIONS:- // QUESTION NO.1 const str="word searches are super fun"; const start='s'; var words=str.split(' '); function specialReverse(str) { for(i=0;i<words.length;i++) { if(words[i][0] === start) { words[i]= words[i].split('').reverse().join(''); } } ret...
import React from "react"; import {Link} from "gatsby"; export function Footer() { return ( <footer class="footer"> <div class="content has-text-centered"> <p> <strong>Offset me!</strong> by{" "} <a href="http://www.suchanek.io">Jakub Suchánek</a> and{" "} <a href="htt...
'use strict'; const config = require('config'); const logger = require('logger'); const World = require('lib/world'); const world = new World(config); require('lib/process-events').register(world); require('lib/server').start(world, config, function startCallback(error) { if(error) { return logger.error('Worl...
$(document).ready(function () { // Hopefully so that the code is easier to follow we define our selectors // now var langnames = "div.language"; var langchooser = "#lang-chooser"; // This function handles everything to do with changing the language // including: // - Updating ...
import Vue from 'vue' import VueRouter from 'vue-router' import Home from '../views/Home.vue' import Admin from '../views/Admin.vue' import NoticeAdmin from '../views/NoticeAdmin.vue' import FeedBackAdmin from '../views/FeedBackAdmin.vue' import FengcaiAdmin from '../views/FengcaiAdmin.vue' import UserAdmin from '../vi...
import { put, takeLatest } from 'redux-saga/effects'; import axios from 'axios'; import {useSelector, useDispatch} from 'react-redux'; function* getPlaylistE(action) { try { const playlist= yield axios.get('/playlist/energetic'); console.log('got a response on playlist:', playlist.data); ...
'use strict'; const os = require('os'); const path = require('path'); const electron = require('electron'); const app = electron.app; const BrowserWindow = electron.BrowserWindow; const shell = electron.shell; const appName = app.getName(); function sendAction(action) { const win = BrowserWindow.getAllWindows()[0]...
import { BEGIN_AJAX_CALL, AJAX_CALL_ERROR, AJAX_CALL_SUCCESS } from './types'; export function beginAjaxCall() { return { type: BEGIN_AJAX_CALL }; } export function ajaxCallError( payload ) { return { type: AJAX_CALL_ERROR, payload } } export function ajaxCallSuccess( payload ) { return {...
const path = require('path') const config = require('./config/index') const ProgressBarPlugin = require('progress-bar-webpack-plugin') const webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin') const FriendlyErrors = require('friendly-errors-webpack-plugin') const BundleAnalyzerPlugin =...
const Discord = require('discord.js'); const Events = require('./events'); const log = require('./utils/logger'); const config = require('../config.json'); const bot = new Discord.Client(); const events = new Events(bot); log('info', 'Starting the bot...'); Promise.all([ events.load(), bot.login(config.token), ]...
(function() { // 这些变量和函数的说明,请参考 rdk/app/example/web/scripts/main.js 的注释 var imports = [ 'rd.controls.ProgressBar' ]; var extraModules = [ ]; var controllerDefination = ['$scope', 'ProgressbarFactory', main]; function main(scope, ProgressbarFactory ) { scope.progressbar = ...
import React from "react" import './style.css'; function Card(props) { return ( <div class="col-lg-4 col-md-6 col-sm-12"> <div class="card project-card"> <br/> <h5 className="card-title" style={{textDecorationLine: 'underline', textAlign: 'center'...
import Car from './car.js' import NeuralNetwork from './neuralNetwork.js' export default class CarPopulation { constructor({ cvs, obstacles, carPopulation, carSpeed, mutationRate, mutationAmount, hiddenNeurons, inputAmount }) { this.cvs = cvs this.ctx = cvs.ctx this.carSpeed = carSpeed ...
/* mongoDB Schema for rooms false = free room true = occupied room */ const mongoose = require ('mongoose'); var RoomSchema = mongoose.Schema({ name: { type: String, unique: true, required: true, }, availability: { type: Boolean, required: true, defau...
var RoboHydraHead = require("robohydra").heads.RoboHydraHead; var RoboHydraJsonHead = (path, getObject) => new RoboHydraHead({ path, handler: function(req, res) { res.headers['content-type'] = 'application/json; charset=utf-8'; var response = getObject(req, res); if( response !== undefi...
/** * Created by kristjan.kiolein on 17.03.2016. */ (function ($) { $(function () { }); })(jQuery);
import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableContainer from '@material-ui/core/TableContainer'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@mat...
function currySauce(inputFunc) { let curriedFunc = function (currency) { return inputFunc(',', '$', true, currency); }; return curriedFunc; } currySauce( function currencyFormatter(separator, symbol, symbolFirst, value) { let result = Math.trunc(value) + separator; result += value.toFixed(2).substr(-2,2...
"use strict"; var chalk = require("chalk"); function Logger() { this._silent = false; this._debug = false; } Logger.prototype.configure = function (params) { if (params.silet) { this._silent = true; } if (params.debug) { this._debug = true; } return this; } Logger.prototype.error = function (msg) { if...
import React from 'react' import styled from '@emotion/styled' import moment from 'moment' import Head from '../components/Head' import DocsHeader from '../components/DocsHeader' import Footer from '../components/Footer' export const Wrapper = styled('div')` height: 100%; display: flex; justify-content: space-b...
class Ray { constructor(pos, dir) { this.translate(pos) this.setAngle(dir) } render() { push() translate(this.pos.x, this.pos.y) line(0, 0, this.dir.x * 10, this.dir.y * 10) pop() } translate(pos) { this.pos = pos } setAngle(angle) {...
const btnLogin = document.querySelector('.btn-login') const form = document.querySelector('form') btnLogin.addEventListener('click', function (event) { event.preventDefault() const fields = [...document.querySelectorAll('.input-block input')] fields.forEach(field => { if (field.value === "") form....
import React, { Component } from 'react'; class Footer extends Component { render() { return ( <footer class="footer" style={{position: "absolute", bottom: "0", width: "100%", background: "#F14668", color: "white",}}> <div class="content has-text-centered"> <p> ...
import React, {PropTypes} from 'react'; import WeekNames from './WeekNames'; import CalRow from './CalRow'; class CalendarTable extends React.Component { constructor(props) { super(props); this.NUMBER_OF_WEEKS = 6; this.init(props); } componentWillReceiveProps(nextProps) { ...
// 讲师列表的模块 // 发送ajax请求讲师列表的数据回来渲染 define(['jquery', 'template', 'bootstrap'], function ($, template, bt) { $.ajax({ url: '/api/teacher', type: 'get', success: function (info) { // console.log(info) if (info.code == 200) { // 渲染模板 var ht...
// @flow import isEqual from "lodash/isEqual"; export function isObservablePropsChanged( observableProps: Array<string>, currentProps: {}, nextProps: {} ): boolean { for( let i = 0; i < observableProps.length; i++ ) if( !isEqual( currentProps[ observableProps[ i ] ], nextProps[ observableProps[ i ] ] ) ) retur...
/** * * @author Anass Ferrak aka " TheLordA " <[email protected]> * GitHub repo: https://github.com/TheLordA/Instagram-Clone * */ import React, { useState, useEffect, useContext } from "react"; import { Link } from "react-router-dom"; import axios from "axios"; import AuthenticationContext from "../contexts/...
import React from 'react' import { SearchButtom } from "./Search.styled"; import { Icon,Tag } from 'antd-mobile'; function SearchBut(props) { const onChangeTag = (value) => { return () => { props.valueck(value) } // setvalue(value); }; return ( <SearchButtom > <di...
export function test { alert ('test'); } export var alicia = 'liar?';
import React, { useState } from 'react'; import { Dimensions, ScrollView, Image, } from 'react-native'; import Styled from 'styled-components/native'; import IconButton from '~/Components/IconButton'; const Container = Styled.View``; const ImageContainer = Styled.View` border-top-width: 1px; borde...
import React from 'react' import { shallow } from 'enzyme' import { TradeAddPage } from '../../components/TradeAddPage' import { trades } from '../fixtures/trades' let addFirebaseTrade, history, wrapper beforeEach(() => { addFirebaseTrade = jest.fn() history = { push: jest.fn() } wrapper = shallow( <TradeAd...
import React, {Component } from 'react' import { Link } from 'react-router-dom' import FavoriteIcon from '@material-ui/icons/Favorite'; import IconButton from '@material-ui/core/IconButton'; class AllBeer extends Component { constructor(props) { super(props) this.state = { favorite: false, beer: ...
import { combineReducers } from 'redux'; import arrWordsReducer from '../reducer/arrWordsReducer'; import isAddingReducer from '../reducer/isAddingReducer'; import * as api from '../reducer/api.reducer'; import * as player from '../reducer/player.reducer'; import * as routes from '../reducer/routes'; const combineRed...
/* Write code to remove duplicates from an unsorted linked list FOLLOW UP How would you solve this problem if a temporary buffer is not allowed? */ module.exports = function(list) { var current = list.head , tmp = null , tmpV = null while (current) { tmp = current.next tmpV = null ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { EditorState } from 'draft-js'; import classNames from 'classnames'; // import Option from '../../components/Option'; import styles from './styles.less'; // eslint-disable-line no-unused-vars // import Cropper from './Cropper'; impor...
// @flow const choo = require('choo'); const html = require('choo/html'); // Type of the app state type Model = { counter: number; } // All app specific events. Emitter also understands the built in choo events // "domcontentloaded", "render" and "*" type Event = 'increment' | 'decrement'; // Optional type alias...
'use strict'; var express = require('express'); var app = express(); var tracks = [ { "id": 21, "title": "Halahula", "artist": "Untitled artist", "duration": 545, "path": "c:/music/halahula.mp3" }, { "id": 412, "title": "No sleep till Brooklyn", "artist": "Beastie Boys", "duration": 312.12, "path": "c:/music/b...