- Instalar Python
- Verificar instalación de Python
python3 --version
(Para MacOs y Linux)python --version
(Para Windows)
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
/* | |
===================================== | |
Análisis de Ventas con LINQ y Excepciones | |
===================================== | |
*/ | |
// 🏆 Ejercicio: | |
// Desarrollar un sistema para analizar las ventas de una empresa usando colecciones y LINQ. | |
// Tendrás una clase "Sale" con las siguientes propiedades: | |
// - Product (public) | |
// - Category (public) |
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
namespace AdvancedLinq | |
{ | |
class Character | |
{ | |
public int Id { get; set; } | |
public string? Name { get; set; } | |
public string? Alias { get; set; } | |
public string? Team { get; set; } | |
} |
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
namespace AdvancedLinq | |
{ | |
class Character | |
{ | |
public int Id { get; set; } | |
public string? Name { get; set; } | |
public string? Alias { get; set; } | |
public string? Team { get; set; } | |
} |
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 MarvelCharacter | |
{ | |
public string? Name { get; set; } | |
public string? Alias { get; set; } | |
public string? Team { get; set; } | |
} | |
List<MarvelCharacter> characters = new List<MarvelCharacter> | |
{ | |
new MarvelCharacter { Name = "Peter Parker", Alias = "Spider-Man", Team = "Avengers" }, |
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
builder.Services.AddSwaggerGen( | |
options => | |
{ | |
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme | |
{ | |
Description = "Nuestra API utiliza la Autenticación JWT usando el esquema Bearer. \n\r\n\r" + | |
"Ingresa la palabra a continuación el token generado en login.\n\r\n\r" + | |
"Ejemplo: \"12345abcdef\"", | |
Name = "Authorization", | |
In = ParameterLocation.Header, |
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
{ | |
"ApiSettings":{ | |
"SecretKey": "Esta es una clave secreta y tiene que ser extensa para evitar error de encriptación" | |
}, | |
"ConnectionStrings": { | |
"ConexionSql":"..." | |
}, | |
.... | |
} |
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
{ | |
"ConnectionStrings": { | |
"ConexionSql":"Server=localhost;Database=ApiEcommerceNET8;User ID=SA;Password=MyStrongPass123;TrustServerCertificate=true;MultipleActiveResultSets=true" | |
}, | |
"Logging": { | |
"LogLevel": { | |
"Default": "Information", | |
"Microsoft.AspNetCore": "Warning" | |
} | |
}, |
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
services: | |
sql: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
container_name: sqlserver2022 | |
ports: | |
- "1433:1433" | |
environment: | |
ACCEPT_EULA: "1" | |
MSSQL_SA_PASSWORD: "MyStrongPass123" | |
MSSQL_PID: "Developer" |
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
static namePattern = '([a-zA-Z]+) ([a-zA-Z]+)'; | |
static emailPattern = '^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$'; | |
static notOnlySpacesPattern = '^[a-zA-Z0-9]+$'; |
NewerOlder