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
DECLARE @LAT VARCHAR(10) | |
DECLARE @LONG VARCHAR(10) | |
DECLARE @GEO2 GEOGRAPHY | |
DECLARE @LAT_B VARCHAR(10) | |
DECLARE @LONG_B VARCHAR(10) | |
SET @LAT='29.0' | |
SET @LONG='-95.612528' |
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
namespace LuceneExample | |
{ | |
#region Namespaces | |
using System; | |
using System.Globalization; | |
using Lucene.Net.Analysis.Standard; | |
using Lucene.Net.Documents; | |
using Lucene.Net.Index; |
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
https://docs.microsoft.com/en-us/aspnet/core/signalr/publish-to-azure-web-app?view=aspnetcore-3.1 | |
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-apps/?view=aspnetcore-3.1&tabs=visual-studio#deploy-aspnet-core-preview-release-to-azure-app-service |
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
declare @TableName sysname = 'TableName' | |
declare @Result varchar(max) = 'public class ' + @TableName + ' | |
{' | |
select @Result = @Result + ' | |
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } | |
' | |
from | |
( | |
select |
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
//source: https://www.codit.eu/blog/writing-tests-for-azure-event-grid/ | |
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"EventGrid.Topic.Name": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the custom Azure Event Grid topic" | |
} |
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
http://anthonygiretti.com/2018/09/06/how-to-unit-test-a-class-that-consumes-an-httpclient-with-ihttpclientfactory-in-asp-net-core/ |
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 StringExtensions | |
{ | |
private delegate bool TryParseDelegate<T>(string s, out T result); | |
private static T To<T>(string value, TryParseDelegate<T> parse) | |
=> parse(value, out T result) ? result : default; | |
public static int ToInt32(this string value) | |
=> To<int>(value, int.TryParse); | |
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
Here are the steps I followed to resolve the issue. | |
Right click on (load Failed) project and edit in visual studio. | |
Saw the following line in the Project tag: <Project Sdk="Microsoft.NET.Sdk.Web" > | |
Followed the instruction shown in the error message to add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to this tag | |
source: https://stackoverflow.com/a/44785842/1384539 |
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
Sometimes the root cause of HttpContext.Current null is the missing <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /> in the web.config |
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
Problem with Microsoft.Owin 2.0.1 | |
Update-Package Microsoft.Owin -Reinstall |