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
$('#example').on( 'length.dt', function ( e, settings, len ) { | |
console.log( 'New page length: '+len ); | |
} ); |
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
fs = require('fs'); | |
http = require('http'); | |
url = require('url'); | |
util = require('util'); | |
function getFiles (dir, files_){ | |
files_ = files_ || []; | |
var files = fs.readdirSync(dir); | |
for (var i in files){ | |
var name = dir + '/' + files[i]; |
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
'''Problem Statement | |
Given an integer array, move all elements that are 0 to the left while maintaining the order of other elements in the array. | |
The array has to be modified in-place.''' | |
def move_zeros_to_left(A): | |
for i, ele in enumerate(A, start=0): | |
if(ele == 0): | |
A.pop(i) | |
A.insert(0, 0) | |
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.querySelector('#elId').scrollIntoView({ behavior: 'smooth'}); | |
it('Sidenav Clicked navigate to route "Subawards', () => { | |
const mSpy = spyOn(component, 'clicked').and.callThrough(); | |
let divElement = document.createElement('div'); | |
divElement.setAttribute('id', "header"); | |
spyOn(document, 'querySelector').and.returnValue(divElement); | |
component.clicked({ 'mode': 0, 'path': '#header' }); | |
expect(mSpy).toHaveBeenCalled(); | |