What do you want to save?
Add Code snippet
New code examples
-
Go 2021-10-16 14:18:07
mongo db returning null in array of string graphql
// Using the same query as aboveconst result = await client.query({ query: query });if (result.data.restaurants) { result.data.restaurants.forEach(restaurant => { if (restaurant) { console.log(restaurant.name); console.log(restaurant.loca... Add solution -
Javascript 2021-10-16 04:12:07
every possible pairing in an array javascript in new array
function pairs(arr) { var res = [], l = arr.length; for(var i=0; i<l; ++i) for(var j=i+1; j<l; ++j) res.push([arr[i], arr[j]]); return res; } pairs([1, 2, 3]).forEach(function(pair){ console.log(pair); }); 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-15 00:07:09
react map gl marker
// add markers to map geojson.features.forEach(function(marker) { // create a HTML element for each feature var el = document.createElement('div'); el.className = 'marker'; // make a marker for each feature and add to the map new mapboxgl.Mark... Add solution -
Objective-C 2021-10-14 01:18:02
google sheets script sample export csv file in C drive
function convertRangeToCsvFile_(csvFileName, sheet) { try { var data = sheet.getDataRange().getDisplayValues(); if (data.length > 1) { var rows = []; data.forEach(row => { var cols = []; row.forEach(col => { ... Add solution -
Html 2021-10-13 23:36:13
htmlagility treeview
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); doc.LoadHtml(html); TreeNode root = new TreeNode("HTML"); treeView1.Nodes.Add(root); LoadTree(root, doc.DocumentNode); void LoadTree(TreeNode treeNode, HtmlAgilityPack.Htm... Add solution