Add Packages to Anaconda Environment in Python

Samual Sam
Updated on 31-Oct-2023 03:51:13

22K+ Views

There are multiple ways by which we can add packages to our existing anaconda environment.Method 1 − One common approach is to use the “Anaconda Navigator” to add packages to our anaconda environment. Once “Ananconda Navigator” is opened, home page will look something like −Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not.It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it. Let's suppose tensorflow packages are not installed in ... Read More

Scroll Element Into View with Selenium

Debomita Bhattacharjee
Updated on 31-Oct-2023 03:48:50

29K+ Views

We may need to perform action on an element which is not present in the viewable area of the page. We need to scroll down to the page in order to reach that element.Selenium cannot perform scrolling action directly. This can be achieved with the help of Javascript Executor and Actions class in Selenium. DOM can work on all elements on the web page with the help of Javascript.Selenium can execute commands in Javascript with the help of the execute_script() method. For the Javascript solution, we have to pass true value to the method scrollIntoView() to identify the object below ... Read More

Set Text Font Family in HTML

Samual Sam
Updated on 31-Oct-2023 03:43:24

28K+ Views

To change the text font family in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML tag, with the CSS property font-family. HTML5 do not support the tag, so the CSS style is used to add font size.Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML tag or external style sheet.ExampleYou can try to run the following code to change the text font family in an HTML pageLive Demo ... Read More

Advantages and Disadvantages of the TCP/IP Model

Ginni
Updated on 31-Oct-2023 03:37:33

6K+ Views

TCP/IP signifies the transmission control protocol/Internet Protocol. It was created by the Defence Advanced Research Projects Agency (ARPA, later DARPA) in the late 1970s.It is a collection of communication protocol. Moreover, it involves collection and methods for managing packet transport, media access, session interaction, data transfer, email and terminal emulation.Advantages of TCP/IP ModelThe main advantages of TCP/IP are as follows −It is a broadly accepted model which can deploy effectively in all the practical networking issues.TCP / IP can also enable cross-platform communications among the heterogeneous networks.It supports connection-oriented reliable service. It defines that it maintains the transfer of data ... Read More

Difference Between Constructor and Destructor

Kiran Kumar Panigrahi
Updated on 31-Oct-2023 03:35:33

33K+ Views

In object oriented programming, both constructor and destructor are the member functions of a class having the same name as the class. A constructor helps in initialization of an object, i.e., it allocates memory to an object. On the other hand, a destructor deletes the created constructor when it is of no use which means it deallocates the memory of an object. In this article, we will discuss the important differences between constructors and destructors. Let's start with some basic concepts of constructors and destructors. What is a Constructor? A constructor is a member function of a class that initializes ... Read More

Check if a C/C++ String is an Integer

Ankith Reddy
Updated on 31-Oct-2023 03:32:51

30K+ Views

There are several methods to check that string is an int or not and one of those method is to use isdigit() to check the string.Here is an example to check whether a string is an int or not in C++ language,Example Live Demo#include #include using namespace std; int main() {    char str[] = "3257fg";    for (int i = 0; i < strlen(str); i++) {       if(isdigit(str[i]))       cout

Subclasses, Superclasses, and Inheritance in Java

Alex Onsman
Updated on 31-Oct-2023 03:28:07

36K+ Views

The Enhanced Entity Relationship Model contains all the features of the Entity Relationship model. In addition to all that, it also contains features of Subclasses, Superclasses and Inheritance.All of these in detail are as follows −SubclassesA subclass is a class derived from the superclass. It inherits the properties of the superclass and also contains attributes of its own. An example is:Car, Truck and Motorcycle are all subclasses of the superclass Vehicle. They all inherit common attributes from vehicle such as speed, colour etc. while they have different attributes also i.e Number of wheels in Car is 4 while in Motorcycle ... Read More

Clear Python Shell

pawandeep
Updated on 31-Oct-2023 03:26:00

26K+ Views

Python provides a python shell which is used to execute a single Python command and display the result. It is also called REPL. REPL stands for Read, Evaluate, Print and Loop. The command is read, then evaluated, afterwards the result is printed and looped back to read the next command.Sometimes after executing so many commands and getting haphazard output or having executed some unnecessary commands, we may need to clear the python shell. If the shell is not cleared, we will need to scroll the screen too many times which is inefficient. Thus, it is required to clear the python ... Read More

Difference Between Default and Static Interface Method in Java 8

Himanshu shriv
Updated on 31-Oct-2023 03:22:25

29K+ Views

According to Oracle's Javadocs −Default methods enable you to add new functionality to the interfaces of your libraries and ensure binary compatibility with code written for older versions of those interfaces.A static method is a method that is associated with the class in which it is defined rather than with any object. Every instance of the class shares its static methods.Static method in interface are part of the interface class can’t implement or override it whereas class can override the default method.Sr. No.KeyStatic Interface MethodDefault Method1BasicIt is a static method which belongs to the interface only. We can write implementation ... Read More

System.getProperty() in Java

Anvi Jain
Updated on 31-Oct-2023 03:19:57

27K+ Views

The getProperty(String key) method in Java is used to returns the system property denoted by the specified key passed as its argument.It is a method of the java.lang.System Class.Declaration − The java.lang.System.getProperty(String key) is declared as follows −public static String getProperty(String key)where key is the name of the System property.Some values of the key are as follows −file.separatorjava.specification.versionjava.vm.versionjava.class.pathjava.vendorjava.class.versionos.archjava.compilerline.separatorjava.versionjava.vendor.urlos.nameLet us see a program showing the use of getProperty() method in Java −Example Live Demopublic class Example {    public static void main(String[] args) {       System.out.println("System property: " + System.getProperty("user.dir"));       System.out.println("Operating System: " + System.getProperty("os.name"));     ... Read More

Advertisements