« first day (361 days earlier)      last day (4598 days later) » 

12:00 AM
I cringe every time. Cowbell probably just .innerHTML +=
 
@Incognito I would have said it looks like a key, but thanks... some things you just can't unsee
 
@Zirak That's exactly what it's doing.
html: function( value ) {
		if ( value === undefined ) {
			return this[0] && this[0].nodeType === 1 ?
				this[0].innerHTML.replace(rinlinejQuery, "") :
				null;

		// See if we can take a shortcut and just use innerHTML
		} else if ( typeof value === "string" && !rnocache.test( value ) &&
			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {

			value = value.replace(rxhtmlTag, "<$1></$2>");

			try {
 
Holy crap, w3schools gives out certificates? If someone came with a w3schools certificate, I'd kick him in the nuts.
 
Nobody gets the issue till they see the perfs and compatibility. My best way to explain it is "if you use it, you surrender all rights to bitch about ie6 or any browser incompatibilities, ever.
Yeah, they give out "certificates"
 
Please note that the <script> tag should be inside the page's <head> section.
quoth w3schools
which is directly opposed to everything everyone involved with jQuery says
 
12:05 AM
I scolded the stanford db-class saying they shouldn't link to w3schools that sells worthless certificates and should link to w3c's primer on xml.
 
You need tutorials for xml? o.0
 
No, it's a database course.
Also, XML can get complex, they do have certificates for it.
Legitimate w3c backed certificates.
XML Certification Program (XML Master) is IT professional certification for XML and related technologies. There are two levels of XML Certifications, XML Master Basic certification and XML Master Professional certification, and more than 18000 examiners have passed those examinations. Certification paths XML Master Professional Application Developer Certification *XML Master Professional Application Developer is a certification for professionals who have demonstrated the ability to use technology in developing applications that deal with XML data. XML Master Professional Application Deve...
I don't suspect it's in high-demand as the stuff's fairly straight-forward.
Their concern was the w3c primer on XML was too high-level for a stanford course =/.
 
> $("p#intro:first") The first <p> element with id="intro"
 
haha
 
The first?
of all one elements with that id?
 
12:10 AM
lol, multiple of the same id, what were they thinking...
 
Is there a "link to github" like on facebook or twitter?
 
12:24 AM
Quoth api.jquery.com,

"$('.inner').append('<p>Test</p>');

Each inner <div> element gets this new content:

<h2>Greetings</h2>
<div class="container">
<div class="inner">
Hello
<p>Test</p>
</div>
<div class="inner">
Goodbye
<p>Test</p>
</div>
</div>
"
 
2. jQuery uses CSS selectors and XPath expressions to select elements?

You answered: False
Wrong Answer!
 
It puts the <p> inside the div with class inner
 
Does jQuery support XPath?
or is that a w3schools-ism?
oh, it's on w3fools already
 
@Dennis, am I right?
 
Yes
 
12:28 AM
@Zirak So the html DOES go inside the selected element, just at the end, you said it goes after the selected element.
 
append puts it inside the element
(after)[api.jquery.com/after] inserts it as the next sibling
or however you link
 
That's what I thought, but @Zirak, confused me by saying otherwise
@Dennis Should I use quotes or double quotes around selectors?
 
Me? I said it appends at the end of the selected elements.
 
lol, they added stereo (don't click if you're at work and have speakers on) wurstcaptures.untergrund.net/music/…
 
Well I guess that is synonymous, but it did confuse me
@Zirak What of selectors? Single or double quotes?
 
12:36 AM
@Ethanol722 Pretty sure it's up to you
 
That, just there, showed me that you don't really know a lot of javascript.
Because if you did, then you'd know that 'string' === "string"
 
Just putting some final touches on cowbelljs... :)
 
@Zirak Not necessarily, when 'string("string")' != "string("string")"
Or even "string('string')"
 
Yes, it is, you just need to properly escape it
js doesn't give a fuck if you escape your strings with ' or ", it's up to you to not screw it up
 
12:41 AM
Are you asking about $("a[href='index.html']") vs $('a[href="index.html"]')?
 
Because "oh look "double quote"" will kill you in any language
 
@Zirak I've tried using escapes in js before and it fucks up the code every time
 
then you're doing it wrong :(
 
But, "oh look \"double quote\"", works!
 
12:43 AM
If you're really into voodoo, try this insanity: "oh look, \nnewline!"
It works! mouth gapes in wonder
 
except when people then dump that into innerHTML and wonder why there is no newline
 
@Zirak Why do I always get the error, "used of attributes node name is deprecated, use name instead"?
 
"Always" is a loose term. Show relevant code
 
2
Q: I can't remember programming 5 mins after learning?

I'm learning Java, and I found a great teacher. He explains everything perfectly. I understand it all. My problem, is that after learning a short section, for example "Nested If Statements" or "Many Methods and Instances", I can type it all great, but in 5 mins, after going on to a new section (w...

 
<html>
<script type="type/javascript">body.innerHTML = "I like, \"Inception\"";</script>
<body>
</body>
</html>

Also it doesn't write anything.
 
12:51 AM
@Zirak I like my terms like I like my women
 
Why would it? body isn't defined.
Do you mean the body tag, document.body or document.getElementsByTagName("body")[0]?
 
Oh, one sec
XD
 
And it is getting executed before body gets added
 
Same thing here
<html>
<script type="type/javascript">document.body.innerHTML = "I like, \"Inception\"";</script>
<body>
</body>
</html>
Hmmm
 
@Ethanol722 Still body is not defined yet.
 
12:53 AM
can you have script tags that aren't in head or body? they're just in html?
 
<html>
<body>
</body>
<script type="type/javascript">document.body.innerHTML = "I like, \"Inception\"";</script>
</html>
doesn't work either
@OmeidHerat Meant to link that to
Why doesn't that work either hmmmm?
 
put it inside the body tag
you're just doing crazy shit now
what people usually do to solve the problem you're having is to use a document.ready handler
 
Is this how you make that kind of handler?
document.ready
{
document.body.innerHTML = "I like, \"Inception\"";
}
 
no... no it's not
 
@Ethanol722 kind of
but that is wrong.
 
1:00 AM
you can do this:
document.addEventListener('DOMContentLoaded',function(e){
    document.body.innerHTML='whatever';
});
 
in fact there is the cross browser issue, which why I stick with a Framework.
 
or use jquery for cheats
 
Sorry, these are all just for an example, I wouldn't normally use the document ready handler
 
Looking at CSS here, csslint is telling me that using width and padding in the same spot breaks the box model.
Is this right?
 
@Ethanol722 what !? how would you code without document ready handler ?
@Incognito don't think so w3.org/TR/CSS2/box.html
 
1:02 AM
<html>
<body>
<script type="type/javascript">
document.addEventListener('DOMContentLoaded',function(e){
document.body.innerHTML='whatever';
});
</script>
</body>
</html>

Doesn't work either
 
what browser are you in?
 
Firefox
 
and if you're using jquery just use their ready handler
 
7.01
 
$(function(e){
    document.body.innerHTML='whatever';
});
 
1:02 AM
@OmeidHerat Alright thanks, csslint's been known to whine excessively sometimes.
 
you are welcome.
:1653213
 var domLoaded = function (callback) {
            /* Internet Explorer */
            /*@cc_on
            @if (@_win32 || @_win64)
                document.write('<script id="ieScriptLoad" defer src="//:"><\/script>');
                document.getElementById('ieScriptLoad').onreadystatechange = function() {
                    if (this.readyState == 'complete') {
                        callback();
                    }
                };
            @end @*/
            /* Mozilla, Chrome, Opera */
that is a semi-proper Cross-browser dom ready handler.
 
<html>
<body>
<script type="type/javascript">
$(function(e){
document.body.innerHTML="I like, \"Inception\"";
});
</script>
</body>
</html>
Doesn't work either
 
facepalm
 
What did I do wrong this time?
 
I'm beginning to think you're either stupid or trolling
 
1:06 AM
Or both
 
I'm neither, surprise, surprise, see this, friendgrid.com I did all the javascript
 
Do you have any idea how much crap is spewed on the internet every second? Just because "hurr durr I made a site" doesn't make you competent or not stupid
 
Yeah well I actually hardcoded it, which accounts for about 0.01% of sites
 
and there is tone of script's included, which is yelling, I am a CopyPaster !
 
There's a metric tonne of scripts? I had no idea!!!
Besides
includes are very useful, what's wrong with using them?
 
1:09 AM
What javascript there did you actually write?
 
All of it
 
Because all I see is a giant wp template.
Really? Did you make friendgrid.com/cssjs/sha256.js ?
 
Yes
 
@Ethanol722 You're Dr.E?
 
jk
Yes, I'm Dr.E
 
1:11 AM
ok, you're trolling, interest and respect dropped below the absolute zero
 
But the script was obtained from a friend of mine
The big ones
 
@Ethanol722 That's depressing. You wrote this:
	function(data)
	{
		var filter = /^([a-zA-Z0-9_\.\-])/;
		if (!username)
		{
			document.getElementById('DnameInput').style.backgroundImage="url('img/icon-x.gif')";
			document.getElementById("DnameStatusCheck").innerHTML = "<b style=\"color:#FF0000;\">(Cannot leave this blank!)</b>";
			usernameGood = 0;
			checkRegForm();
		}
		else if (!filter.test(username))
		{
			document.getElementById('DnameInput').style.backgroundImage="url('img/icon-x.gif')";
			document.getElementById("DnameStatusCheck").innerHTML = "<b style=\"color:#FF0000;\">(Not a valid Display Name!)</b>";
cut
 
Yeah...
 
paste
tweak
cut
paste
tweak2
cut
paste
tweak3
cut
paste
tweak4
cut
paste
tweak5
 
@Ethanol722 There is no problem with using 3rd party code! the issues when people don't know what to use !
 
1:13 AM
I edit where I find errors
 
why would someone copy and paste the code with errors at first place ?
 
Not everything can be hardcoded at the length of some things, did you hardcode the jQuery UI?
 
No but I don't claim to know shit when I don't know how to properly escape strings, especially not if I'm completely fucking clueless about what I use
 
@Ethanol722 I will not rewrite any framework, I will never try to change them for my project either.
 
I'm freaking escaping it you have neglected to tell me what's wrong with the way I escape them?
 
1:15 AM
if it's not working as is, then that is not the right tool for me.
 
You earn the ability to decide what 3rd party tools you use
 
if the code is broken then I will issue a bug and fix that at first place.
cause indeed, I have to maintain my code in future and keep my framework update and don't want to see my broken application with me left like a clueless tree!
wait... that tree doesn't make sense, but whatever.
 
Well I'm not trolling I promise you, could you please just tell me what's wrong with the way I escaped the strings that causes js quotes escapes to always malfunction?
 
@Ethanol722 there is no issue with js quotes escape, and it's more of code convention and style, it depends on your workplace standards or specific project you working in.
 
Well lets assume I was inserting HTML into a blank document, in Firefox 7.0.1?
 
1:21 AM
There is other problems with your code, who with a right mind set will put CSS in JavaScript ?
 
@Ethanol The last code clip you posted did not include jQuery, so it probably can't resolve the dollar sign... what error are you getting in the console?
 
@Dennis "Use of attributes' nodeName attribute is deprecated. Use name instead."
 
@Ethanol722 what do you think that means ?
 
You may have already said this, but which browser?
 
Firefox 7.0.1
 
1:23 AM
@Dennis are you implying that, the error is browser specific ?
 
No
 
then how that question would help solving the problem ?
 
I don't know, but google says it is a firefox message
 
Firebug, yes
 
Hello, Is anybody know if it is possible to pass two models to the view in backbone.js?
var modelX = new ModelX();
var modelY = new ModelY();
window.view1 = new View1({model: modelX, model2: modelY});
Inside the view1 it cannot see this.modelY, but can see this.modelX...
 
1:34 AM
sigh I hate setting up new apache servers, where's the dang cache-control stuff?
Net's always full of outdated an overly dramatic tutorials.
 
Seems like I missed a bunch of excitement
 
@david Seems so
 
teehee setTimeout("usernameCheck();",1000)
 
Hey guys, I've got a question.
 
well then? out with it
or was that just an announcement?
 
1:44 AM
Hey guys, I've got a statment.
That was it, thank you all for listening
 
@Ethanol722 Please don't act as if you were trolling, cause your code says it all.
@Reece Ask.
 
Is this a forum to ask javascript questions?
 
this is a chat room
not a forum
you can ask your questions on StackOverflow.com
 
@theWillCole Yes and No, it's a good place to discuses things, as Phelios said you can ask on Stackoverflow.com and mostly you get better answers for your problems.
 
thanks!
 
1:51 AM
Nope, I was just letting you know I had one.
Thanks for acknowledging me.
Bye.
 
@Incognito Starred it so it'll get stuck on the side
 
Well I done goofed. The twitter link goes to the wrong place.
 
/me decides he's not getting any better representation in this chat room as he does in most, so he leaves.
 
Anyway, yeah. You guys know that feeling, when people start using your website without you telling them it exists? When people start realizing it's worth going to on their own, on a regular basis?
 
2:03 AM
I kind of think that I shouldn't have say whatever I've just said
 
@Phelios I've been idle most of the time. Questions should go on the site but people are open to ask them here. The thing that annoys most of the regulars here is when people ask if they can ask a question instead of just asking.
If they don't get a response or it's too in-depth they should put it on the site.
A lot of things are some incarnation of the same problem, but they don't know how to find that question without some guidance.
If someone's annoying I just add them to my ignore list and move on.
 
that is the same problem on any other chat rooms
 
We talk mostly about JS here, we'll dive into random rants about other technologies, once in a while business or music or whatever, we're basically like any chat.
 
I just wanted to ask a random question that popped into my head.
 
why didn't you ask it then?
 
2:13 AM
I did.
 
were you worried we might yell at you?
 
"Anyway, yeah. You guys know that feeling, when people start using your website without you telling them it exists? When people start realizing it's worth going to on their own, on a regular basis?"
 
oh
 
if someone wants to learn and be honest here, everyone is going to help. and will try they are best.
but when it gets to trolling and acting as I know but making sure you do it the right just feels wrong and annoying.
 
My programming questions still go to the main site.
 
2:15 AM
@Reece Ah sweet!
 
One benefit of crossposting questions here is that you might attract the attention of people who really love js
 
If you want to know that how does really websites like SE, WikiPedia and things like that works. watch This Talk By Dan Pink
 
and will give you answers filled with <3s
 
Like, I launched this website yesterday and gave the link to a few friends.
Like, 4 or 5. Let them do with it what they wanted.
So far, I have 85 individual IP addresses that have accessed the website, and I'm nearing 300 total page views.
 
nice
i haven't experienced that personally, but I guess I got something similar when people started tweeting about my sperms
 
2:19 AM
I love your sperm.<3
 
Huh?
 
ahahaha
 
No idea.
reecemcmillin.com/albums Check it outttt. Haha.(:
 
@Reece It's a great experience but you need to set your goals for something like 100k hits.
 
Yeah.
I know.
But for the first 24 hours of its existence.. Not bad imo.
 
2:27 AM
Oh 24 hours that's alright.
 
And since this isn't linked to a larger website.
 
It all depends on how much and where you promote it.
 
I'm some 17 year old who got bored during english class.
 
So what? Turn bored into money.
 
That's what I'd like to end up at.
 
2:28 AM
@Reece I am 18 years old who got bored of school at all !
 
I don't care how old you are. Make cool stuff. Don't think age means anything. :P.
 
I know. :P It's just like. 4-5 friends spreading it by word of mouth alone have it up to 85 different people who've looked at it in the first day it's been around
.
 
I see all these young coders with crazy goals stop themselves because they tell themselves they don't belong there.
Do you have a way to monetize this?
 
I'm really just here to make something people would want to use. Monetizing is secondary.
 
Servers cost money.
 
2:30 AM
But still a pretty nice idea. I've definitely thought about it.
 
Your college will cost even more money :P.
 
I know. Haha.
 
Make something people will love-- but turn it into a business.
 
@Incognito I wouldn't think monetization is the most important part.
 
Double negative intentional?
 
2:31 AM
quit honestly you can make pretty good money with making crap rather then good coding.
 
I'm not sure what I'd do in this case, to monetize.
 
It's not important, but it's a good experience for him.
Ads, affiliate links, ask for donations, etc.
I'd rather see someone who can code write code for their own business instead of stacking apples through college. Also, it's going to teach you a lot.
 
I'll probably decide on a method of monetizing after the site gains a little more momentum.
It seems off to a good start for my first real php script. :P
 
You don't need to, I'm just saying it's a good idea.
Also, if you somehow go viral, you're not going to have the funds available unless you're related to richy rich.
Servers cost money, servers that deal with 100k hits cost a lot more.
 
I dunno, my godaddy server says the price is the same for unlimited bandwidth. That probably doesn't have much to do with it. I dunno much about all that shit.
 
2:37 AM
@Reece Eh, no worries.
To be honest I don't really understand what your website's all about.
 
Type a band name and an album name, it'll go find a download link.
 
Are you basically just forwarding the mediafire search?
 
It's able to access more than just mediafire. I just wrote it in a way that mediafire tends to be the first choice.
I wrote it as if it were me, manually looking for the album. I used my methods in the script.
If it uses another site, it uses another site.
 
You should put it up on github or something.
 
But mediafire is almost always the one it uses.
 
2:39 AM
Then keep asking for ways to improve it.
 
That's what I'm going for. This isn't a final draft.
Like I said, this has existed for literally 24 hours.
 
I wouldn't monetize this one just yet. It has a long way to go before that.
 
That's what I'm saying. You're the one who came up with monetization.
 
:P
 
That's not my main concern. It's an eventual goal, but it's not gonna happen until my site is already worth something.
 
2:42 AM
Think about what you want to improve, and to do that, think of what your goals are.
 
I know.
Still, this site doesn't take priority in my life.
 
Then why don't you have a question about what to improve?
 
Well, because I've had more ideas in mind from the start.
I've talked with other people, they've agreed they'd be useful additions.
I'm gonna implement whichever ideas would be the most useful first.
 
Do you think you should improve other things before you add things?
 
Something you need to realize about me if we're gonna talk: I don't really think my word choice through before talking.
By additions, I meant improvements AND additions.
There are definitely improvements to be made before new features will be added.
 
2:47 AM
@Reece You should push yourself to do it more, you'll accidental make a fool of yourself because you said something opposite of what you meant. I've been there.
@Reece Pick one at a time. I suggest you improve. Think of your website as a tree, Right now it's a small sapling, and the trunk has a handfull of problems you can fix up. But instead of fixing them, it's going to grow with long branches, more and more branches, leaves, more leaves, but the trunk's still weak, and so are all the branches now. Eventually, you're going to end up with a lot of things and lower quality than you want.
Programmers are infamous for doing this. There's always another feature to add to something, keep the features under control.
 
I fully intend on improving what's already there before implementing new features.
 
@Reece What would you like to work on?
 
I'm probably going to expand on error handling for now.
Nothing the user would notice, but it could change their entire outcome.
 
Alright, well when you run into problems come ask for help.
 
I plan on it. Found this website yesterday, used it for a couple issues.
It's amazing.
Fastest responses I've ever had, with committed answer-ers and a great overall system for this kind of thing.
 
 
4 hours later…
7:29 AM
0
Q: Is NodeJs worth working with

WojonsTechI am wondering if NodeJs is ready for prodcuction level applications when it is the other server side programming lanauge or if it needs a little bit more time to grow up.

 
 
2 hours later…
9:14 AM
0
Q: how to get is_active_widget on active/runnning page?

DaveI'm looking for a solution to check is_active_widget on particular page. I got this Loading scripts only if a particular shortcode or widget is present However the second way of sorich87 still loads the the scripts on every page where there's no certain active widget on the running page. For exa...

 
 
2 hours later…
10:57 AM
hi , anyone about?
 

« first day (361 days earlier)      last day (4598 days later) »