Smita Kapse has Published 560 Articles

How to Write/create a JSON array using Java?

Smita Kapse

Smita Kapse

Updated on 06-Sep-2023 21:23:55

37K+ Views

A JSON array is an ordered collection of values that are enclosed in square brackets i.e., it begins with '[' and ends with ']'. The values in the arrays are separated by ', ' (comma).Sample JSON array{    "books": [ Java, JavaFX, Hbase, Cassandra, WebGL, JOGL] }The JSON-simple is a ... Read More

Format specifiers in C

Smita Kapse

Smita Kapse

Updated on 31-Aug-2023 02:07:15

116K+ Views

The format specifiers are used in C for input and output purposes. Using this concept the compiler can understand that what type of data is in a variable during taking input using the scanf() function and printing using printf() function. Here is a list of format specifiers.Format SpecifierType%cCharacter%dSigned integer%e or ... Read More

Errors in C/C++

Smita Kapse

Smita Kapse

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

11K+ Views

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

994 Views

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

159 Views

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

101 Views

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

583 Views

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

3K+ Views

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

409 Views

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

1K+ Views

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

1 2 3 4 5 ... 56 Next
Advertisements