Understanding the order of async calls and setTimeouts

The code below contains a function (logger) that sets a timeout, then consoles an async function, then consoles an element (‘c’). The output here is ‘a’, ‘b’, ‘c’. How is it that ‘c’ waits for the other two to return? The await call is inside a console.log, so I thought the ‘c’ console will go… Read More Understanding the order of async calls and setTimeouts

continue loop even if one host is not available

import time import paramiko import sys from getpass import getpass #First Unifi AP IP Address firstip=3 fistdigits = ‘10.0.0.’ #how can we prevent from crashing if 10.0.0.19 is not an available device while firstip<=100: host= f'{fistdigits}{firstip}’ #first one will be 10.0.0.3 then 10.0.0.4 etc username="username" password="password" session= paramiko.SSHClient() session.set_missing_host_key_policy(paramiko.AutoAddPolicy()) session.connect(hostname=host, username=username, password=password) #upgradeurl="https://dl.ui.com/unifi/firmware/U7PG2/4.3.13.11253/BZ.qca956x.v4.3.13.11253.200430.1420.bin&quot; #stdin, stdout,… Read More continue loop even if one host is not available

I have this error System.ServiceModel.Security.MessageSecurityException

For what I read and understood, this happens when I’m not sending the authentication. But I tried to send it in two ways: string userN = "username"; string _pasw = "password"; BasicHttpBinding binding = new BasicHttpBinding(); Endpoint wsdl = new Endpoint("MyEndpoint"); SoapClient client = new SoapClient(binding, wsdl); client.ClientCredentials.UserName.UserName = userN; client.ClientCredentials.UserName.Password = _pasw; await client.OpenAsync();… Read More I have this error System.ServiceModel.Security.MessageSecurityException

How can I remove a specific role from everyone that has it in Discord.js v13

I want my bot to remove a specific role from everyone that has it when a message is sent in a channel client.on(‘messageCreate’, async message => { if(message.channel.id === ‘954375143965216869’){ //counting message.guild.roles.get(‘944674567811645472′).members.map(m=>m.member.id).delete(); } }) I’m using discord.js v13 and node.js v16.4.2 >Solution : This should work, it’ll fetch all the members in the guild and… Read More How can I remove a specific role from everyone that has it in Discord.js v13

Unable to retrieve multiple values from database

The following data exists in the database: [ { "_id": { "$oid": "628c787de53612aad30021ab" }, "ticker": "EURUSD", "dtyyyymmdd": "20030505", "time": "030000", "open": "1.12161", "high": "1.12209", "low": "1.12161", "close": "1.12209", "vol": "561", "id": 1 }, { "_id": { "$oid": "628c787de53612aad30021ac" }, "ticker": "EURUSD", "dtyyyymmdd": "20030505", "time": "030100", "open": "1.12206", "high": "1.1225", "low": "1.12206", "close": "1.1225", "vol": "1223",… Read More Unable to retrieve multiple values from database

Why is my text going vertical at a certain width?

So I have an issue with my code where when my JavaScript types of a word (eg. Gamer) it limits to a certain width and ends up going vertical instead of horizontal. Here are all the classes and code for the text: // TYPEWRITER // const typedTextSpan = document.querySelector(“.typed-text”); const cursorSpan = document.querySelector(“.cursor”); const textArray… Read More Why is my text going vertical at a certain width?

Why is this requests get not working with this url

If i run this Python code my program just hangs up. (I don`t get any error.) import requests url = "https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/generative/dcgan.ipynb&quot; r = requests.get(url) But this works perfectly fine as expected. import requests url = "https://stackoverflow.com&quot; r = requests.get(url) Using curl to get the github file worked also fine. curl https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/generative/dcgan.ipynb So can you reproduce… Read More Why is this requests get not working with this url