Articles on Trending Technologies

Technical articles with clear explanations and examples

Tutorix - AI Tutor

Where and how can I create a private constructor in Java?

Swarali Sree
Swarali Sree
Updated on 25-Feb-2020 432 Views

We can use a private contractor in a Java while creating a singleton class. The Singleton's purpose is to control object creation, limiting the number of objects to only one. Since there is only one Singleton instance, any instance fields of a Singleton will occur only once per class, just like static fields. Singletons often control access to resources, such as database connections or sockets.ExampleThe easiest implementation consists of a private constructor and a field to hold its result, and a static accessor method with a name like getInstance().The private field can be assigned from within a static initializer block ...

Read More

What does the method ensureCapacity(int, minCapacity) do in java?

Govinda Sai
Govinda Sai
Updated on 25-Feb-2020 237 Views

The ensureCapacity(int minCapacity) method of the class java.util.ArrayList increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.Exampleimport java.util.ArrayList; public class ArrayListDemo { public static void main(String args[]) { ArrayList arrlist = new ArrayList(5); arrlist.add(10); arrlist.add(50); arrlist.add(30); arrlist.ensureCapacity(15); for (Integer number : arrlist) { System.out.println("Number = " + number); } } }OutputNumber = 10 Number = 50 Number = 30

Read More

What does the method contains(obj o) do in java?

Nikitha N
Nikitha N
Updated on 25-Feb-2020 211 Views

The contains(Object) method of the java.util.ArrayList class returns true if this list contains the specified element.Exampleimport java.util.ArrayList; public class ArrayListDemo { public static void main(String[] args) { ArrayList arrlist = new ArrayList

Read More

What is the Java Runtime Environment (JRE)?

Ayyan
Ayyan
Updated on 25-Feb-2020 788 Views

JRE is Java Runtime Environment and is the machine-specific implementation of JVM. It contains libraries like rt.jar, class loaders etc which are used by JVM.

Read More

How to create an unordered_set of user defined class or struct in C++?

Ayush Gupta
Ayush Gupta
Updated on 25-Feb-2020 927 Views

In this tutorial, we will be discussing a program to understand how to create an unordered set of user defined class or struct in C++.For this we will create a structure type and then compare two structure types with the function defined by the user to store the hash function.Example#include using namespace std; //defined structure struct Test {    int id;    bool operator==(const Test& t) const{       return (this->id == t.id);    } }; //defined class for hash function class MyHashFunction {    public:       size_t operator()(const Test& t) const{         ...

Read More

How to download all images on a web page at once?

Smita Kapse
Smita Kapse
Updated on 25-Feb-2020 2K+ Views

Chrome Extensions eases your work since it provides more features. To download all images on a web page at once, use a Chrome Extension.Download the Image Downloader chrome extension, which is open source. After adding it to Chrome, you can see the following settings −An icon will be visible in the Chrome browser, which is for Image Downloading. Go to the webpage from where you need the images.On reaching the page, click the extension icon as shown below −Click on the images you want to download or select all from the checkbox. After that click Download and that’s it.Here, you ...

Read More

Does a favicon have to be 32x32 or 16x16?

Vikyath Ram
Vikyath Ram
Updated on 25-Feb-2020 6K+ Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with a smaller size. The size of a favicon is 16x16, since it also gets displayed next to the URL of your site in a browser's address bar.The 16x16 size for Favicon is suitable for web browsers. But the size varies on multiple platforms and devices. The size is added using the sizes attribute.The preferred size,    1.16x16: For web browser   2. 32x32: or taskbar shortcut icon   3. 96x96: For desktop shortcut iconHere’s how you can add them ...

Read More

What are favicon best practices regarding size and format?

Paul Richard
Paul Richard
Updated on 25-Feb-2020 4K+ Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size.The size of a favicon is 16x16 since it also gets displayed next to the URL of your site in a browser's address bar. It is visible on a users list of bookmarks and easily helps in recognizing the website from a list of websites.Here’s how you can spot the Favicon, The preferred size, 1. 16x16: For a web browser 2. 32x32: or taskbar shortcut icon 3. 96x96: For ...

Read More

What are free Online Favicon Generators?

Arushi
Arushi
Updated on 25-Feb-2020 448 Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size. Creating it is not something to worry about. Online Favicon Generators easily gives options to create a Favicon for free on button click.Let us see some of the free online Favicon Generators, Favicon.ccFavicon.cc is a favicon creator and generator. Design or you can easily import a logo to design your favicon. You can also create animated Favicon here.Favicon-Generator.orgUsing this create and generate icons for the Web, Android, Microsoft, and iOS apps. Choose an image ...

Read More

How to redirect URLs with your Hosting Account?

Fendadis John
Fendadis John
Updated on 25-Feb-2020 309 Views

You can easily redirect URLs to the settings under your hosting account. Let’s say you have a blogger blog and you want to redirect it to your website.A redirect automatically sends your visitors to another destination, within the same site or a new URL.Follow the below given steps to redirect URLs to your hosting account, Go to your hosting account and log in.Click Manage Web Hosting and reach the cPanel. Here, search the Domains section and click Redirects, Now, a section can be seen to add a redirect. Here, fill the following fields to redirect URL, TypeThe type of redirect ...

Read More
Showing 54751–54760 of 61,298 articles
Advertisements