What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-29 02:05:01
bash print output to one line
# Basic syntax: <command_producing_multi-line output> | tr '\n' ' ' # Where: # - | sends (pipes) the multi-line output of your command to tr # - tr '\n' ' ' translates all new line characters from the multi-line # output to spaces, resulting in al... Add solution -
Javascript 2021-08-26 20:43:02
dragon curve
// p5.js let sys = ["|", "X"], scale = 1 function setup() { createCanvas(500, 500) } function keyPressed() { sys = sys.map(c => ({X:"X+Y|+", Y:"-|X-Y"}[c] || c).split("")).flat() scale *= 0.75 }... Add solution -