« first day (1014 days earlier)      last day (3937 days later) » 

10:00 PM
function setCheck(vendor, grp, val) {
    var setKey = vendor + '_' + grp + '_' + val;
    var ret = document.createElement('i');
    ret.className += 'icon-check';
    if (plotCache[setKey] && plotCache[setKey].name === val) {
        return ret;
    } else {
        ret.className += '-empty';
        return ret;
    }
}
that seems more verbose
 
var setKey = [vendor, grp, val].join("_");
function setCheck(vendor, grp, val) {
    var setKey = [vendor, grp, val].join('_');
    var ret = document.createElement('i');
    ret.className += 'icon-check';
    if (!(plotCache[setKey] && plotCache[setKey].name === val)) {
        ret.className += '-empty';
    }
    return ret;
}
function setCheck(vendor, grp, val) {
    var setKey = [vendor, grp, val].join('_');
    var ret = document.createElement('i');
    ret.className = 'icon-check';
    if (!plotCache[setKey] || plotCache[setKey].name !== val) {
        ret.className += '-empty';
    }
    return ret;
}
 
haha - are you there yet?
forgot about .join(). I need to stop my rails training - I'm losing knowledge now
 
Sep 29 '12 at 19:10, by Royi Namir
@Abhishek Regarding Node.js , when I create chat application ,
a client is connecting to the http server. does the thread is automatically transferred to a non-thread pool thread ?
I forgot all about the non-thread pool thread
 
!!urban catfished
 
@SomeKittens catfished Being deceived over facebook as the deceiver professed their romantic feelings to his/her victim, but isn't who they say they are.
 
10:06 PM
the benefit of join is that if you end up adding stuff or changing the join character, it's effortless. The performance is probably several orders of magnitude worse
but on this micro level, that doesn't really matter.
@Zirak I'm totally going to wear my non-clothes clothes tomorrow.
 
my issue is that val can have various characters in it including spaces - so I needed to create a key that took this into account
 
oh yeah, what keyboards do you guys use? I've been thinking of trying to branch out.
 
@jbolanos I feel like you're still doing things wrong. Why don't you have a strong relationship between the data and elements?
@Zirak razer blackwidow ultimate
 
@Zirak Logitech G15 (version 1)
 
Sounds fancy
 
10:09 PM
and generic dell keyboard at work.
@Zirak macros are cool. :)
 
What's a good keyboard cleaner?
 
@SomeKittens canned air
 
user1125394
I have a thin plastic on it
 
Mine's uber-old, and I couldn't crack it open. Built up grime means canned air doesn't work so well.
!!mustache cx
 
@SomeKittens User -1 was not found (if the user is not in room 17, pass a user-id instead of a username).
 
10:11 PM
@SomeKittens just get a new keyboard.
 
user1125394
 
user1125394
^ that explain why I can't type often :p
 
@Shmiddty see - strong relationship between the data and elements is just white noise to me - can you send me a link that explains it a little better?
 
user1125394
@SomeKittens surfers haz no mustaches
 
@jbolanos you have a data element when you create the html element, correct?
 
10:13 PM
@SomeKittens huh, Logitech seemed to have dropped it
 
@Zirak Yeah, a while ago, which is why I don't want to get rid of it. Excellent keyboard, wonderful workhorse.
 
I set the data element for the data - otherwise there's no way to tell what I'm clicking on
 
The newer versions are too gimmicky.
 
user1125394
but there's worse
 
user1125394
 
10:15 PM
by data element I mean a JS object that contains data related to that element
 
<ul>
    <li data-key="midwest"><i class="icon-check-empty"></i> midwest</li>
</ul>
 
@cx My brother had one of those, he gave it away
 
what generates that li?
 
because it's a list
 
but what GENERATES/CREATES the element?
 
user1125394
10:16 PM
magic!
 
!!s/magic/sufficiently advanced technology/
 
@SomeKittens sufficiently advanced technology! (source)
 
we're talking about models and views here, @jbolanos
 
@Shmiddty Here's an old fiddle of what I'm trying to do jsfiddle.net/jeremybolanos/U24vw/2
 
the html element is the view for that model
 
10:17 PM
any technology distinguishable from magic is insufficiently advanced
 
any magic that can't be accomplished by blinking your eyes or twitching your nose is burdensome
 
@SomeKittens I've been using the generic Dell keyboard (SK-8115) with great pleasure for some time now. But it's beginning to annoy me, so I'm starting to wonder what neat options are out there.
 
Mechanical keyboards seem all the rage. Haven't used one myself.
 
I used a laser generated keyboard for awhile - once I stopped looking for key feedback things go easier
 
Roccat Isku looks a bit interesting. What bothers me with these macro keyboards are the drivers
man, I'm looking at macros and thinking "these could be useful Emacs shortcuts"...
 
10:25 PM
Macros are awesome, but yeah, drivers.
 
@jbolanos look at this: jsfiddle.net/aLkbm
use scoping to your advantage.
 
I'm a little far into this already (2 weeks till deadline for this release) but will keep that for the next rewrite in Kony
 
for future reference, if you find yourself embedding lookup data in data-attributes, STOP and take a step back.
 
user1125394
nvr much liked the telescoping style (function(foo){ })()
 
I'm the only JS guy here - so I sort of had to slap stuff together to meet the deadlines :)
 
10:29 PM
@cx because...?
 
user1125394
too many brackets :p
 
That's why I started coming here to fill in the gaps of what I forgot 8 years ago and hadn't picked up yet of the new stuff
 
@jbolanos you'd be done already if you don't have to fiddle around with data lookups
 
@AlanFisher Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
!function(bar){...}("foo");
 
10:30 PM
@Shmiddty I'd be done if they'd stop fiddling with the requirements :)
 
@jbolanos changing the requirements ALWAYS happens.
if you set yourself up for failure, them changing the requirements hurts more.
 
that's why I'm reborking the backend :)
your example gives me
<li data-key="Midwest">[object HTMLElement]Midwest</li>
 
because you're setting innerHTML, right?
 
append
		    		row += '<li data-key="' + k + '">';
		    		row += setCheck(thisVendor, nextGroup, k);
		    		row += k + '</li>';
var $col = $('#'+nextCol).append(container);
$('ul', $col).append(row);
 
you're calling toString on the element.
you're NOT appending it.
also, your code is buggy.
if you uncheck an option, it is not removed from the list
 
10:35 PM
the fiddle I sent you was old - was showoing something - I've fixed that since then
 
ok
 
function setPlotLines(action, vendor, type, name) {
var setKey = vendor + '_' + type + '_' + name;
if (action == 'add') {
plotCache[setKey] = {};
plotCache[setKey].vendor = vendor;
plotCache[setKey].type = type;
plotCache[setKey].name = name;
} else if (action == 'remove') {
plotCache[setKey] = null;
}
populateTable();
}
 
user1125394
one thing I dream more than a keyboard is a good armchair
 
In star trek - we'll just be programming by dragging colored oblong icons around into stacks
 
@jbolanos I don't think that'll ever happen.
 
10:39 PM
 
!!tell 10875691 format
 
@jbolanos Format your code - hit Ctrl+K before sending and see the faq
 
@jbolanos I hope that will never happen
 
@SomeKittens of course not - some idiot probably already patented it
 
@Shmiddty mmmmmm
That's a tasty setup
...I need a new chair
 
10:41 PM
@CapricaSix I did - it tried - and for some reason it gave up and just slapped it up
 
@jbolanos No, it just doesn't work. Coding isn't about coding, it's about detail.
faffing about with boxes doesn't give one detail.
 
This one's falling apart. The cushioning is already flattened
 
@Zirak they're only $5k/$40k (if you want a custom built one)
 
I know, I'm counting the sperm donations needed
 
user1125394
the best is to be almost horizontal, so blood circulation is fine, to be sit down is actually the worst position for humans
 
10:41 PM
@SomeKittens I think the idea behind it is that the computer does all the coding and you merely map out what result you want
 
@jbolanos skynet /discussion
 
@jbolanos Impossible. The only way to be precise enough about what you want is to code it yourself.
 
well, it is only sci fi :)
 
@SomeKittens eh, half-agreed. Computers already generate a lot of code for us. The "dragging rectangles" is a bit silly, I'm sure they have more meaning behind it.
Or, really, it's just for show.
 
in the star trek context, it's all just data
 
10:43 PM
Like making a VB GUI to track down viruses.
 
they're just ordering the functions that process it.
or something.
 
it's like having all the functions you'd ever write already written and then assigning a graphical representation - then its just a matter of the computer analyzing the data and giving you a set number of possible functions you can use
 
"All the functions you'd ever write" is quite a lot of functions.
 
have you seen the size of their computer? LOL
 
Turing might say it's more than a lot.
More than 10 metric fucktons
 
10:47 PM
when processing data, you don't really need that many functions
filter, reduce, map.
 
It's a number so big, we had to give it a special representation, because no matter how big you think you get, it's bigger
 
and sort
 
sort the hell out of that data
when a supercomputer says "requested function will take 2 hours" you know that's a lot of data
 
!!color red,orange,yellow,green,blue,indigo,violet
 
10:50 PM
Red has changed so much over the years
I can hardly recognize it
 
it really has.
 
m59
ahaha
 
I always thought violet was just another shade of blue
 
!!color chartreuse
 
10:52 PM
!!color beige
 
something is off
 
Sorry puts pants back on
 
when it can't find something in the color dictionary, it goes to HEX
 
grumble grumble
 
10:53 PM
if the hex is invalid, it's black.
 
then explain red :)
 
the code has a bug
 
!!color lavender
 
oh wait
the first color if tried to access by name, will always fail
because of the bug
!!color f00,chartreuse
 
10:54 PM
 
!!color BA86E8
 
!!color fff,beige
 
it got beige right
!!color fff,lavender
 
10:55 PM
 
chartreuse is also correct
yeah it's just a bug right now
 
!!color aaaaaaaaaaa
 
chartreuse is green? huh
 
10:56 PM
ow! why would you send me there?
now all I see are blotches
 
lol
 
@banana Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Jhawinsss if(is_array($rgb)) is breaking everything fix!
I'm going home now because friday
ttfn
 
ciao - time to punch out
 
Hello. Not javascript related but please help. stackoverflow.com/questions/5454969/…
 
10:58 PM
That's not your question
 
@Zirak What do you mean?
 
I just answered a question where OP was not a douche, what gives?
 
Aliens.
 
@BenjaminGruenbaum Bill Gates.
 
user1125394
!!urban douche
 
@cx douche a word to describe an individual who has shown themself to be very brainless in one way or another, thus comparing them to the cleansing product for vaginas.
 
user1125394
douche = shower in french
 
user1125394
o man I already urbaned this 2 weeks ago..
 
@edwardoyarzun Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
11:30 PM
hi
 
I need help, I need to get the left and top CSS property of a point on a div box when I do a onclick event. but I need the top and left property based on the div container, not the document
example: document.getElementById("asdf").onclick = function(e){ console.log("here I need to print the coordinates where i clicked inside the asdf div") }
 
Have you tried googling your problem?
!!tell edwardoyarzun google get coordinates of click in div
 
I noticed I can do it with e.offsetX and e.offsetY, it works, but I don't really know if is this is the correct way to do it
 
11:38 PM
@max Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
0
Q: What am I missing for Foundation's Orbit?

FastidiousI'm losing my mind over here. I know the answer is here, but maybe it's just hiding in plain sight? I'm rehashing on PHP and Javascript by building a new content management system using Foundation 4 (4.3.1). Everything else is working pretty good, but I can't seem to get Orbit to to work. Orbit ...

 
@jrg Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
jrg
@CapricaSix oh great...
@BenjaminGruenbaum @rlemon said that you were having problems with xrandr?
I don't understand what you just said @CapricaSix. You should totally drop that and try jQuery. ;P
 
@jrg Oh, I just wanted to get a third monitor working. I got all three monitors working but I've been having trouble getting them extended.
 
jrg
@BenjaminGruenbaum ok
let me boot my xrandr powered box.
i'd use arandr, and then move them around that way.
 
11:48 PM
Here's the catch, it's on two graphics card, one by intel and one by AMD
 
jrg
oh. arandr might do it, might not.
i haven't had to deal with a dual card system in... ever. i think.
 
Two monitors are no trouble to set up, the third one is the problematic one.
(Also, the cursor is flickering, but I assume that's relatively easy to fix)
 
Yeah, I had the same problem, trying to get a third monitor running on an old 7800
But that was on Mint, so all the Ubuntu folks did was spit on me.
 
Lemme reboot into it, one sec
@jrg K I'm on the box right now.
 
jrg
does arandr show the 3 displays?
 
11:53 PM
Lemme grab it from apt one sec
 
!!/google unicycle hockey
 
@jrg holy. That was easy to set up.
 
jrg
@BenjaminGruenbaum it work?
 
@jrg Yeah, just messing with the 'View' menu there let me add the third display. I should try GUI tools sometimes haha.
 
jrg
11:55 PM
@BenjaminGruenbaum for some things, I use the GUI.
managing displays is one of them.
make sure to save it as a profile, if this is your default setup.
 
Yeah it is, thanks. I have to say that this was surprisingly really fast.
 

« first day (1014 days earlier)      last day (3937 days later) »