Archives
-
Sync Windows Live Writer Drafts and Posts Across PCs
Windows Live Writer saves drafts and posts under Documents\My Weblog Posts. To sync this directory with OneDrive, just move it to OneDrive (e.g. OneDrive\Documents\WindowsLiveWriter), and create a junction to redirect:
-
C# 6.0 String Interpolation, FormattableString, and Code Analysis CA1305: Specify IFormatProvider
C# 6.0 introduces a syntactic sugar string interpolation, it is safer and more readable than composite formatting. Here is a small example:
-
DiskPart Problem: Cannot Select Partition
When working with USB drive, the DiskPart command cannot select the partition of the USB disk:
-
Understanding C# Features (7) Higher-Order Function
[LINQ via C#] - [C# Features]
-
Understanding C# Features (6) Closure
[LINQ via C#] - [C# Features]
-
Entity Framework and LINQ to Entities (1) IQueryable<T> and Remote Query
The previous chapters discussed LINQ to Objects, LINQ to XML (objects), and Parallel LINQ (to Objects). All of these APIs query in memory objects managed by .NET. This chapter discusses Entity Framework, a Microsoft library providing a different kind of LINQ technology, LINQ to Entities. LINQ to Entities can access and query relational data managed by different kinds of databases, e.g.:
-
End-to-end: Setup continuous integration/continuous delivery for ASP.NET Core + SQL database with GitHub, AppVeyor and Azure
I have a web project “Chinese Etymology (http://hanziyuan.net)” for searching Chinese character’s etymologies and ancient Chinese characters. It is developed with Microsoft tech stack – ASP.NET Core + SQL database. It is open source on GitHub. Its database is deployed to Azure SQL Database, and the website is deployed to Azure App Service. I will use this project to demonstrate the end-to-end workflow and setup for continuous integration/continuous delivery with AppVeyor. After these steps, when you commit code and push to your repository
-
Easy Ways to Test SQL Server/SQL Azure Connection
It is incredibly easy to test the SQL Server/Azure SQL Database connectivity or firewall settings from Windows, even without SSMS (SQL Server Management Studio) or coding.
-
Detect Chinese Character in Unicode String
Recently, when trying to convert some directory/file names between Chinese and English, it is necessary to detect if a Unicode string contains Chinese characters. Unfortunately, Chinese language detection, or language detection, is not easy. There are several options:
-
Entity Framework and LINQ to Entities (7) Data Changes
Besides LINQ to Entities queries, Entity Framework also provides rich APIs for data changes.