Jennifer Nicholas has Published 291 Articles

How to create a database in MySQL using a JDBC API?

Jennifer Nicholas

Jennifer Nicholas

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

2K+ Views

A. In general, you can create a database using the CREATE DATABASE query.SyntaxCREATE DATABASE DatabaseName;To create a Database using JDBC API you need to:Register the driver: Register the driver class using the registerDriver() method of the DriverManager class. Pass the driver class name to it, as parameter.Establish a connection: Connect ... Read More

Array — Efficient arrays of numeric values in Python

Jennifer Nicholas

Jennifer Nicholas

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

324 Views

Array is a very popular data structure in C/C++, Java etc. In these languages array is defined as a collection of more than one elements of similar data type. Python doesn't have any built-in equivalent of array. It's List as well as Tuple is a collection of elements but they ... Read More

How to enable Bluetooth in android?

Jennifer Nicholas

Jennifer Nicholas

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

507 Views

This example demonstrates How to enable Bluetooth 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. In the above ... Read More

How to get android application version name?

Jennifer Nicholas

Jennifer Nicholas

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

3K+ Views

This example demonstrate about How to get android application version name.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. In ... Read More

Pointer vs Array in C

Jennifer Nicholas

Jennifer Nicholas

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

457 Views

Pointers and array most of the time are treated as same in c. Some differences are:&operator:&pointer = returns the address of pointer.&array = returns the address of first element.sizeof operator:sizeof(array) = returns the total memory consumed by the all the elements of the array.sizeof(pointer) = returns the only memory consumed ... Read More

Functools — Higher-order functions and operations on callable objects in Python

Jennifer Nicholas

Jennifer Nicholas

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

257 Views

Function in Python is said to be of higher order. It means that it can be passed as argument to another function and/or can return other function as well. The functools module provides important utilities for such higher order functions.partial() functionThis function returns a callable 'partial' object. The object itself ... Read More

C program to print a string without any quote in the program

Jennifer Nicholas

Jennifer Nicholas

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

782 Views

This is another tricky problem. In this program, we will see how to print a string using C where no quotation marks are used.Here we are using macro function. We are defining a macro function like#define getString(x) #xThe getString() is a macro function. It returns x by converting it into ... Read More

How to create a table in a database using JDBC API?

Jennifer Nicholas

Jennifer Nicholas

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

6K+ Views

A. You can create a table in a database using the CREATE TABLE query.SyntaxCREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype, ..... columnN datatype, PRIMARY KEY( one or more columns ) );To create a table in a database using JDBC API you need to:Register the driver: Register the driver ... Read More

How to implementing START_STICKY for a service?

Jennifer Nicholas

Jennifer Nicholas

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

2K+ Views

Before getting into an example, we should know what service is in android. Service is going to do back ground operation without interacting with UI and it works even after activity destroy.START_STICKY -  If service is started with START_STICKY return type, it going to work in back ground even if activity ... Read More

Execute both if and else statements simultaneously in C/C++

Jennifer Nicholas

Jennifer Nicholas

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

223 Views

In this section we will see how to execute the if and else section simultaneously in a C or C++ code. This solution is little bit tricky.When the if and else are executed one after another then it is like executing statements where if-else are not present. But here we ... Read More

Advertisements