Samual Sam has Published 2492 Articles

Overflow of DataTypes in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:05:01

838 Views

Overflow occurs when the given value is more than the maximum prescribed size of a data type. The overflow condition can result to an error or now the implementation of the programming language handles it on its own.To display overflow of datatypes, I have taken an example of float datatype. ... Read More

Parse a string to a Boolean object in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:04:00

197 Views

The valueOf() method returns the relevant Number Object holding the value of the argument passed. The argument can be a primitive data type, String, Boolean, etc. Therefore, to parse a string to a Boolean object, use the Java valueOf() method.The following is an example showing how to parse a string ... Read More

Java Program to compare two Boolean Arrays

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:03:06

152 Views

Use Arrays.equals() method to compare two Boolean Arrays. Let us first create some arrays to be compared. For using this method, you need to import the following package −import java.util.Arrays;We have 4 arrays and value “true” and “false” are assigned to them.boolean[] myArr1 = new boolean[] { true, false, true, ... Read More

zip_entry_filesize() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:01:55

48 Views

The zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.Syntaxzip_entry_filesize(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.ExampleRead More

How can I get enum possible values in a MySQL database using PHP?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:59:16

2K+ Views

You can get the enum possible values in a MySQL database with the help of INFORMATION_SCHEMA.COLUMNS table. The syntax is as follows −SELECT    COLUMN_TYPE AS anyAliasName FROM    INFORMATION_SCHEMA.COLUMNS WHERE    TABLE_SCHEMA = ‘yourDatabaseName’ AND TABLE_NAME = 'yourTableName' AND COLUMN_NAME = 'yourEnumColumnName';To understand the above syntax, let us create ... Read More

zip_entry_open() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:57:24

43 Views

The zip_entry_open() function is used to open a zip archive entry for reading.Syntaxzip_entry_open(zip_file, zip_entry, mode)Parameterszip_file − The zip file to be readzip_entry − The zip entry to open.mode − The type of access needed for zip archiveReturnThe zip_entry_open() function Returns TRUE on success, or FALSE on failure.ExampleRead More

zip_open() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:56:31

38 Views

The zip_open() function opens a zip file for reading. It returns an open zip file on success and FALSE on failure.Syntaxzip_open(zip_file)Parameterszip_file − The path of the file to be opened.ReturnThe zip_open() function returns an open zip file on success and FALSE on failure.ExampleOutputCompressed: 90 Compressed: 12 Compressed: 67Read More

How do I lag columns in MySQL?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:55:30

126 Views

To lag a column in MySQL, first, let us create a table. The query to create a table is as follows −mysql> create table LagDemo    -> (    -> UserId int,    -> UserValue int    -> ); Query OK, 0 rows affected (1.74 sec)ExampleInsert some records in the ... Read More

zip_close() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:53:23

33 Views

The zip_close() function is used to close the zip file archive. The zip is opened by the zip_open() function.Syntaxzip_close(zip_file)Parameterszip_file − A zip file opened with zip_open() is to be mentioned here. This is the file we want to close.ReturnThe zip_close() function returns nothing.ExampleOutputFile will be closed nowRead More

zip_entry_compressed_size() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:52:24

43 Views

The zip_entry_compressed_size() function returns the compressed file size of a zip archive entry.Syntaxzip_entry_compressed_size(zip_entry)Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_compressed_size() function returns the compressed file size of a zip archive entry.The following is an example that gets the size of the files in "new.zip" archive.ExampleOutputCompressed: 90 Compressed: 12 Compressed: 67Read More

Advertisements