Hash Format Flag in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

350 Views

Apply the # flag to the %o, %x, %e, and %f format specifiers. If you want to display the hexadecimal number with a 0x prefix, then precede the %x specifier with #.Preceding the %x specifier with a #, the hexadecimal number will be printed with a 0x prefix.Let us see an example wherein $e is used. It includes a decimal point, even if the decimal digits are not present −Example Live Demoimport java.util.Formatter; public class Demo { public static void main(String args[]) { Formatter f = new Formatter(); System.out.println(f.format("%#e", 5F)); } }Output5.000000e+00

Cut First Character in MySQL String

George John
Updated on 30-Jul-2019 22:30:24

4K+ Views

To cut only the first character, use the substr() function with UPDATE command. The syntax is as follows.UPDATE yourTableName set yourColumnName=substr(yourColumnName, 2);To understand the above syntax, let us first create a table. The query to create a table is as follows.mysql> create table CutStringDemo -> ( -> Value varchar(100) -> ); Query OK, 0 rows affected (0.66 sec)Now you can insert some records in the table using insert command. The query is as follows.mysql> insert into CutStringDemo values(', 12, 3456'); Query OK, 1 row affected (0.14 sec) mysql> insert into CutStringDemo values(', 23, 9867'); Query OK, 1 row affected ... Read More

What is Meant by a Rocket Propellant

Shanmukh Pasumarthy
Updated on 30-Jul-2019 22:30:24

493 Views

A rocket can be an aircraft, spacecraft or a missile which is propelled by a rocket engine. A rocket engine works on the principle of Newton's Third law, that is, for every action, there is an equivalent and opposite reaction. Rocket propellant is the fuel which burns and produces thrust to propel the rocket.The propellants are usually fueled together with the oxidants. Oxidants are required to burn the fuel efficiently. Thus the chemical reaction in the combustion chamber produces the required energy for thrust.The propellant is burnt in a controlled manner in the combustion chamber of the rocket engine and ... Read More

Biggest Market for Precious Metals in India

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

165 Views

Zaveri Bazaar is the oldest gold market in India and objects made of silver like napkin rings, picture frames in old silver can be bought from this market. Zaveri Bazaar, as the name suggests, is a jewellery market, to the north of Crawford Market.LocationIt is located close to Chhatrapati Shivaji Terminus and there are a number of trains that stop at this station. One can easily reach Zaveri Bazaar by boarding a local bus from the railway station or by an auto-rickshaw.Big brands such as 'Tanishq' and 'Tribhovandas Bhimji Zaveri' can be found here but here there are no shopping ... Read More

Best Programming Language for Career Growth and Development

yashwanth sitamraju
Updated on 30-Jul-2019 22:30:24

315 Views

Well, if you are looking to learn a programming language for your career growth and advancement there are many programming languages out there. There are hundreds of programming languages on the web which can be learned online itself. There is no particular programming language which will help you in your career growth.Programming languages are dynamic in nature and one has to adopt any new technology by learning new programming languages. Of course, there are some popular programming languages which will help you in terms of career growth.SQLSQL(Structured Programming Language) is a popular programming language in the present scenario.It has been ... Read More

Increment a Database Field by 1 in MySQL

Chandu yadav
Updated on 30-Jul-2019 22:30:24

4K+ Views

You can increment a database using update command. The syntax is as follows −UPDATE yourTableName set yourColumnName=yourColumnName+1 where condition;To understand the above syntax, let us first create a table. The query to create a table is as follows −mysql> create table IncrementBy1    -> (    -> Id int,    -> Name varchar(100),    -> CounterLogin int    -> ); Query OK, 0 rows affected (0.63 sec)Insert some records using insert command. The query to insert records in the table is as follows −mysql> insert into IncrementBy1 values(100, 'John', 30); Query OK, 1 row affected (0.17 sec) mysql> insert ... Read More

Detect Swipe Vertically on a ScrollView Using Swift

Samual Sam
Updated on 30-Jul-2019 22:30:24

821 Views

To detect swipe in scrollView we will need to make use of some tricks as scroll view does not natively give the directions of scroll made on it. We’ll see this with help of an example.Create an empty project, add scroll view to the view as per your requirement.Give them constraint as required in the application.From the object library, drag and drop a swipe gesture recognizer right above the Scroll View.Select the gesture recognizer, go to its attribute inspector and from there, select the swipe option and set the value as “up”.When you do this, now your gesture recognizer can ... Read More

Set Minimum Field Width in Java

Samual Sam
Updated on 30-Jul-2019 22:30:24

1K+ Views

The minimum field width specifier is what you include between % and the format conversion code.To include a 0 before the field width specifier, pad with 0's. An integer between the % sign and the format conversion code acts as a minimum field width specifier.Let us see an example −Example Live Demoimport java.util.Formatter; public class Demo { public static void main(String args[]) { Formatter f = new Formatter(); System.out.println(f.format("%08d", 697)); f = new Formatter(); System.out.println(f.format("%10d", 9878)); f = new Formatter(); System.out.println(f.format("%06d", 697)); } }Output00000697 9878 000697

8085 Program to Find Square Root of a Number

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

3K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will find the square root of a number.Problem StatementWrite an assembly language program to find the square root of a number in L and store the result at location 8100HDiscussionHere we are using division method for finding square root of a number. As we know there is no division operation in 8085, so we are creating division subroutine.Let N is the number.X = √NX2 = NX2 + X2 = N + X22X2 = N + X2X2 = (N + X2)/2X =((N + X2)/X)/2XNew=(N / X + X)/2If X ... Read More

SHA Encoding Using Python

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

1K+ Views

One of the major concern of all IT companies in the security of there data. Multiple hashing techniques are there to project and check our data.What is HashHash is a function which takes variable length sequence of bytes as input and converts it to a fixed length sequence. However, to get your original data(input bytes) back is not easy. For example, x is your input and f is the f is the hashing function, then calculating f(x) is quick and easy but trying to obtain x again is a very time-consuming job.The return value from a hash function is called ... Read More

Advertisements