« first day (74 days earlier)      last day (4943 days later) » 

12:02 PM
does anybody here have more than 10k?
I need to know if your rep is displayed as "104,560" or "104k" on every page
and in the latter case, if there's the raw rep score anywhere on the page.
 
@radp Check the title attribute
 
If I could do it myself, I would :)
 
@radp Well, the only place I think where the full number is shown is on the user page
Everywhere else, when the something-k version is used, the title attribute has this format:
 
@radp You mean in the top bar? It displays 40,428
 
@sepp2k yep -- that's awesome! Thanks.
var rep = $("#hlinks-user .reputation-score").first().text().replace(",", "")/1 should do then.
 
12:09 PM
I'm guessing it will be the same for 6-digit numbers. If you want to be sure, create a couple of sock puppets and upvote me a bit ;-)
 
that'll take a while...
 
@radp Go and @MarcGravell (Did I spell his name right?) in the chat feedback room
I don't think there's a lot of 100k'ers in the chatrooms right now
 
if that's the way it works for 5-digit-reppers, it probably is the same for 6-digit-reppers
function get_current_reputation(){
  var reps = rep_number_obj.text().replace(",", "")/1
  if(reps === NaN){
    throw new Error("You're too awesome, sorry.")
  }
  return reps
}
 
@radp I'll go and edit the text of my rep using the console just to see that error message
Oh, but you'll have to parseInt that for it to work
 
does parseInt throw exceptions?
"a"/1 → NaN btw
 
12:13 PM
@radp Don't think so. The one I usually use is !isNaN(parseInt(n, 10))
 
sigh
parseInt("a") → NaN indeed
 
12:33 PM
setTimeout doesn't accept a closure, right?
 
@radp It does
 
oh, nice.
I need to stop relying on the first google hits for JS documentation
stupid w3schools.
 
sigh
My self respect is getting huge hits today
function _parse_api_result(change){
  var rep_net_change = change.positive_rep - change.negative_rep;
  window.console.debug([rep_net_change, 0]);
  var step = 1, diff;
  while(rep_net_change){
    diff = Math.ceil(rep_net_change / 10)
    setTimeout( function(){ _change_rep_number_by(diff); }, step * 10); // why is diff = 1 here, no matter what?
    rep_net_change -= diff;
    step++;
    window.console.debug([rep_net_change, diff]);
  }
}
(when it was setTimeout( "_change_rep_number_by(" + diff + ")", step*10) things worked.)
 
@radp setTimeout executes on the global scope
 
12:43 PM
yeah, but I'm passing it a closure
 
So I think you'll have to move diff out of that scope
 
shouldn't it capture the value of diff when it is created?
 
Eh... I've always hated ECMAScript scopes
 
._.
 
Hang on, I'm a little busy here
 
12:45 PM
no worries
I've changed it back
 
1:00 PM
0
Q: Why isn't my button activation code always working?

ChrisFI'm experimenting with a UI where certain buttons are only active under certain conditions and only become visible when the mouse moves over their location. (NOTE: I'm actually thinking of abandoning this approach but I'd like to know why my code isn't working.) The problem I've got is that unde...

Finally got back onto an old (but not that important) problem with a WPF app. Still no luck finding the problem.
0
Q: Why isn't my button activation code always working?

ChrisFI'm experimenting with a UI where certain buttons are only active under certain conditions and only become visible when the mouse moves over their location. (NOTE: I'm actually thinking of abandoning this approach but I'd like to know why my code isn't working.) The problem I've got is that unde...

 
hrm, delay doesn't delay remove :/
 
@radp .delay() only works with the effects queue
 
yeah.
does the page flicker for you too when you run this on any SO page?
$("#hlinks").fadeOut(500).delay(1500).fadeIn(250); $("<span class=\"hot\" style=\"float:left; margin-right:20px;\">You gained 5 million reps for \"How do I read the “Recent Activity” page?\".</span>").insertBefore("#hlinks").hide().delay(500).fadeIn(100).delay(400).fadeOut(900);
 
The entire page? No
Also, a better way to build a jQuery object is to do:
 
add in the style and class via jQuery methods?
 
1:14 PM
$('<span />').css({
    'float': 'left',
    'margin-right': 20
}).text('You gained 5 million reps for "How do I read the “Recent Activity” page')
    .addClass('hot')
    .insertBefore("#hlinks")
    .hide().delay(500).fadeIn(100)
    .delay(400).fadeOut(900);
 
Yeah, I guess that requires less escaping :)
 
2:07 PM
@YiJiang define evil?
 
@rchern Huge swaths of string concatenation for building HTML elements
 
hehe
 
calling .text() was overriding the attributes last night and it was late enough i just wanted to get it working and i'd look at it today
err why do the matching like that?
 
@rchern What do you mean, the "matching like that"?
 
2:14 PM
you're returning all and doing the matching client-side
why request items just to toss them away?
 
@rchern Erm... where, specifically?
 
inside your processPage
 
@rchern I don't see an easier way to do searching
 
did you look at my code?
you can pass a filter with the request
 
@rchern Ack... stupid stupid stupid (knocks head)
 
2:20 PM
let's not take a short method and turn it into a huge method for no reason (;
 
@rchern Actually, I think we still need most of the old code
Unless you want to stick with only first page results
 
i don't really see the need. the 20 most active rooms and you can filter them down based on a match?
 
@rchern Eh... /list to return all rooms
For a large site like SO the chatrooms fall off the front page pretty quickly
 
there's 100 rooms on SO
 
@rchern column-count: 3 ;)
 
2:29 PM
heh
 
@rchern Other modifications:
I've got the list to stop disappearing if you're hovering over it
I've also added /delay and /leave
 
delay?
 
5 hours ago, by Yi Jiang
/delay [time] [message] delays the [message] by [time] seconds. Not sure how useful it is... but I'm sure somebody will have a need for it
 
yeah, not seeing a use
 
> Going out for 20min, be back soon
/delay 1200 Hey, I'm back!
Hehehe...
 
2:38 PM
yeah like i said, not seeing how that's useful
if you're back, type it.
if you're not, don't lie >_>
 
I only added one thing, and we already have it, but meh. :P
 
o:
 
Ctrl + Up Arrow to navigate the messages, Right Arrow on a highlighted message to reply to that message, Ctrl + Right Arrow to quote that message, Ctrl + Down arrow to jump back to the input box (even though you can also just type anything)
Sorry, I meant Ctrl + Up from the input, after that you can just use the up arrow (the up arrow moves the page if you haven't Ctrl + Uped for obvious reasons of not removing normal browser function unless intended)
Also it doesn't scroll, etc..
is lazy
 
nice, will definitely look at integrating that
so what's the flow? type in /star and then ctrl+up + up to select the message and then hit enter?
oh wait i see, arrow shortcuts
hrm
 
@rchern s for star, r for reply etc...
Could be very useful
 
2:46 PM
I didn't want to just duplicate everything that you already had, but I wanted to start with the reply thing since I might be inclined to use that on a regular basis :P
 
well navigation alway's been planned, definitely useful
 
@YiJiang You'll be happy to know that I took that scary jQuery chain out and made the code a bit more civil there, heh.
 
Muhahahahaha...
rsmiles = {
	'\\)': '\\(',
	'\\(': '\\)',
	'o': 'o',
	'O': 'O',
	'd': 'p',
}

reyes = [';', ':'];

rnose = ['', '-'];

$(".signature:contains('rchern') ~ .messages .message .content").each(function(){
	var $this = $(this);
	for(var i in rsmiles){
		for(var l = 0; l < reyes.length; l++){
			for(var j = 0; j < rnose.length; j++){
				var permute = i + rnose[j] + reyes[l],
					replacement = reyes[l] + rnose[j] + rsmiles[i];

				$this.html($this.html().replace(new RegExp(permute, 'gi'), replacement));
2
 
...
 
woo!
 
2:51 PM
Hahah
No script for you!
 
is gonna start minifying and obfuscating this userscript >_<
 
AHAHAHAHAHA, looks like I signed back on just in time!!!
Extra props to you @YiJiang
Oh and good morning @rchern XD
 
@YiJiang Nice
 
@TheUnhandledException mmhmm, laugh it up there chuckles
 
2:56 PM
@rchern :-) How are you today?
 
fine
you?
 
lol, good plan
links to:
44
Q: Should I bother supporting IE6?

JasonIE6 is deprecated and Microsoft is bent on killing it. However, I know that a lot of people still use it. Should I continue to support it anyways?

which is locked
 
I was wondering what that question was like when I saw that ad, heh.
Now I know :P
 
"Should I bother supporting IE" would be nicer
Mind you, 9 isn't ment to be too bad
 
3:16 PM
@rchern Sorry stepped AFK. I'm doing great thanks. Headed out to the ocean.
I'll catch you guys later! Keep up the good JavaScript coding :-)
 
Enjoy!
 
Anyway, I'm thinking of making the highlighting persistent with localstorage
Would be interesting, since I never used that API before
 
hrm, JSLint complains about my use of underscores to open internal function names. Should I change them?
 
@radp Erm.. no
Just ignore JSLint. Around half the time the advice is good, but when it starts telling me how to name my variables....
 
alright.
actually I was going to assume it'd complain about my not using camelCase
 
3:25 PM
don't ignore it, just take it with a grain of salt
 
well, JSLint treated it like a syntax error really
Problem at line 13 character 53: Unexpected dangling '_' in '_diff'.
 
@rchern Well, about that specific piece of advice... I mean, seriously?
@radp JSLint doesn't really differentiate between the severity of the problems
 
@YiJiang, you said just ignore JSLint, in my sentence, it = JSLint, not that specific piece of advice
 
@rchern Ah, right
 
Yikes! One of the icons on the right started floating around.
 
3:31 PM
@Hogan Eh... you just entered the room
 
But it wasn't me, it was "Tim Stone"
 
@Hogan Tim's still there, eh, right @TimStone?
 
Yeah
 
ah... maybe it was him entering the room... a little cash and stackoverflow gets all animated.
 
@Hogan This place's always been filled with gratuitous animation. We still can't forget bouncy, can't we? ;)
Also, jQuery makes it so much easier...
 
3:36 PM
Yeah I blame (thank) jQuery
I think bouncy might have been before my time.
 
Out of curiosity how did you inject <script> tags in a page to load dependencies without @require?
 
@radp The script which @rchern is using, which I think might have been copied from somewhere else, does so by creating a script tag in the head with document.createElement, then attaches a load event handler to it
 
link? :)
 
hm?
 
I think it used to be starred
 
3:43 PM
my userscript?
 
4
A: Greasemonkey script for displaying threaded comments

Shog9Hey... There's a really easy way to get around including a full copy of jQuery for Chrome scripts when those scripts don't actually use any privileged features (GM_* functions, etc)... Simply insert the script itself into the page DOM and execute! The best part is that this technique works just ...

 
It actually just appends it to the body.
 
uh, why are you loading jQuery, btw?
jQuery is already included in all SE pages afaik
 
3:44 PM
Who's loading jQuery?
 
except for /reputation :)
 
@balpha which I @excluded a few mins ago from that answer :)
 
hehe
@radp, I load a jQuery plugin, not jQuery...
(if you were talking about me)
 
oh -- right.
 
and the with_jquery style i got from @balpha who i think maybe said it came from @Shog9?
 
3:47 PM
yes, that's the answer up there ^^^
 
ah i glanced at it but didn't see a with_
now stop distracting me from setting my fantasy football lineup! (;
 
no, calling with_jquery is from me
the technique is from @Shog9
 
hm, I assume it's going to work for non-jQuery plugins as well like SOApi :)
 
@balpha ah ok
 
Hm, I suppose I should work on the scrolling for the navigation.
0
Q: Help! unexpected java.lang.ArrayIndexOutOfBoundsException when using ByteArrayInputStream

JavaLavaHi, I get a java.lang.ArrayIndexOutOfBoundsException when using ByteArrayInputStream. First, I use a ZipInputStream to read through a zip file, and while looping through the zipEntries, I use a ByteArrayInputStream to capture the data of each zipEntry using the ZipInputStream.read(byte[] b)...

.... possible-homework ?!
 
3:55 PM
Tagged it as that
5th revision
 
Yeah, I already rolled it back.
[homework] is already pointless enough, but [possible-homework] is just silly.
 
yeah, at least tag it [possible-possible-homework] if you're not sure that it's possible homework
5
 
@balpha We should probably include the probabilities of how likely it is to be homework, and their distributions too.
 
@TimStone [12%-possible-homework] heee...
 
[hardly-homework] ?
 
4:04 PM
[homework-only-if-your-professor-is-evil]
 
@rchern Okay, this is the interface I've came up with for the localStorage thingy
	function storeSelector(match){
		localStorage['selector'] = localStorage['selector'] + ',' + match;
	}

	function readSelector(){
		return localStorage['selector'].split(',').slice(1);
	}

	function removeSelector(match){
		var selectorArr = readSelector();
		selectorArr.splice($.inArray(match, selectorArr), 1);
		localStorage['selector'] = ','+selectorArr.join(',');
	}
There's a bunch of stupid hacks in there if you'd notice
But it works, heee...
I can't believe it's been 2min and nobody has come around and tell me my code sucks
 
@balpha hrm, once I encapsulate my "script" in with_plugin, how do I call methods therein from the console?
 
@YiJiang I'm sorry, I was too busy throwing up over how disgusting it was.
But no, what makes you think it sucks? :P
 
@TimStone Thanks, I needed that
 
@radp if they never got out of the closure, you can't
 
4:09 PM
@TimStone Well, I'm basically storing an array as a string
 
@YiJiang I like to be supportive.
 
So to insert items, I'm sequentially adding in stuff
 
Do you have other choices? I'm not overly familiar with localStorage.
 
But the problem is that the string will look like
,balpha,yi,Tim,rchern
That first comma, so basically I've got that .slice(1) to handle that
 
JSON.stringify ftw
 
4:10 PM
Then in the remove function, I'm even adding an additional , in front of everything so that it works
 
@balpha the Zen of Python is truly correct, then. Better explicit than implicit :)
 
@YiJiang Ah, alright. Fair points, nothing I'd consider sucky though. That said, @balpha has a good point. :P
 
@radp this is more a case of
> There should be one-- and preferably only one --obvious way to do it.
 
@TimStone Eh... hmmm... I don't know
 
tries to put the script in its own named function and passing that name to with_plugin.
er, brb
 
4:15 PM
Which browsers have native implementation of JSON?
Also, stringify is such a cute name for a function
Hmmm... okay
if(!localStorage['selector']) {
    localStorage['selector'] = JSON.stringify([]);
}

function storeSelector(match){
	var selectorArr = readSelector();
        selectorArr.push(match);
        localStorage['selector'] = JSON.stringify(selectorArr);
}

function readSelector(){
    return JSON.parse(localStorage['selector']);
}

function removeSelector(match){
	var selectorArr = readSelector();
	selectorArr.splice($.inArray(match, selectorArr), 1);
	localStorage['selector'] = JSON.stringify(selectorArr);
Thanks @balpha
 
4:41 PM
@YiJiang Maybe instead of that first if statement just do:
function readSelector() {
    return JSON.parse(localStorage['selector'] || '[]');
}
 
@TimStone Nothing much to it really, because there's also an else branch there that processes the stuff in the localStorage if it was there
 
I was thinking more from the perspective of not adding a localStorage entry unless the functionality was actually used, but I guess it doesn't make much difference. Don't mind me. :)
 
5:04 PM
Any video experts around? I have a super-user-ish question...
 
@TheUnhandledException don't ask to ask, ask
 
Good point @radp :-)
The resort just very kidly swapped out the suck-ass TV with a nice new LCD TV for me. I want to hook up my Apple Laptop (which has a DVI port) to the LCD TV... LCD TV has VGA in and HDMI in
Looks like I need to go buy some cables... recommendations on if I should be looking at VGA or HDMI? Keeping in mind I'll probably be buying a cable for this week only, so cheaper == better
Also, not sure how audio's gonna work, LOL
 
depends™
:P
 
I'd throw you my DVI to VGA adapter, but I don't know if I can throw that far.
VGA is the only option anyway, heh.
I don't think that they sell any reasonably priced HDMI cables in stores..
 
@TimStone Arm not what it used to be? ;-)
@TimStone Thanks
I have a DVI-to-VGA for the powerbook
 
5:10 PM
Ah, cool.
 
so I'd need to buy a VGA-to-VGA to go from the adapter to the TV
 
I always prefer HDMI, but I do think that you'd be hard pressed to get a cheap cable from a retail store.
 
is VGA quality somewhat comparable, or is it likely to look like crapola?
@TimStone DVI-to-HDMI is ~$35 at the local BestBuy
 
What's the actual quality of what you're going to be displaying?
 
but, I'm not sure how audio's gonna work with that
 
5:11 PM
Yeah, that's what I thought, heh. What a rip off.
There's not an audio jack too?
 
@TimStone 720p movies from a USB drive
 
Ah, hm.
When are you going to be doing this movie-watching? :P
 
@TimStone There's two HDMI ports on the back of the TV, and one "DVI/RGB Audio" port in a different section of the back of the TV. Going to be a bit of trial and error to figure out what these ports are, looking online for a manual
the guy who put it in was really nice, but, not too technical
@TimStone At night. When the sun goes down the beach is less enjoyable :-)
No bonfires on the beach here :-(
 
OK, I ask because I can test to see if there's any difference between the connection options if you want, but just not right this second, heh.
 
@TimStone haha no, that's ok, don't go to any trouble over my vacation movie watching quality, lol! Thanks though!
I'd feel guilty :-)
 
5:16 PM
No big deal for me, the TV is just a few feet away. :P
 
no big deal, he'd just have to walk 2 miles, uphill both directions, barefoot, and in the snow.
also, i'm back (;
 
Hahah
 
but if you feel like testing it @Tim that's awesome :-)
@rchern LOL. Well if it involves disconnecting a bunch of stuff / more than a few minutes of work, I'd feel guilty for making @Tim do that just so I can enjoy the highest possible video quality... makes me feel like a jerk, LOL
 
hehe
 
But if you feel like testing it @Tim, that's awesome!
 
5:20 PM
Actually this is semi on my TO-DO list, so I might get around to it in a bit ;)
 
Sweet! :-) Are you on SuperUser @Tim? I can award you a bounty for your help :-D
 
tries to remember what she was working on with her script before hrm
 
I'm not, heh, but thanks. :P
What the hell..
Hm.
 
@TimStone Well then, I will give you a less valuable but more coveted chat star! ;-)
 
Hahah, sounds good.
 
5:24 PM
Which carries 0.001 Meta-StackOverflow Rep Value
I still think stars should be worth 1 Rep... :-)
 
yes please q:
maybe i'd have 2k rep then! (;
 
@rchern I think if that were true, you'd effectivly become an MSO moderator :-)
 
haha
79 stars in here. oy.
 
@rchern how do you see that?
 
the stars pages with a larger pagesize and $("#content a:contains('rchern')").length
 
5:34 PM
Ah, OK
 
so you need an extra API call to link to an answer, right?
one that asks what the question ID is.
oh, actually no.
 
where are you getting the answer from?
 
supplying an answer ID as a question ID works
 
most places i can think of have the question id there already
 
@rchern the reputation report
however gaming.stackexchange.com/questions/8052/ goes straight to the answer
 
5:37 PM
yeah
 
@TimStone Just FYI, VGA is highly winning the day so far
VGA-VGA cable is ~$11, verses DVI-HDMI at ~$35
So I think I'll be doing VGA instead
 
Yeah, that seems like the reasonable choice. The picture definitely won't be crappy, but it won't be HD, so...But your videos are only 720p anyway, so the difference between the two isn't worth $24.
For those prices you might as well just go to the movies. :P
 
depends
@TheUnhandledException, are you planning on watching more than 1 movie?
heh
stupid expensive movies!
 
This is just for his stay in the hotel room, heh.
Oh, right...true :P
 
(;
 
5:43 PM
I think I paid like $11 the other night, ridiculous.
And they don't even have assigned seating!
shakes head
 
@rchern Probably 3 - 5, depends on what the night activities around here are like and how the group feels
Have a 128GB drive filled with DVDs and TV shows for everyone's enjoyment
Anyway I'm headed out. Catch everyone later!
 
hell, if it's a group, $35 is cheaper than 1 trip to see a movie, heh.
 
See ya!
 
bye
 
@rchern This is true. Theater prices are crazy these days
Later @rchern and @Tim!
 
5:46 PM
In Hong Kong you get assigned seating and digital projectors for 50-75 HKD (6.5 - 9.5 USD) sighs
 
hehe
 
Not got anywhere with my WPF mouse enter event not firing problem - starting to really annoy me
 
):
 
takes a look at the question
 
@ChrisF that event should be fired.
... sigh... bad pun
 
5:56 PM
@Hogan ha! any ideas though?
 
probably, you have code?
 
Basically what's in the question
Do you need to see more?
 
Yeah, I don't know the answer by the question, unless I missed a link?
 
Looks like a caching issue to me...
can you add the dreaded ?uniquedatecode to the end of the url?
(running an errand be back in a bit)
 
6:11 PM
meta.stackoverflow.com/questions/67912/… people do this just to get the 1st answer in?
 
Possibly, though I'm not sure if that's the case here.
 
@rchern nah, being 1st is only helpful if you are 1st when people check to upvote -- and even then, it's top-to-bottom 1st, not chronological 1st
 
well if i hit a page and there are identical answers i tend to go with the oldest
 
well, that and flag the others as dupe
so you might have a point there
wouldn't answer deletion show up on the question timeline?
 
6:19 PM
so, hm, what's the sanest way to schedule a function for execution every 30 seconds, staring 30 seconds in the future?
eh, I guess it's like everything else
 
definitely an edit there, but i don't have access to view deleted questions, so maybe that's why i don't see anything on the timeline
 
Yeah, I deleted and undeleted my answer there, and it's not visible (to me).
 
hmm i must have a syntax error lol
 
0
Q: Can you create a webbased UI using .Net?

DrazicI have a WPF application, that I want to convert to an application running from the browser. The reason is that WPF doesnt run on Mac/Linux, and Silverlight is not an option because of it's security restrictions. The basic idea is to turn the app into a webserver, and handle the UI completely in...

Am I missing something? I think I understand the guy's problem, but from his comments he can't see that he doesn't want a web application.
 
@ChrisF He almost seems to want an embedded server...but...not.
 
6:27 PM
gist: 631092, 2010-10-17 18:11:14Z
It runs!! when I paste it in the console.
 
Well I've put my answer - unless I get down-votes I'm going to leave it now
 
Ah, I see..
 
can I get please an upvote or downvote for this question?
4
Q: What's the correct way to @include all SE sites?

radpWhat's the @include sequence that most accurately lists all the SE sites for greasemonkey/userscript hacking purposes?

 
Done
 
I think perhaps he wants a Mono-compatible executable that has an embedded server so that he can do the UI in the browser so he doesn't have to worry about host incompatibilities as much.
But, again...hard to tell, heh.
 
6:29 PM
Well why didn't he say so? Anyway my suggestion of Java just about solves that ;)
 
@ChrisF much obliged :)
 
np
 
you may now undo the vote if you feel like it
 
@ChrisF That wouldn't have been nearly as fun for you to try and figure out! He's trying to keep things interesting...That, or he should learn to state things more clearly. ;)
 
Oh! I get it. The "server" is installed on the client machine as well - it's just a service (or background process) the browser is used to display the UI that controls this local (to the user) application.
 
6:36 PM
Yeah
 
cmon github
I followed all the instructions
and yet
$ ssh git@github.com
Agent admitted failure to sign using the key.
Permission denied (publickey).
 
6:52 PM
@ChrisF I'm unfortunately only marginally familiar with WPF, but in reading your question I just wanted to check - Setting e.Handled on the CanExecute event object occurs completely separate from the actual component events themselves, right?
 
Is [annoying] a valid MSO tag?
 
that sounds more like a close reason than a tag
 
There was a [possible-homework] tag on SO earlier, so...Heh, why?
 
@GregHewgill Heh. I can't put my finger on why it's wrong, but it feels wrong to me. Jon Seigel edited them all out the other day, but one got rolled back.
-4
Q: What's with all the lame questions on SuperUser?

theogAll those very non-specific, throw-me-an-upvote, general opinion questions... Very annoying. Kind of like this question.

 
hrm, it so happens that .user.js files cannot piggyback on libraries that are in the webpage
gah. later
 

« first day (74 days earlier)      last day (4943 days later) »