« first day (2853 days earlier)      last day (2320 days later) » 

04:00
No that couldn't make sense because the JS could load right away and then add the CSS, which would still be render blocking. Right? I don't know how that would work, if a script were added to the head after the body had started rendering
@Alesana No, because it's only a trick
He didn't improve on the situation, he simply squelched the warning
Right that's what I thought
@MadaraUchiha do you understand the concept of quantizing data (d3)?
@SterlingArcher You mean using a quantize scale?
Or something else?
yas
scaleQuantize specifically
04:07
±, we used it a couple of times, what's up?
But then I thought maybe if the CSS file was prepended to the head it would be added above where the browser was rendering, and maybe it would wait until it had rendered everything to load the CSS file. That's not the case?
Well, I have a dataset of 301 time points, this coincides with a data series of matching size.
this.x = scaleQuantize();
this.x.range([0, width - 1]); // width of canvas
if (data.time) {
      console.log('updating domain')
      this.x.domain(data.time); // 301 time points
}
Now, when I log console.log(this.x(data.time[i]), data.time[i]), I only get the maximum width
it's not scaling, so even though I quantized the domain, every point hits the max (and the axis and domain update as the time cycles)
Maybe I'm not understanding the concept
Ideally I'd like to group the data into X chunks of time (like 15 minutes)
How does data.time look like?
Right, because that's not how it works
You map from range to domain, and not the other way around
04:11
So I'm mapping from domain to range?
quantize scale gives you a way to take a continuum and map it to a discrete set of values
You want the opposite
you mean like
You want to take one of 301 points, and map it to a continuous scale (a coordinate)
var color = d3.scaleQuantize()
    .domain([0, 1])
    .range(["brown", "steelblue"]);

color(0.49); // "brown"
color(0.51); // "steelblue"
this.x.range(data.time)
this.x.domain([0, width])
?
No, you don't want a quantize scale at all, if I get your meaning
You're trying to give it a point, and get an x coordinate in pixels out of it, yes?
04:14
Well, maybe I'm getting XY here
I think you want a linear scale.
The domain being [Math.min(...data.time), Math.max(...data.time)] and the range being [0, width - 1]
Well to get the proper time x axis I need to do scaleTime, but then I have all these data points that don't group to the number of ticks in the chart
Ah, I think I understand
You want to force the points to be uniform?
To round their position to the closest tick?
04:17
That's exactly what I'm trying to do
You can technically do this with quantize
But you'll need to build the range yourself
I'm trying to think of a better way
this.x.range(Array.apply(null, { length: width - 1 }).map(Number.call, Number));
:P
// more like
.range(Array.from(Array(data.time.length), (_, i, arr) => (width - 1) * i / arr.length))
But yeah
i have a flex container with a column flow. each item in the column is a flex container with a row flow. when i add a div's the each inner flex container's div's and set the height to 100%, it takes of 100% of the height of the root flex container, not the flex container that this div is a child of.
You could also use a normal linear scale, and abuse .ticks
04:23
it seems that the grandchild div's height is a percentage of its grand parent's div. why is this? is it a feature of the nested flex boxes?
So average the numbers together into a data point?
hello javascript people do we have a proper modulo yet in javascript? one that doesn't give fucking negative numbers for negative input?
@SterlingArcher Pretty much
That's an interesting approach
abusive for sure
@david I'm fairly sure that's how modulo works everywhere
!!> 7 % -2
04:26
@MadaraUchiha 1
!!> -7 % -2
@MadaraUchiha -1
!!> -7 % 2
@MadaraUchiha -1
@david Yup, that's the behavior in Java too
And I'm almost sure you'll find that it's similar in C as well
04:30
@MadaraUchiha With that object manipulation, that wouldn't be possible if I were to make my module.exports into a function that returns an object would it?
@Alesana In that case, you can do one of several things
You either export the concrete object as well, and export a function that returns it or a variant thereof
Or you add a parameter to the function which is a callback that allows the consumer to manipulate the resulting object
Something like
generateWebpack(env, (result, env) => ({...result, whatever: env.whatever}));
Hmm, that seems like the way to go
my config is becoming a mess haha
04:46
@MadaraUchiha I think I've got it figured out, I just now need to figure out how to set a better range instead of a data point per width pixel :)
05:29
@towc do you think it’s possible to write a convincingly accurate and fast raycaster (2d - illumination with fog of war) using canvas globalCompositeOperations ?
I am thinking along the lines of using a white circle on a black image and then use a gCO to quickly compute the height map comparisons then just threshold the output. And use it as a mask on the output.
05:44
@david Nope :(
@MadaraUchiha The positive modulus is also well-defined, see en.wikipedia.org/wiki/Euclidean_division
Quick question, just to make sure. If I have method that returns a Promise that runs in the then section of another promise, the then I use after that, will be resolved with the inner Promise, right? ie something like firstPromise.then(firstPromiseArgument => getMySecondPromise(firstPromiseArgument)).then(/* is the parameter here secondPromiseArgument? */ console.log);
I don't even know if those are the correct terms but I hope you know what I mean.
06:11
Yes it is :)
06:45
@copy In math, sure
But in programming languages, it's generally more practical to have negative modulo for negative numerators
07:12
@copy lmao the website you linked in the morning was a super fun read
are videos crazy too?
07:47
How is the thing called that automatically generates html based on for example this ´div.container>ul.list-group>li.list-group-item´
emmet?
that's it. Thank you :)
hi
how can I create a fixed size 2d array
I want something like [i][2] //2 is the size i can be dynamic
js does not support that but you can provide a function that creates a 2D array based on the dimensions M and N
there, create an array with size M. Then for each element, add new array with size N
by this you have a matrix. Then you can do arr[1][3] eg
a note, however - there is no need to init sizes in js
as in it will not increase performance
you will still be able to add items beyond those bounds
07:58
true that
My co-worker still tries to use new Array(5)
what about
var myArray = [[]];
@Breathing For what purpose?
There are specific cases where this is possible and encouraged, but I doubt yours is one of those cases
(I mean cases like creating a buffer for graphic contexts, for example)
@ShrekOverflow I don't think so. But if there's some clever maths involved, you might as well use webgl
08:25
can this pattern be reduced in something smaller? "%|%" ?
I need to replace "% and/or %"
meh. Silly question.
won't that be just... "%"?
optionally with a /g
uhm no
those quotes are confusing but i meant
if string is %"hello then it becomes Rhello where R is the replacement string
or hello"%, that becomes helloR
%"hello"% then becomes RhelloR
08:41
oh thats what you mean
@KarelG thank you
@KarelG anything less wouldn't be expressive enough, I think
yeah, that is why I said that it's a silly question
@MadaraUchiha nvm I figured it out
one question though
will that supposed 2d array work with includes?
*Array.include
you are looking at this wrong
you will not have a 2D array construct
it will work like a 2D array
but it will be array objects inside an array
08:46
yeah I get that
so assuming your base array is X, then X.includes() will only search for arrays, not things inside those arrays deeper down
ah
that was what I was asking
got it! :)
you have to do matrix.includes(r => r.includes(...));
if you are working with matrices, best to use api or wrap those in functions for re-usability
^
or modify prototypes (actually don't do that, but its a possibility)
if you want a prototype thing, use a class for that
then it is more easier
09:03
@KarelG p.s. its "easier" or "more easy", but not both :)
09:15
@KamilSolecki Much more easier.
More better too.
@KarelG We've had that discussion yesterday
You really don't want to get into that part of the specs by extending Array.
52
Q: We-are-not-a-code-writing-service comments. Are they the good, the bad or the ugly?

Yvette ColombThere's a lot of "We are not a code writing service" comments being flagged. The flag rate for them is increasing and there's now some custom flags complaining about users who write this in their comments frequently. What are the expectation of the community of how these flags are handled? Are...

What a fucking mess
I just had to look at the picture only to know who posted that :P
It's hard to tell whether people are being sarcastic or genuine anymore
Hi! Welcome to Stack Overflow! You are very welcome to be here, we love having your here. It's just your question that we are having troubles welcoming, because we are not a code writing service. So you are welcome and we welcome you, please feel that you are welcomed, but your question is going to get closed and deleted. — Davy M 14 hours ago
This sounds sarcastic as fuck
it is
@BenFortune Was it the fifth or sixth usage of the word "welcome" that gave it away?
09:20
You sure?
@MadaraUchiha I honestly don't know anymore
Yeah, it's sarcastic
node js developer here experts in socket programming?
@user1hjgjhgjhggjhg Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
09:41
Maybe there should be some emphasis to that message, like If you have a question, just post it, and if anyone's free and interested they'll help.
you're forgetting a detail: IF YOU HAVE A QUESTION, JUST POST IT, AND IF ANYONE'S FREE AND INTERESTED, THEY'LL HELP.
that is too much D:
can we underline?
@KamilSolecki @KarelG Thank you! :)
I used *some* though :)
10:01
Hey peeps, any questions for me right now?!
Alright, cool deal, I'll be back later if you have any questions, just keep em saved up for my return
@TravisWhite hey trav are you white?
irrelevant question?
Can all questions be answered with another question?
@TravisWhite you don't get to pick
i was trying to make a joke.. cause your name is ... Travis White.. so Trav is White
Was I being serious, though?
@Abhi a wise dude once told me, dont make jokes about people's names... they've heard every possibly variation of it before... you have to be super clever to pull off something original
10:05
Ahem
/me sips coffee
@Abhi how's your doing going?
I have a triky question for any heavy weight here
You missed the question answering session
10:09
When a google map has fully loaded
@objectiveME Are you calling me fat?
Next one is in 2 hours :-\
The map has several markers
Now the task is to
@MadaraUchiha Stay off the pies, porky
10:09
1. Remove a marker with a aceratin marker id dynamically
2. Animate a marker dyanmically
3. Add a marker dynamically
Get to the question?
@TravisWhite Stop being unwelcoming
@MadaraUchiha ahaha nein
@BenFortune my bad, was trying to stir up some activity
10:11
God I can't even joke about it anymore
I haven't been active enough to catch the joke, darnit
objectiveMe where does it fail, you never asked a question?
I think his question was to implement the listed functionality
Time is limited, I wanted to be helpful before I disappeared into lurker village
no no no! Listing requirements and what you have currently isn't a question!
@objectiveME What actions are you wanting to trigger your markers with? Clicks, double clicks, right clicks?
@BenFortune I want to trigger this after a timeout of say 20 seconds
10:15
on page load?
@BenFortune I asked it here and not in meteor js section which would be more suited for such but i just want to do this with plain js
@BenFortune After the page has loaded
So, page loads, wait 20 seconds, add markers?
Yes
The page loads some markers of its own as well
So i am exploring ways of now adding markers without refreshing the page
So basically
window.onload = function() {
	setTimeout(function() {
		// createMarker();
	}, 20000);
}
Obviously there's more to that if you're loading the markers over AJAX or something
he is using google maps though
I would listen to that
10:20
huh?
> When a google map has fully loaded
> The map has several markers
> Now the task is to
11 mins ago, by objectiveME
1. Remove a marker with a aceratin marker id dynamically
ect
oh right
maps has an onload event
@BenFortune Thanks Ben....has anyone done this kind of thing before
put the timeout in initialize and call it 20 secs after map loads
just checked his fiddle. He needs to place that setTimeout there. :)
in initialize() (just as last statement)
10:23
what usually calls 'createMarker', looks like it needs an api places result?
10:50
@MadaraUchiha AAAAAAA
you hurt me soul mate
11:02
@Priyank Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@MadaraUchiha any guess ?
Are you sure it is legitimate JSON? content-type set to application/json?
11:39
@Priyank Why are you pinging me with this?
@Priyank 1) don't ping someone unless you think they might be interested (hint: that's almost never). 2) what url is that?
you come here with a picture and then say "any guess?". What is the problem? and how did you got it?
@towc you could ask to not ping randomly. Your first point is subjective
@KarelG randomly is even more subjective
"It's not random, I meant to ping him!"
nope
11:51
@MadaraUchiha your name is blue, so you automatically need to care.
btw, TIL npm repo <package> opens the specified repo of that package in the default browser, which is super neat
huh, neato
also npm run outputs a neat list of scripts
npm run forrest.run
licky licky
I totally feel like that after I mess up a bunch of words
the font in github amazes me
I and l is similar unless you backtick those
the font in github amazes me
12:01
Hey guys wasup
@PukaUnknown Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@MadaraUchiha oo. So you are that person that spits around a lot.
@ManojTrivand Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
hello
12:10
Hi Caprica, thank you... sure will follow and adhere all the rulz
Yes i do have a question
just post it
Is anyone familiar with parsing Xlsx to json file on page load
i tried using sheetjs
but there i couldnt find how to do it onload, there were possibilities only on fileupload
i.e not able to find the or get the file object on load
@rlemon free me!
you have your oakbot dude
@Wietlol again, did I ban you?
12:14
@karelG
no, but ssube is never here any more
whats meant by Oakbot?
he isnt even in the @ list
Caprica Six is a bot.
ha ha ok ok :)
12:15
Oakbot is a bot too, but is active in another room where Wietlol usually "resides"
@KarelG Hector prefers to put my quotes in cap, so I need cap
in C-harp room
@Wietlol we have github which he can see. I've told you before I dont' step around other ROs
he banned you, he will be the one to unban you
@Wietlol with that, you are intending to abuse cap.
how so?
so ¯\_(ツ)_/¯
> Hector prefers to put my quotes in cap, so I need cap
12:16
so wait, you just want to be unjailed to delete shit?
so you want to learn her your quotes?
I want to be unjailed to quote myself
usually !!wietlol2
that is not the purpose of cap AFAIK
also !!> stuff to prove Kendall wrong
@KarelG what is the purpose of Cap then?
We usually use Cap for things like !!Wietlol though
killer is fan of !!wietlol3
but that is not supposed to be there
assistance like mdn lookups, !!> ofc. There are more commands but we are not using it pretty often than what you do
It is. It absolutely is.
@KarelG you dont, we do
12:21
lol seriousl
in C#, Aug 3 at 10:57, by Squirrelkiller
!!votekick Wietlol
I know it is a joke but was searching for !!wietlol and found barely usages of it
its not people using my quotes
its me using cap that doesnt work
also... ssube doesnt seem to be on the github
You have to work it out with ssube. Use the github thread.
he is still watching it. (if you mention him, he can get a mail if the configs are right)
The wietlol commands have very specific use cases
use cases which seem irrelevant to this room?
the entire conversation is irrelevant.
it happened like twice before now
Apr 24 at 14:26, by rlemon
my point is that I'm not going to unban people just because I host the bot account. the person who banned you had their reason, and its upto them to unban you
12:29
Can't find the !!ban any more. It's a conspiracy!
Apr 24 at 14:26, by rlemon
pinging me won't do anything
@Cerbrus drop the !!
and get out of the js room search
it's there.
ah
The !! broke search. good to know
chat search is the wurst
At least it's not conchita wurst.
dammit I did this to myself. now I want liverwurst
12:33
been a while when I heard about her
@rlemon Hm, I shouls still have some at home
The eurovision winners of last 10 years are so garbage.
I manage to recall one of them
@KarelG Message over quality
and ofc the current year ones but that is because it is fairly "recent"
(it appears that the song contains some plagiarism)
2012 and 2013 were pretty ok
12:35
@Cerbrus yarr. they tried to fix it but meh. I know more of winners from before 2000
I even recall a funny group name
bobbysocks or something
keh 1985 winner: Bobbysocks!
Heh, there have been some weird ones
12:53
Anyone else having issues with Imgur?
yes
everyone
ah. who's fault? Imgur or se?
obviously imgur
is that even a question?
se has been down before. And if they host it then it could be them.
> imgur.com
12:56
That's a subdomain of imgur
they have their own installation
no they do not
they have a corp account
No, they have a subdomain
imgur hosts it all
imgur controls it all
imgur set it all up
imgur charges for it
ok
12:57
imgur messes it up
tbf, as long as they've been running with as many files as they host, and now video
I'm surprised it doesn't go down more often
You're taking "installation" too literally
@Cerbrus Guess I am.
they setup a corner of imgur for stackexchange only
that's all they mean
yes
12:59
any company can pay for that
but do you at least see how someone could be misled by that statment

« first day (2853 days earlier)      last day (2320 days later) »