« first day (2043 days earlier)      last day (2910 days later) » 

user4196492
1:31 AM
I noticed that when using a mac to run a javascript game of mine, it seemed to have an issue with the 'class' keyword and could not run the script. I wanted to confirm that this is only an issue on macs and not other OSs.

It seems that declaring a constructor through the function keyword is more preferred than using the class keyword. I am worried about compatibility with my javascript web apps.
 
what browser you use matters, the OS should not.
see: kangax.github.io/compat-table/es6 (look for the row labeled 'class')
 
user4196492
@Luggage If I use the 'class' keyword in chrome on a mac, it spits out an error. I don't have the error message right now. I run it in chrome on a windows computer and it runs just fine
 
works on chrome on Mac for me. Are you up-to-date?
 
user4196492
@Luggage Shoot, that's why. The mac I was using was on a school computer. God knows how old those are. XD
 
user4196492
1:37 AM
@Luggage not that old
 
user4196492
might as well have been though
 
user4196492
 
user4196492
not sure if it is the same one, I am just going off of looks
 
right.
chrome should still auto-update, though
 
user4196492
@Luggage School computer? Probably not
 
1:40 AM
@Luggage It depends on how it was built and for what platform. Not sure about Mac specific stuff.
 
user4196492
It keeps saying it's out of date anyway.
 
guys i have 1 month deadline to create a simple android app with web services.I dont know anything about android. Its better idea to do it with cordova (javascript + bootstrap) or to create it with android studio ?
 
user4196492
@gtzinos Out of pure curiosity, is this for a job or school?
 
me? I'd look into react-native for android, but I haven't used it so I can't suggest it too strongly.
also, that's just the 'view', not a full app framework
 
Can I use jQuery-UI to contain a draggable in a div that isn't the parent?
 
1:47 AM
@pebble225 it is for thesis. you know thesis ? is a big project before you will get
certificate
 
user4196492
@gtzinos I go now.
 
I had a README on github that I forgot to pull after doing some code changed, and foolishly did "git push -f origin master". Is there any way I can undo that?
 
@Luiserebii Welcome to the JavaScript chat! Please review the room 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.
 
user406009
@Luiserebii Have you tried looking at the google cache?
 
@Luiserebii link to repo?
 
1:55 AM
First thing I tried
 
@Luiserebii github.com/Sunquyman/JavaChat/tree/… you mean this? :)
just wget that commit patch and apply it locally
 
user406009
@AwalGarg Wow, how did you find that?
 
or if the reflog shows it locally (don't think it would, but try) you can directly checkout it and create a new branch, then merge/rebase in master
 
Wait, what? How did you do that???
Amazing, thanks!
 
Always good to trust Awal
 
user406009
1:59 AM
@AwalGarg Nice. I'll keep that in mind for the next time.
 
Ahhh, I see. Thank you so much!
 
np
 
Can I get .position().<direction> of a <ul> tag?
 
2:44 AM
@AwalGarg wow, when did you go to sleep?
 
@littlepootis 2:30 AM. But I didn't do ... something ... so opened my laptop earlier than usual.
 
@AwalGarg oh
 
Nice, I'm getting used to the Rift, I don't feel as woozy anymore
 
I've set containment for my draggables, but when I drag outside the bounds, the webpage still moves as if the draggable is being dragged. How can I prevent this
 
@pebble225 so what you recommend me ?
 
2:59 AM
@littlepootis Have you grown since I last saw you? You seem mighty taller
 
yeah he is 12 now
 
@AndrewL haha
 
My how your accent has thickened
 
> haskell moans
(typo for monads from irc, taken out of context)
 
3:15 AM
haskell makes me moan
 
!!s/haskell/Kendall's dad/
 
@phenomnomnominal Kendall's dad makes me moan (source)
 
good morning guys
 
4:03 AM
Good morning all
 
 
4:59 AM
Good morning..
 
@ChathuraHettiarachchi Welcome to the JavaScript chat! Please review the room 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.
 
Good Morning
 
First time working on nested ajax requests in jquery. Trying to figure out if deferred is my best solution
Basically 1 ajax request returns a bunch of endpoints which I then loop through and hit each one with a GET
each one of those returns some text and I need to concatenate them all together
 
how can this answer get an up vote ?
anyone around ?
 
yeah which answer?
 
5:10 AM
1
Q: How to reflect URL back to query builder

MathematicsI am using this library for generating Query Builder, https://odatasamples.codeplex.com/SourceControl/latest#Tools/ODataQueryBuilder/Scripts/odata-query-builder.js Above helps me to generate adhoc reports, but what I want is to save the URL and then using this URL recreate OData Query Builder ...

basically he rewrote my question for bounty
 
I think you came out strong on a guy who tried to help you.
anyway, I don't know it so I can't say
 
@Mr_Green tried to help with what, he didn't presented any solution I already knew or mentioned in my question ?
he started his answer with "As I said, I don't know your library."
well if you don't know anything why answer ?
 
I am not being biased but trying to understand him. He might be trying to let you know the fundamentals which he think you don't know.
he did say about generating html report without knowing the library so assuming he is did shared the fundamentals
 
@Mr_Green maybe you are right, let me rewrite my question in simplest form again
 
ok I could be wrong though but he doesn't look a guy who is repwhore
 
5:33 AM
@Mr_Green I updated my question, does it makes any sense now ? thanks
 
I am trying to access global variable but its not accessible, why ?
http://pasted.co/e10799ef
 
@Mathematics ok seems good
@Shashi which global variable?
 
@Mr_Green ele
do I need to remove var keywork inside the function ?
sorry that variable is declared outside the function with var keyword obviously
@Mr_Green ah! that was the mistake
 
I used var keyword inside the function as well so it didn't override the global variable
 
5:42 AM
yeah you can do like that also
there are different ways though
Personally, I would have avoid usage of global variables
 
okay, so basically you defined that variable inside the function only ?
 
yes, and used it in other function by binding it
 
Thank you :)
 
welcome :)
 
6:04 AM
Mordgogenjgningjnf
 
@Mr_Green HEY! I tried that bind way......it again gives me currentElement not defined whereas I just cam to know global currentElement cannot be used it its value is getting changed again and again
 
@Shashi oh I got it.
 
6:27 AM
Anyone knows how to transform [1, 1, 1, 2, 2, 3, 5] to be [1, 2, 3, 1, 2, 1, 5] in short way?
 
var a = [1, 1, 1, 2, 2, 3, 5];
a = [1, 2, 3, 1, 2, 1, 5];
There ya go, @choz. It doesn't get any shorter
 
the closest could be [1, 2, 3, 5, 1, 2, 1]
 
Lol
 
no wait, I am wrong
 
I am sending file with ajax but there are multiple file elements with same name....
in this case file_new and I am using var file = getElementById("file_new").files[0];
The problem is everytime i click another file the file from first form is sent. so files are not selected on the basis of $(this).fielname or something.
how could i refer to curent elements form ?
 
6:35 AM
I want to have the value start from lower and incrementing based on the value that exists in the array itself.
@Shashi file_new is a name or id? Can you elaborate more?
 
@choz Can you explain the logic?
 
and also max and min values
 
@choz its name (of the input file element) that I am sending to a PHP file
 
@Sheepy Let's have another sample [3, 1, 3, 2, 3, 4], this should return [1, 2, 3, 4, 3, 3]..Does it give u anythin?
 
@Mr_Green: TheLostMind beat you to it in the android room :D
 
6:39 AM
:)
 
@Shashi You're using getElementById('file_new'), that will retrieve the element by its id. Or, you should post your full code.
 
but I am using on change event so is there a way where I can get the value from the element of on change fire ?
means the on change is fired on single section right ?
 
@FlorianMargaine Cool!
 
@choz With two examples, I can think of a logic that produce matching result, but I'm not sure that'd be right on, say, the 4th or 5th example.
 
6:40 AM
@Shashi It's an input file element right?
 
yes
 
@Sheepy Give me an array of numbers and i will return it.. :) I am really bad at explaining :(
 
I'd say that's still better at not explaining at all. Let me think. How about [5,7,7,4,6,0,2,3,2]?
 
@Sheepy would return [0, 2, 3, 4, 5, 6, 7, 2, 7]
 
Give me an array of numbers or give me death! No, wait. That's not how that saying goes...
 
6:43 AM
@choz udpated code with HTML in bottom pasted.co/6470bba6
 
@Shashi U use jquery there, why wont u use $.ajax instead?
 
Ok. So the result seems to be concatenated sorted sequence, where each sequence contains no duplication. Duplicates are moved to next sequence.
 
@Sheepy Wow, that's very well said..
@Shashi You want to detect if the file input has been changed right?
 
Oh, my colleague is back. I need to discuss some urgent work with her. I'll come back later... if someone didn't help you already by then.
 
kk
 
6:49 AM
@choz yes...but the problem is whenever i am firing the change event the file from the first form is submited not the current form because I am directly selecting file_new id not the file_new-from-current-onchange-element
I want to pass in the file__new id form current element on which the change is fired
 
freezed
 
lolwut
 
saw freezing live for first time :D
 
@choz I never did AJAX before and I am unable to find a good tutorial explaining progress bar creation with jQuery.....I know how to do it in core JS that is why used core for ajax..(don't kill me for this :p I need to finish this ASAP and then learn the jQuery way)
 
Yea. Maybe because of the single active RO
 
6:52 AM
@Mr_Green same
 
Same
 
Same?
 
seems so many Indians in that room now they can go nowhere :(
 
There's an Android room
 
@Neil chat.stackoverflow.com/rooms/50272 just got locked. There's been a bunch of flags coming from that (non-english) room
 
@Cerbrus Ooo, gossip
 
TheLostMind has mind :P
 
Non-english rooms are hard to moderate.
 
That room has only a single active RO. The room can't moderate itself aside from flagging messages.
 
One RO?
 
6:56 AM
Well, it has 2, but the other one hasn't been online in ages
(126 days)
 
that room got so popular now
 
You'd think we'd be able to make a bot that checks room language for English
 
Apparently.
 
Non-english rooms are tolerated.
 
@Shashi Sec..
 
6:57 AM
As long as there are no flags coming from them.
 
@Cerbrus then they aren't tolerated since the flags are an inevitability
 
@Neil: Shog's policy about it.
 
If someone talks in germany which I don't know. I don't feel offensive. anyway, I can't expect everyone to be me
If they mention me, I request them for english but if they repeat the same, I will flag
 
Meh, I am not offended by that
 
@choz sure
 
7:00 AM
@Mr_Green Don't flag.
 
Though I can see how you would be
 
@Shashi Like this? jsfiddle.net/8q5m7m1u
 
@littlepootis then?
 
My boss was just next to me, and could not chat lol..
 
Don't do anything. Do you really need to flag something just because you don't understand it?
 
7:01 AM
The problem is not whether or not the flagged messages are offensive. The problem is that non-english chat can't be moderated by staff.
 
unfrozen..
@littlepootis when I am mentioned only otherwise I don't care
 
So, when a non-english message does get flagged, regardless of if it's offensive or not, the room has a problem.
 
I wouldn't flag if someone pings me with a message in Klingon. I'll reply "u wot m8" and then ignore it.
 
You have the right to remain silent, aye.
 
hmm
 
7:03 AM
If he pings repeatedly, I'll request an RO to kick him.
Problem solved.
 
what if RO does that :P
 
What id the RO doesn't do that?
 
kick yourself please
 
@Mr_Green so polite
 
SE staff can't properly moderate the room, so it's at risk of being locked. That's the policy.
 
7:04 AM
hii all I have to do a delete request in Restangular for the end-point account/{accountId}/customer/profile/{customerID} how is this possible
 
@pritesh Welcome to the JavaScript chat! Please review the room 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.
 
@Mr_Green RO gets kicked.
 
automatically?
 
@pritesh not familiar with restangular, sorry
 
no problem
 
7:05 AM
@Mr_Green No, by another RO.
 
ok
 
@choz ha ha
@choz that didn't work though
:|
 
@Shashi What did not work?
 
@choz can I do this ? $(this).childdren()attr('name').files[0];
this.files[0]
but the above jquery way is also no tworking
 
this.files[0] works, console.log it..
 
7:08 AM
@choz let f=(a,e,b=[],r=[])=>(a.sort().forEach(e=>(r.includes(e)?b:r).push(e)),r.concat((b‌​+"")?f(b):[])) // Usage: f([5, 7, 7, 4, 6, 0, 2, 3, 2])
 
@Sheepy Damn.. thanks a lot.. lemme try on that
 
@choz i am targeting the wrapper of that dynamic element so i have
static-wrapper > div > form > file-input element and on change is fired on the change of form.....in this case how ? I am not firing directly on file change instead on form change
 
@choz You said you want it short. If you want a more human readible version, let me know. I'm a sheep but I can try my best ;)
 
@Sheepy I am translating it to human readable now, since ive got Uncaught SyntaxError: Unexpected token ILLEGAL :P
 
Hmm. I was sure I tried that...
 
7:15 AM
@Shashi So you want to upload the file when the form changes? or when the file input changes?
 
@choz $elem = $(this);
var file = $elem.attr('name').files[0];
says $elem is not defiend :|
sory change is on file input
 
@choz I used let, so you'll get error if you rerun the line.
 
@choz oh, dear. You've caused an illegal exception. The police will arrive within the hour. Don't move from the premise
 
Lol
 
Any trekkers here?
 
7:19 AM
@Shashi Where did you put that code?
That's it.. post your question on SO.. with ur html and js
 
Cbs is apparently doing a star trek reboot
 
Guys. Don't say sssssswear words.
 
@littlepootis ?
 
@Sheepy That ',' before r.concat is not meant to be there, is it?
 
user3119231
fact: If you want to send a json to php prefer an object.
 
7:21 AM
@choz No, it must be there! If you remove it, it won't work.
!!>var f=(a,e,b=[],r=[])=>(a.sort().forEach(e=>(r.includes(e)?b:r).push(e)),r.concat((b‌​+"")?f(b):[]));f([5,7,7,4,6,0,2,3,2])
 
@Sheepy [0,2,3,4,5,6,7,2,7]
 
Thanks, Caprica~
 
@Sheepy what is this monstrosity?
 
@Neil It's a small piece of... art? :)
Hand crafted, no less!
 
@Maurice why lol
I've had problems with JSON array strings between languages before :P
 
user3119231
7:25 AM
@littlepootis started to work 20 minutes ago. fixed the problem from yesterday in 10 minutes with the use of an object.
 
user3119231
I don't know why but php seems to have problems with multidimensional [ ] arrays.
 
@Sheepy I wish i can give u cookies..
 
user3119231
Sheepy is da mvp
 
7:27 AM
!!>var f=(a,b=[],r=[])=>(a.sort().forEach(e=>(r.includes(e)?b:r).push(e)),r.concat((b‌​‌​+"")?f(b):[]));f([5,7,7,4,6,0,2,3,2])
 
@StephanMuller [0,2,3,4,5,6,7,2,7]
 
you don't need that first e
 
@Sheepy ah, well in that case, carry on! Well done, sir ;)
 
Well, choz wanted the shortest way to do something. I take it literally~
 
Now, that is short..
 
7:29 AM
It's something I do a lot to homework asking students. The betters ones will say "thanks but I've no clue". They are the stars of the future. The bad ones will hand it out as homework and I've saved them from a future they won't like. I hope.
 
@Sheepy you're a tutor?
 
@choz if I come across sheepy's code at work because you copied and pasted it in, I will kill you in your sleep. ;)
 
oh wow it's recursive too
 
@Neil His code still haunts me where forEach(... dosth), r.concat ... I am like.. WTH is that coma doing..
 
7:31 AM
@choz No. But you get homework questions on every programming community. Every.
Yeah, that. :p I bet I am the one who use most comma operator in this room. If not the only one.
 
commas are so annoying when debugging
 
@choz yeah, important distinction should be made that readable code is not necessarily short code
 
no, I want my breakpoint right where I set it, not 3 lines below
 
@Sheepy Oh, I can relate to 9gag.com/gag/arK7905?ref=android
 
user3119231
7:36 AM
@littlepootis working = random
 
I never got homework questions at my university. I was given homework programs to do
 
@Maurice hah
 
TIL Chrome can't do relative positioning with top:50% even though Firefox can
 
@choz Finally fixed it
 
7:45 AM
thanks for you help :)
 
@Shashi What was the issue again? :P
 
haha....I was not able to get the input file from the current element...rather on change took the file form first element with that id
$(this).children('input')[0].files[0];
this got it
 
Nice
 
@Shashi this.querySelector('input').files[0] // No need jQuery. Shorter cleaner and faster.
 
@Sheepy Shorter by 1 character.
 
7:50 AM
@Sheepy hehe :D thanks :)
 
hi all, why is it not detecting a simple function ?
in console I get method not exists, when it's clearly there
 
Guess where I made changes.. :p
 
Think of the CPU cycles that one character might save. It might have avoided a page fault, TCP packet lost, or a memory overflow exception on the server! :D
 
@Mathematics jsfiddle adds an onLoad wrapper automatically. You shouldn't be using inline handlers, though
 
7:53 AM
@choz u set my code to run on window.onload ? lol
 
@Sheepy getElementsByTagName
 
Lol
 
@JanDvorak I have very little understanding of that
 
@Mathematics *you
 
@Mathematics next is showLatestTime is not defined :(
 
7:54 AM
@JanDvorak That'd force the browser to go through all (input) children, like the jQuery code.
querySelector will break on first result.
 
.find("input:first")
 
Someone please give Sheepy goddamn cookies..
.find returns all input:first. Still needs to use get(0) to get element tho
Unless, there's only 1 input:first
 
doXSS(Users.find("Sheepy").first, (()=>window.cookie = "calories = 45000; expires: never").toString())
 
@JanDvorak That triggers the jQuery CSS engine. In my opinion that's often worse than children()[0]...
 
@choz where did you changed what, I am bit confused now :(
 
7:59 AM
@JanDvorak /me balloons up and float to the sky o_O
 

« first day (2043 days earlier)      last day (2910 days later) »