Paul Richard has Published 76 Articles

How to count the number of words in a text file using Java?

Paul Richard

Paul Richard

Updated on 20-Feb-2020 05:11:12

5K+ Views

Read the number of words in text fileCreate a FileInputStream object by passing the required file (object) as a parameter to its constructor.Read the contents of the file using the read() method into a byte array. Insatiate a String class by passing the byte array to its constructor.Using split() method read the words of the String ... Read More

How to extract certain substring from a string using Java?

Paul Richard

Paul Richard

Updated on 20-Feb-2020 04:48:30

9K+ Views

You can extract a substring from a String using the substring() method of the String class to this method you need to pass the start and end indexes of the required substring.ExampleLive Demopublic class Substring {    public static void main(String args[]) {       String str = ... Read More

Extracting data from SAP HANA database and load to ORACLE database

Paul Richard

Paul Richard

Updated on 14-Feb-2020 05:38:34

535 Views

There is a number of ways you can achieve this. Here are few of the methods to do the same.a) There are many standard tools in SAP by use of which you can extract the data and also automate the whole process. With the use of an ETL tool, this ... Read More

How to define a variable in C++?

Paul Richard

Paul Richard

Updated on 11-Feb-2020 07:50:55

146 Views

To define a variable in  C++, you need to use the following syntax −Syntaxdatatype variable_name;You need to know what type of data is your variable is going to hold and what it will be called. The variable name has constraints on what you can name it. Following are the rules ... Read More

How to Edit, Compile, and Execute a C++ Program?

Paul Richard

Paul Richard

Updated on 10-Feb-2020 13:01:28

2K+ Views

Create a new cpp file using your text editor. Enter the following in it −#include int main() {     std::cout

What is C++ programming language?

Paul Richard

Paul Richard

Updated on 10-Feb-2020 10:58:50

4K+ Views

C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ ... Read More

How can MySQL COALESCE() function be used with MySQL SUM() function to customize the output?

Paul Richard

Paul Richard

Updated on 07-Feb-2020 05:45:33

2K+ Views

When MySQL SUM() function got a column, having no values, an argument then it will return NULL, rather than 0, as output. But if we want to customize this output to show 0 as output then we can use MySQL COALESCE() function which accepts two arguments and returns the second ... Read More

What happens if the value of number ‘N’ in CONV() function is not as per accordance with its base?

Paul Richard

Paul Richard

Updated on 04-Feb-2020 05:57:20

49 Views

MySQL returns 0 as output if the number given in CONV() function is not as per accordance with its base. Suppose, if we want to convert decimal number 9 into the number in binary number system then in this case the value of from_base must be 10 but if we ... Read More

How can we use CHAR_LENGTH() function with MySQL WHERE clause?

Paul Richard

Paul Richard

Updated on 30-Jan-2020 06:39:59

302 Views

When CHAR_LENGTH() or CHARACTER_LENGTH() string function is used with WHERE clause, the output returns by it will depend upon the condition given in WHERE clause. For example, suppose we have a table named ‘Student’ and we want to get only those names having number of characters less than 6, then ... Read More

How to use Meta Tag to redirect an HTML page?

Paul Richard

Paul Richard

Updated on 13-Jan-2020 06:26:03

11K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.To use a META Tag to redirect your site is quite easy. With this, use the http-equiv attribute to provide an ... Read More

Advertisements