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
using MyDBContext.Models; | |
using MyDTOs; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace MyManager | |
{ | |
public interface IInfoManager | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using MyDTOs; | |
using MyManager; | |
using Microsoft.AspNetCore.Mvc; | |
namespace MyApp.Controllers | |
{ |
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
string? fullname = person switch | |
{ | |
null => null, | |
(null, string lastname) => $"Señor/a {lastname}", | |
(string firstname, string lastname)=> $"{firstname} {lastname}" | |
} |
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
concept Bar{ | |
... | |
field k: Bool; | |
} | |
var x=Baz@{f=1, g=2, k=true}; |
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
(@[7, 8]) <~ (0=5, 3=1); //@[5, 8, none, 1] | |
(@[7, 8] <+ (@[5]); // @[7, 8, 5] |
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
//Functor | |
var a = List[Int]@{...} | |
var b = a.map[Int]( fn(x)=>(x+2); |
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
var Gpio = require('onoff').Gpio; | |
var LED = new Gpio(18, 'out’); | |
var ledInterval = setInterval(sayHello, 300); | |
function sayHello () { | |
if (LED.readSync() === 0) { | |
LED.writeSync(1); //se enciende | |
} else { | |
LED.writeSync(0); //se apaga |
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
@NgModule({ | |
imports: [ | |
RouterModule.forRoot(routes, { | |
onSameUrlNavigation: "ignore", | |
anchorScrolling:'enabled', | |
scrollPositionRestoration: 'enabled' | |
}) | |
], | |
exports: [RouterModule] | |
}) |
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
<a [routerLink]="['/mipaginaconAnchor']" fragmente="tuId"> Ir a mi anchor </a> |
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
const addConditions = async (context: any) => { | |
const formData = await context.request.body() as IReceivedConditions; | |
formMealsMenu(formData); | |
context.response.body = { message: 'OK' }; | |
context.response.status = 200; | |
} |