« first day (537 days earlier)      last day (4409 days later) » 

2:00 PM
only reason I Haven't changed it because of semi professionalism, I mean my current one is by no means "professional" but Im not shaving with a rambo knife either
 
why does a SO avatar need to look professional
 
eh not SO really, but gravatar
since I post comments in a lot of places
 
@Esailija because of e-reputation when I'm going to get some job :) my "nickname" is my real name
@Loktar: there is a lot of jason brown on fb ._.
 
haha yeah
 
2:02 PM
my name is really common
LOL
 
professional enough?
 
@Loktar y u no pride the rambo knife
 
haha
 
@Loktar did you actually shave with it or did you just pose like a loser?
 
can javascript draw at faction of pixels in canvas ?
 
2:03 PM
@Dave: that's what canvas is made for
 
@Raynos I umm.. shaved with it...
posed like a loser :(
 
:(
 
@FlorianMargaine how small of a fraction does it go to
 
Next time, shave with it
take before and after pictures
before "look at me, shaving like a boss"
after "look at me, large flesh wound on face"
 
I think "after pictures" will be more.... bloody
 
2:04 PM
hahah
 
@Loktar: where you live at? I wanna try how good fb search is
 
I plan on shaving my head in Sep, and then posting a pick with me "shaving my head with my rambo knife"
 
Or better yet "look at me, stitching my face with barbed wire like a boss"
 
@FlorianMargaine Bellevue NE
 
NE = North East?
 
2:04 PM
Nebraska
 
ok
wow
second result is you
 
nice
surprised its not the first :?
 
well, there's 8 jason brown tho -_-
 
jeeze..
yeah its a really common name
my poor son is Jacob Brown
 
wait
all your friends are babies?!
 
2:06 PM
lol what?
 
I dont see any friends listed on there, on my pub profile
 
rihannon negron, julie griebel, april striler wright, zach gruub, zoe cronk-young all have babies on their pictures. 5 out of 6 profiles shown.
 
oohh haha yeah.. people always have pics of their dang kids
 
X rated gravatars may contain hardcore sexual imagery or extremely disturbing violence.
 
2:07 PM
LOL makes me look like some weirdo though
 
ok I added a gravatar! is it working yet
 
"I love babays!!"
not yet @Esailija it takes a bit
 
@Loktar: you know everything on your facebook is public?
or is there just a lot of public and you keep your private stuff... private?
 
@Esailija you look human :(
@Esailija y u no goatman
 
:<
 
2:10 PM
4
A: Check checkbox checked property using jQuery

Octavian DamieanI decided to post an answer on how to do that exact same thing without jQuery. Just because I'm a rebel. var ageCheckbox = document.getElementById('isAgeSelected'); var ageInput = document.getElementById('txtAge'); // Just because of IE <333 ageCheckbox.onchange = function() { // Check i...

 
@Esailija Y U HUMAN
 
The hell is his problem?
 
@FlorianMargaine I know a bunch of it is, but I dont really have much I keep private anyway
 
lol my chat pic is still old
 
I think at least my bday is private right?
 
2:11 PM
o/
 
plz don't look at high res pic and see my dirty room
 
@Loktar: yeah, but it's easy to find out your year of birth
 
yeah true
 
@Esailija Y U LOOK PISSED OFF?!
 
I don't photograph well :D
 
2:13 PM
were you helping andrewjackson again?
 
well yes, this is my look when I am answering SO questions
:D :D
 
that picture scares me
quick, change it back! change it back!
 
@OctavianDamiean I fixed ur code
 
@OctavianDamiean the amount of upvotes on the question is too damn high
 
@Raynos Ah got it now. Thanks. :)
 
2:17 PM
@rlemon did you design the fragbuilder site?
looks really nice
 
@Loktar nope!
 
wait im retarded.. I see it now
bottom left :P
 
those are some nice designs
 
2:19 PM
yup
I can't wait to start chopping it up
 
I like this one, very geeky.
 
yea but unprofessional imo
 
(yeah, I haven't changed the text)
well the target's different
 
the old node.js page looked similiar to that one
 
aww yea
 
2:23 PM
@rlemon btw use cursor: col-resize and cursor: row-resize
 
yea i know
been lazy and was drunk last night
no excuse
 
Ive been crazy lazy too as of lately.. been pouring hours into TF2
 
to prevent the annoying chrome bug try $(document).on( "dragstart", function(e){e.preventDefault();});
you are probably not gonna use the native drag ever anyway
another cool touch is to remove selection while resizing the splitters
 
comment in the issue or else I may forget :P
please and thankyou
 
ok I added new issue
 
2:32 PM
ahh i was gonna say comment in the SO question but that works too :P
hehe
 
@Esailija You look like you want to rape me and lay your eggs inside my hollow carcass
 
=)
 
...again
 
lol
@rlemon wait why aren't the splitters positioned absolutely?
 
2:40 PM
3
Q: Get event listeners attached to node using addEventListener

TyiloI have already looked at these questions: How to find event listeners on a DOM node? can I programmatically examine and modify Javascript event handlers on html elements? How to debug Javascript/jQuery event bindings with FireBug (or similar tool) however none of them answers how to get a lis...

50 reputation bounty! go for it!
 
@Esailija because like I said i'm flying by the seat of my pants
 
it will be more robust that way cos you can just worry about 30% 70% etc
 
so if you're questioning "why" the short answer is "because I didn't think of it"
 
the resize bug is basically cos the 2 percentage widths + the px width from a splitter are > 100%
I think
 
rofl
> "Dammit, I hate doing things right" ~ coworker
 
2:48 PM
@RyanKinal is there any way to make a Progress element vertical ?
without transform:rotate(-90deg);
 
last night I answered a 3 year old question
 
Define "progress element"
 
the html 5 progressbar
 
<progress>
 
2:49 PM
bazinga!
 
Oh. Not that I know of
 
@Esailija thanks
@RyanKinal k tys ;-)
 
for what
 
putting <progress> for me
 
2:52 PM
@rlemon i said without transform -_-
 
oooo
missed that
 
what happens?
you gotta adjust the margins
 
nope
it ruins
the layout
its still occupying space
as horizontal one :-(
i dislike that
 
position: absolute
solves everything since 1999.
 
2:55 PM
@FlorianMargaine [it creates its own]
 
@Abhishek css problem?
 
@Yohann no
html5 shortcome :$ ,, i hope they add a specification for verticalization :$ lulz
 
@FlorianMargaine and I wonder how people end up making crappy websites.
 
i can solve that issue
with the -ve margins
 
on a html5 note does non-html5 supported browsers fall back to standards mode automatically? when specifying doctype
 
2:57 PM
but thats just too dirtyy
 
@Abhishek last time I check, you could rotate some stuff. I can that is what you mean by verticalization.
 
@OmeidHerat i know of transform:rotate(-90deg);
but look at the box model
 
just use position absolute etc to fix it
 
well, there you go
 
3:00 PM
this is what i use to fix it :-)
 
3:17 PM
booya
marquee to the rescue!
 
o
@rlemon lmao
 
ohh you know you love it!
 
hahaha
no :-(
 
well of course you wouldn't love using it, but you do love it
 
Lol
 
3:19 PM
LOL
marquee is the greatest thing ever
 
yeah it is :D
 
hell yes it is
 
Hi all
 
i didn't even know about the direction-attribute
 
2
Q: Why does Javascript only count carriage returns are one character when it is two?

NealThis is an offshoot of this question: Chrome counts characters wrong in textarea with maxlength attribute In that question it was found that Javascript counts carriage returns are one character when in fact it is two (\r\n), why is that? Test Fiddle: http://jsfiddle.net/maniator/E527z/

boooo ^^^
 
3:21 PM
"\r\n".length
2
 
user1385191
read the code
 
user1385191
he's tossing it in the $ blender
 
well shame on you for tagging it javascript
or rather not tagging it jquery
 
user1385191
done
 
@MattMcDonald I removed the jQuery from the code, I just was using the fiddle from the original OP.
Still the same issue even without $
 
3:27 PM
what is the point of "\r" anyway, stupid mechanical world artifact that doesn't need reproduction in computers
 
@Esailija I removed the jQuery :-P
 
user1385191
I have a funny feeling that your answer to the linked question is wrong
 
user1385191
\n not \r\n
 
this fiddle is doing nothing at all... hm
 
user1385191
that's how it gets 7
 
3:29 PM
@GNi33 huh?
 
yep, i don't know why
length doesn't get updated
 
@MattMcDonald why is my answer wrong? it is completely right. it should display 10 and not 7
 
hello
can i ask a question?
only kidding :)
 
@mUnk3y Nope.
:-P
 
drank some starbucks yesterday
closest i got to java script
 
3:32 PM
interesting, please tell me more...
:P
 
it displays 5 for me
also
test.value.split("").map( function(v){return v.charCodeAt(0)});
[10, 10, 10, 10, 10]
so it only allows 5x "\n" for me
 
user1385191
I'm getting "1\n2" in Chromium
 
user1385191
"\r\n" is only for IE
 
@MattMcDonald did you test with that fiddle?
 
watch it for a minute or two
 
user1385191
3:38 PM
try explicit charAt checks
 
marquee is dafuqed
 
user1385191
you'll see what I mean
 
Any one got time to look at my question :D ? stackoverflow.com/questions/10030338/…
 
user1385191
t.value;
"1
1"
t.value.charAt(1) === "\n";
true
t.value.split("").forEach(function (e, i, a) { console.log(e); });
1

1
 
3:41 PM
my only existing site which uses prototype
 
@Dave Y U POST DUPLICATE OF YOUR OWN POST
0
Q: Creating a grid array of co ordinates

DaveI'm a little confused with my array creation. I have a list of items with x:y co ordinates and also their dimensions (in grid sizes) ... for example: x: 1 y: 7 width: 2 tiles height: 2 tiles So the idea im trying to do is create an array of x:y grids that are "occupied". But looping such data ...

 
its not duplicate actually
 
but it is.
 
it isn't
the first one only worked on a 2by2 max dimension
 
read the first post - extract the methods used to create the dimensions.
FFS you are dumb.
occupied.x.push( chord.x + (chord.w-1) );
looks like it handles any dimensions to me
 
3:42 PM
that just adds 1
 
no it adds the width - 1
 
which only produces 1 grid reference result
 
omg
 
so if its 4 wide only 2 x's would be plotted
the original plus its end x
 
4 wide.
x = 1
w = 4
occupied = 1 + (4-1)
 
3:44 PM
= 5
so id only have 1X and 5X
none of the ones inbetween
 
so modfiy the code
 
that what the new question is asking about >.
>.>
 
no the new question is saying... "Hey, I got the bait, the rod, and the fancy fishing hat... can someone reel this fish in for me"
 
because every new width has a new height
so its confusing to loop it
i tried for loops on the width and height but id have to loop width and add height then loop height and add width its confusing
 
dude why do you need to know EVERY cell occupied
 
3:46 PM
why do u think ... lol
they collision points
 
seems to me IF x1 is occupied and x3 is occupied by the same friggin object than x2 is a gimmie
calculate it
 
how does it lol
what if two objects with 1 by 1 dimesions was the situation ?
 
like I don't see why you need to store all of these steps
 
then there would easily be an empty space inbetween.
 
first time i gave you a solution you didn't understand so you said it was wrong.
 
3:48 PM
explain then how two grid references auto means the space inbetween is occupied ?
 
user1385191
eh, take it easy with the personal jabs
 
sorry matt
frustrated. i'll just walk away.
 
i didnt say you were wrong u just not understand how the objects are
 
ok, before you even produce an 'occupied' array think of why you need it.
to figure out collision detection.
 
well thats for placing new objects on the map need to check occupied spaces
 
3:50 PM
well if you know the top-left of the object, the height and the width... and the point of the other objects... run the math
if( bullet.x > obj.x && bullet.x < obj.x+obj.width ) ...
 
yeh but its less math intensive to store each grid reference in an array and then just check if such a tile is in the array or not
 
but you still have to do the math..
would you rather do arithmetic or very long loops.
think about it.
 
picture this:
two objects 1by1 dimensions at:

2:4 and 5:6
nothing suggests there that 3:5 would be occupied.
 
ok, you're not getting it.
i'm telling you your approach is wrong.
ok i'm done.
bbl
 
lol right how can i be wrong i cant use ranges
just basic isometric design
maybe game dev corner might know
 
4:29 PM
-1
A: Example of situation that needs declaring a method inside the constructor function instead of declaring it as a prototype method

Raynos but I can't think of a practical example when you will need the other situation That's because there is no practical example. Declaring functions inside the constructor is a known bad practice due to incurring unnecessary performance penalties.

noobs ;_;
scrub noobs everywhere
 
is this chat always attacking newbies ? lol
 
@Dave si
 
lol
 
we need the "mocking" disclaimer for shitty code back.
 
@rlemon go shout at @jAndy
he got all "that shit aint professional enough"
 
4:40 PM
@Raynos why can't you add it :P
 
Because @jAndy will throw a fit again
 
maybe he likes tresemme shampoo ?
 
solution: make me owner, i'll change, remove my ownership
 
@rlemon have fun
you can fight it out, I don't care
 
4:46 PM
lol
 
=/
 
Noobs be Noobin
 
i sense thats not guna do well
 
@Dave i'm not really an asshole, you just caught me at a bad moment.
 
lol fair enough :P
i deleted my question in the end
 
4:48 PM
new question for you: pop over to game dev and ask for the conceptual way to go about it.
 
yeh they suggested nested loops
 
ensure you're not re-inventing the wheel so-to-speak.
 
so guna try that
 
yuck. but ok
 
lol i know xD
its only small looping tho as the max grid is 22 by 22
 
4:49 PM
pretty much loops are expensive. avoid running long loops, nested loops, registering events in loops, etc.
 
@Chris you ಠ_ಠ
 
NERDRAEGE
 
ban him :P
rofl
 
I know what you mean about the public API being dirty
 
room topic changed to JavaScript: Discussion pertaining to ECMAScript and its many variants (primarily JavaScript). General web topics are permissible provided other rooms are stagnant. Ultimately, we're here to help. If we're being brass, it's because you need to slow down and listen to us. [dom] [html] [javascript] [jquery] [mootools]
 
4:50 PM
I use a very roundabout way to achieve a clean public API without closures
it also has significant performance penalties :D
 
topic change should of been "I love lamp."
 
function Interface(object, props) {
    var interface = {}
    props.forEach(addToInterface)
    return interface

    function addToInterface(name) {
        interface[name] = object[name].bind(object)
    }
}
 
When I first learned about the ability to create private members by declaring them in the constructor, I went apeshit and did it x 9000 in every piece of code I wrote for like a month
 
Interface({
  _lulz: function () {},
  _moreLulz: function () {},
  clean: function () {}
}, ["clean"])
 
4:52 PM
any articles
or websites which keep track of shadow dom ?
i need the shadow dom pseudo element info about <meter>
 
@Abhishek the shadow dom spec? :P
 
@Raynos, that is looking a lot like the MooTools Class setup :)
 
well it's not so much about Class emulating as providing a proxy
 
They picked a straightforward but ultimately bad name, and don't use the private stuff
Just sayin', you're making a... BUM BUM BUUUUM framework
/cue screaming lady
 
@Chris I made a framework, yes I did :D
 
4:55 PM
mean while - creating things without jquery makes you feel like this i.imgur.com/3PNnB.gif
 
ncore has gotten ugly, I need to reduce the complexity of it
 
@Raynos say <progress> element
when used with -webkit-appearance:none;
 
@Raynos so when you gonna get around to writing your JavaScript framework?
 
gives birth to two pseudo elements
 
rayQuery
 
4:57 PM
Lolz
or JS-Nos ^_^
 
blackCoffee already exists
 
@raynos why do you only mention performance? There is the fact that you can no longer extend 'classes' and that state is no longer owned by the object but the 135 function the object points to
 
Why try?
var res = callback();
if (typeof res == 'object')
  // do a thing with an object result
else if (!res)
  // do a thing with a falsey result
else if (res)
  // do a thing with a truthey result

//OR

var res = callback();
if (typeof res == 'object')
  // do a thing with an object result
else if (res === false)
  // do a thing with a [false] result
else if (res == true)
  // do a thing with a [true] result
else
  // do a thing (or nothing) with whatever the hell this result is
 
@Esailija I guess I could
 
blackCoffee is too bulky.
 
4:58 PM
Feedback -- I have a callback that could return... anything. I kind of want the caller to react to certain return types, which would you favor?
 
top
 
user1385191
I have callback handling in Utils.traversal
 
although shouldn't the top be else if (!!res)
 
user1385191
if true, the node passed is returned
 
user1385191
if truthy, the truthy value is returned
 
user1385191
4:59 PM
and those are piled into a static array
 

« first day (537 days earlier)      last day (4409 days later) »