What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-19 00:50:06
js array to string
const elements = ['Fire', 'Air', 'Water']; console.log(elements.join()); // expected output: "Fire,Air,Water" console.log(elements.join('')); // expected output: "FireAirWater" console.log(elements.join('-')); // expected output: &q... Add solution -
Python 2021-10-14 20:20:08
python pool
"""A very simple parallel code example to execute parallel functions in python""" import multiprocessing import numpy as np def multiprocessing_func(x): """Individually prints the squares y_i of the elements x... Add solution -
Javascript 2021-10-12 08:17:16
js array join
const elements = ['Fire', 'Air', 'Water']; console.log(elements.join()); // expected output: "Fire,Air,Water" console.log(elements.join('')); // expected output: "FireAirWater" console.log(elements.join('-')); // expected output: &q... Add solution -
Python 2021-10-11 21:04:06
Python3 - Multi Threaded Programming
#!/usr/bin/python3 import queue import threading import time exitFlag = 0 class myThread (threading.Thread): def __init__(self, threadID, name, q): threading.Thread.__init__(self) self.threadID = threadID self.name = name sel... Add solution -
Other 2021-09-29 09:21:02
how to use threads to add items to a list- RC
#include <iostream> #include <thread> #include <list> #include <algorithm> #include <mutex> using namespace std; // a global variable std::list<int>myList; // a global instance of std::mutex to protect global variabl... Add solution