« first day (2127 days earlier)      last day (2823 days later) » 

12:07 AM
if ([ null, undefined ].indexOf(sellModel.listing.isClassified) >= 0) {
    sellModel.listing.isClassified = true;
}
:(
 
12:17 AM
Guys
17
Q: RESTful Login Failure: Return 401 or Custom Response

MattThis is a conceptual question. I have a client (mobile) application which needs to support a login action against a RESTful web service. Because the web service is RESTful, this amounts to the client accepting a username/password from the user, verifying that username/password with the service,...

Can you chain inside of app.use() or what
like app.use(isAuthenicated)
and then
function isAUthenicated(){does some stuff.... next()}
Oh crap that's the wrong link, I meant this one
7
Q: How to protect static folder in express with passport

toutptI have a project based on express with a required authentication based on passport. The backoffice is an angularjs app served as static files. My authentication code is completly based on https://github.com/jaredhanson/passport-local/blob/master/examples/express3-no-connect-flash/app.js To do ...

 
12:38 AM
Try this answer, @komali_2: stackoverflow.com/a/21170931/956900
 
12:53 AM
does it sound like a good idea to
proxy webpack dev server behind my api server?
 
1:07 AM
for development or production?
webpack has a library version of the dev-server features for you to integrate.
 
@Luggage dev
My case is a little complicated, I need to emulate a classical webapp
webpack dev server will let me proxy requests
but I only want to render the UI at one endpoint
rest all are to be handled by my server
 
webpack dev server uses websocket, so that might be a problem for proxy. not sure
 
node-http-proxy supports websockets
 
I just run webpack --watch in one terminal, and then just serve the generated static files from my express server.
 
@Luggage how do you handle HMR? Handle hashes?
 
1:15 AM
I don't.
 
D:
cmd + r ?
 
I don't use webpack-dev-server, only webpack --watch
yea, command r :(
 
you.... you.... you'rr fingers!
 
yea..
 
Man have some beer!
 
1:17 AM
It would take a lot of work to get HMR worked in, at this point.
 
noo
 
@Abhishrek Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
God dmanig cap
  new WebpackDevServer(compiler, {
    contentBase: path.join(__dirname, 'build', 'assets'),
    hot: true,
    stats: {
      chunks: false,
      colors: true
    },
    proxy: {
      '/*': {
        target: 'http://localhost:8080',
      }
    }
  }).listen(3000);
@Luggage ^ I ended up with this
 
1:37 AM
where ever searching, i got the response for cross tab communication. But i want to know how to stop cross tab communication in the following scenario. Your help appreciated.

http://stackoverflow.com/questions/38897671/how-to-stop-cross-tab-communication-in-postmessage
 
@raja.s Welcome to the JavaScript chat! Please review the room 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.
 
@CapricaSix did i missed anything? i thought some people are online so asked.
 
@raja.s mom said don't talk to strangers warna rishta ho jayegi
 
!!ban @litlepootis
 
@Luggage I couldn't find @litlepootis.
 
1:41 AM
j/k :)
 
Blimey!!!
  new WebpackDevServer(compiler, {
    contentBase: path.join(__dirname, 'build', 'assets'),
    publicPath: '/dashboard/',
    hot: true,
    stats: {
      chunks: false,
      colors: true
    },
    proxy: {
      '*': {
        target: 'http://localhost:8080',
      }
    }
  }).listen(3000);
will only render /dashboard/
and let everything else proxy through :D
 
Don't talk to strangers otherwise you'll get into a relationship.
Probably means : You'll be married.
 
Don't ask me to explain, I deprecated indian-humor@0.0.1
along with you guys :P
 
1:47 AM
:( i came here to get the ans for my question!!
 
me too
Do you have a question to my answer?
To get more views, add a tag.
 
2:11 AM
lol
 
Ermmm...what happened?! https://t.co/pdta7EpP2k
the replies
 
Samsungs Reply D:
@littlepootis do you ever not steam?
 
I steam no more than an hour a day
> 32.4 hours past 2 weeks
I mean
something like that
 
 
1 hour later…
3:47 AM
For some reason when I work with the lights off, moths seem to materialize from nothing to sit on my screen.
 
5:03 AM
Text analysis (with code and charts) shows that Trump is more angry than his Tweet stream shows. Top 3 differentiating words: 'badly,' 'crazy,' and 'weak'.
 
5:40 AM
{"isFulfilled":true,"isRejected":false,"fulfillmentValue":{"customEmails":{"emails":[{"isEnabled":true,"engine":"liquid","subject":"Plan Assigned (Subscribed)","from":"","code":"","name":"Plan Assigned (Subscribed)","slug":"assigned","type":"PLAN_ASSIGNED"},{"isEnabled":true,"engine":"liquid","subject":"Plan Upgraded","from":"","code":"","name":"Plan Upgraded","slug":"upgraded","type":"PLAN_UPGRADE"},{"isEnabled":true,"engine":"liquid","subject":"Plan Cancelled (Unsubscribed)","from":"","code":"","name":"Plan Cancelled (Unsubscribed)","slug":"cancelled","type":"PLAN_CANCELLED"},{"isEnabled"
I was loading this from file and trying to find out whats wrong with my await because it seemed to return promise :-|
 
:D
We all have our moments
 
6:03 AM
Anybody has knowledge on angular2 router?
 
 
1 hour later…
user3119231
7:15 AM
good morning you little nerds
 
Is it a better idea to validate a form with plain jQuery, or a better practice to use the jQuery validate plugin? Performance wise?
 
user3119231
It's always better to do it plain
 
user3119231
performance goes this way: VanillaJS -> jQuery / VanillaJS Plugins -> jQuery Plugins
 
I see. Made sense to me. But mosly Google results have to do with this one specific plugin, when it comes to validation
 
user3119231
vanilla-js.com check ops per second
 
7:34 AM
However, under my network tab in Chrome, I just saw jquery.validate.min.js to be just 9.6 KB. This is hardly a tradeoff. It's gzipped as well
 
user3119231
If you want to use jquery just go on
 
I'll use jQuery regardless. I just don't want to bloat it up additionally with the jQuery plugin
that's all. I use the one hosted on Google, so most clients will have it cached anyway
 
Any good free gant charts that people have good experiences with?
 
this might be a stupid question so i didnt want to make a post and i know there is a Angular chat but its dead at the moment. how to i have a expressions inside double braces trigger if it is inside a json that is being shown with ng-repeat? thanks for any help
 
@may19c19 Welcome to the JavaScript chat! Please review the room 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:47 AM
window.location.reload() inside ajax call failed to work..
here is my code
  $.ajax({
                type: "POST",
                url: "/",
                contentType: 'application/json',
                data: JSON.stringify({"vehicle_no_and_date": vehicle_no}),
                success: function (data) {
                    $('.close').click()
                    window.location.reload(true);
                }
            });
 
Unsung Hero badge
dayum
 
user3119231
@AvinashRaj what does console say?
 
console says nothing.. My page just blinks, it won't do the actual reload.
Once I manually reload the page, deleted entries are gone. THis is what I expected..
 
user3119231
try location.reload();
 
won't work.. It does the same like window.location.reload
 
user3119231
8:02 AM
Can't reproduce the error. Please create a fiddle.
 
user3119231
^ I don't think it's done with picking another way
 
Googled always and not pooled ;P
 
@Maurice if I do like this,
success: function (data) {
                    alert(data + "sa");
                    window.location.reload();
                }
 
@AvinashRaj Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
8:05 AM
it alerts the data and then it reloads the page..
so, It expects some time..
 
user3119231
try:
 
better using javascript then jquery!
 
user3119231
setTimeout(() => { window.location.reload(true); }, 1000);
 
@Maurice ya, works..
 
user3119231
you're welcome!
 
user3119231
8:07 AM
the click function needs some time to execute
 
user3119231
or you have to put the refresh in the callback of the click function
 
$.ajax({
    url: "",
    context: document.body,
    success: function(s,x){
        $(this).html(s);
    }
});
this?
 
user3119231
what u talking about?
 
97
A: How can I refresh a page with jQuery?

PeterTo reload a page with jQuery, do: $.ajax({ url: "", context: document.body, success: function(s,x){ $(this).html(s); } }); The approach here that I used was Ajax jQuery. I tested it on Chrome 13. Then I put the code in the handler that will trigger the reload. The URL i...

nice for use setTimeout why the document should be working some bit and can't update the page @Maurice .
 
user3119231
It's because he needs to put the refresh line into the callback of the click function. That's all.
 
user3119231
8:12 AM
$(".close").click(function(){ window.location.reload(true); });
 
morning
 
Thanks @Maurice bye..
 
guys I fixed the problem I had last night with Pool is not a constructor. now I ran into something else. Here is the current version of my code. gist.github.com/barbu110/… Now why do I have to bind every class method to its scope? Shouldn't that be done by default?
 
user3119231
8:29 AM
@Neoares o/
 
@Maurice \o
lul
 
!! friday
 
8:45 AM
@Victor this.bar = this.bar is this.bar = this.constructor.prototype.bar in the constructor so calling instance.bar() will be same as calling Class.prototype.bar() so this won't refer to instance .. you have to bind it..
 
!!nudge 5
 
@SagarNaliyapara You iz in mindjail
 
Great @CapricaSix
Thanks @CapricaSix
 
rekt
 
user3119231
@CapricaSix <3
 
8:56 AM
@Maurice
@Luggage
!!unban @littlepootis
 
user3119231
u ok?
 
life sucks
O hai Maurice!
 
user3119231
girls do
 
user3119231
o/
 
bah dum tssh
\o
 
8:58 AM
@Maurice you ban me
why?
 
user3119231
Reason: Illegal activities in the darknet
 
:-)
 
o/
 
\o/
 
9:02 AM
8
Q: JavaScript split() string to array of integers

RulerNatureI have a string that should be executed as an array so: var q = "The, 1, 2, Fox, Jumped, 3, Over, 4"; var z = q.split(','); If I use split() will create an array of strings [‘The’, '1', '2', ‘Fox’, ‘Jumped’, '3', ‘Over’, '4'] and I don’t need that I need an array like: [‘The’, 1, 2, ‘Fo...

How did this question get 8 upvotes??
 
any possibility for a guy to chat with less than 20 points?
maybe with moderator's recommendation? (Indian way)
 
where to start javascript, i am just born boy for js, help me to improve my skills .
3
 
it's a google friendly question
 
Meta effect
 
he hates google
 
9:03 AM
It's 2 hours old and the quality is just terrible
 
I need proper variable names for this function.. :/ jsbin.com/nesazacacu/edit?js,console,output
 
@mr
@Mr_Green what i am not getting
 
@Jonathan oh you're right, didn't catch that
12 upvotes and 5 downvotes, wow
 
I'm really curious now tbh. What is going here?
 
Wow, we have a tag for
 
9:07 AM
wow
 
I've flagged questions like that before for suspicious voting. Some come back helpful, some come denied
 
@Mr_Green what do you mean by indian way?
 
Indians do things with recommendation
 
const every2 = (arr, pred) => {
  	let failcase, result;
    arr.every(e => {
      result = pred(e);
      return (result) ? result : (failcase = e, result);
    });
    return [result, failcase];
};
 
@Mr_Green shut up you can not say like that
 
user3119231
9:09 AM
@SagarNaliyapara You don't have permission to say that.
 
user3119231
!!ban @SagarNaliyapara
 
@Maurice The user will be thrown into mindjail in 1 more invocations
 
@cswl strangely it works on every other class in my project (but those are not extending anything)
 
@Maurice you owner?
@SagarNaliyapara I didn't say anything which offends. did I?
 
user3119231
I'm templar
 
9:11 AM
!!ban @Maurice
 
crickets
 
templar assassin
 
@Maurice enjoy and cheer
 
@cswl Why do you use const every2 = (arr, pred) => instead of function every2(arr, pred)?
 
@Mr_Green forgot it whatever it is
 
user3119231
9:12 AM
No human (civilist) can ban me. I'm immortal.
 
well, I can block you :P
 
user3119231
Well, you can (try)
 
!!s/rt/r/
 
@Mr_Green o/
 
@ivarni No human (civilist) can ban me. I'm immoral. (source)
 
9:13 AM
o/
haha
 
user3119231
fu -.-
 
Think about it though, it sounds more fun being an immoral assassin than an immortal one
 
!!urban immoral
 
user3119231
I thought assasins and templars were enemies.
 
9:17 AM
Hi people, I would like some javascript related advice. I have a tomcat/apache server, and I would like to load some javascript for UI development. I read that require and package managers are the place to be, so I would like to work with that. But I am getting lost in the forest of the javascript eco system.
My question: What package manager can work with apache/tomcat, download my libs, and then use require to load my javascripts? Or is this not possible?
 
@kcid Welcome to the JavaScript chat! Please review the room 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 tried to get it working, so I downloaded npm. But I think it is optimised for node.js, not for tomcat. So require won't work.
 
@rlemon
 
I could download require.js, but does it integrate with npm?
So many questions?!
 
user3119231
9:25 AM
 
@Maurice :D
 
@Victor jsfiddle.net/remx7ntn so it depends if it's own prop or prototype prop... i haven't actually checked all of your code so i'm not sure.. :|
@OliverSalzburg arrow functions, arrow functions everywhere :O
 
user3119231
9:47 AM
ES6 rulez
 
@kcid you can't require modules installed through npm, those living in node_modules, on the front end (so client side) with requirejs
 
@bitten Sure you can, if you have a build system
 
@BenFortune not directly, though
 
@bitten, so for the front end, what do you recommend?
 
@kcid Have a look at jspm
 
9:50 AM
like out of the box
 
@bitten Unless you're one of those insane people who have paths to node_modules
 
Is there a way to determine if a variable is a Set? I'm surprised there's no `Set.isSet.
 
@BenFortune That looks like the thing I need indeed
@BenFortune Thanks
 
@kcid webpack
 
@BenFortune haha, well yeah, anything is possible but not everything is recommended
@kcid well i have a different workflow so i'm looking into webpack, but as Ben said jspm
 
9:55 AM
hi all
Can some one please tell waht will be da reason that web page load in firefox fine and chrome is not ??
 
@bitten It's not the best, but it's the closest to your requirements. I'd recommend webpack.
 
My situation is I call a API. but chrome says there is a internal server error and firefox load it fine
 
@kcid by the way, npm is a package manager for javascript and it helps you manage libraries for nodejs and browser environments, it's a tool like git and it can live along side tomcat so don't worry about that
 
so... opera is frigging amazing
can't really find many critics for it online. Maybe because noone actually uses it, but still
 
@towc what happened?
 
10:00 AM
Cool, thanks guys, doc reading time
 
it's just amazing, how it handles the network, security, but also keeps performance and functionality up basically as much as chrome
I just wished the logo looked different, but oh well
 
i started using chrome for it's webtools and then just.. never left
 
opera's dev tools are just as good as chrome's
 
@Oleg typeof variable_name!='undefined'?'Variable is set':'Variable is not set'
 
I think they're the same
 
10:02 AM
@localhost Welcome to the JavaScript chat! Please review the room 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.
 
really?
 
yeah, opera is basically chrome
 
well til
 
just doesn't send data to google, acts as a vpn, minimizes traffic, has a high-performing built-in adblocker...
sadly doesn't have a huge support for gtk themes
 
@NoughT can you create jsfiddle for it?
 
10:04 AM
i liked the look of brave mainly because it looks fun how it's in electron and it's open source
 
lel build | failing
 
fun as in i was able to fork it and edit the theme a bit :3
hahah i don't think it was like that a few weeks ago..
 
dunno, builds from small-ish teams with basically no legal implications can't take security issues very well I'd guess
 
it's a nice push for electron though
 
sure
expecially the "failing" part
 
10:08 AM
i'm using nylas for emails now, started to get into atom although it's slow, then i was looking at brave.. then i released that my 3 most used pieces of software all run on electron
@towc haha >.>
 
did you try protonmail?
probably doesn't run on electron, but it's amazing as well
 
i have an account there actually
but they don't allow 3rd party addresses?
like their client is baked into their own api
 
they do
 
@Oleg instanceof
 
10:13 AM
I'm in the states, currently in JFK, already forgot how this place looked.
 
well i'll have a look at it
 
!!> const set = new Set(); console.log(set instanceof Set)
 
@BenFortune "undefined" Logged: true
 
@BenFortune thanks
 
nylas is so good though, a really nice multi account support
 
10:16 AM
@bitten It was too slow for me, I use postbox now
 
@BenFortune such a minimal ui
 
I don't like the fact they synchronize your emails to their servers either
 
@BenFortune is it encrypted?
 
JS sets are so unergonomic :/
They feel so Java'ish
I would have much preferred immutable sets that chain in the language
and use proper indexers
Or something like that
 
10:35 AM
I have 12 JS functions each of them have a jQuery ajax call,on document ready each of the 12 function is being called but it seems that the response of 2 ajax call is same which should not have been
can the responses mix up like that?
 
@techie_28 If you have weird code, everything can happen
And 12 jQuery AJAX call on page load sounds like weird code to me
 
@techie_28 if you need to make 12 ajax calls when the page loads - you have a problem
 
nim
hello
any body knows the jqgrid plugin?
I just stuck with checkbox can not reatin after sorting.
any help?
 
@nim Welcome to the JavaScript chat! Please review the room 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.
 
Well all of them fetches JSON and it was a requirement so it is there
 
10:42 AM
@techie_28 sounds like the server needs to be smarter
You need your server to understand aggregate queries and your client to make a single request
 
nim
sure caprica
its for me only, not for around people
 
@BenjaminGruenbaum not sure what that means
they all get completed.. should not they be aborted or something if the browser has limit?
 
@techie_28 instead of the client doing /call1 /call2 /call3 /call4 /call5, your client code for ajax should wait for 2ms before dispatching a request and then it should dispatch a single /aggregate?calls=1,2,3,4,5 and route results back to different components.
That way, you make a single request.
No, they will be delayed, not aborted, browsers typically make up to 6 concurrent XHR requests, but the latency is going to be a bummer for clients.
You might want to opt for something like GraphQL if it's 12 requests - that's a lot for an initial page load.
If someone is using an iPhone and has 200ms latency in either direction to your server and their browser makes 3 concurrent requests - they have almost a 200 * 2 * (12 / 3) = 1600ms delay for no good reason.
 
Someone doesn't like me.
 
ohai js o/
 
10:46 AM
I don't know who is doing all the flagging - but they're tracked by mods and if you keep doing that you'll get banned here and on the main site.
 
@BenjaminGruenbaum Way ahead of you
 
@PeeHaa ghello
 
Oh hey @BenjaminGruenbaum! I know your from the JS FB group, ur quite active there!
 
@AgafadaEm Welcome to the JavaScript chat! Please review the room 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.
 
10:49 AM
@AgafadaEm I'm way more active here then there - and I'm usually more active on GitHub than both. But hey!
Have we met? Your alias doesn't really give me much information about who you area :P
 
@BenjaminGruenbaum but could not understand why the response 1 also appears in 5th request
 
@techie_28 you need an abstraction layer, your ajax function shouldn't actually make a call, it should queue a call and then your ajax service should wait until no more calls are being added and then execute them all.
and make a single request.
Your flow:
1 ----> server ---> 1 response
2 ----> server ---> 2 response
2 ----> server ---> 3 response

My flow

1 ----> service                                                 --> 1 response
2 ----> service   ---> server ---> 1 2, 3 response --> 2 response
3 ----> service                                                 --> 3 response
 
Debouncing?
 
Well, debouncing isn't really a great term for that since we're not actually debouncing we're aggregating until no requests are made within 2ms (well, an macrotask queue flush would be better - but harder to explain).
@BenFortune would a code sample help?
 

« first day (2127 days earlier)      last day (2823 days later) »