Block a Website in Chrome and Internet Explorer

Johar Ali
Updated on 15-Jun-2020 08:39:06

383 Views

To block a website on any of the web browsers like Google Chrome, Firefox, and Internet Explorer in a Windows system is quite easy. Follow the below-given steps to block a website −Open Notepad as an administrator i.e. Run as Administrator.Now, after opening Notepad, click on File, then click Open and move to the following path −C:\Windows\System32\drivers\etcThe following files will be visible. Click hosts and open it in Notepad −The notepad file will consist of some text. Reach the last line and press enter. Here, add the following to block any website and click Save to save the Notepad. We’re ... Read More

Popping Elements from a Stack in JavaScript

karthikeya Boyini
Updated on 15-Jun-2020 08:38:10

351 Views

Consider a simple stack class in Javascript.Exampleclass Stack {    constructor(maxSize) {       // Set default max size if not provided       if (isNaN(maxSize)) {          maxSize = 10;       }       this.maxSize = maxSize; // Init an array that'll contain the stack values.       this.container = [];    }    // A method just to see the contents while we develop this class    display() {       console.log(this.container);    }    // Checking if the array is empty    isEmpty() {   ... Read More

Peeking Elements from a Stack in JavaScript

Samual Sam
Updated on 15-Jun-2020 08:34:42

815 Views

Consider a simple stack class in Javascript. Exampleclass Stack {    constructor(maxSize) {       // Set default max size if not provided       if (isNaN(maxSize)) {          maxSize = 10;       }       this.maxSize = maxSize; // Init an array that'll contain the stack values.       this.container = [];    }    // A method just to see the contents while we develop this class    display() {       console.log(this.container);    }    // Checking if the array is empty    isEmpty() {   ... Read More

How to Make a Website Step by Step

Ali
Ali
Updated on 15-Jun-2020 08:33:11

984 Views

A website is a group of a web page, which has content, images, videos, header, etc. It is with a unique domain name and published on the web server.DomainA domain is what you type on the web browser to open a website. For example www.tutorialspoint.com, etc. The domain is uniquely defined for a website. Buy a domain name from domain name registrar and website hosting companies like GoDaddy.Here, you can see the domain name typed on the web browser:Hosting PackageThe website which you’re looking to develop will have content, images, documents, etc. For all these, you need space, which is ... Read More

Clear Elements of a Stack in JavaScript

karthikeya Boyini
Updated on 15-Jun-2020 08:31:33

1K+ Views

Consider a simple stack class in Javascript. Exampleclass Stack {    constructor(maxSize) {       // Set default max size if not provided       if (isNaN(maxSize)) {          maxSize = 10;       }       this.maxSize = maxSize; // Init an array that'll contain the stack values.       this.container = [];    }    // A method just to see the contents while we develop this class    display() {       console.log(this.container);    }    // Checking if the array is empty    isEmpty() {   ... Read More

The Stack Class in JavaScript

Samual Sam
Updated on 15-Jun-2020 08:29:05

265 Views

Here is the complete implementation of the Stack class −Exampleclass Stack {    constructor(maxSize) { // Set default max size if not provided       if (isNaN(maxSize)) {          maxSize = 10;       }       this.maxSize = maxSize; // Init an array that'll contain the stack values.       this.container = [];    }      display() {       console.log(this.container);    }      isEmpty() {       return this.container.length === 0;    }      isFull() {       return this.container.length >= this.maxSize;    }   ... Read More

Replace Values of a Python Dictionary

George John
Updated on 15-Jun-2020 08:27:55

11K+ Views

You can assign a dictionary value to a variable in Python using the access operator []. For example,Examplemy_dict = {    'foo': 42,    'bar': 12.5 } new_var = my_dict['foo'] print(new_var)OutputThis will give the output −42This syntax can also be used to reassign the value associated with this key. For example,Examplemy_dict  =  {    'foo': 42,    'bar': 12.5 } my_dict['foo']  =  "Hello" print(my_dict['foo'])OutputThis will give the output −Hello

Choose an HTML Editor

Rahul Sharma
Updated on 15-Jun-2020 08:27:06

414 Views

HTML Editors are WYSIWYG editor program which gives options to edit source code. Some of the well-known editors include Adobe Dreamweaver, CoffeeCup, KomodoIDE, EditPlus, etc. To choose an HTML Editor, you need to compare some of the features and find the best one to edit the source code.While choosing and trying HTML Editors, try to get an IDE will some or all of the following features and capabilities −Code Collapsing When an enormous amount of code is written, then code collapsing features works great and to get an HTML Editor which provides this option will work like a charm and ... Read More

Use an Image in a Webpage

Srinivas Gorla
Updated on 15-Jun-2020 08:24:47

2K+ Views

To use an image on a webpage, use the tag. The tag allows you to add image source, alt, width, height, etc. The alt is the alternate text attribute, which is text that is visible when the image fails to load.The following are the attributes −AttributeDescriptionAltThe alternate text for the imageHeightThe height of the imageIsmapThe image as a server-side image-mapLongdescThe URL to a detailed description of an imageSrcThe URL of an imageUsemapThe image as a client-side image-mapWidthThe width of the imageJust keep in mind the tag has no end tag.ExampleYou can try to run the following code to ... Read More

Joining Two Arrays in JavaScript

Sharon Christine
Updated on 15-Jun-2020 08:12:22

310 Views

There are two ways to join 2 arrays in Javascript. If you want to get a new array and not want to disturb the existing arrays while joining the two arrays then you should use the concat method as follows − Examplelet arr1 = [1, 2, 3, 4]; let arr2 = [5, 6, 7, 8]; let arr3 = arr1.concat(arr2); console.log(arr1); console.log(arr2); console.log(arr3);OutputThis will give the output −[1, 2, 3, 4] [5, 6, 7, 8] [1, 2, 3, 4, 5, 6, 7, 8]Note that the existing arrays were not modified. If you want to join in place, you'll need to use the ... Read More

Advertisements