text
stringlengths
7
3.69M
/** * @file san-xui/x/forms/builtins/RadioSelect.js * @author liyuan */ import RadioSelect from '../../components/RadioSelect'; const tagName = 'ui-form-radioselect'; export default { type: 'radioselect', tagName, Component: RadioSelect, builder(item, prefix) { return ` <${tagNa...
import { useState } from 'react'; import Router from 'next/router'; import { Mutation } from 'react-apollo'; import gql from 'graphql-tag'; import Form from './styles/Form'; import formatMoney from '../lib/formatMoney'; import Error from './ErrorMessage'; const CREATE_ITEM_MUTATION = gql` mutation CREATE_ITEM_MUTATI...
var User = require('../user'); module.exports = function(req, res, next){ /*每个请求都以userId抽取数据库的user数据*/ // 提供给外部接口的 if (req.remoteUser) { res.locals.user = req.remoteUser; } // 当用户ID出现时,表明用户已经通过认证了,所以从Redis中取出用户数据是安全的。 // 借助session中间件, 读取缓存的通信记录, 获取userId var uid = req.session.uid; if (!uid) return...
const PREFIX = 'auth' // @todo standardize this export const AUTH_REQUEST = `${PREFIX}/AUTH_REQUEST` export const AUTH_USER = `${PREFIX}/AUTH_USER` export const AUTH_FAIL = `${PREFIX}/AUTH_FAIL` export const UNAUTH_USER = `${PREFIX}/UNAUTH_USER` export const GET_JWT_FAILURE = `${PREFIX}/GET_JWT_FAILURE` export const ...
const hours = document.getElementById("hour"); const minute = document.getElementById("minute"); const second = document.getElementById("second"); const progress = document.getElementById("progress"); function showCurrentTime() { let setDate = new Date(); let hr = setDate.getHours(); let min = setDate.ge...
function ProgressTrackingController (Datas, CurrentProject) { 'ngInject' let vm = this vm.currentProject = CurrentProject.getCurrentProject() vm.progressInfo = Datas.Progress._items ? Datas.Progress._items[0] : [] vm.launchInfo = Datas.LaunchCeremony.launch_ceremony vm.operationSurveyInfo = Datas.Operatio...
import model from '../db/models'; const { Users, Articles, Notifications, Reporting } = model; /** * Admin class functionality */ class AdminManager { /** * * @param {Object} req * @param {Object} res * @returns {Object} returns all users */ static async getAll(req, res) { try { const ...
const db = require('./db') db.sequelize.sync() .then( ()=>{ console.log("db sync ok") process.exit() }, (err)=>{ console.log('db sync error', err) process.exit() } )
import {gsap} from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); const snacksTL = gsap.timeline(); snacksTL.from("#snacks",{duration:4, x:-500}); export function snacksAnimation(){ ScrollTrigger.create({ // markers: true, animation: snacksTL, ...
var mini_menu = document.getElementById("mini-menu"); var list = mini_menu.getElementsByTagName("li"); var clear = function() { for (let i=0; i < list.length; i++) { list[i].style.right = "-99px"; mini_menu.style.height = "0"; } }; var dispose = function() { for (let i=0; i < list.length; i++) { list[i].style...
var producto_consumido_nuevo_counter = 0; //tiene que ser una variable global var maquina_utilizada_nueva_counter = 0; //tiene que ser una variable global var movilidad_utilizada_nueva_counter = 0; //tiene que ser una variable global var mano_obra_nuevo_counter = 0; //tiene que ser una variable global var tipo_tra...
const mongoose = require('mongoose'); const { ObjectId } = mongoose.Schema.Types; const offerSchema = new mongoose.Schema({ price: { type: Number, required: true }, shipingAddress:{ type:String, require:true }, userId: { type: ObjectId, ref: "User", ...
import React, { Component } from "react" import Button from './Buttonst' import Box from '@material-ui/core/Box' import Paper from '@material-ui/core/Paper'; import Grid from '@material-ui/core/Grid'; import { withStyles } from '@material-ui/core/styles'; import colorchange from "./colorchange"; import Title fro...
/* eslint-disable import/no-commonjs */ function generate(values, template) { const properties = Object.assign( {}, ...Object.keys(values).map((value) => { return template(value); }) ); return properties; } function generateCustomMedia(values, { namespace = '', hyphens = true } = {}) { cons...
// public filter variables let output = "Final Output"; let tags = ["no", "happy", "angry", "pepe"]; var variations = 10; const maxLenght = 20; const minLenght = 3; function filterInput(input) { output = input; //return input; if (output.length < minLenght) { return "To short"; } if (output.includes("...
// src/demo05.js // 类函数 - 装饰器 function log(target, name, descriptor) { console.log('log.target: ', target); console.log('log.name: ', name); console.log('log.descriptor: ', descriptor); } class App { @log onClientList() { console.log('App.onClientList'); } } const app = new App(); app.onClientList(...
import html from '/js/html.js'; let template = function() { return html` <header> <h1>Demo Project</h1> </header> <main></main> `; }; export default class App { render() { let dom = template(); return dom; } }
"use strict"; const ClientCnpj = use("App/Models/CnpjClient"); const Yup = use("yup"); class CnpjClientController { async index() { const data = await ClientCnpj.all(); return data; } async store({ request, response, auth }) { const schema = Yup.object().shape({ cnpj: Yup.string().required()...
// В конструкторе можно создавать новые тесты, для которых есть настройки // по умолчанию которые хранятся в переменной defaultSettings.Во время // создания теста, все или часть настроек можно переопределить, они хранятся // в переменной overrideSettings. // Для того чтобы получить финальные настройки теста, необходим...
import mongoose from "mongoose" const Schema = mongoose.Schema const ObjectId = Schema.Types.ObjectId let _schema = new Schema({ creator: {type: ObjectId, ref: 'User', required: true}, user: {type: ObjectId, ref: 'User', required: true}, board: { type: ObjectId, ref: 'Board', required: true } }, { timestamps: tr...
var express = require('express'); var router = express.Router(); var mongoose = require('mongoose'); var User = require('../models/User.js'); var Schedule = require('../models/Schedule.js'); // var riders = [ // { // name: "Van", // max: 15, // lat: 44.96804683, // lng: -93.22277069, // taking: [] // }, ...
import SelectData from './SelectData'; import { ROLES } from '../Roles'; export default class TreeData extends SelectData { constructor(displayObject, role, domIdPrefix) { super(displayObject, role, domIdPrefix); this._reactProps['aria-orientation'] = 'vertical'; } /** * @inheritdoc */ addChild(...
window.onload = function() { var btnSelect = document.getElementById("btn_select"); var curSelect = btnSelect.getElementsByTagName("span")[0]; var oSelect = btnSelect.getElementsByTagName("select")[0]; var aOption = btnSelect.getElementsByTagName("option"); oSelect.onchange = function() { var text = oSele...
import { UPDATE_EVENTS, GET_EVENTS_BY_ORG_PENDING, GET_EVENTS_BY_ORG_SUCCESS, GET_EVENTS_BY_ORG_FAILED, CREATE_EVENT_PENDING, CREATE_EVENT_SUCCESS, CREATE_EVENT_FAILED, } from '../actions/eventsByOrg' let eventsByOrgState = { isLoading: false, showError: true, all: [], selected: {}, created: {...
import React from 'react'; import { action } from 'mobx'; import { inject } from 'mobx-react'; import { Link } from 'react-router'; import { MenuItem } from 'material-ui'; @inject('ui') class BaseMenu extends React.Component { static propertyTypes = { module: React.PropTypes.any, }; constructor() { sup...
import { setIn } from 'immutable' // when editing, set post field on path to given value export default (state, action) => setIn(state, ['newPost', action.payload.path], action.payload.value )
function seleccionImagen(){ /* capturar un evento de selcceion por el id del checkbox */ const img1= document.getElementById("1").checked; const img2= document.getElementById("2").checked; const img3= document.getElementById("3").checked; const img4= document.getElementById("4").checked; ...
import React from "react"; import Dashboard from "./components/Dashboard"; import "./App.css"; import LoginForm from "./components/LoginForm"; import { AppBar, Toolbar, Typography } from "@material-ui/core"; // import NavBar from './components/NavBar' function App() { return ( <div className="App"> <AppBar...
'use strict'; import angular from 'angular'; import uirouter from 'angular-ui-router'; import jwtDecode from 'jwt-decode'; class Auth { constructor($http) { this.$http = $http; this.token = localStorage.getItem('jwt'); this.user = this.token && jwtDecode(this.token); } isAuth() { return !!thi...
var mongoose = require('mongoose'), Schema = mongoose.Schema, connection = mongoose.connection; var taskSchema = new Schema({ start: { type: Date }, finish: { type: Date }, hours: { type: Number }, person: { type: Schema.Types.ObjectId, ref: 'Person', required: true }, customer: { type: S...
import styled from 'styled-components' export const Wrapper = styled.div` position: relative; ` export const Input = styled.input` background: #191a21; border: 1px solid #101010; color: #f8f8f2; padding: 10px; width: 100%; `
/** * temporary database, changes applied here are updated after refresh. * Take Note: avoid similar ids. */ //[category,id,description,title,price,image_path] var item_list = [ ["cactus", 1, "The ‘Zebra Plant’ is a hardy, stemless succulent with a variety of vivid green color and white horizontal stripes.<br>...
import React from 'react'; import PropTypes from 'prop-types'; import Link from 'next/link'; import * as S from './styled'; const ButtonPrimary = ({ as, href, children, handleButtonClick, ...restProps }) => { if (as === 'a') { return ( <Link href={href} passHref> <S.ButtonPrimary as={as} ...
import React, { Component } from "react"; // import Fab from "@material-ui/core/Fab"; import Button from "@material-ui/core/Button"; // import CustomFab from "./layout/CustomFab"; class CustomButton extends Component { render() { return ( <div className="fabButtonDiv"> {/* <Fab disabled={...
import FlowTagsFooter from './FlowTagsFooter.jsx'; export default FlowTagsFooter;
import React, { Component } from "react"; import "./TabContent.css"; class TabContent extends Component { render() { return ( <div className="tabContent"> <div className="text_wrap"> <div className="tab_title">{this.props.title}</div> <div className="tab_text">{this.props.text}<...
const log = require('../helper/logHelper') const strHelper = require('../helper/strHelper') const dateHelper = require('../helper/dateHelper') const assert = require('assert') const moment = require('moment') const it_name = (v) => { return `${v[0]} == ${v[1]}` } const check_equal = (v, func) => { if (Array.isArr...
import styled from "styled-components"; export const Label = styled.label` color: #fff; font-size: 18px; `; export const Input = styled.input` border: 4px solid #fff; border-radius: 5px; padding: 10px 15px; background-color: transparent; color: #fff; font-size: 18px; `;
import React from "react"; import { View, StyleSheet, Dimensions, Image, Text, TouchableOpacity, ScrollView, ImageBackground } from "react-native"; import LinearGradient from "react-native-linear-gradient"; import ButtonIcon from "./ButtonIcon"; import ButtonRound from "./ButtonRound"; const CardW...
// ********************************************* // * logger // ********************************************* var Looger = function(module){ this.options = module.options; }; Looger.prototype = { debug : console.log } module.exports = Looger;
import {SubmissionError} from 'redux-form'; import jwtDecode from 'jwt-decode'; import {API_BASE_URL} from '../config'; import {normalizeResponseErrors} from './utils'; import {saveAuthToken, clearAuthToken} from '../local-storage'; export const SET_AUTH_TOKEN = 'SET_AUTH_TOKEN'; export const setAuthToken = authToke...
const Sequelize = require("sequelize"); module.exports = { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV1, primaryKey: true }, userName: { type: Sequelize.STRING }, firstName: { type: Sequelize.STRING }, lastName: { ...
const BASE_URL = "https://dataservice.accuweather.com"; const API_KEY = "KGbpl82jSGcs6sfPI0OXuZF5sAaNhBYB"; const search = document.getElementById("search"); search.addEventListener("submit", getWeatherForecast); function getWeatherForecast(event) { event.preventDefault(); const city = document.getElementById("ci...
/** * Created by Administrator on 2017/1/1 0001. */ // 原始写法 function func01() { console.log('func01'); } function func02() { console.log('func02'); } function func03() { console.log('func03'); }
/* fixture.js - fixtures to bridge between JS events and actor events The MIT License (MIT) Copyright (c) 2016 Dale Schumacher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restrictio...
export { SendFundsSearch } from './send-funds-search';
'use strict' const FirebaseAdmin = use('FirebaseAdmin') class UserController { async index ({ request }) { let pageToken = request.input('pageToken') let limit = parseInt(request.input('limit', 50)) return FirebaseAdmin.auth().listUsers(limit, pageToken).then(async (users) => { return users }) } as...
import { FETCH_MEMBER_LIST, FETCH_MEMBER_LIST_LOADING, FETCH_MEMBER_LIST_ERROR } from './memberList.actionType' import { database } from '../../firebase/firebase' import { searchUser } from '../userData/userData.actions' export const fetchMemberList = (lastNotified) => { return dispatch => { dispatch(fetc...
/** * */ (function() { countSum(); getTotalCost(); })(); function setCookie(c_name, value, expiredays) { var exdate = new Date(); exdate.setDate(exdate.getDate() + expiredays * 24 * 3600 * 1000); document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString(...
//bamazonCustomer.js var mysql = require("mysql"); var inquirer = require("inquirer"); var columnify = require('columnify'); let db_success = false; let prodCount = 0; var connection = mysql.createConnection({ host: "localhost", // Your port; if not 3306 port: 3306, // Your username user: "roo...
var ping = []; var download = []; var upload = []; for(var test of tests) { ping.push({ x: new Date(test.timestamp), y: test.ping }); download.push({ x: new Date(test.timestamp), y: test.download/1000000 }); upload.push({ x: new Date(test.timestamp), y...
/*************************************************** * 时间: 16/5/8 22:15 * 作者: zhongxia * 依赖: Zepto.js Util.js * 说明: 点读考试 (答题组件) * 1. 左右滑动, swiper * 2. 分为单选,多选,对错题 * 3. 自动判断是否答对 * 4. 自动记录是否已经答题 * ***************************************************/ function ExamShowList(selector, config) { this.selector = se...
export function getIndexDateFields(sinceDate, dayOffset) { const sinceDt = sinceDate || new Date(); if (dayOffset) { sinceDt.setDate(sinceDt.getDate() + dayOffset); } const parsableIndexDateStr = [ sinceDt.getFullYear(), (`0${sinceDt.getMonth() + 1}`).slice(-2), (`0${sinceDt.getDate()}`).slice...
import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; import styles from '../styles/globalStyle'; export default function(props) { return ( <View style={styles.postItContainer}> <Text style={styles.title}>{props.titulo}</Text> <Text style={styles.date}>{props.data}</Text>...
const Promise = require('bluebird'); const models = require('../../models'); // const obtainInformation = require('./obtainInformation'); const Sequelize = require('sequelize'); var { sequelize } = models; const courseMethods = {}; const Op = Sequelize.Op; courseMethods.addCourse = (info) => { info.filled = 0; ...
const SERVER = 'http://127.0.0.1:3000/'; export const ADMIN_LOGIN = SERVER + 'admin/login'; export const USER_LOGOUT = SERVER + 'user/logout'; export const ADMIN_COUNT = SERVER + 'admin/count';
'use strict'; /* Copyright 2017 - present Sean O'Shea 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...
var searchData= [ ['pics_5fdir',['PICS_DIR',['../struct_c_o_n_f.html#abc4633bb8e9a6a14e116abd19f2f391c',1,'CONF']]] ];
/* Copyright (c) 2020 Red Hat, Inc. */ 'use strict' import React from 'react' import { withRouter } from 'react-router-dom' import PropTypes from 'prop-types' import resources from '../../lib/shared/resources' import { Spinner } from '@patternfly/react-core' import { connect } from 'react-redux' import { updateSeconda...
var fs = require('fs'); var timeObj = readFile(); for (var site in timeObj) { var item = timeObj[site]; //convert to hours var hoursSpent = item.timeSpent / 60, roundedHours = Math.round(hoursSpent * 100) / 100; if (roundedHours !== 0 && roundedHours) { console.log('==========\n' + site + ': ' + roundedHou...
#pragma strict public var columnNumber : int; public var rowNumber : int; private var blackPiece : GameObject; private var whitePiece : GameObject; public var hostCoordinate : GameObject; public var stateOfSpot : Occupation; function Awake () { blackPiece = this.gameObject.transform.Find("BlackPiece").gameObject; ...
console.log("#S prod1111"); $(function () { $('#datetimepicker5').datetimepicker({ defaultDate: "11/1/2013", disabledDates: [ moment("12/25/2013"), new Date(2013, 11 - 1, 21), "11/22/2013 00:53" ] }); }); $("#btnProduce").click(function(event) { con...
import React from "react" import Translate from "../../components/Translate/Index" import playlist from '../../store/actions/general'; import { connect } from "react-redux" class Chat extends React.Component{ constructor(props){ super(props) this.state = { custom_url:props.custom_url, ...
import sTheme from "../../src/styledTheme"; import { NextSeo } from "next-seo"; import { makeStyles } from "@material-ui/core/styles"; import sizes from "../../src/sizes"; import { faStarOfLife, faChevronCircleRight } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawes...
/* ES6 offers three keywords for identifying or naming data: const let var These differ in scope, which determines which identifiers are accessible at different points in your program. As a general rule, try to declare your identifiers with const first. If you need to reassign: change the const to a let. If you ne...
module.exports = function(rootProcess, settings) { let Spawn = function(callback) { process.emit('process:spawn') process.argv.shift() let processName = process.argv.shift() let processParameters = process.argv let childProcess = $.lib.spawn( processName, processParameters, ...
const express = require("express"); const cors = require("cors"); const bodyParser = require("body-parser"); const mongoose = require("mongoose"); require("dotenv").config(); // create conection const uri = process.env.DB_PATH; // mongoDB connect mongoose.connect(uri, { useNewUrlParser: true, useUnifiedTopology: t...
/* * Auto Complete Script for Ultra Video Gallery 3 * By Pengcheng Rong (rongers@hotmail.com, service@bizmodules.net) * Copyright (c) 2009 Pengcheng Rong * All rights reserved, donot use this script library out of Ultra Video Gallery. */ function getItemTitleHtml(title) { if (title.indexOf("$")>0) { return "<t...
/* * UMG Slide Script for Ultra Media Gallery 6 * By Pengcheng Rong (rongers@hotmail.com, service@bizmodules.net) * Copyright (c) 2010 Pengcheng Rong * All rights reserved, donot use this script library out of Ultra Media Gallery. */ function umgSlide(source, dest) { if (source.substring(0,1)!="#") { source = ...
import React from 'react'; import {Link} from 'react-router'; import HomeStore from '../stores/HomeStore'; import HomeActions from '../actions/HomeActions'; import {first, without, findWhere} from 'underscore'; class Home extends React.Component { constructor(props) { super(props); this.state = HomeStore.getStat...
const express = require('express'); const router = express.Router(); const User = require('../models/user'); const catchAsync = require('../utils/catchAsync'); const passport = require('passport'); router.get('/register' , (req, res) => { res.render('users/register'); }); router.post('/register', ...
import "./invalid_graph_modal.html"; Template.invalid_graph_modal.events({ "click #continueEditingBtn": function () { $("#invalidGraphModal").modal("hide"); } });
SinglePayView = React.createClass({ mixins: [ReactMeteorData], getMeteorData: function() { return { thisPay: PayStubs.findOne({_id: this.props.thisID}), }; }, enterEditMode: function() { Meteor.call("setModeAndEditID", "reviewPay", this.props.thisID); }, render: function() { var pay = ...
module.exports = `//#version 300 es //https://www.desultoryquest.com/blog/drawing-anti-aliased-circular-points-using-opengl-slash-webgl/ //#extension GL_OES_standard_derivatives : enable // https://www.desultoryquest.com/blog/drawing-anti-aliased-circular-points-using-opengl-slash-webgl/ // https://www.desultoryquest...
let description = document.querySelectorAll('.keys-main__description'); [].forEach.call(description, function(el) { el.querySelector('.keys-main__description-show').addEventListener('click',function () { closeTab(el) }) }); function closeTab(el) { if (el.classList.contains('close')){ el.cl...
/* * 坦克属性类 */ function tank_property(par){ this.name = '';//名字 this.hp = 0;//生命值 this.atk = 0;//攻击力 this.def = 0;//防御力 this.sp = 0;//移动速度 this.sd = 0;//攻击距离 this.dv = 0;//视野距离 this.tag = 0;//炮台角度 this.x = 0;//x轴坐标 this.y = 0;//y轴坐标 this.z = 0;//z轴坐标 this.face = 0;//坦克朝...
const db = require('../db'); const DaoManager = require('./dao-manager'); module.exports = { connect: () => { return new Promise(async (resolve, reject) => { try { const dbConnection = await db.getConnection(); resolve(new DaoManager(dbConnection)); ...
import React, {Component} from 'react'; import { Platform, StyleSheet, Text, View, Modal, Alert, Dimensions, Image, ScrollView, TouchableWithoutFeedback } from 'react-native'; var {width,height} = Dimensions.get('window'); import Header from "../CommonModules/Header"; import px2d...
import { connect } from 'react-redux'; import { hashHistory } from 'react-router'; import { fetchBookmarks, fetchBookmarksSuccess, fetchBookmarksFailure } from '../actions/bookmarks'; import { deleteBookmark, deleteBookmarkSuccess, deleteBookmarkFailure } from '../actions/bookmarks'; import { updateBookmark, updateBook...
/** * Created by smoseley on 12/14/2015. */ (function(){ angular .module('home',[]); })();
import * as React from 'react'; import { styled, alpha } from '@mui/material/styles'; import AppBar from '@mui/material/AppBar'; import Box from '@mui/material/Box'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import InputBase from '@mui/material/InputBase'; import Se...
import { all } from 'redux-saga/effects' import booksSagas from './books' import securitySagas from './security' import dashboardSagas from './dashboard' export default function* rootSaga () { yield all([ ...booksSagas, ...securitySagas, ...dashboardSagas ]) }
module.exports = function getShortMessages(messages) { var array = []; messages.forEach(function (object) { if (object.message.length < 50) { array.push(object.message); } }); return array; };
var ID = 0 document.getElementById('btn').addEventListener('click',function(){ htmlcode = '<h3 id="%id%">%name%</h3>' name = document.getElementById('name').value htmlcode = htmlcode.replace('%name%',name) ID = ID + 1 htmlcode = htmlcode.replace('%id%',ID) document.querySelector('.main...
import {ButtonBase} from "@material-ui/core"; import styled from "styled-components"; const ParagraphPrimitive = function ({liveMode, renderDynamicText, dynamicText, staticText, bottomMargin, ...props}) { return <p {...props}>{props.children}</p>; }; const StyledParagraph = styled(ParagraphPrimitive)` margin-top:...
import React from "react"; import "./Sidebar.css"; import LineStyleIcon from "@material-ui/icons/LineStyle"; import TimelineIcon from "@material-ui/icons/Timeline"; import TrendingUpIcon from "@material-ui/icons/TrendingUp"; import PersonOutlineIcon from "@material-ui/icons/PersonOutline"; import MonetizationOnIcon fro...
import React from 'react'; import ReactDOM from 'react-dom'; import App from '../App'; describe('Test suite',()=>{ it('App component is displaying Button', () => { const div = document.createElement('div'); var renderer = ReactDOM.render(<App />, div); let tree = {"x":"y"}; jest.mock('../components/com...
var CT = require('./modules/country-list'); var AM = require('./modules/account-manager'); var EM = require('./modules/email-dispatcher'); var IM = require('./modules/image-manager'); var BM = require('./modules/blog-manager'); var CL = require('./modules/category-list'); var RS = require('./modules/recommendation-mana...
import React, { Component } from 'react' import PropTypes from 'prop-types' class DeleteItem extends Component { render() { return( <div> <button disabled={this.props.deleteDisabled} onClick={this.props.deleteLastItem}>Delete Last Item</button> </div> ) } ...
//register_doit(); local_get(["sync", IP, Port]); variable_get(["channel_keys"], function(x) {register_doit(x)}); function register_doit(x) { if (typeof x == 'undefined'){ setTimeout(function() {variable_get(["channel_keys"], function(x) {register_doit(x)});}, 1000); } else if ( ( x.length == 1 ) && ( x.pop() ...
import { Flex } from "@chakra-ui/layout"; import React, { useState, useEffect } from "react"; import { Box, useBreakpointValue, Text, Stack, Spinner, Center, SlideFade, Alert, AlertIcon, AlertTitle, AlertDescription, SimpleGrid, } from "@chakra-ui/react"; import { FaCheckDouble, FaDollarSign...
/** Reducer which service some user experience */ const TOGGLE_GLOBAL_PRELOAD = 'TOGGLE_GLOBAL_PRELOAD' let initialState = { /** Show global preloader while fetching some data or passing connect generation*/ isGlobalPreloader:false } const preloadReducer = (state = initialState, action) => { switch (ac...
import PropTypes from 'prop-types'; const { shape, arrayOf, number, string, func, bool } = PropTypes; // ========= functions ======= export const onSubmitType = func; export const addToCartStartType = func; export const onClickType = func; export const searchByTitleType = func; export const filterByPriceType = func;...
export const NetworkType = { Webaverse: "webaverse", Mainnet: "mainnet" };
import React from 'react' import { StyleSheet } from 'quantum' import { ArrowIcon } from 'bypass/ui/icons' const styles = StyleSheet.create({ self: { border: '1px solid #e0e0e0', borderRadius: '50%', width: '27px', height: '27px', display: 'inline-block', boxSizing: 'border-box', '& svg':...
import React from 'react'; import ReactDOM from 'react-dom'; import SzopinskiCalendar from './components/SzopinskiCalendar'; ReactDOM.render( <React.StrictMode> <SzopinskiCalendar /> </React.StrictMode>, document.getElementById('root') );
'use strict'; const {app, BrowserWindow, ipcMain} = require('electron'); let mainWindow = null; // keep reference to prevent GC. /** * Create Render window */ function createWindow() { const url = `file://${__dirname}/index.html`; mainWindow = new BrowserWindow({ show: true }); !process.env.production &...
var gulp = require('gulp'); var sass = require('gulp-ruby-sass'); gulp.task('sass', function(){ return sass('src/sass/core.scss') .on('error', sass.logError) .pipe(gulp.dest('dest/styles')); }); gulp.task('default', ['sass']);
$(document).ready(function() { $('.do').hide() $('.linode').hide() $('.local').show() }); $('.provider_select').on('change', function() { var selection = this.value console.log("it changed") switch(selection) { case 'local': $('.do').hide() $('.linode').hide() ...
const navCenter = document.querySelector(".nav-center"); const toggle = document.querySelector(".close"); const signUp = document.querySelector(".signUp"); toggle.addEventListener("click", () => { navCenter.classList.toggle("active"); }); window.addEventListener("scroll", () => { if (window.scrollY > 200) { na...