jQuery Redirect

How can I make a redirect page using jQuery?

jQuery is not necessary, and window.location.replace(…) will best simulate an HTTP redirect.It is better than using window.location.href =, because replace() does not put the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco. If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace.
Read more
canvas-2 image

How to Store Canvas Image ?

Send request using ajax: var canvas=document.getElementById('can'); var dataURL = canvas.toDataURL("image/png"); var data = { img64:dataURL.replace(/^data:image\/(png|jpg);base64,/, ""), }; $.ajax( { type: 'POST', url: "/FMVMLAST/Canvasimage", data:data, success: function(data){} }); Edit your struts.xml file
Read more
Sorted Array

Why is processing a sorted array faster than an unsorted array?

Answer: What is Branch Prediction? Consider a railroad junction: Now for the sake of argument, suppose this is back in the 1800s – before long distance or radio communication. You are the operator of a junction and you hear a train coming. You have no idea which way it will go. You stop the train to ask the captain which direction he wants. And then you set the switch appropriately.
Read more
SQL Injection

How can I prevent SQL-injection in PHP?

Use prepared statements and parameterized queries. These are SQL statements that are sent to and parsed by the database server separately from any parameters. This way it is impossible for an attacker to inject malicious SQL.
Read more