JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Feb 18, 2020 22:10
There is much worse forms of spam, let's be honest
Feb 18, 2020 21:58
I'm stealing all of these
Feb 18, 2020 21:54
Do you have more?
Feb 18, 2020 21:54
Wow that one is crazy
Feb 18, 2020 21:52
This is beautiful, in my opinion
Feb 18, 2020 21:52
I don't know why you shared that, but I love old maps
Feb 18, 2020 21:37
I totally forgot SO had chat
Aug 1, 2018 00:09
thanks rick
Aug 1, 2018 00:07
And I'm using many other dependencies from the same package
Aug 1, 2018 00:07
Babel is working well for me, it's not a new project
Aug 1, 2018 00:06
I wanted to make sure I'm not being stupid first
Aug 1, 2018 00:06
okay I will open an issue on the git repo
Aug 1, 2018 00:06
Yeah it's in a react project
Aug 1, 2018 00:04
`import * as ol from 'openlayers';

export default ol.interaction;`

Shouldn't I be able to just do `import interaction from 'ol/interaction'` where `'ol/interaction'` is the file/module /
Mar 4, 2018 00:27
It's not unreasonable to expect a situation where I might have to have unique objeccts that don't have IDs
Mar 4, 2018 00:27
What about if I had none, out of curiosity?
Mar 4, 2018 00:26
Yeah that's true
Mar 4, 2018 00:26
I could check against the ID, in this case, but I'm wondering about if I didn't have one
Mar 4, 2018 00:25
Not two instances of same object
Mar 4, 2018 00:25
Two objects with same props
Mar 4, 2018 00:24
I don't know what that is supposed to mean
Mar 4, 2018 00:24
That's what I'm trying to do
Mar 4, 2018 00:24
... damn
Mar 4, 2018 00:24
  albums: state => [...new Set(state.songs.reduce((acc, el) => acc.concat({
    cover: el.albumCover.match(/[^?]+/)[0],
    title: el.title,
    artist: el.artist,
  }), []))],
Mar 4, 2018 00:23
I'm making a vue app and in the vuex store I have a list of songs. The songs have data about the album and I'd like to be able to pull out the albums as a getter
Mar 4, 2018 00:22
Sure
Mar 4, 2018 00:21
but I would want something that would, in that case, come back as [{a:1}]
Mar 4, 2018 00:21
Sorry
Mar 4, 2018 00:20
So like [...new Set([{a:1},{a:1}])]
Mar 4, 2018 00:20
Objects
Mar 4, 2018 00:20
1 min ago, by Martin
Is there an easy way to get only unique objects from a list? [...new Set()] isn't working
Mar 4, 2018 00:20
I already said that isn't working lol
Mar 4, 2018 00:19
And .includes() doesn't seem to work for object literals
Mar 4, 2018 00:19
Is there an easy way to get only unique objects from a list? [...new Set()] isn't working
Feb 22, 2018 15:41
all you need is love
 
Nov 17, 2019 22:36
This is not a javascript question?
Nov 17, 2019 22:36
So this is a project written in cpan ?
Nov 17, 2019 22:03
Hey sorry one moment
Nov 17, 2019 21:21
yo
Nov 17, 2019 21:20
What template engine are you using?
Nov 17, 2019 21:20
Your <span class="decimal-price">[% monthly_price.0 %]</span> should probably refer to index 1 (but that doesn't explain why nothing shows up)
Nov 17, 2019 21:20
Why are you using .split if you want the full string?
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Feb 2, 2018 17:03
I have to peruse 5500 domains so I'd rather run them in parallel and have to restart my term every time I see a problem midway than run them syncronously
Feb 2, 2018 17:02
I'm okay with that
Feb 2, 2018 17:02
Gotcha
Feb 2, 2018 17:02
Or is this something that I'll have to deal with regardless, you think?
Feb 2, 2018 17:02
So I should try another method of running concurrent http requests
Feb 2, 2018 17:01
Oh
Feb 2, 2018 17:01
I'll fiddle with other progress bars
Feb 2, 2018 17:01
shrug