Skip to content

Instantly share code, notes, and snippets.

View johncab1's full-sized avatar
💻
working

jonatan rodríguez johncab1

💻
working
  • México
View GitHub Profile
@johncab1
johncab1 / util.cs
Created April 25, 2021 20:24
Método que convierte una lista de KeyValuePair una entidad
///<summary>
///Convierte una lista de KeyValuePair una entidad
///</summary>
///<param name="kvpList">
///lista KeyValuePair
///</param>
///<param name="t">
///Entidad resultante
///</param>
///
@johncab1
johncab1 / ProyectTest.csproj
Created March 24, 2021 19:29
incluir web config en pruebas unitarias .NET 5
<!--Agregar estas lineas al csproj para copiar el contenido de App.config a testhost.dll.config -->
<Target Name="CopyCustomContent" AfterTargets="AfterBuild">
<Copy SourceFiles="App.config" DestinationFiles="$(OutDir)\testhost.dll.config" />
<Copy SourceFiles="App.config" DestinationFiles="$(OutDir)\testhost.x86.dll.config" />
</Target>
@johncab1
johncab1 / index.html
Created July 20, 2019 01:45
mostrar todas las peliculas de un mismo genero
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
table
{
position: fixed;
top: 10%;
}
@johncab1
johncab1 / index.html
Created July 12, 2019 04:00
crear tabla con datos XML - II
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<button onclick="readXML('datos/videoclub.xml')">Leer XML</button>
@johncab1
johncab1 / index.html
Created May 19, 2019 04:23
argumentos opcionales en funcion anonima javascript
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script src="jquery-3.3.1.min.js"></script>
param 1 <input type="text" id="param1"><br>
param 2 <input type="text" id="param2"><br>
@johncab1
johncab1 / index.html
Created March 19, 2019 02:06
cara en canvas
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="myCanvas" width="800" height="400" style="border: 1px solid #d3d3d3;">
your browser does not support the HTML5 canvas tag.
</canvas>
@johncab1
johncab1 / curvascuadraticas1.html
Created March 19, 2019 02:05
curvas cuadraticas en canvas
<!DOCTYPE html>
<html>
<head>
<style>
#myCanvas{border:solid black 1px;}
</style>
</head>
<body>
<canvas id="myCanvas" width="800" height="800"></canvas>
@johncab1
johncab1 / datos.json
Last active March 19, 2019 01:52
grafica de barras con canvas
{
"SQL": 10,
"Java": 8,
"C++": 7,
"C#": 5,
"PHP": 15,
"Ruby":10
}
@johncab1
johncab1 / controller.js
Created March 19, 2019 01:22
filtro que reemplaza una palabra en angularjs
var app = angular.module('app', []);
app.filter('filtro', function () {
return function ( original, reemplazo) {
var buscada = document.getElementById("buscada").value;
//var reemplazar = document.getElementById("reemplazar").value;
for (var prop in original)
@johncab1
johncab1 / controlador.js
Created January 27, 2019 04:46
Lista de comentarios en angular
angular.module("Modulo",[]).controller("MyController", function($scope)
{
$scope.nombre = "jonatan";
$scope.nuevoComentario = [];
$scope.comentarios = [
{
comentario: "Buena imagen",
username: "jon"
},
{