50 Matching Annotations
  1. Sep 2023
  2. Jun 2023
  3. May 2023
  4. Mar 2023
    1. Chunked encoding is useful when larger amounts of data are sent to the client and the total size of the response may not be known until the request has been fully processed. For example, when generating a large HTML table resulting from a database query or when transmitting large images.A chunked response looks like this:

      ```http HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding: chunked

      7\r\n Mozilla\r\n 11\r\n Developer Network\r\n 0\r\n \r\n ```

    2. ```abnf Transfer-Encoding: chunked Transfer-Encoding: compress Transfer-Encoding: deflate Transfer-Encoding: gzip

      // Several values can be listed, separated by a comma Transfer-Encoding: gzip, chunked ```

  5. Jan 2023
    1. And misunderstandings so easily occur here, when we're talking about encodings, but not those encodings, the other encoding, which is really charset. And it's especially hard because you can't visually tell the difference and in so many cases everything still works even though it is wrong.
  6. Nov 2022
    1. The btoa() function takes a JavaScript string as a parameter. In JavaScript strings are represented using the UTF-16 character encoding: in this encoding, strings are represented as a sequence of 16-bit (2 byte) units. Every ASCII character fits into the first byte of one of these units, but many other characters don't. Base64, by design, expects binary data as its input. In terms of JavaScript strings, this means strings in which each character occupies only one byte. So if you pass a string into btoa() containing characters that occupy more than one byte, you will get an error, because this is not considered binary data:
    2. If you need to encode Unicode text as ASCII using btoa(), one option is to convert the string such that each 16-bit unit occupies only one byte.
  7. Aug 2022
    1. 排查,log4j2配置 -> java vm option file encoding -> idea vm option file encoding 配置

    1. If you're using JavaScript for writing to a HTML Attribute, look at the .setAttribute and [attribute] methods which will automatically HTML Attribute Encode. Those are Safe Sinks as long as the attribute name is hardcoded and innocuous, like id or class.
    2. If you're using JavaScript for writing to HTML, look at the .textContent attribute as it is a Safe Sink and will automatically HTML Entity Encode.
  8. Jul 2022
    1. A decision takes place when the encoding of a cognitive selection triggers, upondecoding, an occurrence of a difference that is, a state change within the system [11 ].

      !- explanation : symbol-anchored encoding and decoding of cognitive selections

      • In other words, people think, imagine, conceptualize
      • and then encode that into live or recorded words
      • that are then heard or read by others (decoded)
      • and then a governance decisions subsequently results.
      • !- gloss : cognitive selection trigger
      • !- gloss : symbol-anchored encoding
      • !- gloss : decoding cognitive selection
  9. Apr 2022
    1. the brain stores social information differently thanit stores information that is non-social. Social memories are encoded in a distinctregion of the brain. What’s more, we remember social information moreaccurately, a phenomenon that psychologists call the “social encodingadvantage.” If findings like this feel unexpected, that’s because our culturelargely excludes social interaction from the realm of the intellect. Socialexchanges with others might be enjoyable or entertaining, this attitude holds, butthey’re no more than a diversion, what we do around the edges of school orwork. Serious thinking, real thinking, is done on one’s own, sequestered fromothers.

      "Social encoding advantage" is what psychologists refer to as the phenomenon of people remembering social information more accurately than other types.

      Reference to read: “social encoding advantage”: Matthew D. Lieberman, Social: Why Our Brains Are Wired to Connect (New York: Crown, 2013), 284.

      It's likely that the social acts of learning and information exchange in oral societies had an additional stickiness over and beyond the additional mnemonic methods they would have used as a base.

      The Western cultural tradition doesn't value the social coding advantage because it "excludes social interaction from the realm of the intellect" (Paul, 2021). Instead it provides advantage and status to the individual thinking on their own. We greatly prefer the idea of the "lone genius" toiling on their own, when this is hardly ever the case. Our availability bias often leads us to believe it is the case because we can pull out so many famous examples, though in almost all cases these geniuses were riding on the shoulders of giants.

      Reference to read: remember social information more accurately: Jason P. Mitchell, C. Neil Macrae, and Mahzarin R. Banaji, “Encoding-Specific Effects of Social Cognition on the Neural Correlates of Subsequent Memory,” Journal of Neuroscience 24 (May 2004): 4912–17

      Reference to read: the brain stores social information: Jason P. Mitchell et al., “Thinking About Others: The Neural Substrates of Social Cognition,” in Social Neuroscience: People Thinking About Thinking People, ed. Karen T. Litfin (Cambridge: MIT Press, 2006), 63–82.

  10. Aug 2021
    1. �Yes, but how will we ever keep track of such a large project?�

      Unsure of the text encoding here. I'm forcing them to be interpreted as Unicode here, hence the appearance of the replacement character. My browser's default is to treat this document as "Central European (Windows)", but in that case, they appear as majuscule and miniscule S-cedilla characters (e.g. Şhypertextş).

      By a reasonable guess, these are supposed to be open and close quotes. I've seen these appear in other TBL-authored documents from the same era.

    1. Vol. 29, No. 1, Winter/Spring 2018 (includes ΓÇ£Conferences,ΓÇ¥ ΓÇ£Symposium,ΓÇ¥ ΓÇ£Publishing items,ΓÇ¥ ΓÇ£Citations received;ΓÇ¥ memoriam for William Ittelson, written by John Hollander; book note of ΓÇ£An Anthropology of Landscape: The Ex-traordinary in the Ordinar;ΓÇ¥ book review by Thomas Barrie; essays by Barbara Erwine, Edward Relph, and Dennis Pohl; poems by Sheryl L. Nelms.)

      Encoding issues?

  11. Jun 2021
  12. Apr 2021
  13. Mar 2021
    1. o put it in the language of psy­chology, there are limits on the number of distinct concepts which we can manipulate cognitively at any one time, and we. are therefore forced, if we wish to get a view of the whole problem, to re-encode these items.1
  14. Dec 2020
  15. Nov 2020
    1. If you needed a literal { character in your markup, you could always do {'{'}. (This is how it's done in React.) Or you could do {, which is pleasingly easy to remember. Does there need to be some method of escaping beyond that?
  16. Oct 2020
    1. By default all content inside template strings is escaped. This is great for strings, but not ideal if you want to insert HTML that's been returned from another function (for example: a markdown renderer). Use nanohtml/raw for to interpolate HTML directly.
    1. Escaping is a subset of encoding: You only encode certain characters by prefixing a special character instead of transferring (typically all or many) characters to another representation.
    1. Yet it can be deceivingly difficult to properly encode (user) input

      They were talking about output encoding but then switched to input encoding? Did they really mean to say input encoding here?

    2. When processing untrusted user input for (web) applications, filter the input, and encode the output.
    3. Encoding is dependent on the type of output - which means that for example a string, which will be used in a JavaScript variable, should be treated (encoded) differently than a string which will be used in plain HTML.
    4. Escaping is a subset of encoding, where not all characters need to be encoded. Only some characters are encoded (by using an escape character).
    5. Encoding is transforming data from one format into another format.
    6. what's the difference between escaping and encoding
  17. mdxjs.com mdxjs.com
    1. Before MDX, some of the benefits of writing Markdown were lost when integrating with JSX. Implementations were often template string-based which required lots of escaping and cumbersome syntax.
  18. Jul 2020
  19. May 2020
    1. '

      because it's in YAML

      but this means you can't use any ' in the actual script line

      or you have to use different delimiters if you do

      bottom line is it makes it harder to write/include your script than simply creating a separate shell script file.

  20. Apr 2020
    1. What we actually want to do is to escape content if it is unsafe, but leave it unescaped if it is safe. To achieve this we can simply use SafeBuffer's concatenation behavior:
    2. Our helper still returns a safe string, but correctly escapes content if it is unsafe. Note how much more flexible our group helper has become because it now works as expected with both safe and unsafe arguments. We can now leave it up to the caller whether to mark input as safe or not, and we no longer need to make any assumptions about the safeness of content.
    3. A common mistake is to see those escaped angle brackets, and "improve" the helper by making everything html_safe:
    1. 1- Validation: you “validate”, ie deem valid or invalid, data at input time. For instance if asked for a zipcode user enters “zzz43”, that’s invalid. At this point, you can reject or… sanitize. 2- sanitization: you make data “sane” before storing it. For instance if you want a zipcode, you can remove any character that’s not [0-9] 3- escaping: at output time, you ensure data printed will never corrupt display and/or be used in an evil way (escaping HTML etc…)
  21. Jul 2019
  22. Oct 2018
  23. Sep 2016
    1. Formati aperti per i dati

      Per molti dei formati di questo paragrafo, nella gran parte dei portali italiani, c'è molto spesso una grave lacuna: non viene mai dichiarato l'encoding dei caratteri. Questa è una barriera veramente fastidiosa. Andrebbe indicata da qualche parte la necessità (penso ai CSV, JSON, XML, ecc.) di specificare sempre l'encoding e di preferire ove possibile l'UTF8.

  24. Jul 2016
    1. How we insist that the hateful language they hear from public figures on TV does not represent the true spirit of this country.

      This line does some work. On one level, it is red meat for colorblind white (and some non-white) liberals who require all black figures to be hopeful (I've discussed this more here: http://www.theatlantic.com/politics/archive/2015/08/between-the-world-and-me-book-club-not-trying-to-get-into-heaven/400271/).

      On another level, it is doing some inter-group communication or what Stuart Hall called encoding/decoding and what Mark Anthony Neal translates into "black code" when he talks about Hall's work through modern media cultures. Obama is signaling here that she has noted those who have directed racist, sexist, classist rhetoric at her family. She has taken note.

  25. Jun 2015
    1. h?Bb `mMbb?`THv +QmMi2` iQ i?2 T`2pBHBM; aBHB+QM oHH2v M``iBp2- r?B+? Bb 2bb2MiBHHvQM2 Q7i2+?MQHQ;B+H /2i2`KBMBbKĜ i?2 B/2 i?i i2+?MQHQ;v /`Bp2b ?BbiQ`vX