Prabhas has Published 95 Answers

Streaming a video file to an HTML5 video player with Node.js so that the video controls continue to work

Prabhas

Prabhas

Updated on 04-Mar-2020 05:25:44

Use createReadStream to send the requested part to the client. The function call createReadStream() will give you a readable stream. ExampleThe following is the code −stream = fs.createReadStream(path); stream.on('open', function () {    res.writeHead(206, {       "Content-Range":"bytes " + begin + "-" + end + "/" +total, "Accept-Ranges":"bytes",   ... Read More

Why is not in HTML 5 Tag list while is?

Prabhas

Prabhas

Updated on 03-Mar-2020 12:40:45

Unlike HTML 4.01, HTML 5 does not support the tag. The makes the text font size one size smaller down to the browser's minimum font size. For example, the use of the tag in a text which is of large font size makes the font size to ... Read More

Execute a script when a file can be played all the way to the end without pausing for buffering in HTML?

Prabhas

Prabhas

Updated on 03-Mar-2020 12:25:33

Use the oncanplaythrough attribute to execute a script when a file can be played all the way to the end without pausing for buffering in HTML.ExampleYou can try to run the following code to implement oncanplaythrough attribute −                         ... Read More

Execute a script when there have been changes to the anchor part of the URL in HTML?

Prabhas

Prabhas

Updated on 03-Mar-2020 12:23:09

Use the onhashchange attribute to execute a script when anchor part of the URL is changed in HTML.ExampleYou can try to run the following code to implement onhashchange attribute −           Change the anchor part       Change             ... Read More

Execute a script when the element is being dragged in HTML?

Prabhas

Prabhas

Updated on 03-Mar-2020 09:50:12

Use the ondragover attribute in HTML to execute a script when the element is being dragged in HTML.ExampleYou can try to run the following code to implement the ondragover attribute −                    .drag {             float  : ... Read More

Execute a script when the browser window is closed in HTML?

Prabhas

Prabhas

Updated on 03-Mar-2020 07:38:46

The unloaded attribute triggers when you close the web browser window. You can try to run the following code to implement unloaded attribute in HTML −Example           Tutorialspoint       Simply Easy learning                function display() {             alert("Bye!");          }          

How to create a progress bar in HTML?

Prabhas

Prabhas

Updated on 03-Mar-2020 06:22:08

Use the tag to create a progress bar in HTML. The HTML tag specifies a completion progress of a task. It is displayed as a progress bar. The value of progress bar can be manipulated by JavaScript.The following are the attributes −AttributeValueDescriptionmax maxIt should have a value greater ... Read More

Using Group by hour in SAP HANA table

Prabhas

Prabhas

Updated on 26-Feb-2020 10:10:15

You can try this method to convert time to date and hour format −select to_varchar(time, 'YYYY-MM-DD'), hour(time), sum(r_time) as r_time, sum(p_time) as p_time from t1 group by date(time), hour(time) order by to_varchar(time, 'YYYY-MM-DD'), hour(time);You can also try using Series_Round() with a group by clause.select SERIES_ROUND(time, 'INTERVAL 1 HOUR') as time, ... Read More

How to convert comma seperated java string to an array.

Prabhas

Prabhas

Updated on 24-Feb-2020 12:15:58

Yes, use String.split() method to do it. See the example below −Examplepublic class Tester {    public static void main(String[] args) {       String text = "This,is,a,comma,seperated,string.";       String[] array = text.split(",");       for(String value:array) {          System.out.print(value + " ");       }    } }OutputThis is a comma seperated string.

How to create an object from class in Java?

Prabhas

Prabhas

Updated on 19-Feb-2020 07:39:44

An object is created from a class using the new keyword. There are three steps when creating an object from a class −Declaration − A variable declaration with a variable name with an object type.Instantiation − The 'new' keyword is used to create the object.Initialization − The 'new' keyword is ... Read More

Advertisements