blog
blog copied to clipboard
A personal blog
## Subscripts Classes, structures, and enumerations can define **subscripts**, which are shortcuts for accessing the member elements of a collection. For example, you access elements in an Array instance as...
## Methods **Methods** are functions that are associated with a particular type * `Instance methods`, which encapsulate specific tasks and functionality for working with an instance of a given type....
## For-In Loops > You use the for-in loop to iterate over a sequence, such as items in an array, ranges of numbers, or characters in a string. ```swift let...
## Closures > Closures can capture and store references to any constants and variables from the context in which they are defined. ### Three Form 1. ```Global functions``` are closures...
## Properties `Properties ` associate values with a particular class, structure, or enumeration. * Computed properties are provided by classes, structures, and enumerations. Stored properties are provided only by classes...
## Behavior Subject 和 Subject 的区别 > Behavior Subject is a type of subject, a subject is a special type of observable so you can subscribe to messages like any...
## Classes and Structures ### Concept > Classes and structures are general-purpose, flexible constructs that become the building blocks of your program’s code. You define properties and methods to add...
> `koa` 是由 TJ 利用 generator 开发的 web 框架。最近在写 koa的时候,顺便深入去了解 generator 与 co。 # Generator介绍 ```js function* gen(){ yield 1; yield 2; } var g = gen(); console.log(g.next());//{ value: 1,...
### Enumerations > An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code....
10.11 El Capitan中,需要拷貝override文件的地址變更為 /System/Library/Displays/Contents/Resources/Overrides 但是由於蘋果提升了系統安全性,用戶無法將文件拷貝入此文件夾(會出現禁止符號,沒有密碼提示)。 这是我之前的问题: 我的Mac由于工作需要,接入了一台超宽屏幕的外置显示器,分辨率是1560*1080.用的是Mini Display Port转Display Port接口,结果有一个问题。 什么都还好,就是字体十分发虚!网页上的字体还勉强,打开iwork编辑,字体只要小于12号根本没法看。 结果进入系统信息,发现这个显示器被mac识别为电视了!请看下图。 最后一项TV是yes。 请问如何让mac把它识别成显示器不是电视从而改善字体发虚的问题啊!网上的帖子都试过了无效,谢谢各路大神了! 解决方法: 这是因为Mac在识别显示器上不够智能,经常把显示器识别为电视,所以导致采用电视的渲染方式,使得字体模糊发虚。 所以我们要对显示器强制RGB渲染。 0.下載這個到你的Downloads文件夾 patch-edid.rb (1.49 KB, 下载次数: 1898) 1,打开终端,输入 cd Downloads ruby patch-edid.rb (这是一个命令,不要拆成两行来输入) 2,打开“下载”目录,你会发现多了一个文件夹(以我的为例:DisplayVendorID-5e3)...