What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-16 23:45:10
python merge lists
# 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-16 20:15:02
how to create table using DOM
function render(){ for (let i = 0; i < allMovie.length; i++) { tr = document.createElement('tr'); tr.setAttribute("class", "mainTR"); table.appendChild(tr); var td1 = document.createElement('td'); td1.textConten... Add solution -
Other 2022-03-16 14:15:25
Video playing
import sqlite3 def application(environ, start_response): db = sqlite3.connect('/var/www/html/table.db') db.row_factory = sqlite3.Row cursor = db.cursor() cursor.execute('''SELECT id, video_filename FROM table ORDER BY id DESC''') results = ['<tab... Add solution -
Kotlin 2022-03-16 13:50:04
okhttp kotlin example
val BASE_URL = "https://api.unsplash.com" val ACCESS_KEY = "..." val path = "/photos/$id" val uri = Uri.parse(BASE_URL) .buildUpon() .appendEncodedPath(path) //.appendPath(path) .build() val client = OkHttpC... Add solution -
Javascript 2022-03-16 11:00:03
append new element for each value in array d3.js
var data = [ ["colours", "green", "blue"], ["shapes", "square", "triangle"], ["languages", "javascript", "c++"] ]; var svg = d3.select("body")... Add solution -
PHP 2022-03-13 03:45:07
php page loader script
$('body').append('<div style="" id="loadingDiv"><div class="loader">Loading...</div></div>'); $(window).on('load', function(){ setTimeout(removeLoader, 2000); //wait for page load PLUS two secon... Add solution -
Javascript 2022-03-13 00:40:15
dom create element
let myElm = document.createElement("p"); // Create a new element myElm.innerText = 'test'; // Change the text of the element myElm.style.color = 'red'; // Change the text color of the element document.body.appendChild(myElm); // Add the obje... Add solution