text
stringlengths
7
3.69M
var mn = mn || {}; mn.services = mn.services || {}; mn.services.MnPools = (function (Rx) { "use strict"; var launchID = (new Date()).valueOf() + '-' + ((Math.random() * 65536) >> 0); MnPoolsService.annotations = [ new ng.core.Injectable() ]; MnPoolsService.parameters = [ ng.common.http.HttpClient,...
function bright() { clear(); let c=document.getElementById('myCanvas'); let ctx=c.getContext('2d'); let g=document.getElementById('guide'); g.style.display='block'; g.innerText='滚动滑轮调节亮度'; c.onmousewheel = c.onwheel = function (event) { event.preventDefault(); event.wheelDe...
let datasetUSEducation; let req = new XMLHttpRequest(); req.open("GET", 'https://raw.githubusercontent.com/no-stack-dub-sack/testable-projects-fcc/master/src/data/choropleth_map/for_user_education.json', false); req.onreadystatechange = () => { if (req.readyState == 4 && req.status == 200) datasetUSEducation = JS...
import React from 'react'; import './App.css'; import { BrowserRouter as Router, Switch, Route, Link ,Redirect } from "react-router-dom"; import P404 from './View/Pages/P404'; import Login from './View/Pages/Login'; import index from './Layout/index'; import 'bootstrap/dist/css/bootstrap.min.css'; const App=()=> ...
import Inputmask from 'inputmask'; export default function initInputMask() { const masks = { tel: '+7 (999) 999-99-99', date: '99.99.9999', card: ['9{4} 9{4} 9{4} 9{4}', { placeholder: '∗' }], }; Object.keys(masks) .forEach((maskName) => { const maskPlaceholder ...
export { default } from 'bepstore-github/serializers/github';
// server.js // init project var express = require('express'); var bodyParser = require('body-parser'); var pug = require('pug'); var less = require('less'); var expressLess = require('express-less'); var app = express(); // configure Express app.set('views', __dirname + '/views'); app.set('view engine', 'pug'); app...
'use strict'; /** * @type {HTMLInputElement} */ let accessCodeDisplay; /** * @type {HTMLInputElement} */ let accessCode; /** * @type {HTMLInputElement} */ let errorAlert /** * @type {HTMLButtonElement} */ let findGameButton /** * @type {HTMLButtonElement} */ let hostGameButton /** * @type {HTMLButtonEl...
//[COMMENTS] //myFirstName should be a string with at least one character in it. //myLastName should be a string with at least one character in it. //[COMMENTS] // Example var firstName = "Alan"; var lastName = "Turing"; // Only change code below this line //The lines below were added var myFirstName = "Aritra"; var...
import {expect} from 'chai'; import {reducer} from '../src/reducer'; import {INITIAL_STATE} from '../src/reducer'; describe('reducer', () => { it('handles SET_CARDS', () => { const action = { type: 'SET_CARDS', cards: [ ['Hello', 'こんにちは'], ['Bye', 'さようなら'] ] }; const n...
import { constant2Array, datePickerShortcuts } from '../../../../../scripts/utils/misc' import constant from '../../../../../configs/constant' import Relation from '../../../../../models/im/relation' export default [ { property: 'textContent', filter: 'LIKE', ellipsis: true, label: '消息内容', render(h) { return...
$('li.hot').addClass('complete');
const { serverConfig } = require(global.constAddress); class GeneralError { notFoundError() { this.generateError({ status: 404, msgEn: "Not found", msgFa: "یافت نشد", }); } badRequestError() { this.generateError({ status: 400, msgEn: "Bad request", msgFa: "درخواست...
var calendartz = 'America/New_York'; var hash = window.location.hash.substr(1); var result = hash.split('&').reduce(function (res, item) { var parts = item.split('='); res[parts[0]] = parts[1]; return res; }, {}); if (typeof result.timezone !== 'undefined') { calendartz = result.timezone; ...
const net = require('net'); function main() { process.stdin.setEncoding('utf8'); let id = (new Array(12)).fill(0).map(() => randomAlg()).join(''); const socket = net.createConnection({ host: 'localhost', port: 1234 }, () => { socket.on('data', (data) => { let txt =...
import { Storage } from '../_utils/storage'; function toArrayItems(strData) { let arrData = []; if (typeof strData === 'string') { arrData = strData.split('|'); } return arrData; } function generateId() { return Math.floor(Math.random() * 10000); } export const Player = { save: (data)...
function shelfBook(book, books) { if (books.length != 3) { books.unshift(book); } } function unshelfBook(title, books) { for (var i = 0; i < books.length; i++) { if (books[i].title === title) { books.splice(i, 1); } } } function listTitles(books){ titles = []; for (var i = 0; i < books...
import React from 'react'; const Button = ({ openMenu, className }) => { const css = className ? `button button--hamburger ${className}` : 'button button--hamburger'; return( <button className={css} onClick={() => { openMenu() }}> <div> <span></span> <span></span> ...
import React from "react"; import { Button, Card, Col, Container, Row } from "react-bootstrap"; import { Particle } from "../Home/Particle"; import "./Projects.css"; import sudokologo from "../Assets/S.png"; import Clockifylogo from "../Assets/Clockify.png"; import Covidlogo from "../Assets/21.png"; import Travelocityl...
import React from 'react' import { theme } from '../theme' export const Button = props => ( <button css={{ background: theme.color.purple, color: theme.color.white, borderRadius: theme.borderRadius, fontSize: theme.fontSize.medium, fontWeight: theme.fontWeight.bold, border: 'n...
cc.Class({ extends: cc.Component, properties: { // foo: { // default: null, // The default value will be used only when the component attaching // to a node for the first time // url: cc.Texture2D, // optional, default is typeof defau...
import Tabbar from '@/components/Tabbar' import AppHeader from '@/components/AppHeader' // 代码切割 路由懒加载 const Home = () => import('@/pages/Home/Home') const ActivityList = () => import('@/pages/ActivityList/ActivityList') const Category = () => import('@/pages/Category/Category') const CategoryList = () => import('@/page...
define([ "jquery", "base/declare", "app/dom-geometry", "./ToolItem" ], function ($, declare, geom, ToolItem) { var $ph = $('<div class="editor-status"></div>'), doc, body, $body, $doc, $placeHolder; function _createPlaceHolder(refEl) { var cs = geom.getComputedStyle(refEl); ...
export function findLi(value, peopleArr) { return dispatch => { let val = value.toLowerCase().trim() let peopleArray = peopleArr if(val !== ''){ peopleArray.forEach((person) => { if(person.name.trim().toLowerCase().search(val) === -1 && String(person.age).trim().search(val) === -1 && String(person.money)....
/** * Created by manuh on 4/13/2016. */
const initialState={ fetching: false, fetched: false, users: [], error: null, }; const testReducer = (state=initialState, action)=>{ switch(action.type){ default: break; case "FETCH_USERS_START":{ state={ ...state, fetching: true, }; break; } case "FET...
// filter function `the main job of filter function is to filter out the element who are passed in function call or test` let arr =[20,50,30,80,23,47]; function even(num){ return num%2==0; } // filter array test whether the num%2==0 or not those are passed in the test will go to evenarr let evenarr = arr.filter(eve...
import angular from "/ui/web_modules/angular.js"; import mnPendingQueryKeeper from "/ui/app/components/mn_pending_query_keeper.js"; import _ from "/ui/web_modules/lodash.js"; export default 'mnHelper'; angular .module('mnHelper', [mnPendingQueryKeeper]) .factory('mnHelper', mnHelperFactory); function mnHelperFac...
angular.module('bootstrap').factory('Page',['$rootScope', function($rootScope){ var title = 'default'; return { setTitle: function(title){ $rootScope.title = title; } }; } ]);
import React from 'react' import StripeCheckout from 'react-stripe-checkout'; import { useSelector, useDispatch } from 'react-redux' import {BASE_URL} from '../constants.js' // => URLs const CHARGES_URL = BASE_URL + '/charge_adapter' // => app component export default function Payment() { const dispatch = useDis...
// This module is here to directly import the es6 source for those // lucky enough to have an es6-compatible VM. import xrange from "./src/index"; export default xrange;
function Ball() { this.x = 300; this.y = 200; var xvel = 2; var yvel = 2; var r = 255; var g = 255; var b = 255; this.show = function() { stroke(r, g, b); strokeWeight(7); ellipse(this.x, this.y, 7, 7); } this.launch = function() { if (this.y >= ...
import imageGallery from './components/gallery/imageGallery.vue'; import videoGallery from './components/gallery/videoGallery.vue'; import imageUpload from './components/upload/imageUpload.vue'; import videoUpload from './components/upload/videoUpload.vue'; import home from './components/home/home.vue'; export default...
import request from '@/utils/request'; export const getHomeBrandList = params => { return request({ url: '/home/brand/list', params }) } //根据id删除品牌 export const deleteBrand = data => { return request({ url: '/home/brand/delete', method: 'post', data }) } //更新品牌...
var util = exports.util = require('util') var connect = exports.connect = require('connect') var knox = exports.knox = require('knox') var uuid = exports.uuid = require('node-uuid') var oauth = exports.oauth = require('oauth') var url = exports.url = require('url') var request...
'use strict'; const assert = require('assert'); const expect = require('chai').expect; const should = require('chai').should(); const db = require('../../config/database'); it('MYSQL server is up', function(){ let r; db.query('SELECT 1 + 1 AS solution', function (error, results, fields) { if (error) t...
/* eslint-disable */ import React, { useState, useEffect } from "react"; import PropTypes from "prop-types"; import clsx from "clsx"; import { makeStyles } from "@material-ui/styles"; import { Button, TextField, FormControl, InputLabel, Select, Input, MenuItem, DialogTitle, DialogContent, Dialog, ...
Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { var elproto = Element.prototype; elproto.animateAlongPath = function (path, start, duration, easing, callback) { var el = this; var el2 = el.clone(); el2.transform('t0,0'); var len = Snap.path.getTotalLength(path), elBB = el2.get...
var YoutubeMp3Downloader = require("youtube-mp3-downloader"); var storage = require('./storage'); //Configure YoutubeMp3Downloader with your settings var YD = new YoutubeMp3Downloader({ "ffmpegPath": "./ffmpeg.exe", // Where is the FFmpeg binary located? "outputPath": "./output", // Where should the ...
const profile = require('./profile'); const users = process.argv.slice(2); for (let i = 0; i < users.length; i += 2) { profile.get(users[i], users[i + 1]) }
// @see https://www.graphql-code-generator.com/docs/getting-started/programmatic-usage const fs = require('fs'); const readline = require('readline'); const { generate } = require('@graphql-codegen/cli'); const confirm = async (msg) => { const answer = await question(`${msg}(y/n): `); return answer.trim().toLowerC...
/** * misc functions */ /** * parses url query string to javascript array */ jQuery.parseQueryString = function() { var query = window.location.search.substring(1), vars = query.split("&"), query = {}; for (var i = 0, len = vars.length; i < len; i++) { vars[i] = vars[i].split('='); query[vars[i][0]] = vars...
angular.module('firstCtrl', []).controller('CalculatorController', function CalculatorController($scope) { $scope.message = "hello World" $scope.sum = function() { $scope.z = $scope.x + $scope.y; }; });
///query cooked menu info //get nutrition info //sum up (based on today timestamp) const dynamodb = require("../dynamodb"); module.exports.getUpdateDailyInfo = async (event) => { const userID = event.pathParameters.id; //check today timestamp const timestamp = event.pathParameters.timestamp; const params = { ...
import {StatusBar} from 'expo-status-bar'; import React, {useState} from 'react'; import {Text, View, Button, SafeAreaView, Image} from 'react-native'; import tw from "tailwind-react-native-classnames" // native base export default function App() { let [hide, setHidden] = useState(false) return ( <View style...
// @flow import { type Action } from "shared/types/ReducerAction"; import { type AsyncStatusType, type NotificationType, } from "shared/types/General"; import { ASYNC_STATUS } from "constants/async"; import { ASYNC_SUPPLIER_INIT, HANDLE_NOTIFICATION, GET_SUPPLIERS_SUCCESS, GET_SUPPLIER_SUCCESS, } from "act...
import React from 'react' import { Icon } from 'react-icons-kit' import { code as CodeIcon } from 'react-icons-kit/fa/code' const Code = ({ size }) => (<Icon icon={CodeIcon} size={size} />) export default Code
const mongoose = require('mongoose'); const commentSchema = new mongoose.Schema({ from: String, content: String, date: Date, }) const messageSchema = new mongoose.Schema({ from: String, to: String, content: String, date: Date, }) const daterSchema = new mongoose.Schema({ name: String, email: String...
async function CreateMapInstance(){ var mapService = new ESRIMapInstance.Map("mapId", "topo"); var map = await mapService.CreateMap(); var adminBoundaryService = new FeatureSetJSONService.AdminBoundary(); var talukFeatureSet = adminBoundaryService.GetTaluks(); var districtFeatureSet = adminBoundaryService...
$(function() { var data = [{ label: "Sulexy D", data: 40 }, { label: "MYS Akins", data: 30 }, { label: "Coolchi Shef", data: 20 }, { label: "Gabbi G", data: 10 }]; var options = { series: { pie: { ...
import { combineReducers } from 'redux' import { initialUsersState } from './users' // Implement Dan Abramov's suggested solution for reseting a redux store on logout // Added a localStorage.clear() to make sure that localStorage gets cleared out too // http://stackoverflow.com/questions/35622588/how-to-reset-the-stat...
import app from '../../app.module.js'; const DatepickerPopupDemoCtrl = app .controller('DatepickerPopupDemoCtrl', ["$scope", "sharedService", function($scope, sharedService) { $scope.sharedService = sharedService; $scope.today = function() { $scope.dt = new Date(); }; ...
/* * taken from http://www.cplusplus.com/forum/articles/12974/ * Requires: * variables, data types, and numerical operators * basic input/output * logic (if statements, switch statements) * * Write a program that allows the user to enter the grade scored in a programming class (0-100). * If the user scored a 1...
const Issue = require('../model/issue'); const issueState = require('../model/issueState'); const winston = require('winston'); const logger = winston.createLogger({ level: 'info', format: winston.format.json(), transports: [ new winston.transports.File({ level: 'info', filename: 'logs/service.lo...
/** * Created by Magador on 18/04/2015. */ var request = require('request'), util = require('util'); var RequestPool = function(opts) { this.size = opts && opts.size && util.isNumber(opts.size)? opts.size: this.size; if(opts && opts.requests && Array.isArray(opts.requests)) { this.add(opts.reque...
import _ from 'lodash'; import React, {Component} from 'react'; import {FlatList} from 'react-native'; import {connect} from 'react-redux';//connect yapısı ile projeyi sarmalıyorum. import {studentListData} from '../actions'; import ListItem from './ListItem'; class StudentList extends Component{ componentD...
import React from "react" const Header = ({ from }) => <h1>This is header from {from}</h1> export default Header
const { merge } = require('webpack-merge'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const webpackConfig = require('./webpack.config'); const ImageminWebpackPlugin = require('imagemin-webpack-plugin').default; const ImageminWebp = require('imagemin-webp'); const publicWebpackConfig = merge(webpa...
/** * Necessary Data * * 1. stateNumber * 2. Tline[i][j] (i => j) * * 3. entityName: $('#entityName') * 4. inputNumber: $('#inputNumber') * 5. outputNumber: $('#outputNumber') * * 6. inputType: $('#inputType') * 7. outputType: $('#outputType') * * 8. inputFrom: $('#inputFrom') * 9. inputTo: $('#inputTo') ...
import React from 'react'; import {connect} from 'react-redux'; //import Product from './Product'; import '../styles/product.css' import { bindActionCreators } from 'redux'; import allproductsAction from '../actions/allproductsaction'; import searchAction from '../actions/searchAction'; import sortProductsAction from '...
import React, {useContext} from 'react'; import ThemeContext from "./ThemeContext"; export function Header() { const [appTheme, setAppTheme] = useContext(ThemeContext); const handleTheme = () => { appTheme=== "Light" ? setAppTheme ("dark") : setAppTheme("Light") } return ( ...
const expressGraphQL = require("express-graphql").graphqlHTTP; const { GraphQLSchema } = require("graphql"); const { RootQueryType } = require("../types/query"); const { RootMutationType } = require("../types/mutation"); const route = new expressGraphQL({ graphiql: true, schema: new GraphQLSchema({ query: Roo...
import React from 'react' import Head from 'next/head' export default props => ( <div> <Head> <title>{`${props.title} –– Lume`}</title> {props.analyticsId ? ( <script async src={`https://www.googletagmanager.com/gtag/js?id=${ props.analyticsId }`} ...
import React, { useState } from "react" import Button from "@material-ui/core/Button" import TextField from "@material-ui/core/TextField" import Dialog from "@material-ui/core/Dialog" import DialogActions from "@material-ui/core/DialogActions" import DialogContent from "@material-ui/core/DialogContent" import Grid from...
angular.module('eatery').controller('indexCtrl', [ '$scope', function($scope){ $scope.isLoggedIn = true; $scope.firstName = ''; $scope.lastName = ''; $scope.userID = ''; if(!localStorage.getItem('token')){ $scope.isLoggedIn = false; } else{ $scope.firstName = JSON.parse...
import React from "react"; import { FooterContainer, FooterWrap, FooterLinksContainer, FooterLinksWrapper, FooterLinkItems, FooterLinkTitle, FooterLink, SocialMedia, SocialMediaWrap, SocialLogo, WebsiteRights, SocialIcons, SocialIconLink, AnchorLink, } from "./FooterStyles"; import { FaFac...
"use strict"; exports.__esModule = true; var BaseShips_1 = require("./BaseShips"); var MillenniumFalcon_1 = require("./MillenniumFalcon"); /* Instancia a classe através da palavra 'new' */ var ship = new BaseShips_1.Spacecraft('hyperdrive'); ship.jumpIntoHyperspace(); var falcon = new MillenniumFalcon_1.MillenniumFalco...
angular.module('app.services.locations', []).factory("Locations", function() { function getLocations() { return [ { id: 0, name: "Oakland City Center" }, { id: 1, name: "Jack London Square" }, { id: 2, name: "Oracle Coliseum and International Airport" }, { id: 3, ...
export const SET_INPUT_VALUE = 'HOME_SET_INPUT_VALUE' const defaultValue = { search: '' } const home = (state = defaultValue, action) => { switch (action.type) { case SET_INPUT_VALUE: return {...state, search: action.value} default: return state } } export {defaultValue} export default home
const mongoose = require('mongoose'); const offerSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, itemId: { type: mongoose.Schema.Types.ObjectId, ref: 'Item' }, itemOwner: { type: mongoose.Schema.Types.ObjectId, ref: 'User' }, submittedAt: { type: Date, default: () => Date.now(), required: true ...
import React from 'react'; import './HeroDetail.css'; class HeroDetail extends React.Component { render() { return ( <div className="HeroDetail" > <div className="row"> <div className="left"> Name: </div> <div className="right"> {this.props.name}...
'use strict'; export const colors = { white: '#FFFFFF', primary: '#3464d9', primaryHover: '#545FCE', primaryDisabled: '#B3B8F2', secondary: '#6E8097', success: '#24B47E', successHover: '#1BA26F', successDisabled: '#91D9BE', danger: '#D8315B', dangerHover: '#C72951', dangerDi...
// pages/homepage_release/homepage_release.js Page({ /** * 页面的初始数据 */ data: { token:'', tost_hide: false, tost: '提示信息', num:'', textarea:'', address: '', areas: '', rent: '', place: '', companyNames: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', ...
export const getters = { isAuthenticated: state => { return !!state.userInfo // !! - cast to boolean value } }
/* * An action is an event that can be bridged between protocols. A typical * example would be a Message, but this could be a topic change, a nick change, * etc. * * The purpose of this file is to provide a standard representation for actions, * and provide conversion facilities between them. */ "use strict"; v...
'use strict'; /* Controllers */ function AppCtrl($scope, $http) { $scope.user = null; } AppCtrl.$inject = ['$scope', '$http']; function NavBarController($scope) { } NavBarController.$inject = ['$scope']; function SearchCtrl($scope, $http) { $scope.query = ""; $scope.f_date = ""; $scope.f_country = ""...
'use strict'; const connectToDatabase = require('./db'); function HTTPError (statusCode, message) { const error = new Error(message); error.statusCode = statusCode; return error; } const headers = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': true, 'Content-Type': 'text/json' ...
import { HttpLink } from 'apollo-link-http'; import { apiUrl } from '../../config/environment' const httpLink = new HttpLink({ uri: apiUrl, credentials: 'same-origin' }) export default httpLink;
import Transaction from "../../src/blockchain/transaction" test('Transaction instanciate', () => { let t=new Transaction("0x",null,null,null,"0x",null); expect(t).toBeInstanceOf(Transaction) }); test('Transaction constructor test from', () => { let t=new Transaction("0x",null,null,null,"0x",null); expe...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; var optionSchema = new mongoose.Schema({ weekday: { type: String, // enum: ['MON', 'TUE', 'WED', 'THU', 'FRI'] }, date: { type: Date, required: true }, optionsList: { type: String }, ...
app.controller("AnimeController", ["LoginService","$stateParams", "AnimeService", function(LoginService, StateParams, AnimeService) { var id = StateParams.id; var that = this; this.anime = {}; this.getAnime = function() { AnimeService.getAnime({ id: id }, onGetAnime) } va...
import Menu from "./menu" import Breadcrumb from "./breadcrumb" export default { Menu, Breadcrumb }
import { MOTILITY_JUMPS_DIFF_HORIZONTAL_SAVE } from './constants'; export function saveTest(data) { return { type: MOTILITY_JUMPS_DIFF_HORIZONTAL_SAVE, data }; }
/** * Courtesy of https://github.com/cbaksik/HVD2 * Adds a "Finding Aid" button **/ app.controller('prmBriefResultContainerAfterCtrl',['$location','$scope',function ($location,$scope) { var vm = this; vm.cssClass = 'finding-aid-brief'; vm.findingAid = {'displayLabel':'','linkURL':'','newLinkURL':''}; ...
module.exports = { presets: ['@babel/preset-env', '@babel/preset-react', '@babel/typescript'], plugins: [ // Needed until `dynamic-import` becomes stage 4: // https://github.com/tc39/proposal-dynamic-import '@babel/plugin-syntax-dynamic-import', ], env: { test: { ...
import Axios from "axios"; import axios from "./axios"; import User from "../util/user"; export function login({ password }) { return axios.post("/user/login", { password }); } export function upload({ file }) { const token = User.getToken(); const uploadUrl = { development: "http://localhost:3099/files", ...
import React from 'react'; import './App.css'; import { Route } from 'react-router-dom'; import Home from './components/Home' import VenueDetails from './components/VenueDetails' import ogImage from './components/images/og.png' import Footer from './components/Footer' import { library } from '@fortawesome/fontawesome-s...
/* * @Description: 接送机 * @Author: 彭善智 * @LastEditors: 彭善智 * @Date: 2019-04-24 18:26:49 * @LastEditTime: 2019-05-22 11:47:22 */ const state = { airNo:"", //航班号 sendAirport:"", //起飞机场 sendDate:"", //起飞时间 reachAirport:"", //到达机场 reachDate:"", //到达时间 startDate:"", //接送机...
import React, { Component } from 'react'; import { Text, View, ScrollView, Image, Alert } from 'react-native'; let id; import { AntDesign, MaterialCommunityIcons } from '@expo/vector-icons'; export default class UserMerc extends Component { constructor(props) { super(props); this.state = { Merc: [] }; } // ...
import React from "react" import styled, {css} from 'styled-components' import { connect } from "react-redux" import { removeCharacter } from "../actions"; import Button from "./Button"; import {FlexRow} from "./layout" class Character extends React.Component { render() { return ( <FlexRow justif...
/* * File created on September 18, 2013 * * Copyright 2008-2013 Virginia Polytechnic Institute and State University * * 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...
const cliInterface = require('./cli-interface'); const gitTools = { cliInterface }; function executeGit(args) { return gitTools.cliInterface('git', args); } function parseHistoryItem(line) { const [hash, author, timestamp, msg] = line.split('\t'); return { hash, author, timestamp, msg }; }...
import { ADD_ITEM_TO_CART, REMOVE_ITEM_FROM_CART } from "./cartTypes"; export const addItemToCart = item => dispatch => { dispatch({ type: ADD_ITEM_TO_CART, payload: item, }); }; export const removeItemFromCart = item => dispatch => { dispatch({ type: REMOVE_ITEM_FROM_CART, payload: item, }); ...
(function() { 'use strict'; angular.module('about') .config(function($breadcrumbProvider) { $breadcrumbProvider.setOptions({ templateUrl: '/breadcrumb.view.html', prefixStateName: 'home' }); }) .config(['$locationProvider', '$state...
import React, { Component } from "react"; import { Row, Col } from "react-bootstrap"; // import Logo from "../../images/JA-Logo-sml.png"; import '../../app.css'; import "./special.css"; //Components import privateHelpers from '../../components/PrivateRoute/helpers/private.helper' // import Lobby from "../../components...
import React from 'react' const TopBar = () => <div className="light-bar flex-between">Made with love by -- Jeremy Odell</div> export default TopBar
/* this is my code at first, but I find here is another writing way abou the length function, I get a little confused so I record it and try to figure it out. get length() { var x = this.x, y = this.y; return Math.sqrt(x * x + y * y); } and my the method above, you don't have to ...
import React from 'react'; import SubmitButton from '../SubmitButton'; import ResetButton from '../ResetButton'; import styled from 'styled-components'; // import './Buttons.css'; const ButtonsContainer = styled.div` display: grid; grid-template-columns: 1fr 3fr; grid-gap: 2rem; `; const Buttons = ({ setSubmitC...
'use strict'; { class SmallBite extends js13k.LevelObject { /** * * @constructor * @param {js13k.Level} level */ constructor( level ) { super( level, { w: 64, h: 32 } ); // height varies // Mode. // 0: Normal, just an attack. // 1: Short vulnerability phase at end of attack. this.mode = 0; ...
import React from 'react'; import PropTypes from 'prop-types'; // COMPONENTS & STYLES import { ButtonWrapper } from './button.styles'; // HELPERS const Button = (props) => { const { children, iconBefore, iconAfter, ...rest } = props; const renderIconBefore = () => { if (!iconBefore) ...