
Search In
To shuffle(randomize) an array in javascript, there is an algorithm called Fisher-Yates devised and Don Knuth popularized algorithm.
Below is the code for using it:-
Arr.prototype.shuffle = function() {
var input = this;
for (var i = input
If you are looking to use AJAX in WP. Please follow the below example.
var stateName = $('#state').val();
$.ajax({
type: "POST",
url: "<!--?php echo admin_url( 'admin-ajax.php' ); ?-->",
data: { 'action':'custom_dropdown_ci
Hi Team
i am struggling to implement two things on this class,
1) to define a property when creating a modifier for using std::map<K, V> that one K is an int and V string.
2).how to create a test function inside a class?
- this clas
Hello Friends,
Assetic is used to define CSS, JS and Images location in symfony. Assetic provides you flexiblity to store CSS, JS and Images at your desirable location and you can call these files on your twig or controller file easily. Asseti
In the previous part C++ Interview Questions and Answers Part 1 I have explained some basic questions of C++.This part is in continuation with the previous C++ Interview Questions and Answers tutorial. In this part of the tutorial we are proceeding
First question is that it is legitimate to use JavaScript redirect over other available options like Htaccess Redirect, html Redirect, Php redirect etc. as SEO point of view ?
The answers is famous quote from Google Support itself.
"Using JavaSc
Hello All,
Working with ASP.NET C#, I wanted to serialize a class to a file which will be later de Serialize to access its properties and delegates, and to do this we have following block of code :
Structure of the class to be Serialized :
[Serial
Hello all,
To understand the concept of method hiding C# lets consider an example where we have class (User) that have some properties and methods.
Ex.
public class User
{
public string fisrtName { get; set; }
public string lastName { get; s
Hi,
Generally, there are two methods to call a function from a string.
Using eval.
Using window object.
First solution is using **eval**. It is easy to use but generally real programmers avoid to use this.
Example 1 without arguments:
var fun
document.ready() v/s window.onload():
Most of us think that document.ready and window.onload is one of the same thing the only difference is that window.onload is used in javascript while we use document.ready in Jquery.
But
