What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-03 02:27:01
c++ string on multiple lines
std::string firstWay = "This text is pretty long, but will be " "concatenated into just a single string. " "The disadvantage is that you have to quote " "each part, and newlines must be literal as " "... Add solution -
Javascript 2021-09-02 12:24:01
return symmetric difference of the array javascript
function symmetricDiff(arrary1, array2){ let symmetricDifference = []; symmetricDifference = array1.filter(element => !array2.includes(element)) .concat(array2.filter(element => !array1.includes(element))) return symmetricDifference; } Add solution -
Shell/Bash 2021-09-01 02:36:02
bash compare two lists of checksums
# Example usage: cat checksum_list_1 checksum_list_2 | sort | uniq -c | sort | less # This command concatenates the lists, sorts them so that repeated # checksums are adjactent, adds the count of each, and then sorts them # again so that highers counts ar... Add solution -
Python 2021-08-31 09:02:01
merge all mp4 video files into one file python
from moviepy.editor import * import os from natsort import natsorted L =[] for root, dirs, files in os.walk("/path/to/the/files"): #files.sort() files = natsorted(files) for file in files: if os.path.splitext(file)[1] == '... Add solution -
Javascript 2021-08-30 23:49:01
apollo client authentication
import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client'; import { setContext } from '@apollo/client/link/context'; const httpLink = createHttpLink({ uri: '/graphql', }); const authLink = setContext((_, { headers }) => { // ge... Add solution -
Javascript 2021-08-30 05:42:02
sieve of eratosthenes in javascript
const num = 100; const findPrimes = (num = 10) => { const numArr = new Array(num + 1); numArr.fill(true); numArr[0] = numArr[1] = false; for (let i = 2; i <= Math.sqrt(num); i++) { &n... Add solution
Best helpers
Michaelyus
+5
EBA2018
+5
Eric Lewis
+5
J. Tatum
+5
Erwaman
+5
Jp_
+5
Fauve
+5
Katy Forde
+5
Jcvamp
+5
Chris
+5