text
stringlengths
7
3.69M
import React from 'react' import MediaQuery from 'react-responsive' import VerticalText from '../vertical-text' import { Column, Row } from './styled' import IconMenu from '../icon-menu' const Header = () => ( <Column> <Row> <VerticalText text="Chris" /> <VerticalText text="Pachomski" /> </Row> ...
Array.prototype.removeDuplicates = function () { return new Promise((resolve, reject)=>{ resolve(this.filter((a, b) => this.indexOf(a) === b)); reject(`Input is not array`); }) }; console.log(`start`); [4, 1, 5, 7, 2, 3, 1, 4, 6, 5, 2].removeDuplicates() .then(console.log) .catch...
// designer.css function change(index, direction) { if (direction == "down") { $(".post" + index).removeClass("active"); $(".post" + (index + 1)).addClass("active"); } else if (direction == "up") { $(".post" + index).removeClass("active"); $(".post" + (index - 1)).addClass("active"); ...
import React from 'react'; import { connect } from 'react-redux'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import {AgGridReact} from 'ag-grid-react'; import { getEntityFields, getEntities, dismissRequestError, notifyNodesRequestFailure } from './network-browser-actions'; import axios from '../....
import React, { Component } from 'react'; import DocumentTitle from 'react-document-title'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import { connect } from 'react-redux'; import Header from '../components/Header'; import Footer from '../components/Footer'; const style...
describe('Catalogue page', () => { it ('should create a new proposal', () => { cy.visit('/'); // Log as matt cy.get('#accountDropdown').click() .get('[routerlink="/auth/login"]').click() .url().should('include', '/auth/login') .get('#login').type('matt') .get('#password').type('ma...
var includes = require('./includes') Array.prototype.includes = Array.prototype.includes || includes.array String.prototype.includes = String.prototype.includes || includes.string
export { default as PersonCardContainer } from './PersonCardContainer';
export const sayHi = () => { // console.log('inside utils.js'); } export const getParameterByName = (name) => { var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); } // Returns array of PIDs from the URL query string. // Exa...
const express = require('express') const routers = express.Router() let model_teacher = require('../models/') routers.get('/teacher', (req, res) => { model_teacher.Teacher.findAll({ include: [{ model: model_teacher.Subject }] }) .then(teacher => { res.render('teacher', { dat...
import React from "react"; import ReactDOM from "react-dom"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import { createStore } from "redux"; import { Provider, connect } from "react-redux"; import PropTypes from "prop-types"; import { ThemeProvider } from "styled-components"; import redu...
/*! K1ch.JS - v2.0.0 - 2015-11-24 * http://www.k1store.com/ * * Copyright (c) 2015 LooooG; */ (function (window, document, exportName, undefined) { 'use strict'; /*************************************************************** Config ***************************************************************************...
'use strict'; const buble = require('rollup-plugin-buble'); const fsJetpack = require('fs-jetpack'); const pjson = require('../package.json'); let banner = ` /* * ${pjson.name} v${pjson.version} * (c) ${new Date().getFullYear()} @gamedev-js * Released under the MIT License. */ `; let dest = './dist'; let file = ...
const maxSliceSum = require('./index'); test('finds slice with maximum sum', () => { const a = [3,2,-6,4,0]; expect(maxSliceSum(a)).toEqual(5); }); test('finds slice with maximum sum', () => { const a = [-1,-1,-1,-1,-1]; expect(maxSliceSum(a)).toEqual(-1); }); test('finds slice with maximum sum', () => {...
import React from "react" import { Link } from "gatsby" import Layout from "../components/layout" import SEO from "../components/seo" const SecondPage = () => ( <Layout> <SEO title="About Us" /> <div className="about-container"> <div className="cell left"> <img src="" alt="Napa Creative Co."...
import React, { useState } from 'react'; import '../styles/App.css'; import Statistics from './statistics'; import Timer from './timer'; import Control from './Control'; import Sprite from './Sprite'; const Time4 = () => { const [usefullS, setUsefullS] = useState(0); const [wastedS, setWastedS] = useState(0); c...
// in here get rid of mongo // have a variable for the content in your json file // and parse the jason data //then have an app.get that that has a data.list function //and then render by passing the array of the list to your ejs file //eventually to personalise the single file pages you would use and render anot...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsHighQuality = { name: 'high_quality', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 4H5a2 2 0 00-2 2v12a2 2 0 002 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h...
export const en = { "acc.accountRemoved": "Account removed", "acc.accountRestricted": "Account restricted", "acc.avatar": "Avatar", "acc.avatarInfo": "Your avatar or profile picture will be shown on your profile page.", "acc.avatarTitle": "Set your profile picture", "acc.bio": "Bio", "acc.bioInfo": "This ...
import React from "react"; import "./Cart.css"; const Cart = (props) => { const cart = props.cart; const itemPrice = cart.reduce( (itemPrice, newItemPrice) => itemPrice + newItemPrice.price , 0) ; const shippingCharge = cart.reduce( (shippingPrice, newShippingPrice) => shippingPrice + newShippingPrice.shipping ,...
import styled from "styled-components"; export const ServicesStyle = styled.div` position: relative; .main-container { padding-left: 80px; margin-left: 25%; } .theme-title { position: relative; } .background img{ position: absolute; left:-20%; top:0; } .theme-title h6{ font-weight: 600; font-size: ...
export const ADD_GAME = "ADD_GAME"; export const ADD_GAME_SUCCESS = "ADD_GAME_SUCCESS"; export const ADD_GAME_FAILURE = "ADD_GAME_FAILURE"; export const GET_GAMES = "GET_GAMES";
var express = require('express'); var path = require('path'); var config = { listenPort: 8080, mode: "debug" } config.debug = { "/": path.resolve(__dirname, "./src"), "/vendor": path.resolve(__dirname, "./vendor"), "/header.tpl.html": path.resolve(__dirname, "./src/app/") } config.addRoutes = funct...
//封装的request.js文件 import axios from 'axios'; export function post(config) { const instance = axios.create({ baseURL: 'http://timemeetyou.com:8889/api/private/v1', timeout: 5000, }); instance.interceptors.response.use( (res) => { return res.data; }, (err) => console.log(err) ); in...
function rectangulo(x, y, width, height){ this.id = x+"r"+y; this.x = x; this.y = y; }
function renderContent (content) { // TODO class H1 extends Component { render () { return ( <h1>{content}</h1> ); } } ReactDOM.render(<H1 />, document.getElementById('root')); }
import React from "react"; import PropTypes from "prop-types"; import cx from "classnames"; import "./button.css"; const Button = props => ( <button className={cx("btn ui",{"active": props.active, "tinted": props.tinted}, props.color)} {...props}> {props.children} </button> ); Button.propTypes = { active: Pr...
import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter, Route, Switch, Redirect} from 'react-router-dom'; import {SubscribeReceipt} from './components/SubscribeReceipt'; import {UnsubscribeReceipt} from './components/UnsubscribeReceipt'; import {ConfirmSubscription} from './components/Confi...
import './Card.css'; import React from 'react'; export const Card = (card) => { const dragstartHandler = (event) => { const parent = event.target.parentNode.parentNode.id; const id = event.target.id; const data = JSON.stringify({id, parent}); setTimeout( () => { document.getElementById(id).sty...
module.exports = function multiply(first, second) { // your solution let number = BigInt(first) * BigInt(second); return number.toString(); };
import React from "react"; import { push } from "react-router-redux"; import { bindActionCreators } from "redux"; import { connect } from "react-redux"; import { getIexData, getPortfolio, getDescriptionPortfolio } from "../../modules/PullStocks"; import News from "../news"; // I wanted to see if this functionali...
async function init (api) { return { messages: await api.messages.find(), users: await api.users.find() // groups: await api.groups.find() } } export default init
const mongoose = require("mongoose"); mongoose .connect("mongodb://localhost:27017/Scaffoldzoid", { //connect to this address of database of name users-authentication if present else will create one useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true, }) .then(() => { ...
import express from 'express'; import route from '/route.js' const app=express(); app.use(express.json()) app.use('/api/orders', route) const port=5000; app.listen(port,console.log("server is running"));
import MovieContainer from './MovieContainer' import MovieDetailContainer from './MovieDetailContainer' import StarDetailContainer from './StarDetailContainer' import SearchBarContainer from './SearchBarContainer' export { MovieContainer, MovieDetailContainer, StarDetailContainer, SearchBarContainer, }
layui.define(["jquery"],function(exports){ var $ = layui.$; var fn = function (a,b) { return a+b; } //输出API exports('add', fn); });
import reflow from './reflow' import render from './render' class Text { #content #node get content () { return this.#content } static get #allowedTypes () { return ['Array', 'Boolean', 'Date', 'Number', 'String'] } constructor (content) { this.#content = content } after (child) { ...
import { Link } from "react-router-dom"; import StarRatings from "react-star-ratings"; import { forwardRef } from "react"; const Thumbnail = forwardRef(({ movie }, ref) => { return ( <div ref={ref}> <div className="flex flex-col w-full h-full max-h-full bg-[#052b3b] max-w-xs rounded-xl overflow-hid...
import Axios from "axios"; import React, { useContext, useEffect } from "react"; import { NavLink, useParams, Switch, Route } from "react-router-dom"; import { useImmer } from "use-immer"; import Page from "./Page"; import StateContext from "../StateContext"; import ProfilePosts from "./ProfilePosts"; import ProfileFo...
import styled from 'styled-components'; const Content = styled.div` max-width: 1000px; width: 100%; margin: 30px auto 30px auto; `; export default Content;
import { Template } from 'meteor/templating'; import { ReactiveVar } from 'meteor/reactive-var'; //import { dashboard } from '../imports/api/tasks.js'; // import './main.html'; // list all task // Template.body.onCreated(function bodyOnCreated() { // // this.state = new ReactiveDict(); // Meteor.subscribe('das...
//同类热门漫画 import React, { PureComponent } from 'react' import { View, Text, StyleSheet } from 'react-native' import ComicScrollableItemsComponent from '../../widget/component/ComicScrollableItemsComponent' import Color from '../../common/color' import ComicCellSeparatorComponent from '../../widget/component/ComicC...
var startButton = document.getElementById('start-btn') var questionContainer = document.getElementById('questionContainer') let currentQuestion = 0 let randomQuestion var questionElement = document.getElementById('question') var answerButtonsElement = document.getElementById('answer-buttons') var nextButton = document....
export const sortFilterByProps = (a, b, props) => { if (a[props] > b[props]) { return -1; } else if (a[props] < b[props]) { return 1; } else { return 0; } }; export const getCustomerName = (value) => 'U-' + value.slice(0, 6).toUpperCase(); export const getMainVersion = (version...
"use strict"; function fields(text) { return text.split(/[ \t,]+/g); } console.log(fields("Pete,201,Student")); console.log(fields("Pete \t 201 , TA")); console.log(fields("Pete \t 201")); console.log(fields("Pete \n 201"));
const { Configurator } = require('./config') const { HttpClient } = require('./http-client') const { GlobalRegistryObject, GlobalRegistrySubscriptionObject, GlobalRegistryReadOnlyObject } = require('./global-registry-object') const grTypes = [ { type: 'Entity', path: '/entities/', name: 'entity' }...
// ==UserScript== // @Author Ram // @name Grooveshark Extended // @namespace GSX // @homepage https://ramouch0.github.io/GSExtended/ // @description Enhance Grooveshark Broadcast functionality // @downloadURL https://ramouch0.github.io/GSExtended/src/GSExtended.user.js // @updateURL https://bit.ly/GS...
const mongoose = require("mongoose"); let userSchema = mongoose.Schema({ username: String, name: String, phone: String, email: String, termsAgreement: Boolean, password: String, fatherName: String, motherName: String, birthDate: Date, gender: String, religion: String, maritalStatus: String, n...
'use strict' exports.extendStack = function (err, offset) { return doExtend(err, offset, new Error().stack) } function doExtend (err, offset, passStack) { if (typeof err !== 'object') { err = new Error(String(err)) } if (!offset) { offset = 0 } let passLines = passStack.split('\n').slice(2 + offset...
const fs = require('fs') const path = require('path') const util = require('util') class FileOpener { path = undefined constructor(path) { this.path = path } read() { const read = util.promisify(fs.readFile) return read(this.path, 'utf8') } write(data) { const write = util.promisify(fs.writeFile) ...
import './index.scss' import 'normalize.css'
import React from 'react' import './Video.css' import { Avatar } from '@material-ui/core'; function Video({ image, link, title, channel, views, timestamp, channelLink,channelImage }) { return ( <div className="videoCard"> <a href={link}> <img src={image} className="videoCard__thu...
// ...................................................................................................... // // routines to customize different interactive layers // // by xiangchen@acm.org, v1.0, 10/2017 // // ...................................................................................................... // ...
let fs = require('fs'); let workableData; var searchTrie = new Trie(); //creation of a global Trie DS //This function will be used for loading data to the Data Structure/Pre-Computing the Data Structure module.exports.loadData = () => { //Reading data.csv fs.readFile('data.csv', 'utf8', function (err, data) {...
module.exports = function(socket) { var $uploadActionWrapper = $('.image-upload-icon-wrapper'), $uploadModal = $('#image-upload-modal'), $uploadForm = $('.image-upload-form'), $imageInput = $('.image-input'), $imagePreviewWrapper = $('.image-preview-wrapper'), $uploadButton = $('.upload-button'), ...
/** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } */ /** * @param {ListNode} head * @return {ListNode} */ function ListNode(val) { this.val = val; this.next = null; } var middleNode = function(head) { var size = 0; var current = head;...
const mongoose = require('mongoose'), Schema = mongoose.Schema; const breederSchema = new Schema({ name: String, description: String, location:String, breeder_of:String, //dog.id // slug: { // type: String, // unique: true // } }); const breederModel = mongoose.model('Breed...
var hostName = "http://account.bestot.cn"; function getNetData(typeName,index,mask,callBack){ if(index >= typeName.length){ mask.close(); callBack(); var time = (Date.parse(new Date()) / 1000) - 3600*24; var Storage=localStorage; if(typeof(plus) != "undefined"){ Storage = plus.storage; } Storage.setIt...
const api = require('../../request/api.js') const utils = require('../../utils/util.js') Page({ page: 0, isShowLoading: false, pageCount: 1, /** * 页面的初始数据 */ data: { banners: [], topArticles: [], hotsArticles: [], showFooter: false, navHeight: 60 }, topCollect (e) { utils.c...
import BaseLfo from '../../core/BaseLfo'; const sqrt = Math.sqrt; const cos = Math.cos; const PI = Math.PI; // Dct Type 2 - orthogonal matrix scaling function getDctWeights(order, N, type = 'htk') { const weights = new Float32Array(N * order); const piOverN = PI / N; const scale0 = 1 / sqrt(2); const scale = ...
import React, { useState, useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; // import green from "../Green.PNG"; import Table from "react-bootstrap/Table"; import Row from "react-bootstrap/Row"; import Col from "react-bootstrap/Col"; import Container from "react-bootstrap/Container"; imp...
'use strict'; angular.module('app').filter('dashboardFilter', function(){ return function(value){ } });
var searchData= [ ['carsmoothfollow',['CarSmoothFollow',['../class_car_smooth_follow.html',1,'']]], ['collidersleeper',['ColliderSleeper',['../class_collider_sleeper.html',1,'']]] ];
myApp.controller("topnavCtrl", function($scope){ // if loaded show // alert("this is loaded gallery 2"); $scope.images = ["one","two","three","four"]; //user permissions $scope.userPermissions = "admin"; //load content $scope.data = { editMode: false }; $scope.activeContent = ''; });
import Vue from 'vue' import Vuex from 'vuex' import persistedState from 'vuex-persistedstate' Vue.use(Vuex) const modules = { edit: { namespaced: true, state: { text: '' }, mutations: { setText (state, value) { state.text = value } } } } export default new Vuex.Stor...
import * as THREE from '../node_modules/three/build/three.module.js'; import {WASM} from './WASM.js'; import * as GLOBALS from './Globals.js' function Colorer(_sensorControls, _plane) { var _probability = []; var _loader = new THREE.FileLoader(); function _getProbability(distance, angle) { ...
var express = require('express'); var router = express.Router(); const mongodbModel = require("../models/mongodb.js"); router.get("/", (req,res, next) => { res.render('pages/survey.ejs' ,{"pagename":"Survey"}); }); router.post("/success", async (req,res) => { try { const a = await mongodbModel.countformdat...
import React, { Component, useState, useEffect } from "react"; import { Container, Content } from "native-base"; import { SearchBar, CheckBox } from 'react-native-elements'; import { Text, ScrollView, SafeAreaView, View, FlatList, StyleSheet, Image, TouchableOpacity, Modal } from 'react-native'; import Icon from 'react...
import React, {useState} from 'react' import { Row, Col, Card, CardHeader, CardBody, Table, Modal, ModalHeader, ModalFooter, ModalBody, Button } from 'reactstrap' import AddNewUser from './AddNewUser' import ConfirmModal from 'common/ConfirmModal' import './Users.scss' const Users = () => { const [modal, openMod...
import React from "react"; import { render, cleanup } from "react-testing-library"; import ChannelHeader from "../index"; afterEach(cleanup); test("It should display the title", () => { const container = render(<ChannelHeader title="Nack" />); expect(container.queryByText("Nack")).not.toBeNull(); }); test("It s...
import React, { useState, useImperativeHandle, forwardRef, useRef } from 'react'; import { TextInput, StyleSheet } from 'react-native'; import useFocusableInput from '../hooks/useFocusableInput'; function NumericInput({ style, value, onChange, ...props }, ref) { const textInputRef = useRef(); useFocusableInput(r...
import React, { useEffect, useState, useContext } from "react"; import AdminLayout from "../../components/admin/AdminLayout"; import { UserContext } from "../../context/UserContext"; import { Grid, Paper, makeStyles, Typography } from "@material-ui/core"; import axios from "../../utils/axios"; import StarsIcon from "@m...
class ZHistoricoController{ constructor (modelZHistorico, sequelize){ this.Historico = modelZHistorico; this.Object = sequelize } getAll(){ return this.Historico.findAll() .then(rs => rs) .catch(e => e) } post (espaco, usuario, tempo){ retu...
export const selectedByDefault = ['Sore throat', 'Sickness']; export const form = [ [ { type: 'textarea', name: 'presentation', label: 'history', placeholder: 'Presentation... Anaesthetic history... Past medical history...' }, { type: 'textarea', name: 'dh', label: 'drug history', datalist: true }, { typ...
// JavaScript Document ;(function () { app.route={}; /*页面栈*/ var pageArry=[]; /*跳页方法*/ function changePage() { /*默认首页*/ var hash = "page/index"; /*如果hash有值*/ if (location.hash) { /*获取hash值*/ hash = location.hash.replace("#", ""); } ...
import React, { Component } from 'react' import logo from '../../assets/images/logo.png' import { FaPager, FaUser, FaSlackHash, FaHospital, FaBell } from 'react-icons/fa' import { Link } from 'react-router-dom' import ShareCaseModal from '../featuresComponents/ShareCaseModal' import Logout from '../featuresComponents/L...
import React from 'react'; import './Backdrop.css'; function Backdrop(props) { return ( <div onClick={props.clicked} className={props.show ? 'Backdrop' : null}> </div> ) } export default Backdrop;
var express = require('express'); var app = express(); var bodyParser = require('body-parser'); var morgan = require('morgan'); var mongoose = require('mongoose'); var config = require('./env/development.js'); var path = require('path'); app.use(bodyParser.urlencoded({extended: true })); app.use(bodyParser.json()); a...
// handle all auth LOGIC in this import { AsyncStorage } from "react-native"; // react-native's version of local storage export const KEY = "rickyfiguresitout"; export const onSignIn = () => AsyncStorage.setItem(KEY, "true"); // set storage to hold key as TRUE export const setStorage = (data) => AsyncStorage.setIte...
mover_movil(0,190,22,145,0.8,"mapa 1"); girar_movil(190,10,24,180,21,0.4,"rotacion 1"); mover_movil(200,50,53,230,0.8,"mapa 2"); girar_movil(250,15,79,262,60,0.4,"rotacion 2"); girar_movil(265,20,73,305,0,0.4,"rotacion 3"); mover_movil(285,120,212,405,0.8,"mapa 2"); // Función para mover el carrito de forma lineal ...
import React, { useEffect, useRef } from 'react'; import { connect } from 'react-redux'; import { DragDropContext, Droppable } from 'react-beautiful-dnd'; import { sort, fetchTopics, updateTopics, currentUser } from '../actions'; import styled from 'styled-components'; // import { makeStyles } from '@material-ui/core/s...
import gql from "graphql-tag" export const findAllUsuario=gql` query usuarios{ usuaioFindAll{ id nome email senha } } `; export const CreateUsuario = gql` mutation CreateUsuario($nome:String!,$email:String!,$senha:String!){ createUsuario(dados:{nome:$nome,email:$email,senha:$senha} )...
/** * Created by dmitry on 04.11.15. */ export default class Input extends Backbone.View { get className() { return "form-group"; } get template() { return _.template($('#input').html()); } get events() { return { 'change input': 'onChange' }; } static get Model() { return...
// Instruments import { Lessons as LessonsModel } from '../models'; export class Lessons { constructor(data) { this.models = { lessons: new LessonsModel(data), }; } async create() { const data = await this.models.lessons.create(); return data; } async ...
BasicGame.Game = function (game) { var player; var ledges; var ledges2; var ledges3; var ledges4; var bads; var score; var back; var compa; var badsCompa; var bad2Compa; var cursors; var jetpack; var bool; var bool2; var jetpackSpawn; var jetpackTime; var ledges4Spawn; var ledges4count; var springs;...
/** * Definition for an interval. * function Interval(start, end) { * this.start = start; * this.end = end; * } */ function Interval(start, end) { this.start = start; this.end = end; } /** * @param {Interval[]} A * @param {Interval[]} B * @return {Interval[]} */ var intervalIntersection = function...
export function updateIngredientsTable(tableContentElement, numberOfPersonsElement, amountPersons, ingredients) { numberOfPersonsElement.innerHTML = amountPersons > 1 ? amountPersons + " Personen" : "eine Person"; tableContentElement.innerHTML = createTableContent(ingredients, amountPersons); } export f...
import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; const ESC_PRESS = 27; const body = document.querySelector(`.body`); const Success = ({...props}) => { useEffect(() => { document.addEventListener(`keydown`, onClose, {passive: true}); return () => document.removeEventListener(`keyd...
import React from 'react'; import Modal from "./Modal"; import styles from './styles/InitialPromptModal.module.scss'; export default function InstallPromptModal(props) { return <Modal className={styles.container}> <div className={styles.exampleIcons}> <svg> <rect width={50} heig...
import React, { Component, PropTypes } from 'react'; import TodoTextInput from './TodoTextInput'; class Header extends Component { constructor(props) { super(props); this._add = this._add.bind(this); this.state = {}; } _add(text) { const { addTodo } = this.props; if (text.length !== 0) { console.l...
export const user = (state) => { return state.name } export const loading = (state) => { return state.loading }
const ChatHistory = props => { const messages = props.chatHistory.map(msg => ( <p key={msg}>{msg.data}</p> )) return ( <div> <h2>Chat History</h2> {messages} </div> ) } export default ChatHistory
var lolDmgApp = angular.module('lolDmgApp', ['ngResource', 'ngRoute', 'ngDialog', 'angular-toArrayFilter', 'ngSanitize', 'ui.bootstrap']) .config(function($routeProvider, $locationProvider){ $routeProvider .when('/', { templateUrl: '/templates/pages/home/index.html' }) .when('/summoner/:...
window.parent.frame = window; var p$ = window.parent.$; $(function($){ window.stack = new Stack(); window.movement = new Movement(stack); $("#selected").draggable({ start: movement.onStart, stop : movement.onStop, drag : movement.onDrag }); var passThroughAndClick = function(event){ var left = $(wi...
function solve(inputArr, sortCriteria) { class Ticket { constructor(destination, price, status) { this.destination = destination; this.price = price; this.status = status; } } const database = []; for(const element of inputArr) { let [destina...
/* * 注意 该 index.js 不同于 学习模块化时 用于汇总js 的文件 * */ import '@babel/polyfill' //缺点(不推荐使用) 转换所有的高级语法, 实际上可以只转换一部分 import {sum} from './module1' import {sub} from './module2' import module from './module3' import a from '../json/test.json' import '../css/index.less' console.log(sum(1,2)) console.log(sub(1,2)) console.log(m...
const db = require('./../database/db_connection'); const userSignUp = (username, hashPassword) => db.query( 'INSERT INTO users (username, hash_password) VALUES ($1, $2) RETURNING username, id AS user_id', [username, hashPassword], ); module.exports = userSignUp;
import React from "react"; function round(number) { return number ? Math.round(number) : ""; } export default function Weather({ weather }) { return ( <div className="weather" title={weather.description}> <p>{round(weather.current_temperature)}°C</p> <img src={`/images/weather/${weather.icon}.svg`...
const cards = [ {id: 1, word: 'مرحباً', translation: '', definition: 'Hello'}, {id: 2, word: 'طائر', translation: '', definition: 'Bird'}, {id: 3, word: 'مطبخ', translation: '', definition: 'Kitchen'}, {id: 4, word: 'سيارة', translation: '', definition: 'Car'}, {id: 5, word: 'يطبخ', translation: '', definitio...
/** * * @authors Wangfei (wangfei.f2e@gmail.com; QQ: 941721234) * @date 2014-03-13 13:29:23 * @version $Id$ */ (function($) { })(jQuery);