Run-Time Text Generation with T4 Text Templates
T4 template c#
Popular Posts
-
Kendo UI applying SUM in footer template kendo ui - KendoUI: Grid Summary values in Footer - Stack Overflow : ", footerTemplate:...
-
MVC grid example ASP.NET MVC Flexigrid sample - CodeProject : 'via Blog this'
-
A possible way of handling distributed transaction for multiple contexts without alleviation to MSDTC??? c# - Entity Framework - Using Trans...
Tuesday, December 19, 2017
Friday, November 17, 2017
Thursday, November 16, 2017
Saturday, November 11, 2017
Deploying an Angular CLI project using VSTS Build and Release - Seth Reid Blog
Step 1: Follow John Papa's steps except don't create a web config (keep it unticked)
https://johnpapa.net/deploy-angular-to-azure-vsts-angular-cli/
Step 2: add the web config based on this:
Deploying an Angular CLI project using VSTS Build and Release - Seth Reid Blog:
e.g. in the root folder of the app:
'via Blog this'
https://johnpapa.net/deploy-angular-to-azure-vsts-angular-cli/
Step 2: add the web config based on this:
Deploying an Angular CLI project using VSTS Build and Release - Seth Reid Blog:
e.g. in the root folder of the app:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AngularJS Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
'via Blog this'
Wednesday, November 8, 2017
Tuesday, November 7, 2017
Thursday, November 2, 2017
Wednesday, November 1, 2017
Angular fire auth
https://coursetro.com/posts/code/32/Create-a-Full-Angular-Authentication-System-with-Firebase
Monday, October 30, 2017
Saturday, October 28, 2017
Wednesday, October 25, 2017
Monday, October 23, 2017
Sunday, October 22, 2017
vscode deploy angular 4 app to azure - Google Search
vscode deploy angular 4 app to azure - Google Search
https://medium.com/@flu.lund/setting-up-a-ci-pipeline-for-deploying-your-angular-application-to-azure-using-visual-studio-team-f686c8f190cf
https://johnpapa.net/deploy-angular-to-azure-vsts-angular-cli/
https://medium.com/@flu.lund/setting-up-a-ci-pipeline-for-deploying-your-angular-application-to-azure-using-visual-studio-team-f686c8f190cf
https://johnpapa.net/deploy-angular-to-azure-vsts-angular-cli/
Saturday, October 21, 2017
ajax - How to support HTTP OPTIONS verb in ASP.NET MVC/WebAPI application - Stack Overflow
ajax - How to support HTTP OPTIONS verb in ASP.NET MVC/WebAPI application - Stack Overflow: "public class AllowOptionsHandler : DelegatingHandler
{
protected override async Task SendAsync(
HttpRequestMessage request, CancellationToken cancellationToken)
{
var response = await base.SendAsync(request, cancellationToken);
if (request.Method == HttpMethod.Options
Enable cors for Angular 4 otherwise when adding new record it will fail
{
protected override async Task SendAsync(
HttpRequestMessage request, CancellationToken cancellationToken)
{
var response = await base.SendAsync(request, cancellationToken);
if (request.Method == HttpMethod.Options
Enable cors for Angular 4 otherwise when adding new record it will fail
Wednesday, October 18, 2017
Tuesday, October 17, 2017
Wpf cross platform?
http://feeds.hanselman.com/~/460352386/0/scotthanselman~What-would-a-crossplatform-NET-UI-Framework-look-like-Exploring-Avalonia.aspx
Monday, October 16, 2017
Saturday, October 14, 2017
Sql server performance monitoring
http://feedproxy.google.com/~r/BrentOzar-SqlServerDba/~3/6oSYTZkTzYs/
Friday, October 13, 2017
Tuesday, September 26, 2017
Wednesday, September 13, 2017
Saturday, August 26, 2017
Monday, August 21, 2017
Refit as retrofit rest client libraray that works with interface
http://feeds.hanselman.com/~/436136948/0/scotthanselman~Exploring-refit-an-automatic-typesafe-REST-library-for-NET-Standard.aspx
Tuesday, August 15, 2017
Monday, August 14, 2017
c# - How to measure current size of .NET Memory Cache 4.0? - Stack Overflow
c# - How to measure current size of .NET Memory Cache 4.0? - Stack Overflow
Find the size of memory in memorycache with this hack
Find the size of memory in memorycache with this hack
Tuesday, August 8, 2017
Saturday, August 5, 2017
Configuration · etishor/Metrics.NET Wiki · GitHub
Configuration · etishor/Metrics.NET Wiki · GitHub:
'via Blog this'
Metrics.net influxdb nuget package that works!
'via Blog this'
Metrics.net influxdb nuget package that works!
Friday, August 4, 2017
Sunday, July 30, 2017
Installing application insights in iis
https://social.technet.microsoft.com/wiki/contents/articles/34449.iis-application-insight-integration.aspx
Monday, July 24, 2017
webgio/Rotativa: Rotativa, /rota'tiva/. Make Pdf from Asp.Net MVC. Available on Nuget https://www.nuget.org/packages/Rotativa
webgio/Rotativa: Rotativa, /rota'tiva/. Make Pdf from Asp.Net MVC. Available on Nuget https://www.nuget.org/packages/Rotativa
HTML to PDF based on the GNU project:
http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html
HTML to PDF based on the GNU project:
http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html
Saturday, July 22, 2017
JSONPlaceholder - Fake online REST API for developers
JSONPlaceholder - Fake online REST API for developers
using power shell to do a rest api call:
#Reading feeds from PowerShell team blog
$feeds = Invoke-RestMethod http://blogs.msdn.com/b/powershell/atom.aspx
#Filtering and Formatting results
$feeds | ForEach {
[PSCustomObject]@{
Title=$_.title;
Author=$_.author.name;
Link=$_.link.href;
Date=$_.published
}
} | ConvertTo-Json OR Format-List
using power shell to do a rest api call:
#Reading feeds from PowerShell team blog
$feeds = Invoke-RestMethod http://blogs.msdn.com/b/powershell/atom.aspx
#Filtering and Formatting results
$feeds | ForEach {
[PSCustomObject]@{
Title=$_.title;
Author=$_.author.name;
Link=$_.link.href;
Date=$_.published
}
} | ConvertTo-Json OR Format-List
Thursday, July 20, 2017
Monday, July 17, 2017
Saturday, July 15, 2017
Tuesday, July 11, 2017
Object Dumper
https://www.codeproject.com/Articles/1194980/How-to-Dump-Object-for-Debugging-Purposes-in-Cshar
Process bar css menu
https://www.codeproject.com/Tips/1194241/Pure-CSS-Salesforce-like-progressbar-Control
Saturday, July 8, 2017
Wednesday, June 28, 2017
Winform databinding in new way
https://www.codeproject.com/Articles/1193797/Postulate-WinForms-a-new-look-at-data-binding
Friday, June 16, 2017
Wednesday, June 14, 2017
Monday, June 12, 2017
Thursday, June 8, 2017
Goldcost
https://www.destinationgoldcoast.com/gold-coast-holiday-deals?utm_source=cadreon&utm_medium=facebook&utm_campaign=brand_launch2&utm_content=multi_product_hilton
Wednesday, June 7, 2017
Friday, May 26, 2017
Wednesday, May 24, 2017
dotnet-architecture/eShopOnContainers: Easy to get started sample reference microservice and container based application (Currently in ALPHA state, ongoing progress, accepting feedback and pull-requests). Cross-platform on Linux and Windows Containers, powered by .NET Core and Docker engine. Supports .CSPROJ with Visual Studio 2017 and also CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor
Saturday, May 20, 2017
JS Dump from VS Code:
function abc(id) {
var countriesSubscription = [
{ Exchange: 'ASX', CountryId: 1, ExchangeRate: 1, CountryName: "Australia", Code: "AU", CurrencyForeign: "AUD", CurrencyLocal: "AUD", IsSubscribed: true, PriceLocal: 15.75, PriceForeign: null, DataType: "ClickToRefresh" },
{ Exchange: 'ASX', CountryId: 2, ExchangeRate: 1.01, CountryName: "Canada", Code: "CAN", CurrencyForeign: "CAD", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'ASX', CountryId: 3, ExchangeRate: 5.78, CountryName: "Hong Kong", Code: "HKG", CurrencyForeign: "HKD", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'CHIX', CountryId: 4, ExchangeRate: 0.74, CountryName: "US", Code: "USA", CurrencyForeign: "USD", CurrencyLocal: "AUD", IsSubscribed: true, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'ASX', CountryId: 5, ExchangeRate: 0.67, CountryName: "France", Code: "FRA", CurrencyForeign: "EUR", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'CHIX', CountryId: 6, ExchangeRate: 1.37, CountryName: "Switzerland", Code: "CHE", CurrencyForeign: "CHF", CurrencyLocal: "AUD", IsSubscribed: true, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'ASX', CountryId: 7, ExchangeRate: 0.73, CountryName: "Belgium", Code: "BEL", CurrencyForeign: "EUR", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
];
countriesSubscription.forEach(function (element) {
if (element.CountryId === id) {
element.IsSubscribed = true;
return;
}
});
for (var index = 0; index < countriesSubscription.length; index++) {
var element = countriesSubscription[index];
console.log(element.CountryName + ' ' + element.IsSubscribed);
}
// Use map function
var result = countriesSubscription.map(function (element) {
return element.CurrencyLocal + " " + element.PriceLocal;
});
result.forEach(function (element) {
console.log(element);
}, this);
// reduce array of objects to dictionary
var countryDictionary = countriesSubscription.reduce(function (o, v) {
o[v.CountryId] = v;
return o;
}, {});
console.log(countryDictionary[1]);
console.log(countryDictionary[1].CountryName);
console.log(countryDictionary[2]);
console.log(countryDictionary[2].CountryName);
// Find index of element
Array.prototype.indexOfObject = function countriesSubscription(property, value) {
for (var i = 0, len = this.length; i < len; i++) {
if (this[i][property] === value) return i;
}
return -1;
}
var result = countriesSubscription.indexOfObject("CountryName", "Canada");
console.log(result);
result = countriesSubscription.map(function (e) { return e.CountryName; }).indexOf('Canada');
console.log(result);
console.log(countriesSubscription[result].CountryName);
// **** Array to group by Exchange ****
var groupByCurrency = countriesSubscription.reduce(function(all, item, index){
all[item.Exchange].push(item);
return all;
}, {CHIX:[], ASX:[]});
groupByCurrency.ASX.forEach(function(item){
console.log(item);
})
groupByCurrency.CHIX.forEach(function(item){
console.log(item);
})
// Custom function that loops and finds
countrySearch = function (array, callback) {
for (var key in countriesSubscription) {
if (callback(countriesSubscription[key])) {
return countriesSubscription[key];
}
}
}
var countryById = this.countrySearch(countriesSubscription, function(key){
return key.CountryId === 1;
})
console.log(countryById);
var countryByName = this.countrySearch(countriesSubscription, function(key){
return key.CountryName === "Australia";
})
console.log(countryByName);
var CountryBySubscribtion = this.countrySearch(countriesSubscription, s => s.IsSubscribed === false )
console.log(CountryBySubscribtion.CountryName);
}
abc(3);
Doing group by like in JavaScript using the reduce function, see:
var countriesSubscription = [
{ Exchange: 'ASX', CountryId: 1, ExchangeRate: 1, CountryName: "Australia", Code: "AU", CurrencyForeign: "AUD", CurrencyLocal: "AUD", IsSubscribed: true, PriceLocal: 15.75, PriceForeign: null, DataType: "ClickToRefresh" },
{ Exchange: 'ASX', CountryId: 2, ExchangeRate: 1.01, CountryName: "Canada", Code: "CAN", CurrencyForeign: "CAD", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'ASX', CountryId: 3, ExchangeRate: 5.78, CountryName: "Hong Kong", Code: "HKG", CurrencyForeign: "HKD", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'CHIX', CountryId: 4, ExchangeRate: 0.74, CountryName: "US", Code: "USA", CurrencyForeign: "USD", CurrencyLocal: "AUD", IsSubscribed: true, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'ASX', CountryId: 5, ExchangeRate: 0.67, CountryName: "France", Code: "FRA", CurrencyForeign: "EUR", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'CHIX', CountryId: 6, ExchangeRate: 1.37, CountryName: "Switzerland", Code: "CHE", CurrencyForeign: "CHF", CurrencyLocal: "AUD", IsSubscribed: true, PriceLocal: null, PriceForeign: null, DataType: "" },
{ Exchange: 'ASX', CountryId: 7, ExchangeRate: 0.73, CountryName: "Belgium", Code: "BEL", CurrencyForeign: "EUR", CurrencyLocal: "AUD", IsSubscribed: false, PriceLocal: null, PriceForeign: null, DataType: "" },
];
// **** Array to group by Exchange ****
var groupByCurrency = countriesSubscription.reduce(function(all, item, index){
all[item.Exchange].push(item);
return all;
}, {CHIX:[], ASX:[]});
groupByCurrency.ASX.forEach(function(item){
console.log(item);
})
groupByCurrency.CHIX.forEach(function(item){
console.log(item);
})
output:
CountryId: 5,
ExchangeRate: 0.67,
CountryName: 'France',
Code: 'FRA',
CurrencyForeign: 'EUR',
CurrencyLocal: 'AUD',
IsSubscribed: false,
PriceLocal: null,
PriceForeign: null,
DataType: '' }
{ Exchange: 'ASX',
CountryId: 7,
ExchangeRate: 0.73,
CountryName: 'Belgium',
Code: 'BEL',
CurrencyForeign: 'EUR',
CurrencyLocal: 'AUD',
IsSubscribed: false,
PriceLocal: null,
PriceForeign: null,
DataType: '' }
{ Exchange: 'CHIX',
CountryId: 4,
ExchangeRate: 0.74,
CountryName: 'US',
Code: 'USA',
CurrencyForeign: 'USD',
CurrencyLocal: 'AUD',
IsSubscribed: true,
PriceLocal: null,
PriceForeign: null,
DataType: '' }
{ Exchange: 'CHIX',
CountryId: 6,
ExchangeRate: 1.37,
CountryName: 'Switzerland',
Code: 'CHE',
CurrencyForeign: 'CHF',
CurrencyLocal: 'AUD',
IsSubscribed: true,
PriceLocal: null,
PriceForeign: null,
DataType: '' }
Thursday, May 18, 2017
Tuesday, May 16, 2017
Monday, May 15, 2017
. Net free code profiler
https://channel9.msdn.com/coding4fun/blog/Keeping-Track-of-Your-Codes-Preformance-with-CodeTrack
Gui windlg dump file debug
https://channel9.msdn.com/coding4fun/blog/Keeping-Track-of-Your-Codes-Preformance-with-CodeTrack
Sunday, May 14, 2017
Backup/Restore & configure Master/Slave in Redis - YouTube
Backup/Restore & configure Master/Slave in Redis - YouTube
nice redis master and slave and configuration and back up
nice redis master and slave and configuration and back up
Saturday, May 13, 2017
Friday, May 12, 2017
Thursday, May 11, 2017
Chrome extension c#
https://www.codeproject.com/Articles/1185723/Develop-Your-First-Google-Chrome-Extension-Using-H
Tuesday, May 9, 2017
Monday, May 8, 2017
Encription library as in ravebdb
http://feedproxy.google.com/~r/AyendeRahien/~3/TZJP-64f4FI/ravendb-4-0-full-database-encryption
Saturday, May 6, 2017
dyatchenko/ServiceBrokerListener: Component which receives SQL Server table changes into your .net code.
dyatchenko/ServiceBrokerListener: Component which receives SQL Server table changes into your .net code.
alternative to sql dependency for database notifications
alternative to sql dependency for database notifications
Wednesday, May 3, 2017
Tuesday, May 2, 2017
Thursday, April 27, 2017
Wednesday, April 26, 2017
Monday, April 24, 2017
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript
great online regex, my online account using gethub to login and save regex
great online regex, my online account using gethub to login and save regex
Token based login
https://www.codeproject.com/Articles/1183150/Securing-ASP-NET-Web-API-using-Custom-Token-Based
Thursday, April 20, 2017
Monday, April 17, 2017
Alternative to SmtpClient
http://www.infoq.com/news/2017/04/MailKit-MimeKit-Official?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=.NET
Friday, March 3, 2017
Tuesday, February 28, 2017
Monday, February 27, 2017
Filter array javascript
http://stackoverflow.com/questions/31831651/javascript-filter-array-multiple-conditions
Saturday, February 25, 2017
Logging JavaScript errors to your server side log - JSNLog
Logging JavaScript errors to your server side log - JSNLog
Log client side errors in server without much effors ... elmah or nlog
jsonlog
Log client side errors in server without much effors ... elmah or nlog
jsonlog
Sunday, February 12, 2017
Friday, February 3, 2017
Edit fiddle - JSFiddle
Edit fiddle - JSFiddle
Simple HTML table with template and jquery will populate the template with data ...
Simple HTML table with template and jquery will populate the template with data ...
ReAttach - Visual Studio Marketplace
ReAttach - Visual Studio Marketplace
VS extension that remembers the last debugging session and reattaches to it e.g IIS Worker process.
VS extension that remembers the last debugging session and reattaches to it e.g IIS Worker process.
Thursday, February 2, 2017
Wednesday, January 25, 2017
Monday, January 23, 2017
Store arrays in data attribute
http://stackoverflow.com/questions/8542746/store-json-object-in-data-attribute-in-html-jquery
Sunday, January 22, 2017
Thursday, January 19, 2017
Conditional check constraints
http://dpatrickcaldwell.blogspot.com.au/2009/05/conditional-check-constraints-on-sql.html?m=1
Sunday, January 15, 2017
Subscribe to:
Posts (Atom)