text
stringlengths
7
3.69M
let bumpMapTextureFragmentShader = `precision highp float; varying vec2 fTextureCoordinate; varying vec3 fPos; varying vec3 fLight; uniform mat4 normalMatrix; uniform sampler2D textureSampler; uniform sampler2D bumpMapSampler; uniform sampler2D specularMapSampler; vec2 BlinnPhongShading(vec3 surfaceNorma...
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin'); module.exports = { css: { loaderOptions: { sass: { data: ` @import "@/styles/base/_setting.scss"; @import "@/styles/base/_function.scss"; ` } } }, configureWebpack: { plugins: [new ...
import React from "react"; import classes from "./MyCv.css"; const MyCv = () =>{ return <main className={classes.CV}> <img src="randomkemoboi.jpg" className={classes.profilePhoto} alt="My profile photo failed to load"/> <h2 >Personal Profile Statement</h2> <hr/> <p>An adaptable, calm and result-oriente...
const initialState = { firstName: '', lastName: '', email: '', createUsername: '', createPassword: '', redirect: '', showSignup: false, image: '', userList: [] } export default function reducer (state = initialState, action) { let tempState = state switch (action.type) { case 'SET_FIRSTNAME'...
import ZWayAPI from '../zway/api' const api = new ZWayAPI() export default class DeviceActions { typeCommands = { // 'switchMultilevel', // 'switchBinary', // 'switchRGBW', // 'doorlock', // 'doorLockControl', // 'toggleButton', // 'sensorMultilevel', // 'sensorBinary', // 'senso...
_.contains = function(value,arg){ return value.indexOf(arg) !== -1; } _.include = _.contains
import React, { useEffect, useRef, useState } from 'react'; import { connect } from 'react-redux'; // import MenuNavbar from '../../components/MenuNavbar/index'; import { Col, Container, Row } from "react-bootstrap"; import Toast from '../../helpers/toast'; import { Form, Input, Button, Card, Radio,...
'use strict'; var test = angular.module('app').controller('main.IndexController', mainController); function mainController($scope, $http) { $scope.formDeviceData = {areaID:''}; $scope.formAreaData = {parentID:''}; $scope.areas; $scope.testing = "testing hi"; //var socket = io(); //socket.on('dbUpdate', fun...
const express = require('express') const axios = require('axios') const { port, host, db, apiUrl } = require('./configuration') const { connectDb } = require('./helpers/db') const app = express() const startServer = () => { app.listen(port, () => { console.log(`Server AUTH listening on ${port}`) ...
import Vue from "vue"; import Vuex from "vuex"; import axios from "axios"; Vue.use(Vuex); export default new Vuex.Store({ state: { images: [], search_term: "", resolution_type: "med", current_page: 1, page_limit: "", dialog_status: false, selected_img_data: {}, selected_img_url: "", ...
/** * @param {string} a * @param {string} b * @return {string} */ var complexNumberMultiply = function(a, b) { var sa = split(a); var sb = split(b); var real = sa.real * sb.real - sa.imaginary * sb.imaginary; var imaginary = sa.real * sb.imaginary + sa.imaginary * sb.real; return real+"+"+imaginary+"i"; }...
module.exports = { lagertown: { title: "Lagertown U.S.A.", id: "lagertown", slug: "lagertown-usa-multichannel-marketing", type: "page", subtitle: "multi-channel marketing", description: "An attractive design to sell to busine...
var myArrList = [ { index: 0, data: 'A', next: { index: 1, next: { index: 2, next: { index: 3 } } } }, { index: 1, data: 'B' }, { index: 2, ...
if (Meteor.isServer) { Meteor.publish("classes", function() { return Classes.find({}); }); }
getData() // calling the main function to get the JSON // assigning document elements to variables const noResultsDiv = document.getElementById("noResultsFound") const perPageDiv = document.getElementById("perPage") const userInput = document.getElementById('search') const addBtn = document.getElementById('addElement'...
var searchData= [ ['normalgamestrategy_2eh',['normalgamestrategy.h',['../normalgamestrategy_8h.html',1,'']]] ];
import s from './Dialogs.module.css' import Dialog from './Dialog/Dialog' import Message from "./Message/Message"; import React from "react"; import {Field, reduxForm} from "redux-form" import {maxLengthCreator, required} from "../../utils/validators/validators"; import {Textarea} from "../../Common/FormsControls/FormC...
'use strict'; module.exports = app => { const tableName = 'cg_failed_item_rel'; const { BIGINT, STRING, TINYINT } = app.Sequelize; const Fail = app.model1.define( 'Fail', { /* 通用字段 */ id: { type: BIGINT(19), primaryKey: true }, inspectionId: { type: BIGINT(19) }, categoryId: { type:...
function unique(array) { var object = {}; for(var i = 0; i < array.length; i++){ var str = array[i]; object[str] = true; } return Object.keys(object); } var strings = ["кришна", "кришна", "харе", "харе", "харе", "харе", "кришна", "кришна", "8-()" ]; console.log(unique(stri...
const shell = require('shelljs'); const glob = require('glob'); const { extname, resolve } = require('path'); const sharp = require('sharp'); const fs = require('fs'); const cmd = 'img:resize'; // TODO: Validate notification handler when use mogrify // dvx img:resize --exc=opengraph module.exports = { cmd, desc: 'R...
(function (model, root, modules) { var ready = false; var view = require('riko-mvc').V(model, render); document.body.innerHTML = ""; document.body.appendChild(view.target); Object.keys(modules.nodes).forEach(installDir); ready = true; update(); return view; function installDir (name) { try {...
/** * @module yrzb.filters * @requires ionic * @requires yrzb.config * @description * filter 模块功能:<br> * */ (function(){ 'use strict'; var filters = angular.module('yrzb.filters', []) /** * @func upcase * @param {String} text 需转化的字符串 * @return {String} * @description * 将字符串转化成大写...
const mongoose = require("mongoose"); const dateSchema = new mongoose.Schema({ Quizes:[{ type: String, required: true, }], Assignments:[{ type: String, required:true, }], Lectures:[{ type: String, required: true, }], midsPaper:{ type: ...
import { useRef } from 'react'; import useToggle from '../useToggle'; import useForceUpdate from '../useForceUpdate'; /** * * @param { Boolean } visible 控制Modal是否状态是否可见 * @param { Function } onCancel Modal对话框的取消事件 * @param { Function } onOk Modal对话框的确认事件 * @param { Object } config 对应的全部是Antd中Modal的属性 * @param { ...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsStorage = { name: 'storage', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"/></svg>` };
define('app/views/layout/search', [ 'jquery', 'underscore', 'magix', 'app/util/index', 'app/util/dialog/index' ], function ($, _, Magix, Util, Dialog) { return Magix.View.extend({tmpl:"<div class=block-switch-loading></div> <div mx-vframe=true mx-view=\"app/views/common/sitenav\"></div> <div mx-vframe=true...
import { actionTypeConst } from './constants' import { fetchGardenList, fetchGardenPlantList } from './service' const requestGetGardenList = () => ({ type: actionTypeConst.getGarden.REQUEST }) const successGetGardenList = ({ data, code }) => ({ type: actionTypeConst.getGarden.SUCCESS, data: data.data, code })...
import React, { Component } from 'react'; import { MsgBox } from './components/MsgBox/MsgBox'; import bg from './components/MsgBox/Bkgrnd03.jpg'; import styles from './components/MsgBox/MsgBox.css'; class Home extends Component { render() { return ( <div style={{ background: `url(${bg}) no-repeat`, backgr...
import Vue from "vue"; import VueRouter from "vue-router"; import Home from "../views/Home.vue" import Gg from "../views/gg.vue" import Banner from "../views/banner.vue" import zhuanji from "../components/xiangqing/zhuanji.vue" import playMusic from "../components/xiangqing/playMusic.vue" Vue.use(VueRouter); const ...
'use strict'; chrome.runtime.onInstalled.addListener(function(details) { if(details.reason === 'install') chrome.storage.sync.set({zoomData: '[{"class":"ESET 210","meetingID":"123456789","info":"Click on the info Icon!"}, {"class":"CSCE 222","meetingID":"123456789","info":"HELL MW 10:20 AM"}, {"class":"PHYS 207"...
import React, {Component} from "react"; import { View, TouchableHighlight, Text, TextInput, AsyncStorage, Alert, } from "react-native"; import PushNotification from "react-native-push-notification"; import styles from "./Styles.js"; import { getDataFromStorage, setDataToStorage, cr...
const baseAction = { navTo: { desc: '链接跳转', params: { url: { type: String } } }, setData: { desc: '设置数据', params: null }, hide: { desc: '隐藏', params: null }, show: { desc: '展示', params: null } } export default baseAction
import React from "react"; import { FormGroup, Input, Button, Card, CardHeader, CardImg, CardBody, CardBlock, Form } from "reactstrap"; import { withRouter } from "react-router-dom"; import { password } from "../../services/appuser.service"; import "react-notifications/lib/notifications....
const express = require('express'); const database = require('../database/index.js'); const app = express(); const port = 3003; const cors = require('cors'); const moment = require('moment'); // const redis = require("redis"); // const client = redis.createClient(); // client.on("error", function(error) { // conso...
import React, { Component } from 'react'; import { withStyles } from '@material-ui/core/styles'; import { Typography, Grid } from '@material-ui/core'; // import { CSSTransition } from 'react-transition-group'; import ToggleSwitch from '../components/ToggleSwitch'; import TableRow from '../components/TableRow'; import...
const fs = require('fs') const request = require('superagent') const cheerio = require('cheerio') const dir = require('./config/savedir') const authorId = require('./config/authorid') const authorUrl = require('./config/url') const cookie = require('./config/cookie') const repeat = require('./api/repeat') const getPage...
(function () { 'use strict'; angular.module('app') // .config(routerConfig) .controller('MenuController', MenuController); // .controller('MenuController', ['$state', MenuController]); MenuController.$inject = ['$state', 'AuthenService', 'ApplicationConfig']; function Menu...
// Forms functions $(function () { $.fn.hasData = function (key) { return typeof $(this).data(key) !== "undefined"; }; }); // Catalogues functions function loadTable(urlTable, tableSelector) { $.ajax({ type: "POST", url: urlTable, dataType: "json", contentType: ...
class FontFaceLoader { constructor(url, name) { this.url = url; this.name = name; this.alreadyLoaded = false; }; load() { return new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest(); xhr.responseType = "blob"; xhr.addEventListener("readystatechange", function(...
module.exports = { gateway: "http://gateway:8080" };
import React, { Fragment } from 'react'; const Home = () => <Fragment> <h1>Andrew's Awesome Restaurant</h1> <div> <p> I'm here to put good food in your mouth </p> </div> </Fragment> export default Home
const ObjectId = require('mongodb').ObjectId; const db = require('./db').getDb(); const posts = db.collection('posts'); const user = require('./user'); const validationService = require('../service/validation-service'); const _ = require('lodash'); //todo check also the value of keys. Could be empty! const formatPos...
import React from 'react' import cap from './../images/kozel.png' import bact from './../images/bacteria.png' import './style.css'; import Parallax from "react-rellax/lib"; function caps() { return( <div> <div className='cap1'> <Parallax speed={-5}> <img classNa...
import { GET_USER_NOW } from "../action/type"; const initState = { name: "User", avatar: "http://localhost:8000/uploads/1612113710892-profile.jpg", }; const UserNow = (state = initState, action) => { switch (action.type) { case GET_USER_NOW: return { ...state, ...action.payload }; default: ret...
const template = `<div class="character"> <CharacterBase :uid="data.uid" :name="data.name" :element="data.element" :level="data.level" :fetter="data.fetter" :constellation="data.actived_constellation_num" :id="data.id" ></CharacterBase> <CharacterArtif...
const logUser = document.querySelector("#logUser"); const logPass = document.querySelector("#logPass"); const lForm = document.querySelector("#lf"); //This is a variable for the expected avatar name //this function filters the localstorage of saved data for a match of the inputted value. function loginCheck(a, b) { ...
/** * Created by Jay on 2016/11/11. */ var path = require('path'); var ROOT_PATH = path.resolve(__dirname); var APP_PATH = path.resolve(ROOT_PATH, ""); var RES_PATH = path.resolve(APP_PATH, ""); var CSS_PATH = path.resolve(RES_PATH, "css"); var JS_PATH = path.resolve(RES_PATH, "js"); var IMG_PATH = path.resolve(RES_P...
const router = require("express").Router(); const projectFormController = require("../../controllers/projectFormController"); // Matches with "/api/projects" router.route("/") .get(projectFormController.find) .post(projectFormController.create); // Matches with "/api/projects/:id" router .route("/:id") .get(p...
require('./index.scss'); require('./base.js'); require('./template.js'); require('./controller.js'); require('./view.js'); require('./model.js'); (function () { 'use strict'; function Todo(name) { this.model = new app.model(); this.template = new app.template(); this.view = new app.view(this.template)...
const BuildsListingsDefaultState = { msg: "", }; export const getBuildsListingReducer = ( state = BuildsListingsDefaultState, action ) => { switch (action.type) { case "page1": return { ...state, msg: "yash" }; } };
let Tree = require('../../4.trees_and_graphs/Tree'); let Node = require('../../4.trees_and_graphs/Node'); const checkSubtree = require('../../4.trees_and_graphs/10_check_subtree'); test('Found subtree', () => { let tree = new Tree(); const subtreeRoot = new Node(2); tree.root.data = 4; tree.root.left ...
"use strict"; var _bl = require("bl"); var _bl2 = _interopRequireDefault(_bl); var _pythonStruct = require("python-struct"); var _pythonStruct2 = _interopRequireDefault(_pythonStruct); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var cluster = require("cluster");...
import React from 'react' const Message = ({ message }) => { return ( <h2> Form is {message} </h2> ) } export default Message;
P.views.profiles = {};
import { css } from 'emotion' import __css from '@styled-system/css' import Box from '../Box' import { tx, forwardProps } from '../utils' import { baseProps } from '../config' // Default ControlBox props types const PropTypes = [Object, Array] const ControlBox = { name: 'ControlBox', inject: ['$theme'], props: ...
import React from 'react' import Image from '../../../images/Mask.png' import iphoneImage from '../../../images/iphone_12_PNG22.png' import macAdvertisement from '../../../images/mac-air-advertisement.png' import sonyBraviaBanner from '../../../images/sonyBravia-banner.png' import iphoneBanner from '../../../images/ban...
module.exports = function(mongoose, CONFIG) { var schema = new mongoose.Schema({ text: String, howWeWork: String, sessions: [{ sessionType: { type: String, }, price: { type: String, }, noOfSessions: {...
(function() { // 这些变量和函数的说明,请参考 rdk/app/example/web/scripts/main.js 的注释 var imports = [ 'rd.controls.Selector' ]; var extraModules = [ ]; var controllerDefination = ['$scope','EventService','EventTypes', main]; function main(scope,EventService,EventTypes) { scope.allItems...
exports.handler = function (event, context, callback) { if (event.queryStringParameters!=null && event.queryStringParameters.id != null) { var id = event.queryStringParameters.id; var http = require("https"); var options = { "method": "GET", "hostname": "widget.kkbox....
export const FETCH_COLORS_REQUEST = 'FETCH_COLORS_REQUEST' export const FETCH_COLORS_SUCCESS = 'FETCH_COLORS_SUCCESS' export const FETCH_COLORS_FAILURE = 'FETCH_COLORS_FAILURE' import { CALL_API } from '../middleware/api' import { config } from '../config.js' export function fetchColors() { return { [CALL_API]:...
import gulp from 'gulp'; import gulpLoadPlugins from 'gulp-load-plugins'; const plugins = gulpLoadPlugins(); gulp.task('lint', () => gulp.src( [ 'gulpfile.babel.js', './config/**/*.js', '.app/**/*.js' ] ) .pipe(plugins.jshint()) .pipe(plugins.livereload())); gulp.task('transpile', ['public'], () =>...
import { Component, Directive, TemplateRef, ViewContainerRef, Injector, ComponentFactoryResolver, Renderer } from '@angular/core'; @Component({ selector: 'alert', template: ` <div class="alert alert-success" role="alert"> <ng-content></ng-content> </div> ` }) export class AlertComponent { } @Dir...
import React from 'react'; import PropTypes from 'prop-types'; import { Redirect } from 'react-router-dom'; import DateRangePicker from '@wojtekmaj/react-daterange-picker'; import { MDBAutocomplete } from 'mdbreact'; import { languageHelper } from '../../../tool/language-helper'; import { removeUrlSlashSuffix } from '...
import React from 'react'; import {Text, TouchableOpacity} from 'react-native'; const BottomMenuCounter = (props) => { const {onPress, children} = props; const {buttonStyle, textStyle} = style; return ( <TouchableOpacity style={[buttonStyle, props.style]} onPress={onPress}...
import React from 'react' import { Redirect } from 'react-router' import axios from "axios"; import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem, NavLink } from 'reactstrap'; // Import authContext to check for authentication state; navbarContext to fetch username to render import { useAuthContext } from '.....
$(function() { var rcsdk = null; var platform = null; var subscriptions = null; var loggedIn = false; var rcWebPhone = null; var rcCall = null; var redirectUri = getRedirectUri(); var defaultClientId = ''; var $app = $('#app'); var $authFlowTemplate = $('#template-auth-flow'); var $callTemplate =...
var Crypto = require("crypto-js"); const Bcrypt = require("bcrypt"); const key = "Aashgdhgafdhgfdjhafsghdfajshdf"; function crypto(){ function cryptPassword(password){ const hash = Bcrypt.hashSync(password, 10); return hash; } function compare(password1, hash) { return Bcrypt.comp...
// Define the options of our application const Game = { data() { return { playerName: '', gameStarted: false, usedLetters: [], currentAnswer: [], randomAnswer: {}, guessNum: 0, roundOver: false, rounds: [], ...
$(document).ready(function () { showMap(document.getElementById("map"), 50, 20); function showMap(mapElement, lat, lon) { var center = new google.maps.LatLng(lat, lon); var marker = new google.maps.Marker({ position: center, animation: google.maps.Animation.BOUNCE, ...
import http from "../../HTTP/http" import { useEffect, useState } from "react" import { useParams } from "react-router-dom" import CardServico from '../../Componentes/CardServico' const Servico = () => { const {id} = useParams() const [servico, setServico] = useState({}) useEffect(() => { http.g...
import React, {useState} from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import style from './Tabs.module.css'; const Tabs = props => { const [selectedTabIndex, changeSelectedTab] = useState(0); const tabs = props.children.map((item, index) =>( <li className={c...
import React from 'react' import styled from 'styled-components' import { withSnackbar } from 'notistack' const StyledNav = styled.nav` border-right: 1px solid white; min-height: 83vh; min-width: 15vw; ` const NavBar = (props) => ( <StyledNav> This is the Nav Bar. </StyledNav> ) export default withSnac...
export const INCURSION_ENTRY = 'INCURSION_ENTRY' export const incursionEntry = payload => ({ type: INCURSION_ENTRY, payload })
function reverseString(str) { let reversedString = ''; for (i = str.length - 1; i >= 0; i--) { reversedString += str[i]; } return reversedString; } if (require.main === module) { console.log(reverseString('hi')) console.log("Expecting: 'ih'"); console.log("=>", reverseString('ih')); console.log("...
const router = require('koa-router')() const { login } = require('../controller/user') const { SuccessModel, ErrorModel } = require('../model/resModel') router.prefix('/api/user') router.post('/login', async function(ctx, next) { const { username, password } = ctx.request.body const user = await login(username, p...
const commentsReducer = (state = [], action) => { switch (action.type) { case "loadComments": if (action.comments === undefined) { return []; } // return { ...state, post: action.comments }; return { ...state, [action.postId]: action.comments }; default: return state; ...
function remainder(num1,num2) { return num1%num2; } console.log(remainder(1,3)); console.log(remainder(3,4)); console.log(remainder(-9,45)); console.log(remainder(5,5));
const APIError = require("./APIError"); class ServerError extends APIError { constructor(name, message, status) { let cname = "ServerError"; if (name instanceof Array) { name.push(cname); } else if (typeof(name) != "string") { name = cname; } else { ...
function Car(name, age) { this.name = name; this.age = age; this.drive = true; var welcome = "Welcome"; function fullInformation() { return name + " : " + age; }; this.welcome = function() { console.log(welcome + " : " + fullInformation()); } } var car = new Car("Mazda"...
const ArticleVerif = require('../../../db/ArticleVerif'), User = require('../../../db/User'), Com = require ('../../../db/commentaire') module.exports = { list: async (req, res) => { dbCom = await Com.find({ article_id: req.params.id }), Coms = dbCom.reverse() res.re...
/** * Author: Tyler Rimaldi * * Project: BottledUp * * Description: Server, API, and mongoDB config * */ /* Constants */ const express = require('express'); const app = express(); const parser = require("body-parser"); const assert = require('assert'); c...
var mongoose = require( 'mongoose' ); mongoose.Promise = global.Promise; var Schema = mongoose.Schema; var PostSchema = new Schema({ postTime: { type: Number, required: true }, username: { type: String, required: true }, endTime: { type: Number, required: true }, setup: { type: Schema.Types.Mixed, default: [] ...
import React from 'react'; import PropTypes from 'prop-types'; import './styles/whiteFlash.css'; export const WhiteFlash = ({ isShowWhiteFlash, whiteFlashClassName, whiteFlashTransitionClassName }) => { const flashDoTransition = isShowWhiteFlash ? whiteFlashTransitionClassName : ''; const flashClasses = `${whiteFl...
let areaCircle = (r) => { const PI = 3.14; return PI * r * r; } console.log(areaCircle(7)); let areaCircle = r => 3.14 * r * r; console.log(areaCircle(5));
//@flow import { GLView } from 'expo-gl'; import React from 'react'; import { PanResponder, PixelRatio } from 'react-native'; import PIXI from '../Pixi'; import { takeSnapshotAsync } from '../utils'; global.__ExpoSketchId = global.__ExpoSketchId || 0; type Props = { strokeColor: number | string, strokeWidth: num...
let [seconds, minutes, hours] = [0, 0, 0]; let timer; let pauseButton = document.getElementById('pause'); let resetButton = document.getElementById('reset'); let startButton = document.getElementById('start'); let timerElement = document.getElementById('timer'); startButton.addEventListener('click', () => { timer =...
function Navbar() { return( <ul className="uk-navbar-nav"> {/* <li className="uk-active"><a href="index.html">Home</a></li> */} </ul> ); } export default Navbar;
/* * @Descripttion: * @version: 1.0 * @Author: Ankang * @Date: 2021-05-25 21:31:10 * @LastEditors: Ankang * @LastEditTime: 2021-05-25 22:17:06 */ const router = require('express').Router() const { index, add, store, pages } = require('../../controller/admin/userController') // 列表 router.get('/index...
/* globals requester localStorage */ const HTTP_HEADER_KEY = "x-auth-key", KEY_STORAGE_USERNAME = "username", KEY_STORAGE_AUTH_KEY = "authKey"; var dataService = (function(){ function login(user) { return requester.postJSON("php/login.php", user) .then(respUser => { v...
/* 确认订单页面 */ const sessionKey = 'confirmOrder' const bestPlanKey = 'bestPlan' export const state = () => ({ // 商品列表 后期会有多个 productList: [], // 购物车最终结果 bestPlan: null }) export const mutations = { productUpdate(state, payload) { let data = payload.map(item => { // 商品最小购买数量 购买数量 return Objec...
import React from "react"; import { Backdrop, Box, Button, Card, CircularProgress, Dialog, DialogActions, DialogContent, DialogTitle, Divider, Fade, makeStyles, Modal, TextField, } from "@material-ui/core"; import moment from "moment"; import axios from "../api/index"; import { useSelector }...
export const operatorStart = { name: 'operatorStart', match: 'Operator{', onMatch: (match, program, context) => { context.push({name: 'operator'}) }, }
import React from 'react'; export const Task = (props) => { return ( <> { props.tasks.map(el => { return ( <div key={el.id} className="row p-4 bg-light border"> <h2 className="col-11">{el.name}</h2> ...
function scroll_about() { var about = document.getElementById("main-about"); about.scrollIntoView( { behavior: "smooth" }); } function scroll_portfolio() { document.querySelector('#main-portfolio').scrollIntoView( { behavior: "smooth" }); } function scroll_contact() { document.querySelector('#main...
import './Modal.css'; import React, { useState, useEffect } from "react"; import Popup from "reactjs-popup"; import { PernHeader, PernContent } from "./content/Pern"; import { InteractiveWebsiteHeader, InteractiveWebsiteContent } from "./content/InteractiveWebsite"; import { JavascriptGameHeader, JavascriptGameConten...
!(function (e) { 'use strict' function t(e, t, s) { return ( t in e ? Object.defineProperty(e, t, { value: s, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = s), e ) } function s(e) { for (let s = 1; s...
(function () { function padEnd( str, len, pad ) { len = len || 0; pad = pad || '0'; var tmp = []; if ( str.length > len ) return str; len = len - str.length; // 需要添加的数据 var count = Math.ceil( len / pad.length ); // 计算需要添加几组字符串 for ( var i = 0; i < count; i++ ) { tmp.push( pad ); } var padst...
import { disableCanvas, hideControls, enableCanvas, showControls, resetCanvas } from "./paint"; import { disableChat, enableChat } from "./chat"; const PLAY_TIME = 29; const board = document.getElementById("jsPBoard"); const notifs = document.getElementById("jsNotifs"); let countTime = PLAY_TIME; let interv...
import React from 'react' function SingleWorkStatsItem({statsPercent, statsTitle, statsDesc}) { return( <> <div className="col-6 single-stat-box anim-bot"> <h3>{statsPercent}<span>%</span></h3> <h6>{statsTitle}</h6> <p>{statsDesc}</p> ...
// 1. Declare and initialize an empty multidimensional array. // (Array of arrays) var num = [[],[],[]] // 2. Declare and initialize a multidimensional array // representing the following matrix: num[0] = [0,1,2,3] num[1] = [1,0,1,2] num[2] = [2,1,0,1] document.write(num[0]+"<br/>"+num[1]+"<br/>"+num[2]+"<br/>") ...