What do you want to save?
Add Code snippet
New code examples
-
Rust 2021-11-11 13:17:12
rust spinning rod animation in text
let characters = ['|', '/', '-', '\\']; let mut current = 0; println!("{}[2J", 27 as char); // Clear screen. loop { println!("{}[;H{}", 27 as char, characters[current]); // Move cursor to 1,1 and output the ... Add solution -
Other 2021-11-11 11:19:21
how to use vi editor mac
Type "vi file.txt" at command prompt. Move cursor to where new text will be added. Type "i" to change to insert mode. Type new text. Type ESC to go back to command mode. type ":wq" and ENTER to write the file and quit. Add solution -
Javascript 2021-09-30 21:32:03
input field take only number and one comma
function checkKey() { var clean = this.value.replace(/[^0-9,]/g, "") .replace(/(,.*?),(.*,)?/, "$1"); // don't move cursor to end if no change if (clean !== this.value) this.value = clean; } // d... Add solution -
Shell/Bash 2021-09-01 20:00:02
how to copy everything in a file with sudo nano
To copy & paste in nano text editor: 1. Move cursor to start of text and press CTRL + 6 to set mark. 2. Highlight text to copy using arrow keys. 3. Press ALT + 6 to copy. 4. Move cursor to desired location and press CTRL + U to paste. Add solution