What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-08 19:46:15
best case complexity of quick sort
// @see https://www.youtube.com/watch?v=es2T6KY45cA&vl=en // @see https://www.youtube.com/watch?v=aXXWXz5rF64 // @see https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html function partition(list, start, end) { const pivot = list[end... Add solution -
Javascript 2021-11-07 04:02:15
measure width in px chrome extension
var fromX, fromY; var svg = document.createElementNS ('http://www.w3.org/2000/svg',"svg"); svg.setAttribute("style", "position: absolute; top:0;left:0;height: " + document.body.clientHeight + "px;width: 100%"); var ... Add solution -
C 2021-10-28 21:30:11
one line conditional statement in c
if ($scope.SearchSalesOrderAndCompanyName !== undefined && $scope.SearchSalesOrderAndCompanyName != null ) { SearchCriteria += " AND [SalesOrderNo] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%' OR ([SO].[Compan... Add solution -
Javascript 2021-10-28 00:31:07
difference between == and ===
0 == false // true 0 === false // false, because they are of a different type 1 == "1" // true, automatic type conversion for value only 1 === "1" // false, because they are of a different type null == undefined // true null ... Add solution -
Javascript 2021-10-24 10:54:06
== vs === javascript
0 == false // true 0 === false // false, because they are of a different type 1 == "1" // true, automatic type conversion for value only 1 === "1" // false, because they are of a different type null == undefined // true null ... Add solution -
Javascript 2021-10-21 03:33:03
javascript array group by id
function groupByKey(array, key) { return array .reduce((hash, obj) => { if(obj[key] === undefined) return hash; return Object.assign(hash, { [obj[key]]:( hash[obj[key]] || [] ).concat(obj)}) }, {}) } var cars = [{'make':'a... Add solution -
Javascript 2021-10-17 02:11:03
react pagination scroll
import { useState, useEffect, useCallback } from 'react' export const LoadMoreItem = (props) => { const [increment, setIncrement] = useState(4) const [disabled, setDisabled] = useState(false) const [hidden, setHidden] = useState(false) useEffect(... Add solution -
Javascript 2021-10-12 23:08:03
removes null and false values from an array
function bouncer(arr) { arr = arr.filter(function (n) { return (n !== undefined && n !== null && n !== false && n !== 0 && n !== "" && isNaN()!=NaN); }); return arr; } bouncer([7, "ate",... Add solution
Best helpers
Ranking is empty