« first day (1243 days earlier)      last day (3930 days later) » 

00:04
@TiagoMarinho 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.
@rlemon patchy after 2 weeks? lol pls
Coworker was editing files live on the server.
!!git reset or git stash
@SomeKittensUx2666 git reset
@CapricaSix You're such a wicked woman. I like it.
!!s/woman/toaster/
00:08
@Mosho @CapricaSix You're such a wicked toaster. I like it. (source)
!!afk lift
@SomeKittensUx2666 I'm pretty sure that's a fireable offence.
@monners He's the cofounder
We can't fire him
so he gets away with murder
@SomeKittensUx2666 Buy him out? :P
@SomeKittensUx2666 Even if you could get away with it, why would you want to?
00:12
@twiz Power!
especially if you're an owner
but money is power
And money presumably involves not destroying your company's website
AWWW FFFF YESSS !!!
FACE BASED SEARCH WORKS :D
00:28
@AbhishekHingnikar I don't know what you're talking about, but it sounds terrifying.
@twiz metaphorically.
His prior programming experience involves 1.5 years of living off of hackathons
he doesn't know a better way
not only that, his ego is invested in him being great - so there's a mental conflict to improvement
haha oh, no, I meant editing live files
He's never coded in a team environment before.
@SomeKittensUx2666 Show him the light.
sounds like a fun job haha
00:34
The funny thing is that as I rewrite code using conventions he's unfamiliar with, he stops touching that section of the codebase.
and I'm slowly redoing the entire codebase.
haha well I guess that means some new features will be added soon
@tonyhb 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.
@twiz I wish. You ever heard the term 'Too busy driving to get gas'?
is bootstrap typeahead good for a code editor
00:39
oh, ace has it
omnom
Switch pattern:
// given a variable "i" containing a Number value

switch (true) {
    case i % 15 == 0:
        console.log('fizzbuzz');
        break;
    case i % 3 == 0:
        console.log('fizz');
        break;
    case i % 5 == 0:
        console.log('buzz');
        break;
    default:
        console.log(i);
}
Comments?
No No No No No No No No No No
No
Hehe
It was re-tweeted a bunch on Twitter today
Okay, it's not that bad. But nothing is wrong with if-else if-else if-else if-else
It’s pretty bad. The correct pattern is obviously case !(i % 15):.
00:45
I used string concatenation for my solution. fewer conditionals
correct answer is $(document).fizz().buzz().fizzbuzz()
@SomeKittensUx2666 Not enough jQuery for a professional gig.
@ŠimeVidas There’s one at the top
@twiz imagine searching your local hard disk securely with face based searches with sql like queries :P
i kinda just did it.
@minitech What? Where?
00:48
// given a variable "i" containing a Number value
@minitech hi man
Aaaaaaa
Hows everything ?
Everything varies!
00:51
My incredibly long fizzbuzz solution jsfiddle.net/u8K4y
Oh man. Finally a team that knows how to build a decent back-end. But the client-side... They wrote a jquery extension called "dom". It builds HTML. $.dom.div for instance. And they got really touchy when I suggested it may have been just a tad redundant.
Eh, that doesn’t sound so bad.
Go on...
At least you can’t make many typos.
$.dom.div( { className:'someClass', id:'someID' } );
00:54
Really. That’s almost good.
Depends what kind of stuff you do with the DOM, but I think, templates are a better approach (generally).
When it's used to generate entire pages, I have to disagree. There's no reason to bury your HTML like that and now we have two designers struggling to understand the codebase.
You're talking about $.dom or templates?
$.dom. I can point a designer to a templates directory.
00:58
What did the "compiler" say. we need a song like that
@RyanKinal ^
JVM goes "blub"
@ErikReppen Yes. I was going to mention that. $.dom hard-codes the structure in the JavaScript file. Not a good idea.
GCC goes "wheeeeeeeeee"
but there is one sound that nobody knows
what did v8 say !
@ErikReppen ... i kinda edited it
Ruby goes bling
Python says hiss
Php goes toot
Java Goes "Fart"
It's a pain in my ass. They just got over some culture issues with serious hard-ass old-school IT types of the "there's only one way to do it right" kind and I'm barely a new-hire (they were worried I was overconfident). So now I have to actually use this stuff until I've built up enough street cred to have an opinion that counts for something. None of them are really UI-focused devs.
@ErikReppen woah, haven't seen you in a while!
01:01
That said, best job I've ever had so far.
@SomeKittensUx2666 Yeah, I was job-searching hard. Contracts were really weak this winter.
You work(d?) as a contractor?
About half my career. The other half has been really stupid full-time jobs that I ultimately left to pursue contracts until I could find another FT gig.
@ErikReppen They don't have to take your word for it. You can write down your thoughts in a blog post and use the feedback. Maybe even ping a bunch of the high-rep folks on Twitter to get their response.
They're a good bunch but I think they've got some serious shell-shock from this previous situations and conflict-averse in a heavy-handed way.
I'm just going to wait it out a bit. Hopefully when they've seen some of my work...
01:27
Give me rep if you're cool with that.
Thanks, anonymous donor!
@Ted 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.
I'd forgotten how great it is to work on a laptop with a 15" display.
@SomeKittensUx2666 +1, lol at Arun's answer
@KendallFrey Yeah, he posted it, deleted it, and then undeleted.
I think there's another deleted, 10ker screenshot?
> ^(?:0|[1-9][0-9]*)$
01:36
@SomeKittensUx2666 How did your regexfu get so strong?
oh, I get it now, the idea is things like 05
@monners I farted near him
@monners lots and lots of doing it wrong
@SomeKittensUx2666 I think your answer is wrong and his is right
not wrong
Wrong as in, not answering the question correctly
01:39
@copy Yeah, depending on how you interpret the asker. I chose to read it as "halp can't find numbers"
the user didn't provide any specific requirements against it
01:49
Anyone have opinions of those Yoga laptops?
@ErikReppen I've heard they aren't worth it
I basically want something I can use Safari Books on tablet-style but also type. Definitely not loving Android for "productivity" though. I hate to admit it but I also really like that they come in orange. But I'm not sure the Win 8 hate is the usual variety of new OS hate or if it's really quite awful in fact (I didn't really think Vista was particularly stupid-heinous).
@ErikReppen No need to admit a love of orange
wait
it's ok for orange to be cool
I'm so braindead
02:10
@SomeKittensUx2666 I think it stopped coming in orange. Hmm... yeah definitely cared a lot about orange.
02:51
Hello, I am using a js library to help create an auto suggest table under an input. In this line of code, I see where they make the table:
a = document.createElement('table');
But it appends it to the document, an I really need to append it to a different element (id = "stockSearch"), so I tried:
a = document.getElementById('stockSearch').createElement('table');
Now I get error: Object #<HTMLDivElement> has no method 'createElement'
Is there a different method I should be using?
look for document.appendChild
because you probably want to do:
var table = document.createElement('table');
document.getElementById('stockSearch').appendChild(table);
also, your IDs should have capital letters
@phenomnomnominal oh, I see how that would work
oh, i had no idea, why is that?
Just conventions :)
Capital letters?
I've never done that....
02:58
@phenomnomnominal i'm now getting "Uncaught NotFoundError: Failed to execute 'appendChild' on 'Node': The new child element is null. " still playing around with it though
-1
Q: form to json error when there is a dynamic list operation

jesseThere is a addresses in my APP, there is a button that will add address if neccessary, but when I transfer the form to object and use ajax submit, the form object will only contain the last address. here is the demo enter link description here

is there anyone can help me? I think it is a common question.
Not a convention I'm familiar with. I would leave that more to the group of devs you're working with. My preference is lower-case attributes split by underscores because files, URLs, and code don't typically do that.
@phenomnomnominal nevermind, i got it, thanks so much for your help
@phenomnomnominal What do you mean?
Like, you should use camel case for IDs?
@SomeGuy fuck yeah
03:05
Yeah, that's fair enough. Using capitals seems like a very arbitrary convention
css dude on my team had a really good argument for it, but I've forgotten it.
IMO, it's best to use something that reminds you that you're looking at a class or ID attribute and not a file or function name or a URL but it's not really a big deal.
hmm, I actually didn't end up gettig it, document.getElementById('stockSearch').appendChild(table); doesn't seem to be doing anything, the table just stays at the end of the document
nm, once again, I'm an idiot, which is a sure sign that it's time to sleep tonight, goodnight, all
thanks again, everyone
Hi all, my question has been fixed, may be helpful for you
03:42
Just tried to inject $html into an Angular controller. Maybe it's time for bed.
You will won't be missed.
dat feel when you start working at a new place, start sniffing your female coworkers' butts, but they all have boyfriends or are married
and you end up with a bunch of girl-friends
or awkwardness
Office romances never work
I just want sum fuk
03:58
never had good experiences with pof
Hey! Don't knock office romances
Go for the bosses daughter
I went to the prom with my principal's son :P
> I'm looking for someone who wants to please me in the afternoon with their big, hard cock
brb texting "does it have to be big?"
@Mosho That's a little too honest.
Arnt we all...
04:01
!!s/Arnt/aren't/
@monners No matching message (are you sure we're in the right room?)
@monners aren\'t we all... (source)
Fuck you. On mobile. Eat a dick
@monners aren't we all... (source)
!!riot
(╯°□°)╯︵ ┻━┻
04:02
Bastard
lol, I failed at the correction three times!
THAT IS MY TABLE!
Best you pick it up
anyways. Night
Have fun with those special characters on your phone
04:03
> Really get off on the idea of sucking off and getting dirty with some of those built guys at my gym
time for a cut
Time to find another room...
I just realized this looks like it's me saying that rather than me quoting from CL
@Mosho Oh, you were quoting?
I'm at work. Not touchin' that.
04:04
no pics
I swear :P
Nah, I'll just pretend I know what it says
bookmarked
Go to bed already!
I am!
I'm not comfortable with the idea that you're in bed with the entire JS room.
04:06
I am
Don't you have fish to feed?
> Guys. Don't bother replying to any of the posts on the W for M ads. If you have used crigs before you know that the women posts are few and far between. Now all of a sudden there is a HUGE amount of posts. There is a reason. They are all fake.
well I guess that's that
Bah
!!afk sleep and stuff
> lactating bbw
@monners do you have any other brilliant suggestions
:P
@Mosho Yeah, find a hobby.
04:10
I have nothing but hobbies
Go to a bar?
don't drink
usually work/friends/school is where I look
You're on your own, mate.
04:11
tell me about it
I just did.
...
I'm waiting for a dev server to roll back.
Any ideas for NodeJS web hosting w/ a database? Preferably with a free plan?
!!doge jumping,gay,walrus
04:24
       wow
           much jumping
                       many gay
so walrus
archer is still entertaining
but it stopped being hilarious :(
04:39
I'm about halfway through the second season. It's still hilarious.
yeah, first 3 seasons had me on the floor
it's on the 5th now
04:55
If you watch the non-repeating part, you'll see where he slams here head into the ground.
that's even more entertaining!
05:21
My PM thought it'd be a good idea to try and save me some time by doing a few quick, simple fixes himself. Well, an hour and a half later, I finally figured out why the stylesheet wasn't behaving. He left 4 media queries unclosed in different locations!!!
06:09
@SomeKittensUx2666 yes
06:38
0
Q: What does << means in javascript

edelweissI am looking at some code in javascript var numCombos = 1<<numActive; numActive = 8 returns numCombos = 256 what does << means?

well... i need to get rid of this room
google image search for me and you get photos of me proposing my fiance.
06:54
@AbhishekHingnikar lol. Classic.
07:08
so bad it made me chuckle
Ok, time for booze.
!!afk wine time
07:31
@Zirak xkcd is definitely an emacs user ^ (image's title)
i have all reasons to do like this, you only provide the answer, no need to know the reason — Sanjay 44 secs ago
what about no...
"how to make people unlikely to help you"
well, that said, security libraries are often forced down through developers' throats for business matters more than technical matters
his code sounds very much like he just need to create e.g. a hmac hash to sign a request
so it doesn't sound like a case where this is very likely
I'm just saying it's often customers telling you: "use this lib", even if it's stupid.
for example, I know some big companies that require the use of some libraries for security-related code
sounds like this FIPS bullcrap of the us government
where people end up using insecure versions of openssl because those are certified and newer ones with important fixes aren't...
07:41
Bounty here :
1
Q: How to decouple a realtime game architecture

Matt HarrisonI have a realtime HTML5 canvas game that runs off a node backend. Players are connected via Websocket (socket.io). The problem is sometimes I need to deploy new code (hotfixes for instance) and restart the server but I don't want to disconnect players. My idea for this was to divide the websocke...

Hello all
I have a question about security. I am setting cookies on the browser, with Jquery Cookie JS.
However i am concerned with security. Can anyone tweak the cookies on the browser end ?
Like, is it possible to set the cookies on my site, or modify the existing values in a cookie ?
If the cookies are created through js, they can easily be modified. If they're made by the server, you can use the httponly flag on them, meaning only the webserver is allowed to modify
yeah, only the webserver. Sure.
You could always just correct me rather than being all sarcastic about it :(
07:48
httpOnly is not modifiable on browsers that support it
HTTP is request/response... you can always forge the requests
@shasi Just in case you don't trust Florian (who's right) : never base your server security on anything client side. In case of browsers, it's especially easy to forge requests. Tell us your real requirement if you want alternative.
Actually i don't want to put load on the server side. So opting for cookies instead of sessions.
And in fact, i am trusting jquery cookie.js for setting and unsetting cookies on site
I am only concerned if users can modify the cookie data on their browsers to mimic themselves as administrator
Like how Wordpress does.. it does not use sessions internally.. only relies on cookies
for tracking the state of users
I just want to secure the cookie data. So setting cookies from php code (with Httponly) is secure than setting cookies with Jquery.cookie.js ?
You're doing it wrong. Cookies are often a mean to identify the session or make a link to server side authorization parts, they never are trusted to hold the identity of the user.
08:03
@dystroy I am not using any sessions. Just using cookies to store whether the user has logged in, and if yes, his user id or email.
Are sessions really necessary?
Not really if you check at any important request that the client is an admin (not trusting him when he sends you a cookie saying he is, of course)
Guys check it out, I angular'd my account creation page!
@AbhijeetPawar 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.
@RUJordan Why do you have red things flashing when the page load ?
@shasi use sessions. Wordpress uses sessions.
08:10
I think those are CSS errors that flash before angular is loaded -- I think I need to bind-template it
I don't see anything
If you don't know how sessions work, and think about using cookies for that, read how sessions work before that. You'll have to learn how HTTP works too.
@RUJordan it's... just a form?
@RUJordan Yes, they're all those
<span class="error" ng-show="createForm.username.$error.required && createForm.username.$dirty">Username is required.</span>
				<span class="error" ng-show="createForm.username.$error.minlength">Usernames must be 3 or more characters.</span>
				<span class="error" ng-show="createForm.username.$error.maxlength">Usernames must be 30 or less characters.</span>
@FlorianMargaine Well, i had to consider sessions for better security.
@shasi cookies don't offer any security. Use sessions.
but as I said, you'd know that if you knew how HTTP and sessions work.
08:11
@FlorianMargaine you expected mightyness? :P
@RUJordan why would you use angular for that?
to learn mostly
I can't learn just by copying tutorial code -- I have to apply it uniquely
@FlorianMargaine Well, i will use sessions finally
@RUJordan then make an SPA -- the right tool for the job
SPA?
08:14
!!define SPA
@FlorianMargaine My pocket dictionary just isn't good enough for you.
damn you
A single-page application (SPA), also known as single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application. In a SPA, either all necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load, or the appropriate resources are dynamically loaded and added to the page as necessary, usually in response to user actions. The page does not reload at any point in the process, nor does control transfer to another page, although modern web technologies (such as...
@RUJordan ^
Interesting -- a single URL app?
no.
a single html loading doesn't mean a single url app
Oh yeah, that makes sense
08:20
for example, grooveshark is an SPA
you never reload an HTML page
(hence the "single page")
and you handle most of the business logic in the js
including the routing
I wonder, if I have the same route in angular and express, do I get both callbacks
I thought you knew the difference between server-side and client-side?
I do?
I have /index in both express and angular, and they do different things
what happens
doesn't really matter I guess
08:36
I would assume both would be called
maybe, or angular catches it and it's done
I'm making an IDE with ace, and I want to have auto-complete as I declare stuff without having to explicitly parse, do I make it listen to keystrokes and parse?
I feel that might hurt performance
maybe every X keystrokes or seconds
08:54
hello guyd
function abc() {

xyz(n)

// i am doing something
}

function xyz(n) {

if (n) {
// stop executing javascript
}

}
!!tell Rafee format
@Rafee Format your code - hit Ctrl+K before sending and see the faq
sorry, I am injured, I am woeking with left hand.. please bear that
if (n) {
// stop executing javascript
return ;

}
but the function xyz is not stoping, instead abc function executed fully
return stops the execution of the current function
It does not stop execution globally, learn about how control flow works in programming languages - read a book.
08:58
so how do i stop with abc function
"The Art of Computer Programming" could be a nice start for you.
0
Q: How to make an infinite loop inside instance to check some features in JavaScript?

Gelo VolroI've prepared different prototypes for my project, which have different roles. One is for determination aims, other for UI update and else... I've got an issue in one part of it: GC3D.Application.prototype.checkForPendingTextures = function() { this.updatePendingTextures().then( function( d...

@BenjaminGruenbaum Author
09:11
is there any freelancer?
Is this dickish? -
How about two reasons: maintainability and clarity of intent? Obviously, you don't have to use === here, but it's generally agreed that it's better to do so. — phenomnomnominal 32 secs ago
is it reasonable to have 2 directives for 1 element
Hi
Jesse I am
Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: second
help please
@BibyAugustine 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.
09:29
@phenomnomnominal that's fine.
@CustomizedName I want to be a freelancer at the end of this year, I want to know how it feeling to be a freelancer? I hate being stuck in office.
or is there any suggestion for a freelancer green hand
@BenjaminGruenbaum and entirely reasonable right?
Your response? Yes, the edit? Probably not. A comment? Sure.
Well, I started with a downvote so he's just lucky :P
So I have 2 downvotes on an answer of mine that I don't entirely understand. What makes my answer a bad answer? stackoverflow.com/a/22331332/401137
I absolutely agree that the other answer is better, by the way
09:36
and poof they are gone
How come in angular, when I try to $location.path("/") the URL just ends up looking like (original) /create to /create#/ instead of just /? (to trigger my node app.get("/");
what do you mean by create
# is just something it adds
maybe there's a reason
/create is an node route, the "default" is / which will redirect to the login page. But angular just appends #/ instead of just going to /
yeah it does that
but why not just have an http request to /
I feel like a simple redirect would be more efficient
09:45
and why would you redirect to '/'
just redirect to the home template
@SomeGuy +1d but fwiw I'd use querySelectorAll which returns a frozen NodeList
well, unless you're not doing a SPA
which you should :P
I'm not
@BenjaminGruenbaum Ooh, didn't think of that
@BenjaminGruenbaum You should probably add that as an answer
@RUJordan then just do a simple http request, I think $location.path is just for templates
or mostly for templates
09:50
False, just found it. I needed to use $window not $location
If you need to http request for a redirect, that just doesn't sound right at all to me.. it's a redirect after all.
alright then
hmm, but $window is just window isn't it
@SomeGuy feel free to edit it in
Yeah, in an angular wrapper
it's like how setTimeout is $timeout
(kinda)
@SomeGuy then there's the ugly Zepto solution:
var el = document.querySelectorAll("whatever");
el.__proto__ = Array.prototype;
// :P
@RUJordan what in window do you use for the redirect
09:55
@BenjaminGruenbaum Hahaha
$window.location.href = "/"; was the line I needed
It's also for external URLs, since $location is internal routing
(I think)
seems a bit hacky :P
How so?
hmm, idk really, just never seen it
You've never seen someone set location.href to redirect?

« first day (1243 days earlier)      last day (3930 days later) »