text stringlengths 7 3.69M |
|---|
import React from 'react';
import NavItem from './NavigationItem/NavigationItem';
import * as ROUTES from '../../../constants/routes';
import './NavigationItems.sass'
const NavigationItems = () => (
<ul className = {'navigationItems'}>
<NavItem link = {ROUTES.HOME} exact>Home</NavItem>
<NavItem lin... |
// Show + Hide
$('#btn-1').click(function() {
if($(this).text() === 'HIDE'){
$(this).text('SHOW');
$('#card-1').toggle(3000);
$('#card-1').hide();
}
else{
$(this).text('HIDE');
$('#card-1').toggle(3000);
$('#card-1').show();
}
});
// Show + Hide => Toggl... |
var gplay = require('google-play-scraper');
const numberOfElements = process.argv[2];
const startingPointOfList = process.argv[3];
gplay.list({
category: gplay.category.MEDICAL,
num: numberOfElements,
start: startingPointOfList,
country: 'en',
})
.then(console.log, console.log);
setTimeout(exit... |
module.exports = () => ({
dropboxId: '59',
imgLink: 'https://www.dropbox.com/s/1abji85jfrwkm05/img31.jpg?raw=1',
createdAt: '2017-10-21T10:28:38.500Z',
updatedAt: '2017-10-21T10:28:38.500Z',
})
|
// Base routes for item..
exports.register = function(server, options, next){
var service_info = "ec interaction service";
//通过商品id找到评论
var get_comments_infos = function(product_id, cb){
server.plugins['models'].product_comments.find_comments(product_id,function(rows){
if (rows.length > 0) {
cb(false,rows)... |
/**
* Created by justfine on 18/1/24
*/
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './app.vue';
import VeryVue from '../src/index';
// import locale from '../src/locale/lang/en-US';
import locale from '../src/locale/lang/zh-CN';
Vue.use(VueRouter);
Vue.use(VeryVue, { locale });
// 开启... |
function PluginManager() {
this.runnerChains = {};
}
PluginManager.prototype.push = function (key, runner) {
this.runnerChains[key] = this.runnerChains[key] || [];
this.runnerChains[key].push(runner);
};
PluginManager.prototype.pop = function (key) {
this.runnerChains[key] = this.runnerChains[key] || ... |
import React from 'react';
import Logo from '../../Logo/Logo.js';
import NavigationItems from '../NavigationItems/NavigationItems.js';
import styles from './SideDrawer.module.css';
import Backdrop from '../../UI/Backdrop/Backdrop.js';
const SideDrawer = (props) => {
const attachedClasses = props.isSideDrawerShowing
... |
'use strict';
/* Controllers */
angular.module('myApp.controllers')
.controller('LoginController', ['$scope', '$http', '$location', 'authService', 'AppRegistry',
function($scope, $http, $location, authService, AppRegistry){
$scope.username = '';
$scope.password = '';
console.log('Login Controller');
$scope.s... |
import React, { Component, PropTypes } from 'react';
import PostInfo from './PostInfo';
class Post extends Component {
componentDidMount() {
// Fetch posts from firebase
this.props.actions.postsFetch();
}
render() {
const {posts} = this.props;
console.log(posts);
const getPosts = () => Obj... |
var helper = {};
const Question = require("../models/problems");
const TC = require("../models/testcases");
const total = require("../models/total_questions");
const contests = require("../models/contests");
var moment = require("moment");
helper.displayAllProblems = async (req, res, next) => {
Question.find({}).s... |
// console.log("myCustom Js");
// const allH2 = document.getElementsByTagName("h2");
// for (let h2 of allH2) {
// h2.style.color = "lightblue";
// }
const inputBtn = document.getElementById("inputGroup-sizing-lg");
// panda-btn-pink
document.getElementById("contact").addEventListener("keyup", function (event) {
if... |
var Redis = require('ioredis');
const turf = require('@turf/turf');
const _ = require('lodash');
const h3 = require('h3-js');
const async = require("async");
const fs = require('fs');
const argv = require('minimist')(process.argv.slice(2));
var redis = new Redis(6379);
if(!argv._.length)
process.exit();
if(!arg... |
;(function(window) {
var Gallery = class Gallery {
constructor() {
this._imageFinder = imageFinder
this._store = new StoreClass()
this._view = new ViewClass(this.setEventListeners.bind(this))
this.aborter = null
}
setEventListeners() {
console.log('Gallery view is ready!')
... |
import React, { Component } from "react";
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
import "./PaymentFormLoader.css";
import PaymentForm from "./components/PaymentForm";
import PaymentFormLoader from "./components/PaymentFormLoader";
import { getFromStorage, setInStorage } from "./util/... |
export default class SubjectsController {
constructor (Subject) {
this.Subject = Subject
this.subjects = []
this.loadSubjects()
}
loadSubjects () {
this.Subject.query((subjects) => {
this.subjects = subjects
})
}
deleteSubject (subject) {
this.Subject.delete(subject, () => {
... |
// function buildPlot() {
/* data route */
// console.log('hello')
var url = "/numbers_data";
d3.json(url).then(function(movies, error) {
console.log(error);
console.log(movies);
var data = [{
values: movies.TotalGrossAllMovies,
labels: movies.Distributor,
type: 'pie'
}];
var layout = {
... |
(function ($) {
module('jQuery.abSignificance');
var fixture = {
resultType: 'conversions',
control: {
'label': 'Control A',
'hits': 16,
'conversions': 4
},
treatment: {
'label': 'Treatment A',
'hits': 16,
'... |
var WebRtc = (function() {
'use strict';
var pc_config = {"iceServers":[{"url":"stun:stun.l.google.com:19302"}]};
var mediaConstraints = {'mandatory': {'OfferToReceiveAudio':true, 'OfferToReceiveVideo':true}};
var started = false,
localVideo,
remoteVideo,
localStream,
so... |
module.exports = {
env: process.env.SIGNALKUPPE_WEBSITE_ENV,
websiteUrl: process.env.SIGNALKUPPE_WEBSITE_URL,
siteName: 'Signalkuppe',
siteSlogan: 'Parole oltre i 4000m',
description: 'Blog personale di Matteo Leoni',
facebook: 'https://www.facebook.com/signalkuppe',
instagram: 'https://www.... |
import Layout from '../components/Layout'
const AboutMeStyle = {
padding: '0',
margin: '0',
height: '70vh',
width: '100vw',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
textAlign: 'justify',
fontSize: '3vmin',
}
const ParagraphStyle = {
width: '50vw',
alignItems: 'center'... |
const experience = [
{
startYear: 2018,
endYear: null,
position: 'Full Stack Developer',
place: 'Bright Brand',
desc: 'Constructing web-sites & web-services from scratch to production.',
id: 3
},
{
startYear: 2018,
endYear: 2018,
position: 'Web Developer Trainee',
place: 'N... |
import React from 'react';
import { withStyles } from '@material-ui/styles';
import { Grid } from '@material-ui/core';
import AllTransactions from './components';
const styles = theme => ({
root: {
padding: theme.spacing(4)
}
});
const Transactions = props => {
const { classes } = props;
return (
... |
import React from 'react';
const Home = (props) => {
if (!props.word){
return (
<div style={{textAlign: "center"}}>
<h1>Welcome!</h1>
</div>
)
}else{
if(isNaN(props.word)){
return (
<div style={{textAlign: "center... |
import React, { Component } from "react";
import {
View,
StyleSheet,
TouchableOpacity,
StatusBar,
ScrollView,
Text,
Image
} from "react-native";
import StarRating from "react-native-star-rating";
import { Input, InputProps, Button } from "react-native-ui-kitten";
import AntIcon from "react-native-vector-i... |
/**
* @name FormTitle
* @author Chris Holle
* @overview Title for page sections/titles'
* @param {string} title to be displayed
* @example <FormTitle title="Create A Project" />
*/
import React from "react"
import styled from "styled-components"
import meridianTheme from "assets/stylesheets/meridianTheme"
const... |
require('dotenv').config()
const http = require('./app.js');
const port = process.env.PORT;
require('./db/mongoose.js');
http.listen(port, ()=> console.log('Сервер работает - localhost:8089'));
|
function max1020(a, b){ // 9, 21
if ((a >= 10 && a <=20) && (b >= 10 && b <=20)) {
if (a > b) {
return a;
}
if (b > a) {
return b;
}
}
if (a >= 10 && a <=20) {
return a;
}
if (b >= 10 && b <=20) {
return b;
}
return 0;
}
|
// BrowserRouter--> a component that just enabel routing , so anything inside this component has access to the browser
// Switch--> it will allow us look to the url and making a decisions based on that
// Route --> determain a single route
import React, { useState, useEffect } from 'react'; // useEffect its to handel ... |
'use strict';
angular
.module('sbAdminApp')
.controller('mainController', function ($scope, TranslateService) {
var vm = this;
vm.getLanguages = function () {
return TranslateService.getLanguages()
.then(function (langs) {
vm.languages = langs;
... |
const {Router} = require('express');
const controllers = requir('./item.controller.js');
const router = Router();
// /api/item
router
.route('/')
.get(controllers.getOne)
.post(controllers.createOne)
// /api/item/:id
router
.route('/:id')
.get(controllers.getOne)
.put(controllers.updateOne)
.delete... |
module.exports = {
preset: 'react-native',
setupFilesAfterEnv: [
'<rootDir>/jest.setup.js',
'./node_modules/react-native-gesture-handler/jestSetup.js'
],
transformIgnorePatterns: [
'node_modules/(?!@react-native|react-native|@react-navigation|expo|polyfills|Libraries|rea... |
export const groupTrend = (data, prefix, startingIndex = 0, minIntegerDigits = 1, reverse = true) => {
let index = startingIndex
const getKey = i => `${prefix}${i.toLocaleString('en-US', {
minimumIntegerDigits: minIntegerDigits,
useGrouping: false
})}`
const trend = []
while(getKey(index) in data) {... |
const {
describe,
expect,
test
} = require('@jest/globals');
const {
getConcatenation
} = require("./solution");
describe('Problem 1929: Concatenation of Array', () => {
test('Test 1: [1, 2, 1]', () => {
const nums = [1, 2, 1];
const expected = [1, 2, 1, 1, 2, 1];
const output = getConcatenation(... |
import React, { useEffect, useState } from 'react'
import App from "../App"
import "./First.css"
import AOS from 'aos';
import 'aos/dist/aos.css';
import Footer from "./Footer"
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
function First() {
const [app, setApp] = useState(false);
u... |
const homeCommands = {
createAccount() {
this.waitForElementVisible('@signUpButton', 10000)
.click('@signUpButton')
.api.pause(7000);
return this
// Return page object for chaining
}
};
module.exports = {
commands: [homeCommands,{
setQuery( selector,value){
return thi... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChat = exports.disconnectChat = exports.JoinChatRoom = void 0;
let ChatRoomsConnected = [];
exports.JoinChatRoom = (socketID, room) => {
let index = ChatRoomsConnected.findIndex(chat => chat.socketID === socketID);
if (index... |
// @flow
import { type Action } from "shared/types/ReducerAction";
import {
type AsyncStatusType,
type NotificationType,
} from "shared/types/General";
import { ASYNC_STATUS } from "constants/async";
import {
ASYNC_USER_INIT,
HANDLE_NOTIFICATION,
GET_USERS_SUCCESS,
GET_USER_SUCCESS,
} from "actionTypes/use... |
import styled from "styled-components";
export const Story = styled.div`
cursor: pointer;
img {
height: 3.2rem;
width: 3.2rem;
border-radius: 50%;
border: 4px solid ${(props) => props.theme.primaryColor};
background-size: cover;
background-position: center;
object-fit: cover;
}
sp... |
import axios from 'axios';
import { router } from '@/router';
const ajaxUrl = 'http://192.168.0.110:8989';
const http = axios.create({
baseURL: ajaxUrl,
timeout: 30000
});
const ajax = (vm, request) => {
return new Promise((resolve, reject) => {
let headers = request.headers || {};
reques... |
/**
* Created by gautam on 19/12/16.
*/
import React from 'react';
import { browserHistory, Link } from 'react-router';
import $ from 'jquery';
import Base from './base/Base';
import TopNotification from './TopNotification';
import DisableScroll from './base/DisableScroll';
import {connect} from 'react-redux';
import... |
const aside = () =>{
document.querySelector('.mobile-aside').classList.toggle('active');
document.querySelector('.header').classList.toggle('w100');
document.querySelector('.header').classList.toggle('r-20');
document.querySelector('.header').classList.toggle('flx-rv');
//document.querySelector('.ma... |
import React from 'react';
import { connect } from 'react-redux';
import { Modal, Transfer, Spin } from 'antd';
class DistributionApplicationModal extends React.Component {
componentDidMount() {
const { dispatch } = this.props;
dispatch({ type: 'application/fetchApplicationCombo' });
}
render() {
c... |
$(document).ready(function () {
// triviaGame is the object which contains everything needed for the game
var triviaGame = {
QUESTION_TIMEOUT: 30, // seconds
TIME_BTW_QUESTIONS: 7, // seconds
questions: [], // array of question - will be init'ed at start of... |
Grailbird.data.tweets_2011_12 =
[ {
"source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E",
"entities" : {
"user_mentions" : [ {
"name" : "David Gillespie",
"screen_name" : "gillespi",
"indices" : [ 0, 9 ],
"id_str"... |
// gatsby-node.js
const { fmImagesToRelative } = require('gatsby-remark-relative-images');
exports.onCreateNode = ({ node }) => {
fmImagesToRelative(node);
};
|
window.onload = function() {
var config = {
apiKey: "AIzaSyCm62vJSJoYSH7xe1BVnsFR2hhmeSSGNJk",
authDomain: "projectwildan-a10fb.firebaseapp.com",
databaseURL: "https://projectwildan-a10fb.firebaseio.com",
projectId: "projectwildan-a10fb",
storageBucket: "projectwildan-a10fb.appspot.com",
messagingSenderI... |
var express = require('express');
var router = express.Router();
var users = require('../models/user.js')
var circles = require('../models/circle.js')
var request = require('../models/request.js')
var mongoose = require('mongoose')
var schema = mongoose.Schema
/* GET home page. */
router.post('/', function(req, res, ne... |
$(function(){
//index nav下拉效果
$('.navlist_ul>li').hover(function(){
$(this).children('.nav_ul').stop().slideDown();
},function(){
$(this).children('.nav_ul').stop().slideUp();
})
//index nav点击效果
$('.navlist_a').click(function(){
$('.navlist_a').removeClass('present_nav');
$(this).addClass('present_nav');... |
import React, {Fragment, lazy, Suspense} from "react";
import {CssBaseline, MuiThemeProvider} from "@material-ui/core";
import {BrowserRouter, Route, Switch} from "react-router-dom";
import theme from "./theme";
import GlobalStyles from "./GlobalStyles";
import * as serviceWorker from "./serviceWorker";
import Pace fro... |
var path = require('path');
module.exports = {
entry: './dev/app.js',
output: {
path: './static',
filename: 'app.js'
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader!css-loader?modules!postcss-loader'
}, {
test: /\.handlebars/,
loade... |
import React, {useState, useEffect} from 'react'
import { withRouter } from 'react-router-dom'
import { BallBeat } from 'react-pure-loaders'
import cookie from 'react-cookies'
const PasswordRecoveryEmail = (props) => {
const [email, setEmail] = useState(null)
const [emailError, setEmailError] = useState(false)
... |
/**
* @file Switch.js
* @author leeight
*/
import {DataTypes, defineComponent} from 'san';
import {create} from './util';
import {asInput} from './asInput';
const cx = create('ui-togglebutton');
/* eslint-disable */
const template = `<div on-click="toggleSwitch" class="{{mainClass}}">
<span s-if="checked" cl... |
var requirejs = require('requirejs');
var path = require('path');
var View = requirejs('extensions/views/view');
var templatePath = path.resolve(__dirname, '../../templates/modules/kpi.html');
var templater = require('../../mixins/templater');
module.exports = View.extend(templater).extend({
templatePath: template... |
import {
ADD_TO_CART,
CARTITEMS_LOADING,
GET_CARTITEMS,
DELETE_CARTITEM,
ADD_TO_ORDERHISTORY,
CLEAR_CART,
ORDERITEMS_LOADING,
ORDERHISTORY_LOADING,
GET_ORDERHISTORY,
ORDERRESULT_LOADING,
GET_ORDERRESULT,
ORDERDETAIL_LOADING,
GET_ORDERDETAIL,
ADD_TO_CHECKOUT,
C... |
import React from "react";
import { Marker } from "react-leaflet";
import { IconLocation } from "./iconLocation";
const Markers = ({ lat, log }) => {
return <Marker position={[lat, log]} icon={IconLocation} />;
};
export default Markers;
|
/**
* scope class
*/
class Scope {
/**
* create a new scope based on this
* @param Object conf - configuration
*/
$new(conf){
return Object.create(this);
}
} |
'use strict'
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const SesionSchema = Schema({
nombre: { type: String },
repeticiones: { type: Number },
tiempoDescanzo: { type: Number },
estaciones: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Estacion' }],
participantes: [{ ty... |
/**
* Created by zhangsq on 2017/4/24.
*/
'use strict';
let GeneralHistory;
let version = +process.versions.node.match(/^\w+?/)[0];
if (version > 5) {
GeneralHistory = require('./src/general-history');
} else {
GeneralHistory = require('./lib/general-history');
}
module.exports = GeneralHistory; |
import Layout from '../layouts/layout';
import Head from '../components/head';
export default function Accessories(){
return(
<Layout>
<div>
<Head judul="Accessories"/>
<p>Berbagai macam accessorien rambut, gelang, cincin, kalung, dan lain-lain dengan harga yang le... |
(function() {
L.mapbox.accessToken = 'pk.eyJ1IjoiZGFuaWR1ZTEiLCJhIjoiY2oxaDhid2E1MDAzejJxcGRqdmRkNzZjaCJ9.iF4gj5b98voRypvuygAxGw';
//Create Map
var bounds = [
[42.774179, -73.809431], // Southwest coordinates
[42.943479, -73.624375] // Northeast coordinates
];
var map = L.mapbox.map('map', null, {
... |
export const INIT_METRIC = 'INIT_METRIC';
export function initMetric() {
return {
type: INIT_METRIC
};
}
export const LOAD_METRICS = 'LOAD_METRICS';
export function loadMetrics() {
return {
type: LOAD_METRICS,
promise: fetch('/api/metric/getAll').then(response => { return response.json() })
};
}
... |
import User from '../models/user';
import Area from '../models/area';
import sequelize from 'sequelize';
import moment from 'moment';
//One-to-many relationship with area
Area.hasMany(User);
User.belongsTo(Area);
function load(req, res, next, id) {
User.findById(id, {
attributes: ['id', 'barcode', 'fname', 'mna... |
import React from 'react';
import {shallow} from 'enzyme';
import Search from '../Search';
import {TestHelpers} from '../../../Constants';
const {sampleText} = TestHelpers;
describe('<Search>', () => {
describe('Structure', () => {
const renderFn = jest.fn().mockReturnValue(null);
it('renders correctly', ()... |
const express = require("express");
const router = express.Router();
const ImageModel = require("../models/image");
router.route("/").post((req, res) => {
const id = req.body.identifier;
const base64 = req.body.imgBase64;
const imageModel = new ImageModel({
identifier: id,
imgBase64: base64
});
image... |
import React, {useState} from 'react';
import './counter.css'
const CounterApp = () => {
const [counters, setCounters] = useState({counter1:10, counter2:20, counter3:30, counter4:40});
// de-structure
const {counter1, counter2} = counters
// spread and effect by function
const increment = ()=> setCounter... |
document.body.onkeyup = function(){document.body.classList.toggle('liked')} |
const path = require('path');
const express = require('express'); //framework
const cusController = require('../controllers/cus');
const router = express.Router();
//đăng ký quảng cáo --test ok
router.get('/cus-reg', cusController.getADreg);
router.post('/reg-ad', cusController.postAdReg);
router.get('/cus', cusCon... |
import React from "react";
import styles from "./TaskBanner.module.scss";
export const TaskBanner = (props) => {
return (
<h4 className={styles.box}>
<input
type="text"
value={props.userName}
onChange={props.newUserName}
className={styles.userName}
/>
<h3 classNa... |
import Error from '../../../../../libraries/error'
import Settings from '../../../../../database/models/emu/settings'
class Options
{
constructor (Website)
{
Website.get('/emu/customize/options', Options.view)
Website.post('/emu/customize/options', Options.save)
}
static... |
javascript:document.querySelectorAll("video").forEach(video => {
/* https://github.com/polywock/removeDisablePiPAttribute */
video.removeAttribute("disablePictureInPicture");
})
|
const { ipcRenderer } = require('electron')
let button = document.getElementById('add')
let opened = 0
let goback = document.getElementById('goback')
goback.addEventListener('click', () => {
ipcRenderer.send("goto", "index.html")
})
document.getElementById('opengithub').addEventListener("click", () =>
ipcRe... |
// This file is create test model,RSM and final shader.
var vertexArray;
var bbox;
var sunLight;
var rsm;
var depthNormalBuffer; // depth normal buffer
var indirectLightBuffer; // indirect light buffer
var grid;
var geometryVolume;
var cam;
function cleanup() {
// correspond lpv/test_model::cleanup();
// to d... |
//模块
var ngApp = angular.module('myApp', []);
//服务
ngApp.service('myService1', function () {
this.sx1 = '{name: 123, age: 12}';
});
//控制器
ngApp.controller('myCtll', function ($scope, $rootScope, $location, myService1, $http) {
$scope.carname = "liuhailong";
$scope.names = [{name: 'zhangsan', country: '12'},... |
/// <reference path="~/Layouts/TPCIP.Web/Scripts/_references.js" />
// Define TdcAsyncWebPartLoader namespace.
if (TdcLogin == null || typeof (TdcLogin) != "object") {
var TdcLogin = new Object();
}
// Workaround for IE.
//if (typeof console == "undefined" || typeof console.log == "undefined") {
// var conso... |
//= require jquery
//= require jquery_ujs
//= require picturefill
//= require ornament/defaults
//= require settings
//= require ornament/debug
//= require ornament/console
//= require ornament/window-dimensions
//= require ornament/measure
//= require ornament/debounce
//= require ornament/accessibility
//= require or... |
export { COMPLETE_STATUS } from './constants';
export {
getWalletByAddress,
fetchAddresses,
fetchTransactions,
searchTransactionsAndWalletsByValue,
} from './queries'; |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const THREE = SupEngine.THREE;
const fs = require("fs");
const TileLayerGeometry_1 = require("./TileLayerGeometry");
const TileMapRendererUpdater_1 = require("./TileMapRendererUpdater");
class TileMapRenderer extends SupEngine.ActorComponent {... |
/*
Festival
In your IDE of choice, create a new JavaScript file named festival.js and make it so that all code written in the file follows strict mode.
Create an anonymous immediately-invoking function that will hold the main execution of all program calls. Writing a simple command console.log(“Hi”) inside this funct... |
import React from 'react';
import Alert from "./Alert/Alert";
const Footer = (props) => {
return (
<div className="footer shadow-2">
<Alert
notification ={props.notification} />
</div>
);
}
export default Footer; |
function cargarJSON() {
fetch("./data/movies.json")
.then(function(res) {
return res.json();
})
.then(function(data){
let html = document.querySelector("#content-container");
console.log(html)
let movies = data.movies;
for (let i = ... |
/**網絡客戶 第二步 填寫會員資料 */
import React,{Component} from 'react'
import{
View,StyleSheet,Switch,
Text,TouchableOpacity,Image,
} from 'react-native'
import {createDateData, currentFullData} from '@/utils/common'
import { colors, scale, width } from '@/utils/device';
import Picker from 'react-native-picker';
import In... |
import React from 'react';
import Facebook from '../../../assets/images/contacts/Facebook.png';
import Github from '../../../assets/images/contacts/Github.png';
import Linkedin from '../../../assets/images/contacts/Linkedin.png';
import './Contacts.css';
const contacts = () => {
return (
<div>
... |
/*
* @Description:
* @Author: yamanashi12
* @Date: 2019-05-10 10:18:19
* @LastEditTime: 2020-10-26 18:02:17
* @LastEditors: Please set LastEditors
*/
export default {
schema: {
type: { // 组件类型
type: 'string',
default: 'Title'
},
desc: { // 描述
type: 'string',
default: '描述'
... |
import { useState, useEffect, useRef } from 'react';
import { useBeforeunload } from "react-beforeunload";
import axios from 'axios';
import { withCookies } from 'react-cookie';
function Main(props) {
let currentVoca;
let currentEngVoca;
let url = 'http://3.34.140.114:5000/voca';
const { cookies } = props;
... |
import React from 'react';
import 'tachyons';
const SearchBox = ({searchChange, buttonClick}) => {
return(
<div className=' input-container'>
<input
className='input-box'
type='search'
placeholder="search Robots"
onChange={searchChange}
/>
<button
type=... |
const express=require("express");
const bodyParser=require("body-parser");
const app=express();
app.use(bodyParser.urlencoded({extended:true}));
app.get("/",function(request,response){
response.sendFile(__dirname+"/index.html");
});
app.post("/",function(request,response){
response.send("Thanks for your s... |
const { Credentials } = require('uport-credentials');
console.log(Credentials.createIdentity());
|
/*global describe: true, expect: true, it: true, jasmine: true */
describe('function expressions', function() {
function checkLongnames(docSet, namespace) {
var memberName = (namespace || '') + 'Foo#member1';
var variableName = (namespace || '') + 'Foo~var1';
var fooMember = docSet.getByLong... |
import React from 'react';
const input = ( props ) => {
let inputElement = props.classes;
let month = null;
let year = null;
const inputClasses = ["form-input"];
if (props.invalid && props.shouldValidate && props.touched) {
inputClasses.push("form-field-error");
}
let classSelect... |
import styled from "styled-components";
const ButtonAddStyled = styled.div`
position: absolute;
top: 66px;
button {
border: none;
background-color: white;
color: #EF271B;
:hover {
background-color: white;
color: #EF271B;
}
}
`
export default ButtonAddStyled |
var xmlhttps= new Array();
function loadXMLdoc(urli, id, attente, v, ids) {
var entree = document.getElementById('entree').value;
var entree2 = document.getElementById('entree2').value;
var hapen = document.getElementById('hapen_put').value;
var url= urli + "?v=" + v + "&ids=" + ids + "&entree=" + entree + "... |
const readline = require('readline');
const reader = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
reader.question("Password: ", function(input){
input.toUpperCase()
input.toLowerCase()
//input = Number()
console.log(`${input.length} characters used`)
if (input.length >= ... |
import './App.css';
import React from "react";
import {Switch, Route, Link} from "react-router-dom";
import "bootstrap/dist/css/bootstrap.min.css";
import Home from "./components/Home";
import LoginComponent from "./components/Login";
import SignupComponent from "./components/Signup";
import ProfileComponent from "./co... |
/*
* To run this test : livre/fiche/selection
*/
function livre_fiche_selection()
{
my = livre_fiche_selection
my.specs = "Test de la sélection/déselection d'une fiche."+
"\nLe test se fait dans tous les cas : avec touche majuscule ou non"
my.step_list = [
["Existence des méthodes et propriétés utiles... |
Page({
data: {
amount:""
},
onLoad: function () {
var that = this;
wx.getSystemInfo({
success: function(res) {
}
});
this.setData({
balance: getApp().globalData.balance
})
},
setAmount: function(e){
console... |
/**
* Controller for the Sharingear Your gear dashboard page view.
* @author: Chris Hjorth
*/
/*jslint node: true */
'use strict';
var _ = require('underscore'),
$ = require('jquery'),
Config = require('../config.js'),
ViewController = require('../viewcontroller.js'),
App = require('../app.js'),
... |
import React, { useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import './modal-create.css';
import InvSearch from './InvSearch.jsx';
import CreateItem from './CreateItem.jsx';
const CreatePortfolio = ({ open, setOpen }) => {
if (!open) return null;
const [selected... |
import React from 'react';
export default React.createClass({
getTitle: function() {
return this.props.title;
},
render: function() {
return <div className="Bottle">
<h3>{this.getTitle()}</h3>
</div>
}
}); |
import Promise from './promise';
export default function deferred () {
let deferred = {};
deferred.promise = new Promise(function(resolve, reject) {
deferred.resolve = resolve;
deferred.reject = reject;
});
return deferred;
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.