What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-03-06 00:05:30
typescript static class equivalent
//Example of Typescript static class equivalent export abstract class Tools { public static truncate(str, length) { var ending = '...'; if (str.length > length) { return str.substring(0, length - ending.length) + ending; } el... Add solution -
Other 2022-03-03 05:45:31
signaure pad convert to img
const dataURL = this.signaturePad.toDataURL('image/png'); const data = atob(dataURL.substring('data:image/png;base64,'.length)), asArray = new Uint8Array(data.length); for (var i = 0, len = data.length; i < len; ++i) { asArray[i] = data.charCodeAt... Add solution -
Other 2022-03-02 21:10:08
One or more errors occurred. (A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.))
foreach ($CipherSuite in $(Get-TlsCipherSuite).Name) { if ( $CipherSuite.substring(0,7) -eq "TLS_DHE" ) { "Disabling cipher suite: " + $CipherSuite Disable-TlsCipherSuite -Name $CipherSuite } else { ... Add solution -
Javascript 2022-03-01 21:30:24
how to have your discord bot send two message
const Discord = require('discord.js'); const Client = new Discord.Client(); const { token, prefix } = require('./config.json'); Client.on('ready',() =>{ console.log('Ready!'); }) Client.on('message', message=>{ let args = message.content.sub... Add solution -
Javascript 2022-03-01 00:30:17
unique code generator javascript
var ID = function () { // Math.random should be unique because of its seeding algorithm. // Convert it to base 36 (numbers + letters), and grab the first 9 characters // after the decimal. return '_' + Math.random().toString(36).substr(2, 9); }; Add solution -
Java 2022-02-27 11:05:21
java rename file extension
// java rename file extension import java.io.File; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; public class RenameFileExtension { public static boolean renameExtension(String strSource, String strNewExte... Add solution