Friday, March 30, 2018

jquery select first x number of elements | Selecting the first “n” items with jQuery

Quick jQuery snippet to select first x number of elements. You can also use the jQuery .slice() function which can chop up element groups into a range for you with a combination of .get();
$("a").slice(0,20)
lso you can use lt pseudo selector: This matches the elements before the nth one (the nth element excluded). Numbering starts from 0
$(“a:lt(n)”)
Because :lt() is a jQuery extension and not part of the CSS specification, queries using :lt() cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. For better performance in modern browsers, use $("your-pure-css-selector").slice(0, index) instead

What's the best way to retry an AJAX request on failure using jQuery | The best way to retry an AJAX request on failure using jQuery | jQuery AJAX retry

$.ajax({
    url: 'http://',
    type: 'POST',
    data: {},
    tryCount: 0,
    retryLimit: 3,
    success: function (response) {
        //do something
    },
    error: function (xhr, textStatus, errorThrown) {
        this.tryCount++;
        if (this.tryCount <= this.retryLimit) {
            //try again
            $.ajax(this);
            return;
        }
        if (xhr.status == 500) {
            //handle error
        }
        else {
            //handle error
        }
    }
});

Thursday, March 15, 2018

Convert 1 Satak to Square Feet ( sq ft ) easily

Convert 1 Satak to Square Feet ( sq ft ) easily

This conversion calculator is very easy to find Satak to Square Feet. This measurement may separate from place to place. Satak is a Bangla word, so the people spell it different way in English. Someone also says shotok, sotok, sotangso, shotangsho etc. I think the following list of area conversion's will meet all your asking.
From
To
Others Area Conversion List
To Others Unit
4 Satak = 0.04 Acre
4 Satak = 1.6187441354899246 Ayer
4 Satak = 0.12100000000000001 Bigha
4 Satak = 38.72 Chotak
4 Satak = 4 Decimal
4 Satak = 1016.399999997459 Dhul
4 Satak = 145.20000000000002 Dondho
4 Satak = 2.0166666666666666 Gonda
4 Satak = 0.016187441354899246 Hectare
4 Satak = 32.266666666666666 Kak
4 Satak = 0.10083333333333334 Kani
4 Satak = 2.42 Katha
4 Satak = 24.200000000000003 Kontho
4 Satak = 8.066666666666666 Kora
4 Satak = 24.000000000000004 Kranti
4 Satak = 400.00000000000006 Ojutangsho
4 Satak = 30492.0000015246 Renu
4 Satak = 4 Satak
4 Satak = 4 Shotangsho
4 Satak = 0.4 Square Chain
4 Satak = 1742.4 Square Feet
4 Satak = 774.4000000000001 Square Hat
4 Satak = 250905.7605796868 Square Inchi
4 Satak = 161.8744135489925 Square Meter
4 Satak = 193.60000000000002 Square Yard
4 Satak = 480.00000000000006 Til