text stringlengths 7 3.69M |
|---|
//导入配置选项
pz = require("./myconfig.js");
//导入第三方模块
const http = require('http');
const socket_io = require('socket.io');
//导入自己写的模块
const app = require("./app.js");
const db = require("./db.js");
const server = http.createServer(app);
const io = socket_io.listen(server);
//用于保存所有的用户账户和对应的socket
var sockets = {};
//即... |
// Copyright: All contributers to the Umple Project
// This file is made available subject to the open source license found at:
// http://umple.org/license
//
// Actions in the VML online tool
// TODO needs maintenance
Action = new Object();
Action.waiting_time = 1200;
Action.oldTimeout = null;
Action.newAss... |
export default class Player {
constructor(nickname, x, y) {
this.nickname = nickname;
this.x = x;
this.y = y;
}
moveRight() {
this.x += 1;
}
moveLeft() {
this.x -= 1;
}
moveUp() {
this.y -= 1;
}
moveDown() {
this.y += 1;
}
}
|
import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import DashboardLayout from '../Project';
import Dashboard from '../Project/Project';
import AddReport from '../AddNewReport';
const dashboardRoutes = [
{
path: '/dashboard',
layout: DashboardLayout,
component: Dashbo... |
import React from 'react';
import { BrowserRouter, Switch, Route, Redirect } from 'react-router-dom';
import Home from './containers/Home/Home'
import Register from "./containers/Auth/Register";
import Login from "./containers/Auth/Login";
import AuthContextProvider from "./contexts/AuthContext";
import Company from ".... |
jQuery(function($) {
var elems = $('.twitter_default_checkbox', $('.WF_twitter_widget_config')),
fields = function() {
elems = $('.twitter_default_checkbox', $('.WF_twitter_widget_config'));
elems.off().on('change', function() {
fields();
});
... |
/**
* Created by Administrator on 2015.12.08..
*/
hospitalNet.config(function(entityDefinitions){
entityDefinitions.raktariTargy = {
table: 'targyak',
entity: 'targy',
dataFields: {
tipus: {
desc: 'Típus',
type: 'select',
options:... |
import { TRACEID_GPU_TIMINGS } from "../../core/constants.js";
import { Debug } from "../../core/debug.js";
import { Tracing } from "../../core/tracing.js";
/**
* Base class of a simple GPU profiler.
*/
class GpuProfiler {
/**
* Profiling slots allocated for the current frame, storing the names of the slots... |
import "./styles/about.scss";
export default function About() {
return (
<div className="about" id="about">
<head>
<meta charset="utf-8"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
<meta name="viewport" content="width=devi... |
import React from 'react';
import { observer } from 'mobx-react';
const Dashboard = ({ store }) => {
return (
<div>
<p id="reviewCount">{store.reviewCount}</p>
<p id="averageScores">{store.averageScore}</p>
</div>
);
};
export default observer(Dashboard);
|
import React from 'react'
import FullscreenDialog from '.'
export default {
title: 'Fullscreen Dialog',
component: FullscreenDialog,
}
export const SimpleFullscreenDialog = () => {
const [open, setOpen] = React.useState(false)
function handleOpen() {
setOpen(true)
}
function handleClose() {
set... |
module.exports = function UserFunc(sequelize, DataTypes) {
const User = sequelize.define('User', {
id: { type: DataTypes.BIGINT(8).ZEROFILL, autoIncrement: true, primaryKey: true, unique: true, allowNull: false },
email: { type: DataTypes.STRING, unique: true, allowNull: false },
passwordDigest: { type: D... |
const router = require('express').Router();
const choreSchema = require('../models/chores.js');
const authCheck = require('../middleware/authCheck');
router.get('/chore/mychores', (req, res) => {
choreSchema.find({posterId: req.user._id}, (err, foundChores) => {
if(err){
console.log(err);
... |
const fitCardsSlider = document.querySelector('.cards-container');
function slider() {
if (window.innerWidth <= 768) {
if (fitCardsSlider.classList.contains('slick-initialized')) {
} else {
$('.cards-container').slick({
centerMode: true,
centerPadd... |
/**
* Custom agent prototype
* @param {String} id
* @constructor
* @extend eve.Agent
*/
function DialogAgent(id, app) {
// execute super constructor
eve.Agent.call(this, id);
this.app = app;
// connect to all transports configured by the system
this.connect(eve.system.transports.getAll());
}
... |
var COLORS = ["#ffffff", "#fae0d2", "#e9a188", "#d56355","#CC0033", "#bb3937", "#772526", "#663300", "#480f10"];//图例里的颜色
USAMap();
//const Rooturl = 'localhost:8080';
function USAMap() {
var myChart = echarts.init(document.getElementById("USAMap"), 'style');
$.get('data/USA.json', function (usaJson) {
... |
import {
ADD_TODO,
UPDATE_TODO,
RESET_TODOS,
FETCH_TODOS_START,
FETCH_TODOS_SUCCESS,
FETCH_TODOS_FAILURE
} from '../actionTypes'
const initialState = {
data: [],
loading: false,
error: null
}
export default function todosReducer(state = initialState, action) {
switch (action.type) {
case FETCH... |
document.getElementById('user_input').value = " ";
document.getElementById('user_input').focus();
function onPress_ENTER()
{
var keyPressed = event.charCode || event.which;
//if ENTER is pressed
if(keyPressed==13)
{
incre();
keyPressed=null;
}
... |
#!/usr/bin/env node
const { Stellar, server, TimeoutInfinite } = require("./lib/sdk");
const { alicePair, escrowPair } = require("../pairs.json");
const fundEscrow = async () => {
const aliceAccount = await server.loadAccount(alicePair.publicKey);
const txOptions = {
fee: await server.fetchBaseFee()
};
... |
import React, { useState } from "react";
import PropTypes from "prop-types";
import clsx from "clsx";
import { makeStyles } from "@material-ui/styles";
import { Icon, CircularProgress } from "@material-ui/core";
import { FileUpload } from "@components";
const useStyles = makeStyles({
disabled: {
opacity: 0.5,
... |
// Bài tập 4 : Tính tiền cáp
var loaiKH = document.getElementById("loaiKH");
window.onload = function () {
if (loaiKH.value === "nhaDan") {
document.getElementById("soKetNoi").disabled = true;
}
};
loaiKH.addEventListener("change", anHien);
function anHien() {
if (loaiKH.value === "nhaDan") {
document.get... |
const express = require('express');
const router = express.Router();
const Employe = require('../models/Employe');
const Person = require('../models/Person');
const User = require('../models/User');
const passport = require('passport');
const { isAuthenticated } = require('../helpers/auth');
router.get('/users/signin'... |
import React from 'react';
import Group from '../Group';
describe('Checkbox Group', () => {
const subject = props => global.mountStyled(<Group {...props}>children</Group>);
it('renders a legend correctly', () => {
const wrapper = subject({ label: 'test-label' });
expect(
wrapper
.find('legen... |
import factorialize from './factorialize';
describe('factorialize()', () => {
it('factorialize(5) should return a number', () => {
const expected = typeof factorialize(5);
const actual = 'number';
expect(expected).toBe(actual);
});
it('factorialize(5) should return 120', () => {
const expected ... |
/**
* Created by liu 2018/6/5
**/
import React, {Component} from 'react';
import {storeAware} from 'react-hymn';
import {Spin, Layout, message} from 'antd';
import TableView from '../../components/TableView'
import Breadcrumb from '../../components/Breadcrumb.js'
import OrderAppealPageSearch from '../../components/S... |
import { combineReducers, createStore , applyMiddleware} from "redux";
import thunk from 'redux-thunk'
import gridReducer from '../features/Grid/reducer';
//gabungkan reducers
let rootReducers = combineReducers({
grid : gridReducer // memberikan nama state grid untuk grid reducer
});
let store = createStore(ro... |
'use strict'
const Config = use('Config')
const ResponseHelper = use('ResponseHelper')
const GuarantorRepository = use('GuarantorRepository')
class BrowseController {
async browse ({ response, transform }) {
// Process
let guarantors = await transform.collection(GuarantorRepository.browse(), 'GuarantorTrans... |
var mongoose = require('mongoose');
var TaskSchema = new mongoose.Schema({
name: { type: String, required: true},
content: String,
complete: { type: Boolean, required: true},
due_date: { type: Date},
default_due_date: { type: Number},
completed_date: Date,
phase_id: { type: String, required: true},... |
! function() {
function t(t) {
this.element = t, this.width = this.boundingRect.width, this.height = this.boundingRect.height, this.size = Math.max(this.width, this.height)
}
function i(t) {
this.element = t, this.color = window.getComputedStyle(t).color, this.wave = document.createElement... |
var searchData=
[
['debug_5ftype_5ft',['DEBUG_Type_t',['../group___debug___exported___types.html#gacb1775677105967978fae4d9155cca26',1,'debug.h']]],
['debug_5fuart_5fstatus_5ft',['Debug_Uart_Status_t',['../group___debug___uart___exported___types.html#ga334c43797179106e55aa97a2d7fe2e78',1,'debug_uart.h']]],
['dl_5... |
import styled from 'styled-components';
const Select = styled.select`
flex-direction: row;
align-items: center;
display: flex;;
padding: 2px 8px 2px 8px;
width: 100%;
height: 100%;
border: none;
appearance: none;
font-size: 16px;
line-height: 1.5;
outline:none;
`;
expor... |
'use strict'
import File from '../../src/classes/File'
import { assert } from 'chai'
describe('File', function () {
it('should be able to instantiate a file instance', function () {
const file = new File({
upload: {}
})
assert.instanceOf(file, File)
})
it('should set instance properties from ... |
import React from 'react';
import './DateFilter.scss'
import { FilterContext } from './FilterContext';
class DateFilter extends React.Component {
constructor(props) {
super(props)
this.dateFormat = new Intl.DateTimeFormat('default', { month: 'numeric', day: 'numeric' });
}
DATE = /^[0-9]... |
import { XIcon } from "@heroicons/react/solid"
import Head from "next/head"
import { useRouter } from "next/router"
import Header from "../components/Header"
function failed() {
const router = useRouter()
return (
<>
<Head>
<title>Payment Failed | Amazon</title>
<link r... |
global.jQuery = require('jquery');
global.$ = global.jQuery;
// var exampleModule = require('./exampleModule.js')();
|
const Riwayat = () => {
return(
<div>
<h1>you are in Riwayat</h1>
</div>
)
}
export default Riwayat; |
export const Books = [
{
id: 1,
img:
"https://images-na.ssl-images-amazon.com/images/I/91uwocAMtSL._AC_UL200_SR200,200_.jpg",
title: "A Promised Land",
author: "Barack Obama"
},
{
id: 2,
img:
"https://images-na.ssl-images-amazon.com/images/I/81Kc8OsbDxL._AC_UL200_S... |
import React, {Component} from 'react';
import CommentsForm from '../../components/CommentsForm/CommentsForm.component';
import CommentsList from '../../components/CommentsList/CommentsList.component';
import TextSection from '../../components/Text-Section/Text-Section.component';
import { StyledArticle, StyledArticleC... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ui_1 = require("./ui");
exports.data = {};
SupClient.i18n.load([{ root: `${window.location.pathname}/../..`, name: "searchEditor" }], () => {
exports.socket = SupClient.connect(SupClient.query.project);
exports.socket.on("connect... |
import dotenv from 'dotenv'
dotenv.config({ silent: true })
const envVar = {
nodeEnv: process.env.NODE_ENV,
port: process.env.PORT,
secret: process.env.SESSION_SECRET,
database: process.env.MONGODB_DEV,
databaseTest: process.env.MONGODB_TEST,
}
export default envVar |
export default function reducer(state = {
id: null,
username: null,
password: null,
firstName: null,
lastName: null,
role: null,
token: null,
isAuthenticated: false,
isAuthenticating: false,
statusText: null,
fetched: false,
error: null
}, action) {
switch (action.ty... |
// Bee class
EnemyBee = function(_game, _x, _y){
// create the enemy bee
Phaser.Sprite.call(this, _game, _x, _y, 'enemy');
_game.add.existing(this);
_game.physics.arcade.enable(this);
// make it play and move
this.body.enable = true;
this.body.collideWorldBounds = true;
this.body.setSize(45, 80, 2, -12);
thi... |
// ! *******************************************************************************************************************
// ! products page
const trWrapper = document.getElementById("trWrapper");
const productFilterCheckboxes = document.querySelectorAll(
".ProductListingPage_FilterCheckbox input"
);
const productCou... |
(function() {
'use strict';
angular.module('experiment')
.controller('CircleController', CircleController);
function CircleController() {
this.radius = null;
}
}());
|
import React, { Component } from "react";
import SelectCountry from "./SelectCountry";
import Divider from "./Divider";
import SearchTopic from "./SearchTopic";
import NewsCard from "./NewsCard";
import HeadLogo from "./HeadLogo";
import Loader from "./Loader";
import NoNewsCard from "./NoNewsCard";
class App extends ... |
import jwt from 'jsonwebtoken';
import dotenv from 'dotenv';
import chai from 'chai';
import chaiHttp from 'chai-http';
import fs from 'fs';
import index from '../src/index';
dotenv.config();
chai.use(chaiHttp);
chai.should();
chai.expect();
const payload = {
username: 'testUser',
email: 'test@gmail.com',
ro... |
angular.module('template.AboutUs', []); |
ricoApp.controller('AppInfoControll',function($scope,$cordovaDevice,IndexedDb, GoogleAuth){
function init(){
persistentType();
console.log("initializing device");
try {
document.addEventListener("deviceready", function () {
$scope.available = $cordovaDevice.getDevice().available;
... |
console.log(process);
console.log(console); |
import {
Card,
CardMedia,
CardContent,
Typography,
CardActions,
Button
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import AddToCart from "./AddToCart";
import DeleteFromCart from "./DeleteFromCart";
import {useHistory} from "react-router"
const useStyles = makeStyles(... |
// ----------------------------------------------------------------------------
//
// stream-transform-json2data.js
//
// Copyright © 2013 Andrew Chilton <andychilton@gmail.com>.
//
// License: http://chilts.mit-license.org/2013/
//
// ----------------------------------------------------------------------------
var ut... |
// Quiz on India- Assignment 2 for Level 1
var readlineSync=require("readline-sync");
var chalk=require("chalk");
var score=0;
console.log(chalk.red.bold('\nWelcome To How Well Do You Know India Quiz'));
var userName=readlineSync.question(chalk.hex('#FFA500').bold("What's Your Name ? "));
console.log(chalk.hex("#f5... |
$(function(){
$('#type').bind('change', function(){
tipo = $('#type').val();
if (tipo == 'C') {
$('#customer').fadeIn();
} else {
$('#customer').fadeOut();
}
});
}); |
//handles twitter api authentication
function authenticate(val) {
var TWITTER_CONSUMER_KEY = '';
var TWITTER_CONSUMER_SECRET = '';
// Encode consumer key and secret
var tokenUrl = "https://api.twitter.com/oauth2/token";
var tokenCredential = Utilities.base64EncodeWebSafe(
TWITTER_CONSUMER_KEY + ":" + T... |
import {PolymerElement, html} from 'https://unpkg.com/@polymer/polymer@next/polymer-element.js?module';
class MyApp extends PolymerElement {
static get properties() { return { mood: String }}
static get template() {
return html`
<style> .mood { color: green; } </style>
Web Components APP are <spa... |
myApp.controller('HomepageController', ['$scope', 'pointOfInterestService', '$location', 'myLocalStorageService',
'loginService', '$q', '$rootScope',
function ($scope, pointOfInterestService, $location, myLocalStorageService, loginService, $q,
$rootScope) {
$scope.getPOI = function () {
... |
module.exports = {
dest: 'dist',
base: '/interviewBooks/',
title: '面试宝典',
description: '把面试的知识点整合一遍',
themeConfig: {
nav: [],
sidebar: [
{
title: 'css篇:',
collapsable: false,
children: [
'css/',
'css/bfc',
'css/css3',
'css/compatibl... |
/* eslint-disable */
import React, { useState, useEffect } from "react";
import LoadingOverlay from "react-loading-overlay";
import { useSelector, useDispatch } from "react-redux";
import { SpinnerCircular } from "spinners-react";
import {
getProductsAPICreator,
selectProductCreator,
resetStatusCreator,
resetPr... |
export function clearError() {
return {
type: "ERROR_CLEAR",
payload: {}
}
}
|
/**
* L-Systems
*
* JavaScript Canvas 04/03/09
* @author Kevin Roast kevtoast at yahoo.com
* Updated: 16th July 2012
*
* TODO:
* . more colour options
* . inc/dec iterations buttons
*/
/**
* Globals and helper functions
*/
var HEIGHT;
var WIDTH;
var g_renderer;
var g_commands;
/**
* Window body onload... |
'use strict';
let fs = require('fs');
let quoteObj = require('../lib/quotes.json');
module.exports = (app) => {
console.log('router called');
// let index = require('../controllers/api.server.controller');
// Get Tadays Quote
app.get('/todaysquote', (req, res) => {
let quoteArr = quoteObj.quotes;
/... |
var html = require('choo/html')
module.exports = function headerView (state, emit) {
return html`
<header class="header">
<h1>todos</h1>
<input class="new-todo"
autofocus
placeholder="What needs to be done?"
onkeydown=${addTodo}
/>
</header>
`
function addTodo (... |
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
const path = require('path');
const baseConfig = require('../../webpack.config');
module.exports = baseConfig({
entry: {
index: './test'
},
context: path.join(__dirname, 'src'),
output: {
path: path.... |
import Vue from 'vue'
import VueRouter from 'vue-router'
// const shopcart=()=>import shopcart from ""
// 注意这里导入时候和普通的es6写法的区别
const Shopcart=()=>import ("../views/shopcart/Shopcart")
const Category=()=>import ("../views/category/Category")
const Home=()=>import ("../views/home/Home")
const Profile=()=>import ("../vie... |
// $Id$
// vim:ft=javascript
// If your extension references something external, use ARG_WITH
// ARG_WITH("cckeyid", "for cckeyid support", "no");
// Otherwise, use ARG_ENABLE
// ARG_ENABLE("cckeyid", "enable cckeyid support", "no");
cckeyid_source_file="cckeyid.c \
src/cckeyid.c \
src/shm.c \
... |
var
User = require('../models/User.js'),
passport = require('passport'),
async = require('async'),
crypto = require('crypto'),
nodemailer = require('nodemailer')
module.exports = {
home: function(req, res){
res.render('home')
},
error404: function(req,res){
res.render('404')
}
}
|
/* globals describe it expect */
import easingFunction from '../src/easing-function'
describe('easing-function', () => {
it('should throw if easing string is not found', () => {
expect(() => easingFunction('potato')).toThrow(
`Easing must match one of the options defined by https://github.com/chenglou/twe... |
import {combineReducers} from 'redux';
import { routerReducer} from 'react-router-redux';
//TODO : add reducers
const rootReducer = combineReducers({
//reducers
routing: routerReducer
});
export default rootReducer; |
import React from "react";
import "./footer.css";
import { Link } from "gatsby"
const Footer = () => (
<footer className="footer">
<div className="width footer-container">
<Link className="header-li-a" to='/'>Плеханова и Ⓒ</Link>
<nav>
<ul className="footer-ul">
{/*<li className="footer-li">VK<... |
import React from 'react';
import Button from './Button';
const TodoListSummary = ({
remaining,
filter,
onSetFilter,
onClearCompleted }) => {
let word = remaining.length === 1 ? 'item' : 'items';
return (
<div className="TodoList__summary">
<div>
{remaining.length} {word} left
</... |
/**
* 国家列表
*/
const COUNTRIES = {
country1: {
name: "中国",
provinces: {
province1: "北京市",
province2: "上海市",
province3: "天津市",
province4: "重庆市",
province5: "河北省",
province6: "山西省",
province7: "陕西省",
provi... |
var employmentController = candidateInformation.controller("employmentController", ['$scope', 'cifService', '$state', function ($scope, cifService, $state) {
$scope.candidate = {};
angular.copy(cifService.candidate, $scope.candidate);
if (angular.isUndefined($scope.candidate.employmentDetails)) {
... |
/* ============
* State of the cars module
* ============
*
* The initial state of the cars module.
*/
import { today } from '@/helpers/utils'
export default {
cars: [],
bookedCars: [],
maxSpeedItems: [],
runItems: [],
speedValue: null,
runValue: null,
isLoading: false,
currentDate: today(... |
(function () {
var replayModule = angular.module('gameReplay', ['ngCookies']);
replayModule.controller('replayController', ['$scope', '$http', '$cookies', '$window', '$timeout', '$interval',
function ($scope, $http, $cookies, $window, $timeout, $interval) {
$scope.renderer = {};
... |
import mongoose from 'mongoose'
// Defining user Mongoose Schema
const UserAuditSchema = new mongoose.Schema({
actionBy: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
unique: false,
required: false,
dropDups: true
},
actionFor: {
type: mongoose.Schema... |
import {createContext} from 'react'
// Tracks if game has ended or not.
const GameContext = createContext(false);
export default GameContext; |
/*--------------------------------------------
Author: © - Anna Drevikovska | 2016-03-12 | ver. 1.0.0
Changing sizes of the logo on mouseover and mouseleave mouse events when the browser width
is 650 or more
Not used! Only kept for possible later usage or updates
---------------------------------------------*/
if ($(... |
(function ($,X) {
X.prototype.controls.widget("Uploader", function (controlType) {
var BaseControl = X.prototype.controls.getControlClazz("BaseControl");
function Uploader(elem, options){
BaseControl.call(this,elem,options);
this.init();
}
X.prototype.cont... |
import gql from 'graphql-tag';
export const getVacancy = gql(`
query getVacancy($id: String!) {
vacancy(id: $id) {
id,
title,
pda,
questions {
field,
type,
label,
settings,
requir... |
(() => {
'use strict';
angular
.module('radarApp')
.component('inputAddon', {
bindings: {
size: '@',
name: '@',
placeholder: '@',
measure: '@',
readonly: '<',
model: '=',
change: '&'
},
templateUrl: 'common/components/templates/input-addon-template.html'
});
})(); |
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
// ad... |
module.exports = (bh) => {
bh.match('footer', (ctx) => {
const gateUrl = 'http://school9.perm.ru/gate/login/';
const formsUrl = 'https://school9.perm.ru/sicamp-reg/forms/';
ctx.param('sections', [
{
title: 'Информация',
items: [
... |
const express = require('express')
const router = express.Router({ mergeParams: true });
const service = require('./index')
const userApiData = require('../userApiData')
router.post('/users/search', (req, res) => {
// throw new Error('judicial ref data /refdata/judicial/users/search not implemented')
//... |
const PERM = {
IP_RO: 0,
IP_WO: 1,
IP_RW: 2,
};
const PROP_STATE = {
IPS_IDLE: 0,
IPS_OK: 1,
IPS_BUSY: 2,
IPS_ALERT: 3,
};
const RULE = {
ISR_1OFMANY: 0,
ISR_ATMOST1: 1,
ISR_NOFMANY: 2,
};
const SWITCH_STATE = {
ISS_OFF: 0,
ISS_ON: 1,
};
const buildDevice = (properties) => {
if (!propertie... |
import userReducer from "./UserReducer";
import editCategoryLimitReducer from "./EditCategoryLimitReducer";
import { combineReducers } from "redux";
import SafesReducer from "./SafesReducer";
import GetTransactionReducer from './GetTransactionReducer'
import LimitFirstReducer from "./LimitFirstReducer";
import profileR... |
// imports
var app = require('express')()
var fs = require('fs')
const env = require('./EnvConst.js')
const http = require('http')
const https = require('https')
const DB = require('./Constants.js')
// config server
//--------------------
var server = env.https ?
https.createServer({
key: fs.readFileSync('certs... |
import React, { useEffect } from "react";
import { Text, View, StyleSheet, ScrollView, LogBox, Button } from "react-native";
import { useSelector } from "react-redux";
import DonorsList from './../components/donorsList';
const FilteredDonorsPage = () => {
const donors = useSelector((state) => state.blood.filteredDon... |
const Mock = require('mockjs');
// mock只有一级搜索分类的数据
const templateOne = {
'activityList|8-21': [
{
'id|15': /[0-9]/,
title: '@ctitle(3,7)',
picPath: /https:\/\/picsum\.photos\/200\/200\/\?image=\d{3}/,
'goodsList|1-5': [
{
'... |
import React from "react";
import { useSelector } from "react-redux";
import { Container, Ul, Li, UlList } from "./style";
import PostModal from "../postModal";
import NoPostsFound from "./NoPostsFound";
import PostCard from "../postCard";
import PostThumbnail from "../postThumbnail";
import PostList from "../postLis... |
const Mock = require("mockjs");
const Random = Mock.Random;
// 设置全局延时 没有延时的话有时候会检测不到数据变化 建议保留
Mock.setup({
timeout: "300-600",
});
const swiperData = Mock.mock({
"list|1-10": [
{
"id|+1": 2,
imageUrl: Random.image("375x200"),
},
],
});
const goodListData = Mock.mock({
"list|20": [
{
... |
import React from 'react';
import styled from 'styled-components';
const ResourceSubH = styled.div`
max-width: fit-content;
margin: 10px;
padding:10px;
border:${props=>props.Border ? props.Border : "5px solid #2F52E0"};
border-radius:25px;
display:flex;
justify-content:center;
align-ite... |
import React, {useState} from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
Button,
FlatList,
TouchableWithoutFeedback,
Keyboard,
} from 'react-native';
import Icon from 'react-native-vector-icons/dist/FontAwesome';
import {Formik} from 'formik';
import * as Yup from 'yup';
import CustomButton fr... |
var common = require('../common');
var fs = require('fs');
var spawn = require('child_process').spawn;
var assert = require('assert');
var errors = 0;
var enoentPath = 'foo123';
assert.equal(common.fileExists(enoentPath), false);
var enoentChild = spawn(enoentPath);
enoentChild.on('error', function (err) {
assert.... |
var ModuleTestFPSpec = (function(global) {
var _runOnNode = "process" in global;
var _runOnWorker = "WorkerLocation" in global;
var _runOnBrowser = "document" in global;
return new Test("FPSpec", {
disable: false,
browser: true,
worker: true,
node: true,
button:... |
module.exports = {
"_links": {
"self": {
"href": "http://ccd-data-store-api-demo.service.core-compute-demo.internal/internal/cases/1604309496714935"
}
},
"case_id": "1604309496714935",
"case_type": {
"id": "Asylum",
"name": "Immigration & Asylum",
"des... |
import styled from 'styled-components';
const Row = styled.div`
color: ${({ theme: { row: { fontColor } } }) => fontColor};
background-color: ${({ isRowOdd, theme: { row: { dark, light } } }) => isRowOdd ? light : dark}
`;
export default Row;
|
import React from "react";
export default function Button(props) {
return <button disabled={props.disabled}>{props.children}</button>;
}
|
import axios from 'axios';
import {
GET_DATA_MAP,
GET_SITES,
DOWNLOAD_CUSTOMISED_DATA_URI,
D3_CHART_DATA_URI,
GENERATE_AIRQLOUD_DATA_SUMMARY_URI,
SCHEDULE_EXPORT_DATA
} from 'config/urls/analytics';
import { BASE_AUTH_TOKEN } from 'utils/envVariables';
export const getMonitoringSitesInfoApi = async (pm25Ca... |
"use strict"
// DEPENDENIES
var bodyParser = require('body-parser')
var express = require('express');
var orm = require('orm');
var session = require("express-session");
var app = express();
var json2csv = require('nice-json2csv');
var port = process.env.PORT || 8000;
// CONFIG
app.use(session({secret: "$!45sd_213", ... |
/* eslint-disable react/destructuring-assignment */
import React, { useEffect } from 'react';
import SteamSpeakComponents from '@site/src/components/SteamSpeakComponents';
import Layout from '@theme/Layout';
import animatedGraph from '@site/src/exports/animatedGraph';
function Components(props) {
useEffect(() => {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.