text
stringlengths
7
3.69M
import React, { useEffect } from 'react'; import { connect } from 'dva'; import styles from './Add_api_jurisdiction.scss' import { Form, Input, Button, Radio } from 'antd'; function Add_api_jurisdiction(props) { const { addApi_jurisdiction } = props useEffect(() => { }, []) const { getFieldDecorator } ...
/** * Created by adronhall on 6/20/14. * Description: apikey management. */ var Chance = require('chance'); var chance = new Chance(); var apikeys = function apikeys(ring) { this.ConnectionRing = ring; }; apikeys.ConnectionRing = {}; apikeys.prototype.getUser = function (apikey) { } apikeys.prototype.get =...
var orm = require('../config/orm') var challenge_log = { //Expecting newChallengeLog object that includes user_id and group_challenge_id createRunningDistLog: function (newChallengeLog, callback) { let query = { table: 'running_distance_logs', data: newChallengeLog, ...
function MathCalculator(a, b) { this.a = a; this.b = b; this.add = function () { return this.a + this.b; } this.divide = function () { if (!this.b) return 'b can\'t be zero or null or undefined'; return this.a / this.b; } } MathCalculator.prototype.sub = func...
import React, {useState, useEffect} from "react" import './contact.css' import emailjs from 'emailjs-com' import Lottie from 'react-lottie-segments'; import Json from '../assets/21735-join-chat.json' function Contact(props) { const [name, setName] = useState("") const [email, setEmail] = useState("") const [su...
const Sound = require('react-native-sound'); Sound.setCategory('Ambient', true); // const loadNote = (numCorde, numCase) => { // Sound.setCategory('Ambient', true); // const sound = new Sound(`corde${numCorde}case${numCase}.mp3`, Sound.MAIN_BUNDLE, (error) => { // console.log(`path of sound file to load: cord...
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ ret...
import React from "react"; // core components import Paper from "@material-ui/core/Paper"; import Typography from "@material-ui/core/Typography"; import image from "../../../assets/img/avatar-default.jpg"; class UserCard extends React.Component { constructor(props) { super(props); this.state = { }; } ...
import { Component } from 'react'; import styled from 'styled-components/macro'; export default class BrandButton extends Component { render() { return ( <Container> <Title>{this.props.children}</Title> </Container> ); } } const Container = styled.button` display: flex; align-items...
module.exports = { JoiSignIn: require("./JoiSignIn.js"), JoiUpdateUser: require("./JoiUpdateUser"), JoiSignUp: require("./JoiSignUp.js"), JoiValidateTransactionListQuery: require("./JoiValidateTransactionListQuery"), JoiAddUserTransaction: require("./JoiAddUserTransaction"), };
import React, { Component } from "react"; import { StyleSheet, View, Text, Image, TouchableOpacity } from "react-native"; class ShareMain extends Component { constructor({ props }) { super(props); } render() { return ( <View style={styles.container}> <View style...
'use strict'; var express = require( 'express' ); var path = require( 'path' ); var bodyParser = require( 'body-parser' ); var cookieParser = require( 'cookie-parser' ); var fs = require( 'fs' ); var favicon = require( 'serve-favicon' ); var config = require( '../app/models/config-model' ).server; var logger = require...
//Include this is a seprate JS file //Provide client side input validation for login page(s) $("#loginSubmitButton").click(function() { var userID = $("#userIDinput").val(); var password = $("#userPasswordInput").val(); //TODO replace with function bools, no extra vars var validUser = validateUserID(userID)...
import layoutFragment from "../_fragments/layout/layout.fragment.js"; import videosListItemFragment from "../_fragments/videosListItem/videosListItem.fragment.js"; export default data => layoutFragment( data, { title: 'VIDÉOS | ' + data.title, content: `<div class="container"> <h1 class="main"> ...
import React from "react" import Zoom from "react-medium-image-zoom" import styles from "./ZoomedImage.module.scss" import Image from "gatsby-image" const ZoomedImage = ({ image, text }) => { return ( <div className={styles.card_container}> <Zoom> <span className={styles.image_c...
/** * Created by a88u on 2016/10/17. */ var investTypeSelections=[ {text:"全部",value:"all",isSelected:true,isAll:true}, {text:"A轮",value:"A轮",isSelected:true,isAll:false}, {text:"B轮",value:"B轮",isSelected:true,isAll:false}, {text:"C轮",value:"C轮",isSelected:true,isAll:false}, {text:"D轮",value:"D轮",i...
import { get } from 'lodash'; export default { getPlugins: state => get(state, 'plugins', {}), getRoleButtons: state => get(state, 'plugins.buttons', []), };
/* File: chart.js Purpose: Contains methods that take create the visualizations in our app. This is done through use of the c3 and d3 libraries, in conjunction with data that the last.fm API has fed into our database. */ function generateGauge(id){ var chart = c3.generate({ bindto: id, data: { colu...
import React, { useMemo, useRef, useCallback, useEffect } from 'react' import { geoMercator, geoPath } from 'd3'; import { feature } from 'topojson-client'; import { useThree, useFrame, Dom } from 'react-three-fiber'; import { a, useSpring, interpolate } from 'react-spring/three'; import { pick } from 'canvas-sketch-ut...
export default { template: ` <div> 首页 </div> ` }
Grailbird.data.tweets_2014_12 = [ { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/549878788813631489\/photo\/1", "in...
import React, { Component } from 'react'; import { PropTypes } from 'prop-types'; import Icon from 'react-native-vector-icons/dist/FontAwesome'; import { View, TouchableHighlight, StyleSheet, } from 'react-native'; export default class HeartButton extends Component { constructor(props) { super(props); this.sta...
db.movies.updateOne({title:"Home Alone"},{$inc:{budget:5}});
import React, {Component} from 'react'; import './App.css'; import {Col, Container, Row} from "reactstrap"; import Header from '../component/Header'; import ToolsPanel from '../component/ToolsPanel'; import SortingFilteringTableWithPagination from "../component/table/Table"; const columns = [ 'id', 'firstName',...
//Get images from new settings var getImages = function(imageSetting){ var images = []; for(var i=0;i<imageSetting.length;i++){ var imgArr = imageSetting[i].images; images.push(imgArr[imgArr.length-1].url);//get smallest image //images.push(imgArr[0].url);//get original image ...
import { DASHBOARD_CARD_REQUEST, DASHBOARD_CARD_SUCCESS, DASHBOARD_CARD_FAILURE, } from './dashboard-constants'; const dashboardCardRequest = () => ({ type: DASHBOARD_CARD_REQUEST, }); export const dashboardCardSuccess = (data) => ({ data, type: DASHBOARD_CARD_SUCCESS, }); export const dashboardCardFailu...
function squareRootConvergents(expansionsBelowN) { let count = 0; for(const frac of sqrtIterations()) { if(moreDigits(frac.num, frac.denom)) { count ++; } } return count; function* sqrtIterations() { let iterations = 0, frac = {num: 1, denom: 1}; while(it...
// import React from 'react'; // import { // Link, // IndexLink // } from 'react-router'; // export default class navlink extends React.Component { // constructor(props) { // super(props); // } // render() { // return <IndexLink {...this.props} activeClassName="active"/> // } // }
'use strict'; const fs = require('fs'); const path = require('path'); module.exports = { findOrCreate(filePath) { return fs.stat(filePath, (err, stat) => { if (!err) { return false; } else if(err.code == 'ENOENT') { // file does not exist fs.readFil...
import adminProductList from '@/web-client/reducers/admin/adminProductList'; import { LOAD_ADMIN_PRODUCT_LIST, CREATE_PRODUCT, UPDATE_PRODUCT, DELETE_PRODUCT, } from '@/web-client/actions/constants'; import { dropRight, map, omit } from 'lodash/fp'; jest.setTimeout(30000); describe('adminProdu...
function Shape(c, s, n) { //check if args given, if not set args to =1 if(typeof(c)==='undefined') c = Math.floor((Math.random() * 4)); if(typeof(s)==='undefined') s = Math.floor((Math.random() * 4)); if(typeof(n)==='undefined') n = Math.floor((Math.random() * 4)); //set initial values var color = c; var shape ...
import { useState } from "react"; import currency from "currency.js"; import { useNotification } from "./useNotification"; import { toMoney } from "../helpers/masks"; import values from "../values.json"; export function useWallet() { const data = JSON.parse(JSON.stringify(values)); const [wallet, setWallet] = use...
// shared variables for js and css import SHARED from '../shared-variables'
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.delBlog = exports.updateBlog = exports.newBlog = exports.getDetail = exports.getList = void 0; c...
const db = require("../models"); const Centro = db.centros; const Op = db.Sequelize.Op; // Create and Save a new Centro // req --> request (contains the body) exports.create = (req, res) => { // Validate request /*if (!req.body.ID_whis || !req.body.Nombre) { res.status(400).send({ message: ...
"use strict"; var Q = function(_ref) { var Q = function Q() { _ref.apply(this, arguments); }; Q.prototype = Object.create(_ref.prototype, { constructor: { value: Q, enumerable: false, writable: true, configurable: true } }); Q.__proto__ = _ref; return Q; }(function() {...
/* eslint-disable */ const eslint = require('./.eslintrc.js'); const jest = require('./jest.config.js'); const prettier = require('./.prettierrc.js'); module.exports = { eslint, jest, prettier, };
const fs = require("fs"); const util = require("util"); const mkdir = util.promisify(fs.mkdir); module.exports = mkdir;
import { SET_CUP_ON, SET_CUP_OFF } from '../actions'; const initialState = true export default function cupDisplayReducer(state = initialState, action) { switch (action.type) { case SET_CUP_ON: return action.cupDisplay case SET_CUP_OFF: return action.cupDisplay defau...
import React,{useState,useContext} from 'react' import Modal from 'react-bootstrap/Modal' import OverlayTrigger from 'react-bootstrap/OverlayTrigger' import Form from 'react-bootstrap/Form' const EditPostModal = () => { return ( <div> </div> ) } export default EditPostModal
export const defData = [ { id: 1, name: 'Monday', events: [ { title: 'Study', edit: false }, { title: 'Work', edit: false }, { title: 'Gym', edit: false } ], active: true }, { id: 2, name: 'Tuesday', events: ...
var turf = require('@turf/turf'), flatten = require('geojson-flatten'), normalize = require('@mapbox/geojson-normalize'), tilebelt = require('@mapbox/tilebelt'), fs = require('fs'), hashF = require('object-hash'), fx = require('mkdir-recursive'); module.exports = function(data, tile, writeData, done) { /...
/* * Classe représentant les enquêteurs présent autour du plateau * @author : Batow */ var Shared = require("./Shared"); // // Constructeur // x y : position de l'enqueteur sur le plateau // orientation : direction dans laquelle l'enquêteur regarde // function Enqueteur(x,y,orientation){ //identifiant de l'enqueteu...
/* * The reducer takes care of state changes in our app through actions */ import {FETCH_ALL_TASKS, FETCH_ALL_TASKS_FULFILLED, FETCH_ALL_TASKS_REJECTED,} from '../Actions/ActionTypes' // The initial task state let initialState = { fetchedTasks: [], fetching: false, fetched: false, error: null } // Takes car...
import FriendCard from './FriendCard' const FriendsList = ({friends}) => { return ( <div className="row"> {friends.map((friend, i) => { return ( <FriendCard friend={friend} key={i} /> ) })} </div> ) } export default F...
/* VARIABLES */ const Discord = require("discord.js"); const gd = require('node-gd'); const http = require('http'); const fs = require('fs'); const chatbot = require('chatbot'); var prefix = ":"; var footer = "Created by Fabuss254#9232"; var bot = new Discord.Client(); /* EVENEMENT */ bot.on('ready', () => { con...
OC.L10N.register( "files", { "Files" : "Fayllar" }, "nplurals=1; plural=0;");
const merge = require('webpack-merge') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const common = require('./webpack.common') module.exports = merge(common, { plugins: [new BundleAnalyzerPlugin()], })
import { applyMiddleware, combineReducers, compose, createStore } from "redux"; import thunk from "redux-thunk"; import { filtersReducer } from "./reducers/filterReducers"; import { productListReducer } from "./reducers/productReducers"; const initialState = { filters: { page: 1, filterCategory: [], filt...
OC.L10N.register( "settings", { "Wrong current password" : "A jelenlegi jelszót helytelenül adtad meg", "The new password cannot be the same as the previous one" : "Az új jelszó nem lehet ugyanaz, mint az előző", "No user supplied" : "Nincs megadva felhasználó", "Authentication error" : "Azonosí...
import { getUserData, getIdentityData, getApiAuthority, getIdentityApiAuthorityRelation, getViewAuthority, getIdentityViewAuthorityRelation } from '@/services'; export default { //命名空间 namespace: 'userDisplay', //模块状态 state: { //用户数据 UserData: [], }, //异步操作 effect...
var arr=[1,2,3,4,5,6,7]; // console.log(arr.length) function async(aa,callback){ console.log(aa) callback() } // for (i=0; i < 7; ++i) { // arr[i] = async(arr[i]); // } (function next(i, len, callback) { if (i < len) { async(arr[i], function (value) { arr[i] = value; ...
//input binding for jstree var ss_jstree = new Shiny.InputBinding(); $.extend(ss_jstree, { find: function(scope) { return $(scope).find(".ss-jstree"); }, getValue: function(el) { var tree = $(el).jstree(); var leaves = tree.get_selected() var i, j, r = []; for (i = 0, j = leaves.length; i < j...
var endpointsAPI = function(app, database, rootDir) { var self = this; var request=require('request'); var fs = require('fs'), ini = require('ini'); var config = ini.parse(fs.readFileSync('./config/config.ini', 'utf-8')); self.activateEndpoints = function() { app.get('/', function (...
//=require 'survey/survey_elements' //=require 'survey/survey_submit' var Survey = $(document).ready(function() { this.surveyElementNumber = 0; this.createNewQustionButton = document.getElementsByClassName("statropia-create-new-question-button")[0]; this.submitButton = document.getElementsByClassName("statropi...
import React, { useContext } from 'react'; import { GameContext } from '../../../contexts/GameContext'; const WaitRoomScreen = () => { const { gameState } = useContext(GameContext); return ( <> <div className="mt-4 flex flex-col content-center justify-center text-center"> <p className="text-lg">...
import AudioDecoder from "@/components/AudioDecoder.js"; export default { name: "Pad", props: ["keyboard", "rows", "audio-context", "edit"], mounted() { this.allowPressKey = {}; // Register an event listener when the Vue component is ready window.addEventListener("keydown", this.keyDown); window.a...
'use strict'; const fs = require('fs'); const path = require('path'); const Promise = require('bluebird'); const readFile = Promise.promisify(fs.readFile); let index={ method: 'GET', path: '/', config:{ // If an error occurs when parsing a cookie don't error, just log it. state:{ ...
import './App.css'; import {ApiSelector, Bottombar, Sidebar, Map, SelectedData, TrainLogic, BatchDispatcher} from "./Components"; import {Mqtt, messageHandler, useWindowDimensions} from "./Services"; export default function App() { const {height, width } = useWindowDimensions(); const dataPanels = <>...
const mongoose = require("mongoose"); mongoose.connect("mongodb://127.0.0.1:27017/e-commerce", { useNewUrlParser: true, useCreateIndex: true, }); const Product = mongoose.model("Product", { name: { type: String, required: true, unique: true }, category: { type: String, required: true }, isActive: { type: Bo...
import React from "react"; import { ContextData } from "../context/GlobalState"; export default function Transaction({ transaction, moneyFormatter }) { const { DelTrans } = React.useContext(ContextData); const sign = transaction.amount < 0 ? "-" : "+"; return ( <li className={transaction.amount < 0 ? "minus...
const searchURL = "https://api.github.com/search/repositories?q=" const repoURL = "https://api.github.com/repos" function searchRepositories() { const searchTerm = document.getElementById('searchTerms').value $.get(searchURL + searchTerm, function(response) { const repos = response.items displayRepos(repos...
"use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj ...
let shoppingList = document.getElementById("shoppingList"); let addButton = document.getElementById("addItem"); let trimButton = document.getElementById("trimList"); let clearButton = document.getElementById("clearList"); let nameButton = document.getElementById("nameList"); addButton.addEventListener("click", addToL...
import React,{Component} from 'react' // 点击删除删除父组件的数据 所以需要父组件传一个方法给子组件 // 点击checked决定事件是否完成 // 点击checked可以更改事件状态 // 点击span可以显示输入框 修改事件 可以先定义一条数据 来控制input输入框是否显示 最开始是不显示的 // 当input失去焦点时 修改父组件的数据 可以调用父组件的方法 class TodoItem extends Component { constructor (props){ super(props); this.sta...
const { reviewModel } = require("../model/review"); const { collegeModel } = require("../model/college"); module.exports.post_review = async (req, res, next) => { const { id } = req.params; const reviewRecord = new reviewModel(req.body.review); reviewRecord.author = req.user; const studentRecord = await colleg...
const fs = require("fs") const path = require("path") const { spawnSync } = require("child_process") const AUTOGEN_WARNING = "This is autogenerated, please modify predeploy.js to change this" function staticFiles() { const STATIC_BUCKET_NAME = "hypertalk-static" spawnSync("gsutil", [ "-m", "rsync", ...
import React from 'react'; import FlatList from 'flatlist-react'; import Grid from '@material-ui/core/Grid'; import {Divider, useMediaQuery} from "@material-ui/core"; import SwitchActivate from "./Switch"; export default function SupermarketList(props) { const { isCheckedList, doEnable,supermarkets } = pr...
/* * GET home page. */ var mongoose = require('mongoose'); var Post = mongoose.model('Post'); var Comment = mongoose.model('Comment'); exports.index = function(req, res){ res.render('index'); }; exports.partials = function (req, res) { var name = req.params.name; res.render('partials/' + name); }; expo...
import { StyleSheet, Dimensions, Platform } from 'react-native'; const window = Dimensions.get('window'); import Constants from 'expo-constants'; import colors from '../../assets/colors'; import theme from '../../assets/theme'; export default styles = StyleSheet.create({ container: { flex: 1, }, navbarStyle...
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; var _excluded = ["className", "dashStyle", "fill", "height", "opacity", "rotate", "rotateX", "rotateY", "rx", "ry", "scaleX", "scaleY", "sharp", "sharpDirection...
var xhttp = new XMLHttpRequest(); xhttp.open('GET', 'http://api.openweathermap.org/data/2.5/weather?zip=94720,us&APPID=732e6658f618242e045a71feb919f108'); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var weather_data = JSON.parse(xhttp.responseText); document.getEl...
import QRCodeModal from "@walletconnect/qrcode-modal" import WalletConnect from "@walletconnect/client" export default function useTrustWallet(nft) { const connector = new WalletConnect({ bridge: "https://bridge.walletconnect.org", qrcodeModal: QRCodeModal, }); if (!connector.connected) { ...
import React from 'react'; import styled from '@emotion/styled'; import { colors } from '../../theme'; import { Contact } from './../Contact/Contact'; import { SkillList } from './../SkillList/SkillList'; import { Education } from './../Education/Education'; import { Work } from './../Work/Work'; const LeftText = styl...
'use strict'; const _ = require('lodash'); const GameResult = require('../gameResult.js'); /** * Generator for common baccarat roadmaps. */ class RoadmapGenerator { /** * Calculates a bead plate based on games played. * @param {GameResult[]} gameResults The game results to * calculate the roadm...
import React from 'react'; import { Popover } from 'react-bootstrap'; import { OverlayTrigger } from 'react-bootstrap'; import { AiFillStar, AiOutlinePlus, AiOutlineStar, AiOutlineWindows, } from 'react-icons/ai'; import { BiBookContent, BiExit, BiStats } from 'react-icons/bi'; import { NavLink } from 'react-ro...
// 微信账号管理 if (typeof Global === "undefined") { Global = {}; } AccountGridListPanel = Ext.extend(Disco.Ext.CrudPanel, { gridSelModel : 'checkbox', id : "accountGridListPanel", baseUrl : "account.java", showView: false, type:[["订阅号","1"],["服务号","2"]], typeRender:function(v){ if(v=="1"){ return "订阅号"; }else{...
var searchData= [ ['fdatasync',['fdatasync',['../sqlite3_8c.html#a71be186076d9c018df61d695a82c6edb',1,'sqlite3.c']]], ['filehandleid',['FILEHANDLEID',['../sqlite3_8c.html#a7cace293575d93eb07cc5a9ab9b42e41',1,'sqlite3.c']]], ['findcell',['findCell',['../sqlite3_8c.html#adcb94212d5f55b413664d999ea94a449',1,'sqlite3...
const WebSocketClient = require('websocket').w3cwebsocket; const {URLS} = require('./const/url'); const config = require('./config'); const {buildSignature} = require('./sign'); const CONNECTING = 0; const OPEN = 1; const CLOSING = 2; const CLOSED = 3; (function main() { const ws = new WebSocketClient(URLS.WS_URL);...
function desativa(ts){ var input1 = window.document.getElementById(ts); var cont = input1.innerHTML.replace(">",""); cont = cont + "disabled >"; input1.innerHTML = cont; } function ativa(ts) { var input1 = window.document.getElementById(ts); var cont = input1.innerHTML; if(cont.incl...
import React from 'react' const Notification = ({ notification }) => { if (notification) return <div className='default-notification'><strong>Success!</strong> {notification}</div> else return null } export default Notification;
import { FlowRouter } from 'meteor/kadira:flow-router'; import { BlazeLayout } from 'meteor/kadira:blaze-layout'; import MainLayout from '../../ui/layouts/mainlayout.html'; import Teams from '../../ui/views/data/teams.html'; import Players from '../../ui/views/data/players.html'; import Basketplayers from '../../ui/vi...
import React from 'react'; import Forecast from './forecast'; export default class Weather extends React.Component { constructor(props) { super(props); this.state = { fahrenheit: 0, celsius: 0, weatherDescription: null, icon: null, humidity: 0, high: 0, low: 0, ...
/* tessel to tessel * requires 2 nrf24 modules (and ideally two tessels) * * Transmits light level to receiver device. * For receiver, see: * https://github.com/SomeoneWeird/tessel-nrf-receiver */ var tessel = require('tessel'); var NRF24 = require('rf-nrf24'); var ambientlib = require('ambient-attx4'); var pip...
var _viewer = this; //列表需要建一个code为buttons的自定义字段。 $(".rhGrid").find("tr").each(function(index,item){ if(index !=0){ var dataId=item.id; $(item).find("td[icode='BUTTONS']").append( '<a class="rhGrid-td-rowBtnObj rh-icon" id="TS_XMGL_YDJK_edit" rowpk="'+dataId+'"><span class="rh-icon-inner">编辑</span><span class=...
import Vue from 'vue' import Router from 'vue-router' import Home from '@/views/home/home.vue' Vue.use(Router) export default new Router({ mode: 'history', beforeRouteEnter (to, from, next) { // 在渲染该组件的对应路由被 confirm 前调用 // 不!能!获取组件实例 `this` // 因为当钩子执行前,组件实例还没被创建 next(); }, ...
import styled from "styled-components"; import giftpage from '../assets/bgimg/giftpage.png' import { commerce } from '../lib/commerce' import {Cart} from '../components' import { useState, useEffect }from 'react' const Carty = () => { const [cart, setCart] = useState({}) const fetchCart = async () => { ...
import React, { Component } from 'react'; import './OrgForm.scss'; 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/...
import types from 'Actions/types'; import { initialAuthorState } from './initialState'; const { SET_AUTHORS, AUTHOR_FETCHED, ADD_AUTHOR, AUTHOR_EDITED, AUTHOR_DELETED, AUTHOR_ASSIGNED } = types; const authors = (state = initialAuthorState, action) => { switch (action.type) { case S...
import React from "react"; import { createStore } from "redux"; //defaultState + store + reducer const defaultState = { QAlist: [], question: "", answer: "" }; const reducer = (state = defaultState, action) => { switch (action.type) { case "ADD_QA_TOLIST": { const newstate = JSON.parse(JSON.stringify...
import React from "react" import PropTypes from 'prop-types' import { PageHeader, Modal, Button } from "react-bootstrap" const ReactModal = props => { return ( <Modal show={props.isShowing} onHide={props.toggleShow}> <Modal.Header closeButton> <Modal.Title>{props.title}</Modal.Title> </Moda...
import React from 'react'; import { Route, Redirect } from 'react-router-dom'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom' // const PrivateRoute = ({ component: Component, ...rest }) => ( // <Route {...rest} render={props => ( // localStorage.getItem('user') // ...
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; const StoryList = props => { const { stories, rootClassName } = props; return ( <div className={classNames('story-list__component', { [rootClassName]: !!rootClassName, })} > <h2>St...
const accessTokenModify = require('./helpers/modify-access-token'); const postScheduler = require('./helpers/schedule-post'); exports.homepage = function(req, res) { res.status(200) .send('Homepage'); }; exports.page404 = function(req, res) { res.sendStatus(404); }; exports.newAccessTok = (req, res) => {...
'use strict'; var u = require('./util') var isArray = Array.isArray function isFunction (f) { return 'function' === typeof f } function join (str) { return Array.isArray(str) ? str.join('.') : str } function toArray(str) { return isArray(str) ? str : str.split('.') } function isPerms (p) { return ( p &...
// @flow // Imports // ========================================================================== import StdlibPath from 'path'; import _untildify from 'untildify'; import _tildify from 'tildify'; import _ from '//src/nodash'; import match from '//src/match'; // Types // ==========================================...
/*================================================*\ * Author : Attaphon WongBuatong * Created Date : 28/11/2014 10:51 * Module : script * Description : javascript * Involve People : zeroline * Last Updated : 28/11/2014 10:51 \*================================================*/ /*================================...
<script>jQuery.noConflict();</script> <script type="text/javascript"> Event.observe(document,"dom:loaded", function() { </script> <script> var modal1 = document.getElementById("academicSupportModal"); var btn1 = document.getElementById("fusdiv1"); var span1 = d...
$(document).ready(() => { if(localStorage.getItem('login')){ $(location).attr('href','./orders.html'); } $('#login-hit').click((e) =>{ e.preventDefault(); if(($('#user-name').val() == $('#user-password').val()) && $('#user-name').val()){ window.alert('Login...
import types from './constants'; import API from '../../api'; function formatFilm(film) { const formattedUsers = film.Users.reduce((result, user) => { const buf = result; const { Rating, ...restUser } = user; buf.Users.push({ ...restUser, rate: Rating.rate, }); buf.rating += Rating.r...