« first day (2028 days earlier)      last day (2913 days later) » 

12:07 AM
youtu.be/GsB-rdWnedw?t=24m39s I'm actually crying with laughter
 
Second to last day at my job. I promised myself I wouldn't cry!
 
1:07 AM
@rlemon eTractor
 
else if(ch == '1')
failed code review
 
HDT
2:11 AM
hello
 
3:02 AM
I've got a variable named dots that is equal to all elements with address tag with a class. I want to check every one and trigger when they are clicked. I'm doing a for statement, looping through all the <a> tags and checking when they're clicked. It's not working as in the click function doesn't trigger.
 
@Shmiddty oh. no chain mail bikinis? nm.
 
Hello, I have a response from Youtube API. It is returned in my index.html on an id element. So, now my index.html has an JSON object. Should I save that file as .json file in order to use it ?
 
@BillyHalim 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.
 
@BillyHalim no
 
@Shea
 
3:09 AM
You parse the JSON object
How do you even save it?
 
@Shea So, how do I access the properties of the JSON object and display it on a <div> ?
 
!!>JSON.parse('{"a":"b"}');
 
@Shea {"a":"b"}
 
!!>var myObject = JSON.parse('{"a":"b"}'); console.log(myObject.a);
 
@Shea "undefined" Logged: "b"
 
3:12 AM
@BillyHalim yourDiv.textContent = JSON.parse(yourJSON).property
 
@Shea I don't use JSON.parse but I use JSON.stringify
 
Why do you want to stringify a string?
 
@BillyHalim sounds like a personal problem
 
yo dawg
 
i heard you like strings
 
3:13 AM
Here's the code :
function onClientLoad() {
	gapi.client.setApiKey('#hidden');
    gapi.client.load('youtube', 'v3').then(function(){
			var request = gapi.client.youtube.search.list({
			part: 'snippet',
			q : 'gfriend'
		});
			request.then(function(response){
				var responseString = JSON.stringify(response, '', 2);
				document.getElementById('response').innerHTML += responseString;
				console.log(response.result);
			}, function(reason){
				 console.log('Error: ' + reason.result.error.message);
 
!!doge string,JSON,parse
 
      wow
            many string
                      much JSON
very parse
 
BRO DONT STRINGIFY THE RESPONSE
 
^ use JSON.parse instead.
 
@littlepootis I don't know. I modify the code from Codecademy. It uses JSON.stringify
 
3:15 AM
I have a variable which is equal to a jQuery class selector. How can I the element of the selector and get the element's id?
the element of which the selector is pointing to
 
maybe the request promise is returning a JS object and he's stringifying in order to stick it in the dom for display as json
we can't really tell.
 
@AndrewL document.querySelector(selector), document.querySelector(selector).id
 
@Luggage If I used JSON.parse, it has an error : cb=gapi.loaded_0:43 Uncaught SyntaxError: Unexpected token o in JSON at position 1(anonymous function)
 
[object Object]
 ^ unexpected o
so umm
 
ok, so don't parse, just try to access properties directly from response
 
3:18 AM
cb=gapi.loaded it's padded
 
yea, it's not JSON, he's getting. he's getting a JS object.
 
Thanks!
 
@Luggage I can't access the properties because there is no a variable that assign the JSON object. I mean var object = { } . It begins with { }
 
				var responseString = JSON.stringify(response, '', 2);
				document.getElementById('response').innerHTML += responseString;
				console.log(response.result);
replace that with
console.log(response);
you're welcome
 
@Shea Yeah, it works. It returned 200 but how to I use the properties from that JSON object ?
 
3:21 AM
1 min ago, by Shea
console.log(response);
 
[1 year ago](https://www.youtube.com/watch?v=kfVsfOSbJY0), by Luggage
| console.log(response);
awww.
I'll leave my embarrassing screw-up for all to see.
 
@Luggage @Shea Are there any solution ?
 
it returned 200?
It's the response code..
Not the response data...
....
 
then response must have some other propery besides .result
 
@littlepootis Yes, I just want to access the properties of the response data
Because the JSON object starts with { } instead of var object = { }, I don't know how to access the properties
 
3:24 AM
console.log(arguments);
you're welcome
 
log the entire response object
or that ^^
 
@Shea it returned [Object]
 
what browser are you using
 
@Shea the latest version of Opera
 
I quit
 
3:26 AM
Use a sane browser
Or open dragonfly
 
use a browser with decent developer tools
 
Yeah I use the Console now to see the response
 
do u even debug?
 
@littlepootis No.
I think I would save that page as a .json file
 
This is some sexy documentation: developers.google.com/youtube/v3/docs/#Captions
 
3:28 AM
Because if I save that, I could fetch it using XMLHttpRequest or Ajax
@Luggage The documentation doesn't cover the JSON
 
No, I'm just saying it's sexy.
makes me want to read it all night long.
and again in the morning
 
@BillyHalim it sure does
 
@BillyHalim Are you getting paid for this?
 
@littlepootis No, I am just learning Youtube v3 API
 
but do you know JavaScript?
 
3:33 AM
@Shea Yes of course I know
 
do you know of JavaScript or do you actually know JavaScript?
 
@Shea I actually know JS
 
so if I ask JavaScript, he'll say he knows you?
 
[the f-word] windows
 
3:55 AM
fuck?
 
fire?
 
@Shea lol
 
4:29 AM
fruit
famous
fantastic
fun
fap
fraud
 
4:42 AM
fugly
 
friendship
 
what? I could only make out "cyber".
 
Die unbekannten Hacker machen Cyber-offense!
Or something. My German sucks
I'd originally thought that giving myself 5 years to learn a language was reasonable. Now I'm not so sure :P
It's already been > 1 year
 
I don't have the capacity to learn a second language
That's evident by the fact that I've lived in California my whole life, and I still don't know Spanish
 
4:57 AM
I lived in Hyderabad for 13 years and I still don't know Hindi
 
@littlepootis you are just ignorant
 
Oh, how's your Russian going, @Abhishrek?
 
@SomeGuy Going Okay.
 
Where are you learning from, again?
 
5:06 AM
 
Duolingo + Real russian friends who I spent like 2 - 4 hours talking to.
@Shea ?
@littlepootis do you know telagu ?
 
around here, the only people that say, "ignorant" typically pronounce it "ignant".
 
@Abhishrek It's telugu*, yeah
 
@littlepootis (: and your watchmen's grandchildren do not?
 
@Abhishrek nope
 
5:08 AM
that is very interesting
 
40% of the peeps in my city don't
 
Anybody up for teaching me Civ5 ?
@littlepootis thats very interesting
in Bangalore most people speak at least basic kannada
 
The reason is this place was under the Nizams.
One of the few places in India that was never under the British.
So, almost everyone speak Hindi and/or Urdu and/orArabic
 
@Abhishrek just ignore all of the trade requests
 
lol k
 
5:50 AM
6
Q: How to get this glass shatter effect to work on multiple divs?

user1658560Situation I have this glass shatter effect simulation that involves some basic javacsript code and right now it works fine; When you click on the logo, the glass shatters accordingly and then a new unshattered logo re-appears in its place. Take a look at the jSFiddle here: https://fiddle.jshel...

 
Hello all, I want to discuss one thing.
I have much expereince with custom development. Now i am shifted to Kohana framework so i wanted to make functions which other developers will called
right now there is controller and model for each component
i dont like this way. What i like is there should be only 2 controllers and models which handle all functions and other developers will just call those functions
this way code will be more organised
what you say guys?
 
hola
 
@user1658560 It doesn't work because none of your code is reusable
 
6:11 AM
hello,
connection.query(selectUserName, function(error, rows){
				if(error){
					console.log(err);
					deferred.reject(err);
				}
				else if(rows.length === 0){
					console.log("no row found");

				}else{
					deferred.resolve(rows);
				}
			});
at the line rows.length ===0 how to send result that no rows found using deferred?
 
move the condition into your resolve function
 
6:28 AM
I want to discuss about getting a T-Shirt — Mr_Green 15 secs ago
 
@littlepootis Hey thanks for looking at my code. Just by looking at it quickly, do you know if it would be possible to make the code reusable? Without having to re-work most of it?
 
@Shea what u mean?
 
what didn't you understand?
 
u want me to have the if condition in the resolve method?
deferred.resolve(function(){
    if() // condition
})
something like this?
 
yeah
 
6:34 AM
i tried it
it wont work
 
if rows get's passed to the resolve function, then just check it's length there
well.... sucks to be you
 
why you are being rude with him?
if you want to help just help otherwise leave it.
 
tha fuck
 
He was being rude?
 
quite frankly I find it rude that he was calling me rude >:(
 
6:47 AM
@Shea sucks to be you :D
 
yeah, sucks to be you
 
shea, you were. check your above message
 
that would be rude, if you knew what it was like to be me
 
my distro is going to be the best distro of 2017
 
@Mr_Green where
 
6:49 AM
@AwalGarg Uploaded it?
 
there's a lot of messages about that one
 
@littlepootis how do I upload a 675megs image on this shitty connection? :(
 
@AwalGarg You can't export just the configuration?
like
 
@Shea this one
 
@littlepootis I can upload the archiso configs and you can build it locally?
 
6:50 AM
@Mr_Green bro do you even english?
 
@Mr_Green how's that rude
 
how is that rude?
@AwalGarg yeah
 
:(
 
my culture must be a little different, can you explain?
 
I thought that is rude
what does it mean then?
 
6:51 AM
That's not rude, that's just empathetic
 
an observation, just as it says.
would it have been less rude if I had said, "I'm sorry that it sucks to be you"?
 
@user1658560 Nope.. re-writing is the best thing you could do.
 
maybe I misinterpreted it. I take my words back.
 
thank you, I take my "tha fuck" back
 
6:55 AM
I take my "bro do you even" back
 
@littlepootis bro do you even "bro do you even"?
 
we cool right?
 
I just restarted my Dad's PC and it said "You must restart your computer to apply these changes" ugh
@Mr_Green I'm the opposite of cool ( ͡° ͜ʖ ͡°)
 
no, only girls are hot
 
@Mr_Green My gay friend disagrees with you
 
but..
 
how can i stop click event on disabled attribute ?
 
@littlepootis how old are ya
 
@taco he is 12
 
7:02 AM
oh ok
so older than most question posters >:d
 
I know I know. You'd think he would be younger based on how he talks. but...
 
@BhavinShah one option would be an explicit condition. You can't click an attribute, though.
 
he did always seem young to me
I feel old now >:/
 
how young?
 
7:04 AM
bad young
 
like 16
Awal... you are .... 23?
 
Jan is 28
 
@taco thank you. You are now my most favorite person in here.
 
Oh, man now I feel old
 
7:05 AM
@taco That is why they get along together so well
 
@SomeKittens is probably like 20 and started working in Silicon Valley at the age of 11
 
@littlepootis "they"?
 
I'm 39 >:|
 
@AwalGarg You and Jan
 
@taco lol
 
7:06 AM
I remember the 80's and not just from VH1
 
I thought you were much younger..
 
Oh no, my dear padawan
I'll go see my therapist now tho
 
@taco oh. Oh, ok :)
Not too old then
I'm 34
 
how old are you neil? 34?
damn im good
 
*I'm
 
7:08 AM
28!
 
@taco how old am I?
 
@Shea 17
 
LOL
fits
 
wait, 2nd guess?
 
must be my adhd
 
7:11 AM
22?
 
26 in October
 
o
 
@taco what is my country of origin?
 
I can guess @SomeGuy's age. 20. I am very good at this too.
 
7:12 AM
Grammerland
 
Well age is hardly relevant for me. I hate everyone equally.
 
@JanDvorak Slavic?
 
@JanDvorak Is it Italy? Or Czech?
 
@Neil lol
 
It's Czech
 
7:14 AM
:O
 
I was thinking Czech based on your last name
 
Same.
Shouldn't it be Dvořák?
 
Garg is Asian
 
@littlepootis yes. Should I update?
 
@JanDvorak dont
Royall is Viking
 
7:15 AM
Hi , All
 
@AhammadaliPK 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.
 
dont as in don't? I won't then.
 
Jan is sometimes funny too :P
 
@AhammadaliPK Hi PK.
@AwalGarg I see what you did there
 
@AwalGarg yeah, but you shouldn't judge a book by its cover
 
7:17 AM
Hi, @littlepootis
 
Shrek is Love
 
@Abhishrek you go back to your exile and must not return for 14 years :P
 
@Neil o/
 
@AwalGarg but... his request that I don't correct his grammar times out in just three days.
 
I recommend someone to put an interesting topic here , so our chat will go on
 
7:20 AM
s/our chat/my heart/
 
@AhammadaliPK ok. so is that your driver's license photo?
 
@Shea o/ \o
 
ha ha yes
 
lol
 
@AhammadaliPK Have you ever been to Nojsia?
 
7:22 AM
It look when I was studying in degree second year
 
@AhammadaliPK What do you think of girls?
5
 
@taco oh god bahahahahahaha
 
this is some what a tough question
 
do go on
Girls are a tough subject for us all!
 
I can imagine a typical Indian dad asking his son that question in an internet chat related to programming
 
7:24 AM
@taco that's sexist
 
taco made my day two times today
 
I think girls are the most beautiful creation, at same time most dangerous
 
good taco
 
very true @AhammadaliPK
The best girls know programming @AhammadaliPK
The second best girls give good ****
 
The best girls also avoid me
 
7:27 AM
I wish to marry a girl who knows programming in next year
 
Smart man
 
@AhammadaliPK gr8 m8 8/8
 
then you can retire at a young age
 
gonna bookmark all this. best treat in a long time
 
@AwalGarg how about a girl?
 
7:28 AM
if so , will have more to discuss , more to debate etc etc
@taco , yes I hope i can retire at the age of 35
 
@AhammadaliPK feel free to ask me dating advice anytime. I'm a 39 year old man who has dated 19 girls. Very many by American standards. 18 of them were programmers.
 
@AhammadaliPK just think: you could make that "there are 10 types of people in this world. .." joke and she'd laugh and laugh
 
cya guys, lunchtime is over
 
and laugh and laugh and
 
yes, you should retire at 35. I did. I am 39 now. I just chat all day
 
7:30 AM
wow,that's cool
@taco, here we have no dating
3
 
yeah no dating in India. straight to reproduction
 
ha ha cool
we need something to be put to avoid reproduction
 
I like to try my shoes on before I buy them
 
ha ha ,cool man
what about your eating?
 
7:33 AM
@Shea lol
 
what?
I was just talking about shoes
 
:30354557
 
@AhammadaliPK yes, I'm working on it
 
@littlepootis Legalize gay marriage
- Russel Peters
 
Illegalize straight marriage
 
7:35 AM
@AhammadaliPK like a laptop with a sane linux distro and vim?
 
So you go up to a girl and say, "My genetic code has very few defects," and she thinks a second and says "I want two girls and one boy"?
6
 
@AwalGarg , sorry didn't get?
 
I really suck in english. I can't understand jokes here
 
@Neil Over here the enrollment trends (atleast in my city's medical institution enrollment are dominated by girls), so over here that might be the other way around.
 
@Neil lmao dude
 
7:37 AM
 
guys , I need to have lunch right now..taking off
 
An update?
 
thank you everyone
 
@littlepootis yeah
 
Like Civ IV to Civ V?
 
7:38 AM
No
 
How large is the update? That's ridiculous
 
Lol
it went higher up now it says 2 days and 12 hours
 
dem my numberz
 
I should just leave it and do something productive, like build a quad copter
 
you should just pirate Civ 5 via torrents
you bought it, so it's morally okay now
 
7:40 AM
@Abhishrek or build a small doghouse
 
steam doesn't p2p? why not?
 
Youtoob down :(
 
@Neil Error 404 Lawn not found
 
down
 
7:42 AM
left right left right a b
 
@AhammadaliPK and you cannot be with your friends and make stories about how much work you have.
 
Idkfa
 
Guys, can someone explain what exactly is going in this code? programmers.stackexchange.com/questions/289972/… Why is the inner constructor hidden behind the self executing outer function? Is that so the outer function acts as a wrapper to have the prototype extension in one place, not poluting global space?
 
I played civ 1 the other day
cool game
 
@BenjaminGruenbaum must have been blinking at 1600 fps on svga. How'd you manage that?
Dos box maybe?
 
7:57 AM
@DavidPacker the idea is that you can put non-standard private variables in the IIFE outside of the constructor
this would normally be done with removing the getter from a property of the constructor, but it takes more knowledge to understand so sometimes people just use IIFEs
in this case it's redundant
 

« first day (2028 days earlier)      last day (2913 days later) »