dimanche 2 mai 2021

How would you display a docker output on a web page?

I have a webserver running on an host, and a docker image running on another one. I am trying to display the docker image output on a webpage, and I was wondering what would be the best way to:

  1. Draw the console on the web page: very likely html/css and javascript, I had a look at xTerm.js which seems to be a good framework to draw and manage consoles on web pages.

  2. Send the docker image output from its host to the webserver host, so I can display it on the user session webpage: I thought about using rabbitmq, storing each line/group of lines in a message, and it would expect an answer if the console needs interaction (which would mean publishing a reply message from the webserver and so on..) But it sounds overcomplex, and maybe something else easier such as direct SSH connection between the user page and the docker host might work, instead of using a message queue?

What do you think?

Thanks.




Hydra Password Cracker error using cygwin64 in windows

Please Help i cannot install hydra password cracker using cygwin64 in windows 8.1 What should i do Below are pics error

error

error




How can i change name of a btn after login in react?

Hi i am working on my new website.. I want to change the name of the Button shown below forms sign in to profile and on-click i want to show a side bar about that profile in react.

Note: This sign in button is on my NavBar.

    <NavBtn>
        <NavBtnLink to="/login">Sign In</NavBtnLink>
    </NavBtn>



How DNS works with load balancer in picture?

Stumbled upon an article explaining DNS Load Balancing and i got confused.

DNS load balancing enables the authoritative server to return different IP addresses of a certain domain to the clients. Every time it receives a query for an IP, it returns a list of IP addresses of a domain to the client.

With every request, the authoritative server changes the order of the IP addresses in the list in a round-robin fashion.

As the client receives the list, it sends out a request to the first IP address on the list to fetch the data from the website. The reason for returning a list of IP addresses to the client is to enable it to use other IP addresses in the list in case the first doesn’t return a response within a stipulated time.

When another client sends out a request for an IP address to the authoritative server, it re-orders the list and puts another IP address on the top of the list following the round-robin algorithm.

From the explaination above, i will imagine that Authoritative server will have to first fire a request to Load Balancer in order to know which app servers are in service, which then forward the list back to client browser.

Prior to this, i was having the impression that Authoritative server will only has the location of my load balancer, client browser will then send the request to load balancer, and then load balancer only take care on how to route the request being routed, all of these handled within load balancer itself, but clearly it conflicts with the article i've read. Wondering if any can shed some lights on this? And wondering if there is any way for us to verify all these by ourselves?




How to make deeplearning experience site for school students

I would like to make website for AI education. with this site school student can get experience with objection detection, segmentation, classification and speech recognition with there are own videos, images and webcam input. and also they can training there data such as images and voices with this site.

Can you share your experience to implement this kinds of website? what is the step i would go?

Thanks all.

Best regards, Rahk.




javascript event listener not accepting an object's method [duplicate]

So I was trying to create an audio player using javascript when I stumbled upon something, the following code works:

var player = new Audio('sound.mp3');
function playSound(){
player.play();
}
document.querySelector('button').addEventListener('click', playSound);

but this one doesn't:

var player = new Audio('sound.mp3');
document.querySelector('button').addEventListener('click', player.play);

and I couldn't understand why.




samedi 1 mai 2021

Suppressing WWW-Authenticate using X-Requested-With: XMLHttpRequest: source?

This tutorial states that appending X-Requested-With: XMLHttpRequest to the HTTP request prevents the (spring) server from responding with a WWW-Authenticate.

I am wondering:

  1. Is this behaviour documented? Can anyone point me to a source of reference?
  2. Is it a standard or a convention in web servers? is it spring-specific?

Thanks!