Before we answer if TestNG is a part of selenium or not, let’s have a brief understanding of what actually TestNG.TestNG stands for Test Next Generation. It is an automation testing framework and uses annotations. Annotations are lines of code that control how the method below it will execute. The greatest advantage of TestNG is that we can generate test reports and know the number of scripts passed, failed or skipped. Failed test cases can be run separately using TestNG. Along with it TestNG provides enables us with the ability to execute the test cases by reading the input file ... Read More
You can use DISTINCT along with SUBSTRING_INDEX() to extract the filename extensions. Let us first create a table−mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FileName text ); Query OK, 0 rows affected (0.75 sec)Insert records in the table using insert command −mysql> insert into DemoTable(FileName) values('AddTwoValue.java'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable(FileName) values('Image1.png'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable(FileName) values('MultiplicationOfTwoNumbers.java'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable(FileName) values('Palindrome.c'); Query OK, 1 row affected (0.16 sec) mysql> insert ... Read More
The getIdentifierQuoteString() method of the DatabaseMetaData interface retrieves and returns the retrieves the string used by the underlying database to quote SQL identifiers.To retrieve the string used by the underlying database to quote SQL identifiers.Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the ... Read More
The SOUNDEX() returns a soundex string. Two strings that sound almost the same should have identical soundex stringsTo query soundex() in MySQL, you can use the below syntax −select *from yourTableName where soundex(yourValue)=soundex(yourColumnName);Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName varchar(20), LastName varchar(20) ); Query OK, 0 rows affected (0.28 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(FirstName, LastName) values('Adam', 'Smith'); Query OK, 1 row affected (0.04 sec) mysql> insert into DemoTable(FirstName, LastName) values('David', 'Miller'); Query OK, 1 ... Read More
The getModel() method is used to set all the values at once for a JProgressBar −int newVal = 5; int newMin = 0; int newMax = 100; progressBar.getModel().setRangeProperties(newVal, 0, newMin, newMax, true);The following is an example to set all the values at once using the model in a progress bar −Examplepackage my; import javax.swing.*; public class SwingDemo extends JFrame { JProgressBar progressBar; int i = 0; SwingDemo() { int min = 0; int max = 1000; progressBar = new JProgressBar(min, max); int newVal = 5; ... Read More
Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to generate pulse waveform.Problem Statement:Write 8085 Assembly language program to generate continuous square wave.DiscussionTo generate square wave with 8085, we will rotate 10101010 (AAH) continuously. We have to send D0 as output. We will mask the accumulator content by 01H. If this is 0, then output will be 0, if it is 1, output will be 1, thus the pulse will be generated.InputNo input is given in this caseFlow Diagram programAddressHEX CodesLabelsMnemonicsComments800016, AA MVI D, AAHLoad 10101010 into D80027AROTATEMOV A, DLoad D to A800307 RLCRotate A ... Read More
To query all items, use find(). Let us first create a collection with documents −> db.queryAllItemsDemo.insertOne({"StudentDetails":{"StudentName":"John", "StudentSubject":["MongoDB", "MySQL"], "StudentSubjectPrice":[4000, 6000]}, "OtherDetails":{"UserAge":29, "UserCountryName":"US"}}); { "acknowledged" : true, "insertedId" : ObjectId("5cef74ecef71edecf6a1f69f") }Display all documents from a collection with the help of find() method −> db.queryAllItemsDemo.find().pretty();This will produce the following output −{ "_id" : ObjectId("5cef74ecef71edecf6a1f69f"), "StudentDetails" : { "StudentName" : "John", "StudentSubject" : [ "MongoDB", "MySQL" ], "StudentSubjectPrice" : [ 4000, ... Read More
The logical link control (LLC) is the upper sublayer of the data link layer of the open system interconnections (OSI) reference model for data transmission. It acts act an interface between the network layer and the medium access control (MAC) sublayer of the data link layer.The LLC sublayer is mainly used for its multiplexing property. It allows several network protocols to operate simultaneously within a multipoint network over the same network medium.LLC Layer in the OSI ModelThe Open System Interconnections (OSI) model is a 7 – layered networking framework that conceptualizes how communications should be done between heterogeneous systems. The ... Read More
First, you need to open the command prompt. You can open using shortcut windows+R key.The screenshot is as follows −Now type CMD and press OK button −Now the following command prompt would be visible −Now reach the MySQL bin directory. The screenshot is as follows −Following is the query to run MySQL in the command line to create a database −Now you can check the database is created or not using SHOW DATABASES command −mysql> SHOW DATABASES;This will produce the following output −+---------------------------+ | Database | +---------------------------+ | bothinnodbandmyisam ... Read More
The concept behind the inception of Bitcoin and Block chain was to introduce the world to a network and currency that bring a Distributed network and currency which is transparent and easy to use across multiple platforms. It brought about a radical change to the way we shop and add value as humans. It is a good news for the Bitcoin lovers who use Bitcoin simply as an investment, that the programmability of the coin API actually enables infinite possibilities of uses. Despite that once you earn this crypto, there are multiple options to use this dynamic currency.People who are ... Read More