What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-07 17:32:17
js create div
document.body.onload = addElement; function addElement () { // create a new div element const newDiv = document.createElement("div"); // and give it some content const newContent = document.createTextNode("Hi there and greetings!&... Add solution -
Python 2021-11-06 03:21:12
random forest from scratch python github
import numpy as np from collections import Counter #implement decision tree def entropy(d): c = np.bincount(d) c = c[c != 0] prop = c/len(d) E = - prop*np.log2(prop) return np.sum(E) class Node: def __init__(self, beast_split_fea... Add solution -
C++ 2021-11-05 13:45:11
sum of all leaf nodes of binary tree
#include<iostream> using namespace std; struct node { int data; node* left; node* right; }; node* getnode(int value) { node *temp=new node; temp->data=value; temp->left=NULL; temp->right=NULL; return temp; } node* insert_bst... Add solution -
Html 2021-11-03 00:35:11
create node in javascript
<div id="div1"> <p id="p1">This is a paragraph.</p> <p id="p2">This is another paragraph.</p> </div> <script> // Create <p> element var para = document.createElement(&q... Add solution