« first day (922 days earlier)      last day (4024 days later) » 

8:00 PM
Hello guys!
 
o/
how goes it!
 
How is it going man?
 
Oh hey!
 
    function fillPage(data, uname, $) {
    	console.log(data.list.uname.stats.global.kills);

How might i use the uname variable when calling the object?
 
We've missed you :-)
 
8:00 PM
alright, aside from my recent server issues :P
 
Well back in France, depressed
 
:( you never visited me
 
I never did :(
 
@dievardump Understood. That's how I feel every time I come back to Warren.
 
I'm here since Saturday, and am already looking for jobs in London
I'm really bad, mentally speaking
 
8:01 PM
idk, I was born and raised in the city I live. :/ I don't mind it
 
And can't even tell friends and family, they take it for themselves
 
if I want to see other places I'll travel. but I am happy living in a place where I know
 
@dievardump That sucks, dude. Sorry to hear it.
 
@dievardump you always have the support of the javascriptchat
we <3 you
 
yeaahh thanks :p
So what's going on here?
 
8:03 PM
ntm, business as usual
 
Pretty much
 
my first time on chat... are most of you regulars? or is this how strangers talk on SE...
 
Talking about stuff... sometimes JavaScript
 
@acheong87 we are regulars, you are a stranger. so yes to both of your questions :)
 
JavaScript?
2
Is that like Java?
 
8:04 PM
Yes. Exactly like Java.
 
@rlemon touche
 
But more scripty
 
var ElementFactory = function(type) {
  return document.createElement(type);
}; // lets Java this bitch up!
2
 
lulz
@acheong87 Most of the people I can see in the recent history are regulars
 
Hahaha
 
8:06 PM
damn it @rlemon, rules.javascriptroom.com, lost again. i'm not clicking any of your links anymore.
 
lol - actually that was a HAHAHAHAHAHAHA
 
@Neal ^
Fix it fix it fix it
 
@AmaanCheval what happened?
 
Wait, nothing.
 
It was working this morning. wtf
 
8:07 PM
@AmaanCheval look at the last point in "Basics"
 
@acheong87 it does work.
 
The site wouldn't load for me
 
And I want One million billion quadrillion dollars. — Neal 1 min ago
@AmaanCheval it loads for me
 
@Neal Yeah, he lost the game because it's mentioned in the rules
 
@AmaanCheval @Neal he was commenting on me making he lose the game
 
8:08 PM
> wouldn't
 
Arf, have to go
See you soon
 
hey @neal, where in brooklyn? i just moved to san diego from there.
 
@acheong87 Midwood
w00t!
How about you @acheong87 ?
 
Ah, cool. I last lived in Bushwick, but used to live in Bay Ridge. Is Midwood the ethnic Russian area?
 
8:14 PM
@Neal I do think that is enough. also, does bold put me on a fast track to cool? — rlemon 6 secs ago
 
@rlemon yes yes it does. Also bow-ties.
 
:)
I prefer stetsons.. they are cool.
 
bow-ties make me feel like i'm choking
 
Last time I wore one was at my bar mitzvah. Do not remember it much lol
 
8:17 PM
I did a lot of theater in HS and just after, had to wear them a few times for a couple plays.
not the best.
but protip: everyone looks bauce in a zoot suit
 
-_-' Ever had to wear a cummerbund? ...I did. I was... very cool.
Bright teal colored.
 
Wore a vest/tie to my wedding: ninasdesigns.com
 
someone help me .. I need to select a siblings child..
("#someid > child).. but how do I say someId's sibling's child?
 
with jQuery?
 
yus
 
8:22 PM
Hm okay seems like YouTube CDN has issues
 
selector-only: look into the + and ~ combinators
 
Anybody getting a 403 here? tc.v5.cache6.c.youtube.com/…
 
@IvoWetzel confirmed
 
html looks like this
<div id='parent1'>
<div id='parent2'>
<div id='child2>

I need to child2 when clicking parent 1
 
@IvoWetzel DENIED!
 
@JanDvorak ty this is what I was looking for
 
@TheSnooker are you missing some tag ends in your sample? Otherwise, #child2 is a grand-child of #parent1
 
	ctx.beginPath();
	ctx.strokeStyle = 'black';
	ctx.lineWidth = 10;
	ctx.arc(cX, cY, 72, 0, 360 * (180 / Math.PI), false);
	ctx.closePath();
y u no work?
cX/cY is centerX/Y respectively.
 
@JanDvorak yeah I know I left out the closing tags for brevity
 
8:25 PM
@TheSnooker you induced ambiguity by doing so
 
@rlemon, I think you're converting to radians wrong.
Try the reciprocal.
 
@rlemon 360 * (180 / Math.PI) == 2/Math.PI. Perhaps you meant 2*Math.PI?
... or Math.PI/2
 
@TheSnooker You bind the click event to .parent1 then find and do something with child2?
 
@JanDvorak RAD = DEG * ( 180/PI )
 
behold the power of the hosts file!
 
8:26 PM
I don't think you can do it with css alone, as the child needs to be inside the parent.
 
tc.v12.cache7.c.youtube.com 74.125.104.181
 
i'm drawing a circle to end angle is 360 in this case
 
and suddenly my youtube is working again
 
@rlemon wrong. 180 deg == PI rad
 
just redirecting to another CDN server of theirs
 
8:27 PM
@rlemon - That can't be right... 2pi = 360, right?
 
@mikedidthis yes, the structure of the html i'm being passed is setup so that a header sits outside the content div.. so clicking on the header should close the content... the header and the content divs are siblings.
it's part of a homegrown widget system
 
^ which is what I have
 
Then I don't understand the question correctly. Sorry.
 
radians = degrees * (pi/180)

degrees = radians * (180/pi)
 
(180 deg == PI rad) => (1 rad == (180/PI) deg)
 
8:29 PM
<div class='widgetbar ui-widget-header' style='background-color:#666666; color:#fff;'>Weather</div>
<div style='width:250px; height:250px; overflow:auto; background-color:#fff;'>
<div class='widgetcontent' style='font-size:12px;'>
".$html."
</div>
</div>
 
fuck my pi and 180 are reversed
 
that might help clear it up
 
and clicking what should hide what?
 
div + div > div, no?
 
sibling selectors always smell IMO
 
8:29 PM
the widgetbar class
$(document).on({"click": function(){
console.log($(this).sibling(); // needs work here
}
},".widgetbar");
 
why document?
 
using on
 
Right, but still why document?
 
was my understanding that on always binds to document.
 
bind it to pretty much anything
I believe
 
8:31 PM
it's for delegation
 
@TheSnooker you probably shouldn't use the object syntax when attaching a single handler
 
yeah so it's always picks up DOM changes
 
$(document).on('click', 'a.foo', function() {
  alert('I should only alert if you click on a A tag with the class foo, regardless of when it is introduced into the document');
});
i'm pretty sure your order is wrong
 
!!/jquery on
 
or $('a.foo).on('click, function() {....
 
8:33 PM
.on(event, delegate, handler);
 
now I'm confused..
 
You can do it either way :)
 
@rlemon .on( events [, selector ] [, data ] )
 
data is the handler
and selector is the delegate selector
 
8:33 PM
it's a weird syntax, though
 
if I want an event to trigger even if it's added to the DOM after the page had loaded.. I bind to teh document right?
 
@mikedidthis That doesn't work if a.foo is added dynamically
 
@TheSnooker or to another nearby container. Also, this vv
 
AFAIK
 
@TheSnooker you bind it to the static container you know to exist on DOMContentReady
@PeeHaa埽 you are correct in that assumption
 
8:34 PM
@PeeHaa埽 I think your correct.
 
wait... nvm, I think .on is live now as well isn't it?
 
yeah
 
they change it too much IMO
 
.on is ALL THE THINGS
 
@rlemon At least they greatly improved performance of the thing
 
8:35 PM
    function loadData(data, uname, initial) {
    	$('#' + initial + 'Wins').text(data.list.uname.stats.global.wins);
    }

data is an ajax return, how can I use the argument uname in the call there, I tried + uname + but got an error
 
> The .on() method attaches event handlers to the currently selected set of elements in the jQuery object
nope, not live
 
It's more like delegate
 
that is why they support the stupid syntax
 
I thought .live() was deprecated?
 
It is
You use .on :/
 
8:36 PM
@rlemon only handlers, selector [,data] is stupid IMO
 
and .on() takes it place.
 
okay then i'm write :D
right even*
 
no, you need to declare what is to be monitored for click
 
I am
 
8:37 PM
You told it to watch the document, and to watch for clicks, but not what is being clicked?
 
$(document).on({"click": function(){//do stuff}},".widgetbar");
.widgetbar is
 
................................................................................ ^here^
 
@JanDvorak lol
 
third try :-)
 
8:39 PM
:)
 
now to just make the barrier actually get checked in the collision detection ;)
Ohh Snap! better idea.
make it like MarioKart
you have balls surrounding you, when a NPC hits them they pop, run out of balls and you lose
idk, i'll have to play with both ideas.
 
$(document).on("click", ".widgetbar", function(event){
console.log('widget clicked');
});
 
I need to start playing with html canvas
that loosk pretty clook
 
@TheSnooker it is.. ohh is it ever
lots of fun actually.
 
I've become so lazy since REST API's
:D
 
8:43 PM
I just let the balls generate for a while. I wonder how closely this resembles air.
 
adobe air?
 
@mikedidthis both syntaxes are valid
 
the canvas API's are somewhat limited, but it's good ol' fashioned js for the most part.
 
Oh, no. Collision of air molecules.
 
ohh. well I could attempt to model that
codepen.io/rlemon/pen/DqavK they don't collide
but it's something :)
 
8:46 PM
wtf. mind blown.
 
jsfiddle.net/rlemon/4vZD3/show here is one game I made.
it's hard to play and kinda stupid
 
reminds me of tanks
 
clear/blue bubbles give you +1 second and iirc +1/2 score, golden bubbles give you like +10 secs? and ~100 points? red bubbles -~2 secs and score negative points
see how many points you can get before the timer runs out
 
like that old DOS game
 
the collision is off a bit
@TheSnooker I was originally going to try and write a canvas port of Gorillas
the old DOS gorillas
 
8:48 PM
yes tanks was similar
 
i wish i read your instructions before i went for all the red bubbles.
i thought they were special.
 
only instead of banana's and gorilla's it was tanks and bullets
 
yup
@acheong87 haha yea
 
lol my score was 3.159233492
 
types = [{
    name: 'Bubble',
    hits: 100,
    color: '#3d6aa3',
    img: i_bubble, // 'http://i.imgur.com/hVSo95T.png',
    minvalue: 10,
    maxvalue: 40,
    rarity: 1,
    time: 1.25
}, {
    name: 'Power Bubble',
    hits: 110,
    color: '#3d68ff',
    img: i_bubble_power, // 'http://i.imgur.com/CzqIcTI.png',
    minvalue: 20,
    maxvalue: 70,
    rarity: .35,
    time: 2.5
}, {
    name: 'Bad Bubble',
    hits: 1,
    color: '#f00',
    img: i_bubble_toxic, // 'http://i.imgur.com/v317naC.png',
 
8:49 PM
almost pie
 
^ there is the values
yea shit I screwed that up
red === bad
blue === good
green === better
gold === best
 
@JanDvorak @TheSnooker I didn't know that, learned something new :)
 
@mikedidthis I'm not going to use the multiple handler syntax anytime soon, though.
 
I should polish up that game a bit
it has potential
 
New experiment:
0
A: Disable a `link` without access to HTML

Neal                           

 
8:52 PM
it is kinda fun in a mindlessly addtictive way
 
@j08691 answering a question with just comments. — Neal 35 secs ago
 
You should put a different part of the answer in separate comments
 
@ExplosionPills Hmmmm.
 
Neal that is stupid. don't be stupid
 
8:53 PM
@rlemon I am in a mood.
 
$("a").attr("src",""); Would disable all links :D
 
so don't pollute the main site because you are "in a mood"
 
you mean href?
 
yerr
 
be responsible.
 
8:54 PM
yes .. not src
 
so I got into a pretty heated argument about JSON serialization of functions
 
did you win?
 
I'm torn between downvoting an experiment and keeping my rep divisible by five
 
Neal this is stupid, don't pollute the main site with your experiments. Edit the answer or delete it. Someone with your experience on SO should know better by know. — rlemon 6 secs ago
 
I don't know .. some people are pretty hard-headed
is there no SO sandbox?
 
8:55 PM
for the chat yes, but for the mainsite there is meta
pollute meta
no one cares about meta
 
Answer copier :-P — Neal 43 secs ago
 
finally
flag validated
 
it started from the need to move from some Java servlet object serialization to a pure web application -- this guy wanted to basically make a direct move from the serialized objects to JSON
 
JSON is the future
 
"real" answer. copied from my original answer's comments. — Neal 13 secs ago
 
8:58 PM
don't argue with him
 
@rlemon Most likely yes. Can you open an issue on github?
@BenjaminGruenbaum Not right now, but see above message ^
 
in PHP, 8 mins ago, by bizzehdee
haha, brilliant http://www.ismytwitterpasswordsecure.com/
:-D
 
0
A: Disable a "link" tag without access to HTML

rlemonfor ( i=0; i<document.styleSheets.length; i++) { void(document.styleSheets.item(i).disabled=true); } given the known index of the stylesheet in the mix, this should work.

really, you guys missed the most obvious solution
document.styleSheets
 
@rlemon wanting to use JSON is not the problem, but you can't change from serialized Java Objects to JSON transparently
 
@rlemon Why are you wrapping in void?
 
9:02 PM
fancier
 
Yea why void?
 
edited
added 'var' keyword as well before you all bitch
 
From GitHub:
> Right now, orgs don't generate any events, so there's nothing to follow. All the events are generated by the members of the org, following the org would essentially be a noop.
 
I didn't know CSSStyleSheet had a disabled property...
 
home time
l8tr g8trs
 
9:03 PM
Later
 
that lead to a discussion about how the methods would be serialized, so he suggested that you can serialize them by writing a string representation of the function ... eval('function () {}'); -- ostensibly he doesn't know the definition of the term "serialization"
 
Math.sign = function (x) {
    return (x > 0) - (x < 0);
}
 
@SOChatBot sine?
 
sine !== sign
You'll notice the different spelling and completely different meaning
 
9:14 PM
@Zirak sign sine and sign
 
!!/define sine
 
@JanDvorak sine (trigonometry, mathematics) In a right triangle, the ratio of the length of the side opposite an angle to the length of the hypotenuse.
 
!!/define sign
 
@JanDvorak sign (sometimes also used uncountably) A visible indication.
 
!!/define signum function
 
9:14 PM
@JanDvorak signum function (mathematics) The function that determines the sign of a real number, yielding -1 if negative, +1 if positive, or otherwise zero.
 
Whats the sign that the sine's sign is sign-able in sign language?
 
you shut your whore mouth
 
I did not see the sign
 
first an empty answer, now this...
 
 
9:18 PM
!!/inhistory 1920
 
@Zirak January 30 – The oldest surviving pro wrestling match on film takes place, with Joe Stecher defeating Earl Caddock.
 
!!/inhistory 1920-01-30
 
@Zirak November 17 – The council of the League of Nations accepts the constitution for the Free City of Danzig.
 
...that did not go as planned
oohhh, I see what happened
crap, I don't have enough time now
 
0
Q: How can I use a function argument in selecting data from an object?

XCriticsHi guys (and gals) just trying to select data from an Object, this is the object returned from the API I'm using: and I'm using this function: success: function(data) { console.log(data); loadData(data, 'Finalphase', 'f'); } }) }) function loadData(data, ...

 
9:32 PM
@XCritics ow
 
Did I hurt you, I'm sorry, let me kiss it better.
 
@XCritics please no
 
Don't fight it, just let it happen
 
... I am done here for today ...
 
:)
 
9:35 PM
@phenomnomnominal (hopefully I spelled it right) "Conventions of Space and Time" is interesting because of Annie. I'm glad they picked up that theme from the 1st (2nd?) season; there wasn't much since the Model UN contest
 
You should use comments sparingly
 
9:54 PM
8===MATURITY===D
 

« first day (922 days earlier)      last day (4024 days later) »