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
function chainAjaxCalls(form) { | |
function a() { | |
return $.ajax({ | |
url: "https://reqres.in/api/login", | |
type: "POST", | |
data: { | |
email: "function_a", | |
password: "xyz" |
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
baseRouter.get('/fruitsList', (req, res) => { | |
/* | |
DataTable when Server-side processing is true sends the data it needs in the query string as you can | |
see in the network tab of any web inspector filtering GET XHR requests. | |
remember to always parse integer parameters to avoid any possible SQLinjection or XSS attack | |
(as DataTable Server-side processing documentation recommend too) | |
*/ | |
var draw = parseInt(req.query.draw); | |
var start = parseInt(req.query.start); | |
var length = parseInt(req.query.length); |
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
package com.example; | |
public class Cable { | |
private boolean isPluggedIn; | |
public void plugIn() { | |
isPluggedIn = true; | |
} | |