« first day (2229 days earlier)      last day (2941 days later) » 

01:46
Good Morning~:)
Hello world!
@JeffreyC 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.
oh it works
So...anyone using Ember.js atm?
No experience, but I know it is for big project
So what js framework are u using?
01:52
Angular
How do u like angular
@JeffreyC somewhat, not boring
LOL
02:34
@Loktar Did you put on some weight?
like 2 pounds or so, I look good right??
Crazy JavaScript chrome bug seeking an explanation if anyone's up to the task: stackoverflow.com/questions/40732294/…
@Ultimater That's a spicy bug
03:10
I got nothing on that bug... why would for (let b of bullets) {} affect it....
yeah... that makes me think it's definitely a problem with an optimisation attempt by chrome
this reproduces it: jsfiddle.net/db4bnLd6/2
Ah, perhaps it thinks it's a const value due to all the const usages
user6820627
hello
user6820627
03:31
do you know about string-oriented programming?
what is string oriebted
is that a joke
how to create a thread in Nodejs?
user6820627
is it worth knowing @LearnHowToBeTransparent
@LearnHowToBeTransparent Ummm, this is the JavaScript room
user6820627
03:48
REM everything is a string in batch.
REM declare var:
set abroad=echo 452354
REM eval the above statement
%abroad%
REM declare array
set percent=+ - * / ^ %
REM echo all
for %%a in percent do echo %%a
REM declare function (wtf?)
REM ss64.com/nt/syntax-macros.html
REM do not use label to declare function.
REM batch file will run as slow as hell.
user6820627
REM one more rem: it is really easy to invent a string-oriented language
What does this have to do with javascript?
04:29
Nothing.
Trump on course to fight net neutrality.
good man
Hey guys/girls, relatively new to javascript and came across a somewhat odd issue
@AtAFork 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 have 2 strings, both urls, and for some reason the results is differen when i do .slice(5,-3) on them, depending on if I'm in my local environment vs real server
but what's weird is that when I print to console it appears that they produce the same result
I think it's an encoding thing and I've tried some of the common encoding / escape / unescape / decoding solutions
but none worked
04:40
@AtAFork JavaScript string use ucs2 encoding, like Java. Encoding only matters on IO. How does the slice differs, any example?
sure hold on
this is the string that prints: "http://webservices.amazon.com/onca/xml?AWSAccessKeyId=AKIAJYKQT2SLRD6SBYYQ&…2T‌​04%3A42%3A08Z&Signature=d13Ow9CtG8sjGKVbrpsDlItiZALwhPu%2BlJ5gvdhgeYw%3D"
(the string includes a leading and trailing double quote)
in this case, that string above is from strz['link'], and when i try to do this 'http' + strz['link'].slice(5,-3)
i get the correct url oddly (without cutting off the last few characters)
but when i try strz['link'].replace(/['"]+/g, '')
it doesn't produce the same string (which puzzles me)
@Sheepy this is the full url produced to be clear:
04:57
@Sheepy so in other words, when I do console.log('http' + url.slice(5,-3)); it prints the same result as console.log(url.replace(/['"]+/g, '')); and both results are valid urls (and the same exact url), but the rest of my script treats the results differently and the url.replace(/['"]+/g, '') solution doesn't work
When I try to slice your url - with quotes - I get ://web...Ym% (characters chopped as expected), so I think there is some misunderstanding in your code or debug message...
%3D looks like something encoded
seems weird to get rid of only some of it
yea so %3D is part of the url, but for some reason taking a slice(5,-3) works and includes the %3D which is counter intuitive since i'd expect that to not work and cut off some characters
@Sheepy when i try typeof on the strz['link'] it returns string
@AtAFork There is virtually no chance that slice fails to works as the spec says, so please double check your string, for example printing it character by character or even char code by char code.
Also, if you urldecode the string, you won't be able to convert it back. So don't do that!
@Sheepy i was literally doing that as you said it and i think you're right, here's the REAL string (not how it shows up as a url in the console)
"http://webservices.amazon.com/onca/xml?AWSAccessKeyId=AKIAJYKQT2SLRD6SBYYQ&Ass‌​ociateTag=laz00-20&Keywords=gudetama%20test&MerchantId=All&Operation=ItemSearch&R‌​esponseGroup=Images%2CItemAttributes%2CReviews%2COffers&SearchIndex=All&Service=A‌​WSECommerceService&Timestamp=2016-11-22T05%3A09%3A23Z&Signature=vpeLVy57BGQ%2FypS‌​18Kcd8QbU1qArbWS7eCixLO0t5T8%3D" ↵
it ends in a double quote, then space, then a left arrow
05:15
Ah. That "left arrow" is likely line feed character. You read the url from a file?
If you trim the string you should be able to remove the space and arrow.
@Sheepy yea, so who played this mean trick where those characters are not shown if i print to console?
@Sheepy @phenomnomnominal i really appreciate your help, was stuck on that for a while, thanks!
@AtAFork Actually, it is printed. You just need a sharp eye and experience to tell it. It is often printed as an extra new line. XD
@Sheepy ha fair enough
By the way, depending on data type, JSON.parse may be a better option for removing the quotes. You don't need it for url so slice is acceptable for now.
i went with strz['link'].replace(/\s/g, '').replace(/['"]+/g,'').replace(/\u21b5/g,'') to get rid of spaces, double quotes and the phantom character
05:50
hellow
how to send password to email using nodejs
can someone send the simple script
var mailer = require("nodemailer");

// Use Smtp Protocol to send Email
var smtpTransport = mailer.createTransport("SMTP",{
service: "Gmail",
auth: {
user: "[email protected]",
pass: "gmail_password"
}
});

var mail = {
from: "Yashwant Chavan <[email protected]>",
to: "[email protected]",
subject: "Send Email Using Node.js",
text: "Node.js New world for me",
html: "<b>Node.js New world for me</b>"
}

smtpTransport.sendMail(mail, function(error, response){
if(error){
console.log(error);
}else{
console.log("Message sent: " + response.message);
i am trying this script
but i have some doubt s
why we need give auth option
if i delete this having any problem?
what the jinx here?
0
Q: Javascript backgroundColor does remove css hover?

Jacktmy div has his class like: .cls { background-color: #ff0000; } .cls:hover { background-color: #0000ff; } When with javascript i do: mydiv.style.backgroundColor = "#555555"; It works but the hover doesn't work anymore ! I haven't found much infos about this behavior on the net, is it normal...

I remember pseudo class will appear but not the inline style
or is it mandela effect?
@AtAFork At least combine the characters: strz['link'].replace(/['"\s\u21b5]/g, '')
@Sheepy ah i was trying to do that before but mistakenly read an SO answer as having to choose between OR and AND as opposed to being able to grab all rules
06:02
thanks all
no one reply to me
@KARTHIKEYAN.A Sorry not everyone here can help with Node. My node experience is counted in minutes. But I doubt gmail will let you send anything without auth.
{ Error: connect ETIMEDOUT 74.125.200.108:465
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '74.125.200.108',
port: 465,
stage: 'init' }
ok thansk
@Sheepy
06:18
@KARTHIKEYAN.A Try out some of the other examples in google
 
1 hour later…
07:42
Hi c
@AzeemHaider 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.
Can you please see this question
Hi @CapricaSix are you there ?
how do I add a counter to an onclick event
basically, I would like to give 5 attempts for user to click, than stop
HAMMERTIME!
thanks in advance
@AzeemHaider, hi?
07:55
@KARTHIKEYAN.A it means it timed out waiting for server to respons
@Leyth You can add a click event to decrease the counter when the table is clicked.
I tried that, it did not work
I already have another click event happening
@Leyth click event is not exclusive; td click will "fall" to tr, then tbody, table... all the way to html.
can you please show it to me?
I am learning JavaScript
Sorry, fairly busy right now... maybe others can help
08:04
ok thanks
does anybody a good live chat to get help with javascript issues?
I really want to figure this out
you need to chat live with someone?
yeah
I am trying to figure out how clickevents work
yeah you can ask here in detail
someone will answer you
ok
I am trying to add a counter to an onclick on a table but it is not working
1 message moved to Trash can
@Leyth Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
08:18
var div = document.getElementById("canvas");
   div.onclick =  function() {
   		counter += 1;
      if (counter > 10) {
      	alert("Game Over");
        break;
      }
   }
After trying out AngularJs I cant code in vanilla javascript ;c
I have one question about Nodejs one thread concept.
if a new request arrived during processing.
will this new request need to wait the process finished?
Hi @Leyth
can you please check my question
have you any information about this one
08:33
@Leyth why have you used td[loc[i]] ?
@Leyth Check this jsfiddle.net/29paongs/3
How to send parameters with angularjs that not in url to routes? I like to have page About with id 1 but the url should be www.someurl.net/about
@Arto That question did not make much sense
@Arto Why are you giving your pages IDs in the first place?
@OliverSalzburg I need that id on my homeController, it tells which data to load from server.
It is unlikely that you'd want to share the same controller between pages. Every page should have its own controller
Then your AboutPageController can just grab the page data for page with the ID 1 or whatever
09:03
@ShravanVishwanathan 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.
@OliverSalzburg That is one thing I have been thinking here. This is going to be "cms" so users can add more pages on admin view. But I am not sure if this is best way to do it
@Arto Oh I see. Well that's going to be complicated then, I think :D
@OliverSalzburg Yeah, I have been trying to think and find a info which would be the best way to do this kind of system. But still haven´t found any useful info.
I've never done that, but, maybe you could grab the $routeProvider at a later time and just register your readable names as aliases for pages with a specific ID
Regardless, I would highly recommend that you look at ui-router as an alternative for ngRoute
It will give you a lot more options
That ui-router looks like a good choice. I will look on that.
09:14
It will not solve your problem right away, but I'm sure it'll be a valuable tool nevertheless ;)
Yeah, it looks like a good start heh
wtf First this earthquake in Japan and now Kanye is in the hospital???
Conspiracy theorists have a challenge but I am sure they can pull it off
According to my IE new tab page those two news are on the same level
Still below Trump though
0
Q: How can get two collection documents and calculate points using express.js?

mojoexports.show = function(req, res) { var userdata =[{ "productcode" : "9563456789", "cost" : "1000" }, { "productcode" : "8756348947", "cost" : "5600" }...

09:26
Nothing trumps the Trump
help me out
@OliverSalzburg Objection
@Zirak Aw, I'm not sure if I can make that. :/
@rlemon I ... well, you know. I ... got nothing :D
'cept stomachache right this second, because I was smart enough to drink a coffee after taking pain killers which attack the stomach too
yay me
Pour some whisky on it to calm it down
can't do that cause I need to take antibiotics in a bit :(
09:41
Someone is really treating themselves today!
You have no idea.
I might as well be a toddler given how smart I act when it comes to my body.
10:29
one glass of whiskey isn't going to interfere much with the antibiotics
@OliverSalzburg LOL
How am I apparently the only one complaining about that? :P
So there is a sane limit!
10:57
@OliverSalzburg :D
@OliverSalzburg its 98016 chars XD
11:19
@FlyingGambit And that is just a fragment of the overall error being logged
The whole thing is >350K
11:33
let obj = { one: 1, two: 2, three: 3 }
let ret = { three } = obj
// ret -> { three: 3 }
Is it possible to do destructuring like this?
Have you tried it?
Yes, that doesn't work
Hey, i got an element, where i need to modify the css via JS. I have written my code so far. The Problem is that it is an image gallery. The CSS should change the VIEW when i click the default image and the gallery opens. The gallery loads just after clicking the default image.
I have added an onclick event to it, but that doesnt help. Any ideas ?
My code is here : http://pastebin.com/UMDyJcAe
@OliverSalzburg Godly shit thats huge XD
@Traxstar Can you provide an example on jsfiddle or something? I don't understand the problem
11:44
@Billy Your best bet is something like
let obj = { one: 1, two: 2, three: 3 }
let { three } = obj;
let ret = { three };
Im not sure if i could rebuild that. I got a product page. There is an image. If i click this image an image gallery gets loaded. The image gallery just matches in the current DOM.

I want to change the position of an element in the Image Gallery. But my code can't find the element cause it is not there when it is executet @OliverSalzburg
@BenFortune Thanks :)
12:07
@Traxstar Aha. So just execute the code later, when the element is there
So you tried to execute it in an event handler for when an image is clicked, but when the image is clicked, the DOM hasn't changed yet
So that got you nowhere
ello, in this angular application I have to work on, the app logs in with the backend (spring), and then populates permissions etc. If I hard reload the page, you lost those creds ofc, so you have to check with backend to see if you're still logged in + refetch permissions. Since it has no permissions in this case it redirects to another page. Is there a way I can do this async check (from any url/state) and block route resolving until promise resolves?
Or just periodically check if the element is there and perform your action once it appears. Or look for some solution within the gallery itself (I assume it's 3rd party)
@Busata Yes. Use the resolve property of your state/route and call a method in a service which returns a promise
but I have to do that for every route then? it's something I have to do regardless of which route he visits
The router will not load the state controller until all properties in resolve have been resolved. So this is the perfect place to do that
@Busata I think so, yes. I'm not aware of a way to do that for any route
If you find a better way, please tell me about it :)
kay :)
12:15
jvandemo.com/… suggests to use an abstract root state
16
A: AngularJS ui-router: how to resolve typical data globally for all routes?

Radim KöhlerLet me show you my approach. There is a working plunker Let's have a translation.json like this: { "home" : "trans for home", "parent" : "trans for parent", "parent.child" : "trans for child" } Now, let's introduce the super parent state root $stateProvider .state('root', { abstr...

Seems to suggest the same
Hello
can i ask question here?
that might be better than whatever I was conjuring
gist.github.com/davemo/5815716 attaches the resolve property programatically. Seems like a nice approach
@AnujKhandelwal 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 might actually use that in our app now :D
12:17
XD
yea, that's better, cool!
24
Q: Angular : How use one resolve for all the routes of my application

FlavienBertI would like resolve the promise who load the current user for all the page of my application. Now I repeat the resolve in each $routeProvider.when() of my routes. $routeProvider.when('/users/edit/:userId', { templateUrl: 'app/app/assets/partials/user-edit.html', controller: 'UserEditCon...

Also more crazy stuff here
how deep does this rabbit hole go!
but config phase makes tricky injections, so run() approach probably easier
12:20
i'm using getorgchart (getorgchart.com) in one project and i need to customize theme when some condition true for single node. If anyone already know the solution or have past experience, please help :)
i have checked all the docs and SO but can't get
I know how to change color or node content..
@OliverSalzburg think that root abstract state will be easier tbh, in config phase you can't inject your services (in my case, the security one)
and that should be as easy as a find replace, hopefully :)
@AnujKhandelwal Example of conditional coloring is there in Ben's link
@Busata Well, you would inject your service in the function that is provided through the resolve hash
We use this property currently mainly for preloading. We have a provider on which you can register preload demands during configuration, then the associated preload service is injected in the resolve function and loads the demands
In the state definition you would then simply say resolve: preloadProvider.resolve()
12:27
yea, but code wise I guess the root abstract state is easier to showcase the purpose, vs technical code to add em everywhere
in our case
Sure, whatever works :)
it should be just searching state.go , ui-sref etc & prefix it with appname or so
@FlyingGambit i know conditional coloring but i need to change the theme (getorgchart.com/Demos/Create-Your-Own-Theme), here its apply on all nodes but i need only on single node.
@AnujKhandelwal I think it would better to post your question in SO , just a handful of people in this room and they might have never used that lib
I have fiddle if anyone intersted jsfiddle.net/2bLj7/579/show
@FlyingGambit thanks, i do post question
12:47
---+++
@OliverSalzburg ah, it does resolve, but angular permissions doesn't care :) so need to find another way :)
13:01
I don't understand why angular permission makes you define permissions if you have to provide your own function to check if a given permission name is valid for the user
Um is it okay to downvote a question from a newbie which seems to me as very dumb (basic) and shows no effort in searching for it in google ?
@FlyingGambit Absolutely.
@BenFortune Cool, my heart feels content :D
13:20
Guys can anybody help me
?
Is there any problem in JSON to work with Ajax.
in my case I have wrote the coding in json in one page and using AJAX I need to display on other page.
But things went wrong!!. @corvid
style question: long sql queries, keep on a single line or use template strings and make it pretty at the expense of slight overkill
Please ,,I am new to this group ,please any expert try my query out yaar.
@rlemon How long?
!!welcome RAJMOHAN
@RAJMOHAN 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.
arbitrary really. anything > 120ish chars looks pretty bad
imo, from a readability point of view. I don't line wrap
13:24
OK, why do you think template strings are overkill?
because I'm only using them to get a line break
no 'templating' involved. .
Meh, who cares.
I'm considering switching to `` strings everywhere tbh
Aside from the awkward place of the key, there aren't any downsides I can count
@RAJMOHAN You haven't asked a question so far.
You just said "I have a problem with AJAX"
@RAJMOHAN What language? framework? what are you trying to achieve ?
alright, I'll use template strings. even slightly complex queries are much easier to read when they're broken up into lines
Guys I have writtern some codes in json and on that page it gives output
13:28
just a random question: how do I find user with highest reputation in SO ?
@FlyingGambit Jon Skeet.
You can fiddle with the sorting/filtering options on the Users page
But, as you'll soon find, Jon Skeet. By a huge margin.
Guys I have writtern some codes in json and on that page it gives output at the same time using XmlHttprequest we can display that whole page at our desired page.but the output due to json is not appearing
so i am asking is there any conflict between xmlhttprequest and json
?
Thanks
@Madara Uchiha
now its my time to leave my office
its very nice time with you all
I think here indian programmers are rare in this group
anyway have great day
@MadaraUchiha Thats the legendary guy kept answering my C# questions in one of my old account
@RAJMOHAN There are indian programmers in this room ..bhah
13:33
@RAJMOHAN We have quite a few guys from India here, actually.
Most of them aren't here presently, but we have them.
@MadaraUchiha He is very famous quora.com/…
Of course
Do I need to do anything special for the paste event to be fired/captured?
I'm playing with ng-file-upload angular-file-upload.appspot.com and it works great in their demo, but on my page, the paste listener is never called
hey guys if you have a third party script that does not need to be evaluated by webpack/transpiled, what is the best way to still include it within the project? I've tried including it in entry
13:45
@OliverSalzburg Try hitting the ctrl + v harder :D
@OliverSalzburg As a kid when loading screen appeared we used to press the right arrow key when that did not work, we kept holding the button harder.
Aha memories from my childhood XD
@Shane Holy fuckery, thats so cool
kinda hard to look away, no?
took me a minute or so before I understood how
just visually, how that was done
@Shane I dont get it but its so cool that I pasting it in Facebook :D
@rlemon Feature request, make the message cursor from stackapps.com/questions/2105/… not glaringly green.
@Shane Trippy
I can hardly read that line
#D2F7D0
yea I can do something about this. and you can test my new stuff too 😃 win/win
13:55
Huzzah
@FlyingGambit Doesn't work :P
When I attach a handler for the paste event to the document, it gets invoked just fine
It's just their handler which isn't working
And I can't see why that would be. It's also not like the element would be replaced, because other handlers on the same element fire just fine
user6820627
just install this css: w3schools.com/lib/w3.css and look at the console try to add some class to color the text.
@OliverSalzburg You in chrome?
13:57
@MadaraUchiha what you want it to be?
@BenFortune Yep
@rlemon Let's go with #3f523e
Seems like a more subtle shade of green
@BenFortune As I said, it's working perfectly fine on their demo page, just not on my site :(

« first day (2229 days earlier)      last day (2941 days later) »