What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-05 12:20:02
copy clipboard with span
document.getElementById("cp_btn").addEventListener("click", copy_password); function copy_password() { var copyText = document.getElementById("pwd_spn"); var textArea = document.createElement("textarea"); ... Add solution -
Python 2022-03-03 07:40:33
python list functions
list.append(x) # append x to end of list list.extend(iterable) # append all elements of iterable to list list.insert(i, x) # insert x at index i list.remove(x) # remove first occurance of x from list list.pop([i]) # pop element at index i (defaults to end... Add solution -
Python 2022-03-03 06:30:02
shared list in multiprocessing python
import multiprocessing manager = multiprocessing.Manager() shared_list = manager.list() def worker1(l): l.append(1) def worker2(l): l.append(2) process1 = multiprocessing.Process( target=worker1, args=[shared_list]) process2 = multiprocessi... Add solution -
Python 2022-03-02 21:10:02
array storing in file by python
# long arrays can be stored in csv files far more efficiently import numpy as np import csv # uploading arrays in a csv file arr1 = [i for i in range(500)] arr2 = [i for i in range(1000)] arr3 = [i for i in range(2000)] # you can write('w') or append('a'... Add solution -
Python 2022-03-02 18:05:03
merge two lists python
# Basic syntax: first_list.append(second_list) # Append adds the the second_list as an # element to the first_list first_list.extend(second_list) # Extend combines the elements of the # first_list and the second_list # Note, both append and extend modif... Add solution -
Javascript 2022-03-02 14:05:03
what is x scale and y scale in d3 js
// create svg element var svg = d3.select("#res") .append("svg") .attr("width", 1000) // Create the scale var x = d3.scaleLinear() .domain([0, 100]) // This is what is written on the Axis: from 0 to 100 ... Add solution -
Other 2022-03-01 15:10:41
bootstrap 5 datepicker example
<div class="input-append date" id="dp3" data-date="12-02-2012" data-date-format="dd-mm-yyyy"> <input class="span2" size="16" type="text" value="12-02-2012"> <... Add solution