What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-22 20:12:06
how to start prettier autoformatting
// for VScode follow these steps for custom workspace settings // type 'code .vscode/settings.json' into the terminal and paste the below // at the root of your project/workspace folder { "editor.formatOnSave": true, "editor.defaultForm... Add solution -
Javascript 2021-09-22 00:26:02
google drive show size folder
"MOSTRAR TAMANHO DAS PASTAS DO GOOGLE DRIVE/SHOW SIZE FOLDER IN GOOGLE DRIVE"; //Source: https://www.alphr.com/get-folder-size-google-drive-folders/ //Acesse: https://script.google.com/macros/s/AKfycbyUvNoXzBMBDE9pnHkLUltliGwjip5x09t3PeTY_1KoX... Add solution -
Python 2021-09-21 21:17:02
how to color print in python
def colored(r, g, b, text): return "\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(r, g, b, text) text = 'Hello, World' colored_text = colored(255, 0, 0, text) print(colored_text) #or print(colored(255, 0, 0, 'Hello, World')) Add solution -
SQL 2021-09-21 19:45:03
org.apache.spark.sql.avro.IncompatibleSchemaException: Unexpected type org.apache.spark.ml.linalg.VectorUDT
# To convert any Vector to an Array[Double] you can use the following UDF: import org.apache.spark.sql.functions.udf import org.apache.spark.sql.functions.col import org.apache.spark.ml.linalg.Vector val vectorToArrayUdf = udf((vector: Vector) => vec... Add solution -
Python 2021-09-21 15:20:05
import click click.echo() .format python 3
import click @click.command() @click.option('--verbose', is_flag=True, help="Will print verbose messages.") @click.option('--name', '-n', multiple=True, default='', help='Who are you?') @click.argument('country') def cli(verbose,name, country):... Add solution -
Javascript 2021-09-21 15:14:03
for each python json
import json def main(): # create a simple JSON array jsonString = '{"key1":"value1","key2":"value2","key3":"value3"}' # change the JSON string into a JSON object jsonObject = j... Add solution