« first day (2201 days earlier)      last day (2739 days later) » 

1:38 AM
Quick JS question
Hacking together a Chrome extension
I can call a PHP script on my website from a Chrome extension right?
 
 
3 hours later…
user4330208
5:17 AM
4
Q: How to find the lowest possible combination of keys within an array

carb0nshel1I have an array that will always have 6 keys: var ary = [5,10,28,50,56,280]. I have a variable defined as limit I want to check it against. I want to find the lowest possible combination or sum of keys from this array that is above limit. We'll call this result. A bit of constraints I am trying...

 
user4330208
Free cookies.
 
user5503464
0
Q: Why auth.isAuthenticated() is not working in MEAN.JS?

ko001I have made simple signup, signin and article using MEAN.JS with jsonwebtoken. In signup page after user entering all values i am passing values to server through signup api. The server side I am creating jsonwebtoken and am passing to client side exports.create = function(req, res, next) { ...

 
user5503464
help me out
 
user4330208
@ko001 You are stealing my thunder
 
user4330208
Look mate. I'll answer your question if you answer mine. Deal?
 
user4330208
5:22 AM
K. I'm joking. Sorry. Bad joke
 
user5503464
yeah tell me
 
user4330208
Too much code for me to understand. I'm still a novice
 
user4330208
But maybe stop using a framework called mean.js that sounds awful nasty doesn't it?
 
user4330208
Is there a nice.js? If so, use that.
 
lol
 
user5503464
5:26 AM
sir m beginner thats y using that framwork if possible help me out #carb0nshel1
 
user4330208
I hope someone here can help you.
 
user4330208
< Definitely not this guy.
 
5:47 AM
greetings, programs! o/
 
Hello
@ko001 Too long
@ko001 There seem to be too many things you don't understand about the process. Otherwise your question would be much shorter. If authentication is not working, it's most likely either a frontend *or * a backend issue. If it's both, then that's just more proof that you haven't researched it enough or don't understand enough about the process you're dealing with
 
user4330208
k. now what about my question?
 
user4330208
Lets get this show on the road.
 
user4330208
I'm ready. The body is ready..
 
@carb0nshel1 Seems like you already got a couple of answers
 
user4330208
5:54 AM
nah
 
user4330208
well yeah but
 
user4330208
damn. afk
 
Happy Birthday @BadgerCat!
 
user4330208
Happy Birthday @BadgerCat!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@BenjaminGruenbaum How many people does it take to sign off on a PR for node?
...for it to be merged
 
user5503464
5:57 AM
0
Q: How can i update data from one document to another document automatically in node.js with express.js?

ko001Below is my log document,date wise i want to calculate earn and used points for particular customer ,after calculation i want store date wise earn and used points for customer in another document,every 24 hrs this should happen automatically how can i achieve. i m using mongodb, mylog table con...

 
cronjob
 
user5503464
i installed sir but i dont know how to modify that for my requirment @monkeyinsight
 
132
Q: Running a CRON job at 2:30 AM every day

user1856596How to configure a CRON job to run every night at 2:30? I know how to make it run at 2, but not 2:30.

 
Hey, I have an object that holds two arrays and has a method. I'm trying to figure out how to pass as an argument where I want the method to store the results within my object for example: let obj = {storageA: [], storageB: [], saveFunc: function(storage) {storage = results}} so when I call obj.saveFunc(obj.storageA) the result of saveFunc are saved within the object where I specify. Right now I'm just getting null
 
what is results? and to store within object, you need to use this.storage
 
user5503464
6:03 AM
sir nothing m getting in that @monkeyinsight pls help me out
 
@ko001 create file that will execute command you want and add it to cron
 
@monkeyinsight result is just json data coming from a rest call
 
so this.storage = results
 
@monkeyinsight if I'm sending the argument as obj.storageA wouldn't this already be referencing obj?
this.obj.storage?
I'll give it a shot
 
better to send scope in this case
 
user5503464
6:06 AM
i done oly npm install node-cron-jobs in MEAN.js . after that what can i do pls help me out ..i did't understand that @monkeyinsight
 
google it
 
Google a lot
 
@monkeyinsight I see what's happening, I'm sending in the result of objStorageA (which is just an array) to the function. I'm not actually sending in the reference
Okay that helps
 
user5503464
i googled it but m not getting bcoz i m beginner
 
so start learning
 
6:10 AM
Got it working, thanks for the help
 
6:34 AM
lol you people
I think I'll grab some popcorn
 
user5503464
sir help me out @Oliver Salzburg
 
@ko001 I already did
 
user5503464
i m not able to solve sir @OliverSalzburg
 
@ko001 it sounds like you need to really start at the beginning and work your way up to a level where installing node packages make sense and how to integrate such packages into your code. I'd suggest something like codecademy's javascript courses, followed by perhaps nodeschool.io
 
6:50 AM
Agreed^ that's what I did just recently, didn't take as long as one would imagine (though longer than some might like)
 
user5503464
i installed cron but after that i don kno ..if an one help me out its possible to pick @the digitalmouse
 
@ko001 but if you think you are more advanced, then I'll have to side with others here in that you just need do a bit more reasearch... in your SO post, you ask "...i m unable solve this 'auth.isAuthenticated()' .bcoz i don't know what should i pass to this function..." tells me you do not understand the process or are missing some key info, because in your code there are no arguments/parameters for isAuthenticated()...
, so you are not passing anything directly (in *that' example you gave). it looks like you need to go back and read some more, or try another tutorial.
good luck!
i've got a meeting to attend. later kids! :)
 
in Angular 2's component lifecycle, why is ngOnInit called after the first ngOnChanges?
rather than before
 
@OliverSalzburg one, but at least 48 hours or 72 on weekends.
 
7:11 AM
Anyone here ever did a value and risk analysis ?
for recommending new technology trends ?
 
@Mathematics every time
 
@BenjaminGruenbaum how do u do it ? I mean I never done it so no idea where to start
 
Write down all the pros and cons and evaluate development time and defect frequency
 
I want team to switch from jQuery to AngularJs for specific project
let me see if I can write it down
 
user3119231
7:49 AM
mushroom mushroom!
 
how can i see my mentions?
 
8:16 AM
@BenjaminGruenbaum Alright, I'll wait :D
 
@OliverSalzburg link?
 
Nothing special
 
@OliverSalzburg want me to land it for you?
Can you squish?
Wait, don't squish we'll land it as two prs
Maybe follow the commit message guidelines, if you don't feel like it I can fix it for you
 
@BenjaminGruenbaum I wouldn't mind if you do it
 
cool
Just need to run a CI first
 
8:26 AM
I already had the thought that would have been better as 2 PRs, but then there was already feedback on it and I didn't want to mess it up :\
 
Yeah, two commits are fine since it's two changes
 
@BenjaminGruenbaum There was an existing run, but I made minor adjustments afterwards and some builds failed (not my fault)
 
Need to run the CI after changes, shouldn't take too long
 
I think there was a general Windows build failure at the time
 
8:29 AM
Cool :)
I'm not familiar with Jenkins. Why are some spinners red and others green?
 
@Neoares how can I see my intentions ?
 
@Mathematics yes :*
 
@OliverSalzburg I have no idea :D I just run the tests, check if any failed, check if the failures are related and if they are I don't land and if they're not I land
 
@OliverSalzburg lerooooooooy
 
8:44 AM
@Neoares nnnnnnnnnnjeeeeeeeeenkinnnnnnnnnsssssssssssss
 
hey guys, is possible to use that 3 from this statement
var x;
var y;
var z = (x = 3 + y)
console.log(z);
y is undefined
but ....
 
The suspense!
 
meta.stackoverflow.com/a/336875/1835379 <-- stubborn OP is stubborn.
Basically, his report is: "Loads of good questions aren't answered"
I answer with something like: "Nah, if questions are good, they'll get answered eventually."
@Cerbrus is this way to answer someone if you don't want answer just ignore it — sumit amble 2 mins ago
 
If he likes the questions so much, he should marry answer them
 
You're right @Cerbrus
 
8:50 AM
I won't say "I know" ;-)
 
@Cerbrus Am I being stupid or does this not make sense?
 
OP might be strugging with a language barrier
 
@BenFortune "Is this a way to answer someone? If you don't want to answer [my question properly], just ignore it."
 
That's better haha
 
@cerbrus this is kind of taunting not answer every one know good questions have answers — sumit amble 34 secs ago
 
8:57 AM
what an ugly design
 
@Francesco 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.
 
@mcmwhfy var z = x = 3+y
 
So is your face.
 
but you have to initialize y first
 
@Francesco what's an ugly design?
 
8:58 AM
it's time to update stackoverflow...
it is so cool but design is poor imho
 
@Francesco: Post a feature request / suggestion on meta.
 
UX > looks
 
@BenFortune: True, but UX + Looks = Awesome
 
@BenFortune a good UX pass through a good design
 
@Francesco: Suggestion: Post a question on meta. Explain what aspects of the design are poor, and how those could be improved.
 
9:00 AM
@ce
 
Just stating the design sucks, in chat, isn't going to help anyone ;-)
 
@Cerbrus you are right
 
@BenjaminGruenbaum thanks Benji 🍷🍷
@carb0nshel1 and thanks :)
 
Heya, grats!
 
yaayy danke
 
9:07 AM
@BadgerCat enjoy your stay in Barcelona :D
 
Could someone help me? I'm trying to open a new window on a click event, pass some variables through and when the page has loaded run an ajax request to display data.
 
@BadgerCat have a great year
 
@Neoares lets meet for a beer
 
yes, and Merry Christmas
 
@Neoares ty, unfortunatley I don't know what number would take that y, can be a number or nothing
 
9:09 AM
@BadgerCat sure, but are you coming here for job reasons?
 
when has a number value, it can be initialised but when is empty I receive a NaN
 
@BadgerCat barcelona is great
 
indeed
 
@Neoares no, to visit one of my friends. I'll be there from the 3-7 Nov
 
nice, I work at the very center of barcelona, and leave office at 6PM
 
9:11 AM
@BenjaminGruenbaum so I've heard
 
Javascript chat or Barcelona chat?
 
everything chat
 
@Neoares cool, I'll let you know when I'm there
@Kieron606 badger chat
 
@BadgerCat go see segrada familia, and the fire fountain, and if you like art the Dali museum is great (a 40 minute train) and the Picasso museum is great. The aquarium is nice if you've never been.
The old town part is nice, the market is very nice but full of pickpockets.
Park Guell is also very nice and full of musicians often. Are you going with copy?
 
yeah
Thanks for the tips, I hope we have enough time to see everything
 
9:16 AM
@BadgerCat great, how long do you have there?
If you like nightclubs there are good nightclubs
 
@BenjaminGruenbaum like 4 full days
I love nightclubs
 
Barcelona is nice
has anyone worked around the performance issues of bootstrap? i.e. the collapse and navbar plugins
all i'm finding is translateZ css hacks
 
@BenjaminGruenbaum Build complete \o/ Takes pretty long IMHO :P
 
@BenjaminGruenbaum Neat, thanks :)
 
9:28 AM
Any time
 
Could anyone help me with my latest question?
 
@Kieron606 That's not nearly enough to go off of, got an example?
 
0
Q: Angularjs 2 Template Driven Forms - Array Input Elements

CheckMeOutI have been struggling for 1 and half day and still couldn't find any solution to the problem. I am working on simple form which has select and checkboxes element.When I try submitting the form I do not get the values of select and checkboxes but rather I just get true in the console. I am workin...

 
@MadaraUchiha @Zirak you coming tomorrow to the thing?
 
problem is that november is a bit rainy
 
9:42 AM
@Neoares and cold, and nothing lasts forever
 
not cold at all
 
Please use moderator flags in chat only in very serious situations.
what is a serious situation?
 
@OliverSalzburg are you there?
 
thanks to my kitten army
 
@BadgerCat
 
9:47 AM
hahaha
 
@jAndy haha thanks 🙏
 
it's just missing the snake, sneaking up from behind :p
 
and a mushroom
 
@CheckMeOut Yes, I am here
For varying definitions of "here"
 
Could you please just let me know what I am doing wrong here
http://stackoverflow.com/questions/40236362/angularjs-2-template-driven-forms-array-input-elements/40236647#40236647
:p
 
9:51 AM
You help someone once and look what happens :P
 
@CheckMeOut I don't know anything about Angular 2
@BenFortune I can't even remember ever helping anyone!
 
user3119231
Hell my life was a lie. I thought Badger Cat is male.
 
Must have been an off-day
 
@Maurize what makes you think I'm not?
 
user3119231
clichés.
 
9:57 AM
I'm genderfluid
 
user3119231
^accepted as valid answer
 
It's a wildcard
 
user3119231
btw there is no word for 'genderfluid' in German.
 
@Maurize It's the same word
 
@OliverSalzburg same in Dutch too
 
10:35 AM
does a browser (firefox, chrome) on XP work different as on Win7?
 
Can't imagine so, only if it's a different version.
 
when looking at js support
ok
 
10:50 AM
1 message moved to Trash
Only high-quality spam is allowed here
 
high-quality spam?
 
Yes
 
rebbeca black's friday, for example?
that's VERY high quality Kappa
 
  /\ ___ /\
 (  o   o  )
  \  >#<  /
  /       \
 /         \       ^
|           |     //
 \         /    //
  ///  ///   --
Like that
 
cats are always allowed, that's cheat
 
10:52 AM
How do i access a new windows DOM? for example window.$('.input').val('test');
 
11:07 AM
@RoelvanUden @Mosho (or anyone else) Hey I could use some help with typescript if you are around and free ^_^
I have an "app" symlink inside src/node_modules so I could do require('app/stuff'). It works fine and all except that typescript decides to keep going in and do type checking for like hundreds of levels (I dunno where it stops, but it works fine, just takes a lot of time. Definitely goes in like 50 levels or so). Any idea how to deal with this?
 
@AwalGarg But why do you have this symlink?
 
How do i access a new windows DOM i tried - this.window.document.$('input').val('test');
 
@Kieron606 You already said that
 
Does anyone know a best circular image slider?
it should swipable in mobile and should show left and right buttons on desktop
 
@RoelvanUden The project follows this github.com/substack/browserify-handbook#symlink "trick", that's why. So it is a recursive symlink to the app root.
 
11:20 AM
15
Q: How can I access the dom tree of child window?

BillyI open a new window using the following code: purchaseWin = window.open("Purchase.aspx","purchaseWin2", "location=0,status=0,scrollbars=0,width=700,height=400"); I want to access the dom tree of the purchaseWin, e.g. purchaseWin.document.getElementById("tdProduct").innerHTML = "2"; ...

 
@OliverSalzburg and I also asked about 2 hours ago, been ignored since.
 
@Kieron606 The reason for that is not that you didn't repeat your question often enough
 
@Kieron606 You obviously didn't try researching.
 
Less of the toxicity?
 
@AwalGarg Okay.. but why did you do this in the first place? This is not the recommended way for JS nor TS.
 
11:21 AM
@RoelvanUden old project :|
I am just adding types to it everywhere
 
Yeah, but now you get..
/a.ts -> requires 'lib/n'
which resolves to '/a/node_modules/lib/n.ts'
then in that file you do requires 'lib/d'
which is resolved to /a/node_modules/lib/node_modules/lib/d
this "trick" destroys any caching and reuse of type information
in nodejs itself, it would create copies of the same module being loaded
it's a very bad trick.
So no, there is no real fix, because this effectively destroys TS type caching
Other than: get rid of symlink
 
-1
Q: How to reduce google app engine pricing for my static website

Prakash KumarI am deploying my website on google app engine with nodejs i read their docs that they provide 28 instance hours free per day, currently we only have a few limited static data so i thought my website pricing will be under the quota, but as by default when we deploy an app on app engine they provi...

lol
> can anyone please tell me how can i make my app free as i don't think they should charge me right now as there is nothing on my website
 
@RoelvanUden Makes sense, but I just tested and both are resolved to the same path by node (maybe it checks if the required file is a symlink and resolves back to canonical location?)
 
It does? That's cool. I didn't know it could do that. It doesn't for me.
Or, didn't, a year back.
On Windows, that is.
 
11:52 AM
How do I open a local program using a link? I know it's possible because my browser has asked me before if I want to open a file using a certain program although this was on a mac.
 
@RoelvanUden hmm it seems moving the symlink to the parent directory's node_modules makes typescript happy
 
hi all
 
previous build: 12s. new build: instant
 
139
Q: how do I create my own URL protocol? (e.g. so://...)

Michael BeckOk, please bear with me as this is sort of difficult to explain. I have seen... http://www... ftp://blah.blah... file://blah.blah... unreal://blah.blah... mailto://blah.blah... What is that first section where you see http and the like called? Can I register my own?

 
@BenFortune the topic you sent me doesn't work in my case, thanks for your help
 
11:58 AM
Apologies, missed the mac part.
 
I am trying to switch between front and rear camera :
Please have a look at this : jsfiddle.net/cf90az9q/19
When I try this code using 2 webcams attached to my Desktop
I can easily switch between both the cameras
but when I browse to this code from chrome browser on my android phone. I can either access only the front or the rear camera but not both of them on every click.
If I can access say.. front camera then next time when I click on the button I get a black screen and hence unable to open the rear camera..
 
@AwalGarg That makes sense. It would navigate up the tree to find the node_modules path, thus the caching will apply.
 
yup. btw I switched to ts2.0 today after mosho talked about it the other day. Things are just so much better with non-nullable types and control flow analysis. JS almost feels like a real language now!
 
12:15 PM
@AwalGarg So, from your 24h experience, you would say it's the best thing that ever happened to JS?
 
Hi all, to use Angular ui, do i have to include twitter boostrap css ?
The dependency section of the docs is confusing angular-ui.github.io/bootstrap
 
@OliverSalzburg 6hr experience :P But can't really say if it is the best thing. It'd definitely be one of the top few things though.
 
@AwalGarg Yeah, 2.0 is bliss. Non-nullables is amazing. Control flow analysis is great. The new types and type inference is great. The new compiler options for non-used tracking is great. Best language I've ever worked with. Just missing a null coalescing operator now.
In 2.1 we'll get async/await for ES5, which allows you to drop Babel entirely for async/await-enabled code.
Can't wait for that one too :)
 
@FlyingGambit Yes, you do have to include it
If you don't include it, everything looks like shit. That's a dead giveaway
 
@RoelvanUden true :)
 
12:32 PM
@RoelvanUden yeah, I eventually became a fan too.
 
@Pigman168 are you asking how to, in js, prompt what the recommended open is? like you download an image from a website and it asks to open it in photoshop?
 
1:00 PM
@Kieron606 Yes it does.
@RoelvanUden I thought they added that operator
 
@OliverSalzburg Just these 2 bootstrap.min.css and bootstrap-theme.min.css ? or do I inculde the boostrap js files as well ?
 
@BenFortune Not as far as I know?
 
Hmm, might be thinking of something else.
What's up with foo || null?
 
> Closing this for now. Since there's not really anything TypeScript-specific that would require this at expression level, this kind of big operator change should happen at the ES spec committee rather than here.
 
> As a result no dependency on jQuery or Bootstrap's JavaScript is required.
@FlyingGambit The website you just posted has numerous plunker example, which all contain all the required dependencies in their source
 
1:14 PM
 
@rlemon Can confirm, crazy ex tried to burn me.
 
@OliverSalzburg Thanks a lot, I am just very new to Angular and have been struggling with these small things for the past one week
 
Hey guys, what will this do ? replace(/\t.*$/, '')
 
@FlyingGambit If this is the part you're struggling with, I have bad news for you :P
 
@zouza Run it and find out
 
1:17 PM
i did, i am not sure , i think it's to do with empty spaces
 
@OliverSalzburg Will it be a rough ride ahead ?
 
@FlyingGambit Yes
 
it's 2016, computers shouldn't freeze anymore
 
@BenFortune ben ?
 
i.imgur.com/eQfX9nV.gifv winning a darwin award kinda looks fun
 
1:24 PM
@rlemon Is that dangly cable grounding it...?
 
That's so they can pull him back down. Safety first.
 
^ that
 
And it's made of durable copper.
 
he's got his hands protected by scraps of cloth
should be fine
 
Heh, interesting GitHub search fact: github.com/nodejs/node/… vs github.com/nodejs/node/…
 
1:28 PM
@BenFortune remove last occurences of a space before the last char ?
 
aww, github doesn't search commit messages?
 
@Luggage GitHub tokenizes source and doesn't find it based on any substring
 
Yea, I am content with its source searching.
 
1:46 PM
My understanding was that there'd be badgers...
 
No. You will BE badgered.
Common misconception.
 
hmm
 
how do I know if an object is empty?
 
shake it
 
if (JSON.stringify(obj) == "{}") {
    console.log("it's empty!");
}
 
1:48 PM
Why do you want to know if it's empty?
That won't work..
ohh, stringify. yea.. that'll maybe kinda work
 
err, sorry
works in my test case
 
yea, but then you properties that just didn't serialize. I think the "why" question is valid.
 
function is_object_empty(obj) { return JSON.stringify(obj) == "{}" }
undefined
is_object_empty({})
true
 
smells XY
 
isn't Object.keys( obj ).length faster than stringifying?
 
1:50 PM
function isEmpty(obj) {
  for (let key in obj) {
    if (obj.hasOwnProperty(key)) return false;
  }
  return true;
}
 
@Luggage your sense of sarcasm is failing you
 
@Luggage hah
 
Object.keys only returns own enumerable properties.
 
so use getOwnPropertyNames then
 
(I mean... using JSON.stringify for that...? come on..)
 
1:51 PM
getOwnPropertyNames only returns own properties :)
 
@Neoares why do you want to know if an object is empty? some of these choices MAY work for you.
 
hi sorry didn't read chat
my mate just did a for in order to check it
 
@Luggage however, JSON.stringify would also not match any prototypal inherited stuff
 
and I was like wtf how is that possible
 
1:54 PM
it would also return "{}" in that case
 
yea
 
user379888
I am trying to read the value of <title> from this page using console:
http://www.demacmedia.com/feed/
Tried: document.getElementsByTagName("Channel")[0] but returns undefined.
 
<channel> is lower case
 
user379888
@canon: Thanks. It still does not return the value.
 
it's not case sensitive.
is channel a real element?
 
1:57 PM
@FahadUddin dude
 
@rlemon Well not exactly but I think that will do too.
 
It's not xml, it's text in a <pre>
 
ah.
 
user379888
@littlepootis: I did not get it.
 
user379888
Am I doing it wrong?
 
1:58 PM
@Pigman168 from the browser, that isn't possible.
it is OS level
the link ben shared is about as good as you'll get
 
hey guys!! I know this is a javascript group!! i am just asking! is anybody intrested in designin a open source light weight java text editor?
 

« first day (2201 days earlier)      last day (2739 days later) »