This file contains 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
[ | |
{ | |
"name": "Alta Verapaz", | |
"municipalities": [ | |
{ | |
"name": "Cahabón" | |
}, | |
{ | |
"name": "Chahal" | |
}, |
This file contains 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
{ | |
"data": [ | |
{ | |
"id": 1, | |
"name": "china" | |
} | |
] | |
} |
This file contains 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 static string ToFullName(string? name, string? secoundName, string? lastName, string? secoundLastName) | |
{ | |
string _name = string.IsNullOrEmpty(name) ? "" : $"{name.Trim()[0].ToString().ToUpper()}{name[1..]}"; | |
string _secoundName = string.IsNullOrEmpty(secoundName) ? "" : $"{secoundName.Trim()[0].ToString().ToUpper()}{secoundName[1..]}"; | |
string _lastName = string.IsNullOrEmpty(lastName) ? "" : $"{lastName.Trim()[0].ToString().ToUpper()}{lastName[1..]}"; | |
string _secoundLastName = string.IsNullOrEmpty(secoundLastName) ? "" : $"{secoundLastName.Trim()[0].ToString().ToUpper()}{secoundLastName[1..]}"; | |
return $"{_name}{(string.IsNullOrEmpty(secoundName?.Trim()) ? " " : $" {_secoundName} ")}{_lastName}{(string.IsNullOrEmpty(secoundLastName?.Trim()) ? "" : $" {_secoundLastName}")}"; | |
} |
This file contains 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
private static bool ValidateCreditCard(string? creditCard) | |
{ | |
try | |
{ | |
_ = long.Parse(creditCard ?? ""); | |
} | |
catch (Exception) | |
{ | |
return false; |
This file contains 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
CREATE TABLE [TABLE_NAME]( | |
Id UNIQUEIDENTIFIER PRIMARY KEY NOT NULL, | |
[Index] INT IDENTITY(1,1) NOT NULL, | |
[Code] AS ('P'+ RIGHT('00000' + CAST(([Index]) AS VARCHAR(5)), 5)) PERSISTED, | |
) |
This file contains 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
/* | |
* Regex for validate email | |
*/ | |
const emailValidator = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/; |
This file contains 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
import { BaseModel } from "../../base/models/base.model"; | |
import firebase from "firebase"; | |
/** | |
* format all properties timestamp firebase to DateJs | |
* @author Orbis Alonzo Gutierrez | |
* @param data any | |
* @returns T Object | |
*/ | |
const getFormatedFirebaseData = <T>(data: any) => { |
This file contains 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
import { Table } from "react-bootstrap"; | |
import "./styles.css"; | |
type Props = { | |
headers: string[]; | |
data: any[]; | |
showId?: boolean; | |
handleClick: (id: string | undefined) => void; | |
}; |
This file contains 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
import firebase from "firebase"; | |
import { firebaseConfiguration } from "../../firebase"; | |
import { BaseModel } from "../models/base.model"; | |
import { PaginationBaseModel } from "../models/pagination-base.model"; | |
interface IRepositoryBase<TEntity extends BaseModel> { | |
create(model: TEntity): Promise<TEntity>; | |
update(model: TEntity): Promise<TEntity>; | |
/** | |
* exec a softdelete |
This file has been truncated, but you can view the full file.
This file contains 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
[ | |
{ | |
"country": "AD", | |
"name": "Sant Julià de Lòria", | |
"lat": "42.46372", | |
"lng": "1.49129" | |
}, | |
{ | |
"country": "AD", | |
"name": "Pas de la Casa", |
NewerOlder