« first day (1923 days earlier)      last day (3250 days later) » 

04:21
hey lads
if I don't resolve a promise does it continue getting triggered
no idea what i'm saying atm
 
1 hour later…
05:49
@nick "triggered" as in ...?
06:34
0
Q: use bulkDestroy in Sequelize

feniixxI'd like to know how to delete all values in an array, my array contains the ids like: [1,2,3,4], I've tried: models.products .destroy({where: {req.body.ids}}) .then(function(data){ res.json(data) }) But I got data undefined, and nothing is deleted...

user3119231
07:23
Hello, I am maurice, how are you?
user3119231
u just wanted this?
user3119231
Does array.forEach returns a promise?
07:32
@Maurice Do you know how to exec code after looping over an array?
user3119231
Show us what you tried.
...?
user3119231
do you use forEach to loop?
@littlepootis 1.8 is an arch-specific release, it's available on aur, there wasn't any need to make a .deb
user3119231
function callback () { console.log('all done'); }

var i = 0;

[1, 2, 3].forEach((item, index, array) => {
  asyncFunction(item, () => {
    i++;
    if(i === array.length) {
      callback();
    }
  });
});
07:34
@Maurice yes
user3119231
(I mean that it only contains fixes for arch)
ES6?
I'm using ES5..
user3119231
the example above is working upwards
@FlorianMargaine even if it contains fixes for arch, you should make a deb, or just don't link to it in the README
user3119231
07:36
You simply increment till the full array length is reached. This means everything is done
the logic I'm looking for is:
@feniixx Do you know how to work with for loops?
user3119231
@feniixx The example I gave you works well with any ES. It is just count +1 every loop
var arr = [1,2,3]; arr.forEach(function(data, inx, arr){...}) after that exec arr.push(val)
user3119231
do the push in the callback function
07:39
@feniixx why push to an empty array?
it's an example @littlepootis
Why do you want a promise on forEach, are you expecting it to fail? Do you need a single return value for the whole loop? (In that case use .reduce)
[1,2,3].forEach(function(data, index, arr) {
  // you can access data, index, arr local variables
  // arr === [1,2,3]
  // arr[index] === data
});
Finally got 5k rep. I can now approve tag wiki edit! So fun! (sigh)
user3119231
Finally I'm here since 6 month or more. Just the same reputation.
07:45
@Sheepy GL finding one :p
Anybody knows how can I set my specific element in this code?
@littlepootis ah, forgot the readme
@Sheepy Hmm, you got a point, Can I know if the index is the last one in the forEach?
@feniixx inx === arr.length-1
user3119231
07:51
Dumb ass haha
@stack Sorry, unclear what you are asking.
@Sheepy should I write #idname where of that code?
@stack Replace this with $('#idname').
ah, but just that?
no need to change this: $.fn.disableSelection
?
You want to disable text for specific id?
07:54
yes
text-highlighting
Today is my birthday and I'm riding high
Then the code works fine.
@Sheepy ok tnx
$('#idname').disableSelection(); // You use it like this
ah
Although I must say, disabling selection rarely does anything good other than to annoy well intended users.
@stack For example, they won't be able to highlight your product name or feature and right click google or google translate.
user3119231
@littlepootis hitting the nail
user3119231
It's not about the "know-how", it's about try the stylesheet till success
I haven't done CSS in years, literally.
Or JS for that matter.
@Sheepy yes you are right. but I just want do that for the toolbar of markdown-editor
07:59
@littlepootis You will find that they changed a lot in those years. :)
user3119231
They change a lot every few weeks.
@stack Good. I did that too. :)
:-)
user3119231
Yesterday evening is was bored. So I began to play around with mtasa.com scripting. :D
Ah, GTA. Now there's GTA V. I don't have Windoge anymore. so
08:02
@Maurice It's much slower now. e.g. Firefox 43 didn't add any new CSS, only updates to old ones: mozilla.org/en-US/firefox/43.0/releasenotes
user3119231
@Sheepy Mostly it's up HOW the css is coded. But yes, you are right in this case :)
Microdata is dead
Microdata? Also, good morning.
Can I stop a .forEach loop?
And who is the successor of microdata? Siri?
@feniixx Throw an exception.
08:05
Wait, no. People at WhatWG are actively working on it. No one at W3C though.
user3119231
!!google javascript stop foreach loop
user3119231
the second link looks fine.
The first is also ok. Both are above my expectation.
I'll use a for loop then, easier with a break
user3119231
08:08
I thought loops are basics... for example loop through arrays and stuff
I have had some fun educating others that HTML5 is not designed by W3C and in fact the real HTML5 used in browser is just HTML - without version, and not w3c's HTML5.
user3119231
for (var i = 0; i < 1000; i++){ .... }
@feniixx use labels, then.
user3119231
@Sheepy Yeah, sometimes I'm showing friends some interesting stuff but they don't give a shit... :D
> I have had some fun educating others that HTML5 is not designed by W3C
@Sheepy What do you exactly mean ?
user3119231
08:11
Till I finished something -> Like the fallout dice game in js -> This made them "ooohaaa"
Fantastic.. this edit got approved though it completely changes the meaning of the title in my opinion. Is that just me or should I rollback?
@Maurice Friends are used to talk shoppings, travels, cats, and children. Not computer. Definitely not programming. ;)
It's jQ being passed to the function, not the other way around >.<
@Sheepy When someone says HTML5, they might be referring to the various technologies ala, or the markup language
All of them were worked on by W3C
@ivarni Fix it
(funny enough, the jquery object is both passed and passed to)
user3119231
08:13
My thought is that HTML >5< means features like developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5
HTML5 specification was presented and organized by W3C
@DenysSéguret But Why define an anonymous function and pass it to jQuery implies the anonymous function is passed to jQuery unless my english is failing me
@DenysSéguret There is a spec called the "Living HTML" done and updated by whatwg, which is essentially the browser consortium. w3c clones it and calls it "HTML 5" despite request from whatwg to stop.
HAMMERTIME!
user3119231
what the fuck, @CapricaSix, go home?
08:14
@Sheepy lol?
@ivarni you're right, that part was better before the edit
I am having a strange problem .. I have an array a = []; now depending on the year in an object in list of object.. like 2015 , something like a[2015] = a[2015].push(object) .. now when I am printing it out in the dom .. in firefox .. at the top there is the latest year .. and at the bottom the earliest .. while in chrome its the opposite ...
user3119231
In arrays values are sorted by the push. Means if you push "2015" first, array[0] = "2015" -> Maybe this will help: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
@shortCircuit Sounds interesting. Any code?
no no .. not a.push(year) .. its a[year] = a[year] || []; a[year].push(object)..
like say ... a = []; a[2015] = [{a: 1}, {a: 2}]; a[2016] = []; a[2018] = [{a: 1}, {a: 2}] .. like that
@Sheepy Is there a way so that I can expose my localhost to the outside world.. its a react application.. I will post a gist .. with some input data
08:20
@shortCircuit You want an object, not an array.
@shortCircuit You most certainly not want to expose your localhost to the outside world.
Use a server that's meant for hosting.
You do not want to open your firewall to incoming connections from the internet.
so changing the data structure could actually solve the problem ?
@shortCircuit I don't know, but an array isn't the correct structure to represent your data.
(Frankly, I haven't even read the problem past the choice of data structure)
Out of curiousity, why did you pick an array?
user3119231
Sometimes I don't understand this world, like actually I'm from Mars. :D
@Maurice Sometimes, very rarely, I do.
I am from Mars just now! :D
08:24
I have a list of posts .. now I have to render a Timeline https://gist.github.com/aghosh47/2dab6901fcc40c03135f .. and the Timeline would look like

2015---------
--------
------
2016-------
------
------
I concur that it sounds like you should use object instead of array for the years at least.
You should use a Map, not an object or an array.
user3119231
^
Map is a very safe choice, if it is a timeline library you should use that, true. Otherwise I'll save myself the trouble.
08:27
checking Map, I though that if I take an array of objects .. then the sorting would be easier... so array[year] = [{post objects of the year 2015, sorted by date}] ..
or is fine, nor might be better, both are acceptable IIRC, and I prefer keeping my chat English as simple as possible, especially when discussing with non natives.
Oh wait, with nor it would have been slightly different - neither an object nor an array or something like that, meh, going to code now :P
damn, I won't learn a better English here :(
user3119231
@DenysSéguret sure you do, me is maurice I am teach you
twitches
08:30
Must... resist... bludgeoning
@shortCircuit for ( var year of Object.keys( { 2016: [], 2014: [], 2015: [] } ).sort() )
@Sheepy That looks suspiciously like it isn't a map.
There's no "m" in there. Nor a "p".
user3119231
@Neoares you little rockstar, are you still sleeping or what? Put your pussy in this room you lazy fuck :D
@Sheepy I actually have tried that .. It works ... but I have to do that at 3 different places ... :P I will try the Map
08:34
I don't think map provides sorting, either... but if you assign the year in order, you should not need sorting with a non-map.
@Sheepy You can pretty easily implement sorting for maps
Little costs add up in code complexity.
!!> var a = []; a[2015] = [1,3]; a[2018] = [2,3]; a[2016] = [4,5]; console.log(Object.keys(a));
@shortCircuit "undefined" Logged: 2015,2018,2016
08:37
why
what am I missing..
Why are you using Object.keys on an array ?
!!>var a = []; a[2015] = [1,3]; a[2018] = [2,3]; a[2016] = [4,5]; for ( var year in a ) console.log( year );
@Sheepy "undefined" Logged: 2015,2018,2016
how else to get the array indexes? and I though array was a special case of object with length and splice
a should be an object or a map
08:38
Hmm. Interesting. That is different from my Firefox.
BTW, it's a little curious that the new official sorting of object keys isn't applied to arrays. Probably because it's too corny to bother
I thought We are seeing the official behaviour for an object - object keys in assignment order.
@Sheepy you forgot half the new rule: there's a special behavior for "numeric" keys
!!> var a = new Map(); a.set(2015, [1,2]); a.set(2018, [4,5]); a.set(2016, [6,7]); console.log([...a.keys()]);
@shortCircuit "undefined" Logged: [object Map Iterator]
08:41
i see
@shortCircuit "undefined" Logged: 2015,2018,2016
o.O
oh I converted it into an array
@DenysSéguret Ah. Thanks.
what is it .. where is it? I wanna read
Then it works ok in my latest Spidermonkey. Maybe Caprica need an upgrade?
08:43
so what should I do? convert the year's to string?
@Sheepy Why ? Did the ordering get specified for arrays accessed as objects ? In any case a code relying on that behavior is flawed, I'd better have the array implementations not spend cycles for that...
hola
@shortCircuit No need. The order only doesn't work here. It is 2015,16,18 in both Chrome and Firefox.
@DenysSéguret Well, you don't really have a choice here... stackoverflow.com/a/32149345/893578
please solve this query
http://stackoverflow.com/questions/34916838/getting-get-http-localhost3000-load-neter-connection-refused-in-google-chro?noredirect=1#comment57570189_34916838
user3119231
someone need a "live-dicing" script? :D
08:55
if I use Map then still then I have that problem where 2018 is before 2016 ..
I'm developing a data visualisation that works well on a phone. On a touchscreen, mouseover/mouseleave events might be challenging, so I'd like down scrolling events (as the user scrolls downward) to animate a chart. This is an example of what I'd like to achieve: http://www.tampabay.com/projects/2015/investigations/pinellas-failure-factories/chart-failing-black-students/#

There's a fixed "background" consisting of an image or chart is updated when the user scrolls down (or keys/mouses down on a device with a keyboard). The part that scrolls has a high z index so it appears in the front. I
i can sort the keys
user3119231
@Sheepy then why is it behaving oppositely in chrome and firefox :(
maybe its my code
@shortCircuit With my code I get same result. That is why I asked for simple reproducible code.
09:00
ok let me try
@shortCircuit Make sure you are using strict mode. For all code.
o/
user3119231
\o
09:26
@Sheepy still there ?
user3119231
yes, I am. What's up?
jsfiddle.net/gwd6c3g9/1 is the o/p visible in firefox ?
I can see it in chrome
user3119231
SyntaxError: let is a reserved identifier
how old is your ff :P .. let me change the let's to vars
user3119231
@shortCircuit nope, no result in firefox
09:29
why does it show when viewed in chrome
user3119231
user3119231
show me a screenshot.
I even created this gist gist.github.com/aghosh47/93a97707410cc6779d19 .. it shows in chrome not in ff
@shortCircuit You shouldn't be using arrays like that. If you want a key/store format, use an object or a Map.
user3119231
@shortCircuit This works: jsfiddle.net/gwd6c3g9/3 in firefox.
09:31
!!tell shortCircuit google stackoverflow Firefox let is reserved
oh nice thanks @Sheepy now .. do you see the difference .. in ff .. 2016 is at the top .. in chrome its at the bottom .. before when ..
@shortCircuit You may also want to upgrade to Firefox beta... heard it is enabled by default now.
I have firefox dev editon
In my Firefox 44 beta, 2015 is at the top.
09:33
oh
So this confirms the outdated SpiderMonkey theory.
Well, you can go ahead on this issue. Firefox updates every 1.5 months, and 44 is not far from general availability.
so ... um , is there a way I can avoid/bypass this whole thing? :P
Do your own sorting. Or wait for it to be resolved in... let me see... 2 weeks.
09:35
ok
!!afk lunch
Why can't you change the ttl
 
1 hour later…
10:40
@ivarni You know what. I haven't reviewed any edits for a few weeks. The day I got 5k rep, I docility clicked the edit queue, and there is a tag wiki edit waiting for me.
Uh. Make it two edits.
11:07
hola
hi guys
@Yya09 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
user3119231
Just love the english of the guy: stackoverflow.com/a/34922171/3119231
hello guys
question: can I make backbone app work like when you do history.naviget() when changing the url manually?
it seems to reload the entire app when changing the url manually.
11:33
how are you changing the URL?
@taco let's say I change it manually by hand
Well yeah, changing the url by hand is going to navigate to that page
That's a browser function
you're trying keep state after route change, but you're changing the state
yeah but reloads all the files
@taco I see, so everything should be done through Backbone.history?
no idea
keep a token of some sort for the session if you need to keep some info, imo
the way I've done it is tie to a token given after a single signon session
but this isn't specific to backbone
if session is lost, the token is destroyed with the session
11:41
My issue is not the token. I have lots of inside links that are just done through html, which causes the entire front-end to reload.
@taco: How to detect USB connected to the machine in javascript? Is there any events?please suggest
dunno
any one help me on this:
How to detect USB connected to the machine in javascript? Is there any events?
Actually Google Play store is doing it, so there must be a way.
11:48
Hi @MarcGravell
bows
@BenjaminGruenbaum Does it ask the user for permission?
Yes it does
@KendallFrey heya; don't mind me ;p
@MarcGravell any particular reason why all you guys are dropping by more lately? (@Shog9 was/is also here)
11:53
@taco thanks
@BenjaminGruenbaum: They want to join the popular kids
@Abhishrek No idea. Check their website?
@BenjaminGruenbaum to be honest, I was just clicking random links to test a reported bug in chat
nothing more complicated than that
@MarcGravell ah, cool
I'll leave you to it; have fun ;p
11:57
@rlemon Haha, I guess that's out, then?
Morning guys. I'm on overnights now, btw, (east coast) which is why I'm back in chat. Day shift was too hectic.
@taco pastebin.com/QFw8583S this solved my issue.
user3119231
welcome me, back!
user3119231
12:12
background: url("dice/" + random(1, 6) + ".png") no-repeat;
user3119231
man how to do this? damn sorry, this is a css question
^ We should write a guide for googling programming things.
user3119231
!!google css random into string
user3119231
@BenjaminGruenbaum you see, google isn't saying much to this.
12:16
because css doesn't have random
use js
62.83% of programmers in my country confuse programming with googling stackoverflow
Also, if you're using PHP on the server-side, use PHP for this. PHP preprocesses CSS too.
Or just make an endpoint that returns a random PNG on each GET...
o.o
What @ivarni said is easier.
user3119231
-1
A: excuse me for my amateur questions

MauriceDebugged. This wasn't valid js because it is id not I'd. <input type="text" placeholder="enter number one" id="num1"><br> <input type="text" placeholder="enter number two" id="num2"><br> <button id="mybutton">calculate (+)<\button> <script> document.querySelector("#mybutton").addEventListener("c...

user3119231
12:25
lol what a douchebag.
> Like I said, I don't know if it is even js...
Don't answer those questions
user3119231
Sometimes it's better.
user3119231
commented "For [place name whatever]" - He edited and removed it :D
@Maurice... *Frown*
@PraveenKumar you are mr. perfect. You never do mistakes. — Maurice 7 mins ago
Also, I'm CV-ing it as "too broad"
Who makes a big deal out of a missing closing tag anyway? I see nothing in that question indicating it's XHTML
12:37
@Maurice did you downvoted his answer ? :p
user3119231
@KarelG no, I didn't, seriously. No need to act like a child :)
Now I understand how people get XY.Zk rep
I did
That answer is rep whoring at it's finest
i still understand why he's asking such simple answer
-1
Q: Merging two JSOn's in Javascript or JQuery

priyanka.sarkarI have a json as under "chart": { "xAxisname": "Months", "yAxisName": "Year" } The second Json I am receiving from WebAPI as under [ { "productName": "Personal Loan", "loanAmount": [ { "amount": 121000 }, ...

He dumped a working solution in there without explaining anything, instead of close-voting the question.
12:39
from a 7k user
user3119231
@Cerbrus Agreeing with cv it
keh, he has made 240 questions
@KarelG: 76k
@Cerbrus I think he's upset at you now
Looks like it
12:40
You made him leave his highly paid job for nothing
user3119231
He downvotes my answer aswell, now.
:-|
For what it's worth, I only -1'd one answer in there
and cerbrus, what do you mean with that 76k ?
4 spaces, 8 spaces. aaaaaaargh
user3119231
12:42
Nevermind. I just wanted to help him. I don't care about any rep. It's just debugging the code to show him how valid JS looks like.
@KarelG she*
@KarelG That answer was posted by a 76k user
i'm not an indian expert. Don't expect me to smell if the name is a male or female one
you mean 7.6k because 1k = 1000. ( 76k = 76 000)
nah, I was talking about Priyanka
user3119231
nevermind then :D
12:44
she typically meets the "google developer" profile
No, 76k.
almost every week a question on SO
Are we talking about the same user?
No, you're not :)
no, i'm talking about that person who placed a silly question
12:45
look at his about me (on the website)
@KarelG that's a guy
6 mins ago, by KarelG
-1
Q: Merging two JSOn's in Javascript or JQuery

priyanka.sarkarI have a json as under "chart": { "xAxisname": "Months", "yAxisName": "Year" } The second Json I am receiving from WebAPI as under [ { "productName": "Personal Loan", "loanAmount": [ { "amount": 121000 }, ...

this one
i'm almost confused myself x.x
@KarelG that's a girl!
user3119231
We are all confused. Let make a rollback.
user3119231
12:46
Where are we currently at?
@Maurice Deventer. Well, I am, at least.
At work
We started at petrol bunk now we here
waiting for my secretary
that sounds wrong ...
user3119231
Actually it's time for the horse drinking beer, again.
12:48
@KarelG Does it?
@KarelG I regret googling this
user3119231
wait what? google.de/…
Now bing it
user3119231
user3119231
the first image.
12:50
Don't click vidoes no pls
user3119231
yeah just try to click on videos there :D
Song recommendations, anyone? I have been listening to "Buzzcut Season, Lorde" for 3 hours on loop and I'm bored.
user3119231
Dion - The Wanderer (Fallout 4: 1 hour loop)
!!tell SterlingArcher youtube Wage War - Alive
12:55
6/12 no beat drop
^ this needs to go on my gym playlist
user3119231
@GNi33 Dieses Video ist in Deutschland leider nicht verfügbar, da es Musik von SME enthalten könnte, über deren Verwendung wir uns mit der GEMA bisher nicht einigen konnten. - Means: Youtube says NO.
haha
GEMA says no
user3119231
GEMA - World badassest company >:(
12:58
RIP in peace
what did you die of exactly?
user3119231
Can someone explain me what happens in this youtube video? I'm unable to see it because my country is dumb.
no
@Maurice it's a music video
user3119231
You should tell me every sound... :D
user3119231
12:59
@littlepootis damn you!
some guys playing guitars, one guy on the drums, one guy screaming into a microphone, some other guys jumping around in crazy fashion
Hey guys, is anyone available to help me with a bit of jquery/ajax?

« first day (1923 days earlier)      last day (3250 days later) »