Why are superstitions so prevalent in India?

Hansika Rani
Updated on 30-Jul-2019 22:30:25
India is a country of vast diversities. The belief systems also change across religions and castes. I think the great Indian culture of obeying and not questioning the elders has a big hand in superstitions that are prevailing in India. One more thing in Indians is, when it comes to superstitions, even the most educated and sensible persons also lack scientific temper and logical thinking. Many people follow superstitions out of habit without much thinking.There are many beliefs and practices in India that have not changed even with time. These fears and consequences of not following certain things are imbibed ... Read More

8085 program to find minimum value of digit in the 8 bit number

George John
Updated on 30-Jul-2019 22:30:25
In this program we will see how to find the minimum digit from a two-digit number.Problem StatementWrite 8085 Assembly language program to find the minimum digit from a two-digit number. The number is stored at location 8000H, store the result at 8050H.DiscussionHere we are performing this task by using masking operation. Each digit takes one nibbles. We are masking the upper nibble by ANDing with 0FH (0000 1111). Store the lower nibble into another register. After that, we are taking the upper nibble. To get it, we are shifting the number to the right four times to convert lower nibble ... Read More

C++ Program to Implement a Binary Search Algorithm for a Specific Search Sequence

Ankith Reddy
Updated on 30-Jul-2019 22:30:25
In this Program we need to implement binary search to find the existence of a search sequence in an array. The time complexity of Binary search is O(log(n)).Required steps and pseudocodesBegin    BinarySearch() function has ‘arr’ the array of data and ‘n’ the number of values, start and end index, iteration count and b[0] be the element to be searched in the argument list.    Increment the iteration counter and compare the item value with the a[mid].    If item < a[mid] choose first half otherwise second half to proceed further.    Return index value to main.    In main(), ... Read More

Create Quintet Tuple in Java using with() method

Samual Sam
Updated on 30-Jul-2019 22:30:25
The with() method is used in Java to create Quintet Tuple.Let us first see what we need to work with JavaTuples. To work with Quintet class in JavaTuples, you need to import the following package −import org.javatuples.Quintet;Note − Steps to download and run JavaTuples program. If you are using Eclipse IDE to run Quintet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → Add External Jars and upload the downloaded JavaTuples jar file.The following is an example −Exampleimport org.javatuples.Quintet; public class Demo { public static void main(String[] args) { ... Read More

How to print a date using JSP Expression?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25
Following example shows a JSP Expression printing date on the browser −           A Comment Test     Today's date: The above code will generate the following result −Today's date: 11-Sep-2010 21:24:25

How can we retrieve a blob datatype from a table using the getBinaryStream() method in JDBC?

Nancy Den
Updated on 30-Jul-2019 22:30:25
The ResultSet interface provides the method named getBlob() to retrieve blob datatype from a table in the database. In addition to this, it also provides a method named getBinaryStream()Like getBlob() this method also accepts an integer representing the index of the column (or, a String value representing the name of the column) and retrieves the value at the specified column. The difference is unlike the getBlob() method (which returns a Blob object) this method returns an InputStream object which holds the contents of the blob datatype in the form of un-interpreted bytes.ExampleAssume we have created a table named MyTable in ... Read More

LocalTime minusMinutes() method in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25
An immutable copy of a LocalTime object where some minutes are subtracted from it can be obtained using the minusMinutes() method in the LocalTime class in Java. This method requires a single parameter i.e. the number of minutes to be subtracted and it returns the LocalTime object with the subtracted minutes.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo { public static void main(String[] args) { LocalTime lt = LocalTime.now(); System.out.println("The current LocalTime is: " + lt); ... Read More

LongStream skip() method in Java

Smita Kapse
Updated on 30-Jul-2019 22:30:25
The skip() method of the LongStream class returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream.The syntax is as follows −LongStream skip(long numEle)Here, numEle is the number of elements to be skipped.To use the LongStream class in Java, import the following package −import java.util.stream.LongStream;First, create a LongStrem and add some elements −LongStream longStream = LongStream.range(5000L, 5025l);Now, use the skip() method to skip the first n number of elements −longStream.skip(15) The following is an example to implement LongStream skip() method in Java −Example Live Demoimport java.util.stream.LongStream; public class Demo {   ... Read More

C++ Program to Implement Adjacency List

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25
The adjacency list representation of a graph is linked list representation. In this representation we have an array of lists The array size is V. Here V is the number of vertices. In other words, we can say that we have an array to store V number of different lists. If a list header is vertex u, then it signifies that it will hold all of the adjacent vertices of u.The complexity of Adjacency List representationThis representation takes O(V+2E) for undirected graph, and O(V+E) for directed graph. If the number of edges are increased, then the required space will also ... Read More

How to get distinct list of sub-document field values in MongoDB?

Smita Kapse
Updated on 30-Jul-2019 22:30:25
To get distinct list of sub-document field values, you can use dot(.). The syntax is as follows −db.yourCollectionName.distinct("yourOuterFieldName.yourInnerFieldName");To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.getDistinctListOfSubDocumentFieldDemo.insertOne(    ... {       ... "StudentId": 101,       ... "StudentPersonalDetails": [          ... {             ... "StudentName": "John",             ... "StudentAge":24          ... },          ... {             ... ... Read More
Advertisements