« first day (648 days earlier)      last day (4295 days later) » 

6:00 PM
AHA.
 
hehe... finally they stop supporting windows ^-^
 
Probably because I never had to fix bad code or get something working in IE 7 quickly
 
now for the rest of the world...
 
Problems with textContent and innerText are something about spaces and newlines, right ? Can easily be worked around without a whole library
 
my cat is head-butting everything and doing the motorboat
 
6:04 PM
My digital photo frame shows a moving glider
 
@copy yes, this can easily be worked around without a whole library, like a lot of others little things
so you're making your own library after some time
XHR can also be worked around without a whole library
I'm not saying you shouldn't know what's working behind your library
just that a library is very convenient, especially with the variety of browsers out there
 
You shouldn't use these libraries, because their apis are so bad
 
(besides, jQuery's API is, albeit discussable, quite nice.)
 
man this got derailed. Can we focus on me and my problems lol
 
you have a problem?
 
6:07 PM
JS chat? Derailed? Blasphemy.
 
hehe
JS chat is probably the best room in the SE chats.
 
^
mainly because it's with js ;D
 
@FlorianMargaine At that point our opinions differ
 
I know :p
 
very much so. I'm trying to figure out to make only the boxes underneath the hovered box move down instead of having to reconfigure the entire structure. Check this out. jsfiddle.net/YD7GU
 
6:08 PM
that's why I said "albeit discussable" :D
but the all arrays DOM thingy is really nice
 
with all those same divs in the html, why not dynamically add them?
 
@PolluxKhafra like, the boxes underneath should go down instead of on the side?
 
if that's what you want, you will have to put them in their own divs
per column
 
@FlorianMargaine Right because if a box gets re positioned on masonry reload then it's no longer hovered. So when I hover a box and it expands I only want the boxes underneath it in its column to move down.
 
@Abhishek just committed an example API using a db for the models, not working yet, but this is how it will work
 
6:14 PM
@PolluxKhafra masonry is causeing the divs to scoot around
 
@PolluxKhafra jsfiddle.net/rlemon/YD7GU/1 this should get you started.
 
@rlemon ahhh Genius!
 
idk if .stop(true).animate is the correct way to deal with this but jsfiddle.net/rlemon/YD7GU/2
 
I prefer the other :(
 
the other is querying each action >.>
 
6:18 PM
it's funnier.
 
so if you hover one box twice, it does the action twice
isn't it though? ;D
 
unless you use the jsfiddle reset css you will need to also add .grid, .boxes { list-style:none; }
 
I was doing what rlemon did, but got distracted by the bouciness .-.
 
@rlemon how can I get columns around the boxes though if I'm producing them with a loop?
 
don't forget to add 'margin-right: 1px;' to the column's css! :O
do a loop inside a loop
for (x blah) {
for (y blah) {
}
}
for (x blah) {
// add the column start tag
for (y blah) {
// add the boxes per column
}
// end the columns
}
this edit timeout is ridiculous >_<
 
6:22 PM
gnight ppl
 
night
 
@rlemon Cuz my loop just produces 50 boxes with php so I don't have a chance to wrap certain items in a column hmm.
 
eww... php
why not producing the boxes with javascript?
I'll make a fiddle :/
 
@Tgwizman too late
 
6:29 PM
hi all,
 
hey :)
 
first time in a SO chat.
 
cool!
 
you probably did yours better anyways xD
awesome! :D
NOPE! >:D
 
@rlemon scary stuff. gonna take an hour to figure whats goin on there.
 
6:30 PM
mine is short, sweet, and to the point ;)
use mine :D
 
@Tgwizman mine teaches and does not mash fucking strings into the dom with innerHTML
:)
 
it's not fancy, but it does the exact same thing :P
xD
you're just jelly ;)
 
and I would bet mine does it a few times faster :P
 
yeah... by a few milliseconds -.-
 
performance is performance. :P
 
6:32 PM
so unless he does it a billion times in one second, it's not going to even be noticed by the end user
 
Im with rlemon lol
 
...
his code is longer... puts more in the cache >:I
actually... WAIT
my code would be faster :D
you have to create all the dom objects a bunch of times ;D
mine is made once it's done, causing the dom object thing to only be called once :)
this is correct, no?
 
no I append to the DOM once
reflow is only triggered once
 
o
 
the line document.body.appendChild(grid); is the only time i trigger reflow
 
6:37 PM
you make a valid point :S
but what about the objects?
you are loading many objects into it, where as I am only throwing source into the html
 
@rlemon // I know that was some scary javascript... back to the jQuery.trololol
 
the difference is yours is a string which has to be parsed and then stored in memory as DOM elements... I create the elements and just pass them in. mine is a little more verbose to write but it does less ops.
 
ahh
I learned something new today :)
 
however for producing LARGE amounts of HTML - sadly they have beefed up innerHTML and it is faster... for this case not so much
and this is not true in every browser.
 
@rlemon any chance you want to look through the source of a game I made, and tell me what I can shorten or make better? It's only a few hundred lines and most are just the function syntex
 
6:40 PM
maybe later.
 
cool, thanks :D
want the link now or later (if/when you decide to)?
 
past the link ^^
 
welp opera is still broken with text simonsarris.com/misc/scaleText.html
more than a year later :(
@Tgwizman canvas?
 
yup
 
I'd love to take a look
 
6:45 PM
I'd rather not control a bunch of divs and have to deal with the css behind it all >_<
only works properly in chrome
I plan on making a thing that tells the user that it only works in chrome
 
canvas is the way of my people
 
;D
 
I will take a look when I get home
 
Should my page stop loading after a successful transaction if I use a synchronous XMLHTTPRequest
 
probably
wait... maybe not
 
6:48 PM
lol
 
it might continue to load :S
 
I need to start another one, but its causing problems because it keeps going
 
just ignore me when it comes to XMLHTTPRequests... I suck at em >_<
 
I hear ya, I am just starting with them, so I suck too
 
never used them because of the cross domain deal
I just use my friend's version of jsonp to get the source of other pages
it works like a charm ^-^
 
6:50 PM
Luckily I am pulling stuff from an XML file on my server, so I don't have to get too complex just yet
 
:P
 
@atomSmasher what are you trying to do because synchronous XHR is kinda a red flag.
 
xD
 
@rl
@rlemon let me compose my page so it's not a mess!
 
gist.github.com/3090947 stupid onebox GISTS SHOULD NOT ONEBOX
 
6:52 PM
:P
LOL! "tifa\'sBoobs=huge"
 
In the head of my HTML file there is a init() function that populates a drop down from a XML file. After the first dropdown populates (which works ok so far) another dropbox will be filled depending on whats selected in the first box. If I use async the first box doesn't fill. But if I use sync it works with no problems. I used sync for the first call because everything on my HTML page is based off of the information pulled from the first request
 
why not have a function determine when it's loaded, then store the loaded stuff, then call the other function to fill the drop down box?
no need for sync there
brb
 
hmmm
I am going to create a question so you can see my mess
 
go for it :)
does anyone else hate it how random people comment on your question saying is a possible duplicate of "such and such question", then link it, and it's not even what you're asking? -.-
 
7:09 PM
@Tgwizman what is that email about?
 
I commented on your trololol gist, thinking it was something to constantly alert you, then I took a second look and relized I was way off, so I deleted the comment xD
 
xhr.send( 'tifa\'sBoobs=huge&your%20mother=insulted' );
You're a bad boy
 
;)
 
Really bad boy
 
he forked that, you know :P
 
7:11 PM
I know
It was not for rlemon ^^
 
so, who here is disgusted by the fact that tons of people support flash over javascript (other than me)?
 
But, if I ping MoustacheGuy, he surely will make a 4 lines long sentence explaining how cool he is and how a moron I am
 
do it ;D
 
tons of people also think justin bieber is awesome. this is the world we live.
 
Which is what you deserve
 
7:13 PM
Thanks @copy
 
@rlemon agreed
 
De rien
 
7:26 PM
really nice GPL trolling
 
for a flash game, I have a quite the respect for this one newgrounds.com/portal/view/598977
someone needs to make something this big using js :D
if someone did the graphics, I could do the game engine :)
 
Not working, jQuery unit test fails when I use code above. — portoalet 4 mins ago
Oy.... ^^^^^^^^^
 
another reason I refuse to use libraries .-.
 
@Tgwizman also I refuse jQuery unit tests lol
of course it wont like that lol
 
xD
I'm setting a new goal for myself
To make a large game that will prove the worth of javascript to the game industry
and hopefully have it featured on Kotaku
 
7:34 PM
@Tgwizman Good luck.
 
thanks :)
I'm defiantly going to need it .-.
I feel like I'm using the wrong word :S
I want to say definatly
 
luck is needed to make it successful, skill is needed to make it well
 
but that always gets thrown as a spelling error
I have the skills... hopefully, but lucky (if it exists) is something I will need on everything
 
it is definitely
 
ohhhh
curse the hickland I live in -.-
 
7:37 PM
defiantly means you are going to do it even though sometime told you not to
 
yeah... that's what I though :l
 
(basically)
 
Only in the PHP room would this get two stars:
in PHP, 5 hours ago, by SomeKittens
Actually, "makes small children bleed" is a known issue with PHP
 
O_O
 
I could see the c++ lounge starring anything bashing PHP
 
7:44 PM
but they wouldn't star stuff bashing C++
 
I wouldn't be so sure, I think I have seen it before. Let me take a look.
 
@SomeKittens same here ?
 
Well I found Cat plus plus saying C++ is terrible but better than obj-c
 
@copy Eh, I can see that. We bash jQuery which is all JS anyway.
 
And C++ers don't like C++ at all
@SomeKittens jquery is just a library with an awful api and bad dom abstraction
 
7:52 PM
@SomeKittens I think here it would have get ten in 1 minute.
PHP guys have sense of humor
wow
 
Does anyone here have experience with SignalR?
 
My only experience with it is a 404 when going on the website (signalr.net)
 
8:18 PM
no 404 here boss
 
@rlemon - Any way to make this work?

function reset( obj ){ obj = []; }
var data = [ 1, 2 ];
reset( data );
 
1
Q: New at jQuery, lack of structure

ViktorMy job required me to learn jQuery the last couple of weeks, but it's a mess and I do not know how to structure my code in an acceptable manner. I come from a Java and PHP background and have never touched JavaScript before. I've searched the web for some guidelines, but I could not find anythin...

 
Do people just ping their random questions to the last person active? or is there a reason you're asking me specifically?
 
I consider you an authority on javascript
 
Ha
 
8:19 PM
ahahaha, good joke *ducks*
 
So if there is something that I can't find in google or in an SO question I usually try to ask you :P
Can an object be accessed by ref like that in javascript?
 
no
 
bummer
 
well not that way at least.
 
Is there a workaround?
 
8:21 PM
what are you trying to do anyways. usually there are case specific workarounds.
 
Well I have a complex json model, and I am filtering it. I am holding a copy that I want to reset when the filter takes place:

function FilterModel( FilterObject, FilterKey, FilterValue, FilterData )
    {
        FilterData = [];
        for( var items in FilterObject)
        {
            if( ContainsKeyValue( FilterObject[items], FilterKey, FilterValue ) === true )
            {
                FilterData.push( FilterObject[items] );
            }
        }
    }
 
@ThiefMaster well i'm def not the worst... in fact I would give myself some credit in my skills.... however I would not in a million years ever consider myself an authority :P
FilterData is now global? huh
Y U NO var
ohh nvm - got that now
 
It is being passed in
 
its amazing.
somehow its relevant
 
lol
 
8:24 PM
@TravisJ easy - you may not like the solution however
 
 
lol
 
Build a new one, return it, and then overwrite the calling one with the returned one ?
 
var data = ... some data....
data = FilterModel(filterObj, key, val, data);
and in the function return FilterData;
 
hi all. jquery question (plz don't kill me). using the media plugin and cycle plugin by malsup together to make a media slider with video support (non-HTML5; needs to support wider audience). i'd like the fire the ".cycle('pause')" command when a video starts playing, and the ".cycle('resume')" when it's done. are there any viable methods for making this happen?
 
8:26 PM
I was hoping you knew of some uber hack for it :D Ah well, thanks I guess I will just do that. If I find another way I might show it and see what you think
 
passing it keeps a 'new one' in the scope of the function so you don't need to do anything there.
 
thanks!
 
function FilterModel(FilterObject, FilterKey, FilterValue) {
    var FilterData = [];
    for (var items in FilterObject) {
        if (ContainsKeyValue(FilterObject[items], FilterKey, FilterValue) === true) {
            FilterData.push(FilterObject[items]);
        }
    }
    return FilterData;
}

var data = ["some", "data"], // this is an array ;) {} is an object.
    key, val;
data = FilterModel(data, key, val);​
there this is probably what you want
 
8:44 PM
how did you do the code? @rlemon
 
a sprinkle of crushed unicorn horn and some rams blood.
 
.-.
 
please explain : "how did you do the code"
 
ohh... you have to set each line :l
I knew it was with graves, but I didn't know how you did the formating
 
how did I format the code?
nono no
 
8:46 PM
I figured you could just encase more than one line :P
 
multi line text can only be formatted using CTRL+K (or once you have multi line text a little 'fixed font' button appears on the right)
 
oh?
 
`see this is

multi line`
however after I
                       random indent to prove it's code
type this I hit CTRL+K and I get this
once any chat message gets a hard line break it will not format unless you use fixed font or CTRL+K as a shortcut
and only then, you only get code formatting
 
why is that?
 
**I cannot do this**
and drop to a new line and expect it to parse
idk, hard to parse i suppose?
 
8:49 PM
not really .-.
it's a simple \n
 
not always
 
or \n\r
however the server reads it
 
either way - this is how it works.
5
Q: Chat Easy Input Tools - Provides keyboard shortcuts for common text formatting commands

rlemon About Provides keyboard shortcuts for common text formatting commands, reducing the dependency on mouse usage. Current version does not have a configurable set of hotkeys but later versions will. How to use. All of the following commands are run if the user has focus in the chat input area. ...

 
thanks :)
 
makes formatting a little easier.
 
8:51 PM
who owns stackoverflow?
 
well Jeff atwood and someone else Joel something
Jeff is no longer active (is and isn't)
 
Technically Fog Creek Software, right?
 
is there set ranks?
 
ranks?
 
such as admin, moderator, etc
I though I read somewhere that the reputation controlled that
 
8:54 PM
er, sorta
 
it's a organic community
 
based on what you can do
 
we vote
 
mhm
 
High-rep members are virtually mods
7
Q: What's the difference between a moderator and someone who has access to moderator tools?

SomeKittensSomeone with 10,000 rep has access to the moderator tools. What's the difference between them and a moderator?

 
8:55 PM
@SomeKittens w00t. you betcha :-P
 
stackoverflow once it grew became part of the stackexchange network of sites. stackexchange is nothing more than a network of QA sites built on the platform originally designed for use on stackoverflow. then they created area51.stackexchange.com for people to suggest and develop new 'sites' within.
I'm not sure how the first mods were chosen but now we all vote: and tool access/ special permission are given to those who have achieved a certain amount of reputation (actually they are unlocked sequentiality as you gain rep)
 
I sort of knew the basics behind the nature of these sites, but did jeff code all these?
 
Jess and Joel were the brains behind Stackoverflow - they built a 'system' and got some maintainers and watch it grow.
 
the engine *
 
no they didn't code it all by themselves.
 
8:57 PM
ahh
 
engine is over used. the engine is ASP.NET MVC
;)
 
...
definitions very per person
 
yes this site is built on ASP.NET MVC
 
mhm
 
@Tgwizman so why correct me when I used 'system' and you prefer engine :P
 
8:58 PM
it's all just a man made classification
I corrected myself, not you :P
 
codinghorror.com/blog that is Jeffs blog
 
my timing was off
 
he talks a lot about the inner workings
and some random rants.
blog.stackoverflow.com or blog.stackexchange.com (they both point to the same blog)
 
I'm surprised! I've seen that site before, but never really looked into it
 
ahh screw it
 
9:11 PM
* loves rants *
especially that win8 rant :P
I really feel like websites need to make a formatting standards change
they are all the same, with minor differences
 
Hi all ^_^
 
jsfiddle.net/nmKF9/6 Hi, i'm trying to post a value on a server page. but no success
 
9:33 PM
Anyone know of a quick primer on Agile development?
 
9:46 PM
@FlorianMargaine i was talking to some other guy and he mentions I help a lot with boilerplates
 
@rlemon - I got it working, but it does not work very well ( accessing byref ). The reason it fails is that it cannot differentiate between copies - so if there are two of the same object it wipes them both out ( or only one of them if a conditional break is used ).

function reset( obj ){
for( var all in this)
{
if(this[all] === obj){
this[all] = [];
}
}
}

var data = [ 1, 2 ];
reset( data );//works

var moreData = [ 3, 4 ];
var otherData = moreData;
reset( otherData );//fails

any ideas?
 
[test]
 
[tag:test]
 
@TravisJ no, I try to show you how to format the code on chat. Well , I forget it now. can you tell me how to format source code here.
not really work now with CTRL + k
 
I was wondering if anybody has experience with using any of the Javascript MVC frameworks (Angular.js, Ember.js, Backbone.js, Batman.js, etc.) in an animation-heavy application? I was reading through a conversation on the Angular.js email list which stated it may not be best for animations. I'm very comfortable with jQuery so if any of them allow you to plug in jQuery animations then that would work too. Appreciate any tips!
 
9:54 PM
You can push up to edit your last comment (assuming that too much time hasn't elapsed), it was only for one function and it is simple so I didn't go back and edit it to have the spacing in there. I am sure he can tell what is going on there. Moreover, I try to avoid multiple edits when a ping is used because constantly pinging people as you edit gets annoying.
@Aleross - Do any of them use a single base timer? That is what I would look for because it runs very fast when all timing is derived from one timer. jQuery doesn't and multiple animations can begin to run slowly.
 
@TravisJ you don't want to access byref, you also don't want a bunch of globals. just accept that this is the way it is done in js :P
1 hour ago, by rlemon
5
Q: Chat Easy Input Tools - Provides keyboard shortcuts for common text formatting commands

rlemon About Provides keyboard shortcuts for common text formatting commands, reducing the dependency on mouse usage. Current version does not have a configurable set of hotkeys but later versions will. How to use. All of the following commands are run if the user has focus in the chat input area. ...

 
lol, oh well, sometimes fun to try to bypass convention :D
 
but this will (likely) hurt you in the end.
do it up both ways and test the performance
prove me wrong :P
and you should be using object.hasOwnProperty
 
Yeah, parsing the window object is intensive and definitely does not perform well.
 
@Travis
 
10:00 PM
in what fashion?
 
oops... @TravisJ that's a very good question, I'll look deeper into that
 
and when you are sending 'data' as 'object' you realize
var arr = ['this','is','a','array'];
var obj = {'this':'is','a':'object'};
arrays are lists, objects are key -> value pairs (in lamens terms)
 
yup
so I can use object.hasOwnProperty instead of the for in loop?
 
no use it in the for-in
 
this.hasOwnProperty(obj)?
 
10:02 PM
var buz = {
    fog: 'stack'
};

for (var name in buz) {
    if (buz.hasOwnProperty(name)) {
        alert("this is fog (" + name + ") for sure. Value: " + buz[name]);
    }
    else {
        alert(name); // toString or something else
    }
}
for (var name in obj) {
    if (obj.hasOwnProperty(name)) {
        delete obj[name];
    }
}
^ that should be your code.
 
making that change broke it
inside of a for in loop, where name is the iterator, isn't it guaranteed that obj will always have a property name from your example?
How could it not, there would be no entry if that was not the case
 
because you are using arrays of objects
you want this for json correct?
 
that for in loop runs on the window object
 
ugh that is because like I said you are doing it WAY wrong
ditch that approach
 
this is just for testing
The example earlier was changed to return the changed array with an assignment call. However, it still seems possible to access byref if going through the topmost parent object (window).
Even if your data is nested in a closure, it could be accessed recursively.
 
10:11 PM
function reset(key) {
    window[key] = [];
}

var x = [
    1, 2
];
reset("x");
console.log(x);
​
x = []
there you go
just pass the var name as a string
@TravisJ but that is extreamly slow
 
Yeah, a string would do nicely as it is unique.
It would also not access variables in closures without being even slower.
 
watch this if you have not already
 
ok
an hr? :P maybe ill browse through it
 
it's a good watch :)
stackoverflow.com/questions/11640558/retina-images-in-php I mean really, if it is a question then i think it should be on programmers at least. They are more of a 'theory' kinda place.
anyways... off to watch some stargate
 
thanks for the input
 
 
1 hour later…
11:19 PM
Can some one take a look at this stackoverflow.com/questions/11660039/… im a bit stuck
 

« first day (648 days earlier)      last day (4295 days later) »