text
stringlengths
7
3.69M
var btns=document.getElementsByTagName('button'); var cat=document.getElementsByClassName('cat')[0]; for(i=0;i<btns.length;i++) { console.log(btns[i]); btns[i].addEventListener('click',()=>{ cat.classList.add('blue-eyes'); cat.classList.remove('blue-eyes'); ...
/*Detecting buttons and tell it to do something const button = document.getElementById("see-review"); button.addEventListener("click", function () { const review = document.getElementById("review"); if (review.classList.contains('d-none')) { review.classList.remove('d-none'); button.textContent = 'CLOSE...
import axios from 'axios' var instance = axios.create({ baseURL: '/admin', withCredentials: true, headers: { 'Content-Type': 'application/json;charset=utf-8' }, // timeout:20000 }); export default instance;
import { action, computed, thunk, thunkOn } from 'easy-peasy' import { getOrder, getOrderId, removeOrder, updateOrder } from 'Services/order' const orderAdmin = { orders: [], orderDetail: {}, page: 1, count: computed((state) => state.orders.length), loading: false, loadingOrderDetail: false, setLoading:...
const { app, ipcMain, BrowserWindow } = require('electron') var express = require('express') var ex_app = express() var server = require('http').createServer(ex_app) var request = require('request') const fs = require('fs') const path = require('path') global.ips = [] app.on('ready', () => { // Crea...
/* eslint-disable react/require-default-props */ /* eslint-disable react/forbid-prop-types */ import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; import Icon from '../../../icon/Icon'; import IconsStore from '../../IconsStore'; import { FieldContainer, Fie...
'use strict'; const joi = require('joi'); /** * Результат проверки. * * @typedef {Object} ValidationResult * @property {Boolean} isValid * @property {String} [message] */ /** * Проверяет запрос на соответствие схемам. * * @param {express.Request} req * @param {Object} schemas * @returns {ValidationResult}...
const DataTypes = require("sequelize"); const sequelize = require("../config/sequelize"); const Comment = sequelize.define('Comment', { description: { type: DataTypes.STRING, allowNull: false } }, { // timestamps: false }); Comment.associate = function(models){ Comment.belongsTo(mod...
$(document).ready(function() { // Добавление класса для мобильного if ($('.small-cart-table tr').length) { $('.small-cart-icon').addClass('small-cart-icon--open'); } else { $('.small-cart-icon').removeClass('small-cart-icon--open'); } // Заполнение корзины аяксом $('body').on...
import ContentConsumer from '../../ctrl-react-content-consumer' import PropTypes from 'prop-types' import React from 'react' import ReactDOM from 'react-dom' import ReactTestUtils from 'react-dom/test-utils' import {checkChild} from '../lib/utilities' const CONTENT = { articles: [ {body: `He's the reason for the...
const bouncyness = 0.007; (function() { AFRAME.registerComponent( 'tokens', { init: function() { }, tick: function (time, delta) { var self = this; const tokens = window.tokens; const initialSetup = !tokens.find(token => token.obj && window.BATscene.contains(token.obj)); for(let i = 0; i < tokens...
eserver = require('express'); const product_class = require('./services/products') productRouter = require('./apis/product').productRouter; cartRouter = require('./apis/cart_api').cartRouter; server = eserver() const parser = require('body-parser'); server.use(parser.json()); const cors = require('cors'); server.use(c...
import React, { Component } from "react"; export default class Comp3 extends Component { render() { return ( <div style={{ backgroundColor: "blue", height: "100%" }}> <h1>Comp3...</h1> </div> ); } }
const { generateFieldMask, applyFieldMask } = require('./lib/fieldmask'); module.exports.generateFieldMask = generateFieldMask; module.exports.applyFieldMask = applyFieldMask;
export { TransactionHistoryPage } from './transaction-history';
function getChildWithClassname(parent, classname) { if (!parent) { return false; } for (var i = 0; i < parent.childNodes.length; i++) { if (parent.childNodes[i].className == classname) { return parent.childNodes[i]; break; } } } export default getChildWithClassname;
// ==UserScript== // @name Zhihu Auto Dark Mode // @name:zh-CN 知乎自动切换深色模式 // @namespace http://tampermonkey.net/ // @version 0.1 // @description Turn on/off dark mode automatically in zhihu.com based on the color scheme of OS. // @description:zh-CN 根据系统配色自动开...
/** * Created by Tran Tien on 14/02/2017. */ var Waste = require('../../app/models/status.js'); var UserPost = require('../../app/models/user.js'); var Hastag = require('../../app/models/hastag.js'); function getNewFeed(id_user,follower,skip,callback) { var requestedWastes = []; if(follower.length>0)...
/* * ---------------------------------------------------------------------- * VueJS + Buefy handler for displaying toast and snackbar notifications * API: https://buefy.github.io/#/documentation/toast * depends on VueJS and Buefy (and Bulma) * * inspired by JACurtis notifiation.blade.php/LaraFlash Package...
var EBE_TopSwitchView = function(holderEl,el){ if( el.length == 0 ){return;} var i; var index = 0; var isInit = false; var timer = -1; var ulEl = el.find("ul"); var liEl = el.find("li"); var liCount = liEl.length; var liWidth = 0; var liHeight = 0; var navPanelEl = $("<div cl...
// Some function used in this section will be used in other section. // This is one of the possible way to share them between sessions. let R4A = {}; { let n = 5; // the array with the progress bars & the PromiseGUI let pbs = []; let pguis = []; for(let i = 0; i < n; i++){ pbs[i] = new ProgressBa...
// @desc this is the 'store setiings' componenent // @author Sylvia Onwukwe import React from "react"; import NavPills from "../../components/NavPills/NavPills"; import Subscribers from "../../containers/Admin/Subscribers"; import SendNewsletter from "./NewsLetter/newsletters"; import ContactForm from "./ContactForm/c...
import User from "../models/User"; export const createUser = async (req, res) => { res.json('Creating User'); }; export const getUsers = async (req, res) => { const user = await User.find(); return res.status(200).json(user); };
import { React, useState, useRef, useCallback, useEffect } from 'react'; import { Form, Button } from 'react-bootstrap' import DayPicker, { DateUtils } from "react-day-picker"; import { axios_non_auth_instance } from '..'; import ReactCrop from 'react-image-crop' const SignUpForm = () => { const [dates, setDates] = u...
import React, { Component } from 'react'; class Toggler extends Component { constructor(props) { super(props); this.state = { onButton: false, }; } changedText = () => { this.setState({ onButton: !this.state.onButton, }); }; render() { return ( <button className="t...
export default class BookmarkService { constructor(bookmarkUri) { this.validateAuthentication = function (request) { return request.then(r => { if (r.status === 401) { return Promise.reject() } else { return r } }) }; this.bookmarkUri = bookmarkUri...
import React from 'react'; import './style.sass'; export class Counter extends React.Component { constructor (props) { super (props); this.state = { status: false, startValue: this.props.startValue, } } increaseCounter = () => { this.setState( (state...
import React, { useEffect } from 'react'; import { useSelector } from 'react-redux'; import { useDispatch } from 'react-redux'; import { Link, useHistory } from 'react-router-dom'; import { listData } from '../store/list/action'; import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; import { upda...
var data = new Array(); var type = new Array(); type = [ [12,25,19,44], [12,38,26,56], [12,25,2,61], ] type.forEach(function(item,i) { data[i] = [ { value: item[0], color:"#8cc63f", }, { value : item[1], color : "#d7df21", }, { value : item[2], color : "#00aeef", }, { v...
(function(angular) { 'use strict'; // Referencia para o nosso app var app = angular.module('app'); // Cria o controlador de autenticação app.controller('AuthController', ['$scope', 'User', function($scope, User) { // Redireciona para a página autenticada if (User.getAuthenticated()) { window.location = ...
import React, { Component } from 'react'; import './App.css'; import CategoryList from '../components/CategoryList'; import Header from '../components/Header'; import SelectionList from './SelectionList'; import NavBar from '../components/NavBar'; //App container class App extends Component { constructor(props) { ...
/** * === page === * * created at: Tue Jun 27 2017 18:27:29 GMT+0800 (CST) */ import articles from 'data/article' import AsyncComponent from 'modules/AsyncComponent' const articleList = MY_ARTICLE_DATA import { React, Page } from 'zola' export default class Index extends Page { render () { const renderC...
import Vue from 'vue'; import VueRouter from 'vue-router'; // Components. import ViewNotFound from '../src/components/ViewNotFound.vue'; import Signup from '../src/components/Signup.vue'; import Login from '../src/components/Login.vue'; import Post from '../src/components/Post.vue'; import AuthorProfile from '../src/c...
/** * 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 or agreed to in writing, software * distributed unde...
/** * 1.获取用户的收货地址 * 1.绑定点击事件 * 2.调用小程序内置api 获取用户的收货地址 * 2.获取用户对小程序所授予获取地址的权限状态 scope * 1.假设用户点击获取收获地址的提示框 确定(scope值为true)authSetting scope.address * 2.假设用户点击获取收货地址的提示框 取消(scope 值为 false) * 3.将地址存入到缓存当中方便当前应用和其它应用查看 * 2.页面加载完毕 * 0.onload show ...
import React, { Component } from 'react' import * as S from './TelaUsuarioStyle' class TelaUsuario extends Component { constructor(props){ super(props) this.state={ usuario:{ nome:'',celular:'',email:''}, } this.OnHandleChange...
const path = require('path'), _ = require('lodash'); module.exports = function (config) { let args = process.argv.slice(_.findIndex(process.argv, a => path.resolve(__dirname, a) === __filename) + 1); global.args = {}; for (let arg of args) { if (arg.indexOf('=') !== -1) { let par...
// Require the framework and instantiate it const fastify = require('fastify')({logger: true}) fastify.register(require('fastify-cors'), { origin: /.*/, allowedHeaders: ['Origin', 'X-Requested-With', 'Accept', 'Content-Type', 'Authorization'], methods: ['GET', 'PUT', 'PATCH', 'POST', 'DELETE', 'OPTIONS'] })...
const axios = require('axios'); const getGeocode = (address) => { return new Promise((resolve, reject) => { axios.get('https://maps.googleapis.com/maps/api/geocode/json', { params: { address, }, }) .then(response => { if (response.data.status === 'ZERO_RESULTS') { ...
import React, { useContext } from "react"; import { MenuItem, Select, Typography } from "@material-ui/core"; import FormControl from "@material-ui/core/FormControl"; import { withStyles, makeStyles } from "@material-ui/core/styles"; import CourseContext from "../../context/course/courseContext"; const StyledSelect = w...
/** * Created by Administrator on 2017/1/6. */ /*Bootlint Bootlint 是 Bootstrap 官方所支持的 HTML 检测工具。在使用了 Bootstrap 的页面上(没有对 Bootstrap 做修改和扩展的情况下), 它能自动检查某些常见的 HTML 错误。纯粹的 Bootstrap 组件需要固定的 DOM 结构。Bootlint 就能检测你的页面上的这些“纯粹”的 Bootstrap 组件是否符合 Bootstrap 的 HTML 结构规则。建议将 Bootlint 加入到你的开发工具中, 这样就能帮你在项目开发中避免一些简单的错误影响你的开发进度。*...
var searchData= [ ['desktop',['desktop',['../class_screen_saver.html#a02d489a9a5ff5777d0aa29f8552efe35',1,'ScreenSaver']]], ['detachactionbutton',['DetachActionButton',['../struct_calendar_tools.html#a4c4ae188d97622a4da7b1b0c47f7629d',1,'CalendarTools']]], ['detachmenu',['DetachMenu',['../struct_calendar_tools.ht...
({ getAttachmentRecords: function (component, event, helper) { let filterApplied = component.get("v.isFilterApplied"); let currentUsertimeZone = $A.get("$Locale.timezone"); let recId = component.get("v.recordId"); if(recId){ helper.callServer( component, ...
!function (e) { var t = e.amkit; t || (t = e.amkit = {}); var n = t.entry; n || (n = t.entry = {}), n.getScript || (n.getScript = function () { var e = /loaded|complete/, t = document.getElementsByTagName("head")[0] || document.documentElement, n = t.getElementsByTagName("base")[0]; retu...
import usersModel from '../../models/usersModel.js' import passport from 'koa-passport' // паспорт напрямую с базой не работает passport.serializeUser(function (user, done) { done(null, user._id); }); passport.deserializeUser(function (id, done) { usersModel.findById(id, (err, user) => { if (err) done(e...
/* Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. Note: Given n will always be valid. Try to do this in one pass. */ var ListNode = fun...
// var Table = function (id, product_name, price, stock_quantity){ // this.id=id, // this.product_name= product_name, // this.price= price // this.stock_quantity= stock_quantity // } // module.exports= Table; var mysql = require("mysql"); var inquirer = require("inquirer"); var Table = require("cli-ta...
const array = [1, 2, 3]; export const isES6 = () => console.log(...array); export const bobby = { name: 'Bobby', age: 18 };
/** * @file Tree.js * @author zhangzhe([email protected]) */ import {DataTypes, defineComponent} from 'san'; import _ from 'lodash'; import TreeNode from './TreeNode'; import {create} from './util'; const cx = create('ui-tree'); /* eslint-disable */ const template = `<div class="{{mainClass}}"> <ui-tree-node...
'use strict' const mongoose = require('mongoose'); const moment = require('moment'); const config = require('../../config'); const Simcard = require('./simcard'); mongoose.Promise = global.Promise; let RechargeHistorySchema = new mongoose.Schema({ _simcardId: { type: mongoose.Schema.Types.ObjectId, ref: 'Simca...
import api from './api'; import i18n from './i18n'; import lang from './langCodes'; import parseResponse from './parseResponse'; export { api, i18n, lang, parseResponse };
import React, { useEffect, useState } from "react"; import { NavLink } from "react-router-dom"; import logo from "./image/Plabon Express.jpg"; import "./Navbar.css"; const Navbar = () => { const [scrolled, setScrolled] = useState(false); const handleScroll = () => { const offset = window.scrollY; if (offse...
import React from 'react' import {Drawer as MUIDrawer, ListItem, List, ListItemIcon, ListItemText } from "@material-ui/core"; import { makeStyles } from "@material-ui/core"; import { withRouter } from "react-router-dom"; import DashboardIcon from '@material-ui/icons/Dashboard'; import Li...
const fs = require("fs") exports.index = async (req, res,next) => { if(!req.installScript){ next() return } res.render('install/index',{}); } exports.install = async(req,res,next) => { if(!req.installScript){ next() return } //read env file const filePath = r...
[{"locale": "es"}, {"key": "2135", "mappings": {"default": {"default": "alef"}}, "category": "Lo"}, { "key": "2136", "mappings": {"default": {"default": "bet"}}, "category": "Lo" }, {"key": "2137", "mappings": {"default": {"default": "guímel"}}, "category": "Lo"}, { "key": "2138", "mappings": {"defa...
$(document).ready(function() { console.log("Page has loaded...") // ----------------------------------- DECLARE VAROABLES &&& FUNCTIONS------------------------------------------------ var searchTermArray = ["Superman", "Batman", "Wonderwoman", "Poison Ivy"]; var searchTerm = ""; var searchTermNum = ""; function...
import React, { Component } from 'react'; import {Upload,Button,Icon, Divider} from 'antd'; class Statistics extends Component { constructor(props){ super(props); } onclick = () => { var path = { pathname:'/index/edit/111', state:{name:1,id:2}, } th...
import React from "react" import { View, Image, ImageBackground, TouchableOpacity, Text, Button, Switch, TextInput, StyleSheet, ScrollView } from "react-native" import Icon from "react-native-vector-icons/FontAwesome" import { CheckBox } from "react-native-elements" import { connect } from "react-re...
function username() { let name = document.getElementById('usrnme').value; let regEx = /[A-Z]\w{5,7}\d/g; let result = regEx.test(name); var matched; if (result) { matched = 'Matched'; } else { matched = 'Username must start with a capital letter, must be 5-8 letters long and must end with...
const MongoClient = require('mongodb').MongoClient; const performance = require('performance'); const results = performance.runBenchmarks(); let collection; MongoClient.connect('mongodb://localhost/').then((client) => { const db = client.db('ivydatabase'); collection = db.collection('attractions'); }) const ge...
/* WHAT IS THIS? This module demonstrates simple uses of Botkit's `hears` handler functions. In these examples, Botkit is configured to listen for certain phrases, and then respond immediately with a single line response. */ module.exports = function(controller) { controller.hears(['cheese'], 'direct_message,...
var should = require( 'should' ); var argp = require( '../' ); describe( 'parse all test', function () { it( 'parse to true in -', function () { var result = argp( [ '-a','ab', '-b','', '-c','d', '--e','fg', '-hij','kf','k3f', ] ); ...
import React from 'react' import { render } from '@testing-library/react' import user from '@testing-library/user-event' import Todo from './Todo' import RenderTodos from './RenderTodos' describe('<Todo />', () => { const mockTodo = { id: 1, todo: 'test todo' } it('should render a todo object', () => { const ...
$(function() { //自定义密码校验规则 $.validator.addMethod("password", function(value, element, params) { //5~10位数字和字母的组合 var pwd = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,10}$/; return this.optional(element) || pwd.test(value); }, $.validator.format("密码必须是5~10位数字和字母的组合")); //自定义不等于校验规则 $.validator.addMethod("no...
import React, { useState } from 'react'; import plus from '../../img/icons/plus.png'; import minus from '../../img/icons/minus.png'; import classes from './ProjectDropdown.module.scss'; const ProjectDropdown = ({ dropdown: { title, text } }) => { const [isDroppedDown, setIsDroppedDown] = useState(false); const [is...
/* In relational databases such as SQL, the data are stored in many 'tables' in a database, and some fields of each table has a connection to another table. This is called a 'foreign key.' These tables are conncted in such a way to prevent flooding one table with too much data. Also, when using SQL syntax, you must e...
const { BinarySearchTree } = require('../challenges/tree/Tree'); describe('binary search tree recursive implementation', () => { it('should have a constructor function that creates a BST with a null root if no arguments are passed', () => { const testTree = new BinarySearchTree(); expect(testTree.root).toEqu...
import styled from 'styled-components' import SecondButton from '../SecondButton' import PrimaryButton from '../PrimaryButton' import authFetch from '../../utils/authFetch' import { SERVER_URL } from '../../Constants/api' import { useDispatch } from 'react-redux' import { receiveMessage, showToast } from '../../feature...
import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' import ApiMaster from "./api/ApiMaster"; import 'bootstrap/dist/js/bootstrap.min' import 'bootstrap/dist/css/bootstrap.min.css' import 'bootstrap-vue/dist/bootstrap-vue.css' import 'bootstrap-vue/dist/bootstrap...
import "antd/lib/input/style/css"; import Input from "antd/lib/input"; export default Input;
(function(global, $) { "use strict"; var LCC = global.LCC || {}; LCC.MaxCharacters = LCC.MaxCharacters || {}; LCC.MaxCharacters.setMaxCharacters = function (element, maxlimit) { var new_length = element.val().length; if (new_length >= maxlimit) { element.val(element.val().substring(0, maxlimit)); ...
import mongoose from 'mongoose' const db = async () => { try { const conn = await mongoose.connect( 'mongodb://localhost:27017/contactapp', { useNewUrlParser: true, useFindAndModify: true, useCreateIndex: true, useUnifiedTopology: true, } ) console.log(`${...
import {BigNumber} from 'bignumber.js'; import moment from 'moment'; import _ from 'lodash'; export default { getInfo(_this) { var me = this; window.addEventListener('load', function() { me.init(_this); me.getEmployeeList(_this); }); // todo 路由切换做单独判断 ...
import React from 'react'; import './style.scss'; export const Gallery = ({ imagesUrls }) => { return imagesUrls ? ( <div className='gallery'> {imagesUrls.map((image) => ( <div key={image}> <img src={image} alt={image} /> </div> ))} </div> ) : null; };
const express=require('express') const cors=require('cors') const bodyParser=require('body-parser') const mongoose=require('mongoose') const app=express() // app.get('/',(req,res)=>{ // res.send('<h1>Hello I am a Node Server Running on PORT 4444</h1>') // }) const DB='mongodb+srv://shobuj:[email protected]...
const initialState = 'all'; const wavelength = (state = initialState) => state; export default wavelength;
import 'date-fns'; import React from 'react'; import Grid from '@material-ui/core/Grid'; import DateFnsUtils from '@date-io/date-fns'; //npm i --save date-fns@next @date-io/date-fns import { MuiPickersUtilsProvider, KeyboardTimePicker, KeyboardDatePicker, } from '@material-ui/pickers'; //npm i @material-ui/pi...
export const firebaseConfig = { apiKey: "AIzaSyB0P9moF_oBRXIat2DHEOg4gA3J4yTDGoM", authDomain: "find-differences-d9e3a.firebaseapp.com", databaseURL: "https://find-differences-d9e3a.firebaseio.com", projectId: "find-differences-d9e3a", storageBucket: "find-differences-d9e3a.appspot.com", messagi...
import React from "react"; import Section from './Section'; import Section2 from './Section2'; function Main(){ return (<div> {/* Sections provide with content for the main page */} <Section /> <Section2 /> </div>); } export default Main;
'use-strict'; var rootPath = require('rfr'); var AppPath = rootPath('/app/appConfig'); var role = AppPath('/model/userRoleModel'); var Manager = AppPath('/server/dataAccess/entityManager'); var Exception = AppPath('/exceptions/baseException').Exception; var tableKeyGen...
import { strings } from './Strings'; describe('Testing strings', () => { const supportedLanguages = ['en', 'fr']; supportedLanguages.forEach((language) => { const otherLanguages = Object.keys(strings).filter(element => element !== language); otherLanguages.forEach((anotherLanguage) => { Object.keys(s...
import React, { useState, useEffect } from "react"; import Demo from "./Demo"; import {BarChart, Bar, Cell, XAxis, YAxis, CartesianGrid, Tooltip, Legend} from "recharts"; class ResultsGraph extends React.Component { state = { data: [ {name: 'Page A', uv: 0.2, pv: 2400, amt: 2400}, ...
import React from 'react' import ghost_mirrors from '../../images/paintings/ghost_mirrors.jpg' import PaintingsComponent from "../../components/paintings_component"; const Megadoodle = () => ( <PaintingsComponent image={ghost_mirrors} title={'Megadoodle'}> <p>Ball point pen on paper</p> </PaintingsComp...
import * as types from "./actionTypes"; export const closeSlide = () => { return { type: types.CLOSE_SLIDE, }; }; export const setArticle = (article) => { return { type: types.SET_ARTICLE, article: article }; };
import '../iconfont/iconfont.css'; import React, { Component, PropTypes } from 'react'; const Iconfont = ({ type }) => { return ( <i className={'anticon iconfont icon-'+type}> </i> ); }; export default Iconfont;
$(function () { $.get('/wip/forms/accountInfo.php/?id=1', function (data) { var result = JSON.parse(data); $('#firstNameField').val(result['FIRST_NAME']); $('#lastNameField').val(result['LAST_NAME']); $('#emailField').val(result['USERNAME']); $('#studentField').val(result['ST...
const playList = [ { title: 'Aqua Caelestis', src: '../assets/sounds/play-0.mp3' }, { title: 'Ennio Morricone', src: '../assets/sounds/play-1.mp3' }, { title: 'River Flows In You', src: '../assets/sounds/play-2.mp3' }, { title: 'Summer Wind', src: '../assets/sounds/play-3.mp3' }, ]; JSON.stringify(playList); ex...
import React, { Component } from 'react'; import logo from '../assets/logos.svg'; import '../assets/main.css'; import { connect } from "react-redux" import { change_page_action } from "../redux/actions/syncActions/myActions" import search_action from "../redux/actions/asyncActions/searchAction" import Cafe from "../ass...
function solve(arr) { console.log(arr[arr.length - 1]); } solve(['One', '"Two', '-']);
import React, { Component } from "react"; import PropTypes from "prop-types"; import { connect } from "react-redux"; import { toggleTodo, removeTodo, addTodo, filterTodo } from "../actions/index"; import { filters } from "../const/filters"; class Index extends Component { constructor(props) { super(props); ...
(function(){ angular.module('app.data').service('dataService',DataService); DataService.$inject=['$http','$q']; function DataService($http,$q){ this.saveData=saveData; this.getData=getData; //save data to the database function saveData(url,data){ consol...
'use strict'; // Include Gulp & Tools We'll Use var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var runSequence = require('run-sequence'); var browserSync = require('browser-sync'); var reload = browserSync.reload; var plumber = require('gulp-plumber'); var AUTOPREFIXER_BROWSERS = [ 'ie >= 10', ...
var fs = require('fs'); fs.rename('arquivo1.txt', 'arquivoNovo.txt', function (err) { if (err) throw err; });
module.exports = { fundsList: [ { key: 'DIVDUR', name: 'Afer Diversifié Durable', }, { key: 'SFER', name: 'Afer Sfer', }, { key: 'ACEURO', name: 'Afer Actions Euro', }, { key: 'ACMOND', name: 'Afer Actions Monde', }, { key: 'AME...
const mongoose = require('mongoose') // 定义Schema const UserSchema = new mongoose.Schema({ id: { type: 'Number', required: true }, phone: { type: 'String', required: true }, password: { type: 'String', required: true }, nickname: { type: 'String' // 用户名 }, sex: { type: ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Light = require("./Light"); const lightSettingsResource = require("./lightSettingsResource"); SupRuntime.registerPlugin("Light", Light); SupRuntime.registerResource("lightSettings", lightSettingsResource);
import React, { Component } from 'react'; import { View, ScrollView, Text, ListView } from 'react-native'; import { connect } from 'react-redux'; import RocketSeatActions from '../Redux/RocketSeatRedux'; import { RocketSeatSelectors } from '../Redux/RocketSeatRedux'; import styles from './Styles/RocketSeatListStyle'; ...
// IBM Watson image recognition var request = require('request'); function toBuffer(ab) { var buffer = new Buffer(ab.byteLength); var view = new Uint8Array(ab); for (var i = 0; i < buffer.length; ++i) { buffer[i] = view[i]; } return buffer; } function getTags(imageURL, imageID, completion) { try { r...
import { render } from 'react-dom'; import { Provider } from 'react-redux'; import h from 'react-hyperscript'; import { Router, browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import store from './store'; import routes from './routes'; // import { App } from './app/compo...
// Constructor function State(numberOfRehersals, condition, conditionProbability, playerName, maxTime, lagn) { this.numberOfRehersals = numberOfRehersals; this.maxTime = maxTime; this.numberOfAnswers = 8; this.condition = condition; this.keyPresses = new Array(numberOfRehersals); this.score = 0...