Smita Kapse has Published 560 Articles

How to retrieve auto-incremented value generated by PreparedStatement using JDBC?

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 13:17:46

2K+ Views

While creating a table, in certain scenarios, we need values to column such as ID, to be generated/incremented automatically. Various databases support this feature in different ways.In MySQL database you can declare a column auto increment using the following syntax.CREATE TABLE table_name(    ID INT PRIMARY KEY AUTO_INCREMENT,    column_name1 ... Read More

How to schedule tasks in Java to run for repeated fixed-rate execution, beginning after the specified delay

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 06:39:50

276 Views

One of the methods of the Timer class is void scheduleAtFixedRate(TimerTask task, long delay, long period). This method schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.In fixed-rate execution, each execution is scheduled with respect to the scheduled run time of the initial execution. Fixed-rate execution ... Read More

Format percentage with MessageFormat class in Java

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 06:16:08

150 Views

To format message with percentage fillers in Java, we use the MessageFormat class. The MessageFormat class gives us a way to produce concatenated messages which are not dependent on the language. The MessageFormat class extends the Serializable and Cloneable interfaces.Declaration - The java.text.MessageFormat class is declared as follows −public class ... Read More

How to URL encode a string (NSString) in iPhone?

Smita Kapse

Smita Kapse

Updated on 27-Jun-2020 13:28:31

449 Views

When developing API based web applications we definitely need to interect with Multiple web services and URLs. The url may contain special character, search terms, queries, headers and many other things depending on the service we need. That’s why we need to have some kind of encoding so that the ... Read More

How to go through all text fields with the "Next" Button on the iPhone/iOS Keyboard?

Smita Kapse

Smita Kapse

Updated on 27-Jun-2020 13:24:46

799 Views

To go through all the text fields one by one on tap on done or return button, we’ll have to create a logic. Let’s understand it with help of a project.Create a project and on the view controller story board drag Four text fields.Select them one by one and from ... Read More

How to take a screenshot of my iOS application in the iOS simulator?

Smita Kapse

Smita Kapse

Updated on 27-Jun-2020 13:18:30

1K+ Views

To take a screenshot of an iOS Application running in Simulator you can you any of the below ways.Capturing device Screen − you can capture your Mac's screen from the area your simulator is running in. to do this you have to press, Command, shift and 4 at the same ... Read More

Light Speed In Animation Effect with CSS

Smita Kapse

Smita Kapse

Updated on 27-Jun-2020 12:39:44

660 Views

To create a light speed in effect with CSS, you can try to run the following code:ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;         ... Read More

Check whether a String has only unicode digits in Java

Smita Kapse

Smita Kapse

Updated on 26-Jun-2020 13:33:42

326 Views

In order to check if a String has only unicode digits in Java, we use the isDigit() method and charAt() method with decision making statements.The isDigit(int codePoint) method determines whether the specific character (Unicode codePoint) is a digit. It returns a boolean value, either true or false.Declaration − The java.lang.Character.isDigit() ... Read More

Get exponential value of a number using Math.exp in Java

Smita Kapse

Smita Kapse

Updated on 26-Jun-2020 13:24:59

2K+ Views

To get the exponential value of a number in Java, we use the java.lang.Math.exp() method. The Math.exp() returns a double value which is the Euler’s number e raised to the power of the argument. If the parameter is NaN, the result obtained is NaN. If the argument is positive infinity, ... Read More

How to use OFFSET in Android sqlite?

Smita Kapse

Smita Kapse

Updated on 26-Jun-2020 08:03:26

384 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Advertisements