Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Lakshmi Srinivas
Page 13 of 24
Image Thumbnail with Bootstrap
To add a thumbnail to the image, use the .img-thumbnail Bootstrap class.You can try to run the following code to add a thumbnail to imagesExample Bootstrap Images Styling images with Bootstrap Original Image Thumbnail Image
Read MoreWhat is the difference between super and this, keywords in Java?
The this is a keyword in Java which is used as a reference to the object of the current class. Using it you can − Differentiate the instance variables from local variables if they have same names, within a constructor or a method. Call one type of constructor (parametrized constructor or default) from other in a class. It is known as explicit constructor invocation. Example class Superclass { int age; Superclass(int age) { this.age = age; } public void ...
Read MoreHow to return an array from a method in Java?
We can return an array in Java from a method in Java. Here we have a method createArray() from which we create an array dynamically by taking values from the user and return the created array.Exampleimport java.util.Arrays; import java.util.Scanner; public class ReturningAnArray { public int[] createArray() { Scanner sc = new Scanner(System.in); System.out.println("Enter the size of the array that is to be created:: "); int size = sc.nextInt(); int[] myArray = new int[size]; System.out.println("Enter the elements of the array ::"); for(int i=0; i
Read MoreJava program to print ASCII value of a particular character
In this article, we will learn to print the ASCII value of a particular character in Java. ASCII (American Standard Code for Information Interchange) is a standard encoding system that assigns a unique numeric value to characters like letters, digits, and symbols. We’ll explain the concept of ASCII, demonstrate how to retrieve and display ASCII values in Java and provide practical examples to help you understand and apply this concept effectively. What Is ASCII? ASCII is a character encoding standard where each character (letters, digits, and symbols) is assigned a numeric value. For instance − ...
Read MoreJava program to find the roots of a quadratic equation
In this article, we will learn to find the roots of a quadratic equation using Java. The roots of a quadratic equation are determined by the following formula: $$x = \frac{-b\pm\sqrt[]{b^2-4ac}}{2a}$$ Here we will take input values for the coefficients 𝑎, 𝑏, and 𝑐 of the quadratic equation 𝑎 𝑥 2 + 𝑏 𝑥 + ...
Read MoreJava program to find the sum of elements of an array
To find the sum of elements of an array.create an empty variable. (sum)Initialize it with 0 in a loop.Traverse through each element (or get each element from the user) add each element to sum.Print sum.Exampleimport java.util.Arrays; import java.util.Scanner; public class SumOfElementsOfAnArray { public static void main(String args[]){ System.out.println("Enter the required size of the array :: "); Scanner s = new Scanner(System.in); int size = s.nextInt(); int myArray[] = new int [size]; int sum = 0; System.out.println("Enter the elements of the array one by one "); for(int i=0; i
Read MoreHow to sum values of a Python dictionary?
It is pretty easy to get the sum of values of a Python dictionary. You can first get the values in a list using the dict.values(). Then you can call the sum method to get the sum of these values. exampled = { 'foo': 10, 'bar': 20, 'baz': 30 } print(sum(d.values()))OutputThis will give the output −60
Read MoreHow to avoid bugs in cloud computing
When the word cloud comes to our mind, we think of big white fluffy fantasy. But technically, cloud is the big white hard drive which stores bulky servers and all your information. It’s cool to think how someone else is managing everything and put the data whenever and wherever you want to store.Security might be an issue, you want to consider. But it’s nothing compared to the scary thought of cloud service going down. According to ACM article, regular bugs were pointed in seven coding constructs of the function calls, assignments, conditions, pointers, uses of NULL, variable declaration, function declaration ...
Read MoreFew simple tips to protect your images from casual copying
Casual copying is an act of fraud similar to plagiarism. We find many people choose to ignore the copyright act while they involve themselves in casual copying of images as well as content. Image theft has become rampant in recent times due to two major reasons one because it is easy secondly because individuals can download quickly and copy images from the internet without any difficulty. Many who are involved in casual copying are not even feeling guilty that they are using other’s property without their permission.All those Individuals who post original articles, images or any material online might be ...
Read MoreHow to boost internet security on smartphones and pc
We have internet everywhere these days and we never miss any opportunity to get updated through that channel for any reason. Be it for fun or for work or just for connecting with people. But what we never realize is – how dangerous could it get?. Our silly mistakes or negligence can lead us to great disasters.Be it our laptops, smartphones or PCs – all of them are prone to risks and need to be taken care of properly. So, the question comes – How to make sure that your devices are not getting exploited or hacked. With the growing ...
Read More