« first day (1527 days earlier)      last day (3411 days later) » 

12:12 AM
In Karma how do you test a complete webpage? If you include the html file then all the page assets are 404. Is there any way to specify what directory to serve from?
 
12:56 AM
Over 1500 games woot
man.. seeing a lot of people with 2k though lately
I'm honestly having trouble finding games to buy that aren't just complete garbage on Steam :/
 
@Loktar buy them anyway
 
yeah well my code doesn't work when it should, everyone got #firstworldproblems ok :(
WHY DOESN'T MY CODE WORK :(
 
lol
 
sad panda
 
My code works, and I have no idea why
I'm scared to commit it
 
12:58 AM
commit in a branch "works-but-shouldnt"
 
#GitFlowWorkflow
 
m59
1:22 AM
WHY DOESN'T MY CODE TWERK codevinsky.github.io/twerk-js @FlorianMargaine
 
no thanks
 
1:43 AM
don't forget to unonebox :P
especially annoying gifs
@SomeKittens ^
 
@NoahHuppert Use Protractor instead of karma
@FlorianMargaine whoops
 
1:55 AM
Hi there.
 
@MikeM. 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.
 
oh wow xD
jsfiddle.net/bmLrq2e8/1 I don't see why it doesn't alert anyone can help me with it? I am trying to learn it but I am going up with question marks.
 
see the options of jsfiddle in the left panel
 
Would it still work if I included it into the <body> tag instead of the <head>
 
2:00 AM
If I select (no wrap - in body) it works
but when I try it on my end in my dev area it doesn't
 
well, look at the console
check any error
 
Uncaught TypeError: string is not a function
No idea why
 
there should be a line number or a file name next to the error
click on it
 
'<input id="test" name="chkTest" type="checkbox" onClick="action();" />'
That's the line it says.
is the exact code.
and it does work on JSFiddle xD
Got it.
Changed my method name to doAction() and that fixed it, probably because action() is already an existing attribute :)
 
Sim
2:30 AM
anyone here
 
@Sim No.
 
Sim
what are the chances people are going to detect between letter O and number 0
for SSID
 
20%
 
+- 80i%
 
Sim
im talking about non technical people?
 
2:34 AM
Non-technical people technically aren't people.
 
Sim
the network name is example ATT100 and i changed it to ATT1OO
 
Why?
 
Sim
piss someone off lol
 
that'll do it
 
Sim
cool beans lol
 
2:36 AM
Growing up would probably be a better plan
 
Sim
i know but just for fun
 
Growing up is so unfun.
 
Sim
point so whats going on
 
Maybe.
 
Sim
lol i can't wait until monday lol
who will do that just to piss someone off? lol
 
2:39 AM
I'll piss you off now.
 
Sim
lol
you can't beat that guy lol
anyways enjoy coding :)))
 
3:17 AM
anyone not afk?
 
 
2 hours later…
5:03 AM
yes you can
 
 
2 hours later…
6:47 AM
anyone with experience on speed performance optimization?
 
user3949359
is there any other way of setting up tabulator on your page except for jQuery?
 
user3949359
7:12 AM
Can one use nested classes inside the jQuery selector?
 
8:15 AM
@BenjaminGruenbaum yeah
between work and the gym I barely had time to poop
 
9:04 AM
hey friends
 
9:22 AM
@MRS1367 Hey!
Is there a HTML way to attach a JS function to an HTML element? The function is not an event handler per se. It would be called from the code. I'm kind of thinking about this as if I were adding a new method to an object (HTML element being an object).
 
@NickAlexeev you probably don't want to do that.
Who is starring random shit.
 
@phenomnomnominal Why not? I'm trying to reduce the distance between the HTML and the code. I have an array of divs. They are similar, but slightly different. I could set up a separate array of functions, but then I would have to keep track of order of things in 2 separate places, which I don't like.
 
I would suggest an array of objects, where each object knows about an element and a function.
 
@phenomnomnominal Basically, you are suggesting to mirror the structure in the JS code. Probably initialize it in the code too.
 
no, because the HTML shouldn't know about the functions.
HTML should never know about functions.
@NickAlexeev would you be able to show me some code?
 
9:33 AM
Hmmm... I'm groping for polymorphism here.
@phenomnomnominal I haven't written the code, which I'm talking about yet. I'm planning ahead at this stage.
The goal is this.
 
@NickAlexeev JavaScript is duck typed, so polymorphism just kinda happens.
 
There is a big long form. To make it more manageable, it's split into a handful of pages, which are arranged in a wizard. For the most part, the page navigation is the same for every page. Validation of each page is unique for each page. So, there will be individual validation functions for each page.
I'm trying to find an elegant place where to keep track of these functions.
 
Generally, you would use some kind of controller.
And you're wrong when you say that they're not event handlers, typically validation would happen on an onblur event, or an onsubmit event. Note that that doesn't mean you should use inline event handlers
 
So.. Instead of querySelector(All), why can't we just use createTreeWalker everywhere? Better performance, more control, more browser compatibility. What am I missing?
 
@phenomnomnominal My validation will be triggered by the click event of the typical wizard buttons like previous, next, finish/submit . At the moment, the same buttons service all pages. Come to think of it, that could be changed.
 
9:43 AM
@NickAlexeev you need some way to manage your views.
Do you know what I mean when I say MVC?
 
@phenomnomnominal Yes, I have an idea what Model View Controller is. Although, it probably varies a little from one implementation to another.
 
@NickAlexeev it sure does. You need something along those lines here
 
@phenomnomnominal When you said earlier "HTML shouldn't know about functions", what did you mean?
Following your approach, would this be wrong <button onclick="foo">yada</button>
 
Yes
Unobtrusive JavaScript is a general approach to the use of JavaScript in web pages. Though the term is not formally defined, its basic principles are generally understood to include: Separation of functionality (the "behavior layer") from a Web page's structure/content and presentation Best practices to avoid the problems of traditional JavaScript programming (such as browser inconsistencies and lack of scalability) Progressive enhancement to support user agents that may not support advanced JavaScript functionality == A new paradigm == JavaScript historically has had a reputation for bei...
 
Unobtrusive JS is so outdated :D
Woah, 54, people are really badge hungry.
Who unpinned the monthly challenge -_-?
 
9:53 AM
@phenomnomnominal Thanks for this insight. While I'm not new to software dev, I'm new to web dev.
I'll go sleep on this. It's 2am where I'm sitting.
 
@darkyen00 ^^ lead paper of the country, wraps entire body in a "form" element xD
 
@BenjaminGruenbaum troll
 
@phenomnomnominal lol, no, I mean it - unobtrusive JS is about web pages that should be able to function without JavaScript. That's not the vast majority of pages today. onclick is broken for whole other reasons.
 
@BenjaminGruenbaum I know you do, but I also know that you know that it's a reasonable place to start.
 
@phenomnomnominal the thing is... I'm not so sure anymore.
 
9:57 AM
@BenjaminGruenbaum that's just your age showing :P
 
ugh i hate christmas so much
 
uh.. why?
We don't really have Christmas here but it always seemed like fun
 
just the general merriness of everyone.
 
I thought the answer was going to be the sickeningness of unfettered capitalism
 
9:59 AM
the world is awful, people should just embrace that
 
What's the word for it? A grinch?
 
@TomW that too. It's actually disgusting.
 
Good morning
 
Kids get blown up in pakistan, but here, have some booze and chocolate.
 
10:00 AM
Mmmmm, chocolate.
Yeah, but kids get blown up every day, it's hard to get by if you think about it.
 
In India, we celebrate every single thing, because we need an excuse to get off from work, and enjoy.
 
@BenjaminGruenbaum that's a really terrible reason to not think about it.
 
Most of our electronic products are created by kids who were deprived from an education, not to mention our meat, our cloths, our shoes etc.
 
If I was religious I suppose I'd probably be a bit more serious about going to church or whatever, because that's the actual point
 
@BenjaminGruenbaum yep.
 
10:01 AM
We are living in a very unequal world filled with racism, abuse and slavery.
 
morning @SecondRikudo
 
@BenjaminGruenbaum correct.
Which leads me back to:
 
You can sink in that and get sad, or you can decide you volunteer every now and then, try to be a better person and live your life happily.
 
3 mins ago, by phenomnomnominal
ugh i hate christmas so much
 
...inb4 god
 
10:01 AM
@phenomnomnominal I hate the consumerism associated with Christmas, Christmas itself is a good holiday.
 
The fact there are horrible parts in the world doesn't mean that the world itself is all bad.
 
Nothing is all bad.
 
I agree that it's being a hypocrite. People are happy while other people are being enslaved, kidnapped, raped, tortured and killed for no good reason. There is a lot of injustice.
 
Tbh for me, since I'm not religious, the gift-giving is the only thing that makes it a thing. If there's no churchgoing (which there isn't, for me) then without gift-giving and eating a big dinner, nothing actually happens
 
That said, I'll choose hypocrite any day and not be sad.
 
10:03 AM
It's so hard to deal with the hypocrisy, and the fact that to exist and attempt to make a difference, I have to be a hypocrite.
 
Well, you've dealt with it just fine so far :D
 
@BenjaminGruenbaum it's literally a daily struggle for me.
 
My debug toolkit works, \o/
 
using jQuery why won't "$.post(url, {contentVar: cv, other: othervar} ,function(data) {" pss the var name other?
 
what
 
10:07 AM
the var name other won't work for some reason, why?
 
well... fiddle?
 
@phenomnomnominal You can do something about it, you know. I'm sure that there are plenty of places in NZ that would appreciate your help. You can code for a non-profit for a few hours each week, you can volunteer and teach kids from bad neighborhoods how to code, you can help at a homeless shelter, or at a woman's shelter, or at a פsychiatric hospital..
 
 <script type="text/javascript">
     function swapContent(cv, othervar) {
         $('#body_div').html('Loading...').show();
         var url = "other/page_loader.php";
         $.post(url, {contentVar: cv, other: othervar} ,function(data) {
             $('#body_div').html(data).show();
         });
     }     </script>
 
You'd be surprised how much doing that for just a few hours a week (even one) helps with that daily struggle.
 
@BenjaminGruenbaum I do so much. I donate my time and my literal body every fornight (plasma donor), I help out for free with with the internship program that got me into my jobs, I busk and give all the money away to charity, I give money to every charity I can (and not for the fucking tax benefits like everyone here seems to).
 
10:10 AM
@phenomnomnominal I'm not a big believer in giving money, but I know it helps.
 
I for one just want to watch the world burn
 
@phenomnomnominal You can always work full time for an organization that helps people like SterlingArcher
 
@Mosho it'll do that whether or not you watch
 
@BenjaminGruenbaum what's wrong with him?
Other than the obvious :)
 
@TomW what's wrong with who?
 
10:11 AM
i spend 1 day a week at feed my starving children
 
SterlingArcher :P
Ambiguous phrasing 4tw
 
jsfiddle.net/kg1tsajv I can't return a jQuery like object. :( , what is wrong, what is that I don't understand
 
@BenjaminGruenbaum I would love to. But there's actually not that many development positions at NFPs here.
 
@phenomnomnominal there's also the part where the world is getting better. It is, by just about every metric. There is still a lot of injustice but it's slowly getting better.
 
the 2nd var isn't passing as "other"
 
10:13 AM
@13375 make a fiddle illustrating your issue, your code seems fine.
 
@BenjaminGruenbaum The average is getting better, but the disparity is getting worse.
 
Actually, I don't think so. The rich are getting richer but the poor are also better off.
 
@argentum47 jake means?
 
@AwalGarg its just a name. jakeQuery :P
 
10:14 AM
@argentum47 42
 
whats 42
 
42
 
line 42?
unimplemented.
 
ok
so you are creating an unreal function, eh
 
me?
no, it's for single page work
 
10:17 AM
not you, argentum
 
@13375 read on how jsfiddle allows mock AJAX request, it needs to be self contained.
 
@AwalGarg unreal? I am just trying to figure how jQuery wraps the dom object returned.
but the basic thing isn't happening, I am able to return an object, but not a jquery like object
 
<script src='//code.jquery.com/jquery-1.11.0.min.js'></script>
<script src='//code.jquery.com/jquery-migrate-1.2.1.min.js'></script> runs it
 
@argentum47 I meant setting the constructor, length etc.
 
@BenjaminGruenbaum
 
10:20 AM
No it doesn't since the backend isn't there
Read on how jsfiddle does mock backends
 
you said to fiddle it
it's not passing the vriable name "other"
it psses: [contentVar] => ____________, _______
 
@AwalGarg I figured that $("..") returns an object that has 4-5 properties, this[0] contains the selected element, the selector is what is passed in quotes, context which is normally document. And when I was doing jake("body").constructor() it was returning Object{}, so I changed it to jake, dunno if that would make any difference, experimentation
 
I wnt: [contentVar] => ____________, [other] _______
@BenjaminGruenbaum
 
@argentum47 Do you know what will this code log: var myVar = {length: 2, splice: function(){}}; console.log(myVar);?
 
is it possible w/ jquery?
 
10:29 AM
@AwalGarg I thought something like {properties} but when I run it in console its totally different.
 
@argentum47 yeah, what is it?
 
explain why
an array like
 
yes, you are doing a similar thing there.
The reason it logs an array is because the spec says so.
 
@AwalGarg ouch
 
@darkyen00 apply as a web dev and correct their code :P
 
10:32 AM
any ideas on mine?
 
@AwalGarg you do
 
@AwalGarg I didn't know that.
 
@13375 You were advised to read the jsfiddle backend mockup documentation, did you do that?
@argentum47 now you do.
 
i thought that was him
 
@13375 Nope. Your code should work, but it is not working, it means the code you posted is not causing the issue. Your issue is somewhere else.
 
10:35 AM
it's stripping the var name is all
 
!!jquery post
 
i do my jquery from tutorials, and do php from scratch
 
I am flying blind again, I remove the length property. as well as the constructor. But still I don't understand how this relates to my original issue. and btw Could ya gimme the link to the spec.
 
only @Zirak can.
 
10:44 AM
The spec link regarding the length property! from mdn?
 
how do i link two vars being passed through jquery?
 
@argentum47 the spec says that an object is an array if it has a length property, and a splice method.
 
You defined a constructor etc, now you are creating a different kind of object. A jake object.
 
yes, I mean is it not what jQuery does? create a jquery object?
 
10:52 AM
btw, last night I played a lot with the createTreeWalker function. Dunno why but I love that function :D
 
seriously if I have added a function through prototype how do I preserve "this" when calling that method?
function Test() {
this.text = "hello";
}
Test.prototype.print = function() {
console.log(this.textt);
}
var a = new Test().print(); // undefined
 
@Todilo 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.
 
@argentum47 No idea how jQuery does it, but I told you what you were doing.
 
oh, ok
 
In other words, I am not sure if what you are doing is good.
But you should atleast know the possible consequences of that.
 
10:55 AM
yeah thats the thing. most of the time I don't understand what I write.
 
@Todilo there is a typo in your code. It should be "text", not "textt".
 
lol, that example does work. Weird that my code doesnt(I tried to shorten it)
 
@Todilo In that case, try reproduce with a larger portion of your code
 
new Test.print()
 
The problem is not with this or the prototype.
 
10:58 AM
this is awesome!
 
I will try to get more of my code into the example to find the error
 
@argentum47 what, no
-_-
 
actually that was dumb
pardons
 
:p
 
The fact you can new without () is dumb :D
 
11:01 AM
new is dumb
 
Also
I don't understand why they need a special operator that changes the semantics of this
 
Mornings
 
oh btw @argentum47 just in case you go hunting the streets trying to set a splice method on a function expecting it to become an array, that won't happen. It only works with freshly constructed objects, which have a typeof "object".
 
Hey folks. This is Sohaib Ahmed.. just an amateur self proclaimed programmer :)
 
11:03 AM
@sohaiby 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.
 
morning peehaa!
 
@sohaiby hi
 
Can anyone tell me what the Javascript Monthly challenge is about?
 
Thanks alot @BenjaminGruenbaum. I am looking at it :)
 
11:06 AM
Good luck :)
 
11:27 AM
Do you find the quality of your own code better or worse when coding naked?
 
@Jonathan I came to work on a saturday once and have never been more productive
 
naked?
 
!!joke
 
@Mosho That didn't make much sense. Use the !!/help command to learn more.
 
11:39 AM
oh
 
wat
 
!!wat
 
@argentum47 got any further?
@MathiasMüller don't star random crap -_-
 
@Mosho you came to work on saturday :O?
 
11:46 AM
@BenjaminGruenbaum +1 but... not sure how much the meta police would like the idea.
 
@BenjaminGruenbaum Will never happen
 
@AwalGarg I hate meta police :D
@SecondRikudo we can try
 
@BenjaminGruenbaum I'm in favor. But it will never happen.
 
^^^
 
Not unless you remove hostile factors from meta
Which again, will never happen.
 
11:49 AM
Why?
 
Or not unless the official team technically enforces it, somehow.
 
Maybe they should just close meta for a month..
2
 
lol, gud idea
close all the things for a month.
 
@BenjaminGruenbaum img.pandawhale.com/… .
 
Thanks for reminding me. I forgot to downvote the original question, I've now fixed that. — Martin James 1 min ago
lol
 
11:50 AM
No, seriously, meta is really hostile.
 
well, it is meta after all.
 
Until it gets to the SO public at which point it is no longer hostile.
That's the disturbing part - the people in meta do not represent the general population of stack overflow. It is very common to see questions that do poorly in meta but then get a lot of upvotes once they are featured and vice versa.
 
!!youserious
 
@AwalGarg Command youserious learned
 
@BenjaminGruenbaum Agreed there.
 
nice
Is there a way to make the sublime grid behave like jsfiddle's grid?
As in, freely resizing individual boxes in sublime grid layout is not allowed :( In jsfiddle we can.
 
12:15 PM
@BenjaminGruenbaum not yesterday
 
@Mosho BenjaminGruenbaum is afk.
 
but yeah, once :X
 
A_l
I have tow strings one of path to file and one is the root and I want to ensure that the file is a "child" of the root. for example that this is not happend
root=/computer/
file="/computer/../file.jpg"
 
12:45 PM
i'm trying to log each key in the json array
anyone know how to resolve this?
 
@Mosho ew
We'll talk about that next wek
At least you get paid for it
 
I was asked to
not that I mind, I said I would finish something
 
Yo, anyone familiar w/ looping thru json array as i did
 
@TejasManohar whaddya mean by a json array? It is just an array.
 
@AwalGarg sorry, yeah array
not sure why my code is outputting undefined
i wanted it to output the phone number
and if there were more items in that array of same schema, then output each phone number (labeled as 'key')
@AwaiGarg thoughts?
 
12:58 PM
@TejasManohar Object.keys(obj).(forEach|map|whatever)
 
@SecondRikudo why for in wont work
 
It's not that it won't work.
It sucks :P
 
oh
@SecondRikudo data.keys(obj).(forEach|map|whatever) obj?
 
var data = result.body.results; btw
No?
 

« first day (1527 days earlier)      last day (3411 days later) »