« first day (395 days earlier)      last day (4568 days later) » 
00:00 - 16:0016:00 - 00:00

12:27 AM
0
Q: consolidating and shaping to object oriented paradigm - check methods

stack.user.0I'd like to consolidate these methods more and perhpas shape to an object oreinted paradigm. How can this be done effectively? Thank You /******************** group:checks ********************/ var patterns = { name: /^[a-zA-Z-\s]{1,20}$/, email: /^[a-zA-Z0-9._(-)]+@[a-zA-Z0-9.(-)]+\.[a...

 
12:39 AM
0
Q: consolidating and shaping to object oriented paradigm - frequently used methods

stack.user.0These should be easy to shape into an object of sorts... /******************** group:frequently_used ********************/ function fill_id(html_id,html_text) { return (document.getElementById(html_id).innerHTML=html_text); } function set_onclick(html_id,method_call) { return (documen...

 
 
3 hours later…
3:58 AM
0
Q: Display facebook insight data in remote website

josephIam trying to display the facebook insights statistics in my website. I have remotely loggged in to the face book from my site. Then Iam not quite sure what to do. Hope someone one can guide how to achieve this.

 
 
1 hour later…
5:04 AM
Perhaps it should be the 'Canvas & WebGL' room?
@Raynos You'd need it to be sandboxed because people could easily have malicious code run all over the page
You could have a sort of a keylogger, you could forward them to any location you want
 
5:40 AM
By the way, you guys should probably remove the jQuery and Mootools tags from this room.
Prototypejs too
 
6:26 AM
hi,anybody here ?
 
Sup?
 
7:28 AM
@dil
anyone is der...
 
 
2 hours later…
9:03 AM
Mozilla’s Robert O’Callahan talks to Computerworld http://robert.ocallahan.org/2011/11/couple-of-weeks-ago-i-spoke-to.html about the Web platform, standards, HTML5 video, New Zealand
0
Q: What should be tested in Javascript?

Nathan HoadAt work, we've just started on a heavily Javascript based application (actually using Coffeescript, but still), of which I've been implementing an automated test system using JsTestDriver and fabric. We've never written something with this much Javascript, so up until now we've never done any Ja...

 
9:24 AM
Proposal from Kinuko Yasuda for a (better) way to enable folder/directory drag-and-drop with the File System API http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html
 
 
3 hours later…
12:08 PM
Can someone look at this and help me understand why the element does not fade? jsfiddle.net/g105b/2DSMT
I'm not too clued up with jquery
 
12:20 PM
Look at the jQuery API, perhaps?
I don't think fadeTo animates
Okay, it does
@Greg It does fade
Sometimes it does, sometimes it doesn't
It's acting really weird for me
 
12:39 PM
 
1:01 PM
Good day everyone!
 
1:12 PM
@Amaan and my last one before I stop wasting time with this... maybe... fiddle.jshell.net/Q8dSe/4/show/light keyboard "s" toggles the use of boxes with the circles.
 
@Raynos Rick Stallman is obviously a pirate :-p
 
As I unerstand most of those who speak here are against frameworks such as jQuery, etc., but maybe due to the low amount of people in jQuery room you might be able to make an exception?
 
@Eugene: jQuery is JavaScript. Anyone saying you can't talk about jQuery here is trolling :-p
 
@Eugene There's no reason why you can't talk about jQuery
Or code that uses it, or whatever
 
I made, that argument earlier, but some people told, that it would be a wrong place to talk about it here. That I can, but it would be wrong.
So now I asked for permission.
 
1:23 PM
Creating an extra room for jQuery is pointless, IMO. This room satisfies the requirements of any library-specific chat.
 
It's in the tags and the description of the room. You can talk about any libraries, framework, whatever, as long as its JavaScript. Has been this way, and always will be this way
2
 
Anyway. Since I can, then here is my Q. I'm using an extended version of jQuery UI slider and I have a question if slider range is [0, 100] and I need to place to rollers not on min(0) and max(100) how could I do that? Or it depend on extension?
 
@Eugene Not sure what you mean here, do you want to exclude 0 and 100 from the slider range?
 
You could see here, that slider selected area doesn't start at the beginning and as well
 
@rlemon Nice
I've got to look into translate
 
1:28 PM
@Eugene It takes the initial values from the <select> element, so if you set the original <select> element's value to the 0, it should start at 0
 
@YiJiang I think I understand what you are saying, but I added selected attributes during the work of the script, but for some reason it doesn't see them. So I thought, that it maight be due to the min and max slider values, but I change them in the script to.
 
if ( 0 != options.firstRollerId.length && 0 != options.secondRollerId.length )
*scratches head*
 
Ou. Forgot to say. As any other plugin, this plugin can take some settings.
 
What version of jQuery are you using?
 
1.6.2
I now that there is 1.7
This plugin uses two select fields to make a range slider, so options.firstRollerId would be first select id and second ...
Since they are options I check are they empty or not.
 
1:45 PM
What's the difference between Type and Class ?
Maybe I should go ask C++ but they are scary
 
@Raynos do u mean data type and class ?
 
@Amaan hows your game comming along
 
Oh btw does somebody knows a method to find out filled area on a canvas :|
 
I mean the abstract term "Type" and the abstract term "Class"
 
oh
 
1:48 PM
We actually have to define those terms to be able to continue the conversation
 
@rlemon Pretty good
Except for having to design the GUI
 
I presume the definition of the terms also defines how they are different
 
That's a pain
 
@Amaan thats why i'm doing all of these little crap scripts.. try to better understand the api
 
I have a bubble cross section, i want to find out area of the bubble (it can be canvas or SVG) is there any way to calculate the area trapped inside the path ?
 
1:50 PM
It's like trying to programatically draw keyframes in mspaint
 
@rlemon It's ridiculous what I'm having a problem with. I can't center divs over the canvas~
 
why not?? want some help?
 
Yes, please
 
jsfiddle.net/aUDMy/2 @Amaan click on any particle :3
or just press enter
 
The problem is, I've got to give them padding and borders as well
 
1:52 PM
to kill it lol
 
@Abhishek That looks cool, but I don't see it getting 'killed' or anything
 
lol its a bubble :3
 
One of the particles just moves out of the cluster and goe sback in
 
it should shrink
does instead an implosion
due to electrostatics (i think Van Dar Waal forces were better)
 
0
Q: Hover div (with a border and padding) over the center of a canvas element?

AmaanI want the div to be exactly in the center horizontally. I've tried this: var div = document.createElement(); div.textContent = 'Hello World!'; div.className = 'button'; div.style.position = 'absolute'; div.style.left = (0.5 * canvas.width) + canvas.offsetLeft + 'px'; The class button is defin...

@rlemon I've described my problem there
 
2:04 PM
@YiJiang I found where this complication occurs, but I don't know how to change it. It doesn't add changed left attribute on init
 
@Amaan wanna think on my issue just for a bit :3
lol a simple area calculation will get me A+ in chemistry :3
 
In Chemistry?
 
@Eugene Try using props instead of attr? It doesn't look like it'll make any difference though
 
yeap
 
2:06 PM
something like this
 
my chem teacher says if i can simulate properties of a soap bubble extreme close to real she will give me full in chem (atleast the sessionals)
 
@rlemon Holy shit. How'd you do that?!
Wait, I'll look through the code
 
Okay, this was what I was doing. Just in the wrong order.
@Incognito I'm not sure that's perfectly in the center
 
No it's out by several pixels
I didn't bother using the JS to calculate it.
 
2:12 PM
@Incognito thats what picaso said..
 
@rlemon It's 9am and you have me googling picaso quotes.
It's going to be a long day.
 
@rlemon Your answer has been accepted. Thank you for your services
:P
 
Picasso once told me "Who are you? What are you doing in my house!? GET OUT!"
 
hahaha
 
ffs internet.
Go to copy one quote, whole pages gets in clipboard.
 
2:16 PM
Even though it was in my house...
 
@Incognito are you just rolling into work at nine???
 
> Computers are useless. They can only give you answers
@rlemon Yeah man.
@rlemon I can start at 10 if I want.
 
:(
 
I miss flex hours
lemmy guess, as long as your there core hours (10-4) you're good
 
Lol I wish.
No it's you put in a full day but you start whenever you want.
 
2:19 PM
my last place was like that.. put in your 40, but any given day as long as your there 10-4 your good.
so i could do 10-6 or 7-4
 
Jon Skeet is god
726
A: Why is subtracting these two times (in 1927) giving a strange result?

Jon SkeetIt's a time zone change on December 31st in Shanghai. See this page for details of 1927 in Shanghai. Basically at midnight at the end of 1927, the clocks went back 5 minutes and 52 seconds. So "1927-12-31 23:54:08" actually happened twice, and it looks like Java is parsing it as the later possib...

 
yea i came acrossed that before
my favorite "Please tell me you didn't just know this"
 
Man, time sucks.
Did you know this year russia isn't making the daylight savings switch?
 
@Incognito know astrophysics ?
 
LOL! Time really sucks in astropyhsics.
 
2:21 PM
speed of time is inversely proportional to gravity :P lol
 
Not always.
 
** whoopz
 
Speed of time? Vt = constant
 
Pfft... Time... Meaningless rubbish when you have your Tardis
 
more the mass slower the time :)
@Zirak not that easy :|
it runs slower on earth
and faster in space
 
2:22 PM
Right, but how long does it take light to travel from A to B?
 
I might be getting trolled, or you might be wrong, or we might be talking about two different things
 
3rd one
 
Time is a dimension. Saying "speed of time" is like saying "speed of height"
 
@Zirak Here's talking about this
 
Which is absolutely meaningless
 
2:23 PM
Turns out time isn't really a dimension.
 
oooohhhh, relativity
 
1 min ago, by Incognito
Right, but how long does it take light to travel from A to B?
 
Our perception of time may be different, but time is apathetic. Just because two people observe time differently, it doesn't mean time "ran" differently.
 
Lets say we're working on a local scale, not the universe, but the light between your monitor and your eyes.
 
@Zirak hahahaha, you are absolutely correct, but I love your attitude. I can't possibly be wrong... so that leaves one of three outcomes
 
2:25 PM
lol
:/ can somebody guide me how to find an area of a rendered path on canvas
or SVG ?
or the only way to do that is counting the no of filled pixels ? (not really good one)
 
If you're standing 100km from a mountain and I'm standing 5m from it from it, we perceive the same mountain differently, but the mountain didn't change
@rlemon :D
 
sigh nobody's answering my physics questions.
 
@Incognito d(A, B) / c (d is distance function, c is the speed of light) ?
 
@Incognito same here
 
@Zirak you forgot the last one.... Abhishek is really a Unicorn, and therefore can use Magic... and as jQuery has proven to us... Time must not be relative to non-muggles
 
2:27 PM
:|
 
@Zirak Okay, now given that light has no mass, and you are not yourself, but rather the photon
 
facepalm what ?
 
Time doesn't exist for things that have no mass.
 
@Incognito wait a second
 
@Zirak v = d/t thus t = d/v. and Speed of Light is c. so t = B-A/c
 
2:28 PM
that way
it will work in reverse way for something which has negetive mass (those particles which kill blackholes)
 
Time doesn't do anything. We are in time, including photons.
@Abhishek What's negative mass?
 
@Zirak ... not really
 
@Abhishek The photon observers the universe as existing and vanishing at the exact same moment, the entire universe it experienced was outside of time, because it has no mass.
 
When was the last time this chat was about Javascript (or something related) for more than.. say.. 20 minutes?
 
@Abhishek What you're saying here doesn't really make any sense in terms of physics.
@rlemon Normally it's always about JS.
 
2:29 PM
we get off topic quite a bit.
 
@rlemon JavaScript is Programming Language and Programming Language is more or less Maths, and Physics is a better math. Thus we are talking about JavaScript.
 
@Incognito it does
 
@Incognito That is not quite true.
 
@YiJiang Found it. I was primary sliders values property. There I had to place current select element indexes. That resolved the problem.
 
@OmeidHerat True
 
2:31 PM
@Incognito I heard Dr. Stephan Hawkings talk about
these particles
on discovery about an year ago
 
1 min ago, by Abhishek
@Incognito it does
> What you're saying doesn't make sense
> No. It does.
 
@Abhishek Hawking talks about a lot of things, but a lot of new things come up. One big area of research is looking at how gravity might not actually exist.
 
@Incognito Photons has momentum, that says a lot.
 
@Incognito The photon observes the universe as if it's vanishing because of general relativity. If two objects differing in mass move through the plane in different speeds, the faster one will experience time faster. However, time itself does not change.
 
@OmeidHerat in that regards we as also talking about Cooking, Chemestry, Rock Climbing, and an assortment of everything else that involves math and physics... everything
 
2:33 PM
@OmeidHerat Physics is better math? le what?
 
Sarcasm is “a sharp, bitter, or cutting expression or remark; a bitter jibe or taunt.” Though irony and understatement is usually the immediate context, most authorities distinguish sarcasm from irony; however, others argue that sarcasm may or often does involve irony or employs ambivalence. Origin of the term It is first recorded in English in 1579, in an annotation to The Shepheardes Calender: October: The word comes from the late Greek σαρκασμός (sarkasmos) which is taken from the word σαρκάζειν meaning 'to tear flesh, gnash the teeth, speak bitterly'. Usage Dictionary.com descr...
 
18 secs ago, by Omeid Herat
Sarcasm is “a sharp, bitter, or cutting expression or remark; a bitter jibe or taunt.” Though irony and understatement is usually the immediate context, most authorities distinguish sarcasm from irony; however, others argue that sarcasm may or often does involve irony or employs ambivalence. Origin of the term It is first recorded in English in 1579, in an annotation to The Shepheardes Calender: October: The word comes from the late Greek σαρκασμός (sarkasmos) which is taken from the word σαρκάζειν meaning 'to tear flesh, gnash the teeth, speak bitterly'. Usage Dictionary.com descr...
 
@rlemon Programming is about solving problems. Problems can be solved in any singe field. Solving problems is a form of programming. Therefore, when you solve problems, you're programming. QED
 
:/
well nobody answers my question meh solve it the old way -_-
 
@Zirak What does the photon see if it's created on a star trillions of miles away and vanishes somewhere over by your desk?
 
2:36 PM
@Incognito v = d/t thus t = d/v. and Speed of Light is c. so t = B-A/c when V_B == V_A.
 
JS ROOM Y U PHYSICS
 
Ooh, he's gonna move everything to the bin
 
@Raynos Canvas/svg needs a fair bit of Physics. real.
 
Shouldn't have said that. He's throwing me in the bin
 
2:40 PM
@Abhishek not to mention it's a pure concept.
 
@OmeidHerat t=d/v is Newtonian, doesn't really hold up at the part in physics where mass can exclude something from time.
 
ofc.
 
@Incognito The photon doesn't see. In order for "seeing" to happen, you need photons. Anyway, if it could see, it'd perceive the space around it to change in great speed, as it is traveling at a great speed.
 
@Incognito I think I have missed your question, what is the complete question ?
 
nyways i gotta go :|
@Zirak what is light :3
 
2:41 PM
Light is something to do with photons. Not sure yet.
 
lol
what a troll :|
 
I'm super serious
 
oh well even the greatest physicians will say that :)
 
@OmeidHerat I was trying to get people to see the lorentz interval along the worldline of a photon is zero.
 
@Abhishek what is light?
 
2:43 PM
@Abhishek I'm far from being a physicist...hobbyist at best.
 
It's simply a wave. That's all.
 
even i dunno lol
@Raynos nopes
 
And if you ask "what is wave?" then rage.
 
not that easy
 
Well yes, it is that easy.
Waves have this property called wave-particle duality
 
2:43 PM
@Raynos Light also behaves like particles
 
@Incognito is it so ?
 
So by saying it's a wave, I also say it's a particle
It's the same thing
 
oh clever ^^
 
@Zirak Waves also behaves like particles
 
physics is so weird sometimes :|
 
2:44 PM
1
A: Does HTML5 mean we go back to coding like ASP, compared to Silverlight XAML?

GvSEvery now and then Microsoft (and others) creates a new gadget-technique to run in your browser: Java applets ActiveX ActiveX Documents (Everything about Silverlight is also in the documentation for the Visual Basic ActiveX Documents) Shockwave Flash Silverlight All kind of apps on mobile dev...

That troll states
 
Hey guys.

+"10e"+1;
 
> SilverLight is superior then HTML5
Can we have some backup to put the troll in his place?
 
@Raynos ??
 
If you put sound waves under a "wave detector", it'd detect a wave. But if you put it under a "particle detector", it won't detect a thing. At least, AFAIK
 
@Raynos not, a simple wave, Light is packages of photon which are not wave (Pure energy) and nor matter.
 
2:45 PM
...
 
@Raynos You don't know what html is!
 
@OmeidHerat well this is speculation
 
((was yelling at the question guy, not at Raynos :P))
 
@Zirak gasp
 
@Zirak XD
 
2:46 PM
@Zirak sound is mechanical wave, far away from Light.
 
Light is a wave, and it's also photons
and the fact that photons are not matter is an assumption
Every particle is matter
 
@OmeidHerat Of course
 
what is antimatter then ?
(its been experimentally proved it exists)
 
@Raynos Nope, its prove by experiments, Photon has frequency and at the same time it has momentum.
 
@Abhishek Really?
 
2:48 PM
Yeap.
 
@Raynos nope, E = mc^2 if that says something.
 
A package of E is not matter.
 
@Abhishek Source?
 
Tele Vision
lemme get a web based source
In particle physics, antimatter is the extension of the concept of the antiparticle to matter, where antimatter is composed of antiparticles in the same way that normal matter is composed of particles. For example, a positron (the antiparticle of the electron or ) and an antiproton () can form an antihydrogen atom in the same way that an electron and a proton form a "normal matter" hydrogen atom. Furthermore, mixing matter and antimatter can lead to the annihilation of both, in the same way that mixing antiparticles and particles does, thus giving rise to high-energy photons (gamma rays...
 
@OmeidHerat He's right. Matter can't move at the speed of light, because of the Energy -> mass "transformation". As matter approaches the speed of light, the energy required to move at a higher speed is infinite.
 
go down to artificial production
 
Does the statement
> There are better server-side platforms for HTML5 then ASP.NET
Even need justification?
 
nope
 
@Raynos That is pure WTF.
 
2:51 PM
It's true by default :\
 
lol
universal truth eh ?
 
Why do .NET developers like to troll
 
same as why microsoft thinks its the unchallenged ruler of computer world
 
@Abhishek If Microsoft thought like that they would have been gone by now.
 
Seriously isn't it obvious that ASP.NET gets in the way of doing HTML5 ?
 
2:54 PM
they did
@Raynos is there any way to get the area of a filled path in canvas
 
suppose i make a shape which is very very complex and i want to calculate its area is there any way in canvas to do that ?
 
@Raynos Actually... I'm not entirely sure on that. Assuming you're using ASP.NET "controls", then you're getting things like divs and spans. Which, technically, are valid HTML5. You can then wrap them in section, article, header, whatever.
And then there's the literal control, which doesn't even bother writing HTML for you.
 
@Raynos latex.codecogs.com/gif.latex?\lim_{Speed\to%20c}E%20=%20\infty
 
And then, of course, you can skip controls altogether, and only use the server-side aspect of .NET, interfacing through AJAX.
 
2:59 PM
erm, that was supposed to work.
 
> Because ASP.NET get's in the way of doing HTML5 and HTTP, with it's massive leaky abstraction layer and it's habit to generate low quality HTML and JS all over your page. The sensible subset of ASP.NET is so small, that you might as well use a better tool.
 
@RyanKinal The point is, you have to actively go out of your way to avoid using features of ASP.NET to write a sensible website.
This means ASP.NET is a mediocre tool
 
@Amaan Messes with the latex commands
 
And it's not about valid HTML5, it's about semantic HTML5
 
3:01 PM
asp.net gets in the way of life.
 
@Raynos Meh. "ASP.NET: The Good Parts"
 
facepalm
 
It's about writing HTML5 that can be parsed by a screen reader and makes sense. and not treating it as web assembly
 
:-D
 
@RyanKinal ASP.NET has good parts?
 
3:01 PM
Not really. But it has "less bad" parts :-P
 
Room.tempTopic("ASP.net")
?
 
Seriously though, the ASP page model is broken
the ASP controls are broken
All you end up doing is using .NET
and ignoring everything in ASP.
I never said C# / .NET was bad. Nancy is a nice framework
 
@Raynos Truth
What about VB/.NET? :-P
Anyway, enough (partial) trolling. I have a meeting.
 
The point is, if your fighting against the tool so much then your doing it wrong.
Use a different tool
 
:|
 
3:03 PM
@Abhishek :|
 
You said "The point is, if your fighting against the tool so much then your doing it wrong.
Use a different tool" That solves my insane problem :3
use SVG instead of Canvas ^^ tanks
 
aight, I am off.
Peace out.
 
I'm thinking of making a small page as an introduction to js. The entire page will just be javascript code, with comments explaining what each bit does.
 
any geometry masters in here?
 
@rlemon I am about to go, but what is the question ?
 
3:12 PM
    Like:
    //the `var` statement is used to declare variables. no types are necessary
    var moooo;
    var fourtyTwo = 42;

    //multiple variables can be declared by separating their names with a comma ,
    var moo, fourtyTwo = 42, imSoLonely = true;
 
ok.. I have been searching google but can't find anything ... possibly if you could direct me to a good link that explains what I need would be great.

I have two points on a canvas.. and I want to animate an object traveling between them. I get the y=mx+b and I can do this all on paper but implementing it in code seems to be more tedious than I expected..
I always like to see how it's done right before I butcher the crap out of a common concept.
 
so you just need an object to travel from a to b?
 
well I need to be able to calculate the next step given current x/y and final x/y
 
@rlemon This was one of the first things I'd done!
Wait, I'll see if I can find it
 
@Amaan I started with BASICS then moved to translate ;) we all saw the outcome of that.
 
3:15 PM
you just need to get the angle and travel towards it
 
Even if I can't, it's simple right?
If you've gotten the y=mx+c just keep adding one to x, and calculate y
Animation done
Nope, can't find it now
@Zirak Go ahead and do that
Nothing explains code better than examples.
@rlemon I found some code I'd used to find the equation of a line, but since you've already done that, you probably don't need it
 
paste away.. I'm never opposed to seeing someone elses take on things.
 
@rlemon The code sucks, okay?
It's unreadable
I'd rather not post it
But basically, I find the gradient. Fill in the gradient into a point on the line that I know to find c and construct the equation
Then in my main loop, I add 1 to the x in the equation, find y and keep doing this till I've reached the destination
 
3:24 PM
" calculate the next step given current x/y and final x/y" - need one more piece of information - how far away is the next step? Is it 1 x unit away, 1 unit in the direction of the line away, or something else?
 
@Loktar Awesome! jsfiddle.net/rlemon/MJMGb I'll still probably try to learn how to do it using Math.atan((yThem-yMe)/(xThem-xMe))*180/Math.PI
 
@rlemon if u can kindly choose Math.atan2(y,x);
instead of Math.atan() :P
 
lol, clearly thats why I said learn how to do it using
lol. I have no clue as of right now.
0
Q: JavaScript Lexical Scoping and Life of Variable

Alex NabokovI was curious why this works: function doThis(){ counter = 0; return counter; }; console.log(counter); // returns "reference error: can't find variable" which makes sense, as the variable does not exist outside of the function. But if I make a function that self executes: (function d...

this is why you always var
 
posted on November 15, 2011

On 10th and 11th of May the second edition of Mobilism will take place in Amsterdam. Just like last year we’ll be informed about the current state of affairs on the mobile web from the world’s most renowned speakers and practicioners. For ample evidence, see last year’s session by Scott Jehl of jQuery Mobile. We’re also proud to announce Scott Jenson as a speaker. He h

 
bye i will bbl with some soap bubbles ^^
 
user1385191
3:48 PM
today in tyrannical, draconian rule news: eff.org/deeplinks/2011/10/…
 
@MattMcDonald asks for a zip/postal code but clearly only accepts zips
 
user1385191
"12345" is a valid zip code
 
yes but my valid postal code is not being accepted
 
00:00 - 16:0016:00 - 00:00

« first day (395 days earlier)      last day (4568 days later) »