Ive been a dev for over 2 decades but I still cant grok bitwise operators - anyone have a reference that may help with that?
1 3 >> works in the same way 2 >> 1 = 1 because (0010 >> 1 = 0001) The other operators are exactly the same you'd find in electronics (and boolean algebra): ~ is the NOT operator & is the AND operator ^ is the XOR operator Sorry, I don't have a visual representation for this (I haven't looked for a link) but I would strongly suggest to write it down on paper and do some small exercises (checking with the result then…
Show HN: HN Avatars in 357 bytes
491–500 of 536 posts
Re: Show HN: HN Avatars in 357 bytes
#492Re: Show HN: HN Avatars in 357 bytes
#493Re: Show HN: HN Avatars in 357 bytes
#494Re: Show HN: HN Avatars in 357 bytes
#495Re: Show HN: HN Avatars in 357 bytes
#496Earlier quoted context omitted.
// ==UserScript== // @name HN icons // @namespace https://news.ycombinator.com/ * // @version 0.1 // @description try to take over the world! // @author some people on HN // @match https://news.ycombinator.com/ * // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { // Initial concept is from: https://news.ycombinator.com/item?id=30668137 (…
the header formatting is broken. You should make a think on pastebin instead
Re: Show HN: HN Avatars in 357 bytes
#497Earlier quoted context omitted.
Or even easier to make a userscript: https://openuserjs.org/
// ==UserScript== // @name HN Avatars in 357 bytes // @description Annotated avatars on all HN comments. // @author tomxor (https://news.ycombinator.com/user?id=tomxor) // @namespace https://news.ycombinator.com/item?id=30668137 // @include https://news.ycombinator.com/item* // @include https://news.ycombinator.com/user* // @grant none // @version 1.0.0 // ==/UserScript== [js goes here]