191 Matching Annotations
  1. Last 7 days
    1. 在颜色为青、绿、碧色。

      说卦传中为“玄黄”!

    1. 指立秋起至秋分前

      这个已经在秋天了,要算也算长秋,算长夏有点说不运去,还是小暑到立秋之间比较好说。

    2. 古人将从立秋起至秋分前这段日子称之为“长夏”。

      不是说小暑到大暑这段时间吗?这里的说法就要该是个错误。

    3. 五季对应时间:春季2月4日至5月4日,夏季5月5日至7月6日,长夏7月7日至8月6日,秋季8月7日至11月6日,冬季11月7日至次年2月3日。

      这里说的是夏季(节气)最后一个月。这里是小暑到大暑。

    4. 五季对应时间:春季2月13日至4月25日,夏季5月14日至7月28日,秋季8月16日至10月28日,冬季11月16日至次年1月25日,长夏1月26日至2月12日、4月26日至5月13日、7月29日至8月15日、10月29日至11月15日。

      这个日期里面节气前后各9天,共18天作为长夏

    5. 《内经·素问·太阴阳明论》:“脾者土也,治中央,常以四时长四藏,各十八日寄治。”就是说脾主长夏,既每季的最后18天。

      此种说法中的长夏寄在四季之中。

    1. The CAI has many efforts on the horizon to create user-facing tools for collecting and attaching CAI metadata to content. One way to attach CAI metadata is through the Adobe Photoshop feature called Content Credentials (Beta). The feature is in ongoing development and is one of many ways content authenticity efforts are being brought to life. If you are interested in signing up for news and updates about CAI tools, please subscribe to our mailing list.

      当前工具PS在测试。以后应该会有别的工具。

    2. Our system doesn’t prevent anyone from taking a screenshot of an image, but we will indicate when we don’t have historical data for a file. If someone uses a screenshot in CAI-enabled tools, we wouldn’t include CAI metadata from the original file since there wouldn’t be any metadata retained.

      截屏和拍照后的照片就没了历史数据。如果拍照带CAI,那也没了原始的数据。

      截屏和拍照不能获取到原始的CAI数据。

    3. CAI is not enforcing digital rights management considerations around metadata. So, it's possible for individuals or applications to strip CAI data from an image, in which case fingerprinting techniques can be employed to re-attach CAI data.

      可以抹除cai数据,但可以用指纹技术绑定数据。

    4. Right now, a piece of content’s CAI data is stored locally within the file itself. Users will soon be able to choose whether they want to store the data by embedding it within the file, or store it in the cloud to avoid unnecessary file weight and optimize for recoverability.

      当前存在文件中,可以存到其他文件或者云中。

    5. then judge for themselves how authentic that image is

      由用户自己判断图片的真实性

    1. 内容凭据(测试版)当前仅提供英语版本。非英语用户仍可以访问英语版本的功能。

      我在软件里启用了该功能,还是不能用!

  2. Sep 2021
    1. I probably won’t be updating older articles using <use xlink:href="" /> unless something bizarre happens and some browser actually does pull support.

      是啊,也许有些应用,例如inkscape,例如svgedit 今天已经2021年9月了,它们依旧只支持xlink:href 而不支持href,这就是麻烦所在!

    1. Note: SVG 2 removed the need for the xlink namespace, so instead of xlink:href you should use href.

      但是inkscape支持xlink,不支持href!

    1. SVG <use> elements don’t currently have any way to ask for cross-origin permissions. They just don’t work cross-origin, at all.

      还没办法在SVG中使用Use跨域

  3. Aug 2021
    1. WHATWG取得HTML和DOM的控制权,W3C遵循

    2. W3C agrees to discontinue its release plans for W3C versions of HTML 5.3 and DOM 4.1

      w3c不再发布Html5.3和DOM4.1

    1. A quick alternative I tried, I am able to use npm-watch to simulate a 'hot-reload' by retriggering docfx build --serve when the file changes. Incase this will be useful for someone.

      使用npm-watch来查所实时加载

    1. Section definition

      使用Section定义,叫是会自动加入

      标签。对于中文用户段落缩进二格的话会造成困惑。

    1. A section definition works but it's kinda unwieldy - you have to add a > before every line. In the end I just added a plugin to do some post processing. I'll close this issue out as I found a workaround.

      使用plugin

    2. Add a blank line after <div class="foo" id="foobar">. That will end the HTML block; see CommonMark section 4.6 HTML blocks, item 6, and example 122. You may need a blank line after </div>, as well.

      在html标签下面加个空行,能重新识别标签。

    3. Yup, I understand that. However you cannot use markdown syntax inside html. That's part of what I want to be able to do

      可以使用html,但是html里面不支持markdown

    1. a numeric field right of the name: this is the amount of this nonlinear transformation.

      非线性函数的数量,这是什么意思,我还是没明白。

    2. But it has turned out that there are some categories of nonlinear transformations which are well understood. You can restrict the selection of nonlinear transformations by using these categories. Each nonlinear transformation can have one or more of the following categories

      将变换分类为

    3. Currently, there are about 800 nonlinear transformations included in JWildfire.

      已经有800种非线性变换了

    4. So, a good way of thinking about nonlinear transforms is that they add small details to otherwise more "straight" transformations like a rotation.

      因此,非线性变换是,它们向其他更“直接”的变换(如旋转)添加小细节。

    5. Please note that there is no transformation order. Swapping the positions of two transforms would not change the fractal, hence there are no buttons to change the positions of the transformation inside the table.

      Xform是没有顺序的,都是按权重的随机挑选。

  4. Jul 2021
    1. 16.3. Are 4k renders possible? Yes. You can literally render in any resolution, also 8k: by rendering a single image at once. The maximum render size is limited only by your available memory. (For really huge images, you may need patience too.) by using the Quilt-renderer-module you may render really huge images in smaller parts, which are then assembled together. The maximum render size is also limited by memory. But often, you will get other problems before reaching the memory limit in JWildfire. For example, some image files can be very big (I have tested with sizes up to 1 GB), and it is hard to find software that can process such large images.

      根据机器情况,支持4k以及8k。

    2. It is beyond the scope of this book to explain exactly how transformations work and how fractal flames are generated in general. If you are interested in the math behind fractal flames, a very good resource is the dissertation by Scott Draves, the inventor of the fractal flame itself: https://flam3.com/flame_draves.pdf Many of the actions described here are very intuitive to use, and allow you to create fractal artwork without knowing all of the processes involved (which are not too intuitive from an artist’s view.) Besides this users manual, I’m planning to write another book which will bring the two worlds of theory and practice together. I realize this will not happen right away, but sometime in the future.

      理论方面超出本手册的范围了。 作者说,在将来也许会写一本理论和实践相结合的书。 不过我觉得很难等到。

    1. 小米11 Ultra是目前小米旗下最好的高端旗舰机,也是当前手机市场7000以内最出色的旗舰机,其实力完全可以抗衡上万元的顶级旗舰。顶级性能、顶级屏幕、顶级拍照、顶级录像、超大容量电池、最新的机身材质等各种能堆的配置都堆了个遍,硬件参数上可以说做到了毫无短板,甚至手机市场没有一款机型的硬件配置可以与之抗衡。在外观设计上,小米11 Ultra同样博得满堂彩,超高辨识度、个性张扬的外观设计,以及陶瓷工艺,使得这款机型高端感很强,回头率很高。不过要注意,不太建议选购大理石特别版,因为情商高可以说是大理石,情商低可以说是地砖,加上了大理石纹理反而降低了质感,不如黑、白纯色版本高级。如果你想要最好的小米手机,或者想要7000以内综合性价比最高的手机,那么小米11 Ultra毫无疑问是最佳选择。不过目前由于高通骁龙888处理器的发热大功耗高、MIUI 12.5系统的优化适配不到位,实际体验有待提高。

      有点太重了,拿一会手都抽筋了,然后触模不是很灵敏。

    1. 1# 回复 举报 风达 发表于 2012-3-20 23:11:44

      这文章是2012年写的,9年前了!那时有些软件可能还没有,象JWildfile等。而APO(Apophsis3.0始终都没出现过),7X也差不多有7年没有更新了。

    1. It is that time when you can post your thoughts or ideas about new Apophysis. Yes, it is under its way Be warned though, the new major version number is not for nothing... Apophysis 3 will be a huge step forward.The most important thing is it will support layers. Every layer can be a flame, a background, a time-escaped fractal... and probably other types, too. A single design can have as many layers, as you can create.Isn't it fascinating? It's also one and the only moment when we can get rid of Delphi and scripting library - finally! It's in C++ with Qt4,which means it's portable and relatively easy for other coders to mess with it as they like.The main design is ready, skeleton code is up and running - now I need YOUR thoughts. Note I can't get all of them into

      这条信息是2012年的!!又过去了9年,新版在哪呢?

    1. 小米11Ultra这边搭载的是高通最新的旗舰机芯片骁龙888,同样采用的是5nm的工艺,性能来说绝对是目前除了苹果A14芯片以外的最强,在跑分上也是遥遥领先于华为的麒麟9000,只不过“火龙888”的这个称号是它的一个致命短板,整体的使用体验上来说,还是麒麟9000的华为要更胜一筹。

      什么意思,遥遥领先却被人家更胜一筹?

    1. 奇门遁甲盘中有九个宫位,我们在实际运用中只看八个宫位,中间的宫我们是不看的,奇门软件上,中宫也是空白一片,不包含任何的信息。八卦有八个,八神有八个,八门有八个,只有星是九个,中宫是天禽星。

      还有奇子也有九个

  5. Jun 2021
    1. In preparation for the upcoming mainnet release, the network ID of the testnet has been changed from 1 to 10.

      根据https://chainid.network/ id1为以太坊,10为Oeth,而100才是XDai!这10是怎么回事?

    1. All Bee v1.0 versions are incompatible with the v0.6 Swarm. Node operators who currently run nodes on the Swarm test network should not update to this version. This version is currently only rolled-out to the Swarm mainnet, to which node operators can operate fully-functional nodes when the BZZ token is circulating (after June 21st).

      该版本同测试网的不兼容,到6月21日上主网了才能用。需要BZZ代币。

    1. 而截至目前,Swarm已完成4200万元私募融资,V神在VHSG线上交流会上表示“近期,以太坊基金会将投入3000万美金用于协助Swarm底层技术升级”。

      真的假的?

    Annotators

    URL

    1. We are searching for a possibility to render HDRP projects with alpha. The current alpha channel is a grayscale interpretation of the full image an not a real alpha channel. So we are also searching for a solution for this.

      是不是在HDRP或URP下面根本就不能透明? 所以选项也取消了。

    1. Unity Recorder Transparent Background Tutorial

      在URP,新版Recorder中,我还是没有找到透明的办法。

    1. This property is not available when the selected Media File Format doesn't support transparency, or when Capture is set to Game View.

      在URP下面我还是没有找该选项!

    1. means they can be dragged and dropped into fields in the Inspector, or picked using the Object Picker next to an Object field.

      Object意味着可以在检查器里进行拖放。

  6. May 2021
    1. I had another Newtonsoft JSON package installed from https://github.com/jilleJr/Newtonsoft.Json-for-Unity and started to get the "Multiple precompiled assemblies with the same name Newtonsoft.Json.dll" error when compiling. If you look in "Library > PackageCache" you will most likely see a folder called "com.unity.nuget.newtonsoft-json@1.1.2" or something similar. Inside that folder is a README.md which I looked at. It had instructions for using the package. I replaced my jilleJr package in the manifest.json with "com.unity.nuget.newtonsoft-json": "2.0.0-preview" and everything is compiling again. It appears that Unity is now including Newtonsoft JSON in certain cases.

      试过了,还是没什么用。

  7. 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.

      为什么又把Dots,ECS放到一边了呢?

    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.

      怪不得Unity使用PlasticSCM,原来被它收购了。

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

      好象还有EOS,Solana

  8. 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项目。

  9. 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#.

      blender脚本只用Python,有本事可能可以使用C++,不支持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.

      学习Observable还是有好处的,有助理解JS和D3。

    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. 这款软件现在没有电脑版因此必须借助安卓模拟器才可以在电脑上运行。

      天天基金没有电脑版客户端

  10. Jan 2021
  11. 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月完成。

    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 结构

  12. 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.

      不是说10美元吗?为什么是1美元?

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

      全节点是修剪过的,但可以重构出归档节点

  13. Oct 2020
    1. for later resale

      可以resale,那说明名称是可用来购买的。但是文档中并没有说明怎么购买。

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

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

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

      直接输入?那么输入时没有被比对程序记录的吗?

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

      使用IdentityServer来授权和存储用户。

    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,以及一些应用函数。

  16. 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.

      支持任何强加密算法。

    Tags

    Annotators

    URL

    1. const cid = results[0].hash

      这一句运行有问题!undefined!

    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

      使用js-ipfs-http-client更小,并且控制一个已经运行的节点。

    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.

      失去Owner权限就失去了你的账号

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

      让Owner权限更加安全。

    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__() 代表类的构造函数

      Python标识符规则。

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

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

      “兴趣”果然是最大的动力

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

      200M已经不算算,升到700M都很容易。

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

      安装一个软件,带来19000个依赖!

    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.

      解释infer及相关情况。

    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.

      从TypeScript3.7开始,可以使用可选链

    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.

      使用infer

    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.

      环境Declare将变量引入到TypeScript,不会生成JS代码。用它告诉TypeScript编译器其它组件会提供一个变量。

    Tags

    Annotators

    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 ,以保证组件初始化时能带有数据,让组件初次渲染正常。

      Taro在初始化时会多一次渲染过程,并且第一次调用会因数据没有还出错。这种情况也出现在我的策略井字棋项目中。

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

      开启类型检查

  18. 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.

      comineReucers只是简化通用案例的应用函数。

    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

      可惜这个问题被关了。因此显得有点老。不过他的建议也不错。使用用JS的风格。

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

      这规则跟Taro冲突

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

      属性名以小写开头

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

      React组件命名以大写字母开头。

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

      这个命名方式值得参考

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

      从示例看出来,connect可以连接函数式组件,不仅仅是类组件。

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

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

      还是需要Provider哦

    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

      切片自动生成了reducer,动作类型和动作创建器。这样需要创建一个文件夹:slices

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

      Redux-Toolkit不再需要安装redux-thunk和redux-devtools-extension。

    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.

      使用了immer

    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 采用结构子类型。其含义是:两个类型,即使表示的业务含义大相径庭,只要结构上有从属关系,就是兼容的。(“等同”也是从属关系的一种)

      TS用结构子类型。不同于C#的名义子类型。

    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.

      Reducer规则2:必须是纯函数,不能用副作用。

    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.

      在这个教程里面没有教到比较新的Redux-Toolkit。但是基本是相通的。在其视频教程的第四节是介绍toolkit的。

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

      useEffect将几个功能给统一在一起了。

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

      使用了Immer库,意味着可以安全的返回不变的更新结果。

    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.

      所以说,有时候使用createSlice就同时有了createReducer和createActions.

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

      将todo逻辑转为切片

    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.

      整个App状态存在单个Store对象树。改变状态的只有action,一个描述发生个么的对象。然后reducer负责状态改变。

    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.

      新版TS能通过PropTypes推断类型,但是结果类型不大好用。

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

      同时使用Typescript类型和React.PropTypes没有多大价值。

    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

      在TS中,类型名和变量名不会冲突:每个词法作用域包含变量声明空间和类型声明空间。

    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.

      所有TS的类型都是Any类型的子类型。

    Annotators

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

      Promise是个内置对象。

    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

      Symbol不适用于new操作符。

    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.

      函数对象有个[[Call]]内部方法。还有内部构造函数。

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

      虽然有类(class)的定义,ECMAScript对象并不是像c++那样基于类的!

    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

      属性由键值标识。一个属性键值可以是字符串值或Symbol值。所有了字符串和Symbol值,包括空字串,都是有效的属性值。