« first day (1266 days earlier)      last day (3904 days later) » 

00:02
I'm not sure if I get the question. Isn't JADE or EJS one?
NO YOU'RE NOT
so I have this thing here
that I want to test, it has lots of parts and I wrapped it in a function
but I want to access all the functions
would making it an object be the right thing to do
Jay
Jay
I was going to wait and make a joke with perfect timing...
damn
now that I've asked, it seems kinda obvious
thanks guys!
00:11
too much cellulite, would not squeeze
Hello guys, I making a custom chat room using php, mysql and ajax and I wanted to know how I can check who is connected to chat room?
long polling
@Loclip WebSockets
00:17
But I'd recommend WebSockets
Exactly
Thank you guys, I wanted to know from where to start :)
Some kind of library that provides a fallback mechanism from websockets to long polling
@SomeKittensUx2666 I've heard about Heroku alot but never really used it. Why is it so cool?
The entirety of your deploy is git push heroku master
00:19
@phenomnomnominal Socket.IO all the way
I found this: stackoverflow.com/questions/11077857/… those are the techniques that I can use right?
@Loclip Never heard of Comet. But yeah. But I'm affraid PHP is not capable of any socket connections. Correct me if I'm wrong
@KrzysztofWende You're wrong
!!tell KrzysztofWende google PHP websockets
Well that wasfast
Anyone pythoning here?
00:49
@GauthamBadhrinathan 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.
@ChrisG. 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.
01:09
@NickKassatly 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.
Hi guys! Having trouble with an email pop up. I'm just trying to make it so it closes when you click outside the form. I've managed to do it but I used return false to try and keep the form open when you click inside of it but now the form won't work.
$('#mc-embedded-subscribe-form').click(function(){ return false;});
$('#mc_embed_signup').click(function(){ mcEvilPopupClose();}); was the code I'm using
01:37
@Zack 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.
is this timing out for me only or for everyone? mediaelementjs.com , try switching to TED Skin
it actually crashed my browser temporarily
so yes
Chrome 33.0.1750.154 m
i know right, I'm just implementing it in one site
and it simply times out
maybe it's temporary, they could be releasing new version
no, it's just popular js player quite common, it's weird that it times out
it is weird
I'd investigate, but I had to close 2 tabs
they all crashed, and chat.stackoverflow.com took forever to reconnect
seriously screwed something up temporarily
01:56
In a global IIFE, do you guys bother nowadays putting (function (window, undefined) { or is that useless?
if there's a conflict it solves, it's not useless
if overwriting undefined makes your app leak your bank account information, also not useless
@happenask 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.
hi
i have a question
is there anybody who help me?
02:13
@happenask did you read the room pseudo-rules?
no what is that?
did i break rule?
Don't ask if you can ask, just ask - If anyone cares, they will help
no one seems to care :(
oh sorry i just read that
i am first time to be here
m59
m59
02:16
@NickKassatly code debugging questions rarely get help here. That's not really the point of the room.
we are not alone
Welcome
@m59 I always mix you up with Loktar. Not sure why.
m59
m59
@monners I always mix you up with someone I like, and then end up acting like we're homies or something.
2601
Q: How do JavaScript closures work?

e-satisLike the old Albert Einstein said: If you can't explain it to a six-year old, you really don't understand it yourself. Well, I tried to explain JavaScript closures to a 27-year old friend and completely failed. How would you explain it to someone with a knowledge of the concepts which m...

so funny
it much more hard to explain to six - year old than 27-year old
02:30
@m59 Yikes. That's gotta be awkward for you, what with me thinking we are homies...
m59
m59
yeah :'(
Or was it @Loktar who's my homy? I forget.
m59
m59
hahah
what is homy mean
m59
m59
kind of a silly outdated pop culture way of saying "friend".
02:32
!!urban homy
@monners homies Crowd of friends from the street, ghetto, hood, club, block, or other.
@MichaelSanders 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.
m59
m59
Not to be confused with "Hominy".
!!urban hominy
02:33
@monners No definition found for hominy
m59
m59
Which is a much funnier thing to call your friends.
haha im an apple developer nice to meet you :D
hahah i got it kkk
i need homy!!
> "Hominy: Coarsely ground corn, like maze, used to make grits"
haha and its spelt "Hommie"
m59
m59
02:34
So....I think you say "Hominy" if you're a cannibal.
hommie
@MichaelSanders What does that even mean? You work for Apple as a developer, or you develop for the OSX/iOS platforms?
m59
m59
like, Wuuuut up, muh breakfast?
@m59 Puts a new spin on the lyric pour some sugar on me
m59
m59
hehehehehe
02:36
@monners i work on OSX and IOS but i also use alot of java script, HTML and applescript
I work for the catholic education office of australia
02:50
what a combo
@MichaelSanders In Melbourne?
03:12
hmm, I just used angular to make a module as if it were requirejs or browserify
just a bunch of services
not sure how I feel about it
> "Are you getting down tonight?"
Like a lesbian porn star!
@monners Ill be your homey any day bro
@Loktar thanks bra
03:35
room topic changed to JavaScript is for lovers.: Read this link or we'll eat you: rules.javascriptroom.com. Before asking a question inform yourself on the XY problem goo.gl/taIqf [bananas] [ecmascript] [ecmascript-5] [jabbascript] [javascript]
@user2357 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.
04:05
hi
2
Q: how to Pass value From Collection to model in backbone.js

SportI want to pass and fetch a value from the view to model use of a collection, i am able to pass the value into the model when i used collection it is not working .i don't know where is the problem here is my code . my model var PostwallModel=Backbone.Model.extend({ urlRoot: 'http://localho...

04:24
is there anybody who have experience with jasperreport ?
04:56
@DOT.NET 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.
hi i m newbie in your Java script room. My question is how to change the location of Div Run-time (Dynamically)
hi any buddy is there??
@Spenzo 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.
m59
m59
05:15
Anyone got a ballpark on what a dev should charge to create something like this? itunes.apple.com/app/charlottesville-tomorrow/id300908322?mt=8
options = (function (items, opts) {
                return items.map(function (item) {
                    return (opts[item] || []).join('&');
                }).join('|');
            }(items[0].split('|'), options));
is this a retarded use of IIFE
m59
m59
ignoring the details inside...I don't think so. I use IIFE's like crazy for private scope.
05:32
sometimes I feel it's awesome, sometimes confusing
options = (function (c) {
            if (c && c.Col) {
                var options = c.Col.length ? _.each(c.Col, handleCol) : handleCol(c.Col);
                return (function (items, opts) {
                    return items.map(function (item) {
                        return (opts[item] || []).join('&');
                    }).join('|');
                }(items[0].split('|'), options));
            }
        }(node.Cols));
m59
m59
Other people's code usually confuses me :)
that bit is currently confusing me too
m59
m59
I'm crazy about readability man...
and I wrote it 2 minutes ago (and it works)
m59
m59
I redundantly return things.
var options = (function() {
  var options = 'some jank'; //obvious filler for real logic
  return options;
}());
lol, no kidding though.
05:35
I try not to do that actually
I like to be concise
although I can see how it's sometimes confusing
m59
m59
It's concise when it's minified :)
When you're dealing with an angular directive and have return and function all over the dang place, I find it easier to name your variables then return them.
I use coffee for my angular
solves that
kinda
@Mosho to be honest, I'd pull that out into a real function, that way it could be tested
it's in one
module.exports = function (node, wat, multiSelect) { //TODO: wat

    var items = (function () {
        var items = node.Items.replace(/\s/g, '').split(/;+/);
        return [items[0], items.slice(1).join(',')];
    }()),

        options = (function (c) {
            if (c && c.Col) {
                var options = c.Col.length ? _.each(c.Col, handleCol) : handleCol(c.Col);
                return (function (items, opts) {
                    return items.map(function (item) {
                        return (opts[item] || []).join('&');
m59
m59
woaaaaahhh
05:38
> You've earned the "jquery" badge. See your profile.
Shit.
m59
m59
At that point, I'd break that up into several functions.
I'm about to make one for options, one for items
I'm just playing around really, my other stuff doesn't look like this
you know, like how you goof around in GTA and start killing cops for hours for no reason
only in JS
m59
m59
hahaha
You play GTAV?
@Mosho yeah that's not particularly testable
(or readable)
@EngrWaseemArain 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.
05:41
@m59 bought it, but honestly had to drop it
I guess I'm over the franchise
@phenomnomnominal but look at those nested returns
like a stairway to heaven
m59
m59
haha :)
slash callback hell
m59
m59
So....no thoughts on what to charge to a basic mobile app?
But nah it's a fine line between nice functional shit and too much
@m59 not the slightest clue
m59
m59
05:43
I've got a potentially nice opportunity. I just need to come up with a number that is competitive.
Make it a web app and release it for free
m59
m59
It's for a company.
They hope to make money off of it. They want me to make a bid for the job. Anywhere from 0 money upfront and a large percent of the profit or a lot of money up front and no cut later.
take the money and run
^not actual advice, this came up on the radio on the way home
m59
m59
Hehh, I was thinking of reducing the normal price in exchange for 5%..I just need to figure out a normal price :)
I'm thinking 5k for the basic version of their idea.
So, 5k-20k depending on how crazy it gets.
+ expenses (graphic design, copywriting)
sounds better than applebee's
m59
m59
05:49
FREAK YAHH
9k, boooooyah
m59
m59
:)
@SomeKittensUx2666 MentorKittens, chime in ^ :)
fuck 368 answers? ain't nobody got time fo' dat
/me reads context
@Mosho got time fo' dat when I'm shirking at work
m59
m59
Basic app with only 2 routes, not much server stuff to do.
Easy sauce
05:52
What are you building?
m59
m59
but could move up from there to where I need to either setup a web scraper and/or relational data
how many weeks will it take you?
m59
m59
NDA, I can't talk about it.
you signed an NDA already?
m59
m59
Yeah.
They'll murder me in my sleep if I say much more.
kidding.
Honestly, the starting point is probably something I can do in a week.
05:54
Ok. What salary were you looking for?
36k?
m59
m59
scratch that - that's ignoring the server stuff
Let's round to 40
m59
m59
I don't want to undersell myself :)
@Mosho I know you didn't ask, but I was bored- here's what I would do:
module.exports = function (node, wat, multiSelect) { //TODO: wat
    var getHeaderAndItems = function (node) {
        var items = node.Items.replace(/\s/g, '').split(/;+/);
        return {
            header: items[0],
            items: items.slice(1).join(',')
        };
    };

    var parts = getHeaderAndItems(node);

    var createHeaderOptions = function (header, options) {
        return header.map(function (item) {
            return (opts[item] || []).join('&');
        }).join('|');
m59
m59
They just said they would take my bid so long as it is competitive.
05:56
@phenomnomnominal lol thanks :D
lol that's fast
m59
m59
I think I'll count on a month for starters, which would be about $3500 at 42k/year
var handleCol = function (col) {
        this[col.Name] = _.transform(_.omit(col, 'Name'), function (str, val, opt) {
            str.push(opt.charAt(0) + '=' + val);
        }, []);
    },

    getOptions = function(c) {
        var opts = {};
        c.Col.length ? _.each(c.Col, handleCol, opts) : handleCol(c.Col);
        return opts;
    },

    getItems = function (node) {
        var items = node.Items.replace(/\s/g, '').split(/;+/);
        return [items[0], items.slice(1).join(',')];
    },
that's what I got
only took me 4 times as much
and it's my code :|
m59
m59
much better
"multi-select = " + !!multiSelect + " header=" + items[0] + " items=" + items[1] + " options=" + options
Smells of bad design to me :P
But it's okay otherwise
06:08
yeah I'm copying what you did for that
:P
I mean the internals of openElement :P
it goes to an angular directive
that makes a dropdown
Oh, sounds gross
I agree it's pretty ugly
Why does it take a string?
@phenomnomnominal that's the only thing it can take in this case
it's either a string or an object
So pass in an object with those properties on it?
Or does it not work like that?
well, it's a fairly long story, but it's translated from WPF like this:
Haha you've said enough
gotta go though
!!afk foooood
              <Node>
                <UI>DropDown</UI>
                <SelectedCol>Header1</SelectedCol>
                <AllowDummy>N</AllowDummy>
                <vSelected>SampleTest.ComboDefaultText</vSelected>
                <Height>25</Height>
                <Items>Header1|Header2|Header3;;Col1Row1Val|Col2Row1Val|Col3Row1Val; ; Col1Row2|Col2Row2|Col3Row2</Items>
                <Cols>
                    <Col>
                        <Name>Header1</Name>
                        <vSelectPath>SampleTest.ComboSelectPath</vSelectPath>
oh well
bon appetite
06:22
"Bon appetite, it's time to eat!" - Kindergarten teacher
@KarelG Hi, KarelG! Can you suggest me something? It is regarding the question I asked yesterday.
I'm creating a video using CSS animations.
So yeah.
here is another thing I did
this right after I discovered the joy of chaining
module.exports = function (styles) {

    var that = this;
    //parses styles. A bit messy, but gets the job done concisely and shouldn't be too hard to follow with the comments.
    var parsedStyles = styles.replace(/[^!-~]/g, "") //remove unneeded characters
        .split('}') //split lines into array
        .map(function (elm) {
            return elm.split('{');
        }) //split each line into an array: [name,styles]
        .map(function (elm) {
            if (elm[1]) { //if element has styles
06:36
0
Q: The offline version repl.it

Anup VasudevaNot sure if I am putting my question correctly - Is it possible to have an offline version of repl.it, so that it can be used without internet access?

Everyone needs to be aware of this question.
site is pretty smooth
gonna need to get a handle on CSS3
@Surfer 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.
06:54
@Kukku 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.
user2509223
07:17
hi there
hey lover
user2509223
so what is this lover?
user2509223
(backup before deploy)
user2509223
@Mahesha999 cool pic
07:35
@DrogoNevets 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.
morning all!
@derylius what?
user2509223
@Mahesha999 prof pic
sorry am out of context
@JeyanthKumar 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.
07:39
@derylius what r u talkin abt?
user2509223
nvr mind
my profile pic?
user2509223
yup
thats xbox avatar
user2509223
cool
07:40
I prefer to not to attach my real photo anywhere, just not want to influence chat by personality :p
except linkedin ;p
user2509223
or you just dont want to give our real name to your toughts :D
you could just waear a motorcycle helmet.....
umm u can find my real name by googling "mahesha999" in first search result, also my real photo in google image
user2509223
why the hell they want me to believe that a CMS with 10k+ files is performance wise?
or i hear paper bags work too - don't use a plastic bag though
07:43
ohh my real photo is not on gimage anymore good
nyways last time I asked abt what plugin angularjs site use on its homepage to explain examples
don't you hate it when you set us jsLint as part of your build and the settings you choose are a little strict....
user2509223
@DrogoNevets never ever do that if self-perseverance is an instinct you possess
self-what?
user2509223
@Mahesha999 i worked hard to encapsulate my online identity from the real one but no luck
@NitinBansal 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.
07:47
ok guys. What is the difference between Browserify and Require.js and what makes one superior over the other?
oh thank you for your helpful comment
@underscorePez 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.
user2509223
@GNi33 must agree
seriously....there is no right or wrong answer, a quick google throws up dozens of decent blogs answering that very question
user2509223
07:49
back to my Q how can a 10k+ file CMS be efficent?
Browserify and Require.js are different tools for different situations. talk of one being better than the other is futile
I know some people in here used browserify and it would be nice to get a hands on opinion.
@derylius depends if all 10k files are downloaded at the same time, or if they are used when they are needed, eg, do you get an image cropper file being used when managing datqabase connection details?
And lmgtfy always pisses me off in the morning because of its passive aggressiveness :P
sorry, its friday, how can anyone be pissed off on a friday!
(genuinely, i meant no offence)
07:53
I haven't had any coffee yet, I better change that ;)
user2509223
@DrogoNevets i see your point, but the volume of distribution is far from modularity even on a log scale
which CMS is it? it does seem rather a large number, i want to dig around
why do companies not pay cheques in the day they receive them?!
user2509223
@DrogoNevets to increase their liquidity
@KaHeL 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.
but ive paid a HUGE deposit for a venue for my wedding and actively want to be poor for once, and the money is still in my account! gah!
07:57
haha, just chekin' this one out. Thanks btw. :D
@GN133 IMHO Browserify works better for a self-contained app where most of your users will see the same functionality EG: a game. Requirejs is better for where you have a large libraries of functionality that your users employ one piece at a time, like an e-commerce app.
but now I am
can someone give me 3 good reasons why my company should embrace Angular - im writing a presentation telling them why they should but they are non-techies so need non-techie reasons....and go!
user2509223
07:58
@DrogoNevets CMS is PrestaShop, seemingly a mutant version of drupal
@DrogoNevets What do non-techies ever care about? Production rates and, ultimately, profits
ok...so how can i turn "because i like coding it" into those things? lol
If you want to sell that framework, you should back it up with some sort of proof that it would genuinely help the company in the long run from a financial standpoint
@DrogoNevets You can't :)

« first day (1266 days earlier)      last day (3904 days later) »