« first day (131 days earlier)      last day (4803 days later) » 

12:10 AM
Anyone mind helping me with jsfiddle.net/Shaz/MJC5A ? It won't "log" the char variable :o
 
function log(str) {
    var div = $("<div />");
    div.text(JSON.stringify(str));
    $("body").append(div);
}
You can't append a string to the DOM, you need to either create an element, or a text node
I am unsure how to create text nodes with jquery...
 
user1385191
well it's not like document.createTextNode(str) is that difficult
 
that's like saying you don't need $("#id") because it's not like document.getElementByID() is that hard :P
it's meant as a shortcut
being able to do $.textNode(str) or something would be nice
 
Thanks david, didn't even think of that. :P
I've always used append before and it happened to work, so wasn't sure why it didn't in this case
 
It does work sometimes, I think in this case it's trying to treat your string as a selector, and failing
 
12:18 AM
@david you can append a string jsfiddle.net/3EddH
 
if you put an alert(e) in your catch block you can see the error it is throwing
oh, you're tryign to append an array, not a string
that's why it's broken
 
I call bullshite! :o
 
user1385191
log(char.toString()); ;)
 
@MattMcDonald that prints an array rather then a string
You want to use .concat to join two char's
 
user1385191
yep, concat the array/string merge
 
user1385191
12:22 AM
I was too quick to the gun
 
Well thanks people, I got it working. :)
 
Anyone here?
I need some help with jQuery and Ajax.
 
here, but I'm no help
 
Sure
 
@Shaz Thanks, here goes:
I'm trying to do some screenscraping.
I got my request to work through jQuery's $("#somediv").load(); method.
However, I want to load that information into a variable, not into somediv.
So, the next step is to use $.get.
I'm trying to parse the data now.
The other problem is that I want to load a specific part of the response.
I'm trying to use .find() for that.
But I need the response to be in the proper format first, AKA responseXML.
It's being returned in responseText.
@Shaz - How can I traverse responseText or convert it to responseXML?
@DanGrossman - See the background I've posted.
 
12:38 AM
That's a bit farther than my grasp. But, have you tried something like
`var x = $("#somediv").load().html();`
...and use #somediv as just a dummy (hide it)?
 
Don't do that :/
 
@Shaz Oh, I haven't, but it shouldn't be necessary.
I want the data in a variable.
 
What's the data (URL?) you need to do something with? Maybe I can fiddle with it
 
var cityAndState = "";

$.get('http://maps.google.com/?q='+zipCode+'', function(data){
cityAndState = data;
cityAndState.find('#link_A_1 .pp-place-title');
_alert(cityAndState);
});
in a function
 
Oh, so you're trying to scrape HTML? Not parse XML?
 
12:42 AM
@DanGrossman right
:-D
 
0
Q: Does Ajax - cross domain request return the request header?

murvinlaiI know that the ajax-cross domain call will not return the data from server. however, does it return a http header, like 200, 404..etc?

/me thinks he's doing something he's not telling us...
 
Surely there is an api for Google Maps that you can use?
 
I see
 
@Moshe Even worse that you now want to do this as JSONP since you can't make AJAX requests directly to someone else's domain... so you're scraping two services for every zip code
 
12:45 AM
@ircmaxell Hang on, I'm using a script to enable XSS, but it works. I cant seem to traverse the returned data object myself. $().load() worked just fine.`
@DanGrossman kinda
 
me? Huh?
 
@ircmaxell Thought that you were referring to my issue here. It's a similar question.
 
No, that's saying cross-domain requests actually get fired but don't return a value
 
@ircmaxell right, realized after
 
hehehe
 
12:48 AM
@DanGrossman - Any thoughts?
How do I traverse an object returned as responseText using jQuery?
 
JSONP doesn't return text, it returns JSON and a callback
 
I got responseText from that code.
What's JSONP?
 
the only way you can do cross-domain ajax without writing your own proxy
 
right
 
So I'm using a proxy now, no?
 
12:50 AM
Did you write a proxy you haven't told us about?
 
@DanGrossman see above^^^^^
How do I use JSONP?
 
/facepalm
 
I don't think you can use it with an arbitrary webpage that returns HTML, I give up
I don't like working on this, since it shouldn't be done :/
 
hrm, I can't download v8?
 
If you want to map zip codes to cities, either find an API that does that, or find a database and use it
 
12:52 AM
@DanGrossman It returns everything as responseText, I've tried it.
It loads fine, I want it in a variable.
 
responseText is a variable
something = responseText will put it in another variable called something
 
@DanGrossman Ok.
I know that.
 
Where does it need to get?
 
@DanGrossman I need to parse out a particular id on the DOM tree, the rest can get trashed.
I was trying to figure out how to get .find() to work.
 
> Description: Creates DOM elements on the fly from the provided string of raw HTML.
 
12:56 AM
you would $(response).text()
ok, going back to lurking, i have a THC
 
@drachenstern thanks.
@Shaz, @drachenstern, @DanGrossman - Thank you all.
 
Holy Shiznit! Node is fast!
5000 req per second for hello world at 1000 concurent users
on my laptop
Completed 70000 requests
apr_socket_recv: Connection timed out (110)
Total of 72689 requests completed
 
@ircmaxell why do you think we like node? Its evented & non blocking. Node was made or multi user persistant server
 
yeah, but anything sustained more than 50 concurent requests results in tcp timeouts
which is not good...
 
1:09 AM
really?
 
that's the above error
 
what do you mean 50? 1000?
 
ab -n 100000 -c 100 http://127.0.0.1:8124/
results in the above socket error
 
thats100 users from one ip at the same time. Thats not goingto happen in the real world
 
right
 
1:13 AM
Does it make a difference that they're coming from one IP and not many?
 
It shouldn't
and that's the point
I would expect it to function quite fine under those loads
 
what does your 'hello world' do? is it a simple response, or does it wait at all?
does it die because it runs out of memory, or just because it can't keep up?
 
var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello World\n');
}).listen(8124);

console.log('Server running at 127.0.0.1:8124/');
It never dies. it just drops connections
 
@ircmaxell ab -n 100000 -c 100 http://127.0.0.1:8124/ causes an error you can see from the computer that ran ab?
I am running that and it's not even showing up as load
[admin@www ~]$ ab -n 100000 -c 100 pulse.w3counter.com
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, zeustech.net
Copyright (c) 2006 The Apache Software Foundation, apache.org

Benchmarking pulse.w3counter.com (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
> Requests per second: 1114.26 [#/sec] (mean)
 
Yes
 
1:23 AM
that's from a different server to my node.js server, in different states
Concurrency Level:      100
Time taken for tests:   89.745587 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
 
hrm, weird
not happening anymore
 
Does anyone here use cloud9ide much?
I'm trying to figure out exactly how it interacts with github...
 
Benchmarking from localhost
Complete requests:      100000
Failed requests:        0
Write errors:           0
Requests per second:    3660.82 [#/sec] (mean)
 
does it just use it as an initial source? or does it push any changes I make in the ide back to the git?
 
@david Easiest way to answer this question is to make a change then look
 
1:28 AM
I thought so too @dan, but i'm kinda new to github so I can't actually tell if anything has changed or not :$
especially seeing as I think i forked someone else's project to begin with..
 
Write a new word in the file, look at the file on github.com, see if it contains that word?
(look at your own list of repositories, which are on your github.com homepage)
 
It didn't appear in my list of repositories :(
maybe it forked it to a magical land far far away...
 
Heh, sorry, I can't really find out since it's a closed beta
 
All good... I'll just keep fiddling around.
It's kinda cool, I'm hosting a version of the node_chat thing
I just hope the changes I make aren't breaking anything :S
 
You're not breaking anyone else's code, if someone else wants to take changes from your fork (wherever it is) they'd have to pull them in
Which, BTW, is a confusing process to me. I've had a couple "pull requests" from people that forked my code.
 
1:34 AM
trying to make sense of jQuery.live()
Tell me if this assertion is true:
the live() registers events to those controls which are not loaded into the DOM yet? Which means if a particular button which has come after a ajax call (which has a class say "button") has to have an event associated with it we should _live_ register it?
 
really? The best way to make a server in node.js is to start it with nohup?
3
A: Node.js as a background service

SBuse nohup nohup node server.js &

 
don't you just put like an & after it?
 
@ircmaxell I use monit to run (and restart if it fails) node
 
not as an init service?
 
monit is an init service
so monit will see node isn't running, then start it
check host heartbeat with address pulse.w3counter.com
    start program = "/usr/local/bin/node /var/www/node/heartbeat.js"
    stop program  = "/usr/bin/pkill -f 'node /var/www/node/heartbeat.js'"
    if failed port 80 protocol HTTP
        request /pulse.js?id=1
        with timeout 10 seconds
        then restart
 
1:38 AM
right
but that's not an init service (monit is, but node isn't being run as one)
/me will have to write a deamonizer and init script
 
Is there some advantage to making it its own daemon?
I consider nodejs unstable, so I wouldn't run it without some other process watching that it doesn't crash
 
Well, you need a process watcher too
I use monit and init
so all monit does is "/usr/bin/service servicename start"
sure, you need one for each app, but you can do much more
such as clean restarts (using signals), etc
 
@Dan how often does your node server crash just out of interest?
 
I guess I just don't trust anything but the core OS. (I have had monit crash on me before)
 
@david Now, never. Zero crashes from January 15 to February 18 when I restarted it to make code changes. But initially I had to patch several modules I was using as they're buggy and any bug takes down the whole node instance, unlike losing one thread in a typical web server.
 
1:47 AM
ok, I'm off... later
 
That's encouraging. My node experience is pretty limited. I installed it in a linux VM a while back to have a play, installed mongoDB too, but didn't get much further
cya ircmaxell
 
@david I wasted so much time on trying to install and use mongodb drivers that I never got working...
@david I ended up just talking to MySQL with the MEMORY engine, so it's running an in-memory database for me.
 
i'm not sure how that works... does it still persist the data to a disk? or does it all vanish if the MySQL instance dies?
 
It's entirely in memory, no disk, if MySQL dies the data's gone
Which is fine since I don't need to persist it... if I lost all the data, it'd get recreated within 20 seconds as every client talking to the server sends its next ping
 
1:51 AM
Ah, I guess in that case it's okay...
I'll probably want my data saved to disk though
 
It's the data for this dashboard node.js is tracking
 
are you using node in conjunction with another type of server? one that /does/ save to a disk?
 
that's the demo for one website, there's similar dashboards showing the realtime activity on each user's site
nothing shown on that webpage is persisted, since it's all transient information
 
woah that's crazy
 
2:04 AM
RT @mfinkle: New Firefox 4 beta for Android out! Faster panning, page load and startup - plus uses less memory [http://mzl.la/g1HONS]
 
Why would I want Firefox slowness in my Android goodness?
 
@Feeds Firefox 4 seems a lot slower than the current stable version, but maybe it's just me.
 
I hear the windows phone uses IE...
 
RT @phillipadsmith: Six questions about semantic data and news innovation http://bit.ly/fmEBMy
 
@david No way.
 
2:21 AM
@david they call it Internet Explorer but it can't be exactly the same.
it's all mobiled out
 
@Nathan Must still be using Trident though?
 
Does it work though? Or will I need to do weird workarounds still?
 
Must be; you can't expect them to use Webkit or something.
@david I think they only have like 3 users so I'd put even Opera users at a higher priority.
 
There are a couple million people with Windows Phone 7. Not a lot (2-3%?) but not nothing.
Just tried Firefox 4 beta on my Android phone. It's slow compared to the built-in browser
And oh my god the webpages are unreadable
 
I was briefly hopeful that the whole iphone/android thing would kill off microsoft's non compliance
 
2:28 AM
And oh my god it just crashed because "jquery-min is unresponsive"
 
ahahaha
 
Wow
 
goodnight, all
 
night @nathan
 
2:44 AM
night all
night @nathan
 
night myles
 
gn @david :)
@david btw Raynos is your man for C9IDE
 
orly? I'll have to pester him when he is next on
 
Yes sir :D
anyhoo night :)
 
3:02 AM
Oh nice @MylesGray you getting into android development?
just saw your question
 
@Loktar Trying too... its not nice :(
 
I made this the other day
 
trying to make an SO dashboard widget
sweeeeeet :D
 
i found alot of similarities between its 2d canvas, and html5 canvas element
so i just ported over some code
 
shortens battery life by an hour, best. revie. EVERRRR
 
3:04 AM
haha yeah
thats my brother in law
 
needs more unicorns...
 
yeah ive got tons of ideas for live wallpapers
 
was it hard to get the app framework set up?
 
yes.
that was the hardest part
well, actually i lie
the hardest part was the apps settings itself
 
im using intellij something or other
 
3:07 AM
the stupid manifest file was giving me issues
 
can switch to eclipse if its easier :)
 
eclipse was easy to setup
google has some pretty good docs on it
also not sure if you want to do java or html5, but theres an app called phonegap
itll turn your html5 apps into android apps
i havent personally used it, but i might give it a try
 
hmmm...
interesting
i have used java before so i might give it a whirl
anyhoo... bed time :D
later man :)
 
see ya
 
 
2 hours later…
4:57 AM
@DanGrossman, FF on android is extremely slow at the moment, though I can't wait for it to be polished up.. love the tabs feature
 
Idunno.. the built-in browser has tabs already..
 
true, but takes 3 whole taps to switch tabs!
Does anyone use jsapp.us?
 
5:14 AM
No sir
 
 
2 hours later…
7:35 AM
RT @johnallsopp: "Michael Mahemoff, Chrome developer advocate, speaks on emerging web technologies" - Interview: Google on... http://tum ...
 
 
2 hours later…
9:30 AM
@Feeds Tum? Uh...
 
9:45 AM
Hi! :)
@YiJiang Actually, it's tumblr.com/xvh1lj75cb :P
 
@Nyuszika7H Ah ha! Stupid twitter cutting off the rest of the retweet
 
@YiJiang No, twitter doesn't cut it off… It's Feeds' fault. (actually, it's a problem with the onebox)
 
@Nyuszika7H o_o Going to post a bug about this...
 
my morning is filled with using tables for layout :) ... :(
 
@Greg Seems like an unhealthy way to fill your morning
Here, what about some cookies?
 
9:56 AM
@YiJiang gotta make a design into an email
 
in The Tavern (General) on Meta Stack Overflow Chat, 7 secs ago, by Nyuszika7H
> You've earned the "Enthusiast" badge. See your profile
Hooray!
 
I'm not allowed to use standards for email HTML ...
 
@Greg Yeah, ouch...
Email HTML - the Last Frontier
 
outlook 2007 is the worst candidate for compliant html
worse than outlook 2003
 
@Feeds Just read through the first part of the interview, and seriously? he wants Chrome to take that much credit in driving innovation forward on the web? Makes me want to wave some of Chrome's silliest bugs in his face...
 
10:04 AM
My morning ...
My html...
 
@Nyuszika7H I don't know about you, but I'll probably never call SO's CSS beautiful
 
@YiJiang I meant I beautified it, because it was minified.
 
@Nyuszika7H I know what you mean, I'm just commenting on the fact that posting it here doesn't really encourage people to write good CSS ;)
 
jQuery 1.5.1 will be released today!
 
10:16 AM
@Nyuszika7H does it fix the ui bugs that 1.5.0 introduced?
 
@Greg I think those might be bugs on the jQuery UI side, so...
 
@Greg Look at the changelog.
#2551 Make sure .val() works after form.reset() in IE
#4537 Make sure .clone(true) correctly clones namespaced events
#4966 Don’t add “px” to unit-less properties when animating them
#6774 Make sure we only access parentNode if it’s available. Fixes an issue where after an option tag has been detached, an elem.parentNode error would be thrown.
#7531 Fix again for IE9RC. Enhances ajaxSetup so that it can take an optional target option, in which case target will be updated instead of ajaxSettings. That way, fields that shouldn’t be deep extended can be listed and dealt with in one place. jQue
 
> Today marks a very special day — I’m proud to announce the official launch of the [WHATWG HTML5 specification for web developers ](developers.whatwg.org). It features find-as-you-type search, offline access, beautiful typography, technical references pulled inline, and alternate styles for handheld devices or low resolution displays.
@Ivo We should look at the technology that went into building that page - definitely bits here and there that we can learn from
 
jQuery 1.5.1 released! – no blog post about it so far.
 
I'm fine with 1.4.4 and 1.8.9 - not going to upgrade until I need to or a significant change is made
 
10:37 AM
0
A: Why does Stack Overflow not use HTML meta tags?

Nyuszika7HProbably they set up the headers in PHP, like this: <?php header('Content-Type: text/html; charset=utf-8'); ?>

 
@Nyuszika7H Except of course they don't use PHP
 
...
 
10:53 AM
jQuery.extend(jQuery.fn, {
    resize: function(x, y) {
        $(this).animate({ width: x, height: y });
    }
});
 
11:09 AM
@Nyuszika7H what's that for?
 
11:38 AM
hooray
 
hooray, @IvoWetzel is here!
 
I'm as good as hired :O
 
12:04 PM
congrats
i need somebody some travel to cebit ;)
 
@IvoWetzel google?
 
Zynaga
 
Hi! :)
 
12:19 PM
@Nyuszika7H hi!
 
@evilpie That's one a too many :P
 
i can't remember the right spelling
what did they say?
 
well the conversation with the recruiter on friday is basically about the the job offer and I got a mail from my "future" boss with a "would be great if you could start next week friday"
 
Hmm, hoverIntent needs two parameters.
 
looks good
 
12:30 PM
so, unless I say no or there's something really strange in the contract everything's fine :)
 
It seems that I need to return $(this) in my function to preserve chainability.
 
why are you doing $(this) ?
 
@IvoWetzel, congrats :) Zynga should be an exciting place
 
@evilpie I need to pass this to the jQuery function (alias: $) to use jQuery functions on it… it seems you don't know much jQuery.
 
i don't know jQuery, just curious
 
12:43 PM
Actually @evilpie is right
 
@Box9 ?
 
@Nyuszika7H so this is new functionality in 1.5.1?
 
When extending $.fn, this refers to the jQuery object
Since $.fn is the jQuery prototype
 
@Greg No. hoverIntent is a jQuery plugin.
 
i think you don't need the $ in resize
 
12:44 PM
@evilpie oh you're right, I don't need it in jQuery.extend :)
 
@Box9 Thanks, yeah it definitely is :)
 
@evilpie no your example is wrong, I do need $(this) in hoverIntent
 
@IvoWetzel yeah wish there were more of the young, innovative startups where I am
 
@Nyuszika7H I thought you were showing new 1.5.1 functionality
 
12:47 PM
it's there
 
@Greg no
 
uh, event handler functions etc. get passed the plain object
so for jQueriness you need to use $() on this
oh and of course make sure it works at all
> $("#box").hoverIntent is not a function
 
look under "managed resources"
 
still, FX4 throws the error
 
12:50 PM
wfm
 
I just discovered careers.stackoverflow.com today... has anyone received an invite or know how it actually works?
 
RT @thegeektalk: Ivo Wetzel #C #JavaScript #JS #Python http://bit.ly/hLa5yX
 
@IvoWetzel maybe add a section about numbers to garden, like NaN +0 -0 etc
 
hi all! its not a js question, but does anyone of you know a good web host where you can pay with paypall?
 
@Box9 I put my cv on it but nay much activity on it
 
1:01 PM
@evilpie I'm busy enough with the job thingadong, next week will be a lot of stress
 
@MylesGray ah, interesting... you received an invite to do that though?
 
i will make a draft
 
@Box9 very easy to set up :)
@Box9 nope i had a careers v1 cv as well ;)
 
@MylesGray ah that's why. It's interesting though, maybe it'll take off with v2
 
do you need an invite to join?
ill try invite you if i can
 
1:03 PM
near, huh...
 
@MylesGray Yeah apparently I do. An invite would be nice :)
 
@Box9 aparrently i cant give out invites :(
 
@MylesGray At least it's almost in the same country
 
well..
still 500/600 miles away
 
@MylesGray ah okay, thanks for looking though
Hehe, I guess I can't complain about my one job in Sydney
 
1:08 PM
@MylesGray Relocating within a country would be mostly okay; relocating more than a thousand kilometers to another continent on the other hand...
 
@YiJiang not with in the same country ;) - Besides if im gonna move i want to goto swizerland/germany/austria
 
I am living in Germany and got results from Switzerland, thats okay
 
It's around ten thousand kilometers, gosh, that's some definition of 'near'
 
oh dear :P
 
1:36 PM
Surfin' Safari » Web Inspector: Styles Enhanced http://goo.gl/WUhja improvements to CSS editing features
 
@Feeds A few interesting bits, though half of it Firebug already has. Definitely wish Firebug won't just arbitrarily remove unrecognised CSS rules, though I guess that may have more to do with how Firefox works than anything else. Bah, what do I know...
 
@YiJiang why do you always talk to the bot
 
@MylesGray Commenting on the articles it's posting here
 
Oh I thought it had some higher power purpose, like you were communicating with the illuminati through it
:)
 
Good Morning
 
1:46 PM
@MylesGray Meh, we'll all have telepathy well before than :P Who needs such primitive communicative efforts like this!
 
@YiJiang Very true... I wish I was telepathic, then I could work out WTF is going through IE9's teams heads >.>
@ircmaxell 'mornin 'guv'nor
 
How's it going?
 
hi guys! how are you?
Got a little question, maybe someone can help me out
nombreEmpresa.value = "anything";
that should change the value of nombreEmpresa
it works fine
but
how can I don it this from a browser bookmark
say in chrome
javascript:(nombreEmpresa.value = "anything";);
sorry
javascript:(nombreEmpresa.value = "anything");
ir takes me to a new page
that says anything
Just in case nombreEmpresa is a input
 

« first day (131 days earlier)      last day (4803 days later) »