What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-16 22:30:12
javascript loop through arrya
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Other 2022-03-16 22:05:15
arduino dht11 lcd 16x2 i2c
#include <DHT11.h> #include <Wire.h> #include <LCD.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Addr, En, Rw, Rs, d4, d5, d6, d7, backlighpin, polarity int pin = A0; DHT11 dht... Add solution -
Other 2022-03-16 21:15:14
keep Looping = “a” user Input = “y” while (keep Looping == “y”): print (“Hello world!”) user Input = input(“Would you like me to keep printing hello world? (y/n)”)
keepLooping = “y” userInput = “y” while (keepLooping == “y”): print (“Hello world!”) userInput = input(“Would you like me to keep printing hello world? (y/n)”) Add solution -
Other 2022-03-16 19:55:36
raspberry pi configuration.nix
{ config, pkgs, lib, ... }: { # This configuration worked on 09-03-2021 nixos-unstable @ commit 102eb68ceec # The image used https://hydra.nixos.org/build/134720986 boot = { kernelPackages = pkgs.linuxPackages_rpi4; tmpOnTmpfs = true; in... Add solution -
Python 2022-03-16 14:10:17
python generate fibonacci series
# WARNING: this program assumes the # fibonacci sequence starts at 1 def fib(num): """return the number at index `num` in the fibonacci sequence""" if num <= 2: return 1 return fib(num - 1) + fib(num - 2) ... Add solution -
Python 2022-03-16 12:25:11
python hoe to make a text box
import tkinter as tk root= tk.Tk() canvas1 = tk.Canvas(root, width = 400, height = 300, relief = 'raised') canvas1.pack() label1 = tk.Label(root, text='Calculate the Square Root') label1.config(font=('helvetica', 14)) canvas1.create_window(200, 25, wi... Add solution -
Python 2022-03-15 21:30:04
python dictionary methods
#Creating dictionaries dict1 = {'color': 'blue', 'shape': 'square', 'volume':40} dict2 = {'color': 'red', 'edges': 4, 'perimeter':15} #Creating new pairs and updating old ones dict1['area'] = 25 #{'color': 'blue', 'shape': 'square', 'volume': 40, 'area':... Add solution
Best helpers
Ranking is empty