« first day (1651 days earlier)      last day (3312 days later) » 

12:02 AM
@towc Aliasing is the devil
@vamsiampolu That will be $2.99/s/s please
 
@Shmiddty I did not get you(aliasing is the devil??)
 
@vamsiampolu That message was not directed toward you.
 
ok, /s/s is per second per ???
 
per second per second
It's a measure of acceleration
 
you want your pay to increase by 2.99 every sec(I should ask my boss about something similar for myself)
 
12:17 AM
Why does passportJS have to serialize the user in Node?
 
To put it more precisely, it would increase by $2.99/s every second.
 
@StevensHaen because if it didn't there would be nothing to deserialize
think about it..
 
Why serialize in the first place?
 
because you need the thing from the server
serialized
 
      $/s - 1: 2.99/s  2: 5.98/s  3: 11.96/s  4: 23.92/s
total pay - 1: 2.99    2: 8.97    3: 20.93    4: 44.85
 
12:26 AM
@StevensHaen Think of the serialized user as a key.
 
@Shmiddty exponential exponent -- I like
 
So I can't just toss around the username as it is?
in free form
 
hii..I have a doubt in anroid app
can any1 clear it for me?
I am new developer.if we use a marvel character of any movie and developing a android application will it cause any legal issue of copyright. Should we ask any permission from marvels before making the app.
 
@SamuelDavid 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.
 
Passport will store session details - serialization is how I connect a user with a session
 
12:27 AM
@SamuelDavid Yes
 
@StevensHaen It needs to be unique (say, the users' id)
@SamuelDavid Yes
 
But no need to ask, the answer will be no
 
^
 
use the passport.initialize and passport.session middleware
 
you could look up some fair use clause
but that would be tough
 
12:28 AM
I'm using passport.initialize() in my current app
So far so good, I'd like to make it check with MySQL before validating though
 
@vamsiampolu He's not asking what to use, he's asking why one should use it and how it works.
 
MongoDB integration is simple
 
@StevensHaen Are you using MySQL as a session store?
Wait, which DB are you using?
 
No, store it in the cookies
No DB so far
but I have an idea how to make it work with Mongo
 
The one that loses your data, or loses your data at webscale?
@StevensHaen Ah, that's fair
(though that's insecure)
 
12:30 AM
I also can make a connection in mysql and use the query
I don't know how to check if the user is validated from the MySQL response
 
@Shmiddty tomorrow I think i'm going to re-write the se-chat-dark theme plus to be es6 with babel
so if you wanna add shit
be prepared
 
aye aye cap'n
 
I think it will be a good learning experience
 
@SomeKittens I don't know how to use other than the local strategy.
 
@StevensHaen With passport, you can check against req.user to see if they're authenticated
 
12:33 AM
@SomeKittens What kind of a response will I get from MYSQL query?
 
@StevensHaen Local doesn't mean cookies, it means database. (local, as opposed to Facebook)
 
I see
 
made this while bored at work today waiting for nmap to finish
 
@StevensHaen some examples here
 
Looks good
Let me try to implement it
 
12:38 AM
@SomeKittens helped me with it
but with google o-auth
 
@rlemon very smoke
 
vapor*
 
crl
"Kerri Walsh – April Ross some other text I don't want", How can I match the two names at the beginning?
I tried: .match(/(\w+\b\w+)/g) but it's not even matching Kerri Walsh
 
a \b can never be between two \w, by definition
 
\b doesn't match a character
 
crl
12:42 AM
Ah, thanks
 
\w+\s+\w+\s+–\s+\w+\s+\w+
 
crl
perfect, thanks
 
/(Kerri Walsh) - (April Ross)/ <-- perfect!
 
crl
hehe
 
@Shmiddty too much capturing
 
12:50 AM
Nay! Carpe diem!
 
swag
 
420sweg
 
hello again Kendall
 
ohhhh musammmaaaaaa
 
CAAAANNNAAAADAAAA
oh wait
 
1:01 AM
KANEDA!!!!!
TETSUO!!!!
 
HOCKEY
POUTINE
SORRY
 
A BOOT?
 
I don't want to drive home yet, traffic... but I'm basically done with today's work and don't really want to start in on tomorrow's yet.
 
Should I get the Humble Origin Bundle?
 
Definitely don't wank in the bathroom. Bad idea.
 
1:03 AM
So many games, no idea if I'd like any of them
 
What is in it?
 
Looks like a bunch of old games
 
Peggle
only peggle
 
DA:I is pretty good, but I haven't bothered to beat it yet
s/beat/invest time into/
 
1:05 AM
I saw Zirak playing it
 
Yeah
 
looked boring as fuck
 
It's one of those expansive non-linear games
The combat is a little clunky, but not too bad
@AwalGarg you should invest all of your money into a bitcoin mining farm.
!!afk vidja game night
 
4 more days...
 
I'd get it if it came with the first Mass Effect (the only Mass Effect worth playing)
However... it does come with Medal of Honor: Allied Assault (the best medal of honor)
Welp, time to actually pack, since I'm moving tomorrow... I procrastinate so hard
 
1:17 AM
s/astin/e/
 
@KendallFrey nice!
Ill buy it on gog as well, I originally bought it from the devs website
You guys see the crazyness with Steam today?
 
no...?
 
Pay for mods.
Terrible terrible terrible thing.
Also Valve takes 75% of the money
 
oh, saw that, didn't realize it was new or noteworthy
 
1:25 AM
yea man, mods are generally free, or you donate to the authors, but now.. they are being put behind a paywall
its insane. Thats one of the beauties of PC Gaming.
 
there's nothing to make mod authors charge, is there?
surely free mods are still a thing
 
incentive is $$ of course :P
 
fuck $
 
also there is the added bonus of paying for a mod, the game updates and the mod breaks
author doesnt feel like fixing it..
 
1:26 AM
you're out your money
 
I think mods and DLC fall into the same boat here
most should be free
 
I agree to an extent, however DLC are officially supported
mods have no such support
 
true
 
people on reddit are going insane about it
 
oh, and besides GOG, they're selling a collector's copy on GamersEdition with some swag
 
1:28 AM
which I 100% agree with. Add a donate button.. but not a friggin paywall
nice
 
@Loktar for everything
FOSS FTW
 
oh also people are posting others mods and charging
 
FOSS does not make sense for everything.
 
mods they didnt even make.. but where is the line.. considering mods modify copyrighted content to begin with
 
@Loktar that's just shameful
everything would be easier if all software was wtfpl
 
1:34 AM
well I dont think that necessarily, I think more in the middle I guess
Im fine paying for software, but I expect a level of polish/support when I pay
 
!!s/oftware/ex/
 
@KendallFrey Im fine paying for sex, but I expect a level of polish/support when I pay (source)
3
 
hahah
 
1:54 AM
whoever decided adding a deadzone by default to a racing wheel control scheme was a twat</rant>
 
2:18 AM
Fuck a duck... the apartment I'm moving to probably doesn;t support Xfinity, so I'll have to pay to cancel my contract with them, and settle for super shitty AT&T internet thats gonna be slow as bricks... not happy.
 
2:58 AM
passport.use(new LocalStrategy.Strategy(function (username, password, done) {
    var query = connection.query(
        'SELECT id FROM names WHERE id = " + id + "', function (err, result, fields) {
            if (err) throw err;
        });
    if (result) {
        //this is the user obj, will be accessible in req.user
        done(null, {id: username, name: username});
    } else {
        done(null, null);
    }
}));
How do I check in the database for the id from passportJS?
 
@StevensHaen You don't get an id there - you'll need to check against the username
This is a good reason to require something unique for the username (like an email)
 
How do I check against the username in SQL? How do I squeeze the variable in there?
 
Firstly, you should learn about SQL escaping
 
3:13 AM
There's no SQL injection there
The quotes are wrong
 
Please, tell me how to do this. I really have to have this done before I go to bed, I don't have time for research.
 
@StevensHaen Are you a student?
 
No more, graduated this year
I mean last year
 
@copy yup, I read that incorrectly
 
@SomeKittens Kinda like youtube.com/watch?v=5fKM6UyFecE
@StevensHaen You'll need to learn how to program one way or another if you want to stay in your job
For short-term solutions, use stackoverflow.com
 
m59
3:32 AM
// i need to do this
getUserByEmail(email).then(function(profile) {
  socket.emit('user-authenticated', profile);
});
I have io from socket.io.. not sure how to incorporate the on('connection') to get the socket
 
3:45 AM
@copy I see info on escaping SQL only for PHP
 
m59
nm, just need some promises
 
3:58 AM
I see a whole bunch of warnings when trying to install mongodb with npm i -g mongodb
 
4:11 AM
that's not how you install MongoDB
@StevensHaen Go look at the official documentation
 
I installed the .exe now
I'm more used to managing my DB through the shell, as opposed to node
I wanted to install the mongodb driver, not the database itself
@SomeKittens Is mongoose a replacement for the mongodb driver?
 
4:28 AM
I think so
 
Why does it want a database name after the port number? mongoose.connect('mongodb://localhost:3000/my_database');
 
5:02 AM
@StevensHaen So it knows what database to connect to
 
5:33 AM
@AwalGarg no issues, its your
I made a mistake by not buying from system76.com .... god I hate arch, I hate my PC
 
5:54 AM
@StevensHaen mongoose is more than a "driver", it's a library for creating schemas
 
i want to align this two div to center how to do this
 
@greenhorn jsfiddle doesn't load for me for some reason, but use flexbox unless you have to support old-ass browsers
 
i'm going to develop web application with node js and mongodb
 
@ivarni okay
 
5:59 AM
 
i just want to know which UI js framework is best for communicating node js and mongodb
@ivarni can you guide me on this ?
 
@ivarni thank you
 
@GurumoorthyArumugam any of them will work fine.
 
yeah but i want to know which is best in all the aspect like
performance, quality, online help etc
 
There's not "best" framework just like there's no "best" car
(Audi RS6 excluded)
 
6:03 AM
LOL
 
Angular, Ember, React, pick one
 
But seriously, ask 5 people what the best framework is and you're likely to get 5 answers
 
can you give some framework name which you used and feel better
 
@GurumoorthyArumugam though seriously, don't use MongoDB
@GurumoorthyArumugam I'm a bit biased
 
do you really want some random person on the internet to decide what you'll build your app on? without knowing anything about how good a dev they are? or even knowing if they've actually tried the frameworks they talk about? I wouldn't.
 
6:04 AM
any other suggstions for this content alignment
http://jsfiddle.net/y37dsvf7/4/
 
@ivarni I believe that picture provides sufficient proof I know my way around Angular.
 
I like backbone and react, I don't like ember, I'd be on the fence for a while with Angular, especially if targetting mobile and maybe wait for 2.0
@SomeKittens Yeah, I've spent 2 years working full time with Angular, I think I know my way around it :)
 
What do you think of 2?
 
@ivarni i just asked the suggestion in public chat it up to you to give or not give ..
@SomeKittens thank you :)
 
@GurumoorthyArumugam I did give my advice, my advice was to do some research and see which one fits your needs
 
6:07 AM
@GurumoorthyArumugam not sure what I did, but you're welcome
@ivarni I'd say that "Asking for opinions" counts as research
 
@SomeKittens Only if you know the credentials and biases of the person answering ;)
 
Typically, I go for quantity in this case
 
The best research would be to implement a simple app with each of the candidate frameworks and see how they run, kick the tires so to speach. It's a major decision why not spend a few days making it
 
@ivarni okay i'm new to Java script and web development, so i didn't know where i have to start and which is best. i can see there are lot of JS framework on internet so was confused to choose best one.
thats why i'm here :)
 
@GurumoorthyArumugam Like I said, I'm an Angular guy, but there's no shame in Ember or React.
You're waaaay overthinking this
Pick one and learn!
 
6:14 AM
^
 
anyone know how to make this work:
.search_input{
width: 50%;
}
 
@GurumoorthyArumugam I'd say give Ember, Angular, Backbone and React a spin, those are the most used ones
Backbone is growing old and is probably falling off the bandwagon though
Stay clear of the 3000+ smaller frameworks
 
the css room is dead ATM
 
Be aware that once the 2.0 version of Angular lands you may or may not have a clear upgrade path, maybe @SomeKittens has some inside info on that :)
 
6:17 AM
@ivarni Pretty much all 2.0 dev/planning is public
(and for the record, I'm only on the devtools team)
 
okay @ivarni thank you ..
my manager said something about Keystone JS framework is that good for using node js and mongodb ?
 
3 mins ago, by ivarni
Stay clear of the 3000+ smaller frameworks
 
@GurumoorthyArumugam Well, are you making a CMS?
 
anyway, bed time
 
I've made a site using keystone.js but it would be the wrong choice unless you need a CMS, and it's not really a frontend framework
 
6:19 AM
!!afk comatose while hallucinating
 
it works under the assumption that you'll generate your HTML serverside using node
 
@ivarni yeah
 
@GurumoorthyArumugam Right, that changes things. If you pick ember/react/angular for that you'll have to do a lot of work on your own. I'd say keystone.js is a good pick but it's also the only one I've used so there might be better ones out there
keystone gives you the admin UI for free and provides a nice hook into both node and mongo, I found myself mainly focusing on writing the actual site instead of doing all the plumbing myself
you can probably pair it with ember/angular/react if you have a lot of client side functionality as well, though I didn't find the need to do that
depends on context
 
hi guys,
I want to see whether user visits my website by clicking on shared content on facebook or not
any idea how I can make it?
 
6:37 AM
@ivarni thank you so much.. Let me go ahead with keystone.js :)
 
I feel very mad today
 
@argentum47 but it's rebecca-day
 
ah .. then my rebecca-stereone is disbalanced I guess
 
good morning ;)
 
6:51 AM
how to delete a bit from a byte. like I want to remove every third bit .... which is 1.
The situation is like this, for a combination of options marked 1,2,3,4,5,6,7 a bit , '1' for selected, '0' for not. so for existing data I have to set the third bit to 0 , if its not 1 ...
One way I thought of was doing an XOR .. like say its 011111 XOR 001000 .
But someone doesn't like it .. what are the ways to compact it ?
 
you lost me at "delete a bit from a byte", do you mean you want to flip it?
oh wait, yes, it seems you wrote that on the next line, ignore me
!!afk coffee
 
7:08 AM
@argentum47 Go through 1-7 and add set the bit like value |= (1 >> n) ?
 
@RoelvanUden what does this do ?
 
7:24 AM
@argentum47 (Sorry, you have to use << not >> I just woke up :P) 1 << n moves 1 bit n positions, so if you do 1 << 2 you get 4. Then |= is just a short hand for value = value | ?? so it is an inclusive OR assignment, meaning you get all bits set to 1 from value and the ??. Effectively, you can set your bits very easily like this.
 
ok ... brb
 
So.. if you do this:
!!> var value = 0; for (var i = 1; i < 7; i++) value |= (1 << i); console.log(value);
 
@RoelvanUden "undefined" Logged: 126
 
There you go. All bits from 1 to 7 flipped.
 
ah .. cool
 
I have to digest so it is an inclusive OR assignment, meaning you get all bits set to 1 from value and the ?? this part
 
Tx3
Any idea why this Bluebird promise goes to .then instead of .catch even if I get Unauthorized?

http://pastie.org/10111124
 
its like a normal digital OR gate right ? then its ok
 
@vamsikrishnamannem 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.
 
7:33 AM
@Tx3 A negative response is still a response. You can call your failure handler based on a condition
 
promise
 
Tx3
@JanDvorak Bluebird web-site has an example that is quite similar what I have been trying. This should not work (you need to scroll little bit down on the linked section) -> github.com/petkaantonov/bluebird/blob/master/…
@JanDvorak if you search for "Example of using a predicate-based filter"
 
0
Q: Instafeed JS possible conflict?

Tim SalabimAdded instafeed.js to my website and successfully styled it. Now trying to add a roll over feature which highlights each icon... Added css, then changed script and it won't respond as it is supposed to. Debugged and no errors.... <script type="text/javascript"> var userFeed = new In...

 
@argentum47 1000 | 0101 yields 1101, that's inclusive (where a bit is set to 1) and OR (when EITHER of the two bits is 1). Say you do an AND on 1000 and 0101 you would get 0000 because there is not a single bit that is set on both bits.
 
7:39 AM
@TimSalabim Terrible question. What is it supposed to do? What is the error? What did you even want? What is instafeed? Why is there nothing reproducing the issue others can play with?
 
Ok sorry 1 sec
 
Tx3
@FlorianMargaine Thanks!
 
@Tx3 Not sure about the example, but from the wording I'd expect it to only filter errors. You still have to raise one conditionally.
Also, not sure how it tells between an error constructor and a predicate
 
@RoelvanUden gotcha
 
I have created a js fiddle and updated question. Thank you for pointing that out.
-1
Q: Instafeed.js - Instagram script CSS Styling Not Applying To Elemements

Tim SalabimAdded instafeed.js to my website and successfully styled it. It is a feed to show instagram photos on a website. This worked correctly. Now trying to add a roll over feature which highlights each icon... Added css, then changed script and it won't respond as it is supposed to. Debugged and no ...

 
7:48 AM
@ivarni @argentum47 can you tell me why that error is coming ?
 
@GurumoorthyArumugam ivarni is afk: coffee
 
@TimSalabim There's still nothing in that question explaining what it is you're trying to do
 
@GurumoorthyArumugam why them?
 
I thought I wrote it!
 
You didn't :-)
 
7:49 AM
@GurumoorthyArumugam MongoDB is not running, you need to download, install and start it
 
It does say it. I just hightlighted it
 
@GurumoorthyArumugam "Error failed to connect to [localhost:27017]" is just a clumsy way of saying "where's my database?"
 
@JanDvorak :) i had a discussing with them couple of minutes before.
@ivarni ok let me start the data base
 
:22897494 No, the bson error is more of a warning, it runs fine without it
 
ow... I had to set the alias pyhon=python2.7 .. it has been a long time since I used mongodb
 
7:53 AM
 
@RoelvanUden @ivarni
Is my question clear?

http://stackoverflow.com/questions/29841421/instafeed-js-instagram-script-css-styling-not-applying-to-elemements
 
can anybody add to this?
1
Q: JavaScript: Object inheriting from Function.prototype

shmuliI was testing out James Shore's Object Playground, and I see that all methods inherit from Function.prototype, including the methods on the global Object.prototype. How does that work? Isn't that kinda circular? I mean... doesn't the Function.prototype "itself" inherent from the Object.prototype?...

 
why i can't access the con.decodedata() ? pastie.org/10111146
I'm still learning using module,I apologize
 
@shmuli add what?
 
8:09 AM
Weee, new timetracking system. Requires IE...
sobs
 
@BenjaminGruenbaum can you address the circular-ness?
 
@shmuli what circular-ness?
 
@ivarni Maxthon: almost not IE.
 
@BenjaminGruenbaum am I still not understanding?
 
@JanDvorak Oh that's an actual browser? I've seen that in the GA stats for our app but I thought someone was just trolling us
 
8:11 AM
@shmuli what are you asking about?
 
Soon there will be Spartan
 
Seems the timetracking is extremely closely integrated with windows and AD though, pretty much the same shit for me even if it works with Maxthon because I'll still have to switch browser to track hours
It just baffles me that in 2015 there are still browser-specific apps being made, it makes me loose faith in my own field of work
 
@JeremyBanks why did you reopen that WeakMaps post? Both the OP and the author have left SO and the answer is blatantly incorrect. I know it because we know the guy who wrote it and he has no intention of coming back to fix it.
 
why is it a "rule" that the better, more notable web developers have terrible sites showcasing themselves?
take d crockford for example... d flanagan... k simpson.
 
The better showcases are reserved for designers
 
8:20 AM
Is Crockford a notable web developer? I thought he was mainly involved in language development?
I think he cares more for fiddling with the engine than fixing the paint-job
 
@shmuli I cringe at those comparisons and putting all these people in the same category, but ok.
Also, crockford is definitely notable, both for "The Good Parts" and JSON, also some other stuff.
 
@BenjaminGruenbaum why cringe?
 
@shmuli let's just say some are better than others...
 
can someone help me on this, I cant access the decodedata() pastie.org/10111146
 
this.decodeData = function(){}
But con needs to be called as a function first.
 
8:35 AM
@BenFortune, Thank you for the reply...what you mean by called as function ?
 
...
 
var con = require('./convert')();
 
yes i have that code
 
Though there are many ways to do it, and this probably isn't the one you need.
I suggest you read this if you haven't already.
 
Thank you..
 
8:37 AM
@jemz Just make convertData an object, not a function
 
I'm still new in using module
 
I don't think modules are your problem.
 
@Meredith, you mean
convertdata = {

decodedata:function(){
console.log("hello"):
}

};
 
You gotta understand how objects work in javascript
Yeah like that
 
woohoo, another +100
 
8:45 AM
Morning :)
 
@BenjaminGruenbaum Wah?
 
@BenFortune, why we should put () in the last part
var con = require('./convert')()
 
It calls the function when you require it.
 
I am submitting my form using jQuery - however e.preventDefault() and return false does not seem to be stopping the form submission ...... Anyone else seen this??
 
@BenFortune answer that got to +100
 
8:46 AM
Damn, nice.
Mine barely go over 2 :c
@JustSteveKing Code?
 
closures
 
$('.submit').on('click', function(e) {
e.preventDefault();
return false;
});
 
@JustSteveKing,remove the return false
 
@jemz Still submits :/
 
@BenjaminGruenbaum nice one, I'm stuck at +72 and tbh it was not really that great an answer in the first place
 
8:48 AM
I rep whored the shit out of a deprecated method for a popular library
 
it's google ranking bingo tbh
 
@JustSteveKing, add Id to the buttons submit then use it in your .on click
$('#idbutton').on('click',function(e){e.preventDefault()}
 
@jemz I think that worked .....
 
@BenFortune haha
 
Slow work day, might move my stack over to hapi
 
8:55 AM
@BenFortune,
I tried this,but it works without appending () in the require.

var hello = function(){

console.log("hello");
};

module.exports = hello;



then i require it

var hello = require('./hello');

hello(); // hello
 
Because you're calling the function.
And that's not what you had before, so my answer is now invalid.
3
Q: How to make it simple in node js

user3699262I am trying to make it simply synchronize concatenated string which starts before the function and ends after the function. Please see the code snippet and make it simple to get the output like: <products> <proudct_name>Product1</product_name> <proudct_name>Product2</product_name> <proudct_name>...

Why are these questions getting upvotes?
 
@BenFortune colleagues, friends, and mothers?
 
@ivarni It's been happening for the last week in . So many shitty questions getting upvotes
 
ok
 

« first day (1651 days earlier)      last day (3312 days later) »