Edi Wang

All Posts 290


edi.wang 域名被端事件始末

针对这几天网站无法使用http://edi.wang的域名访问的事件,我对我们国家工信部的政策以及国内域名注册商的服务表示非常的愤怒和失望。特此记录,以警示各位想要注册域名,或者已经在国内服务商注册域名的站长。 强烈建议大家尽快把手头的国际域名转移到国外注册商(如Godaddy),以防突然有一天被不可描述了。 最新状态: [2017-4-19 07:50] edi.wang 域名状态为:OK,全球DNS恢复正常解析。 背景: edi.wang这个域名是2014年6月在时代互联(now.cn)注册的,因为当时它是国内唯一一家开放.wang域名的注册商。之前我也用过这家的服务,因为印象非常不好,所以也不是特别愿意选这家的,然而edi.wang这个3字符的域名必须得抓紧时间注册,才导致了后面一系列的坑爹。域名服务器用的是另一家国内知名的服务商:dnspod.cn,没有用时代互联的。...

Edi Domain DNS

Configure Continuous Delivery for ASP.NET Core Website on Azure

Today I am trying new DevOps tools in VS2017 and Azure, my goal is to automate the process from development to production for an exsiting ASP.NET Core project. I have encountered some issues, and with the help of Microsoft Support, I was able to solve them and share with you guys. First, there are two ways to configure CD for Azure Web Apps. I prefer create a website first, then configure it from...

Azure DevOps CI CD ASP.NET Core .NET Core

How to Save InkCavas to Image in Windows 10 UWP

The InkCanvas control in Windows 10 UWP is not like WPF where you can save as image file easily. If you want to save user ink to an image file, there's by far only one way to do it: 1. Install Win2D.UWP via NuGet into your project. PM Install-Package Win2D.UWP 2. Because we need to access user's picture library, so we need to apply the permission in manifest file. Select "Pictures Library"...

Windows 10 UWP

Azure Fire Alarm by Raspberry Pi and Windows 10 IoT Core

防火是日常生活中非常重要的意识,如果你是一只恩爱狗,出门在外,家里被FFF团点了,那真是太惨(hao)了。如果你恰好有Windows 10的设备,比如Lumia,Surface,能及时收到火警是至(mei)关(sha)重(luan)要(yong)的。今天就教大家如何用Microsoft Azure公有云+Windows 10 IoT Core在树莓派上实现一个远程火警系统。 阅读这篇文章,你需要的前置知识: Windows 10,UWP的基本开发能力 MVVM基础知识 ASP.NET MVC的基础知识 树莓派、GPIO及逻辑电路的基本知识(也就是大学里的计算机电路) Azure公有云的使用经验 ……当然,还要有对微软的信仰 一、设计原理 基本想法是,通过火焰传感器的输入信号,触发一个警报,把消息发送到Azure上的Notification Hub,这个服务是专门给Wind...

Azure Windows 10 IoT Raspberry Pi

Create QR Code in Windows 10 UWP

A year ago, I wrote an UWP application that can generate QR Code. However, at that time, the QR Code library I used was ZXing.Net, the last update for this package was in 2014. Now, time has changed, the author of ZXing.Net seems not to update the package any more. However, we have to move on, so I found a fantastic new library to generate QR Code in .NET applications: QRCoder To use that packag...

UWP QR Code

Merge Data for N-N Relationship Tables in T-SQL

最近在整理博客的数据,需要做一个操作就是合并文章的分类。我的博客中文章和分类是多对多的关系。即一篇文章可以属于多个分类,一个分类可以包含多篇文章。这是一个很典型的多对多关系,我用的是一个多对多的表,做联合主键关联这些数据。 就像这样: 我需要做的是把“DotNetBeginner”这个分类的文章移到“CSharpAndDotNet”分类里去。但是因为原先在“DotNetBeginner”里的文章有些也是属于“CSharpAndDotNet”的,所以直接Update关联表的话,会产生重复的联合主键,就会爆。 直观一点看,写个SQL语句查询出原分类(DotNetBeginner)和目标分类(CSharpAndDotNet)中的数据: DECLARE @SourceCatId AS UNIQUEIDENTIFIER, @TargetCatId A...

SQL SQL Server T SQL

Get system font and characters in Windows 10 UWP

There used to be a {x:Static Fonts.SystemFontFamilies} in WPF that can bind to system font list very easy. However, this is gong in UWP! How stupid it is! These days I wrote a character map UWP application, that would use system fonts, so I did some research. In order to get system font in UWP, we must use DirectX. Install these 3 NuGet pacakges into your project: "SharpDX": "3.0.1", "Sharp...

Windows 10 UWP DirectX

How to Remove ListView Default Selection in Windows 10 UWP

A lot of people including me has encounter a problem where on UWP apps, if a ListView control is being data binded, it will get a default selected item like this: It not only will display as selected item, it also fires SelectionChanged event. However, if we want to make ListView clickable, a popular way is to write the SelectionChanged event handler like this: private void StationsList_OnSele...

Windows 10 UWP

How to make a modal progress dialog in Windows 10 UWP

Windows 10 Mobile上的文件管理器有这样一个进度指示器,它是一个模态框,不带任何按钮,只有进度条和文本: 今天我琢磨了很久,绕了一些弯路,发现其实要做一个这样的模态进度指示器很简单。只要用ContentDialog就行。 平时我们用ContentDialog有些思维定势,就觉得这个对话框一定要提供按钮给用户操作。其实它是可以不设置任何按钮的,这样就有了初步的雏形: XAML C# private async void BtnSitAndRelax_OnClick(object sender, RoutedEventArgs e) { // show progress await ModalProgressDig...

Windows 10 UWP

UWP App for the Raspberry Pi Azure Surveillance Camera

I wrote a post about Raspberry Pi Surveillance Camera with Linux and Azure, it was using an ASP.NET website for displaying the photos. I made an UWP client App these days, you can download from here https://www.microsoft.com/store/apps/9nblgggzfnv0 (Because WP is already finished, so I don't provide Windows 10 Mobile package) It doesn't allow upload photos, because the photos should all come f...

MVVM PIN Microsoft Passport Binding