What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-22 04:23:04
dm discord.js
if (cmd === `!dm`) { let dUser = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0]); if (!dUser) return message.channel.send("Can't find user!"); if (!message.member.hasPermission('ADMINISTRATOR')) ... Add solution -
Javascript 2021-09-20 22:17:02
capitalize first letter of each word javascript
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
TypeScript 2021-09-20 18:54:02
javascript capitalize all words
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-09-20 18:42:04
javascript sum of all the multiples of 3 or 5 below 1000 running total
(() => { // sum35 :: Int -> Int const sum35 = n => { // The sum of all positive multiples of // 3 or 5 below n. const f = sumMults(n); return f(3) + f(5) - f(15); }; // sumMults ... Add solution -
Other 2021-09-20 12:29:03
svg aspect ratio
<svg viewBox="-1 -1 162 92" xmlns="http://www.w3.org/2000/svg"> <defs> <path id="smiley" d="M50,10 A40,40,1,1,1,50,90 A40,40,1,1,1,50,10 M30,40 Q36,35,42,40 M58,40 Q64,35,70,40 M30,60 Q50,75,70,60 Q... Add solution -
Python 2021-09-20 07:19:05
how to select subset of data in a dataset using xarray
#import xarray import xarray as xr #open the dataset ds = xr.open_dataset(file_name.nc) #get a subset of the data ds.sel(dim=slice()) # input the dimension (dim) to select and the value of the dimension into the slice function(slice) ds.loc[{'dim': slic... Add solution