text stringlengths 7 3.69M |
|---|
const CategoryReducer = (state = {}, action) => {
if(action.type === "addCategorySuccess"){
var categories;
if(state)
categories = JSON.parse(JSON.stringify(state));
else {
categories = {};
}
if(categories[action.area]){
categories[action.area].push(action.category);
} else {... |
'use strict';
var AmiConnection = require('./lib/amiConnection');
var config = {
port: 5038,
host: '192.168.242.125',
username: 'amiadmin',
password: '123456',
version: '1.8'
};
var ami = new AmiConnection(config);
var options = {
'action': 'originate',
'channel': 'Loc... |
const image = document.querySelector("#img");
const mainBox = document.querySelector(".main-box");
const handballBox = document.querySelector("#handball");
const jackBox = document.querySelector("#jack");
const hennessyBox = document.querySelector("#hennessy");
const vodkaBox = document.querySelector("#vodka");
... |
export const locales = ['en-us', 'zh-tw'];
const lang = {
signIn: ['SignIn', '登入'],
signUp: ['SignUp', '註冊'],
account: ['Account', '帳號'],
SAVE: ['SAVE', '儲存'],
CHANGE: ['CHANGE', '修改'],
logout: ['Logout', '登出'],
tip: ['Tip', '提示'],
yes: ['Yes', '是'],
no: ['No', '否'],
success: ['Success', '成功'],
f... |
const sortProto = {
setElements(elements = []) {
this.elements = [ ...elements ];
},
setComparator(comparatorFn) {
this.comparatorFn = comparatorFn;
},
setAlgorithm(alg) {
this.algorithm = alg;
},
run() {
if (this.algorithm) {
return this.algorithm... |
// * BOTONES MOSTRAR * //
// VARIABLES
$("#element1").hide(); // Lo primero a suceder
$("#element2").hide(); // Lo primero a suceder
$("#element3").hide(); // Lo primero a suceder
$("#element4").hide(); // Lo primero a suceder
$("#element5").hide(); // Lo primero a suceder
$("#element6").hide(); // Lo primero a suce... |
import React from "react"
import { Link } from "gatsby"
const MenuList = () => {
return (
<>
<nav className="md:flex hidden overflow-x-auto text-sm text-gray-200 font-extrabold uppercase font-sans">
<Link
to="/blog"
className="md:flex hidden items-center justify-center flex-grow... |
import React, { Component } from "react";
import "./App.css";
import DogsList from './Containers/DogsList'
// import Favorites from './Containers/Favorites'
// App is the top level component
// App component's job is to render the DogsList
class App extends Component {
render() {
return (
<div className="a... |
import React, {Component} from 'react';
import {connect} from 'react-redux';
import { Form, Input, Button, InputNumber } from 'antd';
const FormItem = Form.Item;
class CorralForm extends Component {
handleSubmit = (e) => {
e.preventDefault();
this.props.form.validateFields((err, values) => {
... |
var gulp = require('gulp'),
gts = require('gulp-typescript'),
ts = require('typescript'),
sourcemaps = require('gulp-sourcemaps');
gulp.task('typescript', function(){
var tsProject = gts.createProject('tsconfig.json', {
typescript: ts
});
return gulp.src(['typings/**/**.ts', 'typescript/*.ts'])
.p... |
/* 主入口 */
// 系统主要组件
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
// 布局css
import '../static/css/reset.css'
import '../static/css/cascade.css'
// bootstrap-vue组件
import { Form, FormInput, FormGroup, Modal, FormRadio, FormSelect, FormFile, FormTextarea } from 'bo... |
'use strict'
var bonjour = {
this. name = boujouri;
}
|
import React from 'react';
const RightArrow = (props) => {
return (
<div onClick={props.nextSlide} className="slider-right-arrow">
<img src='./pics/slider-right-arrow.svg' alt='right-arrow'/>
</div>
);
}
export default RightArrow;
|
'use strict'
module.exports = {
secret: 'Pomarola arromatica'
}
|
var changeIndex = 1;
var srcArr1 = ["./html/monthlyReport/salesHome.html", "./html/monthlyReport/map.html", "./html/monthlyReport/histogram.html"]
var srcArr2 = ["./html/agpKpi/formTab/formTab.html", "./html/agpKpi/aboSegmentMonthlyData.html", "./html/agpKpi/ppv.html", "./html/agpKpi/endPpv.html"]
var srcArr3 = ["./ht... |
(function() {
'use strict';
angular.module('auth')
.controller('SignupCtrl', [
'common', 'auth',
function(common, auth) {
if (auth.isAuthenticated()) common.redirectTo('/');
var vm = this;
vm.credentials = {};
vm... |
const request = require('request'),
config = require('../config.json')
module.exports.getTumblr = (website, channel) => {
const fullURL = `https://api.tumblr.com/v2/blog/${website}.tumblr.com/posts?api_key=${config.tumblr_api_key}&limit=1`;
request(fullURL, (error, request, body) => {
if (error) {console.log(er... |
import Vue from 'vue'
export function saveCart(cartGoods){
sessionStorage.setItem('cartObj',JSON.stringify(cartGoods)) || {}
}
export function getCartGoods(){
const cartGoods = JSON.parse(sessionStorage.getItem('cartObj')) || {}
return cartGoods
} |
function filter() {
var ano = $('.select_ano').val();
var modalidade = $('.select_modalidade').val();
var args = {'ano': ano, 'modalidade' : modalidade};
applyFilters(args);
} |
const Sequelize = require("sequelize");
//Importar configucion de sequilize
const {
DB,
HOST,
PORT,
PASSWORD,
USER,
dialect,
pool,
} = require("../config/db.config");
//Configurar sequelize
const sequelize = new Sequelize(DB, USER, PASSWORD, {
host: HOST,
port: PORT,
dialect,
... |
var messages = require('../config/messages');
module.exports.handleErrResp = function(req, res, err){
if(err.statusCode){
return res.status(err.statusCode).json({
responseCode: messages.defaultErrorObject.responseCode,
responseMessage: err.message
});
}
return res.st... |
const fs = require('fs') //include other modules into your file
const _ = require('lodash')
const yargs = require('yargs')
const notes = require('./notes')
const titleOptions = {
describe: 'Title of note', //offers help description of what your command argument does
demand: true, //makes mandatory
alias: 't' ... |
const SERVER_URL = 'http://localhost/mango.server/';
var app = new Vue({
el: '#app',
data: {
loading: true, fetching: 0, page: 'login', tables,
user: {
logged: false, id: null, is_admin: false, is_active: false, is_verif: false, rank: null, aka: null, grp_code: '0000000000'
},
forms: {
csrf: ''... |
'use strict';
const OTHER_NAV = [{
name: '公司简介',
path: '/others/index.html',
}, {
name: '发展历程',
path: '/others/experiences.html'
}, {
name: '核心业务',
path: '/others/services.html'
}, {
name: '企业文化',
path: '/others/culture.html'
}, {
name: '商务合作',
path: '/others/business.html'
}, {
name: '加入我们',
p... |
function calcularPrecio(price){
var s = $('#result').val().replace(".","");
var tasa = parseFloat(s);
var price_f = parseFloat(price);
var resultado = tasa * price_f;
document.write(resultado.toFixed(2));
}
function calcularIVA(IVA){
var s = $('#result').val().replace(".","");
var tasa = parseFloat(s);
var iva_f ... |
import React from 'react';
import {getUserDetails} from '../Api';
class UsersPage extends React.Component {
state = {
loading: true,
name: '',
username: '',
userimg: ''
}
componentDidMount() {
getUserDetails(this.props.match.params.username).then(body => {
... |
describe('Add Me To The Map', () => {
it('Navigate to crossroads.net/connect site', () => {
cy.visit('https://int.crossroads.net/connect')
cy.viewport(1200, 660)
})
it('Add Me To The Map', () => {
const username = 'connectuser2@test.com'
const password = 'Password123'
var address1 = "3... |
function checkBoxesFromSymptomsTable(){
var inputElems = document.querySelectorAll('.asthma-symptoms-table input');
count = 0;
for (var i = 0; i < inputElems.length; i++) {
if (inputElems[i].type === "checkbox" && inputElems[i].checked === true){
count++;
//popup.show(count);
}
... |
/// <reference path="../helper/deviceHelper.js" />
var express = require('express');
var router = express.Router();
var path = require('path');
var userModel = require("../models/users");
var deviceHelper = require('../helper/deviceHelper');
var userHelper = require('../helper/userHelper');
var md5 = require('md5');
v... |
import {combineReducers} from 'redux';
import boardReducer from './boardReducer';
import optionReducer from './optionReducer';
import moveReducer from './moveReducer';
import playerReducer from './playerReducer';
import gameStatusReducer from './gameStatusReducer'
const rootReducer = combineReducers({
board: boardRe... |
import React, { Component, Fragment } from 'react';
import { Form, Row, Col } from 'antd';
export default class BottomTabB extends Component {
state = {
ListMap0: [
//0销售发货
{ N: '任务编号', M: 'taskCode' },
{ N: '单据编号', M: 'billCode' },
{ N: '发货类型', M: 'taskTypeA' },
{ N: '任务状态', M: 'bi... |
// Import Dependencies
import React from 'react';
import { FlatList, Text, TouchableOpacity, View } from 'react-native';
import { ListItem } from 'react-native-elements';
import styles from './styles';
import { useDispatch, useSelector } from 'react-redux';
import { increment, decrement } from '../../redux/accountSlice... |
var config = new dex.Configuration({"option": "a"});
describe("dex.Configuration", function () {
it("configuration: empty", function () {
expect(new dex.Configuration()
.config).toEqual({});
})
it("configuration: base", function () {
expect(new dex.Configuration({"option": "a"})
.get("option... |
const mongoose = require('mongoose')
const crypto = require('crypto')
const jwt = require('jsonwebtoken')
const SECRET = 'mysecret'
//gen password for crypto
const hashPassword = (password) =>{
return crypto.createHmac('sha256' , SECRET)
.update(password)
.digest('hex')
}
const userSchema = mongoose.Sche... |
import React from 'react';
import {
StyleSheet,
Text,
View,
StatusBar,
} from 'react-native';
import { StackNavigator } from 'react-navigation';
import MovieListScreen from './MovieListScreen';
import MovieDetai from './MovieDetail';
export const Screens = StackNavigator({
homePage: { screen: MovieList... |
const os = require("os");
console.log("os: ", os.platform());
console.log("processor: ", os.arch());
console.log("processor info: ", os.cpus());
console.log("Free memo: ", os.freemem());
console.log("All memo: ", os.totalmem());
console.log("Home dir: ", os.homedir());
console.log("System is on: ", os.uptime());... |
import types from 'Actions/types';
const {
SHOW_MODAL,
HIDE_MODAL
} = types;
/**
* @description Action creators to show and hide modal
* @param { object } - [modalType]
* @returns { object } - Returns object creator
*/
export const loadModal = (modalType, payload) => {
return {
type: SHOW_MOD... |
import React from 'react';
import UserDeal from './UserDeal';
import StoreDeal from './StoreDeal';
import { isStore } from '../function/DefineConst';
function Branching() {
if( isStore ){
return <StoreDeal />;
} else {
return <UserDeal />;
}
}
export default Branching; |
import React from 'react';
const Home = () => {
return (
<div id="home">
<section>
<h2 id="pageTitle">Welcome to RainbowRetro</h2>
<p class="subtitle">
A cheerful application for conducting your retrospective meetings.
</p>
</section>
<div class="section-wrappe... |
const express = require('express');
const router = express.Router();
/* GET home page. */
router.get('/', (req, res, next) => {
res.render('index', { title: 'Express' });
});
router.get('/travels', (req, res, next) => {
res.render('travels');
});
router.get('/createtravel', (req, res, next) => {
res.render('c... |
'use strict';
var assert = require('chai').assert,
Chess = require('../chess'),
Color = require('../color');
describe('Chess', function () {
var chess;
beforeEach(function () {
chess = new Chess();
});
describe('#constructor()', function () {
it('active color is white', function () {
asser... |
import React from "react";
import { Segment } from "semantic-ui-react";
import { BACKEND_HOST } from "./ip";
export function UserTaskCard(props) {
console.log(props);
const taskCompleted = task => {
fetch(`http://${BACKEND_HOST}/tasks/${task.id}`, {
method: "PATCH",
headers: {
Authorization: `Bearer ${lo... |
import React from 'react';
import Card from 'react-bootstrap/Card';
import CardDeck from 'react-bootstrap/CardDeck';
import ListGroup from 'react-bootstrap/ListGroup';
import { SocialIcon } from 'react-social-icons';
import image from './image.jpg';
function About() {
return (
<div style={{backgroundColor: 'whit... |
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
class Home extends React.Component {
render() {
return (
<React.Fragment>
<h1 className="my-2">THIS IS HOME {this.props.greeting}</h1>
</React.Fragment>
);
}
}
document.addEventListener('DOMContentLoaded',... |
import {createStore, combineReducers, applyMiddleware, compose} from 'redux'
import thunk from 'redux-thunk'
import expensesReducer from '../reducers/expenses'
import filterReducer from '../reducers/filters'
import authReducer from '../reducers/auth'
// store creation using multiple reducer
const composeEnhancers ... |
import React from 'react'
import Answer from './Answer'
function AnswerList(props) {
const options=[];
for(let i=0;i<props.dataSet.options.length;i++)
{
options.push(<Answer handleClick={props.handleClick} choice={i} answer={props.dataSet.options[i]}/>)
}
return (
<div>
<... |
import React, { Component } from 'react'
import { connect } from "react-redux"
import BScorll from 'better-scroll'
import './Header.styl'
class Header extends Component {
state = {
showNav: false //标识导航列表是否显示
}
// 切换导航列表的显示和隐藏
toggleShowNav = () => {
this.setState({
showNav: !this.state.showNav
... |
//---------- App Server to route to restaurant pages ----------//
//variable declaration & library imports
const express = require('express');
const app = express();
const path = require('path');
const port = process.env.PORT || 5000;
//array to make sure restaurant page is available
let restArray = ["ahli-babas-kabob... |
/**
* @fileOverview 特殊字符工具库
* @module characters
*/
/**
* 检查是否包含特殊字符
* @author silenceboychen https://github.com/silenceboychen
* @param {String} characters - 字符串
*
* @return {Boolean}
*
* @example
*
* const { characters } = require('@fmfe/fm-utils');
*
* const b = characters.hasSpec... |
/*
This function was found on the Image Map Resizer GitHub issues page.
URL: https://github.com/davidjbradshaw/image-map-resizer/issues/35
*/
function __init_resize() {
$('img[usemap]').each(function(e,index){
var $this = $(this);
var img = $(index)[0];
var i_w = $this.width();
var i... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import InviteButton from '../../containers/Teams/InviteButton';
import './styles/Person.css';
class Person extends Component {
state = { mouseOver: false };
handleMouseOut = ({ relatedTarget }) => {
if (
relatedTarget &&
... |
import React, { Component } from 'react';
import { Page } from 'react-onsenui';
export default class extends Component {
render () {
return (
<Page>
<section style={{margin: '16px'}}>
<p>Offline Page</p>
</section>
</Page>
)
}
}
|
Ext.define('HSF.view.SpeakersDetail', {
extend: 'Ext.Panel',
xtype: 'speakersdetail',
config: {
styleHtmlContent: true,
scrollable: 'vertical',
title: 'Details',
tpl:[
'<img src=\"{img}\" width=\"80\" height=\"80\">{firstName} {lastName}<br>{shortDescription}<br>{description}'
]
}
}); |
/* eslint-disable react/jsx-one-expression-per-line */
import React from 'react'
import * as Story from '_story'
import { messageVariants } from '../../../macros'
import Message from '.'
const Demo = () => (
<>
<h1>Message</h1>
<p>
The <em>Message</em> component provides themed notification text.
... |
export const portfolioData = [
{
id: 1,
name: 'Thiam Ibrahima',
languages: ['javascript','css3','html'],
poste:'DÉVELOPPEUR WEB FULL STACK JS REACT ',
text: `Developpeur web passionné par les nouvelles technologies liées au développement web. J'ai fais mes premiers pas en tant qu'autodidacte, a... |
({
getOpptyDetails : function(component, event, helper, recordId){
//console.log('Inside helper - getOpptyDetails');
helper.callServer(
component,
"c.getOpptyDetails",
function(result){
//console.log('*** result : '+result);
... |
var cKey = 'fileexIntro_home';
//每次页面加载时调用即可
function initintro(){
var start = document.cookie.indexOf(cKey);
var date = new Date();
date.setTime(date.getTime() + 30*24*60*60*1000);
if(start<0)
document.cookie = cKey + '='+date.getTime()+';expires='+ date.toGMTString();
else{
var va... |
$( document ).ready(function() {
if ($(window).width() < 863) {
var tests = document.getElementsByClassName('projimg');
$.each(tests, function (i, l) {
l.style.cssFloat = "none";
l.style.marginLeft = "auto";
l.style.marginRight = "auto";
});
var tests = document.getEleme... |
"use strict";
var _csrf;
var categories = ['Shirts', 'Pants', 'Accesssories'];
var shirts = [{
name: 'White T-Shirt',
price: 20,
src: '/assets/img/white-t.png',
alt: 'White T-Shirt'
}, {
name: 'Black T-Shirt',
price: 20,
src: '/assets/img/black-t.png',
alt: 'Black T-Shirt'
}, {
name: 'Red T-Shirt',
... |
// Generated by CoffeeScript 1.3.1
exports.Map = (function() {
Map.name = 'Map';
function Map(id, rebound_callback) {
var _this = this;
this.id = id;
this.rebound_callback = rebound_callback;
this.registry = {};
this.webview = Titanium.UI.createWebView({
url: "html/map/" + id + ".html"
... |
import { combineReducers } from 'redux';
import {single, history, preview} from './edit.reducer';
const rootReducer = combineReducers({
single: single,
history: history,
preview: preview,
});
export default rootReducer;
|
({
deletectm : function(component, event, helper) {
var event = component.getEvent("deleteCTM");
event.setParams({
'selectedcaseTeamMember':component.get("v.caseTeamWrapper")
});
event.fire();
}
}) |
module.exports = require('./tools/jest/jest.config');
|
function LoginOk(){
return (
<>
</>
);
}
export default LoginOk;
|
$(document).ready(function()
{
$("form").submit(rankGreeting);
});
function rankGreeting(event)
{
//Get first name
let firstName = $("input#fist-name").val();
//Get last name
let lastName = $("input#last-name").val();
//Get rank from radio button only one is selected
let rank =... |
import Game from '../init/InitGame';
import Configer from '../config/Configer';
import SimpleButton from '../Gui/SimpleButton';
class MainMenu extends Phaser.State {
constructor () {
super();
}
init (obj) {
this.fromPreload = obj.param;
this.overlay = obj.overlay;
}
create... |
import { List } from "antd";
import React, { Component } from "react";
export default class CreateResourceContainer extends Component {
render() {
return (
<List.Item>
<List.Item.Meta
title={<a href="https://ant.design">{this.props.name}</a>}
/>
</List.Item>
);
}
}
|
var express = require("express");
var app = express();
var port = 3000;
var path = require('path');
var bodyParser = require('body-parser');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(__dirname + '/public'));
var mongoose = require("mongoose");
mongoose.Promis... |
import React, { Component } from "react";
import { Typography, InfoIcon } from "components";
import { getIcon } from "../../lib/helpers";
import "./index.css";
export default class Info extends Component {
constructor(props){
super(props);
this.state = {
open: false
}
}
onInfoClick = () => {
... |
(function() {
var _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = p... |
/**
* @module App
* @summary First module loaded
*/
/*globals window, angular, document */
angular.module('app', [
'ngResource',
'ui.router',
'ui.bootstrap',
'item',
'item-new',
'items',
'overlay'
])
.config(['$stateProvider', function ($stateProvider) {
'use strict';
... |
import ImgGroupUpload from './src/index.vue'
ImgGroupUpload.install = (vue) => {
vue.component(ImgGroupUpload.name, ImgGroupUpload)
}
export default ImgGroupUpload
|
/**
* Created by elie on 31/08/16.
*/
function hideShowValuesCurrent(svg){
var duration = 800;
svg.hiddenValues = [];
svg.mapPercentDisplay = new Map();
svg.trSelec.each(function(d){
svg.mapPercentDisplay.set(d.item,{percentDisplay:1});
});
svg.onClick = function(d){
var clickedRow = ... |
const shareButton = document.getElementsByClassName("share-btn")[0];
const alert = document.getElementsByClassName("alert")[0];
shareButton.addEventListener("click", showAlert);
function showAlert() {
activeShareButton();
if (innerWidth <= 992) {
alert.classList.toggle("mobile-alert-show");
} els... |
import AuthReducer from './AuthReducer'
import BookingReducer from './BookingReducer'
import {firebaseReducer} from 'react-redux-firebase'
import { firestoreReducer } from 'redux-firestore';
import {combineReducers} from 'redux'
const RootReducer=combineReducers({
auth : AuthReducer,
booking : BookingReducer... |
import React from 'react';
const Aside = () => {
return (
<nav className="aside">
<div className="logo__holder">
<a href="https://redradix.com" className="logo">Logo</a>
</div>
<ul className="aside__list">
<li className="aside__list__item">
<a href="https://redradix.c... |
const express = require('express');
const axios = require("axios").default;
const fs = require('fs');
const app = express();
const port = 3000;
let tickString;
//Middleware
app.set('view engine', "ejs");
app.use(express.static("./public"));
//Routes
//root route
app.get('/', function (req, res) {
res.send('Hello W... |
import React from "react";
import MathJax from "react-mathjax2";
import { CSSTransition, TransitionGroup } from "react-transition-group";
import "./VisualTextsPanel.scss";
const VisualTextsPanel = props => (
<MathJax.Context input="tex">
<div className="vis-texts-panel">
<TransitionGroup>
{props.vi... |
import React from 'react';
const Banner = () => {
return (
<section className="wellcome_area clearfix" id="home">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div className="container">
<div className="row">
... |
module.exports = (a, b) => ({
'@part1.js': a ? `args` : 'none'
})
|
/*
This jscript file is there to write new values from the web interface to the PLC IEC task.
*/
// remember last accessed variable id so that input field can be cleared upon success.
var lastId;
// Writevar simply takes the variable ID (which equals the row number in the html table).
function writeVar(id)
{
lastI... |
import React, { Component } from 'react'
import uid from 'uid'
class Cartproductlist extends Component {
props(props){
}
render () {
return(
<div>
<table className="table">
<thead>
<tr>
<th>#</th>
... |
import React from 'react'
import { View, Platform, Text, StyleSheet, TextInput, TouchableOpacity } from "react-native"
export default class Sell extends React.Component {
constructor() {
super();
this.state = {
edit: true,
Quantity: " ",
Price: " ",
... |
var arrangeCoins = function(n) {
let k = 0
while (true) {
if (n >= k) {
n-=k
k+=1;
} else {
return k-1;
}
}
}; |
import React from 'react'
import marked from 'marked'
import { connect } from 'react-redux'
import FixButton from '../../../common/FixButton'
import DeleteButton from '../../../common/DeleteButton'
import './Article.css'
const mapStateToProps = state => ({
canEdit: state.articleList.canEdit
})
const Article = pro... |
import auth from './auth/reducer';
import eventFilter from './eventFilter/reducer';
import managedEvents from './managedEvents/reducer';
import upcomingEvents from './upcomingEvents/reducer';
import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
export default combineReducers({
... |
import React, { Component } from 'react';
import {
ScrollView,
StyleSheet,
TouchableOpacity,
View,
Text,
Image,
Dimensions,
} from 'react-native';
import {
Button,
Icon,
} from 'react-native-elements';
import I18n from '../i18n/index'
import imagesApp from '../constants/Images';
con... |
/**
* @name DashboardPageTitle
* @author Mario Arturo Lopez Martinez (CSI 43C9 Spring 2020)
* @overview Title for page sections/titles
* @param {string} title to be displayed
* @example <DashboardPageTitle title="Students" />
*/
import React from "react"
import styled from "styled-components"
const Background =... |
import React from "react";
import { Editor } from "draft-js";
import EditorParagraph from "./EditorParagraph";
import "../styles/css/styles.css";
const blockRendererFn = () => ({
component: EditorParagraph,
});
const InputEditor = (props) => {
return (
<div className="InputEditor">
<h2>Type below:</h2>
... |
var mongoose = require('mongoose')
var Product = require('./product')
var Faker = require('faker')
mongoose.connect('mongodb://localhost:27017/http-client', {useNewUrlParser: true})
async function generateProducts() {
for (let i = 0; i < 10; i++) {
let p = new Product ({
name: Faker.commerce.p... |
/*
* @Author: huangyuhui
* @Date: 2020-09-28 15:40:35
* @LastEditors: huangyuhui
* @LastEditTime: 2020-10-16 16:45:19
* @Description: 公共组件 工具 函数
* @FilePath: \SCM 2.0\src\components\common\utils.js
*/
/**
* 遍历对象
* @param {*} object
* @param {*} handler
*/
export function forEachObject(
object,
handler =... |
import React from 'react';
import {View, TextInput} from 'react-native';
export default () => {
return (
<View>
<TextInput placeholder = 'Search your favourite cocktail f'/>
</View>
)
}
// export default Search |
import qs from 'qs';
export default qs;
|
/**
*
* @param {*} value
*
*/
var type = function(value){
return Object.prototype.toString.call(value).slider(7,value.length-1).toLowerCase();
}; |
import ui from 'src/util/ui';
import API from 'src/util/api';
module.exports = {
async setup(printer, types) {
API.cache('printer', printer);
let varFormats = types.map(() => []);
const printers = await printer.getPrinters();
let varPrinterFormats = printers.map((printer) => ({
...JSON.parse(JS... |
/**1부터 20까지의(20을 포함) 모든 숫자를 일렬로 놓고 모든 자릿수의 총 합을 구하세요.
예를 들어 10부터 15까지의 모든 숫자를 일렬로 놓으면 101112131415이고
각 자리의 숫자를 더하면 21입니다. (1+0+1+1+1+2+1+3+1+4+1+5 = 21) */
let numbers = []
for (let i=1;i < 21 ; i++) {
numbers.push(i)
}
numbers = numbers.join('')
let SUM = 0;
for (let i=0;i < numbers.length;i++){
SUM += Number(nu... |
/*
* @Author: zhenglfsir@gmail.com
* @Date: 2018-12-03 23:27:30
* @Last Modified by: zhenglfsir@gmail.com
* @Last Modified time: 2019-03-05 20:58:44
*/
import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import { Provider } from 'react-redux';
import DocumentTitle from 'react-doc... |
'use strict';
import { debug } from '../../lib/index';
import { IncrementOpensService } from '../../lib/increment_opens_service';
export default (event, context) => {
debug('= incrementOpensCount.handler');
const incrementService = new IncrementOpensService(event.Records);
incrementService.incrementAll()
.t... |
const documentStore = require("../helper/documentStoreHolder");
const Room = require("../models/room");
const { v4: uuidv4 } = require('uuid');
exports.GetAll = async function () {
const session = documentStore.openSession();
const results = await session
.query({ indexName: "Room/ForSearch" })
... |
const { EventEmitter } = require('events');
const three = require('three');
const OBJLoader = require('./OBJLoader');
let robotParts = [];
function interfaceUser() {
const uiRenderer = new EventEmitter();
const renderer = new THREE.WebGLRenderer({ alpha: true });
renderer.setClearColor(new THREE.Color('lightgr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.