What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-06 09:10:23
numberlong to int
NumberLong('yourValue').valueOf().toString(); Add solution -
Other 2022-01-24 05:20:37
PntIDNumbers
#include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <sstream> #define MAX 200 using namespace std; // Function receive address of the first element of an array // Reads file contents and store... Add solution -
Shell/Bash 2021-11-03 06:25:15
is it possible to check with my website if an app is installed?
var now = new Date().valueOf(); setTimeout(function () { if (new Date().valueOf() - now > 100) return; window.location = "https://itunes.apple.com/appdir"; }, 25); window.location = "appname://"; Add solution -
C++ 2021-10-29 08:47:18
c++ get last element in array
#include<iostream> /*To get the last element of the array we first get the size of the array by using sizeof(). Unfortunately, this gives us the size of the array in bytes. To fix this, we divide the size (in bytes) by the size of th... Add solution -
Javascript 2021-10-27 22:07:11
javascript number if .00 truncate
Number.prototype.toFixedDown = function(digits) { var re = new RegExp("(\\d+\\.\\d{" + digits + "})(\\d)"), m = this.toString().match(re); return m ? parseFloat(m[1]) : this.valueOf(); }; [ 5.467.toFixedDown(2), ... Add solution -
Javascript 2021-10-27 13:10:13
javascript nameof
// TypeScript // NameOf.ts export const NameOf = <T>(name: keyof T) => name; // Setup class User { Name: string; Age: number; } // Usage import {NameOf} from './NameOf'; function UseNameOf() { console.log(NameOf<User>('Name')); } /... Add solution