« first day (1948 days earlier)      last day (3010 days later) » 

12:26 AM
does anyone know of any frameworks that render 3d printing blueprints onto the canvas? literally this: lanilabs.com/browse (click on one of the blueprints)
 
 
6 hours later…
6:33 AM
1 message moved to Trash can
@VineetKumarDoshi 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 or pastie.org
 
    var a = 9;
    var b = 0;

    try {

        if(b === '0'){
            throw "zero";
        }
        console.log(a/b);

    } catch (e) {
        console.log(e.message);
    }

Not sure why am I getting "undefined" as output ... :/
@CapricaSix!! .. edited my code!! ... formatted it
 
@VineetKumarDoshi I got "Infinity" as console output. I hope you don't mean return value.
 
sorry .. minor mistake in above code .. please change '0' to 0 and then try .. it will still give undefined
 
In that case, because e is "zero", a string, and e.message is undefined.
 
oh ok .. got it .. thanks
it should only be console.log(e) and not console.log(e.message)
 
6:42 AM
or, rather, throw new Error( "zero" ) instead of throwing "zero".
Your choice.
 
7:23 AM
R-B, Rebecca Black
So chillin' in the front seat (In the front seat)
In the back seat (In the back seat)
I'm drivin', cruisin' (Yeah, yeah)
Fast lanes, switchin' lanes
Wit' a car up on my side (Woo!)
(C'mon) Passin' by is a school bus in front of me
Makes tick tock, tick tock, wanna scream
Check my time, it's Friday, it's a weekend
We gonna have fun, c'mon, c'mon, y'all
Yikes!
 
7:43 AM
I'd like to be able to close vote as "lazy chatty and just useless"
-2
Q: JavaScript: Which is the better approach here... forEach or reduce?

GratefulFor a function that accepts an array of numbers and returns true if it contains at least one even number (false otherwise), I have the following 2 solutions. Solution 1 (via forEach): var hasEven = function (collection) { collection.forEach(function (current) { return (current % 2 =...

 
7:58 AM
Morning
2
Q: Angular route isn't working when clicked within another view

Please TeachWhen I put this url below in my browser - it takes me my fruits view and works perfectly, http://localhost:53052/AppTest.aspx#/fruits BUT when I go to my home view and click on button and try to navigate to 'fruits' view then it redirects me to http://localhost:53052/AppTest.aspx#/routeNotFoun...

@DenysSéguret that's just an awful question
not even suitable for SO
why am getting all of the stupid thoughtless answers :/
 
8:27 AM
is it too early for everyone ?
@DenysSéguret now he is arguing with person who answered that he want to change his question, what a joke !
 
Testing and generally putting some thought effort in a question before asking people to look at it has nothing to do with being a newbie. — Denys Séguret 7 secs ago
 
what a joke !
I edited your code. Please check. However there is nothing to change in fruitController, Look carefully at HomeController (fruits is replaced by home). It Seems you are Newbie. I recommend to read about angular controllers as always these notations will confuse. A friendly advice. — Mani Kumar Akasapu 5 mins ago
 
8:47 AM
Hello folks! Is anyone using webpack for prod apps?
 
Can you post your Full HTML ? I wonder how you are using Controllers there. — Mani Kumar Akasapu 4 mins ago
lol
"can you give me the full solution please?"
 
they want to help but they are helpless themselves
I think I need to rewrite my question
 
9:05 AM
Hi
 
hiya
 
hey anyone here ..??
 
@Nikunj Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Nikunj no we are all not here
 
then it's good ....
lol...
 
9:15 AM
BOOOOOOO * i'm a ghost *
if you have question, just aaaaasskkkkk
 
can some one help me out ...????
 
> 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.
 
@VineetKumarDoshi console.log(a/b) : will give undeifnd
 
@AhmedAssaf Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
i'm talking about this ...
the inner if else statement ..
 
9:21 AM
@Nikunj What about it?
 
now the problem is that
 
ask nicely and properly no one answers, come in like a mess and there we go - get all of the attention :L
2
 
i use that code in for loop and i face some problem that
 
So much truth in that @Mathematics
 
i check id with in array if exist i need to update value
else push object as new record
 
anyone has experience with using some kind of tool/package for metrics in node? Found some packages but nothing that is very popular at least when it comes to github stars
 
What kind of metrics
 
Does anyone here run a meetup that records its talks? Please ping me if you know/can find out what gear is used!
2
^ can someone pin that please?
 
Pinned.
 
@phenomnomnominal @BenjaminGruenbaum ^
 
9:37 AM
@phenomnomnominal a smartphone
 
@phenomnomnominal btw, you're a RO, you can pin messages yourself.
 
^--
 
huh, I can too
I figured cause I couldn't star
 
please help me to check whether my id is in array or not ...
i have one array i use to push object if id is not match and if id match i need to update array object
 
@phenomnomnominal that's a bug btw, you can star yourself by pinning and unpinning, the star will remain
 
9:40 AM
so now problem is that when ever loop work and where id mismatch it goes to the else part which is logically correct
 
RO's can star themselves ?
 
NO FAIR :p
 
please guys help me ...
 
!!welcome Nikunj
 
9:41 AM
@Nikunj Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
i need to know about a method which helps me to find my id with in array object...
 
@Nikunj if no one is helping you here, consider posting a question on the main site. You have better chances there.
 
ohk....
thank you all ...
 
@Nikunj search in the array for that id ?
 
Wow I'm amazing.
:(
 
9:44 AM
@SterlingArcher : i.imgur.com/hnLxWXC.webm
 
@KarelG SterlingArcher is afk: home
 
@phenomnomnominal hi, yes, what's up?
Meetups use a professional company that records things, I can send you the email-to-speakers if you'd like
 
@BenjaminGruenbaum I'm on the committee for the NZ JS org and we have some budget to get some equipment that we would move around the country for recording meetups, so I'm just trying to get an idea of what people use.
 
you're hiring a person to record the meetings ?
 
10:02 AM
100 bounty still no attention this question is getting
 
So if we're spreading knowledge. Is javascript really a poor language to start with as a first language?
 
@codedownforwhat Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Also you're all here to abolish ignorance, and i've heard more bashing than love for javascript.
 
@phenomnomnominal send me an email to benjamingr at gmail and I'll hook you up.
Also Shai which I think you already talked to once is a good guy to ask
 
@codedownforwhat JavaScript is a fine language to begin with. It has quirks, like any other language, but is gentle and forgiving enough for a newbie to get some experience programming with. If the language is too rigid, it won't be much fun to learn the ins and outs of the entire language before you can do anything. Therefore, yes, JavaScript is a decent first language for a non-formal educating programmer. If you got formal education, a static language is nicer to begin with. (Disclaimer: Opinions)
 
10:08 AM
non-formal education, care to elaborate?
Seems like the language is getting a hell of a lot of polishing lately as well.
 
@BenjaminGruenbaum ta :) sent
 
@codedownforwhat Formal education, as in, going to college and getting lessons from smart people that will teach you all about programming from the bottom up. These usually start more rigid languages that clearly demonstrate the differences between primitives, how to think in objects, and so forth. They are much more theoretical at the start, and therefore more boring, but it's knowledge that forms a basis of understanding any programming language.
 
> but is gentle and forgiving enough for a newbie
? :p
 
Oh yes, then Javascript might be what i need, cause i am an academic failure :D
 
But, in my opinion, if you don't have that formal education behind your interest in programming, choosing a fun language that is much easier to get into and figure out things as you go along is so much better since you won't get bored/quit so easily.
 
10:15 AM
I hear ya, i am struggling to pick one thing as it's an incredible mountain at first.
What's all the complaining about JavaScript than?
 
People love to complain. It happens about any language.
 
just discovered a movie which has a setting 20 years after independence day
 
@codedownforwhat It may also be from disgruntled people that are forced to learn about JS because the entire industry is moving towards JS solutions. And they cling to their old language paradigm and just bitch and bitch and bitch because JS is different.
 
it's also a matter of adaption issue
 
So how does one come from no programming experience and start having fun?
React native looks 'fun'
 
10:20 AM
Java educated person trying Javascript for the first time -> QQ about errors and " it doesn't work " while the syntax is "right"
 
@KarelG Looks cool. Not out yet I guess?
 
no, but you can use the imdb watchlist
 
@codedownforwhat That depends on what you find to be fun ;-) I always believe that working towards a personal goal, something you want to build/make, is the best incentive to stay motivated.
 
> 24 June 2016 (USA)
i watch too much movies
 
I think what i would want to build and what i could build are far apart. I have unrealistic goals.
 
10:21 AM
i rate the movies that i have seen on imdb. Just checked and am currently at 986
gotcha add 2 from last weekend
 
Saw deadpool the other day
incredibly funny
 
@codedownforwhat usually, the failures comes from poor planning
just reach your goal step by step
 
@codedownforwhat My first programming experience was with modifying a game written in C. It's just a matter of keeping at it. :P
 
Well i've started with Elixir/Phoenix
maybe the language does help with the uptake
 
that's a good metaphor
 
@RoelvanUden there's a big "luck" factor that the picture is missing
 
@FlorianMargaine I disagree. :P
 
me at work
 
10:26 AM
From the link I thought a Nigerian was lost in a spa... That was stranger.
 
Nigerian astronaut lost in space needs $3m to get home. The title sums it up pretty well.
 
sadly, my country has a lot phishing victims towards other EU countries :/
experts says two reasons: not well informed and that we're such a naive group of people
 
It is sad to hear that our citizens are still falling to "We are China police. You violated China law. Give us your bank account pin for investigation."
 
yeah
it's damn simple
don't share personal passwords and PIN's
 
Recently changed some account passwords to 10+ upper, lower, digit, and symbol. May be I should try emoji...
 
10:33 AM
@KarelG why not ? are you against freedom of speech
my password is serverNeverGonnaEnd
 
crl
on a scale 0-10 how bad is this app.use(express.static('../')); ?
(a server program that is also served)
 
@crl It's a pretty fun concept imo.
Not sure why you'd need it though.
 
crl
it's a dev static server, so I can serve all projects in the directory
 
Does anyone know of a good alternative to prismjs for syntax highlighting?
 
10:54 AM
Why do you need an alternative
 
I don't really like the api.
 
Highlightjs
 
Any recommendations to where I should buy a normal SSL certificate?
 
@sshow buy it from a normal SSL vendor
 
@sshow let's encrypt
 
11:02 AM
@sshow EV or DV?
if DV, go with let's encrypt, they're free
 
I don't think that highlightjs allows to "highlight" certain lines.
 
googled something and found my own answer on Stack Overflow which actually contains the answer... sigh. was wondering why the upvote button doesn't work
 
@GeoPhoenix asking for peoples experience with different ones. Looking for cheap but most of all a good company.
@MadaraUchiha @FlorianMargaine DV is all I need. But are the free ones accepted in all browsers?
 
@sshow I used cheapsslsecurity.co.uk for my last ones, but go with Let's Encrypt.
 
I am using a "trial cert" from comodo now, but it raises warnings on my HTC
 
11:08 AM
@SomeGuy brilliant
 
@BenFortune @MadaraUchiha @FlorianMargaine thanks. Did not know about let's encrypt. (Y)
 
why on earth would controller removes part of url in angularjs
 
hi
I tired using the following regex
but get a syntax error when defining it
var urlValidationRegex = (https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@iS;
any ideas?
compiler tells me ; is expected after ftp)
 
A regex should be written between slashes
var regex = /^something/
 
tried adding // at start and end but get a syntax error the same
 
11:18 AM
Then fix the syntax errors
 
var urlValidationRegex = /(https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@iS/;
 
Break it apart into pieces and see when it stops working
 
That doesn't look like a correct regx, for example with the unescaped $ sign...
 
wish someone could look into my angular question, been stuck for 3 days now :/
 
11:24 AM
@AwalGarg happened to me a few times.
 
Ron
Hi Guys,
Can you tell me if there's a difference between how Math.random generates random number to how crypto.generateRandomValues generates?
 
@Sheepy you can use pass sentences. I moved on to pass sentences instead of passwords
 
11:39 AM
@AwalGarg happened to me with a downvote.
Mar 6 '15 at 16:04, by Benjamin Gruenbaum
"Wow, that answer is so shit, better downvote"... "You can't vote for your own post"
 
heh
 
crl
with node, can you read command args of: node build --dir a --entry b --dest c as {dir:'a', entry:'b',..} instead of [..., '--dir', 'a', '--entry', ...]?
or do it myself.. yea
 
crl
ah ok, thanks
 
11:55 AM
@BenjaminGruenbaum hn mailed me to repost alpg :o (I deleted it the other day)
brb
 
12:11 PM
@AwalGarg really?
 
12:21 PM
@FlorianMargaine pr fr paitre les mtons
 
crl
pas mal
 
12:54 PM
Does anybody know how I can do something like this?
 
@Connor Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
If for example, I have a function say: function something(callback, somevalue, debug) { ... } how can I make it so, if the function is called like: something(function() {}, true); // true being the intended value of 'debug' that it will acknowledge the fact somevalue is undefined and not try and pass true as it's value since it's the second parameter? If that makes any sense what so ever.
Basically, make it so if I call something(function() {}, 50, true); it will be called as intended, but if I call it like something(function() {}, true); it will be called like something(callback, ignored, debug);
 
@Connor Pass undefined as the second argument
Or redesign your API
If somevalue is expected to be numeric, you can check if it is. If it isn't, assume it was meant to be debug
 
So basically, if (!somevalue) { somevalue = undefined; }
or if(somevalue == true) { // assume the true value was intended for debug }
 
@Connor Sounds like you need some ES6 in your life. :>
If they're varying arguments, pass them as an object and parse accordingly
 
1:05 PM
How can I use ES6?
Is it supported by default? I tend to use NodeJS quite often which I'm pretty sure utilises ES6 considering it uses the require functionality.
 
require is CommonJS, not ES6. But nodejs does allow a lot of ES6 functionality v4.x+
Or you can use Babel
 
AFAIK ES6 interpreter is implemented in the browser. So you write code that uses ES6 syntax and open it in the browser and voila.
 
@thadeuszlay Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Well, at least in the most popular Desktop browsers it's implemented...
 
1:17 PM
It really is always the same with you guys. Someone enters, asks "How to 1+1 in JS?" Leaves with Babel and Bluebird
12
 
But Babel is awzum.
 
@OliverSalzburg But but ... it's about es6 !
it doesn't work without polyfills ;_;
 
I don't understand this "room rule": "There is no need to ask to ask a question. For more details see Asking for Help." Question #1: Why is "to ask" in "There is no need to ask to ask a question" written twice? Question #2: Also, the link in "Asking for help" refers to itself resp. not working?
Is this some "recursion" Programmer joke? lol
 
@OliverSalzburg you'll make everyone proud and blushing with this comment...
 
@thadeuszlay Can I ask you a question?
 
1:23 PM
@thadeuszlay answer on question 1: some people comes into this room with " Can i ask a question ? " That's not needed, thus "ask to ask a question"
question 2: that the link doesn't work is known. Lazy to solve it :P
 
lol. Oh, now I understand.
@Oleg, Just ask! Didn't you read the rules? :D
 
but congratulations for you
you're a part of the small minority that actually read the fucking room rules.
 
The rule would be more clear if the rule would read "There is no need to post 'Can I ask a question?' or the likes."
 
a non english user would be more confused at that sentence
"or the likes" = facebook likes ? :D
 
user5020521
is there any way to prevent this to be null?
 
user5020521
1:32 PM
var element = document.createElement("div");
element.id = 'testqq';
var el = document.getElementById('testqq'); // el will be null!
 
I'm a non-native English speaker and I was confused about that rule. :)
 
@Riccardo990 put the element in the dom
 
@Riccardo990 You haven't appended the element to the dom, so getElementById can't find it.
 
@Riccardo990 your element isn't a part of the DOM. You have to add it
or use el = element ?
 
user5020521
in order to append an element to the dom you might use the getElementById property to append it to an existing id
 
user5020521
1:34 PM
but I'd like to find an alternative workaround
 
you can append it to the body ?
 
You already have the "element". You can append it to whereever you like.
 
just
 
user5020521
let me tell you this
 
No need for getElementById for appending "element"
 
1:35 PM
Hey guys I've got a question about
    Array.prototype.functionName function (var) {}
Why would I use it instead of:
    function functionName(var){}
 
user5020521
if I have an existing id I simply create an element and append it to that id
 
var el = document.createElement('div');
el.id = "foo";
document.body.appendChild(el); // appends the el with id "foo" to the <body>

document.getElementById('foo'); // works since the element is a part of the DOM
 
user5020521
@KarelG thank you for your reply
 
user5020521
let me change the topic a little bit
 
@PeterS Because after setting it on the Array prototype you can [1, 2, 4].functionName().
 
1:37 PM
@PeterS there is a difference between both. At first, you're extending functions of objects which is of Array type. So at each array object, you can call "functionName". The second one requires an additional argument: you want to call that function, but on which object ?
 
user5020521
if I had and element to which I set an id and then I add a click event and a call to a function to the just set id I would be wrong @KarelG
 
user5020521
matter of fact that's what I'm trying to do
 
I think I got it, thanks :)
 
 
user5020521
   var frag = document.createDocumentFragment();
    		var li = document.createElement("LI");
    		li.id = row;
    		li.className = "row";
    		li.className += " cl1";
    		var t = document.createTextNode("hello");
    		frag.appendChild(t);
    		var c = document.createElement("INPUT");
    		c.id = "myCheck";
    		c.setAttribute("type", "checkbox");
    		c.setAttribute("checked", "checked");
    		c.addEventListener('click', changeId);
    		frag.appendChild(c);
    		frag.appendChild(li);
 
1:41 PM
Ricardo, can you format your post ? hit Ctrl+k ?
* kicks caprica * wake up
 
user5020521
is it ok ???
 
yes thanks :-)
 
user5020521
you're welcome
 
user5020521
matter of fact I'm attempting to call a function to a just set id
 
caprica is a name of the bot. Usually she advises you to format the code. but she's down
 
user5020521
1:43 PM
I know who's caprica and I'm sorry she's down :)
 
user5020521
did you get at what I'm attempting to do?
 
changeId is a function right ?
 
user5020521
yes I give you that function too
 
it should work i would say
 
1 message moved to Trash can
@Riccardo990 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
user5020521
1:45 PM
function changeId(myCheck){
	var foo = document.getElementById("myCheck");
	console.log(foo);
}
 
user5020521
unfortunately it doesn't
 
user5020521
console.log says that id myCheck is null
 
This bot knows no mercy x)
 
remove the quotes
 
user5020521
but if I removed the quotes it'd be wrong as such myCheck is not a variable
 
1:47 PM
it works at me ?
 
user5020521
am I wrong? @thadeuszlay
 
user5020521
@KarelG that code is working to you?
 
@FlorianMargaine I figured out what the progn method combinator does
 
myCheck is a parameter you're passing in though?
 
1:48 PM
@TobyWilkes Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
user5020521
@KarelG the fact is that I'm using a variable as id to when it comes to getElementById
 
user5020521
let me edit that fiddle so that I can show you the whole code
 
user5020521
is that allright?
 
It absolves you from needing to use call-next-method every time, by default, only the most specific method is called (unless you use CALL-NEXT-METHOD which will chain the next), by using the progn combinator, it will, by default, call all methods from most specific to least.
 
yes sure
 
user5020521
 
What is the parameter "myCheck" in "changeId()" good for?
 
user5020521
it's not translated and I'm sorry about it if you need it just ask me and i'll resend it to you
 
@MadaraUchiha ooooh
 
user5020521
@TobyWilkes it's correct myCheck is a parameter I'm passing to the function changeId
 
It's working for me btw
When I remove the quotes, that is.
It's meant to be a list of places I guess?
 
user5020521
1:57 PM
did you take a look to the fiddle I've just posted here
 
user5020521
that's right
 
Yeah, that's what I just looked at
 
user5020521
so you're telling me the only thing is to remove that goddamn quotes? aha that sounds great man
 
You lack very basic knowledge about JavaScript and how to manipulate the DOM. Maybe you should read a beginner's book about that first.
 
Check the fiddle
 
1:59 PM
You would be faster (and a better Programmer) than asking people on the internet.
 

« first day (1948 days earlier)      last day (3010 days later) »