Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Yhorby Matias Heredia S. YhorbyMatias

🎯
Focusing
View GitHub Profile
View gist:ac422212b99df6315ffa87f48a3a9079
SELECT
Convert ([datetime],
+ (Convert(Varchar , DatePart(year, createdDate ))) + '-'
+ (Convert(Varchar , DatePart(month, createdDate ))) + '-'
+ (Convert(Varchar , DatePart(day, createdDate ))) + ' '
+ (Convert(Varchar , DatePart(hour, createdDate ))) + ':00'
View gist:cbbca55dad90bd60d3e19333f4aad3f6
CREATE TABLE AzureTweets (
id int PRIMARY KEY IDENTITY,
createdDate datetime DEFAULT(getdate()),
tweettext varchar(512) SPARSE NULL,
sentiment Float NULL,
View .cs
using System.Net;
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
// The sentiment category defaults to 'GREEN'.
string category = "GREEN";
// Get the sentiment score from the request body.
double score = await req.Content.ReadAsAsync<double>();
log.Info(string.Format("The sentiment score received is '{0}'.",
View gist:a875150805c2c2a3515821a553766a7a
FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
View homecontroller.cs
//
// GET: /Account/ForgotPassword
[AllowAnonymous]
public ActionResult ForgotPassword()
{
return View();
}
//
@YhorbyMatias
YhorbyMatias / RootLuisDialog.cs
Last active Apr 20, 2018
gist contiene codigo para serie didactica xamarin latino
View RootLuisDialog.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.FormFlow;
using Microsoft.Bot.Builder.Luis;
using Microsoft.Bot.Builder.Luis.Models;
using Microsoft.Bot.Builder.Resource;
View gist:13f0ad6b4040c6d03b076f880df87879
dotnet restore
dotnet aspnet-codegenerator controller -name MoviesController -m Movie -dc MvcMovieContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
View welcome.cshtml
@{
ViewData["Title"] = "Bienvenido";
}
<h2>Hola</h2>
<ul>
@for (int i = 0; i < (int)ViewData["NumTimes"]; i++)
{
<li>@ViewData["Message"]</li>
@YhorbyMatias
YhorbyMatias / controller.cs
Created Jan 27, 2018
Codigo del controlador
View controller.cs
// Get: /HelloWorld/Welcome/
public IActionResult Welcome(string name, int numTimes = 1)
{
ViewData["Message"] = "Hola " + name;
ViewData["NumTimes"] = numTimes;
return View();
@YhorbyMatias
YhorbyMatias / _Layout.cshtml
Created Jan 27, 2018
linea que debo saber para cambiar titulo pagina en Razor aspnet
View _Layout.cshtml
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">My Movie App List</a>