Arjun Thakur has Published 1025 Articles

Run SQL file in MySQL database from terminal?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

7K+ Views

To run SQL file in database, you need to use below syntax:mysql -u yourUserName -p yourDatabaseName < yourFileName.sqlTo understand the above syntax, let us open command prompt using windows+R shortcut key.The snapshot is as follows:After pressing OK button, you will get a command prompt. The snapshot is as follows:Now reach ... Read More

How to change line color in EditText

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

4K+ Views

In some situations, we should change edit text bottom line color according to background color. This example demonstrate about how to change line color in EditText.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new ... Read More

DoubleStream findFirst() method in Java

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

98 Views

The findFirst() method returns an OptionalDouble describing the first element of this stream. It returns an empty OptionalDouble if the stream is empty.The syntax is as followsOptionalDouble findFirst()Here, OptionalDouble is a container object which may or may not contain a double value.To use the DoubleStream class in Java, import the ... Read More

How to add the JDBC MySQL driver to an Eclipse project?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

12K+ Views

To add the JDBC MySQL driver to an Eclipse project, you need to follow the below steps.The first step is as follows:Step1: Create a dynamic web project with some name in Eclipse.Step2: After pressing the Dynamic Web Project, a new window will open. Now give the project name. The screenshot is ... Read More

How to get the records of the last two days from the current date in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

To get the records of the last days from the current date, you need to use DATE_SUB(). We will also use NOW() to get the current date. The syntax for the same is as followsSELECT *FROM yourTableName WHERE yourDateTimeColumnName BETWEEN DATE_SUB(DATE(NOW()), INTERVAL 2 DAY) AND DATE_SUB(DATE(NOW()), INTERVAL 1 DAY);Let us ... Read More

PHP and MYSQL database connection and table creation only once if it does not already exist?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

1K+ Views

To create database only once, use the below syntax.CREATE DATABASE IF NOT EXISTS yourDatabaseName;To create table only once, use the below syntax −CREATE TABLE IF NOT EXISTS yourTableName (    yourColumnName yourDatatype,    .    .    .    N );Let us implement both the above syntaxes to create database ... Read More

How to make custom dialog with custom dialog view actions in android?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

1K+ Views

This example demonstrate about How to make custom dialog with custom dialog view actions 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. ... Read More

Assessing compatibility of 27128-20 with 8085AH-2 in 8085 Microprocessor

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

79 Views

The 8085AH-2 always works with a clock period of 200nS. We start the calculations by assuming that the valid address, and IO/M* signals are sent by the 8085AH-2 time 0 nS. After that the, Arithmetic Logical Unit moves to state 0 at 50 nS (tAL), and RD* gets activated at ... Read More

ArrayBlockingQueue take() method in Java

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

223 Views

The take() method of the ArrayBlockingQueue class fetch and removes the head of this queue, waiting if necessary until an element becomes available.The syntax is as followspublic E take() throws InterruptedExceptionTo work with ArrayBlockingQueue class, you need to import the following packageimport java.util.concurrent.ArrayBlockingQueue;The following is an example to implement take() ... Read More

Decimal counter using logic controller

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:25

314 Views

We write a program in the 8085 which is written in assembly language just for the implementation of a decimal counter which is used by the logic controller interface. The input of the starting count must be the input through the complete interface and moreover we display the count on ... Read More

Advertisements