Chandu yadav has Published 1163 Articles

Java Program to get the previous node from a JTree

Chandu yadav

Chandu yadav

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

138 Views

Use the getPreviousNode() method to get the previous node of this node in Java. Here, we are displaying the previous node of child node “eight” −System.out.println("Get Previous Node = "+eight.getPreviousNode());The following is an example to get the previous node from a JTree −Examplepackage my; import javax.swing.JFrame; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; ... Read More

Combine MySQL UPDATE STATEMENTS?

Chandu yadav

Chandu yadav

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

184 Views

You can use a CASE statement for this. Let us first create a table −mysql> create table DemoTable    (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    Name varchar(20)    ); Query OK, 0 rows affected (1.11 sec)Insert records in the table using insert command −mysql> insert into ... Read More

8085 program to add even parity to a string of 7 bit ASCII characters.

Chandu yadav

Chandu yadav

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

486 Views

Here we will see how to add even parity to 7-bit ASCII string using 8085.Problem StatementWrite a program to add even parity to a string of 7 bit ASCII characters. The length of the string is in memory location 8040 H and the string itself begins at memory location 8041 ... Read More

8085 program for running light with delays using lookup table.

Chandu yadav

Chandu yadav

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

796 Views

Here we will see how we can implement running light with some delays using 8085.Problem StatementWrite 8085 program to implement running light display with appropriate delays using lookup table stored from memory location 8100H on words.DiscussionThe patterns are stored at location 8100 onwards. We are using 8255 port IC to ... Read More

Convert MM/DD/YY to Unix timestamp in MySQL?

Chandu yadav

Chandu yadav

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

305 Views

To convert MM/DD/YY to UNIX timestamp, you can use the below syntax −select UNIX_TIMESTAMP(str_to_date(yourColumnName, '%m/%d/%Y')) from yourTableName;Let us first create a table −mysql> create table DemoTable    (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    dateConvertToUnix varchar(100)    ); Query OK, 0 rows affected (0.58 sec)Insert some records ... Read More

8085 program to add two consecutive bytes of an array

Chandu yadav

Chandu yadav

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

623 Views

Here we will see how we can add two consecutive elements in an array using 8085.Problem StatementWrite 8085 program to add two consecutive elements of an array and store them in the same location. The carry will be placed at bottom of the other byte. The numbers are stored from ... Read More

8085 Program to alternately display 00 and FF in the data field

Chandu yadav

Chandu yadav

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

2K+ Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will generate 00H and FFH alternatively.Problem Statement:Write 8085 Assembly language program to generate 00H and FFH alternatively.Discussion:The 00H and FFH are changed alternatively in each second. So we need one second delay. We have created delay ... Read More

Check a column for unique value in MySQL

Chandu yadav

Chandu yadav

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

367 Views

You can use subquery for this. Let us first create a demo tablemysql> create table uniqueBothColumnValueSameDemo    -> (    -> UserId int,    -> UserValue int    -> ); Query OK, 0 rows affected (0.64 sec)Insert some records in the table using insert command. The query is as follows ... Read More

Process control instructions in 8086 microprocessor

Chandu yadav

Chandu yadav

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

2K+ Views

These instructions are used to control the processor action by setting/resetting the flag values.These are the process/processor control instructions.OpcodeOperandDescriptionSTC----Used to set carry flag CY to 1CLC----Used to clear/reset carry flag CY to 0CMC----Used to put complement at the state of carry flag CY.STD----Used to set the direction flag DF to ... Read More

How to delete multiple ids in MongoDB?

Chandu yadav

Chandu yadav

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

1K+ Views

To delete multiple ids in MongoDB, you can use $in operator. Following is the syntaxdb.yourCollectionName.remove( { _id : { $in: [yourObjectId1, yourObjectId2, yourObjectId3)] } } );Let us create a collection with documents> db.deleteMultipleIdsDemo.insertOne({"ClientName":"Chris", "ClientAge":26}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9cd7d6a629b87623db1b19") } > db.deleteMultipleIdsDemo.insertOne({"ClientName":"Robert", "ClientAge":28}); {    "acknowledged" ... Read More

Advertisements