text
stringlengths
7
3.69M
export const data = [ { name: 'Jan', "Active users": 1500, }, { name: 'Feb', "Active users": 1800, }, { name: 'Mar', "Active users": 2300, }, { name: 'April', "Active users": 2800, }, { name: 'May', "...
/** * Copyright 2016 Google Inc. * * 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...
/* eslint-disable no-useless-constructor */ /* eslint-disable no-unused-vars */ import React, { Component } from "react"; class Footer extends Component { constructor(props) { super(props); } render() { return ( <div className="footer"> <span> ...
/** * Created by timothy on 27/05/16. */ function P3 (hook) { this.D3 = d3.select("."+hook); this.width = 0; this.height = 0; this.backgroundColour = d3.rgb(0, 0, 0); this.fillColour = d3.rgb(0,0,0); this.shapes = {}; } P3.prototype = { constructor: P3, resize:function (x,y) { ...
import serverless from 'serverless-http' import Koa from 'koa'; import Router from 'koa-router'; import bodyParser from 'koa-bodyparser'; const app = new Koa(); const router = new Router(); router.get('/', (ctx) => { ctx.body = {"Message": "Hello World!!!!"}; }); app.use(bodyParser()); app.use(router.routes()); ap...
"use strict"; var React = require("react-native"); var { StyleSheet } = React; module.exports = StyleSheet.create({ quizButton: { margin: 5, flex: 1, borderRadius: 1, backgroundColor: "#20B573", alignItems: "center", alignSelf: "stretch", justifyContent: "center", fl...
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { color, space, typography, compose } from 'styled-system'; import { createPropTypes } from '@styled-system/prop-types'; import { deprecate } from '../../helpers/propTypes'; const system = compose(color, space...
$(document).ready(function() { // Catalog menu $('#j-catalog__button').on('click', function() { $('#j-catalog__nav.j-offcanvas').addClass('j-offcanvas--open'); }); // Page menu $('#j-page__button').on('click', function() { $('#j-page__nav.j-offcanvas').addClass('j-offcanvas--open...
// eslint-disable-next-line camelcase import jwt_decode from 'jwt-decode'; export const isAuthenticated = () => { const token = window.localStorage.getItem('access_token'); let decoded; if (token) { decoded = jwt_decode(token); return new Date(decoded.exp * 1000) > new Date(); } return false; }; ex...
export const REQUEST_TYPE = { CREDIT: "CREDIT", DEBIT: "DEBIT" }; export const REFERENCE_TYPE = { purchaseOrder: { value: "PURCHASE_ORDER", display: "PO" }, invoice: { value: "INVOICE", display: "Invoice" }, others: { value: "OTHERS", display: "Others" } };
var Clapp = require('../modules/clapp-discord'); var jsonfile = require('jsonfile-promised'); var rpg = require('../rpg/player.js'); var playerDB = __dirname + "/../rpg/db/players.json"; module.exports = new Clapp.Command({ name: "rpg", desc: "Plays the RPG game", fn: (argv, context) => { // This output wil...
/**PC导航**/ $(function(){ $('.language').mouseenter(function(){ var $this = $(this); $this .find('.nf-ol') .css('display', 'block') .addClass('animated-fast fadeInUpMenu') }).mouseleave(function(){ var $this = $(this); $this .find('.nf-ol') .css('display', 'none') .removeClass('animated-...
/*global LocalCache, appVersion */ describe('app-version', function() { beforeEach(function() { this.originalTime = appVersion.loadTime; this.originalConfig = exports.config.configRefreshRate; exports.config.configRefreshRate = 5 * 60 * 1000; this.originalStarted = Backbone.history.started; Backb...
/*$('.header_menu_item').hover(function(){ $(this).fadeTo('1000', 0.8); // },function(){ $(this).fadeTo('1000', 1.0); // });*/ //alert('aae');
/** * Title.js * @author Huy Vo */ import React, {Component } from 'react'; import './Title.css'; import Tabs from './tabs/Tabs'; import TimeTab from './tabs/TimeTab'; import DateTab from './tabs/DateTab'; import SearchBar from './Search'; class Title extends Component { constructor(props){ super(pro...
const path = require('path'); const spawn = require('cross-spawn'); const fs = require('fs'); const fse = require('fs-extra'); const chalk = require('chalk'); const ProgressBar = require('progress'); const { name:CLI_NAME } = require('../../package.json'); const { writeFile, findYarn, emptyDirectory, confirm } = requi...
export default { // websocket实例 ws: null, //websocket实例 init (config, onMessage, onError) { if (!this.ws) { this.ws = new WebSocket(`ws://localhost:3000/${config.user.id}`) } this.ws.onmessage = event => { console.log('前端收到了message', event.data) let message = JSON.parse(event.data) ...
/** * @author Jon Jouret */ jQuery.sap.declare("controls.RoundedTile"); jQuery.sap.includeStyleSheet("controls/roundedTile.css"); jQuery.sap.require("sap.m.StandardTile"); sap.m.StandardTile.extend("controls.RoundedTile", { metadata : { properties : { // Icon color property with default value to standard UI5 ...
let count = parseInt(prompt("Enter a number to count down")); for (let i = count; i >= 0; i--) { document.write(i + ","); }
/* * backpack-node-sass * * Copyright 2018-2021 Skyscanner Ltd * * 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 ...
import React, { Component } from "react"; import { api } from "../../services/ApiConfig"; import PodContainer from "../shared/PodContainer"; import "../../styles/Pods.css"; class Pods extends Component { constructor(props) { super(props); this.state = { pods: [] }; } componentDidMount() { ...
import React from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' const MainUsers = (props)=> { return( <div> <p>User Dashboard</p> {props.children} </div> ) } MainUsers.propTypes = { children : PropTypes.element.isRequired } const ma...
const pool = require('../db/index') module.exports = class User{ constructor({username, email, password}){ this.username = username this.email = email this.password = password } async save(){ const user = await pool.query( 'INSERT INTO USERS (username, email, pa...
var foo = 'bad single quotes';
var escapeGhosts = function(ghosts, target) { let curr = [0,0]; while ((curr[0] !== target[0] && curr[1] !== target[1]) ) { if (target[0] > curr[0]) { curr = [curr[0]+1, curr[1]]; } else if (target[0] < curr[0]) { curr = [curr[0]-1, curr[1]] } else if (target[1] >...
import React, { useState } from "react"; import "react-datepicker/dist/react-datepicker.css"; import Modal2 from "../../modal" import "../../Dashboardcard.css" const Custom = () => { const [startDate, setStartDate] = useState(new Date()); return ( <div> <div className=" grid grid-flow-col pr-60"> ...
const nock = require('nock'); const configCoinApi = require('../../../config').common.braveNewCoinApi; const coinObjects = require('../objects/crypto_coins'); exports.mockGetCoinOK = (params, responseCoin = coinObjects.coinApiTickerBTC) => { nock(configCoinApi.endpoint) .get(`/${configCoinApi.routes.ticker}`) ...
import React from "react"; import "./About.css"; import { selectDarkmode, setDarkMode } from "./features/userSlice"; import { useDispatch, useSelector } from "react-redux"; function About() { const darkmode = useSelector(selectDarkmode); return ( <div className="about"> <h1 className={darkmode === true ...
import { attachChildren } from "./render/attachChildren" import { createTreeNode } from "./render/prepareRenderComponent" import { screenRouter } from "./render/screenRouter" import { createStateManager } from "./state/stateManager" import { getAppIdFromPath } from "./render/getAppId" export const createApp = ({ com...
import auth from '@/auth/authService'; export default { isUserLoggedIn: () => localStorage.getItem('userInfo') && auth.isAuthenticated() };
var table=null; $(function(){ table = $('#blog_table_id').dataTable(); getAllBlog(); }); function getAllBlog(){ $.ajax({ contentType : "application/json", processData : true, url : 'getBlog.html', type : "GET", dataType : "json", cache : false, async : true, success : function(response){ tab...
import { createSlice } from '@reduxjs/toolkit'; const initialState = { uId: null, email: '', photoURL: '', displayName: '', isAuthenticated: false, userType: 'player' } export const userSlice = createSlice({ name: 'user', initialState, reducers: { // methods to update our state ...
export default class MyMap { constructor() { this.world = new World({element: document.querySelector('#my_map')}); return this.world; } }
import React from 'react'; const MatchRate = props => ( <div style={{backgroundSize: 'cover', width: '100%', height: '750px'}}> <h1 className="display-4 indigo-text text-darken-4" style={{padding:"0px 0px 200px 40px"}}>MATCH RATE</h1> <p className="lead indigo-text text-darken-4" style={{padding:"0px 25px 0p...
import React from 'react' import ProductSummary from './productSummary' function ProductList({products}) { return ( <div className="container"> <div className="row row-cols-4"> {products && products.map(product=>{ return( <div className="cell smal...
import React from "react"; import { ScrollView, StyleSheet, Text, View } from "react-native"; import { useTeams } from "../../contexts/TeamsContext"; import { useTheme } from "../../contexts/ThemeContext"; import { getListStyles } from "./Styles"; const TeamsResults = () => { const {teams, addNewTeam} = useTeams() ...
import React, { Component } from 'react'; import './App.css'; import Home from './Component/Home/Home'; import Skills from './Component/Skills/Skills'; import Works from './Component/Works/Works'; import Form from './Component/Form/Form'; import Navbar from './Component/Navbar/Navbar'; import { Route} from 'react-route...
const express = require('express'); const router = express.Router() const Members = require('../../controllers/members.controller'); router.post('/', (req, res) => { console.log('POST /members/'); Members.create(req, res); }); router.put('/', (req, res) => { console.log('PUT /members/'); Members.updat...
class Calculator { constructor(aimString) { this.aimString = aimString this.aimArray = aimString.split(' ') this.signStack = [] this.numStack = [] } /** * 调用该方法获得计算结果 */ calculate() { this.inputSignAndNum() // 当数字栈只有一个数字时,那就是结果 while (this.numStack.length !== 1) ...
var searchData= [ ['elementwisemultiplication',['elementWiseMultiplication',['../classVector3D.html#aa464747455b93d84f15856493692cf04',1,'Vector3D']]], ['elementwisepower',['elementWisePower',['../classVector3D.html#a0006a0a729d3d99259024cdcb354eb5d',1,'Vector3D']]], ['empty',['empty',['../classFixedSizeStack.htm...
// Copyright (c) 2017, Lewin Villar and contributors // For license information, please see license.txt frappe.ui.form.on('Paciente', { refresh: function(frm) { //El usuario solo puede agregar la ARS al crear el paciente, luego solo las ARS pueden modificar estos campos if (!frm.doc.__islocal){ frm.set_df_pro...
cc.Class({ extends: cc.Component, properties: { }, // use this for initialization onLoad: function () { this.node.setPosition(cc.p(0,0)); this.menuState = 'DOWN'; //监听列表探入弹出事件 this.node.on('move-up',this.moveUp,this); this.node.on('move-down',this.moveD...
'use strict'; import chalk from 'chalk'; import Website from './app/http/server'; import Install from './app/libraries/install/check'; class Application { constructor () { const status = new Install; Application.environment(); if (!status.completed) { ...
// Dependencies import React, { Component } from 'react' import PropTypes from 'prop-types' import ListItem from './ListItem/ListItem' /** * The List component, a collection of list items. * @type {Class} */ class List extends Component { /** * Map over the items provided as props and render a ListItem compone...
import React from 'react'; import 'bootstrap/dist/css/bootstrap.css'; import '../../index.css'; import '../../App.css'; import Search from '../../components/search/search'; class Home extends React.Component { render() { return ( <div className="container container-news"> <div className="row"> <div >...
const User = require('../../../models/user'); const { TransformObject } = require('./merge'); const bcrypt = require('bcryptjs'); exports.changePassword = async args => { try { const user = await User.findById(args.userId); user.password = await bcrypt.hash(args.password, 12); await user.save(); ...
import ReactDom from 'react-dom'; import React from 'react'; export class Counter extends React.Component{ constructor(props) { super(props); this.state = {counter: 0}; this.incrementCounter = this.incrementCounter.bind(this); } render() { return ( <button onClic...
var commonNavInfo={ "referurl":document.referrer, // 上一跳url "nuseragent":navigator.userAgent, // 浏览器属性 "nplatform":navigator.platform, // 系统平台 "resolution":window.screen.width+"x"+window.screen.height, // 屏幕分辨率 "colorpepth":window.screen.colorDepth, // 颜色质量 "checkFlash":checkePlugs('Shockwave Fl...
const { v4: uuid } = require("uuid"); const { Router } = require("express"); const storage = require("../storage/placesStorage"); const authMiddleware = require("../middleware/auth.middleware") const router = Router(); router.get("/", async (req, res, next) => { const list = storage.listAll() res.json(list); });...
const Conference = {}; // attendeeWebApi의 가짜 버전. 진짜와 메서드는 같지만 전체적으로 클라이언트 측 코드만 있다. Conference.fakeAttendeeWebApi = function () { const attendees = []; // 가짜 데이터베이스 테이블 return { // 서버에 attendee를 POST 전송하는 척 한다. // attendee 사본(마치 서버에서 새 버전을 조회해오는 것처럼)으로 // 귀결되는 프라미스를 반환하고, 귀결 시점에 이 레코드에는 // 데이터베이스에...
import React from "react"; import API from "../utils/API"; export default function SearchItem(props) { function saveBook(props) { API.saveBook({ title: props.title, authors: props.authors[0], description: props.description, image: props.image, link: p...
var toolsLanguage = ''; function smallAlertWindow(position, status, desc) { const Toast = Swal.mixin({ toast: true, position: position, showConfirmButton: false, timer: 10000 }); Toast.fire({ type: status, title: desc }) initPage(); } function small...
var courses var currentResults = [] var selected = [] var classSched = [] function main() { // /*called when body loads*/ // scheduler.init('scheduler_here', new Date(), "week"); // loadData() // $('#dropdown').find('a').click(function(e) { // $('#semester').text(this.innerHTML); // $('#sem...
import { fromJS } from 'immutable' import { createReducer } from 'bypass/utils/index' import * as actions from '../constants/orders' const initialState = fromJS({ orders: [], total: 0, perpage: 30, timeout: 1800, checkTimeout: 0, detail: { checkTimeout: 0, cards: [], }, }) export default createR...
import React from 'react'; import "./css/Books.css" import {BooksData} from './booksData'; import {BooksLists} from './booksList'; // Making a Booklists component const Books = () => { return ( <section className='section__app__books'> {BooksData.map( (book) => { return ( ...
export * from "./IntroItem";
import Vue from 'vue' import Router from 'vue-router' import ShoppingMall from '@/components/pages/ShoppingMall' import Register from '@/components/pages/Register' import Login from '@/components/pages/Login' import Collects from '@/components/pages/Collects' import Goods from '@/components/pages/goods' import Category...
const EventEmitter = require('events'); const amqp = require('amqplib/callback_api'); // ----------------------------------------------------------------------------- // Private functions // ----------------------------------------------------------------------------- function messagePreHandler(callback, msg, channel...
'use strict'; const getDropdownOpen = (target) => { while (!target.classList.contains('nav-dropdown-button')) { target = target.parentElement; if (!target) { return undefined; } } return target; }; window.onclick = (event) => { const button = getDropdownOpen(event.target); if (button) { const target = ...
import { defineConfig } from 'vite' import semver from 'semver' import envCompatible from 'vite-plugin-env-compatible' import htmlTemplate from 'vite-plugin-html-template' import vueCli, { cssLoaderCompat } from 'vite-plugin-vue-cli' import mpa from 'vite-plugin-mpa' import Checker from 'vite-plugin-checker' import { V...
'use strict'; const got = require('got'); const cheerio = require('cheerio'); const table = require('columnify'); const chalk = require('chalk'); const wrap = require('wordwrap')(90); const open = require('open'); const SEARCH_URL = { js: 'JavaScript/Reference/Global_Objects', css: 'CSS' }; const getBaseUrl = lo...
import Vue from 'vue' import VueRouter from 'vue-router' import {viewList} from './view.List' Vue.use(VueRouter); //router-link router-view const routes = new VueRouter({ mode: 'history', routes:[ { path:'/', redirect:'/index/home' }, { path:'/index...
var collide = function(obj1, obj2){ if (obj1.position.x<obj2.position.x+118 && obj1.position.x>obj2.position.x && obj1.position.y<obj2.position.y && obj1.position.y>obj2.position.y-49){ return true }else return false }
// import { StoreCustomer } from './storecustomer'; var shopper = new StoreCustomer('Oscar', 'Negrete'); shopper.showName();
import firebase from 'firebase'; require('@firebase/firestore') var firebaseConfig = { apiKey: "AIzaSyA8GHtSRTRMU6SpWYd_z_qqCOvaN0JmpC4", authDomain: "shantanu-17232.firebaseapp.com", databaseURL: "https://shantanu-17232.firebaseio.com", projectId: "shantanu-17232", storageBucket: "shantanu-17232.app...
import { from, of } from 'rxjs'; import { tap, catchError, map, switchMap, ignoreElements } from 'rxjs/operators'; import { ofType } from 'redux-observable'; import { LOGIN_SUBMITED, LOGIN_SUCCESS, LOGOUT } from './loginConstants'; import { loginUser } from './loginService'; import { loginFailAction, loginSuc...
import http from '../services/http'; import { users_list, users_delete, users_add, users_details, users_edit } from "../utils/endpoints"; export function getUsersData(data) { return new Promise((resolve, reject) => { http.Request("get", users_list, null) .then(response => resolve(response) ) ...
import { curry } from "../curry/curry" import { pipe } from "../pipe/pipe" const _maxBy = (_fn, source) => { const fn = Array.isArray(_fn) ? pipe(..._fn) : _fn if (source.length === 0) { return undefined } const result = { item: source[0], value: fn.call(null, source[0]), } for (let i = 1, l...
import Todo from "./component/Todo"; function App() { return ( <div> <h1>My Todos</h1> <Todo text="Learn React from scratch" /> <Todo text="Master React" /> <Todo text="Explore React course" /> </div> ); } export default App;
let y = 4; for (let i = 1; i <= 10; i++){ console.log(y) y+=3 }
const wallet = { namespaced: true, state: { accounts: [], activeAccount: null, balance: null, mutations: null, receiveAddress: null, walletBalance: null, walletPassword: null, unlocked: false }, mutations: { SET_ACCOUNTS(state, accounts) { state.accounts = accounts; ...
function Order(customerName, date, orderId, orderDetails) { var _customerName = customerName; var _date = date; var _oid = orderId; var _orderDetails = orderDetails; this.getCustomerName = function () { return _customerName; } this.getOrderDate = function () { return _date; ...
onmessage = function (e) { //pelota.postMessage(e.data); //pelota.postMessage(e.data[0]); detectarColision(e.data[0],e.data[1],e.data[2]); }; function detectarColision(pared,pelota,canvas){ var width = 20, height = 150; var parx, pary; for (let i = 0; i <2; i++) { if(i == 0){ parx = pared.p1x; par...
import moment from 'moment'; import ramda from 'ramda'; import tenures from './tenures'; const { memoize } = ramda; function convert(...args) { let duration, units; if (args.length === 3) { const start = args[0]; const end = args[1]; units = args[2]; duration = durationFromStartAndEnd(start, end...
$(document).ready(function() { $("#dob").datepicker({ dateFormate : 'yy/mm/dd', changeMonth : 'true', changeYear : 'true', yearRange : '-100y:c+nn', maxDate : '-1d' }); }); /* * $(document).ready(function() { $('#terms').change(function(){ * $('#submit').prop('disabled',false); }); }); */ /* * $(docum...
const fs = require('fs'); exports.deleteFile = (filePath) => { fs.unlink(filePath, (err) => { if (err) { console.log('Erro while deleting ' + filePath); throw (err); } console.log('Deleted file: ' + filePath); }); }
// 1D ensemble spaghetti plots function spaghettiPlots(where, type, ratio, data) { d3.select(where).selectAll("*").remove(); var w = 1600 * ratio; var h = 800 * 0.23; var that = this; var svg = d3.select(where).append("svg") .attr("preserveAspectRatio", "none") .attr("viewBox", "0 0 " + w + " " + ...
import React from 'react' import { useSelector } from 'react-redux' import "./App.css" import Navbar from './Routes/Navbar' import Route from './Routes/Route' import Sidebar from './Routes/Sidebar' const App = () => { const {auth } = useSelector(state => state.auth) console.log(auth) return ( <div className=...
import React, { Component } from 'react'; import '../Assets/css/grayscale.css'; class matchs extends Component { constructor(){ super(); this.state = { matchs:[] }; } componentDidMount(){ fetch("http://api.football-data.org/v1/competitions/"+this.props.match.params.id+"/fixtures?matchday=8") .then(r...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const centroSchema = new Schema({ nombre: String, codigoPostal: Number, fechaAlta: { type: String, required: false }, fechaBaja: { type: String, required: false }, activo:{ type: String, enum: ["Activo", "Inac...
if ( typeof(_effect) == "undefined") { var _effect = []; } _effect["arrow"] = function( a, b ) { this.scene = a; this.clear = b; this.speed = 10; this.p = new BABYLON.ParticleSystem("particles", 2000, scene); //this.p.particleTexture = new BABYLON.Texture("content/shot.png", scene); this.p.particleTexture = t...
import React from 'react' import { mount, shallow } from 'enzyme' import { Home } from './Home' describe('Home Component', () => { it('should render a loader when the query is in progress', () => { const mockProps = { data: { loading: true, }, } const component = mount(<Home {...mockP...
import Snake from './snake.js'; import SnakeFood from './snakeFood.js'; import FeedingGround from './feedingGround.js'; const canvas = document.getElementById('snake_canvas'); const fg = new FeedingGround(canvas.width, canvas.height); const reset = document.getElementById('reset-box'); if (fg.playing){ fg.start(can...
/* Use webpack -p to compress output.js */ const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const HtmlWebpackPlugin = ...
import styled from "styled-components"; export default styled.div` margin-top: 20px; padding-top: 10px; .cmt { position: relative; background-color: #f1f1f1; padding: 10px 15px 30px; margin-bottom: 10px; border-radius: 6px; .cmt-time { position: absolute; right: 8px; bot...
import axios from 'axios'; import { ROOT_URL } from '../helpers/constants'; // Action Types // ================== export const LOGIN = 'LOGIN'; export const LOGIN_SUCCESS = 'LOGIN_SUCCESS'; export const LOGIN_FAILURE = 'LOGIN_FAILURE'; export function login(access_token) { const request = axios({ method: 'post...
import React from "react"; import {ageFromDOB} from "../helpers/helpers" import '../css/Profile.css'; const Profile = ({ user }) => { if (!user) return "loading..."; return ( <div className="profile-detail"> <h2>{user.fullName}</h2> <p><strong>Age:</strong> {ageFromDOB(new Date(user.dob))}</p> ...
import React from 'react'; import ReactDOM from 'react-dom'; import Table from './table.js'; import User from './user.js'; import {App} from './app.js'; export default class ClickedUser extends React.Component { constructor(props){ super(props); this.state={ user: null }; } componentWillReceiveProps(ne...
if (!OC.Encryption) { OC.Encryption = {}; } OC.Encryption.msg = { start: function (selector, msg) { var spinner = '<img src="' + OC.imagePath('core', 'loading-small.gif') + '">'; $(selector) .html(msg + ' ' + spinner) .removeClass('success') .removeClass('error') .stop(true, true) .show(); }, fi...
const test = require('tape'); const elo = require('./elo.js'); test('Testing elo', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof elo === 'function', 'elo is a Function'); t.deepEqual(elo([1200, 1200]), [1216, 1184], "Standard ...
moveOneWord = (input, many) => { let word = input.split(" "); let count = 0; if (many == 1) { return 0; } for (let a = 0; a <= many - 1; a++) { if (a == many - 1) { count++; } else { count = count + (word[a].length + 1); } } return count; }; reverseOneWord = (input, many) => {...
import React from 'react'; const ProductList = (props) => { const listOfProducts = props.dataList.map(appn => { return ( <div className="col-md-5 float-left card mb-1 mr-2" key={appn.id}> <div className="figure"> <div className="row"> ...
//index.js //获取应用实例 const app = getApp() Page({ data: { // 页面配置 winWidth: 0, winHeight: 0, // tab切换 currentTab: 0, isHideLoadMore: false, hasRefesh: false, hidden: false, taobaodata: [], taobaopage: 1, pinduoduodata: [], pinduoduopage: 1 }, onLoad: function(opt...
// THEME function Theme(id, nom, nomVo){ this.id = id; this.nom = nom; this.nomVo = nomVo; this.caracBonuses = new Map(); this.themeCompetences = new Map(); } Theme.prototype.addThemeCaracBonus = function(nom, value){ this.caracBonuses.set(nom, value); } Theme.prototype.addThemeCompetence = function(nom){ t...
import cookies from './util.cookies' const util = { cookies } /** * 初始化顶部菜单 * @param {用户菜单} menu */ util.initHeaderMenu = function (menu) { return getMenu(menu) } /** * 生成随机len位数字 */ util.randomLenNum = function (len, date) { let random = '' random = Math.ceil(Math.random() * 100000000000000).toString()...
import React from 'react' import './ForkMe.css' export default function ForkMe(props) { return ( <span id='forkongithub'> <a href='https://github.com/BrandonDyer64/Memory-Game' target='_blank'> Fork me on GitHub </a> </span> ) }
//requis: PhantomJS + Serveur Apache qui héberge le fichier generate.php //CLI: ./phantomjs client.js //Système de snapshot pour le projet TMN //github:nicolastrognot var url_tmn = "[PRIVATE]/generate.php"; var private_key = "[PRIVATE]"; var page_l = require('webpage').create(); var page_p = require('webpage').create...
import styled from "styled-components"; const FeedCardStyled = styled.div` border-radius: 2%; box-shadow: 1px 1px 2px grey; .card-infos { h2 { font-size: 20px; font-weight: 700; } h2, p { padding: 10px 25px; text-align: left; } } ` export default FeedCardStyled
document.addEventListener("DOMContentLoaded", showSubFilter); function showSubFilter() { console.log("CLICK PÅ KNAP"); if (window.innerWidth <= 1239){ console.log("jeg hedder EDAMAMAMA") document.querySelector(".genre_tekst").addEventListener("click", showMusikMenu); ...
const bcrypt = require('bcrypt'); const mongoose = require('mongoose'); const supertest = require('supertest'); const app = require('../app'); const Tournament = require('../models/tournament'); const User = require('../models/user'); const api = supertest(app); const testUsername = 'testuser'; const testPassword = ...