Articles on Trending Technologies

Technical articles with clear explanations and examples

How to get number of quarters between two dates in Java

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 789 Views

Let’s say we have the following two dates −LocalDate.of(2019, 3, 20); LocalDate.of(2019, 10, 25);To get the number of quarters between the above two dates, use the QUARTER_YEARS −IsoFields.QUARTER_YEARS.between(LocalDate.of(2019, 3, 20),LocalDate.of(2019, 10, 25));Exampleimport java.time.LocalDate; import java.time.temporal.IsoFields; public class Demo {    public static void main(String[] args) {       long quarters =          IsoFields.QUARTER_YEARS.between(LocalDate.of(2019, 3, 20), LocalDate.of(2019, 10, 25));       System.out.println("Quarters between the two dates = " + quarters);    } }OutputQuarters between the two dates = 2

Read More

What reasons could make your training a flop?

Anuradha Nanda
Anuradha Nanda
Updated on 30-Jul-2019 284 Views

You have attended a great training session, which was very interactive and all the participants enjoyed the session. Even the trainer was very good, but still, there was not a great outcome from it. What could be the reason?It may be because Service / Customer Satisfaction Scores Are Poor. In other words, you might not have scheduled enough employees to handle responsibilities, like the lunchtime rush, or the cashier stations, or parking during a busy holiday week. There could be many other reasons too:Irrelevant Topics Discussed: We need to evaluate the training properly. Maybe the topic of the training was not ...

Read More

Why is the term "Bachelor" used in educational qualifications?

Suman Nanda
Suman Nanda
Updated on 30-Jul-2019 444 Views

A college degree (from Middle Asian baccalaureus) or baccalaureate (from Modern Latin baccalaureates) is an undergraduate academic level awarded by universities and colleges after completion of training lasting three to several years (depending on the organization and academic discipline).Origin of the TermThe definition of bachelor in the twelfth century referred to a knight bachelor, who was too young or poor to gather vassals under his own banner. By simply the end of the 13th century, it was also employed by junior associates of guilds or schools. By folk etymology or wordplay, the word baccalaureus was associated with bacca Laurie ("laurel berry")It was ...

Read More

Rotation of stepper motor in forward and reverse directions

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 3K+ Views

Let us consider ALS-NIFC-01, which is a stepper motor interface. Using 26-core flat cable, it is connected to ALS kit. It will be used for interfacing two stepper motors. In our current experiment, we use only one stepper motor. The motor has a step size of 1.8°. The stepper motor works on a power supply of +12V. Power supply of +5V (white wire), GND (black), and +12V (red) is provided to the interface. Note that -12V supply is not used by the interface. We shall have to make sure that the +12V supply has adequate current rating to drive the ...

Read More

How to add multiple copies in arrylist for Listview in Android?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 286 Views

This example demonstrates How to add multiple copies in arrylist for Listview in Android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/ activity_main.xml.                         In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on ...

Read More

Is there an operator in MySQL to implement multiple NOT conditions like WHERE id != 5 AND id != 10 AND id != 15?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 636 Views

Yes, for this MySQL comes with a NOT IN.The syntax is as followsSELECT *FROM yourTableName WHERE yourColumnName NOT IN(1, 2, 7);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table User_informations    - > (    - > UserId int,    - > UserName varchar(20)    - > ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command.The query is as followsmysql> insert into User_informations values(12, 'Maxwell'); Query OK, 1 row affected (0.17 sec) mysql> insert into User_informations values(7, 'David'); Query OK, 1 ...

Read More

How to use lastIndexOf () in Android textview?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 433 Views

This example demonstrate about How to use lastIndexOf () in Android textview.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.             In the above code, we have taken name as Edit text, when user click on button it will take data and returns last index of “sai”.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; ...

Read More

The addAtX() method of the Octet Tuple in Java

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 184 Views

The addAtX() method is used in Octet Tuple to add value. Here, X is the index wherein you need to add the value i.e. to add value at index 0, use the addAt0() and value as a parameter. Let us first see what we need to work with JavaTuples. To work with Octet class in JavaTuples, you need to import the following packageimport org.javatuples.Octet;Note − Download JavaTuples Jar library to run JavaTuples program. If you are using Eclipse IDE, then Right Click Project -> Properties -> Java Build Path -> Add External Jars and upload the downloaded JavaTuples jar file. ...

Read More

Count value for multiple columns in MySQL?

George John
George John
Updated on 30-Jul-2019 687 Views

To count value for multiple columns, use the CASE statement. Let us first create a table::mysql> create table countValueMultipleColumnsDemo    -> (    -> Value1 int,    -> Value2 int,    -> Value3 int    -> ); Query OK, 0 rows affected (0.62 sec)Following is the query to insert some records in the table using insert command:mysql> insert into countValueMultipleColumnsDemo values(10, 15, 10); Query OK, 1 row affected (0.15 sec) mysql> insert into countValueMultipleColumnsDemo values(20, 30, 10); Query OK, 1 row affected (0.14 sec) mysql> insert into countValueMultipleColumnsDemo values(40, 10, 60); Query OK, 1 row affected (0.18 sec)Following ...

Read More

C++ Program to Check if an UnDirected Graph is a Tree or Not Using DFS

George John
George John
Updated on 30-Jul-2019 392 Views

A graph is a tree if it does not contain any cycle. This is a C++ program to check whether an undirected graph is tree or not.AlgorithmBegin function cyclicUtil() :    A) Mark the current node as visited.    B) Recur for all the vertices adjacent to this vertex.    C) If an adjacent is not visited, then recur for that adjacent.    D) If an adjacent is visited and not parent of current vertex, then there is a cycle. End Begin function cyclic():    A) Mark all the vertices as not visited and not part of recursion stack.   ...

Read More
Showing 59751–59760 of 61,299 articles
Advertisements