What do you want to save?
Add Code snippet
New code examples
-
C 2021-10-16 12:09:12
Segment tree
// C++ program to show segment tree operations like construction, query // and update #include <bits/stdc++.h> using namespace std; // A utility function to get the middle index from corner indexes. int getMid(int s, int e) { return s + (e -s)... Add solution -
TypeScript 2021-10-16 09:54:07
js get quater hours in time range
// Start and End is the UTC-Timestamp function getQuaterHours(start: number, end: number): Date[] { const difference = end - start; // Return if Difference between start and end is 0 if (difference <= 0) { // You can return a default r... Add solution -
Javascript 2021-10-15 00:16:08
javascript ean13 checksum generate
function getLastEan13Digit(ean) { if (!ean || ean.length !== 12) throw new Error('Invalid EAN 13, should have 12 digits'); const multiply = [1, 3]; let total = 0; ean.split('').forEach((letter, index) => { total += parseInt(letter, 10)... Add solution -
-
Javascript 2021-10-12 04:40:11
math.round js
//There are meny ways of rounding... Math.floor(5.5) //Answer 5, it alwas rounds down. Math.round(5.5) //Answer 6, it simpily rounds to the closest whole number. Math.ceil(5.5) //Answer 6, it alwas rounds up. //You can do more things too... Math.floor(5.... Add solution -
Javascript 2021-10-09 19:39:06
javascript pagination demo
var current_page = 1; var records_per_page = 2; var objJson = [ { adName: "AdName 1"}, { adName: "AdName 2"}, { adName: "AdName 3"}, { adName: "AdName 4"}, { adName: "AdName 5"}, {... Add solution
Best helpers
Ranking is empty