17 Matching Annotations
  1. Last 7 days
    1. Donations

      To add some other intermediary services:

      To add a service for groups:

      To add a service that enables fans to support the creators directly and anonymously via microdonations or small donations by pre-charging their Coil account to spend on content streaming or tipping the creators' wallets via a layer containing JS script following the Interledger Protocol proposed to W3C:

      If you want to know more, head to Web Monetization or Community or Explainer

      Disclaimer: I am a recipient of a grant from the Interledger Foundation, so there would be a Conflict of Interest if I edited directly. Plus, sharing on Hypothesis allows other users to chime in.

  2. Oct 2022
    1. Though I recommend using YUMI exFAT instead for more multiboot options and better ISO support.

      28102022 205419 6-301 R15. SL<br /> o Pointer for READ

  3. Sep 2022
    1. pointer: type: string description: A string containing a JSON pointer to the specific field within a received JSON body that caused the problem, e.g. '/data/attributes/title' to refer to the `title` property within the `attributes` object that is a child of the top level `data` object. example: /data/attributes/title
  4. Jul 2022
    1. Pointer receivers You can declare methods with pointer receivers. This means the receiver type has the literal syntax *T for some type T. (Also, T cannot itself be a pointer such as *int.) For example, the Scale method here is defined on *Vertex. Methods with pointer receivers can modify the value to which the receiver points (as Scale does here). Since methods often need to modify their receiver, pointer receivers are more common than value receivers. Try removing the * from the declaration of the Scale function on line 16 and observe how the program's behavior changes. With a value receiver, the Scale method operates on a copy of the original Vertex value. (This is the same behavior as for any other function argument.) The Scale method must have a pointer receiver to change the Vertex value declared in the main function.
  5. Apr 2022
    1. If a compiler cannotdetermine whether or not two pointers may be aliased, it must assume that eithercase is possible, limiting the set of possible optimizations.

      pointer alias 的 optimization block 怎么理解?

    2. The case where two pointers may designate the same memory location isknown as memory aliasing.

      什么是 memory alias?

    1. std::shared_ptr can be used when you need multiple smart pointers that can co-own a resource. The resource will be deallocated when the last std::shared_ptr goes out of scope. std::weak_ptr can be used when you want a smart pointer that can see and use a shared resource, but does not participate in the ownership of that resource.

      weak_ptr 的适用场景

    1. Always make a copy of an existing std::shared_ptr if you need more than one std::shared_ptr pointing to the same resource.

      如果要创建多个 shared_ptr,推荐的做法是什么?

    1. Second, don’t manually delete the resource out from underneath the std::unique_ptr.

      有什么误用 std::unique_ptr 的情况?

    2. Use std::make_unique() instead of creating std::unique_ptr and using new yourself.

      推荐的创建 std::unique_ptr 的方式是什么?有什么好处?

    3. Favor std::array, std::vector, or std::string over a smart pointer managing a fixed array, dynamic array, or C-style string.

      对于固定的 array,动态 array 和字符串,更推荐使用哪种类型?

    4. Because std::unique_ptr is designed with move semantics in mind, copy initialization and copy assignment are disabled. If you want to transfer the contents managed by std::unique_ptr, you must use move semantics.

      std::unique_ptr 可以使用 copy 初始化吗?

  6. Mar 2022
    1. A Smart pointer is a composition class that is designed to manage dynamically allocated memory and ensure that memory gets deleted when the smart pointer object goes out of scope.

      smart pointer 是什么?有什么好处?

  7. Feb 2022
    1. The final example shows that one cancompute the difference of two pointers within the same data structure, with theresult being data having type long and value equal to the difference of the twoaddresses divided by the size of the data type.

      如何计算两个 pointers 的差?

    2. if p is a pointer to dataof type T , and the value of p is xp, then the expression p+i has value xp + L . i,where L is the size of data type T

      指针运算如何进行?

  8. Nov 2021
    1. we see that whatwe call “pointers” in C are simply addresses. Dereferencing a pointer involvescopying that pointer into a register, and then using this register in a memoryreference.

      dereference pointer 在 assembly code 中如何实现?

    1. One of the best things about classes is that they contain destructors that automatically get executed when an object of the class goes out of scope. So if you allocate (or acquire) memory in your constructor, you can deallocate it in your destructor, and be guaranteed that the memory will be deallocated when the class object is destroyed (regardless of whether it goes out of scope, gets explicitly deleted, etc…).

      smart pointer 的原理是什么?