This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ColouredSystemOutPrintln { | |
| public static final String ANSI_RESET = "\u001B[0m"; | |
| public static final String ANSI_BLACK = "\u001B[30m"; | |
| public static final String ANSI_RED = "\u001B[31m"; | |
| public static final String ANSI_GREEN = "\u001B[32m"; | |
| public static final String ANSI_YELLOW = "\u001B[33m"; | |
| public static final String ANSI_BLUE = "\u001B[34m"; | |
| public static final String ANSI_PURPLE = "\u001B[35m"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .element { | |
| width: 100%; | |
| height: 100%; | |
| animation: pulse 5s infinite; | |
| } | |
| @keyframes pulse { | |
| 0% { | |
| background-color: #001F3F; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.j2deme; | |
| import java.util.Scanner; | |
| import java.util.Vector; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner teclado = new Scanner(System.in); | |
| Vector<Integer> numeros = new Vector<Integer>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.j2deme; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner teclado = new Scanner(System.in); | |
| int opcion,sala,fila,butaca; | |
| boolean[][][] cine = new boolean[3][10][10]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.j2deme; | |
| import java.util.Scanner; | |
| import java.util.Vector; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner teclado = new Scanner(System.in); | |
| /*String msj; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.j2deme; | |
| public class ConsolaColor { | |
| public static final String ANSI_RESET = "\u001B[0m"; | |
| // Códigos ANSI para colores de letra | |
| public static final String ANSI_BLACK = "\u001B[30m"; | |
| public static final String ANSI_RED = "\u001B[31m"; | |
| public static final String ANSI_GREEN = "\u001B[32m"; | |
| public static final String ANSI_YELLOW = "\u001B[33m"; | |
| public static final String ANSI_BLUE = "\u001B[34m"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.j2deme; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { | |
| int altura; // Centímetros | |
| double peso; // Kilogramos | |
| int edad; // Años exactos | |
| int opcion = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.j2deme; | |
| public class Ingrediente { | |
| private String nombre; | |
| private String sabor; | |
| private boolean aportaOlor; | |
| private boolean aportaTextura; | |
| private boolean aportaColor; | |
| public Ingrediente(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from multipledispatch import dispatch # pip install multipledispatch | |
| class ContadorPasos: | |
| pasos = -1 | |
| def __init__(self, pasos=0): | |
| self.pasos = pasos | |
| def __del__(self): | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Llanta: | |
| def __init__(self, etiqueta): | |
| self.etiqueta = etiqueta | |
| self.presion = 0 | |
| def inflar(self, presion=32): | |
| self.presion = presion | |
| print(f"Inflando llanta a {self.presion} PSI") | |
| def __str__(self): |