« first day (1674 days earlier)      last day (3279 days later) » 

Ok.
 
i would use jquery if you are just trying to get data from a file
is a lot easier than what you posted I think
though I can't see it now lol
 
.-. I just wanted the stupid url.
There lol.
 
you should just be able to specify the url it seems to me
 
What you mean?
Just put scripts/bahbahbah
 
7:03 PM
but jquery is the way to go think it is less complicated lol
 
It is less complicated :P
I just ripped it off of w3school
Cause I was lazy.
 
when in doubt use jquery :)
 
^
 
where you put ../../../scripts/oAuth2/oAuthPhp.php just put the file path instead of the ../
 
I tried that Richard.
 
7:04 PM
@Matt fail
 
jk just figure out how to write your filepath haha
 
It will try to look relative. xD
Now you all know of my laziness :P
 
if you have just taken it off w3school it could be something else in the code that isn't right
might not be the file path
 
@Matt using w3schools is not laziness. It's shooting oneself in the foot.
 
idk what you're trying to achieve but if you just want to get data from a file just use jquery .get() surely?
 
7:06 PM
Well the file I am getting is api request xD
 
w3schools isnt that bad?
 
So it needs to return the infomation off the api request.
 
@nick it is
 
w3school can be bad a times, great for learners.
 
@Matt It's not. Their code samples are not even indented properly.
 
7:08 PM
@salniro Hey
 
i dunno i just treat it like any other source
 
@nick don't
 
lots of folks seem to hate w3schools but never seem to know why
 
@nick I know exactly why I hate w3schools
 
are you gonna link me to w3fools.com? :)
 
7:11 PM
test
 
Attack of the geometric avatars!
 
well.. Time to write this is jquery..
 
ahaha
agreed, brb downloading jquery
 
@nick W3fools sucks ever since they say "w3schools kinda sucks" without listing all of the numerous examples that w3schools sucks at
 
@JanDvorak exactly
 
7:12 PM
Just wanted to avoid a messy file because when I gonna use it I'm going to rewrite it... lol
 
i mean when i look for answers i just google it, i don't use a particular site
w3schools seems to come up on top a lot
 
Well it sets the "laws"
 
sometimes its helpful, sometimes the info is not relevant at all
 
w3school is great to get reference info
But there examples aren't the best.
 
no it isn't
 
7:14 PM
but same goes for MDN really
 
@nick sometimes there's missing information, sometimes it's flat out wrong
 
although mdn tends to have more detailed breakdowns
 
w3schools should be avoided. MDN is at least a public wiki, find a mistake and fix it
 
@rlemon ah i didnt know it was a wiki
 
I haven't found one wrong info et on w3school, but thing again I just search for the simple things I forget cause I never use.
 
7:14 PM
w3schools code samples always suck. Most of them in more than one way, literally.
 
ok, my post is out! Thoughts? Opinions? codepen.io/MateiGCopot/blog/canvas-animations-how-i-like-them
8
(took me more than 8 hours to write, seriously)
 
@Matt sure you want me to look for some? Which category?
 
yeah its quite lengthy haha
 
@Matt link me a page, I bet you I can find 3 things wrong on it
on every page.
 
what do you use these animations for though?
 
7:16 PM
Alright. Damn, I'm interested in this.
 
@NickDugger Loading forever
 
Just go ahead and shred this page. w3schools.com/php/php_ajax_php.asp
 
@Matt sin 0.5: PHP
@Matt Their example fails whenever the user input contains a &
 
and that is just on face value
 
Okay lol.
 
7:19 PM
if I actually took the time to look for edge cases or things like Jan stated there would be more
 
I know it chaces the pages xD
 
@Matt Not sure what their supposed browser support is, but I'd prefer onload over onreadystatechange
 
@rlemon maybe add my thing in the js resources?
 
I don't own it
 
@rlemon Eh, if you know for a fact that both sides are numbers then == is not that bad
 
7:20 PM
@Matt They use <b> for formatting
 
That said, I have jshint to warn me about equality checks without === so there's that.
 
@MadaraUchiha bad habbit to maintain
use ===
 
xD Shred you did.
 
// Array with names
$a[] = "Anna";
$a[] = "Brittany";
$a[] = "Cinderella";
$a[] = "Diana";
$a[] = "Eva";
$a[] = "Fiona";
$a[] = "Gunda";
$a[] = "Hege";
$a[] = "Inga";
$a[] = "Johanna";
$a[] = "Kitty";
$a[] = "Linda";
$a[] = "Nina";
$a[] = "Ophelia";
$a[] = "Petunia";
$a[] = "Amanda";
$a[] = "Raquel";
$a[] = "Cindy";
$a[] = "Doris";
$a[] = "Eve";
$a[] = "Evita";
$a[] = "Sunniva";
$a[] = "Tove";
$a[] = "Unni";
$a[] = "Violet";
$a[] = "Liza";
$a[] = "Elizabeth";
$a[] = "Ellen";
$a[] = "Wenche";
$a[] = "Vicky";
I'm no php expert.. but ... LOL
 
7:21 PM
lol
 
^
 
lol
 
Yeah... that is atrocious
 
lel
 
if ($q !== "") {
 
7:21 PM
@rlemon I was laughing at that too.
 
kek
 
wait. does php use !== ????
 
Why does it start alphabetically sorted, but then everything goes to hell?
 
I thought they were exclusive == and !=
 
And what kind of name is "Wenche"? That's predestination
 
7:22 PM
@Matt I think the last code sample speaks for itself.
 
It does. xD
 
well a !== would prevent casting in js right?
 
yea php does use it
 
Yeah. That's the other sin of str.length == 0
 
I didn't remember that. strange.
 
7:24 PM
They aren't even consistent. If they were, they'd use strlen($q) == 0 on the PHP side
 
php and js parts were written by different people likely
 
Bible was written by more than two different people, is way larger and, unlike that page, self-consistent
 
jquery, how I love you so. <3
 
@Matt Just learn XHR from MDN ;-)
 
xhr?xD
 
7:27 PM
xmlhttprequest
 
ohhhh haha
 
1
Q: ES6 Generators: poor stack trace from iterator.throw(err)

AvalancheThe ECMAScript-6 iterator.throw(err) method is often described as injecting an exception as though it occurred at the yield statement in the generator. The problem is that the stack trace for this exception does not contain any reference to the file/line for the yield statement, or even the func...

@BenjaminGruenbaum ^
 
Alright. Since I'm laughing here and just lazyy.
 
anyone want to have a quick look at my post and offer any suggestions? stackoverflow.com/questions/30269503/…
 
7:32 PM
How to get the words on the page from jquery ajax, I don't want the html at all. I just want the words.
 
awesome i'm in the trash can now
 
Same.
 
@nick how do you like it?
 
it's humid in here
 
@Matt Unless the server can cooperate, you are going to get HTML, and you'l have to parse the result.
 
7:34 PM
it could use some AC but yeah i guess its nice
 
Darn.. Oh well... I have to parse anyways.
 
@MadaraUchiha hey I just wanted to touch base with you
 
oh, it wasn't a joke aswell?
 
why the hell do you guys have those weirdo avatars?
 
7:34 PM
matt, nick, richard
 
it's the default avatar, right?
 
@rlemon he called your face weird
 
@AwalGarg patt, erick, bradford
 
wait no that was another guy
 
yeah, and they are meant to be changed
 
7:35 PM
theres beauty in geometry
 
the 2 peeps in my foto are beautiful aswell
so...
do you want a photo of me that you can use?
:P
 
@towc the two guys you mean ?
 
@towc 2? where is the second one? :P
 
@nick it is
protip: the face in the pic isn't mine.
 
@rlemon wait... it's not?
 
7:37 PM
ah ok you're just a wannabe hipster
 
@Abhishrek -_-
 
@rlemon yeah that's why it isn't that weird right now :D
 
@towc Same here, that's actually not me
 
@nick if I wanted to be like you I would change my name to @nic
 
My gravatar is 100% my face. Almost.
 
7:38 PM
@rlemon I thought you just got a lot fatter during the hangouts...
is that really not you???
 
I did
 
@SomeKittens is that even a real thing?
 
the body and hair is, the face is not
 
Are the generic dp´s generated?
 
@MaxCoates 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.
 
7:38 PM
 
just out intrest
 
@AwalGarg what do you want to say? Huh?
 
^ the face
 
@towc of course!
Why would you ever think it wasn't?
 
what is it?
 
7:39 PM
@rlemon in about 5 mins youre gonna see an army of @nicks in here
 
it looks like something completely abstract to me
 
@nick my kick button is ready
 
@towc I only see one beautiful face in your gravatar :P
just kidding :P
 
Oh crap.. Regexp
/some/stuff/g
How I ignore the / in the middle?
 
@nick WE MUST UNITE
 
7:40 PM
Oh wait... I'm stupid.
shoots self
 
@AwalGarg wait for me right where you are. I'm coming with a tank and an army of spiders
 
Which reminds me, if someone opens that hangout link, can the other people see his name/email?
 
@AwalGarg yup
 
o..k
 
@towc i am very impressed by your article
so much that i am going to make a canvas demo now
 
7:45 PM
:D thanks
did you manage to read it all? How long did that take from you?
 
@towc i took classes on fast reading
don't count my reading speed with others
 
lol XD
 
hey i read the goblet of fire in a single day :P
 
0.o
 
@Abhishrek what. you don't mean the wikipedia page for it?
 
7:47 PM
@AwalGarg nope
24 hours straight though :-D
its only 636 pages :P
 
@Abhishrek name of cedrics's father?
(don't google ._.)
 
it was years ago :P i don't remember the whole book :P , it was 2003 - 05 iirc
 
wow reading something 24 hours straight is quite a deal, imo
 
@Abhishrek I probably had learnt how to recognize my name in colors on a blackboard by that age
 
@towc now i feel old
 
7:49 PM
you should
:P
 
I saw a computer for the first time in my life in 2007 I think.
 
is there a thing like es6 codepen :->
 
@Abhishrek codepen can compile from traceur, though
 
no no no
traceur sucks
babel can run in realtime :P
 
yeah, says the corrupted typescript guy :D
 
7:53 PM
says the php jerk
 
lol
1 min ago, by Abhishrek
says the php jerk
^ that, I am
 
you are a RO ?
 
no
 
meh am gonan study
 
Is this a valid variable? Data.event?
 
7:59 PM
That's not a variable
 
No? D:
 
What's your question?
 
2 mins ago, by Matt
Is this a valid variable? Data.event?
 
Well.. I want a var then I want to store it inside a sub-var inside the main var.
Data was just an example.
 
Sure. Just don't call it a variable.
 
8:02 PM
dataStorage.event, better? haha
 
Valid? Yes. Variable? No.
 
Hm..
I could of swore it was that like..
 
swearing something isn't always right
 
xD
Okay.. Something like this.
var buildings = [
{ name:"Asteroid Mine", level: 1, resources: [ "Food",-1, "Energy",-1, "Water",-1, "Ore",9, "Gem Stones",2 ] },
Is that small enough it find to paste here? Or would that still need github?
 
resources shouldn't be an array
 
8:06 PM
for what ? i just entered the room, so i don't know what your question is.
 
But couldn't it be buildings.resources.food
Wouldn't that how you call it?
 
buildings.resources.food won't work if you do this.
not even buildings[0].resources.food
 
so this would..
buildings[0].resources[0]
 
ah that, you have to make it as object
 
@Matt that would be "food"
 
8:08 PM
Yeah. Good then xD
 
is it?
 
I dunno.
 
not good practice. you should link the resource name with the amount in an object
 
Okay.
 
!!> (function () { "use strict"; var foo = 'bar'; foo.stuff = 'baz'; return [foo, foo.stuff]; })()
 
8:19 PM
@AwalGarg "undefined"
@AwalGarg ["bar","undefined"]
 
^ this gives a super weird error in chrome :/
> Uncaught TypeError: Cannot assign to read only property 'stuff' of bar
Anyone can repro?
 
foo is a frozen object
you can't assign anything to it
 
foo is already 'bar'
 
yes, but "read only property 'stuff' of bar" makes no sense
 
if it's an object, you can assign stuff to it
 
8:26 PM
@AwalGarg Yes
 
@towc foo is not an object at all
@MadaraUchiha can you make any sense out of that error message?
 
string = char array = object
 
stuff is not a property of bar. bar is not even defined
 
@AwalGarg Probably something about not being to set the properties of a string object or something
 
@towc what? no?
 
8:27 PM
yes :P
everything in js is an object
even numbers
 
!!> Object.getPrototypeOf('foo')
 
@AwalGarg ""
 
^ @towc run that in console
 
how about foo.length, .replace, .everything?
 
@towc no. strings are immutable primitives
@towc because String wraps around them
 
8:28 PM
if you say so
I may be wrong, but for what I know they're objects
 
...don't take my word for it. Read the spec :P
 
(never did any proper research)
 
@MadaraUchiha why does it say "property ... of bar" what is bar?
there is no bar here :/
 
@AwalGarg Your string
 
@MadaraUchiha it was never defined a property called stuff. It was defined on foo which is my variable.
 
8:30 PM
vOv
 
also: foo.valueOf() = foo?
 
And FF let's me assign a property (failing silently) to a primitive :/ both look stupid behavior.
 
what's that for?
 
Does private var in js exist? As in making a var global for this script, but not for others to access.
 
@Matt yup
just set them in a different scope
 
8:32 PM
!!> var foo = 'bar'; foo.valueOf();
 
@AwalGarg "bar"
 
Well time to google. lol.
 
no repro?
 
Hm... How do you use a scope for the current scripts to access, but not for other scripts to access?
 
!!> function foo () { var myPrivateVar = 'hunter2'; }; typeof myPrivateVar;
 
8:34 PM
@AwalGarg "undefined"
 
@Matt look up "IIFE"
 
var global = 'this is global';
(function(){
   var local = 'this is local';
})()
and wrap everything that needs to be done locally in there
 
for a more formal definition, lookup revealing module pattern.
 
Okay. That might be what I need, thanks.
 
So I'm not able to help anyone, here, huh? [walks away alone]
 
8:37 PM
says the canvas expert
 
I meant that too all three of you guys, @towc
 
:D
@AwalGarg wait a few more years. Maybe then you can call me an expert
 
@towc yeah, from my POV, you are a canvas expert. My knowledge in canvas: <canvas />
 
@AwalGarg lol, makes sense now :P
 
Is canvas that animation stuff with css?
 
8:39 PM
also: that's an invalid tag
 
Owned :)
 
@towc yes, you're welcome :P
 
@Matt can't tell if a joke or not
 
xD
It's a joke.
 
good XD
 
8:40 PM
Now seriously, what with the animation stuff? :P
 
yeah, animations
 
Teach me :O
 
completely different from css tho
 
DOM canvas is basically a stripped down version of AE with an inferior API :P
</whinning>
 
Hah okay.
 
I can't see the w3school link... I think you posted the wrong one or are you hiding it? @rlemon @JanDvorak
 
uhh... what???
 
@towc thanks, I'll read it later. Saved in my favorites.
 
@towc I am thinking of learning canvas. I allow you to allow me to vamp you anytime and everytime, ok?
 
@AwalGarg sure. let me finish with your mother first, k?
 
8:45 PM
:P
 
awal, try to do the same foo stuff with {}
 
the property will get assigned, what's new in that?
 
just saying that you can do that only with objects
 
...
 
meh, not right term
*non global objects
 

« first day (1674 days earlier)      last day (3279 days later) »