« first day (363 days earlier)      last day (4596 days later) » 
01:00 - 19:0019:00 - 00:00

1:03 AM
@jskungfu yes, we know, it's become a problem we are dealing with currently.
@ryanmargheriti I believe it's planned for a 1.0 release cc. @jquerymobile
 
1:40 AM
jQuery 1.7 Beta 2 Released http://bit.ly/o8ENTr
 
1:55 AM
hi
is there a way to get these two borders wrap around the same width as the image ? jsfiddle.net/qcvbD/4
 
 
1 hour later…
3:18 AM
Hey, any of you guys ever deal with a Windows desktop gadget?
 
3:54 AM
@ErikReppen long a go I used them abit
 
4:09 AM
0
Q: Js - Append a value to element CSS

Salman KhanThis seems so simply yet its not working (undefined). I have set a var to <ul> which is a child of <div> element "feature_tabs_indicators". The pBoxShadowProperty function gets the BoxShadow property supported by the current browser. And the final statement merely sets the pBoxShado...

 
4:32 AM
mornin'
 
 
2 hours later…
6:05 AM
How do I change the color of all anchor tags in one motion? document.anchors.style.color = "blue"; ?
 
6:42 AM
document.body.className += ' mod';
body.mod a{ color: pink; }
 
 
3 hours later…
10:08 AM
1 message moved to bin
 
10:23 AM
@Zirak what?
 
 
2 hours later…
12:09 PM
Building that I work in is occupied by two companies, ours and the company that owns the building. The owner of the other company smokes in the back shop all of the time and it bothers some of the staff here. Problem is; no one wants to say anything and cause conflict with the building owner..
 
Sorry what
Public building, your office
they smoke you die
Send letters like "Hey I herd u liek cancer. SUE!"
I mean. cough
Smoking is not cool, but just handle it professionally
 
12:33 PM
Well I have avoided saying anything as I am a smoker (I smoke outdoors though) but one of the girls just finally went back and said it bothered her. Whether or not he'll stop is yet to be seen.
 
Hi
 
@rlemon: in the UK it's illegal to smoke in the workplace. It's a shame it's not like that in your country.
 
@AndyE it is... read the link i just posted .
 
@rlemon: then maybe you should report it ;-)
 
1:21 PM
So about this git. How do I make it deal with sub repos nicely
and by nicely I mean make github deal with them nicely
 
1:40 PM
0
Q: Storing page-specific javascript on an AJAX driven site?

Julian H. LamI have a general question about the placement of javascript code in a AJAX-driven web application. At a previous job, we tended to throw everything in one monolithic file called. When maintaining that file became too difficult, we split it up into multiple smaller files and "glued" them back toge...

 
Oh, there are going to be murders for this: JavaScript++
 
1
Q: How can I make the page scroll to an element?

IAdapterI would like to scroll to an element (make it visible for user) even if the element is on the bottom of the page. I tried document.getElementById('idOfLink').focus(); but if the element is on the bottom of a very long page its not visible to the user.

I love the easy ones sometimes
 
1:55 PM
@RyanKinal depends.
Its just another X -> JS compiler
and its a mediocre alpha
I claimed it had a dom-shim, I tried to steal it but it was not there
 
@Raynos I'm just getting tired of all these inevitably slower and crappier languages.
 
Depends
I havnt seen what it outputs
 
On the other hand, I will assume that's what people used to say about things like C and C++
 
I've been tempted to write a cross compiler myself
just to implement some parts of es:next I want
like new <Object>
and -> & =>
(function() {

}).bind(this)
Is really starting to annoy me.
 
Right, but the difference there is that you're not trying to implement classical OOP and freaking block scope
Function scope people. Learn how it works.
 
2:00 PM
@Raynos when would you use this ?
i mean , what problem is this solving
 
@tereško var that = this;
@RyanKinal not true.
ES6 brings in block scope
 
0
Q: AJAX driven "page complete" function? Am I doing it right?

Julian H. LamThis one might get me slaughtered, since I'm pretty sure it's bad coding practice, so here goes: I have an AJAX driven site which loads both content and javascript in one go using Mootools' Request.HTML. Since I have initialization scripts that need to be run to finish "setting up" the template...

 
Well ES6 mainly brings in things to fix /* var */ whyYouForgetVar = true
 
@Raynos ... so ES6 brings in things to fix stupidity?
 
@RyanKinal not really.
let thing = ...
block scope is nice
 
2:06 PM
I don't know. I think it's unnecessary
Although, I guess it would have a positive effect on memory use
 
It just makes code in for loops more elegant
 
I have a hard time believing that, actually. Especially in the case of loops, it seems as though having a function-scope variable available to access and change would be more efficient than re-declaring a variable on every iteration. I'd have to do some research to confirm that, though.
Although, maybe I'm changing your definition of elegant.
 
@RyanKinal ... thats a compiler thing
I assume that block scope variables are going to be faster then var in blocks
I just assume that var is a superset of let therefore v8 can make let faster.
 
Okay, I could see that
If that functionality is native, at least. If it's transpiled to the current version, I still don't see the point.
 
Of course transpiling is silly.
the point is it will be native.
 
2:20 PM
Howdy folks - any suggestions on why this learnsvg.com/tutorials/tutorialBasics/path.svg doesn't work under animation in chrome?
(click on animation to see the problem)
 
Nop. maybe bad code?
 
Works fine in firefox tho
 
read the source, find out.
 
super choppy for me in FF
haha nvm, my FF seemed to have acquired a new bug. Animations wont run unless my mouse is moving (this includes the little loading gif on the tabs while they are loading)
haha trying to take a vid of the bug and every time the vid captures a frame the animation jumps
 
2:39 PM
anyone have a good JS tutorial?
 
@rlemon yesterday was the last day of FF on my comp....it was using 1600000 K mem while chrome used 40 000 k
 
1.6 terabytes of memory?
 
@Dennis 1.6gb
k=>m=>g=>t
 
wow... can't read
 
2:43 PM
:P
 
But on a less obnoxious note, the MDN javascript tutorials are pretty solid
 
my chrome is bugged too. I need to install a new version. I don't know how, but on certain sites (jsfiddle for one) no external js files are loaded. anything in the script tags is executed but nothing external. I don't even know how thats possible.. but ohh well.
chrome 13
 
@rlemon ... you aren't running NoScript, are you?
 
nope
 
2:59 PM
@Raynos Look at the what MacDonald and I were talking about before I pinged you. It reminded me of something you once did.
 
@Zirak that's different
vows-is uses chaining to read like prose
it's basically my way of saying "normally I would use DSL with a full parser but I'm lazy so replace space with ."
 
It's still a bit unclear what the hell is going on, what's related to what, etc.
It was a nice try, and I'm a fan of chaining, but I'm a bigger fan of readability
 
I assumed you made a stab at my vows-is thing
Its not readable? :(
 
It's less readable
 
It's pretty awesome when I have to check on the status of my boss's projects.
 
3:07 PM
Switched back from Chrome to Firefox :D
"HTML5 Dev Conf: ECMAScript.next - The Future of JavaScript with David Herman of Mozilla "
Watch it!
 
Whenever they speak of the future of js, I fear that they're either going to turn it into a bastard spawn of Ruby and Java or just turn it into Java
Dart isn't helping. People will actually use it.
 
No worries. The new features are soooo cool.
 
gulp
 
for instance function ( a, b, ...other )
 
@Zirak its not that bad
I've been following es-discuss
and also pushing them in the right direction
es-next is going to be useful
 
3:12 PM
or... var obj = { [ prop ]: value }; where prop is a string.
(when dynamically creating property names)
 
Ugh I dont like that one
I do like proxy
And I like <| and .{
 
Boss just asked me to pull a function from a legacy program that converts some data and make it a stand alone application.. Should I be afraid that the first comment in the c file is "last modifed 12/7/99"
 
haha yes!
jesus I wouldnt pull that out
 
Hm, some people still write JavaScript as if it were '99
 
I dont like these ai-class questions >_<
too vague
 
3:21 PM
@Raynos RUBY BEGONE
 
@ŠimeVidas i'm re-writing it in c#
 
proto <| {
  "mymethod": function ()  { }
}.{
  "myProperty": "trolls"
};
 
@Raynos What does the dot do?
 
See!? That's exactly what I'm saying!
 
foo.{ "lullz": "wut" } === Object.extend(foo, { "lullz": "wut"})
would you rage if I said we have this too :
 
3:25 PM
I don't see the code's intent, I just think "what the hell are these weird thingies? 'lesser than binary or'? What it do? And what's that weird dot do?"
 
{
  mymethod() {
    console.log("trolls");
  }
}
@Zirak l2js l2es6
 
Something broke inside of me
 
That last one is usefull
 
fail?
 
The arrow odditie was better than omitting the function keyword altogether.
 
3:27 PM
@Zirak only in literals
 
Still
js is already riddled with special-cases (see: function declaration/expression and friends)
 
@Zirak es-next is opt-in
 
Now we have another one! Implicit function declaration/expression!
 
dont want it, dont use it.
 
Yeah, but other people will. And I'll have to read their code
 
3:29 PM
Again
Its just more to learn
 
I already see "Good Parts 2"
 
But it's retarded
 
have you tried learning coffeescript
coffeescript has a shit ton of syntax in there
btw <| has value
<| is the prototypeof operator
and LHS <| RHS
Is the same as :
 
@Raynos No, I already hate Ruby.
 
var prototypeOf = function prototypeOf(LHS, RHS) {
  RHS.__proto__ = LHS;
  return RHS;
}
However the RHS has to be a literal expression
 
3:30 PM
I don't exactly care about new features. I care about the unclear syntax they bring along with them.
 
because mutating the [[Prototype]] of existing objects is evil
@Zirak I do care about new features
they are features I want
So either you learn some obscure library I write to do it
or you learn the syntax. At least the syntax is standardized.
yes there's a lot of there, yes it's a big change. But its not too hard to learn
 
@Raynos Wait, we'll be able to set the prototype links of existing objects? Like obj1 <| obj2;?
 
What's wrong with making a method to do it? Like Object.prototypeOf. It's the syntax I hate
 
@ŠimeVidas no because obj2 is a literal ([1,2,3], { ... })
 
“Knock, knock.”
“Who’s there?”
very long pause….
“Java.”
 
3:32 PM
@Zirak Well we need syntax because RHS is a literal
 
Aha, RHS has to be a literal...
 
var SubArrayFactory = function(...args) {
  return SubArray <| [...args];
}
@Zirak the same with class and I dont mind class that much anymore.
 
3:51 PM
I was just trying to switch my tab in Chrome and then I realized I had Firefox open in front of it and I was just clicking on the transparent title bar. Thought it had crashed at first. *facepalm*
 
lol
 
Cross-browser testing is enough to drive anyone insane. I've never had IE6 open for so long in my life.
 
@AndyE why you no automate
And by automate I mean either get the computer to do it or get the code monkeys to do it
I also mean please write an awesome cross platform browsers testing thing, preferably open source and something I can send HTTP requests at with "test this file on these 20 browsers"
 
lol
CSS3PIE itself introduces a few IE6/7 problems.
 
user1385191
looking at its js file right now
 
user1385191
3:56 PM
sure does a lot of sniffing
 
Yeah, there are few VML rendering differences between IE 6,7 and 8 that are difficult to deal with without sniffing.
I was thinking that, since the site layout is fairly static - nothing from the main layout "moves" after loading - I might just copy everything PIE generates and dish it out from the server for IE < 9. That way, JS isn't required to use it.
 
4:29 PM
anybody knows a cross browser WebAudio implementati0n?
 
4:42 PM
meh
i am doing it MoZ only then
 
what are possible reasons why I would get the error Uncaught ReferenceError: $ is not defined?
I had working code, I pasted it into another file of code and now i get that error
its $ for the window.load
 
can u make sure taht u have the <script src="js/jQuery.js">is in place and the location of jQuery.js is correct
 
@Abhishek there is one.. trying to think of what its called
sound manager 2
 
@Loktar its flash :(
 
I thought the new vs would fall back to flash
 
user1385191
4:55 PM
yes
 
> HTML5/Flash API switching is transparent, handled internally
 
user1385191
(web) audio is basically plugin dependent anyways, so it's flash or something like quicktime
 
yeah, I really want a standard
 
me too
i am trying to develop a media player visualization (now thats for andriod where everything goes fail)
andriod browser i should say .
 
secret project
only works in mozilla
the music is the seed for it
ships/bullets/patterns are generated from that seed
your shooting is controlled by the tempo of the song
still a WIP
I need to finish it up, but yeah the audio API is really cool imo, I want to convert that to use soundmanager2
 
5:01 PM
+1 +1
i saw nihilogic doing some insane job with SoundManager and mozAudio api a while ago
 
yeah some really awesome stuff
the 3d weird cubes/terrain thing?
 
oh cool
 
yeah thats pretty cool
 
5:06 PM
:)
btw ur stuff is pretty catchy (xD)
i sooo wanna play it
 
yeah I really need to finish it but who knows if I ever will
got the idea from Audiosurf, great game, generates tracks based off of music
 
:D
 
user1385191
audiosurf's UI is extremely sloppy, though
 
yeah I agree
 
Hello everybody
 
5:11 PM
hey
 
@Abhishek that is awesome
 
anybody like to check out my page, which is completely self-written (I think I'm still a beginner) in PHP/JS and mind telling me what I could improve? especially concerning lagishness?
laggish-ness
the url is www.dinomuhic.com
 
@Cletus i like it. site looks good.
 <script src="http://www.google.com/jsapi"></script>
 <script type="text/javascript">

     google.load("jquery", "1.5.0");
  google.load("jqueryui", "1.8.9");

    google.setOnLoadCallback(function() {

    });

 </script>
that appears to be the cause of your 'laggy-ness'
 
oh okay...never would have thought of this...why exactly?
 
lol it's a joke. don't use jquery. :P
but if you must link to it directly. Also don't use inline js, a href="javascript:;"
 
5:18 PM
Ehm
loading jQuery takes time
you need to send a message to a remote server
it needs to send you the jQuery file
You need to parse and run it.
 
i would think having the google api loading jquery would be slower than just loading jquery with a script tag
 
Hmm
 
The same for jQuery ui
 
hey i just found something intersting
whenever i leave this chat in background on firefox
 
oh so it would run faster loading it from my own server
 
5:20 PM
the browser dies -_-
or hangs .. any clue why ?
 
@Cletus probably not
however the google library itself is an overhead
 
well I use Jquery for the cleaner AJAX calls and especially for all the animations
i can help myself Im a motion graphics artist, graphics need to move :D
*I can't
 
you have this kinda stuff all over your code.
$('.bgbutton').imghover();
$("#shoutboxmaxer img").imghover();


$("#shoutboxmaxer").click(function(event) { event.preventDefault(); $("#asb_contentwrap").slideToggle(); $("#asb_inputwrap").slideToggle(); $("#shoutboxtext").toggle(); });

$("#shoutboxtext").click(function(event) { event.preventDefault(); $("#asb_contentwrap").slideToggle(); $("#asb_inputwrap").slideToggle(); $("#shoutboxtext").toggle(); });
you can use a comma to seperate selectors, $('.bgbutton, #shoutboxmaxer img').imghover();
$("#shoutboxtext, #shoutboxmaxer").click(function(event) { event.preventDefault(); $("#asb_contentwrap").slideToggle(); $("#asb_inputwrap").slideToggle(); $("#shoutboxtext").toggle(); });
 
user1385191
general tips when using jQuery:
 
ololol.
 
user1385191
5:23 PM
1. keep selection minimal
 
ugh, all of that is just one big fail. I didn't look at what was in the contents of the click .
 
user1385191
2. cache $ objects in variables
 
user1385191
3. use document.getElementById(id) for id "selectors"
 
If you've got time to learn how to do it properly then dont use jQuery
 
5:25 PM
@rlemon: Im no programmer or coder, I did this all without real knowledge by just combining things and trial and error.
 
+1 @Raynos
@Cletus ... whoa
 
i have to work on my page during my holidays when Im not working
 
@Cletus than thats your problem. Learn what the code you are writing does and means.
 
@Cletus what are you after a job in design/art or development?
 
@Cletus it really depends, is the code a means to an end, do you plan to do any more coding?
 
5:26 PM
so time=money but I like coding this stuff, finding errors and trying to solve problems
 
if its design/art its badass.
 
Do you want to learn how to do the coding
 
and I wouldnt worry about it
 
from what I can see if you reduced the number of DOM calls you would increase your speeds greatly.
 
i have a general knowledge of how code works, I know what it does, of course not everything, but everything whats in my page I do understand otherwise I wouldnt know how to change it so it works for me
 
5:28 PM
:| for somereason this part of code aint working atall -_-
 
@Matt thanks for the tips, I'll definately look into it
 
ctx.clearRect(0,0,w,h);
 
I really need help I am STuCK!
I got my HTML here:


<form>
<select name="users" onchange="showUser(this.value)">
<option value="">Select a person:</option>
<option value="1">Achau</option>
<option value="2">Ravi</option>
<option value="3">Justin</option>
</select>
</form>
<br />


<div id="txtHint">
<b><table>
<tr>
<th>Email: <div id="email"></div></th>
<th>Number: <div id="number"></div></th>
 
user1385191
there are some "jQuery speed tips" slideshows out there
 
then my AJAX:


function showUser(str)
{
if (str=="")
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    var myString = xmlhttp.responseText;

var mySplitResult = myString.split("*");
 
5:29 PM
@Nadal aaaahhhh make it a SO question man
 
@Matt thanks
 
@Nadal - why are your tr elements outside of a table?
 
I did but people are just recommending JQuery and I am getting more cofnused with JQuery
 
user1385191
[something about vague questions and how they get ignored]
 
user1385191
imagine yourself walking on a busy street
 
user1385191
5:30 PM
something has gone horribly wrong, and you throw your arms in the air, exclaiming "I CAN'T DO THIS! NOTHING WORKS!"
 
rawrrrrrrrrrrrrrrrr my ctx.clearRect aint working -_-
 
user1385191
imagine if you had been more detailed with your frustration
 
lol
 
user1385191
for example: "MY BOSS IS TERRIBLE—HE HATES ME!"
 
how it currently works is once you choose an option from drop down, using the showuser function it adds user email and name into a div
 
user1385191
5:33 PM
you might get sympathetic tips from people in a similar situation
 
that whole process is fine
except I am trying to make the information added into the div removeable
what happened to SO's image option beside send....dont see it anymore
 
@MattMcDonald what would u say if a straightway ctx.clearRect(0,0,w,h) dosnt works as expected (with no errors on firebug) ?
 
Second tip: Chat is horrible place for code. There's always pastie.org
 
user1385191
@Loktar is your man for canvas-related stuff. I have zero experience with it.
 
@Cletus ok, i'm sifting through your code and the #1 thing I can see about performance is the amount of DOM calls you make.

If you are going to $("#someID") more than once in your code block / function you should store that in a variable

take for example
	$("#shoutboxtext").click(function (event) {
		event.preventDefault();
		$("#asb_contentwrap").slideToggle();
		$("#asb_inputwrap").slideToggle();
		$("#shoutboxtext").toggle();
	});
should be
var shoutboxtext = $("#shoutboxtext");
	shoutboxtext.click(function (event) {
 
5:35 PM
@Loktar what would u say if a straightway ctx.clearRect(0,0,w,h) dosnt works as expected (with no errors on firebug) ?
 
actually thats a bad example the last line could also be this.toggle();
 
@rlemon thats caching right?
 
but i hope you get the idea.
 
@rlemon you honestly think thats going to make a difference? jQuery will do the same he does internally, it might be marginally faster
 
@rlemon yes I do, was just going through some websites about Jquery caching
 
5:37 PM
What makes a real difference is the amount of drawing you do and using dom fragments
 
 
@Raynos, he is not adding much to the DOM. he is not storing ANYTHING in local variables.
 
thats what happens when you choose an option from dropdown...the data is fetched from MySQL
 
user1385191
ok, so you want a remove button beside each row?
 
but what I am trying to do is add the functionality of removing the people
yeah
 
user1385191
5:38 PM
add a button to each row as a new column
 
user1385191
give it an onclick handler
 
and if choose one person from drop down that person is deleted from drop down until user clicks remove on the display person's name then they are readded to drop down
 
@rlemon I hope you are right bcs you dont know what my getwork.php does I'm afraid
 
I am definately going to invent libiyan Yuri's psychic machine so we can understand each others thoughts without words ^_^
 
but this is another quest, first I think I will need to learn the caching of the objects
 
user1385191
5:42 PM
function buttonClicked()
{
	var row = this.parentNode, section = row.parentNode;
	//this:		section.removeChild(row);
	//or this:	section.deleteRow(row.sectionRowIndex);
}
 
also, it might not make a difference for you but i've found that if statements do run faster than switch case (when the number of cases < 10-20) however this goes against what i've read about switch/if's
 
user1385191
and please use thead, tfoot, and tbody elements
 
user1385191
the less magic browsers have to do to make your markup correct, the better
 
@rlemon you probably mean my switch (katcheck)
 
switch/case is what i meant. and yes that is in reference to EVERY switch statement you are using.
that is a MINOR issue, but good to know for future dev.
use if's
 
5:46 PM
yes definately good to know
 
crap sorry was afk
 
I always thought using if too much is a "poor" way
 
@Abhishek what are you trying to clear?
 
@Cletus well its not really caching
 
user1385191
using multiple nested if statements can get messy
 
5:46 PM
its just using variables and not repeating yourself
 
so my understanding of caching is not correct
right?
 
caching is a higher level thing really.
 
i dont get why people on SO question keep suggesting using JQuery for my whole AJAX requests and DOM manipulation when I already have it, why on earth would I want to waste my time redoing something I already have just because its JQuery...
 
Caching is done for you in the background
what your doing is a form of manual caching
its uncommon to use the word "caching"
 
user1385191
> The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. (on nested statements)
 
@Abhishek using any transforms or anything?
 
user1385191
I like that the linux guys agree with me on function braces
 
damn, will be back in 20 minutes
sorry, food's coming
 
@MattMcDonald 7 is not that bad
 
user1385191
all you have to do is toss off the logic to helper methods
 
5:52 PM
not really
I'm using closures
I can save one level of indentation with helpers
 
@Raynos // TODO: Fix indentation
/me wins
@MattMcDonald tabs are 8 characters like it's the 90's. I think when tabs are 4 characters, 6 levels of indentation are perfectly acceptable.
 
omfg. I just found the following in a page my coworker wrote:
•	The student will learn to distinguish between an appraisal and an appraisal report<br />
Yes. The '•' is actually in the source
rage
 
@Cletus I have re-written a small function for you.. it's an improvement, still not perfect.
var handleResponse = function(data) {
    if (!data) {
        return;
    }
    var runAnimation = function() {
        var videomenue = $("#videomenue");
        videomenue.animate({
            "top": "0px",
            "left": "0px"
        }, {
            queue: true,
            duration: 1
        });
        var delay = 500;
        if (!menueclosed) {
            delay = 200;
            videomenue.hide(200);
        }
        videomenue.html(data).show(delay);
        menueclosed = false;
 
lol @RyanKinal
lists are still so new! Not his fault! :P
 
This was written on Sept. 20th, 2011 :-(
 
6:04 PM
haha yeah I was being very sarcastic.. thats pretty terrible man :?
 
@RyanKinal Everyone I work with copies and pastes. The date hardly ever matters.
 
@JimSchubert Copy and Paste are very much part of the workflow around here too. It makes me angry sometimes.
 
@RyanKinal My wife watched me coding for five minutes a couple weeks ago and she was like, "You know all of that stuff? I thought programming was just knowing where to look for the answers and copying and pasting."
 
1
Q: Efficient Binary Search

Oliver MorganMy implementation: Array.prototype.binarySearchFast = function() { var s = a.length, h = s-1, l = 0, m; while(h > l) { o = a[l], m = (((c-o)/(a[h]-o))*(s-1)) >>> 0, v = a[m]; if (a[m] === c) return m; else if (a[m] < c) l = m + 1; else h = m - 1; } } Normal...

 
lol
 
6:16 PM
@rlemon wow thanks I have to see what you did there
 
Tom
6:47 PM
Can one embed images in Github issues?
 
You should be able to reference an image using markdown
 
I've done images in readme files, just never issues.
 
01:00 - 19:0019:00 - 00:00

« first day (363 days earlier)      last day (4596 days later) »