Skip to content

Instantly share code, notes, and snippets.

View YhorbyMatias's full-sized avatar
🎯
Focusing

Yhorby Matias Heredia S. YhorbyMatias

🎯
Focusing
View GitHub Profile
USE MASTER
GO
DECLARE @DML nvarchar(MAX)
DECLARE @SQLShackIOStatistics TABLE
(
[I/ORank] [int] NULL,
[DBName] [nvarchar](128) NULL,
[driveLetter] [nvarchar](1) NULL,
SELECT
Convert ([datetime],
+ (Convert(Varchar , DatePart(year, createdDate ))) + '-'
+ (Convert(Varchar , DatePart(month, createdDate ))) + '-'
+ (Convert(Varchar , DatePart(day, createdDate ))) + ' '
+ (Convert(Varchar , DatePart(hour, createdDate ))) + ':00'
CREATE TABLE AzureTweets (
id int PRIMARY KEY IDENTITY,
createdDate datetime DEFAULT(getdate()),
tweettext varchar(512) SPARSE NULL,
sentiment Float NULL,
@YhorbyMatias
YhorbyMatias / .cs
Created September 20, 2018 18:56
Emotion
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}'.",
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
@YhorbyMatias
YhorbyMatias / homecontroller.cs
Created May 28, 2018 16:10
scrit recobrar pass
//
// GET: /Account/ForgotPassword
[AllowAnonymous]
public ActionResult ForgotPassword()
{
return View();
}
//
@YhorbyMatias
YhorbyMatias / RootLuisDialog.cs
Last active April 20, 2018 15:44
gist contiene codigo para serie didactica xamarin latino
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;
@YhorbyMatias
YhorbyMatias / gist:13f0ad6b4040c6d03b076f880df87879
Created February 6, 2018 23:39
Comando ASPNET CORE generar razor
dotnet restore
dotnet aspnet-codegenerator controller -name MoviesController -m Movie -dc MvcMovieContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
@YhorbyMatias
YhorbyMatias / welcome.cshtml
Created January 27, 2018 00:57
codigo de la vista
@{
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 January 27, 2018 00:57
Codigo del controlador
// Get: /HelloWorld/Welcome/
public IActionResult Welcome(string name, int numTimes = 1)
{
ViewData["Message"] = "Hola " + name;
ViewData["NumTimes"] = numTimes;
return View();