Skip to content

Instantly share code, notes, and snippets.

View zendar426's full-sized avatar

Andres zendar426

View GitHub Profile
@zendar426
zendar426 / pom.xml
Created June 25, 2024 19:14
[Plugin for sonar covegare] este cp se pega debajo de las dependencias, en la seccion de <plugins> #Java #Sonarqube
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
@zendar426
zendar426 / notas.txt
Last active June 11, 2024 18:56
[git flow commands] comandos de gitflow #java
git flow init
git flow feature start newf1
4. Crear un tercer feature a partir de otro feature
git flow feature start newf3 feature/newf2
@zendar426
zendar426 / CurrentDate.java
Created May 7, 2024 20:04
[Get current Date] aaa #Date #Fecha
public String getFecha(){
return LocalDateTime.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy"));
}
@zendar426
zendar426 / CsvFileManager.java
Last active June 4, 2024 19:42
[manejo csv java] manejo csv (es una clase ya lista, toma como argumento la direccion de un archivo y luego, lee cada uno por filas) #files
package org.example;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class CsvFileManager {
public static void csvReader(String file) {
BufferedReader reader = null // aqui cambiar la ruta del csv;
@zendar426
zendar426 / Files.java
Created December 14, 2023 03:10
Archivos Java
package org.example;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Files {
public static void crearArchivo() {
@zendar426
zendar426 / Minimo comun multiplo
Created April 18, 2023 15:29
#Csharp #Matematicas
static int Mcd(int a, int b)
{
if (b > a) return Mcd(b, a);
else if (b == a) return a;
else return Mcd(a-b,b);
}
@zendar426
zendar426 / Factorial.cs
Last active May 6, 2024 19:03
C# #Matematicas
static long Factorial(long n) {
if (n==0) return 1;
else return n * Factorial(n-1);
}
@zendar426
zendar426 / manejo de archivos
Created April 9, 2023 02:29
#ManejoDeArchivos #Csharp
uwu
// usar con su respectiva interfaz
public static void bubbleSort(Objeto[] objetos) {
for (int i = 0; i < personas.length - 1; i++) {
for (int j = 0; j < personas.length - 1; j++) {
if (personas[j].compareTo(personas[j + 1]) > 0) {
Persona aux = personas[j];
personas[j] = personas[j + 1];
personas[j + 1] = aux;
}
}