This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$("#submit").on('click', function () { | |
var links = $('#links').val().split(/\n/); | |
var apiCount = 0; | |
var i=0; | |
processNextAjax(); | |
function processNextAjax() { | |
var temp_links = links.slice(i, i + 9); | |
console.log(temp_links); | |
var data = fetchData(temp_links, apiCount); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: "POST", | |
url: 'url.php', | |
data: { | |
"key1": value1, | |
"key2": value2 | |
}, | |
success: function (data) { | |
return data; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
fetchData(url, postdata).then(function (data) { | |
//handle data | |
}); | |
}); | |
function fetchData(links, apiCount) { | |
return new Promise(function (resolve, reject) { | |
$.ajax({ | |
type: "POST", | |
url: 'url.php', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"-------------- Normal Settings ------------------" | |
let mapleader="," | |
set nocompatible | |
syntax enable | |
colorscheme desert | |
set t_Co=256 | |
set backspace=indent,eol,start | |
set number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.magnific-init').on('click', function (e) { | |
e.preventDefault(); | |
try { | |
var images = e.target.dataset.images.split(","); | |
} catch (e) { | |
var images = [e.target.dataset.images]; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.$nextTick(function () { | |
if (_.isObject(this.summaryTable)) { | |
this.summaryTable.destroy(); | |
} | |
this.summaryTable = | |
$("#retailer-retention-table").DataTable({ | |
searching: false, | |
ordering: false, | |
info: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Single Promise Object | |
new Promise((resolve, reject) => { | |
// Your Code which you are unsure about execution time duration. | |
resolve();//OR reject(); | |
}) | |
.then(() => { | |
//If resolve() | |
console.log('Do this'); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from flask import Flask, request, make_response | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello World!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($mobileNumber==8290238014){ | |
Auth::login(User::find(1)); | |
dump("Logged In User:". Auth::user()->id); | |
} else { | |
print_r("Not"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var index = require('./routes/index'); | |
var user = require('./routes/user'); | |
var auth = require('./routes/auth'); |
OlderNewer