Snippets Collections
import sys

print(sys.argv[0])  # Outputs: script.py
print(sys.argv[1])  # Outputs: arg1
print(sys.argv[2])  # Outputs: arg
param(
    [string]$param1,
    [string]$param2
)

Write-Host "Parameter 1 is: $param1"
Write-Host "Parameter 2 is: $param2"
$firstArg = $args[0]  # This will be 'arg1'
$secondArg = $args[1] # This will be 'arg2'
$thirdArg = $args[2]  # This will be 'arg3'
http://www.java2s.com/Code/Jar/j/Downloadjsonsimple11jar.htm#google_vignette --> \json-simple-1.1.jar

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class FileWriterExample {
    public static void main(String[] args) {
        String filePath = "ruta_del_archivo.txt"; // Reemplaza con la ruta correcta de tu archivo

        try {
            // Abre el archivo en modo de escritura sin borrar el contenido anterior
            FileWriter fileWriter = new FileWriter(filePath, true);

            // Envuelve FileWriter en un BufferedWriter para mejorar el rendimiento
            BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);

            // Escribe el nuevo contenido en el archivo
            bufferedWriter.write("Este es el nuevo contenido\n");
            bufferedWriter.write("que se agregará sin borrar lo anterior.\n");

            // Cierra el BufferedWriter
            bufferedWriter.close();

            System.out.println("Se ha escrito en el archivo correctamente.");
        } catch (IOException e) {
            System.out.println("Error al escribir en el archivo: " + e.getMessage());
        }
    }
}
	public void writeFile(String text) {
		
        try {
            // Abre el archivo en modo de escritura
            BufferedWriter writer = new BufferedWriter(new FileWriter("C:\\Users\\integratec\\Desktop\\universalError.txt"));

            // Escribe en el archivo
            
            writer.write(text);
            writer.newLine(); // Añade una nueva línea
            

            // Cierra el archivo
            writer.close();

            System.out.println("Se ha escrito en el archivo exitosamente.");
        } catch (IOException e) {
            System.out.println("Ocurrió un error al escribir en el archivo: " + e.getMessage());
       }
set srcFldr to (choose folder with prompt "Select the source folder:")
set destFldr to (choose folder with prompt "Select the destination folder:")
tell application "Finder"
	--set fileList to files of srcFldr -- sorted by name in HFS Plus' fashion (?)
	set fileList to sort (get files of srcFldr) by name -- sorted by name in Finder's fashion
	set fileCnt to count fileList
	set ff to {}
	repeat with i from 2 to fileCnt by 2
		set end of ff to item i of fileList
	end repeat
	move ff to destFldr -- you can move list at once
end tell
star

Fri Aug 25 2023 03:35:53 GMT+0000 (Coordinated Universal Time)

#args #list #files #embed #image
star

Thu Aug 24 2023 06:17:58 GMT+0000 (Coordinated Universal Time)

#args #list #files #embed #image
star

Wed Aug 23 2023 22:09:56 GMT+0000 (Coordinated Universal Time)

#args #list #files
star

Wed Aug 23 2023 22:09:38 GMT+0000 (Coordinated Universal Time)

#args #list #files
star

Thu Jun 22 2023 19:21:31 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/share/a5699c6b-2466-42a9-a679-69fe880aa799

#files #json
star

Thu Jun 22 2023 16:48:52 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/share/fd826d76-2d03-461a-8ae7-6b7458c6a799

#files
star

Thu Jun 22 2023 16:44:07 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/share/27fb03ae-8a79-485d-8bfc-135d8a7908e1

#java #files
star

Fri Jul 08 2022 07:36:28 GMT+0000 (Coordinated Universal Time) undefined

#server #files
star

Tue Mar 09 2021 17:18:08 GMT+0000 (Coordinated Universal Time) https://discussions.apple.com/thread/2323904

#applescript #sort #files

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension