« first day (65 days earlier)      last day (4892 days later) » 
05:00 - 20:0020:00 - 00:00

5:36 AM
I need help with calling another function from another javascript file inside a javascript file
 
create a <script> element and insert it into the document, check if the function exists and when it does, call it ?
 
6:00 AM
0
Q: jCarousel - buttonNextCallback is not called when there are no more items to load

Sri KumarMy scenario is to load only 7 items initially and when user clicks "Next" button a DB call will be made and I need to fetch the next 7 items. Default number of items to be displayed on jCarousel is set 7 and initially I load only 7 items. By default both the "Prev" and "Next" button will look di...

Any body over there can help me on this?
@DanGrossman Hello
 
@DanGrossman Can you help me the question I asked in SO?
 
 
4 hours later…
10:17 AM
Guys?
 
10:32 AM
sup
 
Dan \o/
 
webuser4.60028@im.olark.com: hi
Dan Grossman: We cannot accept payments from Nigeria due to the high rate of payment fraud.
webuser4.60028@im.olark.com: hi
webuser4.60028@im.olark.com: i need to know if ur traffic is adsense safe?
Dan Grossman: Hello. You are in Nigeria, correct?
webuser4.60028@im.olark.com: hi
webuser4.60028@im.olark.com: i need to know if ur traffic is adsense safe?
Dan Grossman: You will not be able to place an order on our website.
webuser4.60028@im.olark.com: hi
webuser4.60028@im.olark.com: i need to know if ur traffic is adsense safe?
 
Lol
 
Chatting with my website visitors hasn't been as exciting as hoped
 
I worked as a designer support for 2 years for a SaaS website. I can understand.
 
10:56 AM
Hi!
 
11:28 AM
OK this is starting to get suspicious
every other day I gain/loose 15 rep
 
@IvoWetzel Hi! Could you help me?
I'm making an userscript, and I need jQuery for it. I don't seem to be able to call jQuery.noConflict(), not even with using window.addEventListener('load', function() { jQ = jQuery.noConflict(); }, false). But if I type in that in Chrome's JS console, it does what I want.
 
I can't make jQuery work for me either :(
If I insert some HTML into some element with .html(), I can't target it with jquery ui...
 
11:50 AM
leaving
 
Anybody use CVS ?
@IvoWetzel I like to randomly downvote & upvote your stuff to mess with you
 
@Raynos Ah ok, still need to implement the kitten down vote feature :P
 
I used CVS at a company about 6 years ago
html = "<table><tr><td>hi</td></tr></table>";
$('#somediv').html(html);
$('#somediv table:first").fadeIn('slow');

why doesn't this work :( table is inserted but doesn't fade in
 
Tom
Anyone here using vim?
 
I am
 
Tom
11:55 AM
@DanGrossman how do you quickly scroll through a file without using the mouse?
 
Ctrl D/U scrolls a page down/up
 
G to skip to end of file, otherwise page up down
 
Tom
@IvoWetzel hmm, when I scroll with the scroll bar it is much smoother and I can actually keep the context in my head
 
What is a scroll bar?
 
scroll.. what?
 
11:57 AM
you're using some crazy GUI thing :p
 
gvim? Oh god
 
Tom
^^ I am using Gvim yes
it's the same as vim just with a border
 
console programs don't have things you can click on
disconnect your mouse
 
Tom
@DanGrossman but I thought the reason to use vim was not because of a lack of functionality of the console but rather because it is faster than using the mouse
(I just started using it)
 
@DanGrossman $('#somediv table:first").fadeIn('slow'); using ' and " @ the same time ?
 
11:59 AM
@Tom it is faster
 
that was a typo in chat not the actual code
sorry
$('#recent table:first').fadeIn('slow');
 
Tom
@IvoWetzel really? and you have no problems keeping context when scrolling with Ctrl U/D ?
 
I can do effects on #recent, but not the tables I insert into it with .html()
 
@Tom Context doesn't come from scrolling, it comes from code that's organized
 
@Tom: You normally can't see your whole program no matter what editor you use... it's in more than one file, many pages long, etc
 
12:00 PM
@DanGrossman Well, you try to fade it in but it's already here thanks to html(). With fadeOut it works jsfiddle.net/nFR6b
 
I tried .highlight too though and that didn't work either
I'll try fadeout just to be sure
 
Tom
Hmm, I will keep using vim for a week or so
 
hmm fadeout works! how do I fade in then...
 
Tom
I am having problems with moving parts of code from one place to another though, as I am used to selecting it with the mouse
 
@Tom Just keep using it, I only started using VIM last Thursday, but I'm already in love with it, although... it took 3 times to "get in"
 
12:03 PM
I still use the mouse to select text most of the time out of habit
 
@DanGrossman jsfiddle.net/nFR6b/2 (with some CSS)
 
don't need a GUI for that, works fine over ssh
@Chouchenos Thanks.. I'll had to hide it in jQuery first I guess
 
Tom
@IvoWetzel where did you learn about all the shortcuts?
 
that covers the basics
 
@DanGrossman Yep, it must be hidden before fading it in.
via CSS or JS
 
Tom
12:05 PM
@IvoWetzel I had this code:

var     thirdVar = 1,
          fourthVar = 1,
          firstVar = 1,
          secodnVar = 1,
          fifthVar = 1;

Now, I want to move it into order, so firstVar comes after "var" declaration followed by secondVar. How would you do this swiftly?
 
$('#recent table:first').hide().fadeIn('slow'); works
 
Tom
Sigh it did not keep indenting.
 
code markup is same here as SO
four spaces
there's a button for it whenever more than one line is in the chat box
 
Tom
@DanGrossman how would you do the above swiftly?
 
:shrug:
 
Tom
12:09 PM
I literally spend like 2 minutes trying to sort it making all kinds of mistakes in Vim =P
 
I'm not a keyboard wizard
 
some dd, shift i, a
 
Tom
@IvoWetzel dd for multiple lines?
 
cut
you cut second out
place it under third
go to start of thirdVar ctrl D to cut the rest of the line
paste it below second
move second to the var line
uh, takes like 20 seconds and I'm still pretty slow in VIM
 
Tom
@IvoWetzel with mouse select + paste takes like 5 secs
this guy seems totally crazy with vim, has lots of videos too, derekwyatt.org/vim/vim-tutorial-videos
 
12:12 PM
I use vim because I can use it everywhere, not because I want to abolish the mouse
if I'm SSH'd to a server, it's vim or what... pico?
 
Tom
@DanGrossman I just transfer the file to my own system and edit it there, you want to test things before you run them on a server anyway
 
I don't even have FTP daemons running...
way too much work
 
Tom
@DanGrossman if having the same editor is not important for me, would you disrecommend vim?
 
most of the time I want to make the change on the server, only writing something completely new or a major multi-file change do I do it locally
if you're always going to work on your own computer, then use whatever full-featured IDE you like best
svn/git protect me against mistakes
 
after some more tries it takes ~10 seconds to re-organize that list
 
12:16 PM
^ what my windows normally look like
 
Tom
@IvoWetzel alright I wont give up yet : ) thanks
atleast the colors look nice
 
here is a screencast of me using vim!
:lol:
 
...
time to eat
 
@DanGrossman My java fails on that
 
12:23 PM
anyways biggest pros about vim for me, less mouse... p/o/i/a etc. Shift+O, Shift+P are a lot faster for me
and, less GUI clutter, more space for the code, ConqueTerm is also really great
repetitive tasks are also a lot faster in VIM for me
right now I'm fighting with OpenOffice and *.doc files -.-
 
Tom
@IvoWetzel same
@IvoWetzel do you know a good plugin for a hierarchical file tree view?
 
Ugh I should learn vim :(
@Tom use vim because thats what real men do.
 
Tom
@Raynos you did not e-mail me
 
@Tom yes, I forgot. And been sidetracked recently. I'm going home tomorrow, I'll shoot of an email tomorrow evening
 
Tom
12:39 PM
@Raynos alright, thanks - and how is node.js going?
Have to go, back later.
 
@Tom ok. Its quite enjoyable.
I've been sidetracked recently. I want to get back onto node.js.
 
Tom
1:13 PM
Quite awesome how this chat reconnects in the background on connection loss
Or is that a standard feature of websockets?
 
it uses sockets?
'socket' doesn't appear in the JS
.ajax does a lot
 
Tom
@DanGrossman oh, I assumed it'd use websockets since it looks so nifty
which I know makes no sense at all, the assumption I mean
the use of websockets for a chat application like this probably doesn't make sense in general
since most people are idle
 
we're all horrible resource hogs sitting here doing nothing
I have 3-4 SE chat tabs open 24/7
 
Hi!
@DanGrossman Are they on the same site?
 
wb
@Nyuszika7H StackOverflow tavern, StackOverflow javascript, MetaStackOverflow tavern, and sometimes one or two stackexchange chats
 
1:22 PM
@DanGrossman You don't need two tabs for SO Tavern and SO JS.
 
Yes I do
 
@DanGrossman Open SO Tavern, then SO JS. After that, you can close SO Tavern because you can switch between the two on the sidebar.
 
I want to see both rooms, not switch between them and hope I don't miss anything in the sidebar
with both open I know exactly how much has been said since I last looked using the tab titles
 
@DanGrossman Oh, I understand. Yep, SE chat is a resource hog, only one uses 100,000 kB* of memory.
 
hmm no
no tabs are using near 100mb of memory, only the main chrome process
 
1:27 PM
Chrome just crashed, now its Task Manager say 40,000 kB.
 
Tom
@Nyuszika7H I think he meant resource hog on SOs server side
 
What's the proper way to get the document of an <iframe> ? Should I get the iframe by id? get it through window.frames ?
@Tom this is all ajax not websockets
 
@Raynos document.getElementById(frameId).contentWindow.document is the most cross-browser approach.
 
@AndyE thank you
 
Most browsers support document.getElementById(frameId).contentDocument, but IE 8 and lower don't.
 
1:35 PM
@Tom mainly because websockets are very different from ajax in terms of serverside handling, so its just easier to fall back to ajax on non compliant browsers then on something hideous like a flash bridge.
@AndyE and we support IE 8 :(
 
@Raynos: do you support IE 7?
 
Interesting. Object instanceof Function = true + Function instanceof Object = true
 
@Nyuszika7H: all functions are objects in ECMAScript. And the Object constructor is also a function. So it makes sense, really.
 
@AndyE thanks, I didn't know about that
Did you know that you can redefine NaN? e.g. NaN = 10
 
Tom
@Raynos actually I bet the bigger reason is that there is no reason to have about 50 open connections for each SE site while most are idle
 
1:43 PM
@AndyE Could you help me how to call jQuery.noConflict() in an userscript after jQuery is loaded?
 
@AndyE no :)
@Tom In my train of logic I go for "What cool features can my browser range support" before I go for "Are these cool features actaully going to work" :P
 
Tom
Anyone here using vim, how do you indent multiple lines at a time?
Eg. if I use visual mode to select 10 lines, how do I indent them all?
 
doesnt > work ?
 
Tom
@Raynos yes, thanks!
 
Tom
1:59 PM
@Raynos thanks
@RAynos I asked a question on SO that'd be interesting for your game as well, although the answer was rather unsatisfying
0
Q: Standalone webGL/Javascript client?

TomHi there, I'm looking into the possibilities of creating a Javascript application which makes use webGL. Since webGL is only available in a couple of browsers, and I do not want to force people to use a certain browser (directly), I would like to offer a standalone app client download aswell. ...

The idea being that whenever you create a webbased webGL client, you can also distribute a standalone desktop client without any hassle
 
@Tom I'll cross the 3D bridge when I get to it. It's going to be a pain to get real time 2D games to have a playable framerate
 
Tom
@RAynos you should use webGL to do 2D
 
Help me !!!
 
@Tom just make them download the browser. your jumping through a lot of hoops here
publish the game as an offline file and make people open it with a compliant browser
@Nyuszika7H no
 
Tom
@Raynos installing a different browser sounds scary for those who are bound to their beloved IE, while they are used to installing all kinds of standalone games
@Raynos besides you will have full control of their browser version etc., that way you're sure it is going to work for them and so are they
 
2:10 PM
@Tom it seems like such a hack
@Tom my initial instinct would be to look into seamonkey and see whether there is something there that would suit your ened
need*
@Tom alternatively trick IE8 users into using chromeframe and point that small sector that is opera to go and get chrome
 
Tom
@Raynos why do you dislike embedding the application into a custom build chrome so much? it seems like a perfect solution since it has webGL
Doesn't matter anyway, is worth thinking about though
 
@Tom I think a custom build chrome would be more difficult. To me it sounds like a right pain to set it up. I would end up forking chromium and hacking it to do what you want it to do.
 
2:25 PM
Good day everyone...
 
@ircmaxell Hi
 
How's it going?
 
@ircmaxell good
 
@ircmaxell Good afternoon to you too
 
lol... It's morning here... But Good afternoon to you...
 
2:29 PM
@ircmaxell what timezone?
 
GMT -5
(Eastern US timezone, America/New_York)
 
UTC+0100 (CET, Central European Time) 3:30 PM
 
Ahh
6 hour difference, not too bad
 
@Tom Actaully I take that back. I seems fun to branch chromium source and hack it around to make it feel like a local application.
 
is leaving for a hour
 
2:58 PM
cya
 
Tom
@Raynos yea and it allows you to have the same code for both client and browser
 
client and browser? Aren't they the same anyway?
 
Tom
@ircmaxell yes :p
 
Oh ok
just checking
 
@ircmaxell I believe we wnat to trick stubborn IE users into using chrome :). By masking the web based application as a standard windows application.
 
Tom
3:08 PM
some people feel more comfortable installing an application than installing a new browser just for 1 application
someone asked me a few days ago: "what is the difference between google chrome and google?"
she thought internet explorer is "google"
because her home page on internet explorer is google ;)
 
lol
Ohh... What about integrating a WAMP type install into Chromium for stand-alone web apps. That way just stick the CD in and it launches a new browser which operates the site internally (nothing to install, nothing to depend upon, etc)...
 
@IvoWetzel whats your opinion of easeljs.com
@ircmaxell is chromium the open source browser or the open source OS ?
 
@Raynos Only had a quick look on it yesterday, dunno, looked quite slow in FX... but then again everything looks slow in FX
 
Tom
...everytime I type array.slice(0) to clone it I feel like there should be a language standard clone method
 
3:17 PM
 
JS doesn't have a clone operation?
 
nope
 
@ircmaxell I wish it did. I'd be nice. Whether it should have a deep clone method is a different thing. Deep clones can get ugly
 
Tom
@DanGrossman that was quite funny
 
@DanGrossman And I was complaining yesterday as I was driving my car with only snow...
 
3:24 PM
Well, I like the way PHP deals with object cloning. You can override the default behavior with a __clone() magic method. So by default it's a shallow clone, but you can make it a deep one if you want to...
 
Tom
does slice create a shallow or deep clone?
 
3:37 PM
@DanGrossman: It's amazing how bad people drive in conditions they are not used to... They panic and either lock their brakes or don't turn the wheel properly or hit the gas hard instead of feathering it. Go to Montreal for a winter and you'll never drive like that again...
 
Yeah... part, the street is steeper than it looks, but in part, these people don't know what they're doing!!
You don't just hold the brakes if you're sliding~~
ya have to roll with it to have any control
more seattle slip-n-slide here
 
Yeah, Plus Seattle doesn't get much snow/ice IIRC... So it's not like it's a very common occurrence there...
 
4:04 PM
@Tom its a shallow clone of course
 
Tom
4:21 PM
@Raynos yea makes sense when you think about it :p
 
Tom
4:32 PM
God, it sure is not fair how these insanely simple iPhone apps raise millions of dollars. Maybe I should switch platform :)
 
It doesn't last...
 
Tom
@ircmaxell great image =)
 
Read the 2nd comment trying to justify it... blameitonthevoices.com/2010/06/…
LOL
Gotta love spam that's semi-relevant (Especially when it comes to missing the point)
 
"london seo service said... London SEO service provides an effective web development that attracts the traffic towards the website."
 
Tom
SEO != marketing anyway
 
4:37 PM
Right. Marketing is fair, but SEO is a sham
 
Or at least blown WAY out of proportion in terms if its importance (for me it's one of the least important things to do)
 
For any site where the revenue per visitor is low, SEO is the most important thing
 
Nope
 
Like Stack Overflow
if they fracked up the SEO, they'd have no traffic and the property would be worthless
 
4:39 PM
The most important thing is conversion. Making money off of those that do arrive, and making them want to stay... Only once that's done will SEO do anything for you
 
You can't convert people you don't have, and most sites aren't about conversion
they're about ad impressions
 
After all, who cares if someone hits your site and leaves after the first page view. What you want is low bounce rate and high return rate, neither of which are helped by SEO
 
cnn.com doesn't care if you "convert", they just care if they write enough linkbait per day to get search clicks to get ad impressions
 
@Dan: I consider ad impressions conversions (at least for high numbers of them)
 
nonsensical definition
an ad impression occurs simply by getting the person to your page
some twisted definition where it's about moving people from your homepage to other pages is irrelevant since the search traffic doesn't arrive at your homepage to start with
 
4:41 PM
landing page ftw !
 
Tom
@DanGrossman think we all agree it is important to get found by search engines, but the term search engine optimization is so overrated people believe they can get visitors just for hiring a guy who calls himself an expert in that field
in the end it's all about getting others to talk about your site anyway
 
Right, but here's the thing, how much am I going to make from a bounced visitor? 1/1000 of a cent? How much am I going to make if I can get them to stay and click around the site for 100 page views. A lot more than that since the chance of them clicking an ad is much higher...
@Dan: I'm talking about bouncing as in leaving the site after visiting only one page...
@Tom: that's my point. Not that it's not important, just that keeping people is far more important than getting them there (at least for most cases)
 
@ircmaxell: See: Demand Media, Mahalo, Hubpages, eHow, HowStuffWorks... they aren't building for stickiness or value, yet they dominate in traffic. They do it by superior SEO.
They're winning the game, can't dismiss it
 
No, they do it with a combination of superior SEO and superior content (which makes you want to click around and stay on the site). Without content, you can't make good money. Without SEO you can (Look at facebook and twitter)
 
"Superior content"? Most of those sites' pages consist of 1-2 paragraphs surrounded by 12 or more ads. They pay less than minimum wage to produce dozens of articles per day based on recently rising search queries.
Demand Media, Inc. is a privately held online media company that operates online brands such as eHow, LIVESTRONG.COM and Cracked, and is known for creating online content based on a combination of measured consumer demand and predicted ROI. The company also provides social media platforms to existing large company websites and distributes content bundled with social media tools to outlets around the web. The company also owns eNom, the world’s second-largest domain registrar. Demand Media was created in 2006 by a former private equity investor, Shawn Colo, and the former chairman of MyS...
 
4:46 PM
@Dan: Yes, but those 1-2 paragraphs have actual content. Things that aren't found elsewhere on the internet (or if they are, not aggregated in the same way). I mean you can spend hours browsing HowStuffWorks and eHow...
 
Tom
@DanGrossman how do you remove an enter in vim?
 
@Tom: Huh?
What do you mean remove an enter?
 
Tom
@DanGrossman carriage return
 
So they look at search trends to figure out what content they want to write. Then use SEO to push that content to the user. It's still the content they are making $$$ off of...
 
Backspace?
 
4:48 PM
@tom: ESC then: :/\r//g
it'll remove all carriage returns in the file...
 
Tom
eg.

someline<CR>
otherLine
@DanGrossman backspace when inserting before otherLine does nothing
 
I have never seen "<CR>" in a file in vim... do what tom said
 
And if for the current line only: :/\r//
 
Tom
@DanGrossman ehm there is a carriage return in every liine
just an "enter"
 
Strange.
 
4:50 PM
It's a file that was edited on Windows, right?
 
Tom
@ircmaxell no
@DanGrossman ↵
@ircmaxell there must be an easier way
 
I have never seen an enter show up as a symbol on the screen.
 
wait, are you sure that's a \r character? and not a setting?
on my machine, vim shows \r as ^M...
 
Tom
@DanGrossman it is not a symbol, it's just a normal enter -- how do I remove it?
 
by pressing backspace
 
Tom
4:52 PM
I do not see any characters just white space
 
in insert mode
 
I don't think it's a character...
 
Tom
@DanGrossman does not seem to work
 
It may be a formatting mark...
 
You press backspace and... it doesn't delete the character to the left of the cursor?
 
Tom
4:54 PM
@DanGrossman no, because the enter is at the line above
 
backspace will delete all the way up to the top of the file...
 
in insert mode at least...
 
like it would in notepad in windows
 
Tom
@DanGrossman when you press i?
 
0
A: jQuery or CSS: replacing the ® mark with <sup>&reg;</sup>

jAndyA normal Javascript String .replace() should do it: $(function() { $('h1').each(function(i, elem) { $(elem).html(function(i, html) { return html.replace(/(®)/, "<sup>$1</sup>"); }); }); }); Example: http://www.jsfiddle.net/4yUqL/24/ // off-topic...

 
4:55 PM
Hi!
 
@jAndy !
 
I created an UNT regex accidentally
 
@Tom Yes, press i to go into insert mode, then backspace behaves as it does in windows
 
ROTFL!
 
Tom
@DanGrossman it does not for me
 
4:56 PM
You've been hacked and someone is f**king with you.
 
Tom
@DanGrossman, no insert mode only works forward for me
 
How do you backspace forward?
 
Tom
@DanGrossman first I move forward from the point where I started insert, then I press backspac
 
@DanGrossman Probably with Delete?
 
Tom
but it won't backspace anywhere before the point where I started insert
have to restart browser, brb
 
4:58 PM
Wait waht?
in VIM? That's not anything I've seen...
 
Tom
What the heck..
For some reason my keyboard is lagging
I rebooted, did not help
When I type som keys are not being registerdas you can see in this text as well
 
nice
 
Tom
Jus got a new laptop, aybe it as problems
 
Hello all
 
5:02 PM
I type so fast that I'm used to lagging. It's funny sitting back for a few seconds and watching the words still appear... (joking of course, at least most of the time)
 
I have a quick question
I'm using the <object> tag in a page, which is including a html form from another server
 
@ircmaxell I've discovered that sometimes :P
 
Tom
That's not what I am experiecning @ircmaxell, it actually forgets about keys I alraedy typed
 
I was wondering if there was any way for me to retrieve the referring sites url either on submit or when the object is called
 
Tom
Going to shutdown
 
windows...
!!!! ;)
 
If I load jQuery with Greasemonkey (// @require http://code.jquery.com/jquery-latest.min.js), then it won't conflict with other libraries, true?
 
@Tom: is it always the same keys? If so, it could be a bum keyboard
 
5:56 PM
So uh, i've got a couple questions on a page I'm building...the page is here: http://development.smgwebdesign.com/project_fit_families/recipes.php?page=treats#

Here are 2 issues I have:
#1: When clicking an upvote or downvote arrow, the page jumps back to the top of the screen. How do I prevent it?
 
Don't use # in the href
oh and fix this:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/smgwebd/public_html/development/project_fit_families/recipecontroller.php on line 119
0
 
I don't even see that warming
Where is it?
Well
Did you click something to make it do that?
Or what?
 
I clicked on one of the arrows
and yes JS turned off
 
But you need javascript for it to work....
I'm missing something of great importance
 
Still it shouldn't give warning when JS is turned off..
 
6:04 PM
Any more warnings?
 
nope
 
 
1 hour later…
7:05 PM
hi all
 
@Opoe Hi!
 
@Nyuszika7H how are you
 
Is netbean's SVN functions super slow for anyone else?
 
@Opoe fine thanks :)
 
@Nyuszika7H yesterday you gave me a link but it didnt work :p
 
7:18 PM
@Opoe It was supposed to direct you to the logout page :P
 
@Nyuszika7H it did :')
so you wanted me to leave? :o hahha
 
Is there a good way to check if the scrollbar of a div is at bottom? E.g. I don't want it to auto scroll unless it is at bottom.
 
05:00 - 20:0020:00 - 00:00

« first day (65 days earlier)      last day (4892 days later) »