Soluții

JavaScript program to swap two variables using es6(ES2015) destructuring assignment

Here, a new es6 feature, called destructuring assignment [a, b] = [b, a], is used to swap the value of two variables. If [a, b] = [1, 2, 3], the value of a will be 1 and value of b will be 2.

First a temporary array [b, a] is created. Here the value of [b, a] will be [2, 4].
The destructuring of the array is done, i.e [a, b] = [2, 4].
As a result, the value of the variables are swapped.

[mai mult...]

P2P(Peer To Peer) File Sharing

A peer-to-peer network allows computer hardware and software to communicate without the need for a server. Unlike client-server architecture, there is no central server for processing requests in a P2P architecture. The peers directly interact with one another without the requirement of a central server.

[mai mult...]

Program to remotely Power On a PC over the internet using the Wake-on-LAN protocol

Wake-on-lan is an Ethernet or token ring computer networking standard that allows a computer to be turned on or awakened by a network message.

  • The message is usually sent to the target computer by a program executed on a device connected to the same local area network, such as a smartphone.
  • It is also possible to initiate the message from another network by using subnet-directed broadcasts or a WOL gateway service.
  • Equivalent terms include wake on WAN, remote wake-up, power on by LAN, power up by LAN, resume by LAN, resume on LAN and wake up on LAN.
[mai mult...]