« first day (362 days earlier)      last day (4581 days later) » 

8:01 PM
$('ul>li').not(':last').remove();
 
user1385191
lol
 
$('ul>li:not(:last)').remove();
ul.hidden li {
  display: none;
}
ul.hidden li:last-child {
  display: block;
}
 
Aw, mine fails :-(
 
the css approach doesn't actually 'remove' them
but if you plan on 'readding' them back, you may want to consider never removing them to begin with.
 
Wow, actually, I just fail in general
3
var ul = document.getElementById('myUL');

while (ul.children.length > 1)
{
    ul.removeChild(ul.firstChild)
}
There we go
 
8:14 PM
jQuery devs are so smart:
// Callback for when everything is done
// It is defined here because jslint complains if it is declared
// at the end of the function (which would be more logical and readable)
 
blinks what?
 
Inside the ajax function.
I discover new gems there every time I dig in
And then yell at it for several minutes because it turns so unreadable.
 
user1385191
@RyanKinal there was nothing wrong with your first snippet
 
I am having trouble getting the autoplay attribute in the video html5 tag work within a jquery slider. Any hints?
 
@MattMcDonald It left me with a blank ul, because it took text nodes into account.
 
user1385191
8:19 PM
oversight on my part as well
 
whats worse than working with a female dev, who doesn't know anything about development?
thats right working with a female dev whos prego, who still doesnt know anything!
sigh
 
Try prego ex-wife who doesn't know anything. That's a blast
 
Oh, that's really unfortunate.
 
bleh yeah.. today I had to explain to her for the third time how an FLV player works.
she thinks the <object> tag can play flv's..
 
8:21 PM
Also, a big thanks to the person who starred that most recent quote. I appreciate it.
 
and then its like "oh my feet heart"
 
you're just jealous because she can make a baby and you can't
 
lol I made 4 :P
 
Loktar can make babby... infact he can have several on the go at once
 
can you make one with jquery?
 
8:23 PM
Come now, women obviously don't know anything, and that goes double for pregnant women, as hormones are obviously messing with their perceptions. (for future reference, this is sarcasm)
 
haha
yeah Im not against females/female devs/prego women (I have 4 kids) just the combination of that and the fact she doesnt even know what escape() does frustrates me to no end.
 
jQuery.baby sends an email to John Resig, requesting that he impregnate you or your significant other.
4
 
LOL
 
Does she think she knows stuff?
 
that needs to be a cowbell method
eh she pretends in front of others @Zirak but in front of me she doesnt.
Her task for the past 2 weeks has been to make this flv player flv-player.net/players/normal/generator show thumbs. Which just means.. add the friggin startimage param. Im not doing it for her though, she can flounder.
 
8:25 PM
$("wife").impregnate({success : recursion, error : blameGod});
Are government devs really that clueless?
 
YES. Im not exaggerating even a little.
she thought you had to manually send files to a server admin to run a public website.
and she was the "best" they could find sobs
 
Wow. I'm so sorry for you
 
dont be, I get paid a good amount and get a good amt of freedom, those are the only things keeping me here lol.
I just enjoy complaining about it otherwise Ill explode one day haha
 
Later all.
 
see ya
 
8:28 PM
Time for drinking and dancing.
 
mmmm, drinking. Good idea.
@tereško I've looked at the jQuery ajax function, and can't seem to find where the memory leak (or just an abandoned variable) can happen.
 
user1385191
am I the only one bothered by return statements at the top of a function (when something else follows)?
 
Of course, it's possible that it's hiding somewhere in that giant spaghetti bowl of code
 
what do you mean matt?
 
It's also possible that it's in the Deferred object they like to abuse so much
 
8:35 PM
var doStuff = function(){
  return 'no screw you!';
  solveWorldHunger();
};
 
user1385191
well, one problem is it looks like they aren't nulling the XHR object
 
user1385191
so those would pile up
 
var woman = function() {
    var task = solveWorldHunger;
    return "no screw you!";
    task.call();
};
 
Still no luck getting the autoplay attribute in the video html5 tag work within a jquery slider. Is this a known issue?
 
user1385191
someone really needs to tell these guys to keep their functions under 30-50 lines long
 
user1385191
8:41 PM
speed be damned, the "dev" version is hideous
 
And they return the jqXHR thingy, so it'll be gc'd too
Took me a while to realize that transport means the real xhr...and yeah, the code is uglier than Sarah Jessica Parker
Wait..not I'm not sure. Damn you jQuery!!
YAY! Everyone loves obfuscated multi-line ternary! github.com/jquery/jquery/blob/master/src/ajax.js#L211
 
user1385191
I see a lot of crap on github like that
 
user1385191
"but it's smaller!"
 
user1385191
even better is the massive chaining on the return statement
 
user1385191
return why().am().i().not().using().variables();
 
8:51 PM
I'm gonna save it as an example of how chaining can be abused
 
> Against stupidity the gods themselves contend in vain
 
looks at @Raynos
 
HUBRIS!
It's everywhere!
 
@MattMcDonald var because = { i: {am: { cool: false} } }; console.log(because);
 
It's like Air
And most people are acting like Trees
 
8:56 PM
night y'all
 
night rlemon
 
i linked that yesterday!
 
well... once more can't be bad, right?
 
certainly not
 
user1385191
9:09 PM
not at all
 
Also... almost everything I see lately is stuff that bubbles up the to HN front page
 
yay i got my dns issues sorted out
now all i need is a computer and a static IP
and i will host internets
 
cool
 
9:46 PM
div.sections div a:visited {
  color: black;
  text-decoration: none;
  font-weight: normal;
}
^ Any special reason I can't get the font-weight to work?
 
user1385191
context?
 
 <div class="sections">
      <div>
        <h3 title="Artifical Intelligence: A modern approach (ISBN: #978-0-13-604259-4)">From AI:AMA</h3>
        <ol>
          <li>
            <ul>
              <li><a href="./aiama/1/n.html">Notes</a></li>
 
do a global search for !important
 
@david Doesn't exist in here. I wrote this from scratch about an hour ago.
Actually, let me try and run this through a validator...
Doc passes html5.
 
inspect element
 
9:52 PM
div.sections a:link {
color: black;
font-weight: bold;
text-decoration: none;
}
@stevether It's only taking the a:link stuff, a:visited seems to be neglected.
a:hover works fine, for some reason.
So I've done something stupid with the psudo-class I suspect.
 
user1385191
no, I've just noticed this on test cases
 
user1385191
found this on the CSS 2.1 spec:
 
user1385191
> User agents are not required to reflow a currently displayed document due to pseudo-class transitions. For instance, a style sheet may specify that the 'font-size' of an :active link should be larger than that of an inactive link, but since this may cause letters to change position when the reader selects the link, a UA may ignore the corresponding style rule.
 
 
Awh ffs.
I'm trying to do a very minimalist greytone layout and I wanted unvisited links to be bolded or something.
 
user1385191
9:56 PM
> Note. It is possible for style sheet authors to abuse the :link and :visited pseudo-classes to determine which sites a user has visited without the user's consent....UAs may therefore treat all links as unvisited links, or implement other measures to preserve the user's privacy while rendering visited and unvisited links differently. See [P3P] for more information about handling privacy.
 
Thanks @MattMcDonald and @Zirak I'll figure out some other way to deal with it :(.
 
@jskungfu You're using a site that is not controlled by the jQuery project. Please use http://jqueryui.com/demos
 
@Feeds LOLWUT?
 
user1385191
@jquery I can not download jquery UI modules and site seems to borken http://jqueryui.it/demos #jquery #jqueryui
 
Not sure what the jquery.it site is... it keeps coming up when I search for api documentation
 
10:00 PM
Creative Commons admits that lawyers aren't human! creativecommons.org/publicdomain/zero/1.0
> This is a human-readable summary of the Legal Code (read the full text)
 
user1385191
and even the human-readable one is confusing
 
Groupon tries to hire DHH, asks him to send résumé to discuss "opportunities": https://gist.github.com/1285068
 
ahahaa
man he is rough
"I think jrmehle had the best response:
Recruiter: How many years of Rails experience do you have?

DHH: ALL OF THEM"
 
Hrmm, is there a good way to deal with fonts jumping in height?
for instance, mouse-over turns it bold, it pushes all content under it down a few pixels.
 
10:15 PM
non % based line height?
(i don't actually know)
 
bold on mouseover? That's a nasty effect...
 
@david That's done it. line-height: 12pt; Thanks dude.
@ŠimeVidas How do you mean?
 
So I got this issue with jsFiddle...
 
@ŠimeVidas Is it laggy? :P
 
what's wrong with bold on mouseover? :(
 
10:16 PM
@Incognito I don't like the effect it creates...
The text changes in width...
 
@ŠimeVidas You might like it the way I've done it, it's a purely greyscale minimalist site. I'll make a note to show you when it's up.
 
you need to make sure it doesn't change in width... i agree with that, it looks terrible then
 
@Incognito Yes, it certainly can be done well....
So, jsFiddle...
 
@david Width is a non-issue, it's a linear navigation pane rather than in a paragraph.
Yes, jsfiddle.
 
when I choose "jQuery (edge)" I get Firebug lite...
The Firebug console pops up in the bottom right box
That's cool
 
10:19 PM
Because there's a checked box to the left labeled "Firebug Lite" :P
 
However, Firebug lite is not available when I choose "jQuery 1.6.4" :(
jQuery (edge) is this: code.jquery.com/jquery-git.js
It's the latest alpha
 
Try jquery noconflict?
 
wow .. this is useless
 
I don't want to make my demos with jQuery alpha but I do want to have this Firebug cosole...
 
10:22 PM
@Incognito no conflict?
 
@ŠimeVidas Why? What's wrong with dev tools/actual firebug? The firebug lite there is pretty useless
 
What do you use as a testing tool for your sites, to see it across all browsers and platforms?
 
@ŠimeVidas Just include it in your regular jsfiddle: getfirebug.com/firebug-lite.js
 
@Zirak It's cool because when I publish my demos on SO, the people who look at my demos can see the console right away...
 
@ŠimeVidas api.jquery.com/jQuery.noConflict -- my first assumption would be that jquery is causing global var name conflicts in the alpha.
 
user1385191
10:24 PM
I'm eventually just going to go back to making web pages for demos
 
@Zirak How juxtapose.
 
user1385191
so sick of these psuedo-IDEs messing with coding style
 
@MattMcDonald Raynos started using cloud9. I'm counting the days till he comes in screaming about how awful it is.
 
@ŠimeVidas Because they're too stupid to use their own?
 
@Dennis Ah yes, that's one way to do it...
 
user1385191
10:26 PM
what happened to just letting the user decide how to type (ie: vim)?
 
@Zirak It's just convenience ... I want the demos to be as user friendly as possible...
 
i love sublime text
 
@MichaelBlaustein Well, Firebug lite is visible across browsers...
 
Eight bytes walk into a bar. The bartender asks, "Can I get you anything?"
"Yeah," reply the bytes. "Make us a double."
 
hi fans
 
10:34 PM
user image
4
 
10:46 PM
 
11:05 PM
[nyan:nyan][nyan:nyan]
ahhhhh ;)
@formatting-system ?>!?>!?>!?>!
 

« first day (362 days earlier)      last day (4581 days later) »