text
stringlengths
7
3.69M
import React, { Component, Fragment } from "react"; import FirstRound from "./FirstRound"; import '../Styles/Fixtures.css' class FixturesList extends Component { constructor(props) { super(props); this.state = { pairs: [] }; this.onClickMakeFixtures = this.onClickMakeFixtures.bind(this); }; ...
var currentRefId; var currentRefCatId; __exports.viewLoaded = function() { var self = this; this.view.webview.addEventListener('swipe', function(e) { if (e.direction == 'right') { Fe.controllers.Frame.switchController(Fe.controllers.CommandList); } //pop used to work coz we came from bookmarks and not ...
console.log('gucci'); const APIKEY = '4fLteOlCpMrfDPA7u1ykxwjJCGF9hWqK' const url = `https://api.giphy.com/v1/gifs/random?api_key=${APIKEY}&rating=pg` const container = document.querySelector('.mainContainer'); function getRandomGif() { fetch(url) .then(response => { return response.json() }) ...
/* =============================================================================== Module: Main =============================================================================== */ if ( window.hasOwnProperty( 'app' ) == false ) window.app = { }; app.MainModule = function( ) { }; app.extend( app.MainModule, app.SystemM...
import exchangeSchema from '../schemas/exchangeSchema' import mongoose from 'mongoose' const Exchange = mongoose.model('exchange', exchangeSchema) export default Exchange
'use strict'; const boom = require('boom'); const casCookieUtils = require('../../../utils/cas-cookie-utils.js'); const _ = require('lodash'); const joi = require('joi'); const removableJwtKeys = []; exports.register = (server, options, next) => { const redisClient = server.plugins['hapi-redis'].client; ser...
// Copyright (c) 2021 Antti Kivi // Licensed under the MIT License // Based on code by Chase Ohlson. // Original code is available at https://github.com/brohlson/gatsby-plugin-anchor-links. export default function stripHashedLocation(to) { return to.split('#')[0]; }
// Module request const express = require('express'); const bodyParser = require('body-parser'); const helmet = require('helmet'); // Constants and request handler const constants = require('./constants.js'); const utils = require('./utils.js'); const port = require('./config.json').port; const app = express(); // L...
import { SET_TITLE, SHOW_SIDEBAR, TOGGLE_SIDEBAR } from './constants'; export const setTitle = title => ({ type: SET_TITLE, title }); export const toggleSidebar = () => ({ type: TOGGLE_SIDEBAR }); export const showSidebar = show => ({ type: SHOW_SIDEBAR, show });
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ProductSchema = new Schema( { title: {type: String, required: true, max: 100}, price: {type: Number, required: true}, dimensions: {type: String}, features: {type: String}, category: {type: Schema.ObjectId, ref: 'Category', req...
var connectHandlers = WebApp.connectHandlers; getPayload = function(hostName, method) { var jsFiles = []; var cssFiles = []; var rootUrl = Meteor.absoluteUrl("", { rootUrl: hostName }); var clientManifest = WebApp.clientProgram.manifest; if(rootUrl[rootUrl.length - 1] == "/") { rootUrl = rootUrl.substr(0, root...
import axios from "axios"; import axiosClient from "./axiosClient"; import { appLayoutData } from "../utils/myData"; const quanLyPhimAPI = { layDanhSachPhim: () => { //=> layDanhSachPhim const maNhom = appLayoutData.maNhom; return axiosClient.get("/QuanLyPhim/LayDanhSachPhim?maNhom=" + maNhom); }, la...
import { expect } from "chai"; import { solana_program_init, Pubkey, Keypair, Hash, SystemInstruction, Instructions, Transaction, } from "crate"; solana_program_init(); describe("Transaction", function () { it("SystemInstruction::Transfer", () => { const payer = Keypair.fromBytes( new Uint8Ar...
const mongoose = require ('mongoose'); const { Schema } = mongoose; const studentModel = new Schema( { name: { type: String }, lastname: { type: String }, career: { type: String }, read: { type: Boolean, default: false }, }); module.exports = mongoose.model('Student', studentModel);
var animals = ["GIRAFFE", "LION", "TIGER", "SEAGULL"]; var carCompanies = ["LAMBORGHINI", "FERRARI", "TOYOTA", "HONDA", "TESLA", ]; var time = ["WATCH", "CLOCK"]; var dollarAmounts = [5000, 500, 900, 700, 300, 800, 550, 400, 500, 600, 350, 500, 900, "BANKRUPT", 650, "FREE PLAY", 700, "LOST A TURN",]; var characters =...
const request = require('request') function forecast (lat, long , callback) { const url ='http://api.weatherstack.com/current?access_key=36ecaafe6882872231e09c562e1b8564&query='+ lat +','+ long +'&units=f' request({ url, json: true}, (error,{body}) =>{ if(error){ callback('Unable to connect...
const {CLIENT} = require('../constant/app_const'); class AuthUtils { static checkClient(client_id,client_secret){ console.log(client_id,client_secret) if(client_id === CLIENT.APP_CLIENT.id && client_secret === CLIENT.APP_CLIENT.secret){ return true; }else{ return fal...
// Ths midddleware checks for the available quantity of books available in the library const Borrowed = require('../models').Borrowed; const Books = require('../models').Book; module.exports = { // count the number of books borrowed from borrowed JOIN model checkBookCount: function(req, res, next) { Bo...
import HttpError from 'http-errors'; import contentTypeLib from 'content-type'; import { camelCaseObj, snakeCaseObj } from '../lib/common'; // Parses incoming request body as JSON // Converts incoming request body keys (deep) to camelCase // Converts outgoing response body keys (deep) to snake_case // Stringifies outg...
let db = require('../../models/index'); let uuid4 = require('uuid/v4'); const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); stripe.customers.list().then(async (customers) => { for (let customer of customers.data) { //retrieve user from db let user = await db.User.findOne({ where: { e...
var express = require('express'); var fs = require('fs') var app = express(); app.use("/images", express.static(__dirname + '/images')); app.use("/css", express.static(__dirname + '/css')); app.use("/html", express.static(__dirname + '/html')); app.use("/js", express.static(__dirname + '/js')); app.use("/json", express...
var View = function(resultSet) { this.table = null; this.fields = []; this.resultSet = resultSet; this.setView = function(table, fields) { this.table = table; this.fields = fields; }; this.getView = function() { var selectIndices = []; var that = this; ...
const express = require('express'); const bodyParser = require('body-parser'); const bcrypt = require('bcrypt'); const cors = require('cors'); const knex = require('knex'); const fetch = require('node-fetch'); const pg = require('pg'); const cookieSession = require('cookie-session'); const db = knex({ client: 'p...
class Terre { constructor() { this.w = width / 2.5; this.cellules = []; this.cellulesLength = 90; for(let x = 0; x < this.cellulesLength; x++) { this.cellules[x] = new Cellule( floor(random(0,5)), x, ...
import React, { Component } from "react"; import SwitchNavigator from "./SwitchNavigator"; import SplashScreen from "react-native-splash-screen"; export default class App extends Component { componentDidMount(){ SplashScreen.hide(); } render() { return ( <SwitchNavigator/> ); } }
/* eslint-disable */ export function modifyWebpackConfig(config, env) { if (env === 'build-javascript') { config.merge({ devtool: 'hidden-source-map' }); } return config; }
(function(){ var phoneNum = ""; function Phone(phoneNum){ this.phoneNum = phoneNum; this.model = "No model"; } Phone.prototype.call = function(){ if(!this.hasPhoneNum()) console.log("개통하세요!"); else console.log("전화를 겁니다!"); }; ...
var slider = document.getElementById("pop"); var output = document.getElementById("popNo"); var speed = document.getElementById("speed"); var speedoutput = document.getElementById("speedNo"); var canvas = document.getElementById("canvas"); var gno = document.getElementById("genNo"); var context = canvas.getContext("2d"...
import React from "react"; import { Helmet } from "react-helmet"; import Fade from '@material-ui/core/Fade'; import Zoom from '@material-ui/core/Zoom'; import Chip from '@material-ui/core/Chip'; import Card from '../Components/Card.js'; import BlueButtonLarge from "../Components/BlueButtonLarge.js"; import ImageRound f...
const path = require("path"); const merge = require("webpack-merge"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const { CleanWebpackPlugin } = require("clean-webpack-plugin"); const common = require("./webpack.common.js"); const htmlFile...
import React, { Component } from 'react'; import { Row, Col } from 'antd'; import { LoadingOutlined } from '@ant-design/icons'; import SongList from './SongList'; import OperatingBarOfSongList from './OperatingBarOfSongList'; class PlaylistContainer extends Component { constructor(props) { super(props); thi...
const numAnswer = +prompt(`Выберите один из пунктов: 1.Автомобиль 2.Мотоцикл 3.Велосипед`); switch (numAnswer) { case 1: alert('Автомобиль'); break; case 2: alert('Мотоцикл'); break; case 3: alert('Велосипед'); break; default: alert...
import { load } from "../saveload"; const DO_PRESTIGE = "prestige/DO_PRESTIGE"; const END_PRESTIGE = "prestige/END_PRESTIGE"; const DO_RESPEC = "prestige/RESPEC_EMPOWERER"; const END_RESPEC = "prestige/END_RESPEC"; export const doPrestige = (prestigeResourceQuantity) => ({ type: DO_PRESTIGE, prestigeResourceQuant...
import React from 'react'; import NoteNav from './NoteNav'; export default ({ notes }) => { const noteItems = Object.keys(notes).map((key) => { const note = notes[key]; return <li key={key}><NoteNav noteKey={key} note={note} /></li>; }); return ( <div> <ul className="note-list"> {note...
// @flow strict import * as React from 'react'; import { graphql, createFragmentContainer } from '@kiwicom/mobile-relay'; import FutureBookingInformation from './FutureBookingInformation'; import BookingDetailContext from '../../../../context/BookingDetailContext'; import PastBookingInformation from './PastBookingInf...
Ext.define('MyApp.view.MyFields2', { extend: 'MyApp.view.MyFields', alias: 'widget.myfields2', initComponent: function () { this.items = [{ xtype: 'textfield', fieldLabel: 'MyFields2'}]; //Ext.apply(this); //MyApp.view.MyFields2.supperclass.initComponent.call(this); }, ...
var router = require('express').Router(); var db = require('../../../lib/database')(); var authMiddleware = require('../../auth/middlewares/auth'); router.use(authMiddleware.hasAuthadmin); router.get('/', authMiddleware.hasAuthadmin, (req, res) => { // res.render('admin/records/views/records'); ...
import React, { useState, useEffect, useRef } from 'react'; import ThreadInput from './ThreadInput'; import ThreadDetails from './ThreadDetails'; import Message from './Message'; import * as helper from '../helper'; const Thread = ({ activateThread }) => { const { messages: pMessages, title, logo, m...
console.log(`Hello from the otherside!`)
import moment from 'moment'; /** * * Helpers * */ const unshiftArray = (array, entity) => { array.unshift(entity); return array; }; const newConcatArray = (array = [], entity = '') => { const newArray = array.slice(); newArray.pop(); return unshiftArray(newArray, entity); }; const getNewChatEntity ...
import React, { Component } from 'react' import { NavLink } from 'react-router-dom' import PropTypes from 'prop-types' import styled from 'styled-components' import Link from 'next/link' import fetch from 'isomorphic-unfetch' import { connect } from 'react-redux' import actions from '../store/actions' import api from ...
/** * Implements the communication with the ConDec Java REST API for link recommendation and duplicate recognition. * * Is required by: conDecLinkRecommendation, conDecPrompt * * Is referenced in HTML by * settings/linkrecommendation/* */ (function(global) { const ConDecLinkRecommendationAPI = function() { t...
// window.onload = () => { // console.log("wurking") // const firstNumber = document.getElementById('firstNumber'); // const secondNumber = document.getElementById('secondNumber'); // console.log(firstNumber); // const dropdown = document.querySelector('select'); // console.log(dropdown); // ...
import React from 'react'; import './InfoSection.css'; const InfoSection = ({ title, mainVal, optVal }) => { return ( <div className='Info'> <h3 className='Info__title'>{title}: </h3> <div className='Info__detail'> <span className='Info__detail--main'>{mainVal}</span> {optVal ? <span...
const Discord = require('discord.js'); const fs = require('fs') const yes = `819295941621841970`; const no = `819295822230716467`; module.exports = { name: 'help', aliases: ['h', 'info', `commands`], usage: 'help [command]', description: 'Gets information about the bot', execute(message, args) { ...
import React, { Component } from 'react'; class TrackTab extends Component { render(){ return ( <div onClick={this.props.onClick}> <h3>{this.props.track.track_symbol} - {this.props.track.track_title}</h3> </div> ) } } export default TrackTab
var searchData= [ ['ialg_5ffxns',['IALG_Fxns',['../struct_i_a_l_g___fxns.html',1,'']]], ['ialg_5fmemrec',['IALG_MemRec',['../struct_i_a_l_g___mem_rec.html',1,'']]], ['ialg_5fobj',['IALG_Obj',['../struct_i_a_l_g___obj.html',1,'']]], ['ialg_5fparams',['IALG_Params',['../struct_i_a_l_g___params.html',1,'']]], ['...
import MainFeatures from './MainFeatures'; export default MainFeatures;
aluno = (CodAluno, Nota1, Nota2, Nota3) => { let Vetor = [] let Maior = Nota1 let MaiorI = 1 let MediaPonderada = 0 let Aprovacao Vetor.push(Nota1, Nota2, Nota3) for(let i = 1; i < Vetor.length; i++) if(Maior < Vetor[i]){ Maior = Vetor[i] MaiorI = i+1 ...
import { useEffect, useContext } from "react"; import { UserContext } from "../context/user/userContext"; function Logout(props) { const user = useContext(UserContext); useEffect(() => { user.logout(); window.location = "/"; // eslint-disable-next-line }, []); return null; } export default Logout;...
var express = require("express"); const { check, validationResult } = require("express-validator"); var router = express.Router(); const Utils = require("../helpers/utils"); router.get("/:count?", [check("count").isInt({ min: 1 })], (req, res) => { let status = 200; const errors = validationResult(req); // send e...
const urlLib = require('url'); //url模块用来解析 url var aaa = urlLib.parse('http://localhost:9090/aaa?name=fisher&pw=123456') console.log(aaa); // 输出: // Url { // protocol: 'http:', // slashes: true, // auth: null, // host: 'localhost:9090', // port: '9090', // hostname: 'localhost', // hash: null, // sear...
export const actionTypes = { RESET: `@@${process.env.APPNAME}/dir/reset`, REFRESH: `@@${process.env.APPNAME}/dir/refresh`, CHANGE_PAGE: `@@${process.env.APPNAME}/dir/change_page`, SORT_CONDITION: `@@${process.env.APPNAME}/dir/sort_condition`, LOAD_SUCCESS: `@@${process.env.APPNAME}/dir/load_sucess`, LOAD_FA...
import React from 'react' import './aboutUs.scss' import { Link } from 'react-router-dom' import TagManager from 'react-gtm-module' const tagManagerArgs = { dataLayer: { event: 'pageChange', page: { url: '/us', referrer: sessionStorage.getItem('utm') || '/' } },...
const prettyToMinutes = pretty => { const tuple = pretty.split(':') return parseInt(tuple[0] * 60 + tuple[1]) } const now = () => new Date().toISOString().split('T')[1].split(':').slice(0, 2).join(':') const today = () => new Date().toISOString().split('T')[0] const later = (a, b) => prettyToMinutes(a) - prettyTo...
/* eslint-disable */ import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import MenuIcon from '@materia...
const sentence = "Hi!, I am a developer!"; let time = 0; for (let i = 0; i < sentence.length; i++) { time += 50; setTimeout(() => { if (i === sentence.length - 1) { process.stdout.write("\n") } else { process.stdout.write(sentence[i]); } }, time); } // console.log(time); // setTimeout(() =...
import React, { useState } from 'react' import { useRestaurants } from '../hooks/useRestaurants' import { View, Text, StyleSheet, ScrollView } from 'react-native' import SearchBar from '../components/SearchBar' import RestaurantsList from '../components/RestaurantsList' const SearchScreen = () => { const [searchTerm...
import { pipe } from "../pipe/pipe" import { curry } from "../curry/curry" import { isMatch } from "../is-match/is-match" import { isObject } from "../is/is" const _countBy = (_fn, _source) => { const source = isObject(_source) ? Object.entries(_source) : _source const fn = Array.isArray(_fn) ? pipe(..._fn) : _fn ...
import React from "react"; import Link from "next/link"; import ViewCounter from "../counters/Views"; import FavoriteCounter from "../counters/Favorites"; import { Container, Title, Dimensions, Counters } from "./style"; const index = ({ postData }) => { const length = postData.lengthFt && postData.lengthIn ...
//* header Selection const header = document.querySelector('.header'); const hamburger = document.querySelector('.hamburger'); const quickNav = document.querySelector('.navlinks'); window.addEventListener('scroll', ()=>{ header.classList.toggle('sticky', scrollY > 0); }); hamburger.addEventListener('click', ()=...
import React, { Component } from 'react'; import { Container, Row, Col, Form, FormGroup, Input, Label, Button, Spinner, Breadcrumb, BreadcrumbItem, UncontrolledAlert } from 'reactstrap'; import { Link, Redirect } from "react-router-dom"; import axios from 'axios'; import...
/*================================================================ §DESCRIPTION: Ajax 처리관련 공통 스크립트 함수 정의 §AUTHOR (MODIFIER): Hyesoo Kim §FILENAME: stxPECDP_GeneralAjaxScript.js §CHANGING HISTORY: § 2009-06-04: Initiative =================================================================*/ /* stxPECDP_CommonScript....
/* Name:Adam Zaimes Date:9/17/2013 Assignment:Goal 5: Form Validation Developed by the JavaScript team at Fullsail Date: 1306 */ (function(){ var button = document.getElementById('f_submit'); //assigns button to it's ID var myForm = function(e){ //collects user data ...
function GuitarNeck( options ) { this.color = options.color || 'brown'; this.frets = options.frets || '15'; } function GuitarBody( options ) { this.type = options.type || 'medium'; this.material = options.material || 'pine'; } function GuitarFactory() {} GuitarFactory.prototype.createGuitar = fun...
import React from 'react'; const Title = () => { return ( <div className="title"> <h1>PicApp</h1> <h2>Your Pictures</h2> <p> <span className="title-icon"> + </span> Add images and click on them to see the image in full size{' '} ...
import "react-native-gesture-handler"; import React from "react"; import { StyleSheet, View } from "react-native"; import { NavigationContainer } from "@react-navigation/native"; import { createStackNavigator } from "@react-navigation/stack"; import LoginScreen from "./screens/LoginScreen"; import RegisterScreen from "...
/**======================================================== * Module: gen-pred-view.ts * Created by wjwong on 9/9/15. =========================================================*/ /// <reference path="gen-3d-engine.ts" /> /// <reference path="../../../../../model/genstatesdb.ts" /> /// <reference path="../../../../../...
var iconwar = "<img src=\/AliImages\/icon_war.gif align=absmiddle \/> "; var iconload = "<img src=\/AliImages\/ajaxload.gif align=absmiddle \/> "; var badstr = "!&^#|%$)(-+/?<>@`~';:{}[],=\".\\"; var badsql = "!&^|+/?<>`~'="; var $show = function(e) { try { document.getElementById(e).style.display = ""; ...
import React, { useState } from "react"; import { Dashboard } from "../../_metronic/_partials"; import SVG from "react-inlinesvg"; import { Link } from "react-router-dom"; import MaterialTable from "material-table"; import _ from "lodash"; import ChallangeService from "../services/ChallangeService"; import moment from ...
window.onload = function(){ var userList = document.createElement('ul'); var albumList = document.createElement('table'); var currentAlbumId = null; var form = document.getElementById('modal_form'); var closeModal = document.getElementById('modal_close'); closeModal.onclick = function () { ...
import '../../../../scripts/common/app' import View from './index.vue' new Vue({ el: '#app', render: h => { const v = h(View) return <card>{v}</card> } })
const rp = require("request-promise"); const Constants = require("../constants"); const OAuth = require("oauth-1.0a"); const Crypto = require("crypto"); const Url = require("url"); const fs = require("fs"); const APILogger = require("./api-logger"); require("request-debug")(rp, (type, data, rp) => { APILogger.log...
import React, { Component } from 'react'; import { getUser } from '../api'; import Avatar from '@material-ui/core/Avatar'; import ErrorPage from './ErrorPage' class AvatarDisplay extends Component { state = { user: {}, hasError: false, errorMessage: '' } componentDidMount() { ...
// import { REQ_GUESSLIKE } from "./mutation_type"; export default { goodDetail:[],//商品详情 goodDetail1:{},//商品详情 mustDetail:{}, mustList:[],//必选 phonelist:[],//酷机 items:[],//导航 eleList:[],//家电 category:[],//分类 guessLike:{}, //个人中心的猜你喜欢 searchList:[], // 搜索的列表 // 领券中心 classList:[], data:[], ...
import React from 'react'; import { useSelector, useDispatch } from "react-redux"; import { Redirect } from 'react-router-dom'; import AppBar from 'material-ui/AppBar'; const Dashboard = (props) => { const users = useSelector(state => state.registationReducer.login); console.log(users); console.log(users...
var searchData= [ ['initialize_2ejava',['Initialize.java',['../Initialize_8java.html',1,'']]], ['integeradapter_2ejava',['IntegerAdapter.java',['../IntegerAdapter_8java.html',1,'']]] ];
/* Unit Testing for Auth repository. Using Mocha and Chai with local Test database. NODE_ENV is passed when running command 'npm run test'. */ const chai = require("chai"); const expect = chai.expect; const {initDatabase} = require("../app/utils/init-database"); const {register, login} = require("../app/services/auth...
/** * Created by duoyi on 2016/8/30. */ $('[id = forwardBtn]').click(function (e) { ajax({ 'type': 'GET', 'data': {id: $(e.target).attr('data-messageid')}, 'url': '/forward', 'dataType': 'json' }).success(function (result) { if (result.code == 304) { locati...
import { Linking } from "react-native"; const openLink = url => { Linking.openURL(url); }; export default openLink;
import passport from 'passport'; import { Router } from 'express'; import getFavoriteBars from './services/find'; import getFavoriteBar from './services/findOne'; import createFavoriteBar from './services/create'; import deleteFavoriteBar from './services/delete'; const router = Router(); // FavoriteBars router.get(...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const reportSchema = new Schema({ reporter: String, reported: String, msg: String, validation: Boolean, reportedUsername: String, reporterUsername: String }) module.exports = mongoose.model('report', reportSchema, 'reports'...
window.X = Xbn(); X.require.config.baseurl="js/"; X.require.config.rules.push(["\\.","/"]); (function (win,X) { //网站根目录 var rootPath = "http://agent.dev.atcdeal.com/"; //前台服务域名 var prefixUrl = rootPath + "api/international"; //图片上传下载域名 var imageUrl = rootPath + "api/general"; //图片验证码 var codeUrl = rootPath +...
({ getQueueCounts : function(component, event, helper) { helper.callServer( component, "c.getUserPresenceStatus", function(result) { helper.setTableData(component, result); },{ "sObjectType" : component.get("v.sObjectTy...
import React from 'react' export default function ErrorPage(props) { if (!props.err) { return (<div> 404: Page not found :( </div>) } else { const { status, msg } = props.err return ( <div> {status}: {msg} </div> ) } }
import express from 'express'; import { graphqlHTTP } from 'express-graphql'; import cors from 'cors'; import { schema } from './schema'; import connectDB from './database/config'; const app = express(); // allow cross-origin requests app.use(cors()); // Connect to database connectDB(); app.use( '/graphql', gra...
function drawMEAN() { $("#the-svg").empty(); var path, text, circle, image; circle = createCircle('450', '130', '60', '#3E3F37'); svg.appendChild(circle); path = createPath('M 450 110 C420 130 450 160 450 160', '#5EB14A', '#5EB14A', 'none'); svg.appendChild(path); path = createPath('M 450 110 C480 130 4...
import mongoose from 'mongoose'; import softDelete from 'mongoose-softdelete' import mongoosePaginate from 'mongoose-paginate-v2'; import uniqueValidator from 'mongoose-unique-validator'; const Schema = mongoose.Schema; const GroupSchema = new Schema({ name: { type: String, required: true, unique: true, in...
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })...
// TODO: make this more efficient by using the village to scan Creep.prototype.isNearEnemy = function(range = 15) { return this.pos.findInRange(FIND_HOSTILE_CREEPS, range, { filter: x => !ALLIES.usernames.includes(x.owner.username) }).length > 0; } Creep.prototype.nearbyEnemies = function(...
/* * The reducer takes care of state changes in our app through actions */ import { FETCH_ALL_USERS, FETCH_ALL_USERS_FULFILLED, FETCH_ALL_USERS_REJECTED, CREATE_USER, CREATE_USER_FULFILLED, CREATE_USER_REJECTED, FETCH_USER, FETCH_USER_FULFILLED, FETCH_USER_REJECTED, UPDATE_USER, UPDATE_USER_FUL...
const router = require('express').Router(); const item = require('../controllers/items_controller'); const uploadFile = require('../middleware/upload'); router.get('/show', item.getItems); router.post('/add', item.addItems); router.post('/upload', uploadFile.multer.single('img'), uploadFile....
import React, { useReducer } from "react"; import courseContext from "./courseContext"; import courseReducer from "./courseReducer"; const CourseProvider = (props) => { const initialState = { courses: [], myCourses: [], currentUniversity: { universityName: "", universityID: -1 }, //{univers...
export {MainContentContainer} from "./MainContentContainer"
const toggleSpot = () => { const chevron = document.querySelector(".card-list-header"); if (chevron) { const cardList = document.querySelector(".card-list"); chevron.addEventListener("click", (event) => { if (cardList.classList.contains("open")) { cardList.classList.remove("open") } else...
import React, { Component } from 'react'; import "./header.scss"; export default class header extends React.Component { render() { return ( <header > <ul className="nav mx-3 mt-5"> <li className="px-3" >Home</li> <li className="px-3">Weathe...
var express = require('express'); var routes = function(Statistics, QuizSets, GameData) { 'use strict'; var apiRouter = express.Router(); var counter = function(cur, total) { return cur == total; } apiRouter.route('/') .post(function(req, res) { if (req.body) { var o = req.body; // save st...
function generateID(){ var id = ""; var anahtarlar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; var uzunluk = 100; for(var i = 0 ; i < uzunluk ; i++){ id += anahtarlar.charAt(Math.floor(Math.random() * anahtarlar.length)); // console.log(i); // console.log(...
import React, { Component } from "react"; import { MIN_AGE } from "../../constants/userData"; import CustomerService from "../../services/customerService"; import GenderService from "../../services/genderService"; import styles from "./Profile.css"; import userImage from "../../assets/userImage.png"; import Validation...
const React = require("react"); const NoteInput = () => ({ render() { return ( <input className="input input-add" onChange={this.props.handleChange} placeholder={"Type in me! I dare ya."} value={this.props.value} /> ); ...