text
stringlengths
7
3.69M
import * as actionTypes from './actionTypes'; export const getAllAssetHandler = allAsset => { return { type: actionTypes.GET_ALL_ASSET, payload: allAsset }; };
export default { resourceServer: { port: 8000, oidc: { issuer: "https://dev-170933.okta.com/oauth2/default" }, assertClaims: { aud: "api://default", cid: "0oadw3zeo3phZEALM356" } } };
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import className from 'classnames'; const propTypes = { countdown: PropTypes.number.isRequired }; const defaultProps = {}; class Timer extends Component { constructor(props) { super(props); this.state...
function tile(xTiles, yTiles, z, width, height, sprite){ this.rect = new rect(xTiles, yTiles, ancho, alto); this.zIndex = z; this.sprite = sprite; this.idHtml = "x" + xTiles + "y" + yTiles + "z" + z; this.html='<div id="'+this.idHtml+'"></div>'; } tile.prototype.aplicarEstilos = function(){ if(!...
import React from 'react' import Totals from '../Containers/Totals' import States from '../Containers/States' import Graph from '../Containers/Graph' import Logs from '../Containers/Logs' const Home = (props) => { return ( <div className='dashboard'> <h2>Dashboard</h2> <Totals /> <States />...
/** * @fileoverview Entity collects a group of Components that define a game object and its behaviors * * @author Tony Parisi */ goog.provide('SB.Entity'); goog.require('SB.PubSub'); /** * Creates a new Entity. * @constructor * @extends {SB.PubSub} */ SB.Entity = function() { SB.PubSub.call(this); ...
// Generated by CoffeeScript 1.9.2 (function() { var async, cheerio, moment, request; async = require('async'); moment = require('moment'); request = require('request'); cheerio = require('cheerio'); module.exports = { crawl: function(hut, cbExports) { var capacity, capacityStatus, ddlLocatio...
#!/usr/bin/env node /** * Skrypt tworzący szkice stron o ulicach */ var fs = require('fs'), bot = require('nodemw'), client = new bot('config.js'); var SUMMARY = 'Szkic strony', YEAR = '2017', ULICA = process.argv[2] || ''; if (ULICA === '') { console.log('Podaj nazwę ulicy'); process.exit(1); } function osm...
var isPc; function loadState(game){ this.init = function () { game.scale.pageAlignHorizontally=true;//水平居中 function goPC() { var userAgentInfo = navigator.userAgent; var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); ...
// pages/personal/personal.js var app = getApp(); var url = require('../../utils/url.js'); var constant = require('../../utils/constant.js'); Page({ /** * 页面的初始数据 */ data: { userInfo: {}, hasUserInfo: false, canIUse: wx.canIUse('button.open-type.getUserInfo'), isLogin: 1, isViewDisabled: ...
const pig = require('pigcolor'); const Category = require("../models/Category"); const Sub = require("../models/SubCategory"); // ** User exports.getAllcategory = (req, res) => { pig.box("ALL CATEGORIES"); Category.find({}, (err, allCategory) => { if (err) { return res.status(400).json({ ...
import { createStore } from "redux"; import reducer from "./reducer"; import middleware from "./middleware"; /** * Configure the store. * @param {Object} initialState Initial state object (typically empty: {}). */ const configureStore = (initialState) => { return createStore(reducer, initialState, middleware); };...
$(function() { $("#root-view") .modelsView("/", "<li><a data-toggle='tab' href='#{{id}}-tab'>{{id}}</a></li>"); $("#main-content") .modelsView( "/", ["<div id='{{id}}-tab' class='container tab-pane'/>", ["<div class='row'/>", ["<div class='span12'/>", ["<a href='#add-{{...
export default class NewRecord { constructor( serviceOperationNumber, date, mileage, serviceWorks, changableParts ) { this.serviceOperationNumber = serviceOperationNumber; this.date = date; this.mileage = mileage; this.serviceWorks = serviceWorks; this.changableParts = changa...
// app.js const { createStore } = require('redux'); // Define the store's reducer. const fruitReducer = (state = [], action) => { switch (action.type) { case 'ADD_FRUIT': return [...state, action.fruit]; default: return state; } }; // Create the store. const store = createStore(fruitReducer);...
import Vue from 'vue' import Vuetify from 'vuetify' import Logout from '../components/App/Logout.vue' import DepartmentCreate from '../components/Department/Create.vue' import DepartmentUpdate from '../components/Department/Update.vue' import DepartmentRemove from '../components/Department/Remove.vue' import Departme...
import { Navigation, EVENTS } from '../../src/Navigation'; describe('navigation', () => { it('should has a navigators as an empty object', () => { const navigation = new Navigation(); expect(navigation.navigators).toEqual({}); }); it('should has EVENTS list', () => { expect(EVENTS).toEqual({ L...
import React, { useState, useEffect, useContext } from 'react' import PropTypes from 'prop-types' import { Helmet } from 'react-helmet' import { Link, StaticQuery, graphql } from 'gatsby' import { Navigation } from '.' import SiteLogo from '../SiteLogo' // import config from '../../utils/siteConfig' import Prism from '...
window.onload = function() { var canvas = document.getElementById("canvas"), context = canvas.getContext("2d"), width = canvas.width = window.innerWidth, height = canvas.height = window.innerHeight; var weave = Weave.create(30, 20), model = { x: 0, y: 0, w: width, h: height, drawBG: false, ...
import React, {Component} from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import Login from '../components/login'; import Header from '../components/header'; import Sidebar from '../components/sidebar'; class Main extends Component{ constructor(props, context)...
const initialState = { stocks: [], prices: [], totalEarnings: null, errors: [] } const stockReducer = (state = initialState, action) => { switch (action.type) { case 'LOAD_PORTFOLIO': return {...state, stocks: action.stocks} case 'ADD_STOCK': return {...state, stocks: [...state.stocks...
import React, { useState, useEffect } from "react"; import axios from "axios"; import TextField from '@material-ui/core/TextField'; import Button from '@material-ui/core/Button'; import MenuItem from '@material-ui/core/MenuItem'; import Snackbar from '@material-ui/core/Snackbar'; import MuiAlert from '@material-ui/lab/...
import Vue from 'vue' import App from './App' import './assets/iconfont/iconfont.css' import router from './router' import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import Validator from 'vue-validator' // 导入全局样式 import '@/assets/css/global.css' import less from 'less' import VueCookies...
const { checkRole } = require('../framework/middleware'); const { USER_ROLES } = require('./constants'); // NOTE: JWT token is checked at top level const userAuth = () => checkRole([USER_ROLES.ROLE_STANDARD, USER_ROLES.ROLE_ADMIN]); const adminAuth = () => checkRole(USER_ROLES.ROLE_ADMIN); module.exports = { use...
import styled from 'styled-components'; // notice: react native flex vs css flex is DIFFERENT for flex-grow, // flex-shrink default value // refer to: // https://github.com/styled-components/styled-components/issues/465 export const Flex = styled.View` flex: 1 0; `; export const RowFlex = styled.View` flex: 1 0; ...
const express = require('express'); const router = express.Router(); const index = require('../models/index'); // There are a few more actions defined for routes in the index model. router.get('/', (req, res, next) => { index.all((err, beers) => { res.render('index', { beers, title: 'Liftopia' }); }); }); m...
describe('P.views.calendar.Workouts', function() { var View = P.views.calendar.Workouts, region = P.views.calendar.Cal.prototype; beforeEach(function() { spyOn(region, 'initialize'); spyOn(region, 'render'); var promise = new Promise(function() {}); spyOn(P.Collection.prototype, 'pFetch') ...
function asideDisplay (state=[], action) { // console.log('action', action); // console.log("modal reducer has been triggered!"); switch (action.type) { case 'OPEN_ASIDE': let popupId = action.id.match(/\d+/g).join(); return { ...state, showAside: true, asideText: popupId ...
const breakPoint = 0; let countDrops = 0; function drop(floor) { countDrops++; return floor >= breakPoint } function findBreakingPoint(floors) { let interval = 14; let previousFloor = 0; let egg1 = interval; /**Drop egg1 at decreasing intervals */ while (!drop(egg) && egg1 <= floors) { ...
import Link from 'next/link'; import styled from 'styled-components'; import Title from '../Title'; const Container = styled.section` display: flex; width: 100%; padding: 96px 20%; align-items: center; justify-content: space-between; background: ${({ theme }) => theme.colors.grayBackground}; border-top...
var gulp = require('gulp'); var mainBowerFiles = require('main-bower-files'); module.exports = function () { var setup = this.opts.setup; var asserts = setup.asserts; return gulp.src(mainBowerFiles(), {base: asserts.base.bower}) .pipe(gulp.dest(asserts.vendor, {cwd: asserts.base.src})); };
;!function(win){ var gy= win.gy; return gy = { /* * * */ isContain:function(parentOjb,targetObj){ return $(targetObj).closest(parentOjb).length ? true : false; } } }(window);
import express from "express"; import cors from "cors"; import AlienRouter from "./Router/alien.js"; import PartyRouter from "./Router/party.js"; import RegisterRouter from "./Router/register.js"; const app = express(); app.use(express.json()); app.use(cors()); app.use("/alien", AlienRouter); app.use("/party", Party...
import React, { Component } from 'react'; import { Text, StyleSheet } from 'react-native'; export default class MyComponent extends Component { render() { return <Text style={styles.welcome}>My Component</Text>; } } const styles = StyleSheet.create({ welcome: { fontSize: 20, textAlign: 'center', ...
import React from 'react'; import PropTypes from 'prop-types'; import {Redirect} from 'react-router-dom'; import classes from './index.module.css'; import {languageHelper} from '../../tool/language-helper'; import {removeUrlSlashSuffix} from '../../tool/remove-url-slash-suffix'; import './space.jpg'; class PageNoFou...
import React from 'react' import LoginForm from '../components/Form/LoginForm' import {Box} from '@chakra-ui/react' function Login(){ return( <Box > <LoginForm/> </Box> ) } export default Login
/** * Created by xuwusheng on 15/12/18. */ define(['../../../app','../../../services/platform/integral-mall/ordeImportService','../../../services/uploadFileService'], function (app) { var app = angular.module('app'); app.controller('ordeImportCtrl', ['$rootScope', '$scope','$timeout', '$state', '$sce', '$fil...
describe("P.views.workouts.view.Layout", function() { var View = P.views.workouts.view.Layout, Model = P.models.workouts.Template, $fetchDefer; PTest.routing(View, 'workouts/template/view/mock-123', false); beforeEach(function() { if (!Sisse.getUser.and) { spyOn(Sisse, 'getUser') .and....
var array=['javascript','jquery','html','css']; var newarray=array.map(capitalise).toString(); function capitalise(word){ return word.toUpperCase(); } console.log(newarray);
const testResultXML2JSON = require("../testResultXML2JSON"); describe("testResultXML2JSON middleware", () => { const mockReq = { body: "" }; const mockResObj = () => { const res = {}; res.status = jest.fn().mockReturnValue(res); res.send = jest.fn(/*function(s){console.log('######',s);return res;...
const mongoose = require('mongoose'); const httpStatus = require('http-status'); const { omitBy, isNil } = require('lodash'); const bcrypt = require('bcryptjs'); const moment = require('moment-timezone'); const jwt = require('jwt-simple'); const uuidv4 = require('uuid/v4'); const APIError = require('../utils/APIError')...
var searchData= [ ['parameters_5f',['parameters_',['../classopen3d_1_1camera_1_1_pinhole_camera_trajectory.html#a97289c86dbb9c354c592cd741ecf4eea',1,'open3d::camera::PinholeCameraTrajectory']]] ];
import React, { useEffect, useState } from 'react'; import { NavBar, Icon } from 'antd-mobile'; import { useHistory } from 'react-router-dom' import { Contain } from './Ticket.styled.js' import { get } from "@u/http"; const AboutUs = (props) => { const [coll, setColl] = useState(); useEffect(() => { (async ()...
//var MAX_TOTAL_BYTES = 2097152; var MAX_TOTAL_BYTES = 104857600; var filesSize = new Array(); function OnFileSelected(sender, args) { var fileName = args.get_fileName(); var temp = fileName.split("."); var ext = temp[temp.length - 1]; if (!(ext == "pdf" || ext == "xls" || ext == "xlsx")) { ...
/* Copyright 2016-2018 Stratumn SAS. All rights reserved. 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 l...
function getByClass(oParent , name){ var aElem = oParent.getElementsByTagName('*'); var aResult = []; for(var i=0;i<aElem.length;i++){ if(aElem[i].className==name){ aResult.push(aElem[i]); } } return aResult; }
"use strict"; let $ = require("jquery"); let controller = require("./controller"); let userFactory = require("./userFactory"); let db = require('./movieFactory'); let $container = $('.container'); let templates = require('./templateBuilder'); //When the user clicks the log in link, this calls the function to log the...
import React from 'react'; import Course from './course.component.jsx'; import CourseService from './../services/courseService.js'; class CourseSales extends React.Component { constructor(props) { super(props); this.state = { total: 0, arrCourses: [] } } as...
// Import React import React from "react"; import mapValues from "lodash/mapValues"; // Import Spectacle Core tags import { Appear, //BlockQuote, //Cite, CodePane, Deck, //Fill, Heading, Image, //Layout, Link, List, ListItem, //Markdown, //Quote, Slide, //Table, //TableRow, //TableH...
import { Template } from 'meteor/templating'; import { ReactiveVar } from 'meteor/reactive-var'; import './main.html'; //Tasks = new Mongo.Collection('tasks'); Meteor.subscribe('tasks'); Template.tasks.helpers({ tasks() { return Tasks.find({}, {sort: {createdAdd: -1}}); }, }); Template.tasks.events({ 'submit...
import React from 'react' import ReactDOM from 'react-dom' import {Router, Route, IndexRoute, browserHistory} from 'react-router' import './index.css' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap/dist/css/bootstrap-theme.css' import GalleryPage from './pages/GalleryPage/GalleryPage' import ArtistsPage fr...
const db = require('../models'); const jwt = require('jsonwebtoken'); const cookieParser = require('cookie-parser'); // for the auth token // Defining methods for the todosController module.exports = { create: function(req, res) { const decoded = jwt.decode(req.cookies.token); const todo = req.body; todo...
import React from 'react'; import PropTypes from 'prop-types'; import { observable, computed } from 'mobx'; import { observer, inject } from 'mobx-react'; import { withRouter } from 'react-router'; import { withStyles } from '@material-ui/core/styles'; import Auth from '../modules/Auth'; import empty from 'is-empty'; i...
angular.module('socially').directive('locationList', function () { return { restrict: 'E', templateUrl: 'client/orders/location-list/location-list.html', controllerAs: 'locationList', controller: function ($scope, $reactive) { $reactive(this).attach($scope); $scope.subscribe('location...
const Lootable = require('../Lootable'); const craft = require('../../../craft/craftItem'); function Production(id, mapItemId, typeId, location, characterId, durability, inventoryId, invenorySize, preparingTime) { Lootable.apply(this, arguments); this.preparingTime=preparingTime; this.currentPreparingTime=null; ...
var n = parseInt(process.argv[2]); var a1 = 1; var a2 = 1; var a3 = 0; console.log(a1); console.log(a2); for(var i = 2; i <= n; i++){ a3 = a1 + a2; a1 = a2; a2 = a3; console.log(a3); }
function Renderer(canvas, gl) { this.canvas = canvas; this.gl = gl; this.aspectRatio = 0; this.fieldOfView = 70; this.screenSize = new vec2(); this.reshape(canvas.width, canvas.height); gl.clearColor(0,0,0,1); gl.enable(gl.DEPTH_TEST); this.initColorShader(gl); this.initTriangl...
import React, { Component } from 'react'; export class WordRender extends Component { constructor(props){ super(props); this.state ={ madLibOptions: 0 } this.wordMenu = this.wordMenu.bind(this); }; wordMenu(e){ e.preventDefault(); let madLibOption = [ this.props.original, "_...
/* CC3206 Programming Project Lecture Class: 203 Lecturer: Dr Simon WONG Group Member: CHAN You Zhi Eugene (11036677A) Group Member: FONG Chi Fai (11058147A) Group Member: SO Chun Kit (11048455A) Group Member: SO Tik Hang (111030753A) Group Member: WONG Ka Wai (11038591A) Group Member: YEUNG Chi Shing (11062622A) */ /...
var isIsomorphic = function(s, t) { let hashMap = {}; for (let i = 0; i < s.length; i++) { if (hashMap[s[i]] === undefined) { for (let key in hashMap) { if (hashMap[key] === t[i]) { return false; } } hashMap[s[i]] = t[i]; } else { if (hashMap[s[i]] != t[i]) ...
const uri = "ytdl"; document.addEventListener('DOMContentLoaded', () => { for (const a of document.getElementsByTagName('a')) a.onclick = () => { if (a.href && a.href.length > 0) chrome.tabs.create({ active: true, url: a.href }); } document.getElementById("downloadM...
import createNode from "../common/createNode"; const cancelButton = createNode( "button", { class: "c-Form__button js-Form__button--cancel" }, "Cancel" ); cancelButton.addEventListener("click", (e) => { e.preventDefault(); console.log(e); // @ts-ignore e.target.offsetParent.remove(); }); const addButto...
/** * 住房补贴查询初始化 */ var HousingSubsidyManage = { id: "HousingSubsidyTable", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1, url:"", secondLayerIndex:-1 }; /** * 初始化表格的列 */ HousingSubsidyManage.initColumn = function () { return [ {field: '', radio: false,formatter:funct...
define(function(require){ var React = require('react'); var ReactDom = require('react-dom'); var mat = require('materialize'); var Header = require('jsx!app/components/header'); var Footer = require('jsx!app/components/footer'); var Home = React.createClass({ getInitialState: function() { retur...
const util = require('../modules/util'); const statusCode = require('../modules/statusCode'); const resMessage = require('../modules/responseMessage'); const crypto = require('crypto'); const jwt = require('../modules/jwt'); const Post = require('../models/post'); const User = require('../models/user'); const user = ...
var httpController = function (http){ console.log('httpController loaded'); http.get('/', function (req, res){ res.render('index'); }); } module.exports = httpController;
(function() { 'use strict'; angular .module('unpsipApp') .controller('CursoDetailController', CursoDetailController); CursoDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'previousState', 'entity', 'Curso', 'Professor', 'Turma', 'Aluno']; function CursoDetailContro...
const graphql = require('graphql'); const GraphQLDate = require('graphql-date'); const validator = require('validator'); const _ = require('lodash'); const Admin = require('../models/admin'); const Staff = require('../models/staff'); const Student = require('../models/student'); const { GraphQLObjectType, GraphQL...
// 构造函数 var now = new Date(); //获取当前时间 // Date.parse()方法 接受一个表示日期的字符串参数,可以是以下格式 /** "月/日/年" 如 6/13/2004 * "英文月名 日,年" 如 January 12,2004 * 其他格式省略 */ var someDate = new Date(Date.parse('May 25,2004')); //如果将表示日期字符串直接传给Date构造函数,在后头调用Date.parse方法 //以上代码等价于 var someDate = new Date('May 25,2004'); // Date.UTC方法参数 年份...
import { RECEIVE_USER } from '../actions/session' const initialState = { all: null, } const doctors = (state = initialState, action) => { switch (action.type) { case RECEIVE_USER: return Object.assign({}, state, { all: action.doctors }) default: return state } } export default doctors
const postcss = require("cssnano/node_modules/postcss"); module.exports = { syntax: "postcss-scss", plugins: [ require("postcss-preset-env")({ stage: 1, }), require("autoprefixer"), ], };
import { useState, useEffect } from "react"; import dayjs from 'dayjs'; import styles from "../styles/History.module.css"; export default function History({ workoutHistory }) { const [ monYrList, setMonYrList ] = useState([]); const [ haveLoaded, setHaveLoaded ] = useState(false); // import workoutHistory from...
//Map through each day, and in each day run a loop(forEach) on the intervals for the day to determine max/min value of a property (example temp_min). A conditional is used to compare the previous interval min/max value to the current min/max value and value is updated based on the conditional //EXAMPLE: property1='ma...
for(var i = 0; i < 34; i++) { var scriptId = 'u' + i; window[scriptId] = document.getElementById(scriptId); } $axure.eventManager.pageLoad( function (e) { }); gv_vAlignTable['u27'] = 'top'; u28.style.cursor = 'pointer'; $axure.eventManager.click('u28', function(e) { if (true) { self.location.href=$axure.globalVar...
var expect = require('expect.js'); var userCtrl = require('../routes/controller/userCtrl.js'); var userModel = require('../models/UserModel.js'); var db_init = require('../models/DB_InitTest.js'); if (typeof(suite) === "undefined") suite = describe; if (typeof(test) === "undefined") test = it; suite('User Ctrl', func...
import React from "react"; import Button from "../Button/index"; export default function LocalStorageBlock({ saveTodoLocalStorage, deleteTodoLocalStorage, }) { return ( <div className="localStorage-block"> <Button className="btn-save" title="Save Todo" onClick={saveTodoLocalStorage}/> <Butto...
$(document).ready(function() { $("#providers").dynamiclist({ jsonrpc: { method: "ddns.providers" }, ejs: { url: "tpl/conn_ddns_provider_status.ejs", data: function(a) { return { provider: a } ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const randomNumber = arr => arr[Math.floor(Math.random() * arr.length)]; exports.default = randomNumber;
var im = require('../lib/im/im'); im.startReciver('imReciver', function(content) { console.log(content); });
var API_URL = "/api/v1/"; $(function(){ $("#submit_login").on("click", function(e) { var arr = $("#login_form").serializeArray(), data = {}; for (var i = 0; i < arr.length; i++) { data[arr[i].name] = arr[i].value; } $.ajax({ type: "POST", url: API_URL+"login", d...
// write me a function stringy that takes a size and returns a string of alternating '1s' and '0s'. // the string should start with a 1. // a string with size 6 should return :'101010'. // with size 4 should return : '1010'. // with size 12 should return : '101010101010'. // The size will always be positive and wi...
//mongoose const mongoose = require('mongoose') mongoose.Promise = global.Promise mongoose.connect('mongodb://localhost/csj',{ useMongoClient: true }); //schema const accountSchema = mongoose.Schema({ openid:String,//wechat id tel:Number, psw:String, business: Boolean, }) const shopSchema = mong...
import React, {Component} from 'react' import Post from './Post'; import {Row, Col} from 'react-bootstrap'; import BlogStore from '../../stores/BlogStore'; class Blog extends Component { constructor(props){ super(props); let date = new Date(); this.state = {BlogStore: BlogStore.getState(...
import getNeighborCells from "../helpers/getNeighborCells"; import initState from "../initState"; const generateBoard = (width, height, mines, click) => { const getRandLoc = () => { return { x: Math.floor(Math.random() * width), y: Math.floor(Math.random() * height), } } const isValidMineLoc ...
(function(){ var settings = { channel: 'pi-house', publish_key: 'pub-c-8b8e3386-51eb-4dbc-92b8-281fb225cca1', subscribe_key: 'sub-c-0a63540c-0045-11e6-9086-02ee2ddab7fe' }; var pubnub = PUBNUB(settings); var door = document.getElementById('door'); var lightLiving = document.getElementById('lightLiving'); ...
Meteor.publish("zona",function(params){ return Zona.find(params); });
function managerCard(manager) { return `<div class="col"> <div class='card bg-info mb-3 text-center border border-3 border-warning' style="padding: 1rem; margin: 2rem"> <div class='card-header fw-bold'> <h1>${manager.getRole()}</h1> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill...
d.rebase (function () { var e = document.getElementById ('examples'); var examples = {square: 'r4i {m100 t90}', circle: 'r360i {m1 t1}', spiral: 'r120i {\nmove(i);t60}', dome: 'p60 r120i {\nmove(i);t60 p-2}', torus: 'r40i {p90 j100 r30j {m12 p12} j-100 p-90 t90 j5 t-90 b9}', squares: 'r100i {m100...
let options = [ { id : 'circleWhite', src : './images/products/twelveRound/twelveRoundWhite.jpg', caption : 'Here is the caption for desk image', color: 'White' }, { id : 'circleDarkGray', src : './images/products/twelveRound/twelveRoundMetal.jpg', caption : 'Here is the capt...
import React from 'react'; import styles from './styles/blog.scss'; import { Link } from 'react-router-dom'; const Blog = () => { return ( <div id='Lessons' className={`row ${styles.container}`}> <div className={`${styles.semitransparent} col-lg-4 col-md-6 col-sm-8 col-xs-10 col-lg-offset-4 col-md-offset-3...
$(function () { layui.config({ version: '1545041465480' //为了更新 js 缓存,可忽略 }); //注意:这里是数据表格的加载数据,必须写 layui.use(['table', 'layer', 'form', 'laypage', 'laydate'], function () { var table = layui.table //表格 ,layer = layui.layer //弹层 ,form = layui.form //form表单 ...
import React, { useState, useEffect } from 'react'; import './WatchPage.css'; import DetailsCard from '../DetailsCard/DetailsCard'; import Header from '../Header/Header'; const WatchPage = () => { const [toWatch, setToWatch] = useState([]) useEffect(() => { retrieveSaved() }, []) const retrieveSaved ...
const express = require('express') const bodyParser = require('body-parser') var randomstring = require("randomstring"); var cors = require('cors') const app = express() app.use(cors()); app.use(bodyParser.json()) const credentials = require('../../utils/Credentials') const {storage_databaseCurr} = require("./Scripts/...
import React from 'react'; import './listContact.css'; import axios from 'axios'; import Contact from './contact'; import Input from './input'; import { read } from 'fs'; import IconSearch from '../assets/iconSearch.png'; import socketIOClient from "socket.io-client"; var socket; export default class ListContact exten...
import axios from 'axios'; const TOKEN_KEY = '1863b96e04c24d408b28106d51afc728'; export const get = (url) => { return axios.get(url, { headers: { 'X-Auth-Token': TOKEN_KEY } }) .then((res) => { return res; }) .catch((error) => { console.log(error) }); };
var stream = require('stream'); module.exports = {connect: function(credentials, readyCallback, messageCallback){ var login = require('facebook-chat-api'); login(credentials, function callback(err, api){ if(err) return console.error(err); // Workaround to make a needlessly required argument optional again va...
var TreeNode = function(value, left, right) { this.value = value; this.left = left; this.right = right; } var tree = new TreeNode(30, new TreeNode(8, new TreeNode(3), new TreeNode(20, new TreeNode(10), new TreeNode(29) ) ), new TreeNode(52) ); v...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ErrorHandler = (function () { function ErrorHandler(key, params) { this.key = key; this.params = params; this.errorMessages = { invalidSelector: "Can't find HTMLFormElement or HTMLInputElement on %se...
import React, { Component } from 'react'; import './Education.css'; import SocialSchool from 'material-ui/svg-icons/social/school'; import Paper from 'material-ui/Paper'; export default class Education extends Component { render() { return ( <Paper className="Education"> <div className="Education_...
///Counting Sort Algorithm's code here.. function count_sort(arr, min, max){ let i; let Y = 0; let count = []; for(i = min; i <= max; i++){ count[i] = 0; } for(i = 0; i <= arr.length; i++){ count[arr[i]]++ } for(i = min; i <= max; i++){ while(count[i]-- > 0){ ...