Category Archives: TODO

【待整理】流媒体 Streaming media

  1. Ensure that the moov (metadata) is before the mdat (audio/video data). This is also called “fast start” or “web optimized”. For example, Handbrake has a “Web Optimized” checkbox, and ffmpeg and avconv have the output option -movflags faststart.
  2. Ensure that your web server is reporting the correct Content-Type (video/mp4).
  3. Ensure that your web server is configured to serve byte range requests.
  4. Ensure that your web server is not applying gzip or deflate compression on top of the compression in the mp4 file.

You can check the headers being sent by your web server using curl -I http://yoursite/video.mp4 or using the developer tools in your browser (Chrome, Firefox) (reload the page if it is cached). The HTTP Response Header should include Content-Type: video/mp4 and Accept-Ranges: bytes, and no Content-Encoding:.

From:

http://stackoverflow.com/questions/10328401/html5-how-to-stream-large-mp4-files

IIS负载均衡 Application Request Routing:

IIS Application Request Routing (ARR) 3 enables Web server administrators, hosting providers, and Content Delivery Networks (CDNs) to increase Web application scalability and reliability through rule-based routing, client and host name affinity, load balancing of HTTP server requests, and distributed disk caching. With ARR, administrators can optimize resource utilization for application servers to reduce management costs for Web server farms and shared hosting environments.

 

方案2、IIS Smooth Streaming IIS Media Services

Getting Started with IIS Smooth Streaming

http://www.iis.net/learn/media/on-demand-smooth-streaming/getting-started-with-iis-smooth-streaming

explaining IIS smooth streaming.

http://www.iis.net/learn/media

  1. Windows Media Services
  2. IIS Media Services
  3. Smooth Streaming
  4. Live Smooth Streaming
  5. Live Smooth Streaming Events
  6. On-Demand Smooth Streaming
  7. Streaming Media Conference Workshops
  8. Bit Rate Throttling
  9. Transform Manager
  10. Web Playlists

 

参考:

设置IIS支持Byte-Range

http://www.iis.net/learn/extensions/configuring-application-request-routing-(arr)/configure-byte-range-request-segment-size-in-application-request-routing

Apple

https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/CreatingVideoforSafarioniPhone/CreatingVideoforSafarioniPhone.html#//apple_ref/doc/uid/TP40006514-SW6

各流媒体的比较Comparison_of_streaming_media_systems

http://en.wikipedia.org/wiki/Comparison_of_streaming_media_systems

Application Request Routing 配置http://yanyangtian.blog.51cto.com/2310974/817136

Downloading and configuring the H264 Streaming Module for Internet Information Services IIS

http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Internet-Information-Services-IIS-Version2

 

【待整理】Type

Value Types and Reference Types

Types (C# Programming Guide) https://msdn.microsoft.com/en-us/library/vstudio/ms173104.aspx

类型系統http://zh.wikipedia.org/wiki/%E9%A1%9E%E5%9E%8B%E7%B3%BB%E7%B5%B1

【待整理】Insides Of Async / Await

 

Futures and promises http://en.wikipedia.org/wiki/Futures_and_promises

http://www.codeproject.com/Articles/660482/Insides-Of-Async-Await

有关async/await的实现背后

Best Practices in Asynchronous Programming https://msdn.microsoft.com/en-us/magazine/jj991977.aspx

【待整理】计算的本质

计算范式:

 http://www.absolutely-free-hosting.com/free_hosts_01.php

在计算这个问题上有两种范式,一种是计算理论的研究,侧重于从数学角度证明表达能力和正确性,比较典型的图灵机、lambda演算、pi演算这些都属于这个范畴。

另一种是计算模型的研究,侧重于对真实系统的建模和刻画,比如冯诺伊曼模型、BSP模型、LogP模型等等。

编程语言的切入点不同,同时可能会是两种范式之一或混合,比如 Lisp 更侧重于前者,C 更注重后者,而更多的语言都在寻求某种折衷。

题主可以看一看皮亚诺的自然数公理体系,最好结合着lambda演算一起看,很简单普适的模型,可以从这个角度去看计算。

另,在这个公理体系的基础上1+1=2,1+2=3是可以被证明的,皮亚诺给出了详细证明,邱奇数可以看作是在lambda演算的基础上建立起来的一个具体实现。

计算到底是什么,目前没有准确说法,人们连数学是什么也还有争论。就计算来讲,从图灵机和lambda算子看过去,就已经是两个世界了,更何况完备的计算模型远不止这两个。

计算模型:

  1. 图灵机
  2. Lambda算子

除了图灵机以外,人们还发明了很多其它的计算模型。包括:

机械计算的本质:

  数学基础或者逻辑基础:  布尔代数  0,1  

  任何有规律的输入,能够出现既定的输出。就可以作为计算设计的基础。

  比如电路  可以利用电子管晶体管集成电路实现

  那是否可以利用其他的物质     脑波、神经波、DNA状态转换、细胞状态变化…..   量子状态变化   其他自然现象等

  只要按照固定规律进行变化,给定相同的输入,一定出相同的输出。那是否就可以作为计算的基础。

四位计算机的原理及其实现

计算能力:

   但是计算能力最多等价于图灵机,能否超越图灵机?

多项式时间英语Polynomial time)在计算复杂度理论中,指的是一个问题的计算时间不大于问题大小的多项式倍数。任何抽象机器都拥有一复杂度类,此类包括可于此机器以多项式时间求解的问题。

以数学描述的话,则可说O,此为一常数值(依问题而定)。

http://zh.wikipedia.org/zh-cn/多項式時間

NP问题

   能否解决NR-hard的问题?解决的本质问题是什么

需要多项式时间内解决的

http://en.wikipedia.org/wiki/NP-hard

重要的复杂度类完整列表

易解复杂度类

DLOGTIME · AC0英语AC0 ·ACC0英语ACC0 ·L ·SL英语SL (complexity) ·RL ·NL ·NC英语NC (complexity) ·SC ·PP-完全 ·ZPP ·RP ·BPP ·BQP ·PolyL

怀疑难解复杂度类

UP · NPNP完全 ·NP困难 ·NP ·NP完全英语co-NP-complete ·AM英语Arthur–Merlin protocol ·PH ·PP ·#P#P-完全英语Sharp-P-complete ·IP ·PSPACEPSPACE完全英语PSPACE-complete

难解复杂度类

EXPTIME · NEXPTIME ·EXPSPACE ·ELEMENTARY ·PR ·R ·RE ·ALL

复杂度类的谱系

多项式谱系英语Polynomial hierarchy · 指数谱系 ·Grzegorczyk谱系英语Grzegorczyk hierarchy ·算术谱系

相关复杂度族

DTIME · NTIME ·DSPACE英语DSPACE ·NSPACE ·可能性核对证明英语Probabilistically checkable proof ·交互式证明系统

人工智能:

作为丹尼尔·丹内特的粉丝,我针对这个话题推荐《意识的解释》和《达尔文的危险思想》两本书。前者直接讨论了AI的问题,后者则从演化的角度讨论了我们人脑这个“AI”的诞生为何是可以想象的。但如果只想走马观花看看他的观点,《直觉泵及其他思考工具》很不错。

来自物理学角度针对AI的讨论则有彭罗斯的《皇帝新脑》,虽然我不太赞同他的观点,但他讲了很多有趣的东西。

如果你对侯世达的路线有兴趣,《集异璧》当然是必推的作品,他的后续作品同样值得一看。

与他的中文名字同样精彩的,是侯世达的成名作“Gödel, Escher, Bach: an Eternal Golden Braid”的译名——《哥德尔、埃舍尔、巴赫:集异璧之大成》。侯世达的这本书在英文世界里被简称为“GEB——取哥德尔(Gödel)、埃舍尔(Escher)、巴赫(Bach)的首字母,而中文则以“集异璧”应对。

有了图灵机的组合,我们就能够从最简单的图灵机开始构造复杂的图灵机。那么最简单的图灵机是什么呢?我们知道最简单的信息就是01而最简单的计算就是对01进行布尔运算。而布尔运算本质上其实就三种:与、或、非。从最简单的逻辑运算操作最简单的二进制信息出发我们其实可以构造任意的图灵机!这点不难理解:任何图灵机都可以把输入、输出信息进行01的编码,而任何一个变换也可以最终分解为对01编码的变换,而对01编码的所有计算都可分解成前面说的三种运算。也许,现在你明白了为什么研究计算机的人都要去研究基本的布尔电路。奥秘就在于,用布尔电路可以组合出任意的图灵机!

历史上有哪些智商逆天的天才?

http://www.zhihu.com/question/23228706

细胞自动机

http://zh.wikipedia.org/wiki/%E7%B4%B0%E8%83%9E%E8%87%AA%E5%8B%95%E6%A9%9F

康威生命游戏

http://zh.wikipedia.org/wiki/%E5%BA%B7%E5%A8%81%E7%94%9F%E5%91%BD%E6%B8%B8%E6%88%8F

Showcase your language one vote at a time [experimental challenge]

http://codegolf.stackexchange.com/questions/44680/showcase-your-language-one-vote-at-a-time-experimental-challenge

Mathematica 到底有多厉害?

http://www.zhihu.com/question/27834147/answer/38337425

Wolfram Alpha

http://zh.wikipedia.org/wiki/Wolfram_Alpha

http://www.zhihu.com/question/21726594

【待整理】Language

Language

BNF rules of LISP http://cui.unige.ch/isi/bnf/LISP/BNFindex.html

BNF http://cui.unige.ch/isi/bnf/

C#  http://slps.github.io/zoo/#Cs_4.0

EBNF Syntax: C# 1.0/2.0/3.0/4.0http://www.externsoft.ch/download/csharp.html

EcmaScript http://tomcopeland.blogs.com/EcmaScript.html

AST  http://blog.chinaunix.net/uid-26750235-id-3139100.html

Backus–Naur Form http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form

BNF and EBNF: What are they and how do they work?http://www.garshol.priv.no/download/text/bnf.html

 

编译器代码生成器YACC http://zh.wikipedia.org/wiki/Yacc

词法分析器生成器Lex http://zh.wikipedia.org/wiki/Lex

基于LL(*)算法实现的语法解析器生成器ANTLR http://zh.wikipedia.org/wiki/ANTLR

RFC 4234Augmented BNF for Syntax Specifications: ABNF

 

谈语法   http://www.yinwang.org/blog-cn/2013/03/08/on-syntax/

 

编译器系列:

第一部分:介绍
第二部分:编译、转译和解释
第三部分:编译器设计概览
第四部分:语言设计概述
第五部分Calc 1 语言规格说明书
第六部分:标识符
第七部分:扫描
第八部分:抽象语法树
第九部分:解析

自己动手开发编译器(零)序言   系列

 

lecture notes http://www.scs.stanford.edu/11au-cs240h/notes/

 

浅谈编程语言的类型系统http://blog.csdn.net/ce123_zhouwei/article/details/8976652