What system does Google use for pagination?

I’m coding Google rank finder. But I couldn’t solve the pagination issue. Since I send the requests simultaneously, it is not possible for me to get the page links when the response comes. Page links are hashed somehow.

https://www.google.com/search?q=%C3%A7eviri&sxsrf=APq-WBt9aLjDqPI-4JSW2oeH-BpYtgGg5g:1649638194952&ei=MntTYrfhOaSWxc8P676kyAU&start=10&sa=N&ved=2ahUKEwi3wviU5Yr3AhUkS_EDHWsfCVkQ8tMDegQIARA9

It uses the start parameter as below, but there can be 7 – 8 items on a page, or 10 items. It is very likely that I will encounter situations such as incorrect pagination.

&start=10

enter image description here

`https://www.google.com/search?q=${encodeURIComponent(keywords)}&start=${page * 10}&oq=${encodeURIComponent(keywords)}&aqs=chrome..69i57j69i60l2j0i512l7j46i512j0i512l4.2056j0j16&client=ms-android-huawei-rev1&sourceid=chrome-mobile&ie=UTF-8`

I am using the url system above but I need to get the results without errors. Is there a transition system such as ?page=1 between Google pages? How can I specify which page it is instead of how many it should start from?

Getting “invalid string length”

I am trying to build a table of seats for a booking system, but I hit a snag when i am trying to loop out the table.

const numSeats = 60; // Number of avaiable seats.
const numRows = 4; // Number of seating rows.
const coupledRows = 2; // Number of rows next to eachother.
    
const buildSeating = (nS, nR, cR) => {
    let sPR = nS / nR; // sPR = seats per row
    var buildSeatingTable = `<table id="seatingTable">`;
    
    console.log(sPR);
    
    for ( let x = 1; x <= nR; x++ ) {
        if ( x = cR ){
            buildSeatingTable += `<tr><td colspan="${sPR}"></td></tr>`;
        } else {
            buildSeatingTable += `<tr>`;
            for ( let xx = 1; xx <= sPR; xx++ ) {
                buildSeatingTable += `<td>${xx}</td>`;
            }
            buildSeatingTable += `</tr>`;
        }
    }
    
    buildSeatingTable += `</table>`;
    
    return buildSeatingTable;
    
    console.log(buildSeatingTable);
}

console.log(buildSeating(numSeats, numRows, coupledRows)); 

The error I get is “Invalid String length, but I cant seem to figure out where the error is. Please help a fellow coder.

Thanks in advance (:

Add option to select box

I just saw an example of a select box where you could add an option by typing an not existing option in the select box it self and by clicking a submit ,

    
function myFunction()
{
var x = document.getElementById("mySelect");
var option = document.createElement("option");
option.text = "Kiwi";
x.add(option);
}

so , my question is how can i change ” kiwi” to any other word could the user could insert

JavaScript function to calculate difference between numbers

for a computer graphics application I’m working on I have this particular situation for which I cannot seem to find a solution (I really suck at math, unfortunately):

I have two values t1 and t2 that can be anything, like this two examples:

case 1:
    let t1 = 9;
    let t2 = 3;

or

case 2:
    let t1 = 2;
    let t2 = 4;

I need to create a JavaScript function that given t1 and t2 I will return the value that I have to ADD to t1 to get the exact same value of t2, for example:

Case 1: given (t1=9, t2=3) the function returns -6, so that

t1 + (-6) = 3

Case 2: given (t1=2, t2=4) the function returns 2, so that:

t1 + 2 = 4

Is there any possible way to do this? I have been for quite a long time playing around with Math.abs, Math.max / Math.min but I cannot seem to nail it…

Thanks in advance!

messageReactionAdd isn’t firing despite proper setup Discord.js

Entire file below. I’ve been trying for an ungodly amount of time to get a reaction roles command working. Currently using MongoDB and everything is setup properly no errors my schema has worked properly as well there are no issues. Despite everything working I cannot get my event to fire at all with multiple revisions. Any help would be phenomenal on this one as I am too new to all of this to figure it out for myself…

const Schema = require('../reactions');
const Discord = require('discord.js');
const { client, intents } = require('..')

module.exports = {
    name: 'messageReactionAdd',
    run: async (reaction, message, user) => {
    
        if (reaction.message.partial) await reaction.message.fetch();
        if (reaction.partial) await reaction.fetch();
        
    const { guild } = reaction.message;
    if (!guild) return;
    if (!guild.me.permissions.has("MANAGE_ROLES")) return;
    
        isEmoji = function(emoji) {
      const e = Discord.Util.parseEmoji(emoji);

      if (e.id === null) {
        return {
          name: e.name,
          id: e.id,
          animated: e.animated,
          response: false
        }
      } else {
        return {
          name: e.name,
          id: e.id,
          animated: e.animated,
          response: true
        }
      }
    }
    
    const member = guild.members.cache.get(user.id);
    
    await Schema.findOne({
        guild_id: guild.id,
        msg_id: reaction.message.id
    }, async (err, db) => {
        if (!db) return;
        if (reaction.message.id != db.msg_id) return;
        
        const data = db.rcs;
        
        for (let i in data) {
            if (reaction.emoji.id === null) {
                if (reaction.emoji.name === data[i].emoji) {
                    member.roles.add(data[i].roleId, ['reaction role']).catch(err => console.log(err));
                }
            } else {
                if (reaction.emoji.id === data[i].emoji) {
                    member.roles.add(data[i].roleId, ['reaction role']).catch(err => console.log(err));
                }
         }
      }
    });
    },
};```

How to have a link trigger both a file download and take me to a new page?

I am trying to set up my website to download a file when a user clicks a specific link and then also take them to a separate page. From what I have gathered, this is not possible using pure HTML since we can’t chain A tags together. Is this understanding correct? If so, how would I approach doing this in Javascript?

For context, I am trying to mimic the behavior on this site: https://code.visualstudio.com/download when you click the download VS Code button.

I’m not quite sure what the error is, but there definitely is one

I’m following a tutorial for Flappy Bird in JavaScript using Visual Studio Code, and I followed the tutorial to the letter. The only thing I couldn’t do was use the mp3 files, so I turned the relevant code into annotations. The sprites and sound files are linked here: https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbkZ2ZGNGZ2RMVkVUMG1VbWdoU2x6N2tNR0k2d3xBQ3Jtc0tuTERlRHNORF96UHVnNF9YZm81ZTBQNkVTcUtPdFRMUnNwUVQ4b25uUkVaZHFqSi1LVVRGcEdXaFBwZkIzSXF0SXQ3QTJBWUVscVZsVDlLNGs0SjlhWUhqS0xuaXM1TllocjV5SVdHY2dBcDh5SU81TQ&q=https%3A%2F%2Fgithub.com%2FThe-Assembly%2FCode-your-own-Flappy-Birds-game-in-JavaScript

Code here:

var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");


var bird = new Image();
var bg = new Image();
var fg = new Image();
var p1 = new Image();
var p2 = new Image();

bird.src = "Images/Game Images/bird.png";
bg.src = "Images/Game Images/bg.png";
fg.src = "Images/Game Images/fg.png";
p1.src = "Images/Game Images/pipeNorth.png";
p2.src = "Images/ Game Images/pipeSouth.png";


var gap = 85;
var birdX = 10;
var birdY = 150;
var constant;
var gravity = 1.5;
var score = 0;


//var fly_sound = new Audio();
//var score_sound = new Audio();

//fly_sound.src = "sounds/fly.mp3"
//score_sound.src = "sounds/score.mp3"

document.addEventListener("keydown",moveUp);

function moveUp(){
    birdY -= 25;
    //fly_sound.play();
}

var pipe = [];

pipe[0] = {
    x : canvas.width,
    y : 0
};


function draw(){
    context.drawImage(bg,0,0);

    for(var i = 0; i < pipe.length; i++){
        constant = p1.height + gap;
        context.drawImage(p1, pipe[i].x, pipe[i].y);
        context.drawImage(p2, pipe[i].x, pipe[i].y + constant);

        pipe[i].x--;

        if(pipe[i].x == 125){
            pipe.push({
                x : canvas.width,
                y : Math.floor(Math.random()*p1.height)-p1.height
            });
        }

        if(birdX + bird.width >= pipe[i].x && birdX <= pipe[i].x + p1.width && (birdY <= pipe[i].y + p1.height || birdY+bird.height >= pipe[i].y + constant) || birdY + bird.height >= canvas.height-fg.height){
            location.reload();
        }

        if(pipe[i].x == 5){
            score++;
            //score_sound.play();
        }

    }

    context.drawImage(fg,0,canvas.height - fg.height);
    context.drawImage(bird,birdX,birdY);
    birdY += gravity;

    context.fillStyle = "#000";
    context.font = "20px Verdana";

    context.fillText("Score : " + score, 10, canvas.height-20);

    requestAnimationFrame(draw);

}

draw();
<!DOCTYPE html>
<html>
    <head>
        <title>Flappy Bird</title>
    </head>
    <body>
        <h3>Flappy Bird</h3>

        <canvas id="canvas" width="288" height="512"></canvas>

        <script src="flappyBird.js"></script>
    </body>
</html>

React App Stops working after calling a Swiper module

I have been struggling with this error for about 3 months now. I’ve re-built the application from the ground up bit by bit to identify what’s causing the application to fail.

Here is what I found out:

I installed a Swiper Module from https://swiperjs.com. When I installed it the first time, it worked fine and the swiper worked perfectly well. Now it seems that Whenever I’m calling the <Swiper> </Swiper> the page goes blank when I’m hosting it on Heroku.

When I get rid of the <Swiper> </Swiper> the app works fine.

Here is what it looks like with Swiper https://cbuilds.herokuapp.com
Here is what it looks like without Swiper https://vvxv.herokuapp.com

In the non-working one I get the following error when I inspect the page:

    at H (react.production.min.js:19:404)
    at t.useState (react.production.min.js:25:277)
    at swiper.js:25:51
    at la (react-dom.production.min.js:157:137)
    at Fa (react-dom.production.min.js:176:260)
    at Xl (react-dom.production.min.js:271:400)
    at _s (react-dom.production.min.js:250:347)
    at js (react-dom.production.min.js:250:278)
    at Os (react-dom.production.min.js:250:138)
    at bs (react-dom.production.min.js:243:163)

The application works on my local machine but it doesn’t work when I push it through to Heroku.
Here is the page that causes me the pain:

import React, { Component } from "react";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import "swiper/css/pagination";
import "swiper/css/navigation";
import { Autoplay, Pagination, Navigation } from "swiper";
 
class Carousel extends Component {
  render() {
    if (!this.props.data) return null;
    return (
      <carousel id="car">
        <div className="swipe">
          <Swiper
            spaceBetween={30}
            centeredSlides={true}
            autoplay={{
            delay: 2500,
            disableOnInteraction: false,
            }}
            pagination={{
            clickable: true,
            }}
            navigation={true}
            modules={[Autoplay, Pagination, Navigation]}
            className="mySwiper"
          >
          <SwiperSlide>Slide 1</SwiperSlide>
          <SwiperSlide>Slide 2</SwiperSlide>
          </Swiper>
        </div>  
      </carousel>
    );
  }
}

export default Carousel;

Thanks for reading and let me know if you have any questions.

Javascript fabric.js function properties of a line

I’m a little new to javascript so just trying to learn here, but why does one function return a value, but the other will not? Let me further explain:

For example:

'''
canvas.on({
    'object:moved': updateNewLineCoordinates,
    'selection:created': updateNewLineCoordinates,
    'selection:updated': updateNewLineCoordinates,
    'mouse:dblclick': addingControlPoints
});
'''

When I double click the mouse this function executes

'''
function addingControlPoints(o) {
    let obj = o.target;  // Object is defined without issue.
    console.log(obj);
}
'''

The console outputs the properties the line that I double clicked on.

However, when I select the line, this function executes:

'''
function updateNewLineCoordinates(o) {
let obj = o.target;  // Object is Undefined, why?
console.log(obj);
'''

The console outputs that the object is undefined. I cannot understand the “why”?

Nodejs ( Express ) application exit completely when passing illegal chars in the URL query

I have a simple /search route and ?q=passing+information
heres what the /search route do:

it takes the url query pass it into the function searchQuery(urlQuery) and that function filter the search input and then query it to the database as shown:

.....
....
..
const search = require('./search.js');

route.get('/search', (request,response)=>{
    searchQuery = request.query.q || false;
    search.searchQuery(searchQuery, function(result){
        if (result.length <= 0 || result.error ){
            response.send('Bad request');
            return
        }
    response.sned('it's all good' + result);
    return
    });
});

search.js

function searchQuery(search,callback){
if (!search){
    obj = {
        error: true,
        errorMSG: 'Error: Invalid request' + search
    }
    return callback(obj);
}
const Regex = /[!@#$%^&*()-_`<>/+=[]]/g
const Query = search.replace(Regex, '').toLocaleLowerCase();


// divide the search query into array
const keyWords = dbQuery.split(' ');

return keyWords;

It works when I go to /search and pass somthing like:
/search?q=hello+world
but when i pass:
/search?q=^
the application exit

and output this in the console:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js "dev"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersEAppDataRoamingnpm-cache_logs2022-04-10T22_52_23_065Z-debug.log

in C:UsersEAppDataRoamingnpm-cache_logs2022-04-10T22_52_23_065Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'A:\Program Files\nodejs\node.exe',
1 verbose cli   'A:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'start',
1 verbose cli   'dev'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: A:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersEDesktopprojdctnode_modules.bin;A:Program FilesZuluzulu-17bin;C:Program Files (x86)Common FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Terminal_Programs;A:Program FilesPuTTY;A:Program Filesnodejs;A;A:Program FilesGitcmd;C:Program FilesMySQLMySQL Shell 8.0bin;C:UsersEAppDataLocalProgramsPythonPython39Scripts;C:UsersEAppDataLocalProgramsPythonPython39;C:UsersEAppDataLocalMicrosoftWindowsApps;A:UsersEAppDataLocalProgramsMicrosoft VS Codebin;C:UsersEAppDataRoamingnpm;A:Flutterbin;A:UsersEAppDataLocalplatforms;A:UsersEAppDataLocalplatform-tools;A:phpphp.exe;A:php;C:UsersEAppDataLocalComposerSetupbin;C:UsersEAppDataRoamingComposervendorbin
9 verbose lifecycle [email protected]~start: CWD: C:UsersEDesktopprojdct
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'node server.js "dev"' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node server.js "dev"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (A:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:375:28)
13 verbose stack     at ChildProcess.<anonymous> (A:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:375:28)
13 verbose stack     at maybeClose (internal/child_process.js:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd C:UsersEDesktopprojdct
16 verbose Windows_NT 10.0.19043
17 verbose argv "A:\Program Files\nodejs\node.exe" "A:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" "dev"
18 verbose node v14.17.2
19 verbose npm  v6.14.13
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node server.js "dev"`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]


Why this is happening why the ‘^’ or ‘~’ or any of similar symbols is killing the application?

Firebase/React auth persistence

How do I persist a user across my app? Every time I create a user via my sign up page, if I reload the page – the user is no longer logged in. I have looked into persistence on the official documentation but am still not sure when to use persistence functions VS. the onAuthStateChange function.

This signup page is just a simple email, password, confirm password form. I omitted the render because that’s not relevant. Once the user submits their data, they are redirected via react-router-dom to a dashboard page. And once again, the user data renders once, but on page reload disappears.

Signup component:

import React, {useRef, useState, useEffect} from 'react'
import {Link, Navigate, useNavigate} from 'react-router-dom'

import { useAuth } from '../contexts/AuthContext'

import { auth } from '../firebase'

export default function 
Signup() {

  //Email Input
  const emailRef = useRef()
  const [email, setEmail] = useState("")
  const [emailFlag, setEmailFlag] = useState()

  //Password Input
  const passwordRef = useRef()
  const [password, setPassword] = useState("")
  const [passwordFlag, setPasswordFlag] = useState()

  //Password Confirmation Input
  const passwordConfirmRef = useRef()
  const [passwordConfirm, setPasswordConfirm] = useState("")
  const [passwordMatchFlag, setPasswordMatchFlag] = useState()
  
  //Destructure Authorization Functionality
  const { currentUser, signup } = useAuth()

  const navigate = useNavigate()
  

  useEffect(() => {

   verify()

  },[password, passwordConfirm])

  //Verify fields are passing
  const verify = () => {

    //set default flag values
    setPasswordFlag(true)
    setPasswordMatchFlag(true)

    //Verify length
    if(passwordRef.current.value.length >= 6) {
      setPasswordFlag(false)
    }
    //Verify match
    if(passwordRef.current.value === passwordConfirmRef.current.value) {
      setPasswordMatchFlag(false)
    }
  }

const handleSubmit = async () => {

  //if values pass
  if(passwordFlag === false && passwordMatchFlag === false){
    
    await signup(auth, email,password)
      .then(console.log('successfuly signed up'))
      .then(console.log(currentUser))
      .then(navigate('/dashboard'))
    
  }
}

The following is Auth Provider setup.

import React, {useContext, useState, useEffect, createContext} from 'react'

import {auth} from '../firebase'
import { createUserWithEmailAndPassword, onAuthStateChanged } from 'firebase/auth'

const AuthContext = createContext()

export function useAuth() {
    return useContext(AuthContext)
}

export function AuthProvider({children}) {

    const [currentUser, setCurrentUser] = useState()

    function signup(auth, email, password){
        
        createUserWithEmailAndPassword(auth, email, password)
    }
    onAuthStateChanged(auth, (user) => {
        setCurrentUser(user)
    })
    const value= {
        
        currentUser,
        signup
    }

  return (
    <AuthContext.Provider value={value}>
        {children}
    </AuthContext.Provider>
  )
}

Can someone proof read this as to why my divs wont toggle on/off together? everything seems right

I am working on a project and I am supposed to use plain ol vanilla javaScript to toggle two different divs at the same time when a link is clicked. I have here what should work, but it keeps going in between forms and going back to the login form. What is going wrong? Excuse me for I am a noob at javaScript/coding and I am still learning in school. I also am not supposed to be using jQuery (because its not part of my curriculum currently i’ve only learned vanilla JS) even though apparently its better for this I am unable to read or write jquery. Thank you for your precious time <3 This will help me immensely as I have been crying for days as I feel like a failure for something so simple sounding.




function switchVisible() {
    if (document.getElementById('login1')) {

        if (document.getElementById('login1').style.display == 'none') {
            document.getElementById('login1').style.display = 'block';
            document.getElementById('register1').style.display = 'none';
        }
        else {
            document.getElementById('login1').style.display = 'none';
            document.getElementById('register1').style.display = 'block';
        }
    }
}
function checkField(field) {
    if (!field.checkValidity()) {
        field.style.backgroundColor = 'pink';
    } else {
        field.style.backgroundColor = '';
    }   
}
window.addEventListener('load', function() {
    const form = document.getElementById('login-form');
    const emailField = form.logfield;
    const password = form.pw;
    const logLink = document.getElementById('logbtn');
    const regLink = document.getElementById('accountbtn');
    const form2 = document.getElementById('register-form');
    const emailField2 = form2.emailField2;
    const password2 = form2.pw2;
    const password3 = form2.pw3;

    emailField2.addEventListener('input', function() {
        checkField(emailField2);
    });
    password2.addEventListener('input', function() {
        checkField(password2);
    });
    password3.addEventListener('input', function() { 
        checkField(password3);
    });
    form2.addEventListener('submit', function(e) {
    checkField(emailField2);
    checkField(password2);
    checkField(password3);
    
    if(!form2.checkValidity(e)) {
        e.preventDefault();
        alert('Please fix form errors.');
    } else {
        alert('Form Submitted');
        }
    });
    emailField.addEventListener('input', function(e) {
        checkField(emailField);
    });
    password.addEventListener('input', function(e) {
        checkField(password);
    });
    form.addEventListener('submit', function(e) {
    checkField(emailField);
    checkField(password);

    if(!form.checkValidity(e)) {
        e.preventDefault();
        alert('Please fix form errors.');
    } else {
        alert('Form Submitted');
        }
    });
});






<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../normalize.css" rel="stylesheet">
<link href="../styles.css" rel="stylesheet">
<script src="../play2learn/login.js"></script>
<title>Login</title>
</head>
<body>
    <header>
        <section>
            <h1>Play2Learn Logo</h1>
            <nav>
                <ul id="nav">
                    <li><a href="index.html">Home</a></li>
                    <li><a href="about.html">About</a></li>
                    <li><a href="contact-us.html">Contact Us</a></li>
                    <li class="contains"><a>Games</a>
                        <ul class="menu">
                            <li><a href="anagram-hunt.html">Anagram Hunt</a></li>
                            <li><a href="math-facts.html">Math Facts</a></li>
                        </ul>
                    </li>
                    <li><a href="login.html">Login</a></li>
                </ul>
            </nav>
        </section>
    </header>
    <hr>
<body>
<div id="wrapper">
<section id="login1">
    <h2>Login</h2>
    <form id="login-form" method="post" novalidate>
        <div>
            <label for="logfield">Email:</label>
            <input type="email" name="logfield" id="logfield" required>
        </div>
        <div>
            <label for="pw">Password:</label>
            <input type="password" name="pw" id="pw" size="15" required>
        </div>
        <div>
           <button type="submit" id="login-btn">LOGIN</button>
        </div>
        <div>
            <a href="" id="accountbtn" onclick="switchVisible();">Need an account? Register</a>
        </div>
    </form>
</section>
<section id="register1">
    <h2>Register</h2>
    <form id="register-form" method="post" no validate>
        <div>
            <label for="email-field2">Email:</label>
            <input type="email" name="email-field2" id="email-field2" required>
        </div>
        <div>
            <label for="pw2">Password:</label>
            <input type="password" name="pw2" id="pw2" size="15" required>
        </div>
        <div>
            <label for="pw3">Repeat Password:</label>
            <input type="password" name="pw3" id="pw3" size="15" required>
        </div>
        <div>
            <button type="submit" id="register-btn">REGISTER</button>
        </div>
        <div>
            <a href="" id="logbtn">Have an account? Log in</a>
        </div>
    </form>
</section>
</div>
</body>
<hr>
<footer>&copy; 2022 Play2Learn</footer>
    <address>
            <a href="contact-us.html">
            <img src="images/email.png" alt="email-icon"></a>
            <a href="https://instagram.com">
            <img src="images/instagram.png" alt="instagram-icon"></a>
            <a href="https://twitter.com">
            <img src="images/twitter-icon.png" alt="twitter-icon"></a>
            <a href="https://facebook.com">
            <img src="images/facebook-icon.png" alt="facebook-icon"></a>
    </address>
</body>
</html>






section {
    display: flex;
    justify-content: space-between;
    padding: .5rem .5rem;
}
h1 {
    color: #4FBDBA;
    margin: .5rem;
    padding: .5rem;
    display: block;
    position: relative;
}
body {
    background-color: #35858B;
}
nav {
    margin: 0 -0.5rem;
    padding: 0.5rem 0.5rem;
    display: inline;
    background: #4FBDBA;
    position: relative;

}
nav li {
    display: inline-block;
    color:rgb(53, 112, 132);
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
nav a {
    display: block;
    padding: .5rem;
    text-decoration: none;
}
nav::after {
    content: "";
    display: block;
    clear: both;
}
nav a:hover {
    background: rgb(51, 136, 132);
}
nav a:active {
    color: teal;
}
li.contains ul {
    display: none;
}
li.contains:hover ul {
    background: #4FBDBA;
    display: block;
    position: absolute;
}
li.contains li {
    float: none;
    font-size: 0.9rem;
}
#clients h2 {
    color: rgb(30, 75, 90);
    margin: .5rem;
    padding: 0.5rem;
}
ul.menu a:hover {
    color: rgb(133, 202, 202);
    font-weight: bold;

}
a img {
    max-width: 32px;
    max-height: 32px;
    float: right;
}
footer {
    padding: .5rem;
    margin: 10px auto;
    text-align: left;
    position: relative;
    display: inline;
}
address {
    display: inline;
    position: relative;
    right: 0;
}
address a {
    flex-flow: row;
}
hr {
    height: 2px;
    background-color: #AEFEFF;
    border: none;
    margin: auto;
}
#anagram {
    flex-flow: row;
    margin: 1rem;
    padding: 2rem;
    color: teal;
    text-align: center;
}
#math {
    flex-flow: row;
    margin: 1rem;
    padding: 2rem;
    color:#35858B;
    text-align: center;
}
div#about h2 {
    color: white;
    text-align: center;
}
p {
    color:white;;
    text-align: center;
}
label {
    display: block;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    margin: 5px 0px;
    color:#072227;
}
input {
    width: 97%;
    padding: 5px;
    margin: 10px auto;
}
textarea {
    width: 97%;
    padding: 5px;
    margin: 10px auto;
}
button#contact-btn,
button#login-btn, 
button#register-button {
    background-color:rgb(51, 136, 132);
    color: white;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: x-large;
    margin-top: 10px;
    padding: 5px;
    width: 100%;
}

form {
    width: 500px;
    margin: 20px auto;
}
#about {
    width: 500px;
    margin: 20px auto;
}
#login1 {
    position: relative;
    display: block;
    width: 100%;
}
#register1 {
    position: relative;
    display: none;
    width: 100%;
}
h2 {
    color: white;
}
section#math-facts {
    width: 100%;
    display: block;
}



is it possible to connect a blockchain in JS with PHP? [closed]

I’m currently creating blockchain with JS and express. Then I want to use PHP in the backend. My plan was to connect them both – use PHP to interact with the database and the blockchain to generate a different data to users, so I was wondering if I can then, with PHP, get the data of the blockchain and pass it to users etc.

Is it possible? As they have different purposes.

Problemas com VSCode [closed]

Olá, tudo bem, eu estou com um problema com o meu VS code…
Na verdade são dois problemas:

O primeiro é que eu não consigo desinstalar o Microsoft Visual Studio Code (User), acho que removi a unidade dele do meu notebook e só sobrou o programa lá na lista de desinstalar os programas, daí eu tentei desinstalar e deu erro.Erro de desinstallação do Microsoft Visual Studio Code (User)

O segundo problema é que eu não consigo Instalar o VSCode. Eu executei o Instalador do VSCode, cliquei em aceitar o acordo, depois cliquei em próximo sem mudar nenhuma daquelas checkbox, depois cliquei em Instalar, então deu esse erro…erro de Instalação do VSCode

ResourceNotFoundException: User pool client ****** does not exist

I can not connect to my app client. The following is the code I use:

const AWS = require('aws-sdk');
    // AWS.config.region = 'ap-southeast-2'
    AWS.config.update({ region: 'ap-southeast-2' });
    try {
        var params = {
            AuthFlow: 'ADMIN_NO_SRP_AUTH',
             ClientId: process.env.COGNITO_CLIENT_ID,
            UserPoolId: process.env.COGNITO_USER_POOL_ID,

            AuthParameters: {
                email: "na****@*****.com",
                password: "********",
            }
        };
        console.debug("params: ", params)
//{apiVersion: '2016-04-18'}

        var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();

        const res = await cognitoidentityserviceprovider.adminInitiateAuth(params, function (err, data) {
            if (err) {
                console.debug("error adminInitiateAuth. params: ", params);
                console.log("err: ", err);
                
    return { props: { data } }
            } else {

The output is:

err:  ResourceNotFoundException: User pool client ******* does not exist

I am this close to start crying like a baby if this doesnt work