karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 131 of 143

How to apply forTokens tag in JSP?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 261 Views

The tag has similar attributes as that of the tag except for one additional attribute delims which specifies characters to use as delimiters.AttributeDescriptionRequiredDefaultdelimsCharacters to use as delimitersYesNoneExample for           Tag Example                               The above code will generate the following result −Zara nuha roshy

Read More

Set the MySQL primary keys auto increment to be unlimited (or incredibly huge)?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 616 Views

You can use BIGINT but this is not unlimited but you can use large number of primary keys auto increment using it. The syntax is as follows −yourColumnName BIGINT NOT NULL AUTO_INCREMENT;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table LargeAutoIncrement -> ( -> Id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY -> ); Query OK, 0 rows affected (0.78 sec)Now in this table you can store large number like 9223372036854775807 i.e. for primary key auto increment.Let us insert ...

Read More

Add a value to Quartet class in JavaTuples

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 175 Views

To add a value to the Quartet Tuple, use the addAtX() method. The index can be set here with the X i.e. the place where the value gets added.Let us first see what we need to work with JavaTuples. To work with Quartet class in JavaTuples, you need to import the following package −import org.javatuples.Quartet;We will use Quintet class; therefore, we will import the following package −import org.javatuples.Quintet;Note − Steps to download and run JavaTuples program If you are using Eclipse IDE to run Quartet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → Add ...

Read More

How to get the MAC address of an iOS/iPhone programmatically?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 1K+ Views

In iOS versions previous to 7.0 getting the MAC address of device was possible. But with new iOS version it has been disabled for the apps to access MAC address of the device.When it is accessed or requested on current version of iOS it always returns 02:00:00:00:00:00. This has been implemented by apple because of privacy concerns. If your app needs to uniquely identify a device, apple recommends to use UDID/ UUID instead of MAC. In swift we can useUIDevice.current.identifierForVendor Which as per apple documentation says that, The value of this property is the same for apps that come from ...

Read More

Java Program to convert array to String for one dimensional and multi-dimensional arrays

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 417 Views

For converting array to 1D and 2D arrays, let us first create a one-dimensional and two-dimensional array −One-DimensionalString str[] = {"p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};Two-Dimensionaldoubled [][]= {    {1.2, 1.3, 2.1, 4.1},    {1.5, 2.3},    {2.5, 4.4},    {3.8},    {4.9},    {3.2, 2.1, 3.2, 7.2} };Converting array to string for one-dimensional array −Arrays.toString(str);Converting array to string for two-dimensional array −Arrays.deepToString(d);Exampleimport java.util.Arrays; public class Demo {    public static void main(String args[]) {       String str[] = {"p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};       ...

Read More

How to declare an object of a class using JSP declarations?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 1K+ Views

A declaration declares one or more variables or methods that you can use in Java code later in the JSP file. You must declare the variable or method before you use it in the JSP file.Following is the syntax for JSP Declarations −You can write the XML equivalent of the above syntax as follows − code fragment Following is an example of Object declaration in JSP Declarations −

Read More

How to print a date using JSP Expression?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 411 Views

Following example shows a JSP Expression printing date on the browser −           A Comment Test     Today's date: The above code will generate the following result −Today's date: 11-Sep-2010 21:24:25

Read More

Get a value from Triplet class in JavaTuples

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 297 Views

The getValueX() method is used to get a value from the Triplet Tuple class in Java at a particular index. For example, getValue0().Let us first see what we need to work with JavaTuples. To work with Triplet class in JavaTuples, you need to import the following package −import org.javatuples.Triplet;Note − Steps to download and run JavaTuples program. If you are using Eclipse IDE to run Triplet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → Add External Jars and upload the downloaded JavaTuples jar file.The following is an example −Exampleimport org.javatuples.Triplet; public class Demo { ...

Read More

What are JSP comments?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 8K+ Views

JSP comment marks text or statements that the JSP container should ignore. A JSP comment is useful when you want to hide or "comment out", a part of your JSP page.Following is the syntax of the JSP comments −Following example shows the JSP Comments −           A Comment Test               A Test of Comments           The above code will generate the following result −A Test of Comments

Read More

How many types of directive tags JSP supports?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 253 Views

A JSP directive affects the overall structure of the servlet class. It usually has the following form −Directives can have a number of attributes which you can list down as key-value pairs and separated by commas.The blanks between the @ symbol and the directive name, and between the last attribute and the closing %>, are optional.There are three types of directive tag −S.No.Directive & Description1Defines page-dependent attributes, such as scripting language, error page, and buffering requirements.2Includes a file during the translation phase.3Declares a tag library, containing custom actions, used in the page

Read More
Showing 1301–1310 of 1,421 articles
« Prev 1 129 130 131 132 133 143 Next »
Advertisements