7 Matching Annotations
- Jul 2021
-
stackoverflow.com stackoverflow.com
-
x = -3 "++-"[x <=> 0] # => "-" x = 0 "++-"[x <=> 0] # => "+" x = 3 "++-"[x <=> 0] # => "+"
-
- May 2021
-
-
That image only contains 200 pixels horizontally, but the browser stretches it to 400px wide or even farther!Luckily, you’ll see there’s an easy “fix” there at the end: our old good friend the width attribute!<img src="example.gif", srcset="example.gif 200w" sizes="(min-width: 400px) 400px, 100vw" width="200" /* <=== TA-DA! */ class="logo">As long as you can specify the width attribute so it reflects the true maximum size of your largest image, you won’t run into this problem of having sizes make your image wider than it naturally should go.
-
- Mar 2021
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
A proposal to specify the path for bury with classes as values of a hash arg: {}.bury(users: Array, 0 => Hash, name: Hash, something: 'Value') # {user: [{name: {something: 'Value'}]} So all absent nodes could be created via klass.new
Didn't understand it at first, but now I think it's a pretty clever/decent solution.
Just a bit more verbose than one might like...
At first I had reservations about the fact that this requires you to pass a hash ... or rather, once you start using a hash as your "list", you can't just "switch back" to an array (a "problem" I've noticed in RSpec, where you have some tags that are symbols, and some that are hashes: you have to list the symbols first:
describe 'thing', :happy_path, driver: :chrome
):{}.bury(users: Array, 0, 'Value')
But I think that's okay in practice. Just use a hash for all "elements" in your list:
{}.bury(users: Array, 0 => 'Value')
-
-
en.wikipedia.org en.wikipedia.orgPyPy1
-
PyPy uses a technique known as meta-tracing, which transforms an interpreter into a tracing just-in-time compiler.
-
-
github.com github.com
-
richard.schneeman+no-recruiters@gmail.com
Tags
Annotators
URL
-
-
github.com github.com
-
var md = require('markdown-it')('commonmark');
first sighting: require(...)(...)
How would that work with import? Not as fluidly but...
import markdownIt from 'markdown-it' let md = markdownIt('commonmark')
-
- Feb 2021
-
github.com github.com
-
It is based on the idea that each validation is encapsulated by a simple, stateless predicate that receives some input and returns either true or false.
-