« first day (836 days earlier)      last day (4103 days later) » 

Sam
7:00 PM
Well, it may not be a PIC, but still a pic.
 
lol
 
Sam
Of a generic IC.
 
1 message moved to recycle bin
> Format your damn code
 
1 message moved to recycle bin
 
7:01 PM
 
lol
 
@FlorianMargaine if that guy posts another unformatted wall bin it k?
thanks :)
smoke tim e
 
@RyanKinal hey, didn't know about that blog, nice! :)
 
and the last one
 
@GNi33 @Neal Created it :)
 
7:05 PM
ah, cool :)
 
@FlorianMargaine That's... terrifying
 
What da heall?
Does anyone know the HBO series Generation Kill?
 
Nope
 
@GNi33 ^_^
 
Gimme a second.
 
7:08 PM
@GNi33 if you wanna post anything let me know :-)
 
hehe, okay, maybe i'll come up with something :)
want to get into blogging anyhow
 
How to compare javascript date with format like this: 2013029 (Year + ( Day))
 
im adding a 0 there to day if < 100..
 
I love Sgt. Major Sixta.
 
7:09 PM
So we hire a third party company to do our core marketing and online social media promotions etc. They are 'redesigning' the website and content and I just was told by the boss he wants me overseeing their efforts. "Be very critical. I want my moneys worth. Really tear into them if they give us crap"
 
@bushdiver, split it at the fourth character and count the days
 
ah - that'll work, thanks
 
I love being given free reign to tell webdesigners their code sucks and they must do it right else not get paid.
 
I also have the date like this: 2013-01-29 03:03:25 is that easier to deal with (maybe a built in function) rather than taking the other date and splitting/counting?
 
Sam
"I love being given free reign to tell webdesigners their code sucks" Now it all makes sense
 
7:11 PM
what?
 
@Sam, I don't know you, but I can tell you're a dick.
 
it's not so much telling them it sucks.. it's making them fix it ... to my standards..
 
Sam
LOL
 
Trying to find if date == today..
 
Let me guess, rlemon "insulted" you somehow, by being awesome?
 
7:12 PM
> 2 years and 7 months and less then 200 rep... that guy is such a noob. lets all point and laugh at him.
 
Sam
Not really, I just like his sense of humor
@phenomnomnominal see? LOL
 
There it is
Meh, noob.
Can't be worse than the noob.
 
Sam
the who?
 
lol "that kevlar wasn't yours to looose"
 
fun fact: rlemon is never being funny - he really does hate you all and thinks your code sucks. If you see his contempt as sarcasm then good for you. die.
 
u used beta.lemonmeme.com right right?
 
yah
is the best
 
7:18 PM
\o/
 
YaY!
 
I really want to go see Jeremy Ashkenas at [webstock.org.nz](this) conference, but he was added last minute to the programme (replacing Paul Irish) but it's $1500 bucks for the 2 days at such short notice... worth it?
 
ok know that smoke I was gonna smoke a while back: yea, time for that now.
 
@phenomnomnominal You have your text and address backwards
[ your text ]( your address )
 
11
Q: Chat Easy Input Tools - Provides keyboard shortcuts for common text formatting commands

rlemon About Provides keyboard shortcuts for common text formatting commands, reducing the dependency on mouse usage. Current version does not have a configurable set of hotkeys but later versions will. How to use. All of the following commands are run if the user has focus in the chat input area. ...

Makes life so much easier
 
7:20 PM
hey is there an event on page close?
 
^ or that
 
Oh no shit.
 
onbeforeclose or onbeforeunload
iirc
 
@phenomnomnominal http://
 
yea links MUST have a protocol
 
7:20 PM
Damnit, too late
Bah, that's what i get at 7.30
 
!!/mdn onbeforeunload
 
Ugh. Hate that event.
 
window.onbeforeunload = function(e) {
    return 'Dialog text here.';
};
@SimonSarris
This what you needed boss?
 
how to determine this is today with javascript? 2013-01-29 03:03:25
 
7:22 PM
Split it apart by '-' and use the get functions of Date
 
@bushdiver with magik
 
@phenomnomnominal "ReferenceError: newDate is not defined"
@phenomnomnominal 0
 
new Date("2013-01-29 03:03:25").getTime() == new Date().getTime(); // false
 
@phenomnomnominal 2
 
@rlemon that checks for exact second. I dont think that was what he was looking for, right?
 
7:24 PM
is there a function to trim off the seconds?
 
.setSeconds(0) maybe
 
 new Date(new Date() - new Date() % (60 * 1000))
 
@copy OW. Y U DO THAT? THAT WONT WORK CORRECTLY
 
2 mins ago, by bushdiver
is there a function to trim off the seconds?
 
function isToday(dateString) {
  var c = 864E5;
  return (new Date(dateString).getTime()/c|0) == (new Date().getTime()/c|0);
}
isToday("2013-01-29 03:03:25"); // true
 
7:27 PM
@rlemon 864E5? wazzat?
 
milliseconds in a day
 
ahhh got it
 
..
 
Seems to work, but might fail on leap seconds or something, I don't really know
 
@rlemon Nice! thanks =]
 
7:28 PM
@bushdiver make sure to test it
 
that looks like a hack.
 
No no, don't!
 
so far tested good
 
Never test your software!
 
@Loktar totally is
:P
 
7:29 PM
leap seconds?
this part is craziness = var c = 864E5; ,..
im going to sacrifice learning and just go with it..
 
function isToday (dateString) {
    var vals = dateString.split(/-|\s/);
    var date = new Date();
    return vals[0] == date.getFullYear() && vals[1] == (date.getMonth() + 1) && vals[2] == date.getDate();
}
 
that's just 86400000 which is a day in milliseconds
 
Less 'craziness'
 
function isToday(date){
var theDate = new Date(date),
    today = new Date();
return today.getDate() == theDate.getDate() && today.getYear() == theDate.getYear() && today.getMonth() == theDate.getMonth();
}

console.log(isToday("2013-01-29 03:03:25"));
@phenomnomnominal yeah thats about what I was going after
 
@Loktar, yeah, slightly clearer as to what it's doing?
 
7:32 PM
just use the built in date funcs and check. Date will parse the string for you, no need to even split it imo
 
this is all I see here..
function isToday (dateString) {
    var c = 'magic';
    return c;
}
thanks it works lol
 
Does scope == variable ?
 
function isToday(dateString) {
  var d = dateString.split(' '); da = new Date(d); da.setHours(0,0,0);
  var t = new Date(); t.setHours(0, 0, 0);
  return da.getTime() == t.getTime(); // false
}
isToday("2013-01-29 03:03:25"); // false??
any idea why that returns false?
 
1e9 == 1(9 zeros)
864E5 == 864(5 zeros)
 
o crapo
I figured it out
function isToday(dateString) {
  var d = dateString.split(' '); da = new Date(d[0]); da.setHours(0,0,0);
  var t = new Date(); t.setHours(0, 0, 0);
  return da.getTime() == t.getTime(); // false
}
isToday("2013-01-29 03:03:25"); // false??
 
7:34 PM
d[0]?
 
Why is that one false? ^
 
Once upon a time, there was a great but outlawed mind, called @Zirak, living in ECMAland. One day he provided a great answer for the strider jAndy and he was supposed to earn all the glory and good reputation for that. But all the sudden, sneaky witch doctor @FlorianMargaine jumped out of the bushes and stole the idea from @Zirak away. Everybody thought it was sneaky Florian who originally provided this great wisdom and so it came, that all the glory went to the sneaky one.
 
yep :P
 
Scientific notation (more commonly known as standard form) is a way of writing numbers that are too big or too small to be conveniently written in decimal form. Scientific notation has a number of useful properties and is commonly used in calculators and by scientists, mathematicians and engineers. In scientific notation all numbers are written in the form of :a \times 10^b (a times ten raised to the power of b), where the exponent b is an integer, and the coefficient a is any real number (however, see normalized notation below), called the significand or mantissa. The term "mantissa" may...
 
@Loktar still returns false.... no idea why
 
7:35 PM
:p
 
Does scope == variable ?
What is scope
 
@Loktar You have to know Generation Kill. I'm sure you do.
 
nope :?
 
odd... da becomes yesterday.
why is that?
 
yeah just noticed that
 
7:36 PM
Bazinga!
 
weird.... why does that happen?
 
@Loktar Weren't you involved with the Air Force?
 
yeah
 
!!/tell gowri google javascript scope
 
7:37 PM
And then you don't know a military series?
Shame on you!
 
@rlemon I am currently working on my scope blog post @gowri
 
I am already there
 
its british?
 
then.. what else do you need to know
 
@Loktar What? The series?
 
7:39 PM
> Generation Kill is a British-American television miniseries produced for HBO, based on the book of the same name by Evan Wright about his experience as an embedded reporter with the U.S. Marine Corps
I dont have hbo
plus its about Marines, meh :P
 
in a single definition: scope == variable chain lookup within a closure. ??
^ does this make sense?
 
not .. really
 
@Loktar It's really worth watching.
You should check it out.
 
a closure is actually described by the scope-array
 
@jAndy it's hard to put scope in "a nutshell"
 
7:40 PM
@rlemon: Thats make me understand bit
 
yea.. thats how it should be, it needs some explanation and time to tell somebody :p
 
@rlemon thanks, though I decided on CTRL+S instead and it didnt work anyway
 
its about ExecutionContext, variable/activation objects (respectively Lexical Environment Records) and the scope-array, which loops over all those context-objects (which contain data like formal parameters, variables and function declarations)
 
I don't want to go to work today. Anyone want to do my job for me?
 
thats why we actually call it "lexical scope"
 
7:42 PM
Is there any difference b/w scope and varible
 
that would be my ultimate shortest description, eventho a learner still wouldn't know why and where all these things come together
 
@SimonSarris bookmarklet boss. :P no need for file:///
 
Someone just say no and send him on his way
 
@gowri Nice! I'm no longer the biggest idiot in the room, please stay awhile
 
if no why two names?
 
7:45 PM
5 hours ago, by Florian Margaine
while giving credit.
5 hours ago, by Florian Margaine
It's just for the upvotes.
 
If someone gives you an an answer, why ignore it?
 
I was just teasing :p Its a funny story imo
 
@gowri oh wait.. you have rlly high rep.. it's still me..
 
@gowri, jAndy just wrote you an essay about it?
 
all you ever need to know about scope in ecmascript
 
7:47 PM
@SimonSarris boo
nvm
 
I was trying to hack it
thought I was successful. nay
 
> In computer programming, a scope is the context within a computer program in which a variable name or other identifier is valid and can be used, or within which a declaration has effect.
js has function scope & lexical scope
 
is it possible to (in a bookmarklet) navigate to a page AND run some arbitrary uri code?
mypage.com,javascript:foo();
 
jsperf.com/dates-suck IE is very nice.
 
7:50 PM
idk.
 
@rlemon i don't think
 
@Oleg lovely
 
Sam
In this step of an Angular tutorial, sometimes after submiting the info, the page will reload and chrome will block JS in that tab. Could it be due to the fact that Angular tries to get access to window.localStorage?
 
@Oleg what's this supposed to do?
 
if people would just realize that, like they kinda did with TVs, their cars and so on
 
7:52 PM
@FlorianMargaine ask @rlemon
I just run it through different browsers.
 
but yeah, the major difference is that browsers are free..... wait a second...
 
ha I didnt even see the perf
 
code readability > micro optimizations
4
 
7:55 PM
@Loktar aw yiss
 
although it is a neat line of code
 
Safari is actually doing pretty good.
 
"When the bees die, we's die." - ancient idiom.
 
Polish people know nothing of bees
Don't trust him
 
7:57 PM
Date.now() > new Date().getTime()
 
Bees are more important for our economy than most people can imagine. Bee survival is dangerously threatened by poisons http://bit.ly/WMX3zN
 
stackoverflow.com/a/14591053/851498 this guy has 40k rep, really?
 
:P :P
 
7:59 PM
@SimonSarris if you open about:blank and run this in a bookmarklet it works
javascript:(function(){document.body.contentEditable=!0;window.onload=function(){document.body.textContent=localStorage.my_doc||""};window.onbeforeunload=function(){localStorage.my_doc=document.body.textContent}})();
 

« first day (836 days earlier)      last day (4103 days later) »