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
[ | |
{ | |
"name": "Alta Verapaz", | |
"municipalities": [ | |
{ | |
"name": "Cahabรณn" | |
}, | |
{ | |
"name": "Chahal" | |
}, |
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
{ | |
"data": [ | |
{ | |
"id": 1, | |
"name": "china" | |
} | |
] | |
} |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"country": "AD", | |
"name": "Sant Juliร de Lรฒria", | |
"lat": "42.46372", | |
"lng": "1.49129" | |
}, | |
{ | |
"country": "AD", | |
"name": "Pas de la Casa", |
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 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 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
private static bool ValidateCreditCard(string? creditCard) | |
{ | |
try | |
{ | |
_ = long.Parse(creditCard ?? ""); | |
} | |
catch (Exception) | |
{ | |
return false; |
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
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 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
import { Table } from "react-bootstrap"; | |
import "./styles.css"; | |
type Props = { | |
headers: string[]; | |
data: any[]; | |
showId?: boolean; | |
handleClick: (id: string | undefined) => void; | |
}; |
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
/* | |
* Regex for validate email | |
*/ | |
const emailValidator = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/; |
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
import { AxiosResponse } from "axios"; | |
import { AxiosConfig } from "../../api"; | |
export interface IRead<T> { | |
getAll(route: string, params?: string): Promise<AxiosResponse<T[]>>; | |
getById(route: string, id: string): Promise<AxiosResponse<T>>; | |
getPaginatedList(route: string, params?: string): Promise<AxiosResponse<T[]>>; | |
} | |
export interface IWrite<T> { |
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
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) => { |
NewerOlder