« first day (17 days earlier)      last day (4925 days later) » 
00:00 - 20:0020:00 - 00:00

12:15 AM
@swanson - I'll go with "maybe" :)
 
 
3 hours later…
3:05 AM
Canvas Performance killed the Browser Star -.-"
 
 
7 hours later…
9:52 AM
Morning
 
@Raynos 'orning!
thinks that he can create a userscript that autoresponds to greetings by cutting off the first letter, replacing it with a ' and speaking in a funny (ie. Southern) accent.
 
I find it rather offensive that the C room has been empty for 6 days
I guess its a best to say that in the C room rather then he
 
hi
 
Ugh I almost tried to do obj["property"] in C#. I want my javascript back
 
10:11 AM
Hey! Just wondering, if I'm writing a javascript game, can I just put functions in a script tag and not spend time namespacing/using closures/whatnot?
What are the best practises?
 
@luminarious Erm... even if all your Javascript code is in a script tag, you'd still have to deal with scopes
 
In JavaScript all variables are scoped pretty intuitively, except the other 95% of the time.
2
 
@NickCraver SFT! (Starred for truth)
 
Yes, but in the foreseeable future there won't be any other scripts that could possibly interfere. I'm not worried about scoping yet, just basic structure..
 
@luminarious There won't be any interfering script if you don't include them with a script tag
 
10:16 AM
I suppose I'll just make something that works and worry later.
 
that's what Microsoft did, and look how great IE turned out
no, wait....
sorry, you said "something that works", bad example
 
Flaming Microsoft again to get starred !! tsk tsk! Bad Nick! Baaad!
 
speaking of, you know i like codeplex, good openness, etc
but when there's a download, allow the author to tie it to a damn changeset, so I can find the code that goes with that release
having to download 5 versions so far to figure out what was the last working one in there, there's an xml file folder inclusion bug, a pretty egregious one
 
I can't believe I spend thirty minutes on this:
in The Tavern (General) on Meta Stack Overflow Chat, 35 mins ago, by Yi Jiang
@Benjol I was lazy, and used $.ajaxSetup to change some global ajax options in my userscript. This obviously broke all of SO's existing ajax calls, and resulted in several... interesting effects.
 
10:49 AM
@YiJiang thats why we dont mess with global state
 
morning all
 
11:06 AM
@AndyE 'orning all
 
11:22 AM
is there anything linq like for javascript?
 
11:37 AM
I wonder if I should use this
Date.prototype.getISODate = function(){
 function pad(n){return n<10 ? '0'+n : n}
 return this.getUTCFullYear()+'-'
      + pad(this.getUTCMonth()+1)+'-'
      + pad(this.getUTCDate())+'T'
      + pad(this.getUTCHours())+':'
      + pad(this.getUTCMinutes())+':'
      + pad(this.getUTCSeconds())+'Z';
}
There's nothing wrong with adding a function to the Date prototype erm... right?
 
@YiJiang: There's an toISOString method on the prototype in ECMA5, you might want to use that if it's already available
The prototypes for which extension aren't recommended are Object and Array. Anything else is fair game.
 
@AndyE Mmmhmm... but it's just getting support. And Firefox 4 only adds parsing support for this format, nevermind having a getter for that
 
@YiJiang: that's why I said "if it's already available" e.g.
 
anyone using VS daily?
 
Date.prototype.toISOString = Date.prototype.toISOString || function(){
 function pad(n){return ('0'+n).slice(-2) }
 return this.getUTCFullYear()+'-'
      + pad(this.getUTCMonth()+1)+'-'
      + pad(this.getUTCDate())+'T'
      + pad(this.getUTCHours())+':'
      + pad(this.getUTCMinutes())+':'
      + pad(this.getUTCSeconds())+'Z';
}
@NickCraver: I use it daily, but not extensively.
 
11:46 AM
if(!Date.prototype.toISOString) Date.prototype.toISOString = function(){
 function pad(n){return ('0'+n).slice(-2) }
 return this.getUTCFullYear()+'-'
      + pad(this.getUTCMonth()+1)+'-'
      + pad(this.getUTCDate())+'T'
      + pad(this.getUTCHours())+':'
      + pad(this.getUTCMinutes())+':'
      + pad(this.getUTCSeconds())+'Z';
}
I'm trying to modify Chirpy to respect file/folder script order, but building a VS extension is.....well fun isn't the word I'd use
 
@YiJiang: it would also be more efficient to move the pad function outside
 
I'd add a .pad() to String in another prototype ;)
 
@NickCraver Not sure I can help you there. Does it work using a custom MSBuild task?
 
nah that's the great part about it, it's based off ide changes
save a file, it regens your minified versions, including LESS support and such
benefits of LESS, but no need to recompile the project to get the .css result
 
thats pretty cool
 
11:51 AM
though, currently my problem is with JavaScript include order, the way it does XML parsing...it grabs one type of descendant node then another, so it respects order, but only within a node type
 
I've written a few MSBuild tasks that I find useful, but not tried to actually integrate with the IDE like that
 
that's pretty much how I though, completely dismissed LESS and some batching of our stuff since it'd require a compile
this in-IDE on file change is tremendously more useful though
 
yeah I bet... I might look into that later.
 
0
Q: How to apply active class for first list item using jquery

AjithHi, <div class="accordion"> <ul class="navigation"> <li>Lorem</li> <li>Ipsum</li> <li>Donor</li> </ul> <ul class="navigation"> <li>Test</li> <li>Demo</li> <li>Donor</li> </u...

should I add :lt(1), .slice(0), maybe some others?
nm that's a ridiculously un-useful answer
 
@NickCraver I think it would be unhelpful to give anything other than the obvious :first and .first()
 
12:01 PM
@YiJiang - at the same time, they're the slowest versions, .first() calls .eq() which calls .slice() (really should change that), :first needs selector parsing
.slice(0) is the fastest way, not that the performance difference matters in 99.9% of cases
 
@NickCraver: .slice(0) does only return the first element on the list ?
I thought that call would return those elements -> beyond the parameter if only one is given.
so $(".accordion li").slice(0).addClass("active"); should give all li nodes that class
 
12:17 PM
oh woops, yeah in all non--1 cases that should be 0, 1 correcting
I actually override .slice() (an external version) locally to have a bit more expanded behavior, one param = .eq(), if you do .slice(n, true) you get the rest
 
yay looked like a typo, but I really opened the jQuery source since .. you're rarely write something wrong tho :p
 
pfft I'm wrong at least 200 times a day
I just try and correct it if I notice :)
 
@NickCraver I've counted more than that some days ;-P
 
:p
 
that's not fair
you can't count the days I've been drinking
 
12:20 PM
haha
 
.eq(0) is faster than .slice(0,1) ?
 
nah .slice(0, 1) is faster
seeing as .eq() calls it
 
yes, I was wondering about your statement above
 
that's what I said above :)
 
one param = .eq(),
 
12:21 PM
same behavior as eq I meant
 
I see
 
I find that more intuitive personally...maybe 20 overrides on core methods locally to give me slightly different behavior for current app uses
just finished moving our jQuery/UI includes off the google CDN, trying to get the compression right now
 
sounds a little odd to me. Or it depends on the way you're doing it. overwrite the methods like real or wrapping those into an abstraction layer ?
 
huh, just earned the sportsmanship badge... I didn't know I was sporting. I thought I was a shark.
 
overwriting them, as part of the build with chirpy as soon as I get this XmlDocument behavior corrected in it (and submit the author a patch)
 
12:24 PM
overwritting the method would be a fun thing to other developers out there :p
 
Oct 28 at 13:09, by Nick Craver
undefined = true;
 
lol
you know how this is called right?
it's the 'asshole effect'
:)
 
yep :)
 
my var undefined; trumps your undefined = true :-p
 
ok but now for real? I mean are those overwritten methods a code convention in your company? or are you just doint it on private code
 
12:26 PM
declaring TRUE = 0; in C in some obscure header was always a great gag
 
@NickCraver: lol
 
yep its mighty fun
 
@jAndy - for code only I work on, we use the standard core for all team projects
 
I guess your colleges pray every day you never get sick and something bad happens there
 
only 2 of us total :)
 
12:28 PM
one prayer :p
 
like I said these are minor changes...really don't affect production code, you could swap the official jQuery core in and the app would be 100% error free
my changes are for debugging, lots of jQuery methods could have better overloads when designing/debugging
going to be a fun day, they patched our dev environment and now some oracle queries timeout
 
12:42 PM
.first() is very slow compared to obj[0]
 
they're also not the same thing
 
You can't compare performance unless the result is the same :)
 
[0] is just the raw DOM element. .first() creates a new jQuery wrapper
 
it's like those programmers who every once in a while come up with a new faster quicksort algorithm but it isn't quite quicksort...
 
I mean .first() compared to $(obj[0])
in ie anyway
That was a serious bottleneck for me in a for loop :\
 
12:45 PM
@nick that's kinda the argument i have for zepto.js. "we're 10x smaller than jquery!" - you're also missing 90% of the stuff -_-
 
heh yeah
 
Seriously though why is obj.first() significantly slower then $(obj[0]) ?
@matt is there actaully a zepto.js ?
 
@Raynos - yes. zeptojs.com
also, at least on the webkit inspector, i'm getting 0ms on both first() and $(obj[0])
and i dont have an IE debugger handy. best bet is to check the jquery source code on github and have a nice read
 
@Matt Loop it two gazillion times, then divide the time by two gazillion
 
true
 
12:50 PM
@Raynos - again they're not the same result
.first() you can use .end() with to get the previous object for example
 
@YiJiang It was a least a factor of 10 difference
 
You're eliminating all the chain and object info when you're doing $(obj[0]), .slice(), .first(), etc keeps the stack instact
 
I guess that makes sense nick
 
also make sure you're using 1.4.3. through some black magic they always squeeze out DOM performance
as long as you're aware of the data() changes, 1.4.3 is basically 1.4.2 with faster DOM querying. somehow. o_o
 
.querySelectorAll()
 
12:54 PM
Be aware that 1.4.3 has some fairly nasty bugs in it - for production, if you've got a site that uses jQuery a lot, I'd wait for 1.4.4
 
@Pointy are these documented somewhere? i'm curious as we have 1.4.3 in production atm
 
The jQuery bug tracker :-)
 
the 1.4.3 bugs are fairly compartmentalized though
 
i've only run into problems with plugins not coping
not core itself
but that's the usual story i guess
 
In particular #7344 / #7352 is keeping me from deploying it
That one involves a bizarre (and pretty serious, in my opinion) WebKit bug that jQuery used to cope with (1.4.2) but no longer does
 
wow thanks for that
iframe retriggering ready might actually affect me
 
otoh it fixes some issues with "change" events on "select" elements (IE)
 
that's good.. in the past i've had to use click() to detect select element changes
 
Patching around that one weird bug isn't hard, but I figure I'll wait for people who actually know how it's supposed to work ...
 
ah good 7352 is a blocker for 1.4.4
 
12:58 PM
or was that checkboxes ..
 
Also somebody mentioned another one in some random thing I was reading but for the life of me I can't remember what that was now - could have been bogus
 
some issues with DELETE requests and body serialization already fixed in git
 
hmm ok well it looks like 7352 is the only open one left!! It should be really easy I think, but I don't understand that mysterious new "readyWait" feature
I mean, I think I vaguely get what they're after, but I can't find any use of it - maybe it's in the UI code
 
$.readyWait++
when your plugin goes to do something, e.g. load scripts
.ready(true) to decrement when you're done...when .readyWait gets back to 0, document.ready fires
 
oh ... well the way it's implemented is a little fragile in my opinion - for ex. $.ready() doesn't seem to check if it goes negative, and it also overrides the old isReady flag
 
1:03 PM
.ready() with no params has no effect on it
only .ready(true)
 
no it looks to me as if it gets decremented when wait !== true
(unless it's fixed in the git repository)
 
		if ( wait === true ) {
			jQuery.readyWait--;
		}
 
look down just before the loop over the readyList - (still need to check git)
 
if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
it won't enter there unless it's 0
 
Well that's what happens in WebKit :-)
 
1:07 PM
that's a separate bug though
jQuery.isReady = true; should make that if() fails also, again not entering that chunk
that's what's not behaving correctly
 
Oh yes I don't disagree - my point is that treating an integer counter as a flag like that is (in my inexpert opinion) a code smell that I'd personally rather avoid
 
think of it this way, it's no different than every other image preload plugin
 
I don't mind the overall concept at all. I just thing integers are too dumb for important work like that.
(If it's not clear I'm talking about superstition here; like I said, it wasn't really clear what exactly they wanted from that stuff. Plus I waltzed into the code from the context of seeing that weird behavior in the Chrome debugger.)
 
prefer a $.wait() and the int not exposed?
 
I'd prefer a closured/private counter for that too
 
1:10 PM
Well I'm not sure - since I have never found myself wanting that behavior, I can't really form a worthwhile opinion
 
But I've also to agree never to get into a situation so far which required that 'feature'
 
I could see that count not being exposed directly, not sure what it'll end up being
 
But Nick's example makes sense. So the only case I can think of is, if some plugin uses dynamic script tag insertion to load something, so it call $.readyWait++ and needs to call .ready(true) on a success/error/complete callback
right?
 
correct
	Files = xElement.Descendants()
		.Select(n =>
		        	{
		        		MessageBox.Show(n.Name.ToString());
		        		switch (n.Name.ToString())
		        		{
		        			case "File":
		        			case "{urn:ChirpyConfig}File":
		        				return new List<FileXml> {new FileXml(n, basePath)};
		        			case "Folder":
		        			case "{urn:ChirpyConfig}Folder":
		        				return new FolderXml(n, basePath).FileXmlList;
		        			default:
		        				return null;
		        		}
		        	}).SelectMany(n => n).ToList();
yes, this is lambda abuse.
 
Does anyone have suggested for a "loading screen" ?
Meh. ill just hack a div together. Who needs an elegant solution
 
1:34 PM
I've been stuck trying to get jsTree working for a few days now... keep coming back to the same old problem.
 
@Greg which problem?
 
When selecting a node, var currentNode = data.rslt.obj;.
currentNode.attr("data-id", "someValue");
currentNode.attr("data-link", "someOtherValue");
that's fine for all nodes that are present when loading the jsTree, but when adding new nodes, the new data gets lost somewhere
 
is current node a jquery or jstree object?
Oh i see.
Ehm
dont know sorry
 
I think half the problem is that the data is being passed in from a bloated asp.net solution
Is there a way to get and set the attr of data.rslt.obj as a property?
 
Why dont you store this data in a javascript object ?
rather then on the dom ?
 
1:47 PM
I was using jQuery metadata... but then read that there were known bugs with metadata and jsTree ... so I tried this other way ... that isn't working.
 
1:58 PM
If it doesnt work just store it in a local data structure and chuck at the server via ajax
 
ok I'll try that
 
@Yi Jiang I wonder what the answer is? haha
 
2:27 PM
who makes these websites? It's rather similar to shouldiusetablesforlayout.com
 
@Greg The one I posted was created by Dan Cederholm, though my favourite is still hasthelargehadroncolliderdestroyedtheworldyet.com
It's a meme, I think
 
I like the comment at the bottom
 
I like the conditional that actually checks to see if the world has ended
 
It even has a RSS feed you can subscribe to! hasthelargehadroncolliderdestroyedtheworldyet.com/atom.xml
 
lol. Redundancy in code humour always cracks me up.
 
2:34 PM
(;
 
I think the world would end if @rchern wrote one of her smileys the right way around
 
I can't think of any other reason why she wouldn't d-:
@YiJiang: are you sure that was a smiley?
 
@AndyE Actually, I cheated. That was the result of my smiley reversal script running on the chat transcript
Hmmm.... we need to register hasrchernwrittenasmileytherightwayround.com
 
:)
 
2:40 PM
@clarkf Indeed!
 
my brain has been hurting too much for SO lately
 
2:59 PM
arrrrrgh
wasted 2 hours because the author of this addin didn't reference the project output for the installer project...he referenced a COPY, a dll he manually dropped over
 
:(
 
@AndyE oy.
@YiJiang double oy.
 
3:15 PM
Hi guys anyone here with experience with uploadify?
 
Tek
4:12 PM
Good morning everyone. At least here in central time U.S.
 
morning Tek
 
4:34 PM
Hey, just wondered if someone could take a look at my question? It seems to have fallen off the radar. stackoverflow.com/questions/4079175/…
I need to be able to check if a height/width has been set and if not, set it to auto. This is to allow opacity to work.
Well, allows it to work in IE anyway.
 
firefox works with element.style.width
jsut compare againts ""
 
Tek
4:57 PM
I could use some simple help with jQuery /ajax. It's a simple web form.

$.ajax({
type: 'POST',
url: 'test',
data: data,
success: success
dataType: dataType
});

I read and looked everywhere, but where exactly am I supposed to put $.post("test.php", $("#testform").serialize());?
 
@Tek $.post is an alias for $.ajax
 
Tek
$.post by itself should work?
 
so your second line is like this:
$.ajax({
type: "POST",
url is "test.php", data is $("#testform").serialize()
so, to summarize, $.post should work fine for you
 
Tek
one line, just like that?
 
yep, if you need a callback function, it is the next parameter to $.post
 
Tek
5:01 PM
I have a question
if a user reloads the page
with a jquery ajax form
it shouldn't get the $_POST warning right? about resubmitting data
I'm new to javascript but not to php or web development. Forgive my noobness!
 
You're fine, I'm not sure about the resubmission warning
I don't think you should be getting one, but that may just be how I've had things setup in the past
 
Tek
For a fact I know it shouldn't now. I have used other forms with ajax and it doesn't give me the warning
but even on a simple form it's giving me the warning
I must not be doing something right? =x
form id is set to id="testform" with that one line of jquery
it's so simple I don't know where I could be going wrong
 
if you don't refresh the page, but hit the url, do you get a resubmission?
 
Tek
no
sorry for the delay, my cat was having some behavioral problems that I had to go clean up, agh.
 
bummer
does your form element have an action on it? I think this may be due to the form tag being present
 
Tek
5:17 PM
yes it does
<form id="testform" action="1.php" method="post">
Number: <input type="text" name="num" />
<input type="submit" value="Submit Comment" />
</form>
 
I'm wondering if removing the action will fix the situation, it may be trying to submit both the action and through jQuery
 
Tek
well, I saw that it should work anyway considering if a person doesn't have javascript enabled
the page should still work
 
fair enough, I'm not sure what else to try
 
@AndyE - You see the mentioned answer here? stackoverflow.com/questions/4080178/jquery-or-selector
 
What about it?
are language constructors like

if (a === (1 || 2))

ambigious?
 
5:24 PM
hunter seems deeply confused about selectors
he's under the impression that $("#selector1, #selector2 :has(.some-class)"); is a suitable replacement
because a test on <p id="one" class="test"></p><p id="two"></p><p id="three" class="test"></p>
alert($("#one, #two, #three :has(.test)").length); == 2
yes, it does happen to give the right number, but in no way at all is that test close to being correct
 
:D
 
got deleted now, not sure if you can still see it, really disturbs me when things like that are posted as answers
 
#three :has(.test) is empty and the length of the whole block is two :p
 
@NickCraver It wasn't there when I saw the question earlier, but you're right.
 
normally i don't say much, but when I see one line of code that misunderstands selectors, multiples, ordering, psuedo selectors, and descendants vs current all at once...
 
5:28 PM
I didn't actually know that hasClass would return true if any elements had the specified class. That's... interesting, to say the least.
 
Tek
Hey guys, mind giving me a hand with the trivial problem I'm having? I could swear I'm doing it right =(
 
yep, same as .is()
@Tek - shoot
 
Tek
^it's up there, you have to scroll a little bit
it's not too far :p
 
@NickCraver I would have thought, if you were testing an entire collection, you'd want true only if all of them contained that class. Is it for efficiency (stop execution and return at first true)?
 
not sure of all the reasoning, but yes it does make it a bit more efficient
to test all is easy enough though if(!$(selector).is(':not(.class)')) I suppose
 
Tek
5:33 PM
@NickCraver Basically so you don't have to read all that, I can't get this simple ajax form to work. I want it to send the data asynchronously.

<script type="text/javascript" src="./jquery-1.4.3">
$.post("test.php", $("#testform").serialize());
</script>

<form id="testform" action="1.php" method="post">
Number: <input type="text" name="num" />
<input type="submit" value="Submit Comment" />
</form>
 
of if($(selector).not('.class').length)
 
yeah
 
@Tek - The first block needs to be wrapped in a ready handler otherwise the $("#testform") selector won't find anything
also you can't have script in the same block as an include, so this:
<script type="text/javascript" src="./jquery-1.4.3">
$.post("test.php", $("#testform").serialize());
</script>
should be:
<script type="text/javascript" src="./jquery-1.4.3"></script>
<script type="text/javascript">
$(function() {
  $.post("test.php", $("#testform").serialize());
});
</script>
 
Tek
whoops, it's not in the same include. That was just me failing at pasting. haha
 
man.....who uses MooTools?
 
Tek
5:35 PM
but thanks
 
@clarkf - chick-fil-a
 
Tek
@clarkf Why do you ask?
 
I'm just wondering. I hear all these things about mootools and django but honestly
I have yet to see any reason why to look for anything more than jQuery
jQuery is beautiful
 
Tek
From what I've heard MooTools is used for full blown OO javascript applications
which jquery isn't
 
jsFiddle's author uses MooTools
that's why all fiddles include it by default grr
 
5:37 PM
@Tek jQuery isn't like a framework, though. It's just helpful.
 
Tek
yeah
 
@AndyE There has been a few times when I was tired when I was trying to debug a fiddle only to discover (after an hour of debugging) that it wasn't working because it was loading MooTools, not jQuery. grrrr
 
@clarkf: tell me about it. Thanks to @NickCraver, I now use a link to a saved jQuery fiddle in my bookmarks bar. I just fork it whenever I do anything with it.
Although, now that I think about it, it needs updating to jQuery 1.4.3
 
Tek
@NickCraver It's still not working. Am I supposed to do something else to make it work? Sorry, I'm a total javascript noob. =(
 
@Tek - I'll say this once and it's not to be mean
never, ever ever say "it's not working", describe what's not working...otherwise my willingness to help goes to -400%
I'm sure the same is true of most SO users
 
Tek
5:41 PM
Erm. You'll have to excuse me then. I meant the code that you told me to use instead.
 
again, not helpful, WHAT'S not working?
 
2 days ago, by rchern
'not working' is not a valid description of a programming problem.
 
is it erroring, is it sending anything, the wrong thing, lack of a submit button pair?
 
Tek
It's still not sending the data asynchronously.
It's refreshing the page.
Basically.
 
when you click the submit button?
 
5:42 PM
That code would be posting the data onload....
 
Tek
Yeah, when I click the submit button.
 
$(function() {
  $("#testform").submit(function(e) {
    $.post("test.php", $(this).serialize());
    e.preventDefault();
  });
});
 
There we go.
 
to bind it as a submit button handler, note that it will NOT include the submit button in the submitted pairs
 
Tek
Ah. That wasn't mentioned in the jQuery manual.
Which means that even when javascript is disabled the form should work as normal, correct?
 
5:47 PM
People are so quick to up vote answers that "look" right
5
A: jQuery: Detecting click-and-hold

treefacevar intervalId = 0; $('#myElement').mousedown(function() { intervalId = setInterval(myFunction, 1000); }).mouseup(function() { clearInterval(intervalId); });

 
Tek
I've had some people tell me all kinds of different things. I'm kind of disoriented atm. @_@
 
Hi there, does anyone have an idea how I could render lots and lots of circle on an HTML canvas faster? All the beginPath / arc is really slow
 
@IvoWetzel: I'm not a canvas expert, but I don't think so.
 
@AndyE I thought of pre-rendering and then drawing the images, that should be faster... in theory
 
@IvoWetzel: I would have thought so.
 
Tek
5:53 PM
@NickCraver I hope its not too much to ask. Could you give me a basic idea of how the php should reply to the request? Through an echo then use $.get()? I wouldn't bother you if I didn't search online already. Some of the examples are really messy and have a lot of variables and parts I don't need. It's a little overwhelming.
 
use the post callback to get the data echod/printed by php
knee deep in a minification project atm
 
@NickCraver: Still working on that Chirpy stuff?
 
yeah added some enhanced erroring, so any path problems, etc will appear in the error/message window
also fixed the ordering earlier
Was sucking in the config inappropriately imo:
var files = xElement.Descendants("File")
    .Select(n => new FileXml(n, basePath));
if (files.Count() == 0)
    files = xElement.Descendants(XName.Get("File", "urn:ChirpyConfig"))
    .Select(n => new FileXml(n, basePath));

var folderFiles = xElement.Descendants("Folder")
    .Select(n => new FolderXml(n, basePath))
    .SelectMany(n => n.FileXmlList);
if (folderFiles.Count() == 0)
    folderFiles = xElement.Descendants(XName.Get("Folder", "urn:ChirpyConfig"))
     .Select(n => new FolderXml(n, basePath))
Files = xElement.Descendants()
    .Select(n =>
                {
                    switch (n.Name.ToString())
                    {
                        case "File":
                        case "{urn:ChirpyConfig}File":
                            return new List<FileXml> {new FileXml(n, basePath)};
                        case "Folder":
                        case "{urn:ChirpyConfig}Folder":
                            return new FolderXml(n, basePath).FileXmlList;
                        default:
 
good stuff
 
little tweaks to fix a few errors here and there, more concerned with getting it in atm, will submit patches to codeplex tonight when I get time
 
6:00 PM
Speaking of time, I'm out of it. Got an 8ball match to attend :-) Ping me when you get it finished, @Nick.
bye all
 
lata
 
Tek
@NickCraver I get what you mean by using the callback. Except I don't know the syntax so I don't even know where to put the result =x
@NickCraver I know you're busy and I don't want to take up your time. Do you suggest I post it as a question in SO? I don't see any questions with simple Ajax queries.
 
always look there first, examples for each method
 
Tek
I've been reading through it, and I get the examples. I just don't know how to put the things I want together.
 
$.post('ajax/test.html', function(data) {
  $('.result').html(data);
});
right there in the page: api.jquery.com/jQuery.post
I don't think you're putting any effort into looking tbh, sorry if that's harsh but it's right there
plus the other 4 examples at the bottom
 
Tek
6:09 PM
so then it would be

$(function() {
$("#testform").submit(function(e) {
$.post("1.php", $(this).serialize(), function(data){
$('.result').html(data);
}
);
e.preventDefault();
});
});
});
correct?
that's what I mean
 
yes.
well, no
 
Tek
Ok, that's what I had, maybe I should have just shown it to you
 
you have an extra });
aside from that yes, it's correct
 
Tek
well no wonder it wasn't working!
well no wonder it wasn't working!
 
@Tek, you have an error console, that's the very first thing you check before asking anyone else
 
Tek
6:11 PM
Error console?
 
3
Q: Equivalent of Firefox's "error console" in other browsers

KinopikoIs there an equivalent to Firefox's "Error console" in other browsers? I find the error console handy for finding JavaScript errors, but there doesn't seem to be an equivalent simple way to see error messages on other browsers. I'm interested in Internet Explorer, Opera and Google Chrome. Post s...

 
Tek
You know, I've used it before but never noticed it gave you JS errors.
Considering I rarely use Javascript.
Thanks for that.
Specially your patience. I've only looked at javascript and jquery for only a few hours. I've never had any need for it until now.
 
that's what I'm around for, just short on time today
 
Tek
Understood. Well Nick, you have been really helpful and a wonderful guide. Just wanted to let you know your time was really appreciated. Can't thank you enough!
 
OK, forget about that prerendering... it's just as slow as drawing it normally and it looks really blurry too
 
 
1 hour later…
Tom
7:43 PM
Hi, could anyone tell me why this would give a _thisInstance.onTextChange is not a function?
gist: 660170, 2010-11-02 19:43:07Z
var SourceSubmissionForm = function() {
	var _thisInstance = this;
	
	//instance members
	this.index = -1;
	this.element = null;
	this.value = "";
	
	//add this instance to list
	SourceSubmissionForm.instances.push(this);
	
	//update index
	this.index = SourceSubmissionForm.instances.length - 1;
	
	//create new form
	this.element = $('<textarea id="sourceForm' + this.index + '"/>');
	this.element.css({'width' : '200px', 'height' : '200px'});
	this.element.appendTo("#mid1");
	
	//register change event
	this.element.change(function() {
		_thisInstance.onTextChange();
	});
};


//proto methods
SourceSubmissionForm.prototype.onTextChange = function() {
	console.log("inner update");
	this.value = $(this.element).val();
};
 
00:00 - 20:0020:00 - 00:00

« first day (17 days earlier)      last day (4925 days later) »