Smita Kapse has Published 570 Articles

Errors in C/C++

Smita Kapse

Smita Kapse

Updated on 03-Dec-2021 06:17:18

In C or C++, we face different kinds of errors. These errors can be categorized into five different types. These are like below −Syntax ErrorRun-Time ErrorLinker ErrorLogical ErrorSemantic ErrorLet us see these errors one by one −Syntax errorThis kind of errors are occurred, when it violates the rule of C++ ... Read More

How to position text to top left position on an image with CSS

Smita Kapse

Smita Kapse

Updated on 04-Jul-2020 06:16:38

To position text to top left, use the left and top property. You can try to run the following code to position text to left position on an image −ExampleLive Demo                    .box {             position: ... Read More

Modify the behavior of the flex-wrap property with CSS

Smita Kapse

Smita Kapse

Updated on 03-Jul-2020 10:35:13

Use the align-content property to modify the behavior of the flex-wrap property.ExampleYou can try to run the following code to implement the flex-wrap property −Live Demo                    .mycontainer {             display: flex;       ... Read More

Role of CSS flex-wrap property wrap-reverse value

Smita Kapse

Smita Kapse

Updated on 03-Jul-2020 07:36:20

Use the flex-wrap property with wrap-reverse value to wrap flex-items in reverse order.ExampleYou can try to run the following code to implement the wrap-reverse value −Live Demo                    .mycontainer {             display: flex;     ... Read More

Which characters are NOT allowed in MongoDB field names?

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 16:00:38

Do not use $ symbol or period (.) because these characters are not allowed for MongoDB field names. The field shouldn’t start with $.Here is an example of the allowed characters −> db.charactersAllowedDemo.insertOne({"Employee Name" : "John"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c7fefbc8d10a061296a3c6d") }Display all documents from a ... Read More

How to use multiple threads in android?

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 14:57:05

Before getting into an example, we should know what thread is. A thread is a lightweight sub-process, it going to do background operations without interrupt to ui. This example demonstrate about How to use multiple threads in android.Step 1 − Create a new project in Android Studio, go to File ... Read More

How to avoid thread start twice in android?

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 14:36:41

Before getting into an example, we should know what thread is. A thread is a lightweight sub-process, it going to do background operations without interrupt to ui. This example demonstrate about How to avoid thread start twice in android.Step 1 − Create a new project in Android Studio, go to ... Read More

How to insert data into a table with auto-incremented columns using JDBC?

Smita Kapse

Smita Kapse

Updated on 29-Jun-2020 13:25:20

While inserting data into a table with auto-incremented column, just leave that particular column out and insert remaining values by specifying the remaining columns using the following syntax of the INSERT statement −INSERT into table_name (column_name1, column_name2....) values(value1, value2....)ExampleLet us create a table with name sales in MySQL database, with ... Read More

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

Smita Kapse

Smita Kapse

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

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

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

1 2 3 4 5 ... 57 Next
Advertisements