George John has Published 1081 Articles

How to match underscore in a MySQL String?

George John

George John

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

1K+ Views

To match underscore in a MySQL string, you can use the below syntax −select *from yourTableName where yourColumnName LIKE '%\_%';Let us first create a table −mysql> create table DemoTable (    ClientId varchar(200) ); Query OK, 0 rows affected (0.79 sec)Insert some records in the table using insert command −mysql> ... Read More

Earliest data output time considering TCE in 8085 Microprocessor

George John

George John

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

134 Views

The 74138 receives the addresses ranging from A15 to A14 from 8085 Processor by means of the octal line driver 74LS244 which delays 12-nS. Simultaneously IO/M* signal is received from 8085 Processor via 74LS244. After that the CS* signal gets receive by the 27128 from 74LS138 which is 3 to ... Read More

Reset MySQL field to default value?

George John

George John

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

2K+ Views

In MySQL, there are two approaches by which you can reset the MySQL field to default value. One is default keyword and another is default() function.Case 1: Using default keyword. The syntax is as follows:UPDATE yourTableName SET yourColumnName=default where yourCondition;Case 2: Using default() function. The syntax is as follows:UPDATE yourTableName ... Read More

Write a MySQL query to check if field exists and then return the result set?

George John

George John

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

347 Views

To check if field exists and then to return the result set, you can use the below syntax −show columns from yourTableName where field='yourColumnName';Let us first create a table −mysql> create table DemoTable (    UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    UserFirstName varchar(20),    UserLastName varchar(20),    UserAge ... Read More

Wait state generation in 8085 Microprocessor

George John

George John

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

2K+ Views

The memory and the peripheral chips present today are very fast for a 8085 processor working at 3 MHz of frequency. So we do not need wait states. If we use 8085AH-2 which works at 5 MHz frequency, there we need to insert one wait state, between T2 and T3.To ... Read More

How to get the longest VarChar length in MySQL?

George John

George John

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

4K+ Views

To get the longest varchar length, you need to use CHAR_LENGTH().The syntax is as followsSELECT Max(CHAR_LENGTH(yourColumnName)) AS anyAliasName FROM yourTableName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table CharLengthDemo    - > (    - > Id int ... Read More

Convert IntStream to String in Java

George John

George John

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

494 Views

If you have IntStream with ASCII values, then easily convert it to string using the below given example.For IntStream class, import the following packageimport java.util.stream.IntStream;Let’s say the following is our IntStreamIntStream stream = "Example".chars();Now, convert the IntStream to stringString str = stream.collect(StringBuilder::new,    StringBuilder::appendCodePoint,    StringBuilder::append).toString();The following is an example ... Read More

How to make full screen custom dialog in Android?

George John

George John

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

3K+ Views

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

Get MySQL DISTINCT to work correctly if the records contain whitespace?

George John

George John

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

184 Views

To get distinct including whitespace, you can use below syntax −SELECT DISTINCT replace(yourColumnName, ' ', '') FROM yourTableName;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 (0.63 sec)Insert some records in the table ... Read More

Evaluation of Boolean expression

George John

George John

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

508 Views

We write a program in 8085 in the assembly language just for the evaluation of only wo Boolean expressions of 4 variables by using the interface of logic controller. The output of the program should be logically tested automatically by the output by the input changing from the inputs from ... Read More

Advertisements