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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="React Routes" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
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 synth = window.speechSynthesis; | |
const readText = ( | |
text = "FELICIDADES" | |
) => { | |
voices = synth.getVoices(); | |
event.preventDefault(); | |
let utterThis = new SpeechSynthesisUtterance(text); | |
var selectedOption = "Google espaรฑol de Estados Unidos"; | |
for (i = 0; i < voices.length; i++) { |
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" /> | |
<link | |
rel="stylesheet" | |
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css" | |
/> |
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 class EnumExtension | |
{ | |
public static string GetAttribute(this Enum enumValue) | |
=> enumValue.GetType()?.GetMember(enumValue.ToString())?.FirstOrDefault()?.GetCustomAttribute<DisplayAttribute>(false)?.Name ?? enumValue.ToString(); | |
} |
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
Show hidden characters
{ | |
"plugins": [ | |
"@babel/plugin-proposal-class-properties", | |
"@babel/plugin-syntax-dynamic-import", | |
"@babel/plugin-proposal-optional-chaining", | |
"@babel/plugin-proposal-nullish-coalescing-operator" | |
], | |
"presets": ["@babel/preset-react"] | |
} |
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
"scripts":{ | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "SET NODE_ENV=development &&nodemon index.ts", | |
"start": "node index.js", | |
"build": "tsc", | |
"postinstall": "npm run build" | |
} |
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
//IApplicationBuilder app; | |
using var appScoped = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope(); | |
ApplicationDbContext _context = appScoped.ServiceProvider.GetService<ApplicationDbContext>(); | |
UserManager<ApplicationUser> _userManager = appScoped.ServiceProvider.GetService<UserManager<ApplicationUser>>(); |
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
/** | |
* Convert form to json | |
* @param {Event} event evento del formulario | |
*/ | |
const FormToJson = async (event) => { | |
event.preventDefault(); | |
const data = new FormData(event.target) | |
const values = Object.fromEntries(data.entries()); | |
return values | |
} |
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 PaginationPartialModel | |
{ | |
public int ActualPage { get; set; } | |
public int Total { get; set; } | |
public int Qyt { get; set; } | |
public bool RenderOneInFirstPage { get; set; } | |
public string Url { get; set; } | |
public string IdToLoad { 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
var LoadPartialView = async (contentId, url) => { | |
const content = $(`#${contentId}`); | |
content.empty(); | |
content.append("cargando..."); | |
try { | |
const result = await fetch(url, { method: "GET" }); | |
content.empty(); | |
if (result.status === 200) { | |
content.append(await result.text()); | |
} else if (result.status === 400) { |
OlderNewer