« first day (1011 days earlier)      last day (3920 days later) » 

3:00 PM
I didn't know the etiquette for that
but I have had lines just as long with no problems before, why would it happen now?
 
That's what happens when all you do is copypasta
 
The line length isn't likely to be the source of problems.
However, when you leave the restroom, you wash your hands.
 
I don't always do that, however if something works I tend to copy it
 
You don't know what you're doing
 
Not all the time no, but I am learning
 
3:04 PM
What's the easiest way to check to see if a variable is an integer?
 
(var | 0) === var
 
@Michael use bitwise
 
The value could be a string that contains numeric characters.
 
You can't learn through copypasta
 
(var | 0) === var && typeof var === 'number'
 
3:05 PM
@eazimmerman the typeof check is useless
 
I don't understand the hostility, you just hate people that are ignorant or just dumb?
 
If the value is a string that contains numeric characters, I want the test to pass.
 
@Michael ("4" | 0) === 4; // true
 
@FlorianMargaine you need parenthesis
 
What about the isNaN() function?
 
3:06 PM
@FlorianMargaine run that code, === has higher precedence
 
@Esailija oh, i thought he wanted it to ignore strings -___-
 
@Michael you are now in very ambiguous area
a string "1213asd" could be considered as integer 1213
or it might not
 
@Michael doesn't check if it's integer or float
 
That is very odd. And probably impossible. Did you add any breakpoints in your code? — Neal 6 secs ago
 
@Esailija I don't want it to be considered an integer because it contains letters.
 
3:08 PM
if you wanted to simply see if variable is actually integer then the bitwise check will work
 
narrowed down the recursion problem, it has to do with this line: function (url, state) from this total function: function (url, state)
{ if (!state) return imReady = false });
if (imReady) { $.readyOld.apply($, arguments) }
else { setTimeout(arguments.callee, 10) }, so what could be the problem of recursion then?
 
do you consider "5e10" integer
 
@Esailija No
 
that would be double no?
or just string
 
so you already cannot use anything already in the language, you must make your own integer parser
 
3:09 PM
@Michael why? 5e10 is an integer
 
no its not it has an 3
e
 
yes it is
 
@FlorianMargaine Well, I guess it wouldn't hurt to consider it an integer.
 
integer must only contain numbers
 
5e10
50000000000
 
3:10 PM
!!> 5e10
 
@Esailija 50000000000
 
!!>parseInt('5e10', 16);
 
@RyanKinal 24080
 
^ another possibility
 
never used parseInt before
 
3:10 PM
otherwise... /[0-9]+/.test(v)
 
The book I'm reading says to do this: isNaN(parseInt(value))
 
user1125394
!!>(10e10+'').match(/0/g).length
 
@cx "Infinity"
@cx 100000000000
 
Hi . this jsfiddle.net/magkia/fwZXx/13 won't work in IE 10 but will work in Mozilla. (just press down or up after clicking on the input box)
 
@Michael the book has different definition on what should be considered integer when it's a string
 
3:13 PM
@cx 11
 
!!> isNaN(parseInt("23"))
 
@FlorianMargaine false
 
value can be "123asd", "5e10" or "0xcafe" and the check will return false for all cases even though none of these are integers in your domain
 
@FlorianMargaine o.O
 
which means it's not NaN
!!> isNaN(parseInt("2.3"))
 
3:14 PM
@FlorianMargaine false
 
Oh nvm that makes sense...double negative xD
 
!!> isNaN("23")
 
@dystroy false
 
!!> isNaN(parseInt("23asd"))
 
@FlorianMargaine false
 
3:14 PM
this also returns false ^
 
prefer isFinite for positive check
 
so... not what you want
 
!!> isFinite(NaN)
 
@Esailija false
 
@FlorianMargaine Wow o.O
 
3:15 PM
!!> isNaN("NaN")
 
@dystroy true
 
Lol
!!> +"NaN"
 
I already saw that in a SO question in which I participated. isNaN is a strange stupid beast
 
@Esailija "NaN"
 
3:16 PM
!!> isNaN("23asd")
 
@Michael true
 
!!> isNaN(23)
 
@Michael false
 
So why should parseInt be called at all? o.O
!!> isNaN(23.1)
 
@Michael false
 
3:17 PM
!!> isNaN("123")
 
@KendallFrey false
 
You don't have to parse as isNaN use ToNumber
 
!!> parseInt(23.1)
 
@Michael 23
 
A better test is the standard a!==a
 
3:17 PM
for what you want, a simple regex is the best
!!> /[0-9]+/.test("12");
 
@FlorianMargaine true
 
why is it true with "1.2"
 
!!> ("NaN"!=="NaN") == (NaN!==NaN)
 
@dystroy false
 
!!> ToNumber("abc")
 
3:18 PM
@Michael "ReferenceError: ToNumber is not defined"
 
!!> "abc".toNumber();
 
@Michael "TypeError: \"abc\".toNumber is not a function"
 
parseInt and ToNumber parser use different semantics
 
parseInt accepts "123asd"
 
3:18 PM
I meant
!!> /^[0-9]+$/.test("1.2")
 
@FlorianMargaine false
 
!!> console.log(parseInt("123asd"), +"123asd")
 
!!> /^[0-9]+$/.test("12")
 
@Esailija "SyntaxError: missing ; before statement"
@FlorianMargaine true
@Esailija "undefined" Logged: 123,"NaN"
 
!!> /^[0-9]+$/.test(12)
 
3:19 PM
@FlorianMargaine true
 
!!> /^[0-9]+$/.test(1.2)
 
@FlorianMargaine false
 
@Michael ToNumber is an "abstract operation", you don't call it directly by its name, but you may do +"abc" (and there's a direct way but I don't remember it right now)
 
@FlorianMargaine Thanks, I think I'll use that. :D
!!>+"abc"
 
@Michael "NaN"
 
3:20 PM
why does the bot quote number literal @Zirak
 
!!>+1.2
 
@Michael 1.2
 
!!> Infinity
 
@Esailija It quotes stuff which JSON doesn't recognize
 
@Esailija "Infinity"
 
3:21 PM
So they don't turn to null
 
!!> /^[0-9]+$/.test("12")
 
I had an unquoting mechanism in mind...but people have a brain
 
@Michael true
 
!!> /^[0-9]+$/.test("12abc")
 
@Michael false
 
3:21 PM
!!> JSON.stringify(Infinity)
 
Also, you just want to test for integers?
 
@Esailija "null"
 
@Zirak Yes
!!> /^[0-9]+$/.test(console.foo)
 
@Michael false
 
Math.floor(value) === value
 
3:23 PM
@Zirak well you have to look at the code to know if it's literal string NaN or numeric value NaN
small things
D
 
@Esailija nah, send each value with meta-data
 
@Zirak That won't work if value is a string, will it? Because Math.floor converts it to a number.
 
@Michael Correct, which turns it to NaN.
And NaN is unequal to everything (including NaN). So it will work.
 
But I want it to pass for string values like "123"
 
var n = Number(value);
Math.floor(n) === n;
 
3:25 PM
but there is no one way to consider strings as integers
there are already 2 different ways in the language alone, and yours adds a 3rd
 
Number knows how to do that
 
@Zirak You don't need the === you can just use ==
 
@Esailija No, Number is strict.
 
No, === checks the type also and the type in that example will always be "number".
 
@Michael You don't need to do a lot of things, yet you do them, for your own sanity.
 
3:26 PM
@Michael hahahahahaha
 
Hi , this jsfiddle.net/magkia/fwZXx/13 won't work in IE 10 but will work in Mozilla. (just press down or up after clicking on the input box)
 
@Michael ALWAYS use ===
 
3
Q: alert() called on new window seems to be called from opener page if using jquery's methods

roastedThis is the test case. Using javascript: $('.js').on('click', function () { var newwindow = window.open(); newwindow.document.write('<span>test</span>'); newwindow.document.write('<scr' + 'ipt>alert(1)</scr' + 'ipt>'); }); Give expected result, the dialog alert is showing inside t...

 
always
 
Interesting...
 
3:26 PM
Can i append a image to a <a> tag? Or would i use the Jquery wrap() ?
 
there is no real reason to use == or != in JavaScript
It's always better to say exactly what you mean, if you can
 
ALWAYS (unless the stupid freaking library/API you're using does stupid things that force you to use non-strict comparisons)
 
That's actually one of the rules of Google's JavaScript style guide: google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
 
@SimonSarris for me != null seems much better than var !== null && var !== void 0
 
0
Q: Custom WYSIWYG Editor - Jquery

James WillsonI am so sick of WYSIWYG editors being exclusively for the latest browser or being huge with every option under the sun. I tried to make my own, using code I found online as well as a little of my own handy work. This is what I came up with: http://jsfiddle.net/spadez/Pg6S8/ $.fn.myTextEditor = ...

 
3:28 PM
@SimonSarris still not shipped :(
 
@rlemon ?
 
mah book!
Amazon.ca doesn't care about customers.
.com steals all of the stock first.
 
What purpose does the 2 red circled things serve on my mobo
 
they look cool
 
Nother angle
 
3:30 PM
are those heat sinks
 
they are heatsinks on the north bridge and south bridge
 
@Datsik cooling? maybe?
 
of the motherboard's chipset
The northbridge or host bridge was one of the two chips in the core logic chipset on a computer motherboard, used to manage data communications between a CPU and a motherboard. It is supposed to be paired with a second support chip known as a southbridge. The northbridge has historically been one of the two chips in the core logic chipset on a PC motherboard, the other being the southbridge. Increasingly these functions have migrated to the CPU chip itself, beginning with memory and graphics controllers. For Intel Sandy Bridge and AMD Accelerated Processing Unit processors introduced ...
 
Oh ok, was looking at it when I unpackaged it and it looked cool, but I figured there was more to it than design
 
even ram has heat sinks now
 
3:31 PM
though things have changed a bit since the intel i7 chipsets came out in 2008
 
Is there anything special underneath where the dragon picture is?
 
yea my ram looks badass
 
Off the top of anybodies heads of course
 
onboard gpu?
 
My ram :D
 
3:32 PM
thats built into CPU if its there nowadays @rlemon
it might be a tiny raid controller but its not really likely
 
look it up
:P
 
I wouldn't even know where to start :P p.s. << Gacnt
 
I dont see a dvi port on the mobo
so I doubt its onboard video
 
Stop changing names assface
 
3:33 PM
@SimonSarris btw now that we are on chat at the same time :P did you have some questions about the optional properties
 
now I see the dvi
 
First reddit comment \o/
 
> With an awesome product comes an inspiring heat sink! Styled after the iconic MSI GAMING Dragon. The heat sink is oversized to provide the best thermal transfer and heat dissipation to enable your PC to just game 24 hours per day.
it is a heat sync
 
@Esailija well, did you see the latest way I was doing things?
 
*sink
 
3:34 PM
yeah I just seen that too, neat!
 
A lot of research is going into improving water-cooling technology lately.
 
Best mobo I've ever bought 10/10 would recommend
 
Air-cooling is very inefficient by comparison.
 
I might get myself a new tower for my birthday. Recommendations? I don't really want to put any work into it
 
3:35 PM
alright Loktar, tonight i'm going to try to turn codepen.io/rlemon/details/Cxhkp into top down terrain
 
@Shmiddty The mobo I just bought for starters :P
 
@Michael air cooling is price-efficient, the most important of all efficiencies for the end consumer :P
 
I will be pestering you for tips ;)
 
I wonder if the Audio Boost they hype so much on this mobo is as good as my Asus Xonar Essence STX
 
With water cooling, data centers wouldn't need the huge air-conditioning systems that they have now.
 
3:36 PM
@SimonSarris well yes I expect that be better
 
sure they would. it would just be cooling the water ;)
 
@Esailija if the vast majority of my object instances do not ever set any of these properties, is it OK to construct them as function B in that JSperf?
 
@SimonSarris For personal computers, yes. I'm talking about data centers. :)
 
3:36 PM
water coolers / air conditioners all have compressors
that is the hydro hog
 
thats my mobo
 
I need a new gpu
 
@Loktar yay asus
 
@rlemon Yes, they'd still have to cool the water, but it's apparently a lot more energy efficient.
 
:)
 
3:37 PM
Well mine has a dragon on it :P
 
nvidia 9800 gtx+
 
@SimonSarris in my understanding yes
 
I'm using a GTX 660 atm
 
how can I find out what scope a function is in?
 
3:37 PM
it is enough to have null, it's the optional properties that are evil
 
my video card
 
Any have any experience with ibuypower.com?
 
I remember when I got my GeForce 4 for my birthday and took me forever to figure out why it was on 800x600 and lookin shitty... Then I downloaded drivers
 
@Loktar I see that price tag and think "I could get so many fish with that money...."
 
lol
I paid more probably
 
3:38 PM
I suppose I'm not a 'serious pc gamer' yet
 
I got it in Nov
 
I want liquid cooling, and something that will last a couple years
 
Datsik: "nvidia has really let themselves go"
 
@beta0x64 console.log(this)
 
eh liquid cooling is so overrated
my dad does liquid cooling and pays more $$
 
3:38 PM
@beta0x64 the this
 
Is it?
 
I run all stock and my pc's last just fine
 
@Loktar agreeeeeeeeeeeeeeee
 
same
 
only reason id use liquid cooling is to stop my room from getting warm
 
3:39 PM
if I overclock I add a single fan
 
Simons always here to help
 
but I have a portable air conditioner for that
 
How often do you have to clean the dust out?
 
I should monthly..
 
@Loktar my pc room has a window mount air conditioner in it for optimal gaming climate.
 
3:39 PM
but I do prob every 3 months
@rlemon haha I have a ghetto setup
 
I have two cats and hardwood floors in an appt - I have to clean mine out every week
 
I took pics of my gaming collection last night and my terrible furniture and ghetto air conditionor
 
@Loktar because you spend all of your money on games?
 
Are liquid cooled systems sealed?
 
no, non standard windows
my portable ac unit was like $450
 
3:40 PM
My Xbox (first generation 16gb HD) works as a space heater in my room
 
we have central air in the house too
 
pastebin.com/qpZiPp8E does scoped._insert_row make sense here?
 
also, my furniture is probably more ghetto, and the only reason my a/cs are nice is because I bought two new 6000btu window mounted ones this year and made mounting brackets for them
yea I saw those last night
 
pic 5 and 6
those show the giant cardboard piece I have lol
 
3:41 PM
MY xbox makes me laugh really, everybody has had a billion red rings, I've thrown mine off my desk, accidentally knocked it off my desk, threw my controllers at it and it still works like a champ (3' falls multiple times, and it's from the original xbox launch)
 
havent gotten around to the hardware store yet for plexiglass
 
@beta0x64 completely. That is exactly how I would do that without binding this to the function.
 
dude, goto your guys equiv of Rona or Home Depot and find the 'scrap' section
 
and yeah, being a very competitive gamer, I do rage.. a lot..
 
get a nice sturdy piece of wood for $1
 
3:42 PM
dievardump: thank you for your comment
 
Being competitive and raging aren't mutually exclusive
 
the silicon around the wood and AC was more expensive than the wood.
scrap sections at lumber yards are killer for this stuff
brb lunch
 
Comin with
@rlemon Since you smoke at your PC, you ever blow out your fans? I worked at a computer store long long time ago, the worst computers were the smokers, when you would blow the fans out it would just be all brown and smell like shit
 
oh man yeah I could never smoke..
just because of the electronic damage
 
yeah, isn't it a lot thicker / moist?
 
3:45 PM
lol well thats not the only reason. But it scares me to think how my boxes would look
 
haha
 
my dad used to smoke his older pc's are SO NASTY man
esp when white/off white were standard case colors
lord, they look so brown
 
lol
 
@dat he already said he cleans out dust every week
 
@Datsik when I smoke at my PC there is a fan on my right and the back door on my left is open.
 
3:46 PM
who @rlemon does?
 
it all sucks out
@Loktar bad habbit - at night (12,1am) if i'm gaming I will smoke at my pc
 
@rlemon no I meant about cleaning out the dust weekly
 
ohh yea, cats man.
it's not dust that gets in there, cat hair and dander
insane amounts
 
lol damn
I just get lots of dust
my whole room is dusty, sucks
I dust every weekend but the mid/end of the week the dust is so bad
 
if I had carpets I imagine it wouldn't be so bad
hard wood just means the cat hair never settles
 
3:48 PM
yea
 
anyways, lunch.
 
@mikedidthis The hottie at work said "Mem" instead of pronouncing "Meme" the way it should be, I laughed in her face
 
the best ~$450 you'll ever spend
 
nice ill check them out
I've always wanted a rainbow tbh
but... those are insanely priced
 
3:52 PM
@rlemon In my code, i have a img being appended to a ul. How would i put a <a> tag around it? I have tried to append the <a> tag, the append the img to it, but it did not work
or anyone that wants to answer
 
we actually need a new vaccum
ill show the wife, thanks @SimonSarris
 
$ul.append($('<li>').append($('<img>', { src: url })));
 
@EliteGamer wrap
 
ah, but why can i not append the image to it?
to the <a> tag
 
no idea where the code for appending the a?
 
3:54 PM
$ul.append($('<li>').append($('<a>')).append($('<img>', { src: url })));
would that work?
 
you're missing the href
not sure if thats causing the issue
but id add it
 
I ..... you ..... there's...... ah, forget it
 
ok, let me see if it works
@Loktar how woul i?
add the href?
function (url)
url is the url string
 
same way you're adding the src to the image I guess
 
Any one knows where I can find a good article/tutorial for developing asp.net web controls that heavily depend on JS, and write it so that I can use multiple instances in the same page
 
3:57 PM
ooo
 
@JafarKofahi Actually, not any one knows; for example, I don't know... Or did you mean to write this as a question?
 
lol so Im looking at random old c64 programming books
 
@Loktar for some reason the html output is this
 
came across this gem
 
If so, you should use a question mark.
 
3:58 PM
going to pretty it up and pen it
 
<li>
    <a href="...">
    <img src="..."/>
</li>
 
@ShotgunNinja its a question
 
thinking about changing the lighting too, making it dynamic
 
so the img was not appended to the <a> tag
 
you parens are messed up
 
3:59 PM
@Loktar let me just say with vacuums that YOU GET WHAT YOU PAY FOR
really really really
I went from a $150 hoover to my miele and its insane
 
$ul.append($('<li>').append($('<a>').append($('<img>', { src: url }))));
 
I ve googled but didnt find anything "generic" its all specific to some problem. I want to learn how to do it :)
 
esp in allergy season
 

« first day (1011 days earlier)      last day (3920 days later) »