« first day (876 days earlier)      last day (4077 days later) » 

12:00 AM
@copy You'd still need to copy/paste the code, make sure to select only the code and not anything around it by mistake and run it. Chrome has a developer console that lets you run code too you know...
 
I'm actually using Chromium for things like that most of the time. Just making a point
 
Nope, normal browsing, reading documentations -> vimperator, development -> chromium
 
Hmm
var test
 
If A = B and B = C, then A = C, except where void or prohibited by law. ~ Roy Santoro
 
12:19 AM
@copy That is hilarious
 
0
Q: Multiple calls to Raphael hover function only works 'sometimes'

atomSmasherI have a function called drawPoint which is called several times using a for loop. The amount of iterations changes depending on which slide the user is viewing. On average the loop is iterating 8 to 10 times. Sometimes the hover event sticks to all of the iterations, and sometimes it doesn't. M...

 
12:44 AM
what's wrong with this guy
Jon Skeet, Reading, United Kingdom
541k 171 2856 4284
 
That's Jon Skeet, I read his book
He's awesome
 
but thats extra ordinary
 
He is very knowledgeable
He is a book called C# in depth which is very decent
Also, he always provides good and informative answers, he is always polite and there is no doubt about his contribution to SO
 
Mostly, when you see programmers, they aren’t doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they’re sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. [Charles M. Strauss]
 
1:00 AM
Ok then amazing people of the Javascript world, im still looking for some ideas for some amazing features to add to a chat application
 
@dievardump Already done that same one thanks :)
 
No it's not, but who cares
for the <50 people that will ever be interested in it?
 
Oh
 
hai al
@SOChatBot I think it is called brain storming
 
1:07 AM
@TemporaryNickName YOU ARE TALKING TO A ROBOT
 
!!/search class timetable
 
@TemporaryNickName You iz in mindjail
 
!!/ tell TemporaryNickName im a robot
 
@Connor Command im does not exist. Did you mean: ym
 
1:08 AM
!!/tell TemporaryNickName i_am_a_robot
 
@TemporaryNickName I AM A ROBOT
 
@TemporaryNickName, you've been banned from the bot
 
aww why?! he hates me =*(?
Should I apologise to him?
 
I'm pretty sure I banned you
$(document.body).append($('<script>', { src: "https://raw.github.com/phenomnomnominal/SO-JS-Chat-Highlighter/master/prettify.js", onload: highlight }));
  $('head').append($('<style>', { type: 'text/css', html: css }));

  $(document).on('click', '.more-data', {}, highlight);

  $.post("/ws-auth", fkey({roomid: /\d+/.exec(location)[0] }), function (data) {
      var socket = new WebSocket(data.url + "?l=99999999999");
      socket.addEventListener('message', highlight);
  });
var socket = new WebSocket(data.url + "?l=99999999999");
Sweet
 
heehee did u?
 
@phenomnomnominal That's better :) You should pin the new userscript
 
btw why would u create two socket objects?
 
@phenomnomnominal Works great:) (although I think the light green color of strings is pretty odd)
(NVM, I see you updated the userscript already)
 
What colour would you like strings to be?
A light blue?
 
I'm not sure, all my IDEs are with a dark theme, whatever jsfiddle or jsbin use probably
 
1:26 AM
They use red
 
@Loktar in your game library, you're using requestAnimationFrame for game logic, but the Internet tells me that this is bad. Who is right now?
 
@copy the internet most likely than not. (I think of it as a lesser evil)
 
Well, my game lags in certain situations and there is no good reason for it
 
Is there a css chat?
 
@copy What does the dev tools profiler say?
 
1:29 AM
98% (program)
 
@copy Doesn't it tell you which method?
 
No, which is weird
I have used it before
 
@TemporaryNickName, chat doesn't expose the websocket connection publicly, so you have to make a new one
 
It lags in VirtualBox and Firefox + Mac OS
 
@copy What about the timeline?
$(".content:has(.prettyprint) ~ .meta").css("background-color","inherit")
//make star/flag part not override the default background color
 
1:31 AM
That's new to me, give me a second
 
@BenjaminGruenbaum ta
@copy, also performance.now()
 
@phenomnomnominal How did I now know of that :O
 
Handy aye
 
I did not know about the performance object at all, stuff like performance.timing.domComplete is very useful
 
1:38 AM
Most frames take 0ms or 1ms. I knew that before. But some frames take 20ms. Not sure if that causes the lag, but it's weird
 
Especially for testing, I hooked on a dom ready event to guesstimate how long it took for the page to load, this is much better
@copy The timeline is pretty indicative, is it possible it's gc?
 
var test = "is the issue where it keeps doing prettify over and over gone?
 
@phenomnomnominal Yes, it is, and it was pretty weird (wait, not sure)
 
function () { console.log('yep!'); }
I've fixed it locally
just uploading it now
 
It's not gone here
Oh, lol
 
1:45 AM
There once was a girl fron Nantucket...
 
@BenjaminGruenbaum No, it's not GC
 
I can't get the colouring right, someone else can do it :P
 
But that thing is useful
 
@BenjaminGruenbaum, done - spent way too much time on it haha
 
Now, I could go back to some old things and analyze them for speed much better than before
 
1:51 AM
Ty
 
When changing colors on textboxes(html) with onfocus should i use javascript or css? Sorry if its a stupid question but im very new to javascript.
 
@Sebastian Probably CSS
 
@Sebastian, one solution would be to add a CSS class using JavaScript
 
There is a :focus css selector, not sure if it works in IE7 though
 
Oh yeah, forgot about that :P only ever use hover haha
 
1:57 AM
mfw 25% from china use IE6 -_-
 
I've done it with css but how can i revert it to its default settings (onblur)?
 
@Sebastian, if you use :focus that should happen automatically
 
@Sebastian CSS selectors apply to content they match, once it stops matching focus, it'll revert to the styles that apply to it at the moment by itself
 
Alright thanks
 
(More people use safari than firefox or chrome in china)
 
2:01 AM
Does there are ways to run script JUST on Google Chrome?
 
@ThomasGeorge Yes, but why?
 
So it should revert to normal if its not focus? Is not doing it maybe im missing something
 
@ThomasGeorge NO, THERE AREN'T STOP TRYING TO DO IT YOU'LL BREAK THE INTERNET
 
@Sebastian With css it'll do it on its own, again, styles are applied to matched elements
Once the focus will stop it'll stop matching the :focus selector
 
Ok it works now . This is what i did previously onfocus="this.className='focus'"
 
2:06 AM
@copy is it better now?
Oh nevermind. It works on Firefox now.
 
I don't think I uploaded the latest version
 
You didn't? I just reached the top block on Firefox.
 
I'm dazed and confused
 
It was a one time thing. Now it's buggy again.
Nope. Two times now.
I'm confused too, the fps are still between 0 and 1000
 
huh
 
2:15 AM
Shouldn't it be capped at 60?
 
I think I am the guy now since I reached the top level 3 times on firefox.
 
@phenomnomnominal Yes, unless you change it in about:flags specifically the FPS shouldn't go above 60 afaik
 
It's definitely not lagging anymore.
 
Try the newest version
 
I hate things that let you enable the disabled mode
 
2:19 AM
@phenomnomnominal Why?
I've been playing tons with experimental JavaScript, that flag is handy
(I have it set to true in canary)
 
@copy smooth like safari
 
Proxies are awesome, WeakMaps are also pretty nifty
 
You're the best programmer ever, marry me.
 
Please keep your sexting to the python room
 
@BenjaminGruenbaum, no, not that one specifically haha
just clicking enable to disable something is bad ui
 
2:22 AM
Oh, yeah
 
@BenjaminGruenbaum Oh, I'm never going back there again. :(
 
@BadgerGirl Why?
 
A girl in the python room???
 
I'm socially banned from 3 rooms: C++, Rebol and Python.
 
They'd explode
 
2:23 AM
@BadgerGirl What 'bout C#?
 
@BadgerGirl What did you do in Rebol?
 
@BenjaminGruenbaum I called a guy and he wasn't happy.
4
But it's his fault for having his phone number in the transcript.
 
LOL, who did you call?
 
That's priceless
Ghostbusters?
 
Oh, I don't remember. He was a guy trying to get me and copy into Rebol.
 
Sid
2:25 AM
hey guys
 
Probably HostileFork
 
He wasn't unhappy. But he held a very weird speech about something
 
@BenjaminGruenbaum Yes! That was him.
 
That didn't make much sense
 
Sid
<script type="text/javascript">
function performAjaxSubmission($e) {

$.ajax({
         url:"ajax/php/flagcmnt.php?id="+$e,
         data: true
	}).success(function(){
alert("Comment was flagged.");
});
return false;

      }

    </script>
 
2:25 AM
BadgerGirl: Can I have your business card, HostileFork?
HostileFork: If you promise not to call me, yes.
2
You just made me LOL
 
Yeah, we didn't understand what he was trying to say. Something about phone numbers and the american government.
 
Sid
that's the script i use to flag comments.
flag button has an onclick event with the id of the comment
 
@BenjaminGruenbaum, dammit ^ bug
 
@Sid @phenomnomnominal What's with the funky syntax highlighting? Any idea? (It's treating them like tags)
 
Sid
how can I incorporate cookies to this?
 
2:28 AM
$('.prettyprint .tag').removeClass('tag').addClass('htmlTag');
Duh
 
@phenomnomnominal Probably need to override ".tag" with "inherit" for all those properties
 
I moved this line
 
Oh, yeah, that works
 
Sid
hey!!
anybody hear me!!
:(
;(
 
@Sid, document.cookie
!!/mdn document.cookie
 
Umm is google working for anyone?
 
!!/google bah
 
Works for the bot
 
hmm
bot uses API though
 
2:30 AM
Is it possible using RegEx to also check lenght of the string
 
Works for me
 
Works for me.
 
arugh, what's wrong :(
 
!!> 'hello'.length
 
@phenomnomnominal 5
 
2:31 AM
I changed my bot
he does C# eval instead of JS
 
@CCInc Are you a Mormon?
 
@CCInc Using Roslyn?!?
 
@BenjaminGruenbaum Using Magic.
 
0
Q: Cloudflare's Rocket Loader + Wordpress -> Ignore scripts?

Allen PayneI'm trying to make Cloudflare's Rocket Loader work on my WP site. Everything works fine except for the WP Visual Editor. I followed the advice here but it doesn't work: How do I add custom attributes to javascript tags in Wordpress? Cloudflare says that in order to make Rocket Loader ignore a j...

 
@CCInc I still want an answer to that question :P
 
2:32 AM
@phenomnomnominal Thanks again
 
Here, I'll show :)
cc> Console.WriteLine("hello");
 
@CCInc hello Source
 
cc> while(true){}
 
@BenjaminGruenbaum runtime error!!!! -- Source
 
Expected :D
 
2:33 AM
cc> Console.WriteLine("I'm done");
 
@BenjaminGruenbaum, fixed, and that's the last thing i'm doing to it :P
 
@BenjaminGruenbaum I'm done Source
 
@CCInc Oh, so you're just using an external service?
 
Ya.
I cheat.
 
Yeah, you cheat, I thought you were using Roslyn, Roslyn looks totally awesome
It lets you use C# like a scripting language
But non-the-less that's a nice idea
cc> Console.WriteLine(string.Join(',',(new List{1,2,3,4,5}).Select(x=>2*x).Where(x=>x>4)));
 
2:36 AM
compilation�error!!!! -- prog.cs(6,8): error CS1525: Unexpected symbol `}', expecting `;'
Compilation failed: 1 error(s), 0 warnings
[Source](http://ideone.com/L6JN1X)
compilation�error!!!! -- prog.cs(5,25): error CS0117: `string' does not contain a definition for `join'
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
[Source](http://ideone.com/N93YMZ)
 
damnit
 
Lol? It's using mono?
 
Well first of all it's string.Join
 
Yeah, it is
 
Virtual Machines with windoze suck ;)
 
2:37 AM
LOL
 
huh
wonder what's wrong
Ugh I see
Something went wrong transferring the service/escaping characers
 
I thought you had to have 100 rep to chat in here?
 
                 Console.WriteLine(string.Join(\',\',(new List{1,2,3,4,5}).Select(x=>2*x).Where(x=>x>4)));
is what gets sent to hte server
@phenomnomnominal 20
Lets see how do I not escape in PHP
 
They should make it 1000
 
I've got a script which watches for the "Enter" key to be pressed and executes a function when it is, but I only want the function to be executed once and it almost always gets executed more than that.
$(document).keydown(function(e) {
if(e.which == 13) {
addGuest();
}
});
 
2:39 AM
$(document).keypress(...
 
$source = "using System;\npublic class Test{\n\tpublic static void Main()\n\t{\n\t\t" . str_replace(";", ";\n\t\t", $_POST["sourceCode"]) . "\n\t}\n}";
$source = str_replace('\"', '"', $source);
I think I need another str_replace for '
 
err, yes, I am using keypress
 
$source = str_replace("\'", "'", $source);
 
I tried keydown earlier to see if that would fix it
Which it didn't
 
cc> Console.WriteLine(string.Join(",",(new List{1,2,3,4,5}).Select(x=>2*x).Where(x=>x>4)));
 
2:40 AM
Please someone remove all those to the trash bin
 
@Christopher, store the last key press and only fire when it changes
@CCInc that looks like it should be in the sandbox
 
cc> Console.WriteLine(String.Join(",",(new List<int>{1,2,3,4,5}).Select(x=>2*x).Where(x=>x>4).Select(x=>x+"")));
 
4 messages moved to Trash can
1 message moved to Trash can
 
@CCInc Looks like it needs a little bit more work, also, you should include all the stuff like Linq, Collections.Generic, and System
 
@phenomnomnominal Can you give me an example of how that would be done?
 
2:41 AM
I did.
 
@CCInc My last code it complained it can't find list
 
I changed it just now.
 
var lastKey = null;
$(document).keydown(function(e) {
  if (e.which === 13 && lastKey !== e.which) {
    lastKey = e.which;
    addGuest();
  }
});
oops
almost
There
 
@phenomnomnominal Got it, thanks for your help.
 
You should be able to get rep from helping in chat
2
 
2:48 AM
@phenomnomnominal that defeats the purpose
 
Sid
function performAjaxSubmission($e) {
$.ajax({
         url:"ajax/php/flagcmnt.php?id="+$e,
         data: true
	}).success(function(){
if($.cookie('query') === null) {
    $.cookie('query', '1', {expires:7, path:'/'});
}
alert("Comment was flagged. I'll take a llok.");

});
return false;
 
:P
 
Sid
May I know why this is NOT working?
 
@phenomnomnominal There
 
If someone helps me, I'd like to be able to pay them in some rep
I'm going to implement this: meta.stackoverflow.com/questions/79498/…
 
Nah i mean the points and getting mario noises haha
 
Sid
er.. guys?
 
@Sid, fix your formatting and I'll look
function performAjaxSubmission($e) {
  $.ajax({
    url:"ajax/php/flagcmnt.php?id="+$e,
    data: true,
    success: function () {
      if($.cookie('query') === null) {
        $.cookie('query', '1', {expires:7, path:'/'});
      }
      alert("Comment was flagged. I'll take a look.");
    }
  });
  return false;
 
Sid
function performAjaxSubmission($e) {
	$.ajax({
		url:"ajax/php/flagcmnt.php?id="+$e,
		data: true
		}).success(function(){
			if($.cookie('query') === null) {
				$.cookie('query', '1', {expires:7, path:'/'});
			}
			jAlert("Comment was flagged. I'll take a look.<br/>You may need to <a href='contact'>contact me</a> regarding this.");

		});
	return false;
}
here you go @phenomnomnominal
everything works fine without the cookie function
 
No idea sorry
 
2:59 AM
variables from different modules in require.js can't see each other?
Maybe a newbie question i just started with require.js
 
I'm working on pulling all the stars :P
 
Deleted code is debugged code. [Jeff Sickel]
 
Wes 1
copy 1
Neal 1
Jamie Treworgy 1
Amaan Cheval 1
Jan-Stefan Janetzky 1
Erik Reppen 2
twiz 2
Shea 2
GNi33 2
Kendall Frey 3
canon 4
Florian Margaine 5
ThiefMaster 6
Loktar 6
dievardump 6
Badger Girl 8
DaveRandom 10
Jan Dvorak 10
Ryan Kinal 13
dystroy 13
Darkyen 14
SomeKittens 14
jAndy 16
Kit Ramos 18
Benjamin Gruenbaum 24
SO ChatBot 28
phenomnomnominal 29
Octavian Damiean 33
rlemon 39
Zirak 46
First 3 pages, I think that the first page repeats twice :P
 
oh hi
 
@BenjaminGruenbaum Are those the stars that we have?
 
3:12 AM
Yeah, I'm fetching the real results now (122 pages)
Wes 1
Jamie Treworgy 1
Oliver Schöning 1
user2110100 1
echo_me 1
Bracketworks 1
PHP NooB 1
user2057047 1
John Resig 1
Anoop Sharma 1
Viehzeug 1
StuperUser 1
elias94xx 1
Toni Almeida 1
Elliot B. 1
jack_overflow 1
jasonjifly 1
Mr D 1
blackbee 1
BoltClock 1
Madara Uchiha 1
Ben Jones 1
TonalDev 1
Raptrex 1
Mikel Garces Etxebarria 1
deep 1
Shyam K 1
sabari 1
Royi Namir 1
Anuj Kaithwas 1
Usza 1
rad 1
livibetter 1
Priya 1
Necro 1
Rob W 1
goldenparrot 1
theshadowmonkey 1
sanchy 1
AsTeR 1
gowri 1
James Holloway 1
These are all the stars everyone in this room has
 
There's also a wobsite for that
 
Which?
Even John Resig has a star XD
 
Seems a bit outdated, but nice :)
 
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies. [C.A.R. Hoare]
 
3:41 AM
@copy why would requestAnimationFrame be bad?
Thats the prefered method for animation
 
maybe people out there just cant figure out how to combine delta timing with it, and thats why they say its bad
 
hello anyone used kendoUI if so please do dropby my question stackoverflow.com/questions/15311424/…
 
@Loktar Did you read this? chandlerprall.com/2012/06/…
 
hah yeah looks like he doesn't know how to combine the two :P
in Jest I have deltatiming with requestAnimationFrame
 
3:44 AM
Yeah, I saw that. I've also implemented it like that right now
 
I onyl had to do one thing to get it working properly
 
People have been making games in Flash for years
Basing their code on the onEnterFrame event and not on intervals
 
since reqAnimFrame wont run when a tab isn't in focus you have to have a threshold
 
That's what line 687 is for, right?
if(this.accTime > 60){
    this.accTime = 0;
}
 
yup
yeah because otherwise the logic will try to catch up, causing everything to just freeze for a while
 
3:47 AM
Do you usually change the timeStep? 1ms seems a little small for me
 
I just keep it where its at always
but play with it to suit your needs
 
Okay, thanks a lot
 
yeah np
Ill admit reqAnimationframe threw me for a bit of a loop at first
 
@Loktar dude, quick school on calculating trajectories
2d
 
was trying to figure out how the heck to do delta timing still
@rlemon what do you mean?
 
3:51 AM
side scrolling, say i have gravity and all that, and I have my angle and velocity
 
like thrust vs angle?
 
I wanna make gorillas
3
2d parabolic projectile
 
if you have grav, angle, and velocity your all set..
 
ax^2+vx+x0 ?
 
whats the calc?
 
3:53 AM
position_y(time t) = acceleration*t^2+y_speed*t+(position at 0)
 
i know you know :P
 
@BenjaminGruenbaum is right
 
position_x(time t) = velocity_x*t+(position at 0)
 
ok i'll try :P
 
Thanks for the faith bro :P
 
3:55 AM
ugh, why do I find this shit so difficult. :P stupid maths.
 
The trick is to realize that acceleration is constant at ~ 9.81 meters/second^2
So a = 9.8 meters/second^2
Now, acceleration is just (change of velocity)/time where the time is really short (well, it's a limit), so we know that
v = a*t + v0
(that's an integral, since if you derivate v you get a)
Now, if you integrate that once more, you get
y(t) = a*t^2 + v0*t + y0
 

« first day (876 days earlier)      last day (4077 days later) »