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
let text = 'asda12232353k'; | |
const d = text.replace(/[^0-9, 'K']/g, ""); | |
console.log(d) |
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
// https://www.bci.cl/corporativo/banco-en-linea/personas | |
// https://www.nombrerutyfirma.com/nombre | |
const formatRut = (text: string) => { | |
let f = text.split("").reverse() | |
const fr1 = f.splice(0, 1).join("") | |
const fr2 = f.splice(0, 3).join("") | |
const fr3 = f.splice(0, 3).join("") | |
const fr4 = f.splice(0, 3).join("") | |
const te = (_text: string, caracter = ".") => |
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
//https://es.wikipedia.org/wiki/C%C3%B3digo_de_control | |
const mod11 = (text: string) => { | |
const items = text.split("").reverse() | |
let weigHing = 2 | |
let acum = 0 | |
items.forEach((item: string): void => { | |
acum += Number.parseInt(item) * weigHing | |
weigHing = weigHing == 7 ? 2 : weigHing + 1 | |
}) | |
const mod = acum % 11 |
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
<svg | |
class="h-20 w-20" | |
viewBox="0 0 24 24" | |
> | |
<defs> | |
<linearGradient id="bones-gradient" x1="73%" y1="20%" x2="2%" y2="100%"> | |
<stop offset="0%" stop-color="#405DE6" /> | |
<stop offset="10%" stop-color="#5851DB" /> | |
<stop offset="20%" stop-color="#833AB4" /> | |
<stop offset="30%" stop-color="#C13584" /> |
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
const idUnic = () => { | |
let d = new Date(); | |
return `${d.getDate()}${d.getMonth()}${d.getFullYear()}${d.getHours()}${d.getMinutes()}${d.getSeconds()}${d.getMilliseconds()}`; | |
} |
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
// Simple example for | |
// 1.) Read a sql server query to datatable; | |
// 2.) Export it to .csv | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var connectionString = @"data source=bla bla bla"; | |
var selectQuery = "select * from my-table;"; |
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
protected string detecUser() | |
{ | |
return (HttpContext.Current.User.Identity.Name.Length > 0) ? HttpContext.Current.User.Identity.Name : System.Security.Principal.WindowsIdentity.GetCurrent().Name; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Tailwind Starter Template - Nordic Shop: Tailwind Toolbox</title> | |
<meta name="description" content="Free open source Tailwind CSS Store template"> | |
<meta name="keywords" content="tailwind,tailwindcss,tailwind css,css,starter template,free template,store template, shop layout, minimal, monochrome, minimalistic, theme, nordic"> |
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
declare @cod as INT | |
DECLARE @grupoArticulo AS NVARCHAR(MAX) | |
DECLARE @totalPack AS INT | |
DECLARE @SumUnidadesPak INT | |
DECLARE @SumtotalUnidades INT | |
declare CURSORITO cursor FOR (select id_orden_pedido_detalle,GRUPO_ARTICULO, totalPack FROM #temp_table_name) | |
open CURSORITO | |
fetch next from CURSORITO into @cod, @grupoArticulo, @totalPack |
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 bool AddressMailIsValid(string emailaddress) | |
{ | |
try | |
{ | |
MailAddress m = new MailAddress(emailaddress); | |
return true; | |
} | |
catch (FormatException) | |
{ | |
return false; |