在azure上装FileZilla

https://stackoverflow.com/questions/39095900/install-ftp-application-filezilla-server-on-your-windows-azure-virtual-machine-v

基本可以参考上文,补充几点:

  1. 990端口不是必须的
  2. 14747端口本来是给ftp admin用的。本来默认就是只能本地配置,如果不开放远程,不需要用。文中用它来做ftp passive mode下server指定client连接执行指令用的端口,实际上可以用一个范围,比如50000-50255之类的。
  3. 这个范围除了azure network incoming rule之外,vm本身的系统防火墙incoming rule也要加。还有配置到fileZilla的passive mode setting里。缺一不可,否则能连上但是无法执行指令。
  4. don’t forget Passive Mode Settings’ Retrieve External Ip Address from.
  5. don’t forget the outbound rule for port 21, it’s crucial to keep the FTP connection alive.

remote desktop session中使用本地micro phone

  1. 右键点击rdp文件,编辑,在local resource, remote audio setting中确保如下设置。

2. 从start输入group policy,找到并Enable the Allow audio recording redirection Group Policy setting:

you must enable the Allow audio recording redirection Group Policy setting. The Allow audio recording redirection Group Policy setting is located in Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection

ref:https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd759231(v=ws.11)?redirectedfrom=MSDN

dumb view and smart view model

https://blog.bitsrc.io/building-reusable-angular-components-best-practices-744fff49e0d

这是一篇从SOLID principal中的SRP(单一职责原则)出发,描述把Component细分的过程的文章。

抛开它的主题,里面有些附带的思想也值得一记:

Presentational Component, 也就是View的唯一的Concern就是当输入的数据进来的时候展示出来,从这个conern来看,数据甚至应该是比较静态的,至少类型是不变,应对唯一的这种类型,View该如何展示,这就是它唯一的Concern。框架提供的tag很好地帮助了展示,底层基础仍是html。在wpf中,xaml就是这种Component,应该尽可能地dump.

而Container Component(这个名字不是很好)其实就是ViewModel,其实也包括了MVC里的Controller,或者MVP里的Presenter。现在则是Angular里的Component.ts.这是个Smart的Component

不过现代程序里的Component往往要和别的Component交互,所以Angular才定义了Output(事件EventEmitter),而这也影响到了View(Presentational Component)里,以attribute的形式。其实我觉得影响展示的attribute应该和用于事件交互的Attribute分开才对。一个简单的html template不是一个很好的载体。仍然有点违反SRP,还可以进一步细分。如果把事件描述从tag中抽出来放到一个专门的文件(类似designer.cs)并可以给一个html template apply多个事件描述集,就好比apply css style一样就好了。

另外,直接在Angular中设计一个Component应该也是有可能的,就是直接放到App.Component里,IDE如果有一个专门用于Desinger的Component,在双击某一个Component的时候打开Designer就好了。