What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-21 00:27:03
number to words java
class NumberToWordExample1 { //user-defined static method that converts a number into words static void numberToWords(char num[]) { //determines the number of digits in the given number int len = num.length; //checks the given number has nu... Add solution -
Python 2021-09-19 22:01:02
change the default python version mac
#install or update brew $ brew install pyenv #install $ pyenv install 3.7.3 #make default $ pyenv global 3.7.3 # and verify $ pyenv version 3.7.3 (set by /Users/mbbroberg/.pyenv/version) $ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n &n... Add solution -
PHP 2021-09-19 05:48:02
php ternary shorthand
<?php #Syntex (if Condition) ? (stat1) : (stat2); #example $var1 = 5; $var2 = 2; echo $check = ($var1 > $var2) ? "right" : "wrong"; #output : right /* explination : if condition is true then display the stat1 and if conditi... Add solution -
Python 2021-09-19 03:32:04
python code for rock paper scissors
import random game_list = ['Rock', 'Paper', 'Scissors'] computer = c = 0 command = p = 0 print("Score: Computer" + str(c) + " Player " + str(p)) # the loop run = True while run: computer_choice = random.choice(game_list) com... Add solution -
VBA 2021-09-19 02:56:02
vba load csv file to memory
'VBA function to open a CSV file in memory and parse it to a 2D 'array without ever touching a worksheet: Function ArrayFromCSV(sFile$) Dim c&, i&, j&, p&, d$, s$, rows&, cols&, a, r, v Const Q = """", ... Add solution