text stringlengths 7 3.69M |
|---|
var UserAndPostConstants = require('../constants/user_and_post_constants');
var AppDispatcher = require('../dispatcher/dispatcher');
var PostActions = {
receiveAllPostsFromUser: function(userPosts) {
AppDispatcher.dispatch({
actionType: UserAndPostConstants.ADD_ALL_USER_POSTS,
userPosts: userPosts
... |
$(document).ready(function() {
$("button#say-a").click(function() {
$("ul").prepend("<li>Response A</li>");
$("li").click(function() {
$(this).remove();
});
});
$("button#say-b").click(function() {
$("ul").prepend("<li>Response B</li>");
$("li").click(function() {
$(this).remove()... |
/*
* Load the single-quoted JSON from Python's repr() function, prettify
* and save as conventional double-quoted JSON.
*/
var fs = require('fs');
var content = fs.readFileSync('../stub/micropython-rp2-1_13-290/modules.json', 'utf8');
var obj = (0, eval)('(' + content + ')');
fs.writeFileSync('../stub/micropython-rp2-... |
import React from 'react';
const payment = () => {
return <div className="form-container">
<div className = "form-header">
<h2>State Machine Payment Form</h2>
</div>
<div className="form-body">
<form>
<div className="form-group">
<l... |
import React, { Component } from 'react';
import { View, Text, StyleSheet, Image, TouchableOpacity, Alert } from 'react-native';
import NumericInput from 'react-native-numeric-input';
import { Button } from 'react-native-elements';
import {
COLOR_FIREBRICK,
} from '../../asset/MyColor';
import {
IP_SERVER,
LAY_TH... |
/*
A slide show designed for rodeoshow.com.au
Features bare bone slide show functionality coupled
with the ability to add animated elements for each slide
that are executed and reset each time the slide comes
into view
CSS properties are set as objects (for example):
$('#test').modularFeature().defineModule({
star... |
import React from 'react'
import RunesData from 'components/runes/RunesData'
import Rune from 'components-lib/rune/Rune'
import RuneStar from 'components-lib/runeStar/RuneStar'
import { Utils, FormSelect, BusyBars } from 'ap-react-bootstrap'
import SWPanel from 'components-lib/ui/SWPanel'
import PosType from 'utils/c... |
var AlfredError = require('./AlfredError');
var argv = require('minimist')(process.argv.slice(2));
var alfredo = require('alfredo');
if (!argv['_'].length) {
return new alfredo.Item({
title: 'No query passed'
}).feedback();
}
var configObj = require('./config').read();
if (configObj instanceof AlfredError) {... |
Component({
properties: {
type: {
type: String,
value: ""
},
// 学校计划
share: {
type: Boolean,
value: false
},
// 学校计划
collegePlan: {
type: Boolean,
value: true
},
// 数据源
... |
// Dependencies
var express = require('express');
var bodyParser = require('body-parser');
var path = require ('path');
// Config
var app = express();
var PORT = process.env.PORT || 8080;
// Middleware
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.text());
// Rout... |
var oauthTabs = {};
/**
* @param url
* @param redirectUri
* @param openerTabId - Not supported in edge and firefox for android
* @returns {Promise<any>}
*/
function startOAuth(url, redirectUri, openerTabId){
return new Promise((resolve, reject)=>{
chrome.tabs.create({url, openerTabId}, (tab)=>{
... |
(function () {
angular.module('filmstrip').controller('filmstripController', ['filmstripFactory', filmstripController]);
function filmstripController(imageFactory) {
this.images = imageFactory.getFilmstripImages();
this.updateSelected = function(url) {
console.log('url:', url)
}
}
})(); |
import React from "react";
import AdmSideBar from "../../components/sidebar_adm/admsidebar";
import LineGraph from "../../components/graficos/line/line_graph";
import BarGraph from "../../components/graficos/bar/bar_graph";
import LineBarArea from "../../components/graficos/area/line_bar_area";
import RadarArea from "... |
function columnsInfo(){
return [
{
title: '<i class="fi-flag"></i> Name',
data: null,
defaultContent: '',
class:'text-center',
responsivePriority: 1,
render: (data, type, row) => renderAsLink(vulnName(data), row)
},
{
title: '<i class="fi-inf... |
/**
* 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... |
import React from 'react';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import FilmQuiz from './components/FilmQuiz/FilmQuizComponent';
import StartPage from './components/StartPage/StartPageComponent';
function App() {
... |
async ({reflowCtx}) => {
const {NumberInput, getInputValues} = reflowCtx.utils
const nodeSpec = {
key: 'grid',
label: 'grid',
portSpecs: {
'inputs': {
kick: {},
x0: {
initialValues: [0],
ctx: { getGuiComponent: () => NumberInput }
},
x1: {
... |
import React from 'react';
const Basket = props => {
return (
<div id="basket" onClick={props.basketClick}>
<img src="http://zelechow.com.pl/wp-content/uploads/2016/06/shop.png" alt="basket"></img>
</div>);
}
export default Basket;
|
/**
* Implementation for Risk Management service defined in ./risk-service.cds
*/
module.exports = async (srv) => {
srv.after('READ', 'Risks', (risks) => {
risks.forEach((risk) => {
if (risk.impact >= 100000) {
risk.criticality = 1;
} else {
risk.cr... |
import React from 'react';
import { Image, StyleSheet } from 'react-native';
const Logo = () => (
<Image source={require('../../assets/logo.jpg')} style={styles.image} />
);
const styles = StyleSheet.create({
image: {
width: 330,
height: 155,
marginBottom: 30,
marginLeft: 45
},
});
export defau... |
import {useEffect, useState} from "react";
import {useRecoilState} from "recoil";
import DailogContent from "~/components/atoms/dialog/DialogContent";
import {StyledDynamicTextBuilder} from "./DynamicTextBuilder.style";
import {addSegmentState, configuratorState, segmentState, tagsState, deleteSegmentState} from "./ato... |
/* begin copyright text
*
* Copyright © 2017 PTC Inc., Its Subsidiary Companies, and /or its Partners. All Rights Reserved.
*
* end copyright text
*/
/* jshint node: true */
/* jshint strict: global */
/* jshint camelcase: false */
'use strict';
var debug = require('debug')("vxs:limitshelper");
var Q = require(... |
import React from "react";
import PropTypes from "prop-types";
class EditTweetModal extends React.Component {
constructor(props) {
super(props);
const { tweet } = this.props;
this.state = {
tweetText: tweet.content,
selectedImage: "",
image: ""
};
this.onTweetImageChange = e =>... |
const { gql } = require('apollo-server-express')
const { makeExecutableSchema } = require('@graphql-tools/schema')
const { constraintDirective, constraintDirectiveTypeDefs } = require('graphql-constraint-directive')
const deepmerge = require('deepmerge')
const directives = require('../../directives')
const globalTypeDe... |
import React, { Component } from "react";
import _ from "lodash";
import Input from "../commons/Input";
import DateSelector from "../commons/DateSelector";
import PropTypes from "prop-types";
import PriorityCircle from "../commons/PriorityCircle";
import { nextPriorityOf } from "../commons/priority";
import InputGroup ... |
import Router from "next/router";
export const redirect = (url) => {
Router.push(url);
};
|
import React from "react";
import {
Box,
Chip,
makeStyles,
} from "@material-ui/core";
const useStyles = makeStyles((theme) => ({
selectedNumber: {
color: '#fff',
backgroundColor: 'red',
width: 40,
height: 40,
margin: 8,
fontSize: 14,
fontWeight: ... |
import React from 'react'
import {Link} from 'react-router-dom';
function Assessments() {
return (
<React.Fragment>
<h2><Link style={LinkStyle} to="/assessment/create">Book an assessment</Link>{' '}</h2>
{/* <h2><Link style={LinkStyle} to="/assessment/delete">Delete my Account</Link>{' '}</... |
/*
* jquery.zoomooz-core.js, part of:
* http://janne.aukia.com/zoomooz
*
* Version history:
* 1.04 fixed examples, iphone tuneups, transform offset fix
* 1.03 added closeclick, code structuring
* 1.02 bug fix on endcallback resetting for native animation
* 1.01 declarative syntax and fixes
* 0.92 working scrol... |
function UrlLoader(){
}
UrlLoader.prototype = {
isValidUrl: function(url){
if(!url) {
alert('Invalid input entered.');
return false;
}
else{ return true; }
},
loadUrl: function(url){
url = prompt('please enter a url');
if(this.isValidUrl(url)){
//trim url and open in new f... |
import React, { Component, PropTypes } from 'react'
import { Map, OrderedMap } from 'immutable'
import logger from '../debug'
import EventList from './EventList.jsx'
import SessionRecord from '../model/SessionRecord'
import EventRecord from '../model/EventRecord'
import { Row, Col, Button, ButtonGroup } from '../compo... |
//檢查屬性與擷取屬性值
let firstItem = document.getElementById('one');//取得第一個清單項目
if(firstItem.hasAttribute('class')){//若存在名稱為class的屬性
let attr = firstItem.getAttribute('class');
//取得屬性
let el = document.getElementById('scriptResults');
el.innerHTML = '<p>The first item has a class name: ' + attr +'</p>';
... |
import styled from 'styled-components';
export const ResponsiveWrapper = styled('div')`
@media (max-width: 768px) {
h4 {
font-size: 10px;
}
}
`; |
function addandremove(arr){
let res = [];
for(let i = 0; i < arr.length; i++){
switch(arr[i]){
case 'add':
res.push(i+1);
break;
case 'remove':
res.pop();
}
}
if(res.length!=0)
res.forEach(el... |
arr = [10, 200, 30, 500];
function printMaxArray(arr) {
let max = -Infinity;
for(let i = 0; i < arr.length; i++) {
if(arr[i] > max) {
max = arr[i]
}
}
console.log(max)
}
printMaxArray(arr); |
import React from "react";
import { BrowserRouter, Switch, Route, Redirect } from "react-router-dom";
import Home from "./components/Home";
import Judet from "./components/Judet/Judet";
import MobileInstallInfo from "./components/MobileInstallInfo";
import PlanMondial from "./components/PlanMondial";
const Router = (p... |
const { User } = require('../../models');
const { createToken } = require('../../utilities/tokenService');
const cookieOptions = {
httpOnly: true,
// secure: true, on deployment
signed: true,
maxAge: (1000 * 60) ^ 60,
expiresIn: new Date(Date.now() + 90000)
};
const signup = async function(req, res) {
try... |
define(function (require) {
'use strict';
var
Controller = require('controller'),
Grid = require('grid'),
Rdr = require('rdr'),
Terrain = require('terrain'),
Viewport = require('view/viewport'),
CreateBuildingView = require('view/create/building');
var Settings = {
rdr: {},
viewport: {},
};
... |
import { GROUP_ID } from "settings/apiConfig";
import callApi from "utils/callApi";
const userApi = {
loginApi(user) {
return callApi('QuanLyNguoiDung/DangNhap', 'POST', user);
},
signupApi(user) {
return callApi('QuanLyNguoiDung/DangKy', 'POST', user);
},
fetchUserInfoApi(user) {... |
(function(ko, $) {
ko.testBase = function(model, element, test) {
element.appendTo("body");
ko.applyBindings(model, element[0]);
var args = {
clean: function() {
element.remove();
}
};
if (test) {
test(element, arg... |
import { tokens } from '@sparkpost/design-tokens';
const lineHeight = '25px';
const fontSize = tokens.fontSize_200;
export const pre = props => `
position: relative;
display: grid;
grid-template-columns: ${tokens.spacing_700} auto;
font-family: ${tokens.fontFamily_monospace};
border-radius: ${tokens.borderR... |
// Import react
import React from 'react'
import PropTypes from 'prop-types'
// Redux connector
import { connect } from 'react-redux'
import * as contacts from '../redux/actions-contacts'
import * as meetings from '../redux/actions-meetings'
// Dumb components
import { List, Person } from './contact-list-dumb'
clas... |
import React from 'react';
import './SidebarComponent.css';
import {BrowserRouter as Link} from 'react-router-dom';
function SidebarComponent({active ,Icon, name}) {
return (
<div className="SidebarComponent">
<Icon/>
<h2>{name}</h2>
</div>
)
}
export default SidebarCom... |
const express = require('express');
const app = express();
const PORT = process.env.PORT || 8000;
const {spawn} = require('child_process');
//Use Folder
app.use(express.static('./dominic'));
app.use(express.static('./main'));
app.get('/diabetes',(req,res)=>{
res.sendFile(__dirname+"/main/index.html");
});
app.get(... |
module.exports = (phrases) => {
let word = phrases[0].split(' ')[0];
return word;
} |
import { ThemeProvider, createGlobalStyle } from "styled-components";
import { Helmet } from "react-helmet";
import styledNormalize from "styled-normalize";
import App from "next/app";
import Layout from "../src/components/Navigation/Layout";
import theme from "../src/utils/theme";
const GlobalStyle = createGlobalSty... |
//= require jquery
//= require best_in_place
//= require jquery_ujs
//= require jquery.simplemodal
//= require jquery.ui
//= require best_in_place.jquery-ui
|
self.assetsManifest = {
"assets": [
{
"hash": "sha256-8aM9R9K90X6h+KPDW4OzrEh071mAs7dvAQxjBxAZQAc=",
"url": "css\/app.css"
},
{
"hash": "sha256-rldnE7wZYJj3Q43t5v8fg1ojKRwyt0Wtfm+224CacZs=",
"url": "css\/bootstrap\/bootstrap.min.css"
},
{
"hash": "sha256-xMZ0SaSBYZSH... |
/**
* Created by aresn on 16/6/20.
*/
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './app';
import iComponents from '../src/index';
Vue.use(VueRouter);
Vue.use(iComponents);
// 开启debug模式
Vue.config.debug = true;
// 路由配置
const router = new VueRouter({
routes:[
{
path:'/... |
document.addEventListener("DOMContentLoaded", getJson);
let page;
//henter json fil fra WP url
async function getJson() {
let jsonObject = await fetch("https://jakobfalkenberg.dk/kea/2sem/tema7/huset/wordpress/wp-json/wp/v2/bastard_cafe");
page = await jsonObject.json();
pos... |
const passport = require('passport');
const GoogleStrategy = require('passport-google-oauth20').Strategy;
const FacebookStrategy = require('passport-facebook').Strategy;
const { GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET } = require('../../var_config');
const User = require('../.... |
import util from 'util';
import ava from 'ava';
import parser from '../../index';
export const parse = (input, transform) => {
return parser(transform).processSync(input);
};
export function test (spec, input, callback, only = false) {
let tester = only ? ava.only : ava;
if (only) {
let e = new Er... |
import {getQuotedOrders} from './ajax.js';
var infoDiv = document.getElementById('info-div');
var data = null;
if(_localStorage.merchId == null){
window.location.href = "index.php";
}else{
getQuotedOrders(_localStorage.merchId)
.then((res)=>{
if(res.Message){
throw 'Wrong Id';
}else{
data = res;
}
})
... |
/*
graphics.js
Authors:
Joseph Carlos (jcarlos)
Kunal Desai (kunald)
James Grugett (jgrugett)
*/
var globalGraphics = new Graphics();
function Graphics() {
this.addImage = function(source) {
this.images[source] = new Image();
this.images[source].src = source;
}
//... |
import React from "react"
import Layout from "../components/layout"
import SEO from "../components/seo"
const NotFoundPage = () => (
<Layout>
<SEO title="Страница не найдена" />
<h1>Страница не найдена</h1>
</Layout>
)
export default NotFoundPage
|
function Dev(piece, boardSize) {
this.piece = piece;
this.boardSize = boardSize;
}
// TODO: implementar a jogada
Dev.prototype.move = function(board) {
for (let i = 0 ; i < this.boardSize ; i++) {
let tr = board.rows[i];
for (let j = 0 ; j < this.boardSize ; j++) {
let td = tr.cells[j];
if (!td.innerHTML)... |
// Array.prototype.indexOf polyfill:
if ( typeof(Array.prototype.indexOf) === 'undefined' ) {
Array.prototype.indexOf = function(item, start) {
var length = this.length
start = typeof(start) !== 'undefined' ? start : 0
for (var i = start; i < length; i++) {
if (this[i] === item) ... |
var locations = [
{
name: "ISS",
radius: 15,
fillKey: "ISS",
date: "",
latitude: 0,
longitude: 0,
},
];
var pathnodes = [];
function getissloc() {
map.bubbles([]);
fetch("http://api.open-notify.org/iss-now.json")
.then((response) => response.json())
.then((data1) => {
// ... |
/**
* Copyright (C) 2009 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This softwar... |
import React from 'react';
import LoginForm from './LoginForm';
import { connect } from 'react-redux';
import { loginUser } from '../actions/loginActions';
const Home = ({ history, loginUser, auth }) => {
return (
<div>
<br />
<br />
<br />
<LoginForm history={history} loginUser={loginUse... |
slide[MODULEID].buildThumbList = function()
{
for (var i=0;i<this.umg_images.length ;i++ )
{
var item = "";
if (this.umg_mouseoverbehavior == "moveto")
{
item = "<a href='javascript:void(0);' onmouseover='slide[MODULEID].navigateTo("+i+")' class='umg_page' id='page[MODULEID]_"+i+"'><img border='0' s... |
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/crud')
.then(console.log('Database Connected')
) |
"use strict";
(function () {
let person = {
firstName: "Matheus",
lastName: "Romano",
age: 18,
isAdult: function () {
return person.age >= 18;
},
};
let healthStats = {
height: 78,
weught: 200,
};
function mergeStats(p, hp) {
return Object.assign({}, p, hp);
}
let ... |
require('dotenv').config();
module.exports = {
apps: [
{
name: 'heroku-line-bot-local',
script: 'src/index.js',
// From .env
// Can't use process.env directly, or it will mess up with pm2 internals
env: Object.assign({}, process.env),
autorestart: true,
watch: true,
... |
module.exports = {
url : "mongodb://Evgen097:630ev630@ds137760.mlab.com:37760/myimagesearch"
}; |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import cx from 'classnames';
import { ReactComponent as Logo } from './logo.svg';
import styles from './Header.module.css';
import SocialLinks from '../../../components/SocialLinks';
import './logo.css';
export default class Header exte... |
'use strict';
// Create a Circle constructor that creates a circle object:
// it should take the circle's radius as a parameter
// it should have a "getCircumference" method that returns it's circumference
// it should have a "getArea" method that returns it's area
// it should have a "toString" method that returns it... |
var bookshelf = require('../custom_modules/bookshelf').plugin('registry');
var course = require('./course');
var examination = require('./examination');
var schedule = require('./schedule');
var disciplinemedia = require('./disciplinemedia');
var media = require('./media');
module.exports = bookshelf.model('discipline'... |
function createSeaLevel(YEARS, YEARMARKINGS, WIDTH, HEIGHT) {
const SEACANVAS = document.getElementById('sea-canvas');
SEACANVAS.style.height = HEIGHT + "px";
SEACANVAS.style.width = WIDTH + "px";
const SVGL = "http://www.w3.org/2000/svg";
// finds the minimum and maximum sea level number in the list of data
fu... |
import React from 'react';
export const MotionCircle = ({
className = '',
selectStyle,
...props
}) => style => {
const motionsProps = selectStyle(style);
return (
<circle {...props} {...motionsProps} className={className} />
);
};
export default MotionCircle;
|
import BodyPart from './body_part';
class Feet extends BodyPart {
constructor(owner, name) {
super(owner, name, 'feet', 2);
}
}
export default Feet;
|
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Container, IconButton } from '@material-ui/core';
import SearchIcon from '@material-ui/icons/Search';
import OutlinedInput from '@material-ui/core/OutlinedInput';
import InputLabel from '@material-ui/core/InputLabel';
import In... |
import React, { Component } from 'react';
import "./style.css"
class Input extends Component {
constructor(props) {
super(props);
this.state = {}
}
render() {
const { typeInput, nameInput, valueInput, onChangeInput, onClickInput } = this.props
return (
<inpu... |
config({
'editor/plugin/separator': {requires: ['editor']}
});
|
// notes from tutor session with Michael
// var gifApi =
// "https://api.giphy.com/v1/gifs/search?api_key=LIpfrXPaXMHI0SPAQt9zVa9vl9FO69QT&q=shiba inu&limit=10&offset=0&rating=G&lang=en";
// $.ajax({
// url: gifApi,
// method: "get"
// }).then(function(response) {
// var gifUrl = response.data[0].images["480w... |
import styled from 'styled-components';
const StyledCheckbox = styled.label`
width: 20px;
height: 20px;
border: 1px solid #393A4B;
display: flex;
border-radius: 50%;
align-items: center;
justify-content: center;
cursor: pointer;
`;
const StyledCheckboxInput = styled.input`
&:checked ... |
var mod;
mod = angular.module('infinite-scroll', []);
mod.directive('infiniteScroll', [
'$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) {
return {
link: function(scope, elem, attrs) {
var checkWhenEnabled, container, handler, scrollDistance, scrollE... |
import React, {Fragment, useState} from 'react';
import '@styles/block-carousel.css';
import itemsMap from '@/maps/itemPage/itemsMap';
let shuffle = function (arr) {
for (let i = arr.length - 1; i > 0; i--) {
let j = Math.floor(Math.random() * (i + 1));
[arr[i], arr[j]] = [arr[j], arr[i]];
};
}... |
/**
* 1.理解图 7-1
* 2.参考 p181 利用闭包和循环生成一个数组,数组的每一项都是一个函数,该函数执行结果返回数组下标对应的字符串
* arr[0]() 返回 '0',arr[1]() 返回 '1'
* 3.结合前面章节 4.3 垃圾回收理解内存泄漏
* 4.结合闭包创建一个构造函数 Glj,拥有一个 私有变量 secret,拥有一个函数 seeSecret,函数返回 secret 的值
* 实例化一个 Glj,尝试调用 secret 属性,再调用 seeSecret,理解其中作用
* 5.理解单例模式,并结合闭包创建一个函数 getGlj,有一个私有变量 glj,当 glj... |
const http = require('http');
const countStudents = require('./3-read_file_async');
const hostname = 'localhost';
const port = 1245;
const file = process.argv[2];
const app = http.createServer(async (req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
if (req.url === '/') {
re... |
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import user from '@components/user.vue';
import warship from '@components/warship.vue';
import activity from '@components/activity.vue';
export default new VueRouter({
linkActiveClass:'list-active',
routes:[
{
path:'/',
redirect:'/user',... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.p... |
describe('content resolver', () => {
it('has this pointless test', () => {
expect(true).toBe(true)
})
})
|
var array = [];
while (true) {
var input = prompt("Введите число", 0);
if (input === "" || input === null || isNaN(input)) break;
array.push(+input);
}
var sum = 0;
for (var i = 0; i < array.length; i++) {
sum += array[i];
}
alert(sum); |
import React,{useContext,useEffect} from 'react'
import AuthContext from '../auth/AuthContext';
// const About = (props) => {
// const authcontext=useContext(AuthContext);
// const {isAuthentocated,loadUser}=authcontext;
// useEffect(() => {
// if(isAuthentocated){
// loadUser();
// ... |
import axios from 'axios'
import { API } from 'Constants/CommonConstants'
export const postRegister = async (data) => {
const response = await axios.post(API.USER, data)
return response
}
export const updateUser = async (data, id) => {
const response = await axios.patch(`${API.USER}/${id}`, data)
return respo... |
import React from 'react';
import PropTypes from 'prop-types';
const ErrorDialog = ({ error }) => {
if (!error) return null;
let { message, handlers } = error;
let buttons = Object.keys(handlers).map((label) => <button key={label} onClick={ handlers[label] }>{ label }</button>);
return (<div className... |
import React, {Fragment} from 'react';
import {Layout} from "../Layout";
import {OutingList} from "../Outing";
import {isLogged} from "../../functions/logged";
import {Carousel} from "../Carousel";
import {TextContainer} from "../Layout/TextContainer";
import {Button} from 'reactstrap';
import {redirectTo} from "../../... |
import React, { Component } from 'react';
import lessThan from '../images/less-than.png';
import greatrThan from '../images/greater-than.png';
const testimonialArray = [
{
id: 0,
author: "Barry Z",
text: <div className="Testimonial-slide-in">
<em>
"Incred... |
module.exports = `//#version 300 es
attribute vec4 aVertexPosition;
attribute float aVertexIndex;
uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform bool magicZoom;
uniform float nodeSize;
uniform float zoom;
varying vec4 vVertexColor;
const float MAX_NODE_SIZE = 38.0;
// unsigned rIntValue = (... |
import { html, LitElement } from 'lit-element';
import '@polymer/iron-icons/iron-icons.js';
import '@polymer/iron-icons/social-icons.js';
import sharedStyles from '../../style/app.scss';
import landingStyles from '../../style/landing-page.scss';
import homeSearchStyles from '../../style/homepage-searchV2.scss';
class ... |
import axios from 'axios';
import types from './types';
import { addFlashMessage } from './flashMessage'
const { SET_PAGE, PAGE_FETCHED, SET_PAGER } = types;
const limit = (count, p) => `limit=${count}&offset=${p?p*count: 0}`;
const encode = encodeURIComponent;
export const setPage = ({ page, items }) => ({
type:... |
import React from "react";
import { getTopTracks } from "../../helper";
import styled from "styled-components";
import TrackCard from "../../components/TrackCard";
const Text = styled.h1`
color: white;
`;
const Subtitle = styled.div`
font-weight: 700;
color: white;
`;
const TrackList = ({ tracks }) => {
retu... |
import initDebug from 'debug';
import newShopbacker from './new';
import { ACTIONS_ID } from '../config';
const debug = initDebug('happy:slack:skills:shopbacker:submission');
export default (controller) => {
debug('Skill learned!');
controller.on('dialog_submission', (bot, message) => {
switch (message.callb... |
import React, { Component } from 'react'
import { Card, Button, Form, Col, InputGroup } from 'react-bootstrap';
import {UtilityFunctions as UF} from '../../Common/Util';
import SSM from '../../Common/SimpleStateManager';
import Wrap from '../../Common/Wrap';
import '../../Components/SellerPage/SellerPage.css';
import S... |
var assert = require('chai').assert;
var helpers = require('../src/helpers.js');
describe('inArray', () => {
it('should throw an error if no arguments passed to inArray()', () => {
assert.throw(
() => {helpers.inArray()},
Error,
"Second parameter to inArray() must be an array"
);
});
it('should thro... |
'use strict';
const _ = require('lodash');
const fs = require('fs-extra');
const SourceGenerator = require('./SourceGenerator');
class RawFileSourceGenerator extends SourceGenerator{
constructor(config,logger){
super(config,logger);
this.setSourcePath(_.get(config,'sourcePath',null));
//If this class is not bei... |
import { Link } from 'react-router-dom';
import { useAuth } from '../../context/useAuth';
import { FiInstagram, FiHome, FiLogOut } from 'react-icons/fi';
import * as S from './styles';
const Header = () => {
const { user, logout } = useAuth();
return (
<S.Header>
<S.Wrapper>
<Link to="/feed">
... |
(function(){
'use strict';
angular
.module('everycent.common')
.directive('ecAmountLabel', ecAmountLabel);
ecAmountLabel.$inject = [];
function ecAmountLabel(){
var directive = {
restrict:'E',
templateUrl: 'app/common/ec-amount-label-directive.html',
scope: {
type: '@',
... |
import React from "react";
import Header from "../../components/Header";
import Footer from "../../components/Footer";
import LoginForm from "./LoginForm";
import style from "./LoginPage.css"
const LoginPage = () =>{
return (
<div>
<Header title={"芜湖"} subTitle={"我的微服务前后端实现"}/>
<div className={styl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.