149 Matching Annotations
  1. Last 7 days
  2. Apr 2021
    1. In Unity 2020.1 and later versions, these preview packages won’t be listed in the Package Manager.


    1. t's almost like there are two separate factions within Unity, with one running this skunkworks DOTS project. The other is completely disinterested in this work being completed. Worrisome signs for ECS: - Removed from package manager - Did not get verified in 2020 - Is not on the official 2021 priority list - The items on the priority list are very much focusing on the GameObject workflow, even though DOTS versions were announced earlier.


    1. 密码子一般只编码20种,稀有氨基酸一般是在常见氨基酸的基础上修饰来的。


    1. Códice Software is the name of the company behind Plastic SCM, our flagship version control product. Códice has been acquired by Unity Technologies in August 2020.


    1. USDT已经在三条公链上发行了,分别是Omni-USDT,基于以太坊(Ethereum)的ERC-USDT,和基于波场(Tron)的TRC-USDT。


  3. Mar 2021
    1. As the context above shows, the value of a term definition can either be a simple string, mapping the term to an IRI, or a map.


    1. This version will only be compatible with 2020.2 and 2021.1. Starting from 2021.2, new features will strictly be available from the core product, and won’t be supported by the packages.

      在2021.1.0b8里面已经没有UI菜单了。而是在Windows菜单里多了UI Toolkit项目。

  4. Feb 2021
    1. So your answer is no. there might be a support for c++ (the source code indicates so) but no support for C#.


    1. As a newcomer to JS in general myself, I would encourage you to stick with Observable for a time. Observable’s helped me to understand how pieces of a script play together… to be able to see more clearly which elements can be separated out, which must stay together, etc. Hopefully you’ll also find that your knowledge of D3 will improve more rapidly by tinkering with it in Observable.


    2. 本页已经总结,见页面底部说明。 D3有很多资料,有些导到Observable,要重新设计主页。 D3肯定要用Observable作为它他的示例所在地。 有几个办法可以将D3从Observalble中拿出来。

    3. Copy-pasting code can mean very different things in different situations. I believe the source of frustration for many here is the desire to bring unfamiliar code into a familiar environment and tinker with it there. To that end, several community members have provided tutorials and examples for doing just that: Convert observable code to normal Javascript / David B. / Observable 3 Observable vs Regular Flavor Javascript / Carlos Sandoval Olascoaga / Observable 3 Learning from D3 in Action - in Observable / Tom MacWright / Observable


    4. I can wholeheartedly say that Observable is a better way to do it. We will absolutely not stop anyone from translating or making examples elsewhere, however we want to make it clear that bl.ocks.org 1 will continue in maintenance mode but will not be updated.

      澄清D3示例: 确定Observable是更好的办法,bl.ocks.or将不再更新。

    1. 这款软件现在没有电脑版因此必须借助安卓模拟器才可以在电脑上运行。


  5. Jan 2021
  6. Dec 2020
    1. 不可变引用 r1 和 r2 的作用域在 println! 最后一次使用之后结束


    1. 当持有堆中数据值的变量离开作用域时,其值将通过 drop 被清理掉,除非数据被移动为另一个变量所有


    1. We're pushing this data live as we process it, and will complete everything by early January.


    1. For the time being, if you need 3D UI for your project, our recommendation is to use UGUI, which we're making sure will work well alongside UI Toolkit.

      3D UI 还是建议 UGUI,可以跟UI Toolkit一起使用。

    2. We're still committed at maintaining that technology as long as necessary for users to transition to UI Toolkit.

      从Unity UI 转到 UI Toolkit

    1. pub struct Header<Number: Copy + Into<U256> + TryFrom<U256>, Hash: HashT> { /// The parent hash. pub parent_hash: Hash::Output, /// The block number. #[cfg_attr(feature = "std", serde( serialize_with = "serialize_number", deserialize_with = "deserialize_number"))] pub number: Number, /// The state trie merkle root pub state_root: Hash::Output, /// The merkle root of the extrinsics. pub extrinsics_root: Hash::Output, /// A chain-specific digest of data useful for light clients or referencing auxiliary data. pub digest: Digest<Hash::Output>, }

      substrate header 结构

  7. Nov 2020
    1. The starting price which is the minimum value is fixed at $1 (10 OVRTokens) with a 100% increment on the last bid value for every following bid.


    1. A full node can rebuild the entire chain with no additional input from other nodes and become an archive node.


  8. Oct 2020
    1. for later resale


  9. Sep 2020
    1. 另外,wallet.io将钱包成员加密后的私钥分别存储于香港,日本,新加坡等地区服务器,通过物理隔离确保资产安全。

    1. 这里的算法还是以手续费为0.2%计算!!而不是更新后的0.3%计算!

    1. 密码只用于直接输入,不存储、不传输,不存在于其它任何地方


  10. Jun 2020
    1. ASP.NET Core Identity for authenticating and storing users is combined with IdentityServer for implementing Open ID Connect.


    1. An object, on the other hand, refers to a block that follows the Merkle DAG protobuf data format.

      object是遵循Merkle DAG protofbuf 数据格式的block

    1. This client library implements the IPFS Core API enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.

      实现了IPFS Core API,以及一些应用函数。

  11. May 2020
    1. 但浏览器并没有小程序规范的组件与 API 可供使用,例如我们不能在浏览器上使用小程序的 view 组件和 getSystemInfo API。因此我们需要在 H5 端实现一套基于小程序规范的组件库和 API 库。
    1. 移植相对简单,将数据拷过去就差不多了。不过要注意如果原备份还运行的话Pear ID一样会有问题的。

    1. The actions that you take only affect your own IPFS node, not nodes belonging to your peers.


    2. the multicodec prefix in an IPFS CID will always be an IPLD codec.

      IPFS CID 总是使用IPLD codec

    3. Multiformats CIDs are future-proof because they use multihash to support multiple hashing algorithms rather than relying on a specific one.


    4. IPFS uses sha2-256 by default, though a CID supports virtually any strong cryptographic hash algorithm.





    1. const cid = results[0].hash


    1. Both the js-ipfs and js-ipfs-http-client libraries work in browsers, but each has some special considerations noted in their READMEs.


    2. js-ipfs-http-client is a smaller library that controls an IPFS node that is already running via its HTTP API. js-ipfs actually uses this library internally if it detects that another node is already running on your computer


    3. Whenever reasonable, we recommend the second method (interacting with a separate IPFS node via the HTTP API). Keeping the IPFS node in a separate process (even if it’s one your program spawns) isolates you from any stability problems with the node.

      建议使用独立节点,然后使用Http api。

    1. If your OWNER permission’s private key is exposed, you lose access permanently to your EOS account and its funds. There is no way back from this scenario.


    2. Keep the ACTIVE permission key in Scatter and use that for everything you can. Keep the OWNER permission key somewhere safe


    1. The core IPFS team maintain implementations in Golang and Javascript. Those are commonly referred to as go-ipfs and js-ipfs. The official binaries are built from the Go implementation.

      IPFS主要的实现有 go-ipfs 和 js-ipfs。官方二进制包使用go实现。

    1. 恢复初始设置后,设置不会自动保存。


    1. Python 中的变量赋值不需要类型声明。 每个变量在内存中创建,都包括变量的标识,名称和数据这些信息。 每个变量在使用前都必须赋值,变量赋值以后该变量才会被创建。 等号(=)用来给变量赋值。 等号(=)运算符左边是一个变量名,等号(=)运算符右边是存储在变量中的值。


    1. 像if、while、def和class这样的复合语句,首行以关键字开始,以冒号( : )结束,该行之后的一行或多行代码构成代码组。 我们将首行及后面的代码组称为一个子句(clause)。


    2. Python语句中一般以新行作为语句的结束符。 但是我们可以使用斜杠( \)将一行的语句分为多行显示,如下所示:


    3. 在 Python 里,标识符由字母、数字、下划线组成。 在 Python 中,所有标识符可以包括英文、数字以及下划线(_),但不能以数字开头。 Python 中的标识符是区分大小写的。 以下划线开头的标识符是有特殊意义的。以单下划线开头 _foo 的代表不能直接访问的类属性,需通过类提供的接口进行访问,不能用 from xxx import * 而导入。 以双下划线开头的 __foo 代表类的私有成员,以双下划线开头和结尾的 __foo__ 代表 Python 里特殊方法专用的标识,如 __init__() 代表类的构造函数


    1. 悉尼立体模型用google map看的时候要拉近等些时间才会出现。使用工具从google地图中提取数据。通过blender读出抓到的rdc格式文件。

    1. 驱使着樋口优克服这些困难,并不断持着续开发的真正理由是什么呢——“因为兴趣。”


  12. Apr 2020
    1. 200 megabytes is not that bad. I’ve seen it rise above 700 MB easily.


    2. end up with 19k dependencies by installing just one


    1. In the above code, we:state, that the FunctionType extends  (args: any) => anywe say that the FunctionReturnType is a conditional typeinside we declare the ReturnType and assign it with the return type of our function () => infer ReturnType results in assigning the return type to the ReturnType variablewe check if FunctionType extends  (...args: any) => infer ReturnTypeif the above condition is not met, we assign  any to FunctionReturnTypesince the above condition is always met, we assign the ReturnType to the FunctionReturnTypeBy doing all of the above, we can extract the return type of any function.


    2. Introducing the infer keyword

      介绍 infer关键字,待细究

    1. The most commonly used type parameter names are:E – Element (used extensively by the Java Collections Framework)K – KeyN – NumberT – TypeV – ValueS,U,V etc. – 2nd, 3rd, 4th types


    2. we can put a constraint on the T type variable.


    1. From TypeScript 3.7 and onwards, you can use optional chaining to simplify working with nullable types.


    1. Within the extends clause of a conditional type, it is now possible to have infer declarations that introduce a type variable to be inferred. Such inferred type variables may be referenced in the true branch of the conditional type. It is possible to have multiple infer locations for the same type variable.


    1. 对象属性的命名规则 通过[]操作符为对象添加属性时,属性名称可以是任何字符串(包括只包含空格的字符串和空字符串); 通过.操作符为对象添加属性时,属性名称必须是合法的标识符名称; 如果属性名包含非法的标识符字符,则只能采用obj[“propertyName”]的形式; 如果属性名是合法的标识符,读取时即可以采用obj.propertyName,也可以采用obj[“propertyName”]的形式;


    1. An ambient declaration introduces a variable into a TypeScriptscope, but has zero impact on the emitted JavaScript program.




    1. In addition to these development tool middleware, it also adds redux-thunk by default, since thunks are the basic recommended side effects middleware for Redux.

      redux-thunk 默认加入

    1. I'm a Redux maintainer and creator of Redux Toolkit. FWIW, nothing about making async calls with Redux changes with Redux Toolkit. You'd still use an async middleware (typically redux-thunk), fetch data, and dispatch actions with the results.

      Redux Toolkit作者说了,RTK并没有改变任何异步操作的调用。还是可以使用中间件(象redux-thunk)获取数据和分发结果动作。

    1. Taro 的组件编译后就是小程序的自定义组件,而小程序的自定义组件的初始化时是可以指定 data 来让组件拥有初始化数据的。开发者一般会在组件的 constructor 中设置一些初始化的 state,同时也可能会在 render 中处理 state 与 props 产生新的数据,在 Taro 中多出的这一次提前调用,就是为了收集组件的初始化数据,给自定义组件提前生成 data ,以保证组件初始化时能带有数据,让组件初次渲染正常。


    1. For example, noImplicitAny is a recommended option that triggers the compiler to error on expressions and declarations with an implied any type


  13. redux.js.org redux.js.org
    1. reducer: any function with the signature (state, action) -> newState (ie, any function that could be used as an argument to Array.prototype.reduce)root reducer: the reducer function that is actually passed as the first argument to createStore. This is the only part of the reducer logic that must have the (state, action) -> newState signature.slice reducer: a reducer that is being used to handle updates to one specific slice of the state tree, usually done by passing it to combineReducerscase function: a function that is being used to handle the update logic for a specific action. This may actually be a reducer function, or it may require other parameters to do its work properly.higher-order reducer: a function that takes a reducer function as an argument, and/or returns a new reducer function as a result (such as combineReducers, or redux-undo)


    2. irst and foremost, combineReducers is simply a utility function to simplify the most common use case when writing Redux reducers.


    3. functions should be relatively short and ideally only do one specific thing


    1. The current answers and the official documentation are outdated. And for those new to TypeScript, the terminology used isn't clear without examples. Below is a list of up-to-date differences.


    2. Both can be extended, but again, the syntax differs. Additionally, note that an interface and type alias are not mutually exclusive. An interface can extend a type alias, and vice versa


    1. 应用风格指南,值得参考的部分

    2. Redux itself does not care about how your application's folders and files are structured. However, co-locating logic for a given feature in one place typically makes it easier to maintain that code.Because of this, we recommend that most applications should structure files using a "feature folder" approach (all files for a feature in the same folder) or the "ducks" pattern (all Redux logic for a feature in a single file), rather than splitting logic across separate folders by "type" of code (reducers, actions, etc).


    1. 组件命名: 与文件名(除中缀外)完全一致。如果组件单独放置在目录中,则目录名也一致


    2. 。如果同一个文件夹下有同名而不同作用的js文件,则通过中缀(小写)进一步区分


    1. Any JavaScript style guide that is up-to-date for ES6 is going to cover nearly all TypeScript constructs except for type annotations, so I would start with your favorite JS style and decide on what you want the rules for type annotations to be


    1. JSX 的属性都采用双引号


    2. 属性名称始终使用驼峰命名法。


    3. 扩展名:React 组件使用.jsx扩展名;文件名:文件名使用帕斯卡命名。 例如: ReservationCard.jsx。引用命名:React 组件使用帕斯卡命名,引用实例采用驼峰命名


    1. 基于这个原因,我们推荐根据文件的上下文来命名文件,


  14. Mar 2020
    1. you can make the component a container component by wrapping it in a higher-order component returned by connect().


    2. react-redux包很简单,暴露了两个东西:Provider和connnect

    1. wrapping your entire application in a <Provider> component


    2. React Redux now offers a set of hook APIs as an alternative to the existing connect() Higher Order Component. These APIs allow you to subscribe to the Redux store and dispatch actions, without having to wrap your components in connect()

      React Redux提供的一些hook api可以用来替代connect高阶组件。用来订阅Redux Store和分发动作,而无需connect()

    1. Notice that none of these changed anything about how Redux works. We're still creating a Redux store, dispatching action objects that describe "what happened", and returning updated state using a reducer function. Also, notice that the Redux Toolkit functions can be used no matter what approach was used to build the UI, since they just handle the "plain Redux store" part of the code. Our example used the store with a "vanilla JS" UI, but we could use this same store with React, Angular, Vue, or any other UI layer.

      Redux Toolkit并没有侵入Redux。可以用在React,Angular,Vue和其它UI层。所以,我想,应该也可以用在Taro上面!

    1. A slice automatically generates reducers, action types, and action creators. As such, you'll only have to create one folder - slices


    2. And no longer requires you to install the redux-thunk or redux-devtools-extension dependencies.


    3. The ability to use direct state mutation, since RTK uses immer under the hood. This means you no longer need to return { ...state } with every reducer.


    1. the final source code structure looks like this


    2. The Redux Toolkit package is intended to be the standard way to write Redux logic. It was originally created to help address three common concerns about Redux:"Configuring a Redux store is too complicated""I have to add a lot of packages to get Redux to do anything useful""Redux requires too much boilerplate code"

      Redux Toolkit的用意是以标准方式编写Redux逻辑,帮助解决下面三个问题:

      • 配置store太复杂
      • 需要添加太多的包
      • 需要很多模板代码
    1. TS 采用结构子类型。其含义是:两个类型,即使表示的业务含义大相径庭,只要结构上有从属关系,就是兼容的。(“等同”也是从属关系的一种)


    1. To do that, the react-redux library comes with 2 things: a component called Provider, and a function called connect.

      react-redux带来两样东西: 一个叫Provider的组件 一个叫connect的函数

    2. Changes happen one way, and one way only: dispatch(action) -> reducer -> new state.

      改变是单向的: 分发动作->reducer->新状态

    3. Reducer Rule #2: Reducers must be pure functions.


    1. Redux has changed a lot. Redux toolkit has become the recommended way to use Redux and new codebases based on Redux toolkit will differ a lot from what you'll find in this tutorial. However the fundamental building blocks of Redux are still action, reducers, middleware, and the store. A good knowledge of these building blocks is required to be proficient with Redux and Redux toolkit. After reading this tutorial you can tune on this free Redux course of mine where I'll cover Redux toolkit in the near future.


    1. useEffect serves the same purpose as componentDidMount, componentDidUpdate, and componentWillUnmount in React classes, but unified into a single API


    1. This means you can write code that "mutates" the state inside the reducer, and Immer will safely return a correct immutably updated result.


    2. automatically handle all other action types by returning the current state


    3. in most apps, you won't need to use them yourself - createSlice is all you need.


    4. The first big step for rewriting the app is to convert the todos logic into a new "slice".


    1. return a function instead of an action


    1. { subscribe, dispatch, getState }.

      创建一个store用来保存状态,api中有 { subscribe, dispatch, getState }

    2. The shape of the state is up to you: it can be a primitive, an array, an object, * or even an Immutable.js data structure. The only important part is that you should * not mutate the state object, but return a new object if the state changes


    3. The whole state of your app is stored in an object tree inside a single store. The only way to change the state tree is to emit an action, an object describing what happened. To specify how the actions transform the state tree, you write pure reducers.


    1. Newer versions of TypeScript can now infer types based on your React.PropTypes (PropTypes.InferProps), but the resulting types can be difficult to use or refer to elsewhere in your code.


    2. There's usually not much value to maintaining both your component props as TypeScript types and React.PropTypes at the same time.


    1. Source files that contain no module importor exportdeclarations are classified as scripts


    2. no output is generated from declaration source files


    3. A parameterof a ConstructorImplementationmay be prefixed with a public,private, or protectedmodifier. This is called a parameter property declarationand is shorthand for declaring a property with the same name as the parameter and initializing it with the value of the parameter.For example, the declaration

      构造函数实现里的参数可以加上public private或protected修饰符。这叫做参数属性声明,声明了同名属性。

    4. A parameter property declaration may declare an optional parameter (by including a question markor a default value), but the property introduced by such a declaration is always considered a required property


    5. An interface can be named in an extends or implementsclause, but a type aliasfor an object type literal cannot.An interface can havemultiple merged declarations, but a type aliasfor an object type literal cannot

      类型别名和接口的区别: 接口可被继承和实现而类型别名不行。 接口可以有多个合并声明而类型别名不行。

    6. typeObjectStatics = typeofObject

      typeof Object得到的是字符串!但是前面加的是type时它得到的不再是字符串了,而是类型,这个typeof有双关性!

    7. Object types are composed from properties, call signatures, construct signatures, and index signatures, collectively called members.


    8. Instance and static membersin a classare in separate declaration spaces.


    9. n TypeScripttype names and variable names do not conflict: each lexical scope contains a variable declaration space and type declaration space


    10. Below are some examples of declarations that introduce multiple meanings for a name


    11. A variable, parameter,function, generator, member variable, memberfunction, member accessor, orenum memberdeclaration introduces a value meaning.An interface, type alias, or type parameter declaration introduces a type meaning.A class declaration introduces a value meaning (the constructor function) and a type meaning (the class type).An enum declaration introduces a value meaning (the enum instance) and a type meaning (the enum type).A namespace declaration introduces a namespace meaning (the type and namespace container) and, if the namespace is instantiated (section 10.1), a value meaning(the namespace instance).An import or export declaration introduces the meaning(s) of the imported or exported entity


    12. The example also illustrates thatan object type can match the type inferred from an object literal, as long as the object literal supplies all of the required members


    13. Programmers can give names to object types; we call named object types interfaces

      给对象类型名字,就叫接口。 也可以通过对象类型字面量方式指定。

    14. All types in TypeScriptare subtypes of a single top typecalled the Any type.



    1. A Promise is an object that is used as a placeholder for the eventual results of a deferred (and possibly asynchronous) computation.


    2. As described above, semicolons are not inserted at every newline, and automatic semicolon insertion can depend on multiple tokens across line terminators.


    3. is not intended to be used with the new operator


    4. The assign function is used to copy the values of all of the enumerable own properties from one or more source objects to a target object. When the assign function is called, the following steps are taken:


    5. in single or double quotes


    6. awaitbreakcasecatchclassconstcontinuedebuggerdefaultdeletedoelseenumexportextendsfalsefinallyforfunctionifimportininstanceofnewnullreturnsuperswitchthisthrowtruetrytypeofvarvoidwhilewithyield


    7. All ECMAScript function objects have the [[Call]] internal method defined here. ECMAScript functions that are also constructors in addition have the [[Construct]] internal method.


    8. Even though ECMAScript includes syntax for class definitions, ECMAScript objects are not fundamentally class-based such as those in C++, Smalltalk, or Java.


    9. An Object is logically a collection of properties. Each property is either a data property, or an accessor property


    10. Properties are identified using key values. A property key value is either an ECMAScript String value or a Symbol value. All String and Symbol values, including the empty String, are valid as property keys. A property name is a property key that is a String value


    1. Explore Dash Platform Name Service (DPNS)


    2. Phase 4: Prepare for Mainnet


  15. Jan 2020
  16. Apr 2019
    1. 可以随时打开侧边栏,对本站的内容进行加亮标注或者对某些内容进行留言。



    1. 我觉得 Hypothes的确很不错。可是为什么国内几乎很少有人在用呢?相关的文章也不多。

    1. From comments to annotations

      从评论到标注: Hypotheis已经超越评论系统。

      • 同步同一文章的不同拷贝。
      • 定位到特定的文本,而不是滚到底部。
      • 提供按组和私密标记。
      • 通过链接ORCID允许作者获得标注的信用值。
      • 允许匿名和笔名
      • 开放标准,框平台
    1. a specific segment of the resource


    1. Annotations can be considered an additional layer with respect to comments. Comments are published by the same publisher who hosts the original document. Annotations are added on top of that, but may eventually become comments which, in turn, may be integrated in a further version of the document itself


  17. Oct 2018
    1. 你执行的 Git 操作,几乎只往 Git 数据库中增加数据。 很难让 Git 执行任何不可逆操作,或者让它以任何方式清除数据。 同别的 VCS 一样,未提交更新时有可能丢失或弄乱修改的内容;但是一旦你提交快照到 Git 中,就难以再丢失数据,特别是如果你定期的推送数据库到其它仓库的话。


    2. 开头还有一空行


    3. 现在