Smita Kapse has Published 558 Articles

Where are the app cookies stored on the iPhone?

Smita Kapse

Smita Kapse

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

4K+ Views

Cookies are small files which are stored on a user's device while browsing internet.When we talk about cookies in iPhone we usually talk about application using the Web Views or the browser applications.A normal iOS application does not contains cookies. An app will have cookies only if the application has one ... Read More

Group all documents with common fields in MongoDB?

Smita Kapse

Smita Kapse

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

299 Views

For this, use the $addToSet operator. Let us first create a collection with documents −> db.findDocumentWithCommonFieldsDemo.insertOne(    {       "UserId":1,       "UserName":"Carol"    } ); {    "acknowledged" : true,    "insertedId" : ObjectId("5cdf8ebebf3115999ed51200") } > db.findDocumentWithCommonFieldsDemo.insertOne(    {       "UserId":2,       ... Read More

How to create a MySQL table based on JDBC Result Set?

Smita Kapse

Smita Kapse

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

361 Views

The ResultSetMetadata class provides various methods that gives information about the current ResultSet object such as number of columns, name of the table, name of the column, datatype of the column etc…To prepare a CREATE query you need to get −Name of the table, using the getTableName() method.Column count, to ... Read More

How to Ping External host from Swift in iOS?

Smita Kapse

Smita Kapse

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

882 Views

Sometime you may require to ping an external website and check whether it’s up and running before you do any processing or fire request on the same.Here we will be seeing how to check whether the external website is up and running.Let’s being by Creating new projectStep 1 − Open ... Read More

How to start a service from notification in Android?

Smita Kapse

Smita Kapse

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

767 Views

This example demonstrate about How to start a service from notification in Android.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.     Step ... Read More

How to display count of notifications in Android app launcher icon?

Smita Kapse

Smita Kapse

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

2K+ Views

This example demonstrate about How to display count of notifications in Android app launcher icon.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.   ... Read More

How to create a date spinner in Java?

Smita Kapse

Smita Kapse

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

1K+ Views

To create a date spinner, use the SpinnerDateModel class. Within that set the date format −Date today = new Date(); JSpinner spinner2 = new JSpinner(new SpinnerDateModel(today, null, null, Calendar.MONTH)); JSpinner.DateEditor editor = new JSpinner.DateEditor(spinner2, "dd/MM/yy"); spinner2.setEditor(editor);Above, we have set the Date format to be −dd/MM/yyThe following is an example to ... Read More

How to convert a CLOB type to String in Java?

Smita Kapse

Smita Kapse

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

12K+ Views

CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2, 147, 483, 647 characters.The java.sql.Clob interface of the JDBC API represents the CLOB datatype. Since ... Read More

MongoDB query for Partial Object in an array

Smita Kapse

Smita Kapse

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

342 Views

Let us first create a collection with documents −> db.queryForPartialObjectDemo.insertOne({_id:new ObjectId(), "StudentDetails": [{"StudentId":1, "StudentName":"Chris"}]}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cdfcf55bf3115999ed51206") } > db.queryForPartialObjectDemo.insertOne({_id:new ObjectId(), "StudentDetails": [{"StudentId":2, "StudentName":"David"}]}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cdfcf55bf3115999ed51207") }Following is the query to display all documents from a collection ... Read More

Except not working in MySQL?

Smita Kapse

Smita Kapse

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

407 Views

You cannot use except in MySQL. You can work with NOT IN operator to get the same result. Let us first create a table −mysql> create table DemoTable1  (  Number1 int  ); Query OK,  0 rows affected (0.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values(100); Query OK,  1 row affected (0.14 sec) mysql> insert into DemoTable1 values(200); Query OK,  1 row affected (0.13 sec) ... Read More

Advertisements