« first day (1542 days earlier)      last day (3424 days later) » 

alert('Hello');
 
@BenjaminGruenbaum our help doesn't seem needed :)
 
Well, two delete votes
Oh, already deleted?
 
Yup dead.
 
> Though this contradicts to the description of the algorithms in the C++ Standard there is no any reason why it can't be done except the low qualification of the members of the C++ Standard. Committee
rude.
 
12:06 PM
Rather stupid
 
Almost PHP even.
 
And the dot near the end is painful
 
Vlad's gonna vlad.
 
I must retire. I bid you all adieu. Good evening
 
Roger that, over.
 
12:09 PM
Tally-ho. 10 4
 
Hello folks
 
Hello folk
 
@BenjaminGruenbaum the friend I have in COBOL is originally a researcher in oceanography, and he converted to IT with this job because he couldn't find a job. It's been 2 years now.
 
@FlorianMargaine he should learn more languages then
 
He's not really interested. A job is a job.
 
12:19 PM
same as before mr Florian
 
@FlorianMargaine yeah, I don't really connect to "a job is a job" programmers (although I understand it's a perfectly valid way to treat your profession)
Lol, that Vlad guy downvoted me.
Here if I had to guess
 
Hi
 
lol, he did it to everyone else who left a comment too :D
 
Q: How correct is to give ng prefix to a third party plugin? Asking since there is already a ton of plugins, like ngTable, ..., but at the same time ng is more of a internal prefix of angularjs i.e. ngResource, ngRoute, ... .
 
12:35 PM
At least you know it's an attribute that is aimed to be read by Angular. I don't really see the problem.
 
Just seems a bit weired. At least it to could be ng-(some-locale-plugin-prefix)
 
When you do not work alone, or your code might be maintained by someone else, or you're using other stuff that read attributes to work, than I think it's a good thing to "prefix" your attribute this way.
 
With ng?
 
yeah I use ng-{own-plugin-name}-..
ng-drag-wrapper ng-drag-x ng-drag-y ...
 
Hmmm. Well. Okay. Thanks.
 
12:42 PM
0
Q: Dealing with contributing but abusive users

Benjamin Gruenbaumtl;dr How can I as a user deal with content of users who are helpful in general but leave abusive comments and/or answers? Is there anything I can do to help mitigate the problem when I run into such an answer? An anecdote So, today in chat I ran into this answer here by this user that star...

 
how do you debug es5 code thats referenced in es6 code?
export default
class Core {
constructor(scene) {
this.sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene);
this.isSelected;//selected units receive commands

}
}
I can't step into BABYLON.Mesh.CreateSphere
 
Seriously, people don't know how to iterate a collection in 2015
How the hell did Justin's answer get upvoted?! It's not even valid JavaScript!
 
They may have taken up coding as a new years resolution :o
 
@SecondRikudo you can return previous.concat()
 
@FlorianMargaine Wasn't sure about it, thanks
 
12:46 PM
Someone downvoted you
 
0
Q: Array is not getting empty

Rakesh ShettyI have a array search_by_type which is declared at the top. Now in every click I am setting the rest_type_id value to array which is working fine. Now other page action is calling get_all_restro() function which will empty the array search_by_type. When again I click restro_type_filter class it ...

 
Well, should. Your code doesn't work as is, concat is non destructive
 
@FlorianMargaine Done
 
@SecondRikudo you'd be surprised.
 
How the hell did my answer got downvoted and that unsafe for in got upvoted?
Know what? I'm getting too worked up over this
I give up, let him use his crappy for loops.
 
12:49 PM
@SecondRikudo it should be return arr.concat
Sorry, reviewing on mobile.
 
Yup.
@BenjaminGruenbaum Now all that's missing is someone that'll answer with $.each
 
Someone does not like you.
+3/-3
 
@SecondRikudo angular.forEach
 
@dievardump I did downvote all other answers but one.
-1
A: accessing arrays in json object without using keys

Gaurav DaveTry this: foreach($country as $key=>$value){ // Getting Qty corresponding to inventory echo $value; } Above code is in PHP, but it might give you understanding

This one made me laugh out loud though
 
@Justin I have not downvoted this answer but I'm letting you know right now that the only reason I did not downvote it is because it would look like people are ganging up on you. I do appreciate your contribution to the site but please keep in mind that the only standard I use for downvotes here is usefulness or lack of. As it currently stands your answer still has a pretty serious mistake that would cause the code to fail sometimes. Please correct it. — Benjamin Gruenbaum 1 min ago
 
1:03 PM
hello there guys, actually I have one question I don't know whether it is right to get it asked here. So please excuse me.
The question is actually I have make a Constructor function inside Javascript and bound variable to it using var variable_name = value; not by using this.variable_name.
And when i make instance of it and console.log(newly created object) it shows me empty ?? Why so means that variables shouldnot be bounded to the new instance ?
 
@Gurjit The variable is in a scope that probably disapeared at end of construction, unless you also created functions inside
 
for(var i in data){
    if(data.hasOwnProperty(i)){
        for(var j in data[i] ){
             if(data[i].hasOwnProperty(j)){
                cities.push(data[i][j]);
             }
        }
    }
}
 
If that's not clear, please make a fiddle to reproduce your problem
 
Oh god MY EYES
 
@SecondRikudo and I'm sure data is some object that can't possibly have iterable inherited properties...
 
1:07 PM
@Gurjit if you use var .... it is normal that it won't be attach to the object. you need to use this. to attach it to the object. Else it will be a scoped variable.
 
2
Q: accessing arrays in json object without using keys

Prafful GuptaI have a JSON object of arrays data = { China: ["Guangzhou","Fax"], Majorette: ["Fungous","Godzilla"], Bhutan: ["Thimphu","Parr","Photofinishing"] } I want to access name of cities in an array without explicitly mentioning the name of countries as list is very long. var cities = [];...

 
@dystroy @SecondRikudo thanks for instant replies. I have created function to access the variable and the variable is accessible to but the problem is why object is showing empty and when i try to use this.variable , the newly created instance shows that variable in it .
@dievardump yes man thats what i am asking but why ?
 
@Gurjit please create a jsfiddle.net example.
 
And you might want to read a little about scope in JS, that won't be wasted time
 
@SecondRikudo ok one min please.
 
1:08 PM
Because that the way it works. It's scoping. If you don't attach your variable to the object by using this, then it won't be attach to it.
 
@SecondRikudo you should probably have not answered this question to begin with though :P
Just because we got your back doesn't mean you should do silly things :D
 
@BenjaminGruenbaum I don't know why I get myself into those messes.
 
That's ok, I got myself into a mess too
here :D
 
It's like making a birthday cake for a friend but not bringing it with you to the party. The cake is all shiny and yummy in your home, but you can't eat it or see it from your friend's house :(
 
@BenjaminGruenbaum Already seen it :P
BTW @BenjaminGruenbaum these users get banned just like any other
They have a better starting point, and they get handled more gently by mods and employees
But they get suspended just the same.
Ippap was recently suspended for a year.
He was one of the top Qt users
 
1:11 PM
The question is if you can stop a lpapp or your common sense before they get to a negative feedback loop
 
I don't think you can.
It's in their character.
They don't really come to this site to help people, they come because they like to feel superior over others who know less than them.
 
Oh hi @Omar what's up?
 
And that's fine, the end justifies the means. But once it gets out of hand, there's where things have to be stopped.
 
Haven't seen you in the chat before
 
@BenjaminGruenbaum Hi
 
1:13 PM
Hello
 
@Omar what brings you to our chat room :)?
 
I never joined this room, or any programming-language-related room
@BenjaminGruenbaum just out of curiosity :)
you have an active JS community
 
I'm a 14 year old programmer, have an app on the App Store, worked on a startup and participate on programming competitions. I'm pretty active in Stack's chat, but not in this room.
 
@Omar yeah, quite a bit of regulars here :) Lots of JS, most of it is either random debates, helping people with JS or debating the language. We also have monthly doe challenges now (current one in voting) and other stuff going on. Anyway - free to lurk and chat.
 
@dievardump thanks dievardump for the answer and i have to work around scope then.
 
1:17 PM
@BenjaminGruenbaum I'm active on only since I know nothing else
 
I have a question: I must cache the users on the browser. I created my own REST API with Node.js, and I must save the account on the browser's cache for the most time possible. Any library you would suggest?
 
Sorry to offtrack this, but I love seeing Israeli and Palestinians people talking together...
 
@Omar oh yeah I saw you have a blog about that once when I helped a friend who is using jquery mobile. To be fair I'm not experienced enough with it to formulate an opinion.
 
@GabrielTomitsuka localstorage doesn't fit your purpose?
 
@GabrielTomitsuka localStorage. Not a library.
 
1:18 PM
Ok. I'll see
 
@FlorianMargaine seriously? This is hardly the first time :P I just pinged him since I remember him positively before from Meta.
 
Yeah, it's still heart warming
 
@FlorianMargaine why? There are idiots on both sides on most conflicts and I don't think they're really the sort of people who come to SO.
 
@BenjaminGruenbaum I post some articles whenever I find an interesting topic. I'm trying to learn other languages e.g. AngularJS, knockoutJS, etc. to help jQM users
 
1:21 PM
hey, does anybody here have time to answer a question about array/objects ?
 
@Omar we actually had a Knockout challenge the other month here with the Stack Exchange API. I think KnockoutJS has a great learning site - I really enjoyed it.
 
@Anonym.. Don't ask to ask.
 
@Anonym.. don't ask to ask - just ask :)
 
Just ask :)
 
@Anonym.. that depends, do you have time to ask the question?
 
1:22 PM
@BenjaminGruenbaum I once posted a question and got 2 down-votes from the "air" haha
-1
Q: Retrieve dynamically added element

OmarThe example is taken from knockout tutorials - working with lists and collections. <table> <thead> <tr> <th>Passenger name</th> <th>Meal</th> <th>Surcharge</th> <th></th> </tr> </thead> <!-- Todo: Generate table body --> <tbody data-bind="foreach...

 
and one upvote
 
ALSO sorry about the one last question
 
now two
 
The code was taken from KO docs.
@JanDvorak thanks :)
 
How can I identify if the AJAX response is an object or error message string?
 
1:24 PM
@Omar not mine ;-)
 
@Omar that's actually a decent question.. I can understand why it was downvoted (Knockout is about not touching the DOM yourself outside of bindings) but a downvote is pretty stupid there. It's almost as if it was downvoted to punish you for not knowing knockout already :P Silly stuff.
 
I'm an iOS and front-end developer, sorry about this
 
@GabrielTomitsuka as in, a JSON object? Look at the first character.
 
@JanDvorak it was a hidden message to you to upvote it :P
 
YOU'RE A GENIUS! Thanks
 
1:25 PM
@Omar I guess it failed then ;-)
 
@Omar It's mine - like I said I think it's a decent question. I didn't even know about afterRender either.
 
@GabrielTomitsuka or JSON.parse and typeof
 
But better have a JSON Object with a message (or else) property. I wouldn't have different type of return from the same URL.
 
@GabrielTomitsuka if (typeof variable === "string")
 
@BenjaminGruenbaum haha, maybe. I'm not a programmer/developer. I happened to know jQM by coincidence.
 
1:26 PM
Indeed. {error:true, errorCode:10, errorMessage: "oopsie"}
 
@BenjaminGruenbaum Thanks for the +1. I would really love to find an answer for my question.
 
I'll check that
too lazy for updating the REST API
 
@Omar you have 800 programming answers in SO... Like I said I'm not a jQuery mobile fan but I wouldn't say it's any less programming than anything else. Although if I were you I'd definitely consider reading a book like "JavaScript: The Good Parts" that's pretty short and very informative on how the JavaScript language works.
@Omar like this ?
 
@GabrielTomitsuka 14yo programmers have not right to be lazy :p
 
@dievardump :(
 
1:33 PM
i dont know much javascript so i may express myself wrong. I find it confusing the part about objects and arrays. but what is the javascript version of php array like this one for instance: $a = [ "test1" => 2, "test2" =>5 ];
 
@GabrielTomitsuka hi.
 
@Anonym.. An object
 
I didn't have an app in the app store when I was 14 :(
 
var a = { test1: 2, test2: 5 };
 
This is an Object in JavaScript : var a = { test1 : 2, test2 : 5 };
 
1:34 PM
i cant write it as an array?
 
It's not an array, so no.
Well... technically you can. You really shouldn't though. Just use an object.
 
@Anonym.. No, arrays only have sequential, numeric indexes.
 
ok, thx
 
You could also use a Map but that'd just confuse you at this point since it's not very well supported in browsers yet.
 
@BenjaminGruenbaum Hey
 
1:36 PM
so if i log a variable in firefox and it says ["something": 123, "something":1234], its an array with objects as elements?
 
It really looks like it should be an array... var tests = [2, 5];
 
@BenjaminGruenbaum Some people take longer than others :) Do you currently have one?
 
@GabrielTomitsuka oh, also there was no app store when I was 14 XD
 
I didn't have a computer when I was 14 :p
 
There was no web when I was 14 :(
 
I am a computer
 
I have one that's very close to being done but it's pretty big. I'm not big at Objective C but I know Swift pretty well.
 
There was no nick dugger when I was 14
 
@Anonym.. It shouldn't say that
 
@NickDugger You're running which programming language? You're UNIX based? Linux? Arduino bot?
 
1:38 PM
There was no spoon when I was 14
 
@KendallFrey ARE YOU SERIOUS?
 
@GabrielTomitsuka looks nice. How do you like Objective C?
 
@BenjaminGruenbaum My favorite language.
 
@GabrielTomitsuka NN
 
I run raspbian
node
 
1:38 PM
I'm pretty good at it
 
I run slowly
 
Meh, I guess I'm not a huge fan of nils and @s :P
Objective C just seems so verbose all the time.
 
hello every one
 
@NickDugger I see. I recommend you to use this to speaking: developer.att.com/apis/speech
I used it on a Arduino project :P
 
Why is it your favorite? Side question: which languages do you know?
 
1:40 PM
@FlorianMargaine Because it's the one I know the most. And about 10
I've got quite a few medals on programming competitions
 
or actually it says just array[]
 
Sorry, I changed my question. How many is not interesting, which ones is a better question.
 
for C#, I'm in the stage where I can comfortably edit code and write small portions of it. It won't be long until I can claim that I know it.
 
@NickDugger Read C# in Depth, it was like "The Good Parts" of C# for me, would recommend.
 
The language you know most should be because it's your favourite, not the other way around.
 
1:41 PM
Also written by a guy who is used to answering programming questions which is good.
 
@BenjaminGruenbaum will do, brahsef
 

Old boys

5 mins ago, 17 seconds total – 3 messages, 3 users, 0 stars

Bookmarked 8 secs ago by dievardump

 
@BenjaminGruenbaum Please don't describe Jon Skeet as "a guy"
 
@BenjaminGruenbaum I was AFK, I'll check the link. Thanks in advance!
 
1:43 PM
Let's see: Objective-C, C++, Javascript, C, Pascal, HTML, CSS(if this count), PHP(begginer level) and wait there's more
 
Sure thing, good luck.
 
Java HOW COULD I FORGET THIS
 
@BenjaminGruenbaum Jon Skeet is a not a guy.
 
@GabrielTomitsuka Becasue it's a bad language :P
 
HTML and CSS don't count
 
1:43 PM
Yeah, 8 if CSS doesn't cout
Then 7
 
@NickDugger sure they do.
 
Jon Skeet is somewhere between an archangel and a god.
 
@GabrielTomitsuka Trauma-induced amnesia
 
English counts, then
 
I live in Germany!
And was born in Brazil
 
1:44 PM
No, English is a natural language not a coding language.
 
I know English and Javascript. Get on my level.
 
@GabrielTomitsuka You should forget about it. Everything. Except the NullPointerException.
 
@GabrielTomitsuka I see, only the C family languages. You should try out other families like Haskell or lisp
 
@BenjaminGruenbaum It is a coding language, thanks to Compute
 
@dievardump I can't. Android is selling too well for this
 
1:45 PM
@GabrielTomitsuka make sure you really understand these languages though - C++ for one has a lot of paradigms, so does Objective C and so does JavaScript. Knowing at least one language in-depth is often more important than knowing several at a shallow level :)
@GabrielTomitsuka ionic :D
 
I know php, but I never say I do, because all it gets me is dirty looks
 
@NickDugger <.<
 
@BenjaminGruenbaum I know Objective-C pretty deeply. Depending on my mood, I can list all the inheritances in UIKit framework.
 
@BenjaminGruenbaum wonderful. I have modified it and add jQM library jsfiddle.net/Palestinian/Lwx4pj39/1
The thing is, jQM uses widgets that need to be initialized manually when added dynamically. That was the purpose of my question.
e.g. asjQuery.find("select").selectmenu();
 
@GabrielTomitsuka knowing UIKit isn't the same thing as knowing Objective-C - just saying :P
 
1:48 PM
@BenjaminGruenbaum Oh, I created my own XMPP client. Don't worry.
 
@Omar ah - Knockout deals with that via bindings that encapsulate DOM interaction. Here's the manual page.
I also found this
 
@BenjaminGruenbaum could you please post an answer, without some explanation (simple)
 
@Omar to be fair the answer by Joe Daley is pretty close and the answer by GôTô covers the binding aspect - the problem is that neither of them (and me neither) knows jQuery mobile too well. You might want to look at it some more (the two links I sent you) and write your own answer - I could write an answer but I doubt it'd be very good. Instead if you write an answer after that it would probably be much better. You're welcome to post a link to it here and ping me for criticism.
 
(It's currently not open source, I will open-source it after the new app's final release)
 
@GabrielTomitsuka that's good - GitHub participation really helps. It's worth building a name for yourself at this age and interacting with communities - it's how I landed my first job as a programmer.
 
1:53 PM
@BenjaminGruenbaum sounds like a good idea. At least, I'll practice KO while posting an answer. I'll let you know. Thanks again!
 
@Omar Please stop starring messages that helped you specifically. That's not what stars are for.
2
 
Any time.
 
@SecondRikudo my bad.
 
54.165.11.109:5000/register?username=<your username>&email=<your email>&password=<your password>&pin=<your pin>
You can register to Painless easily and really fast like this :P
I must migrate GET to POST, but Express.js doesn't let me do it. bodyParser was deprecated :(
 
@GabrielTomitsuka I sure hope you anticipated DOS attacks
@GabrielTomitsuka bodyParser was moved to a separate module, you should still use it.
 
1:55 PM
Don't worry, there are multiple other security protections.
 
@BenjaminGruenbaum Yeah, I use bodyParser... any idea why it was separated? Seems odd.
 
@GabrielTomitsuka I'm not a jerk so I won't - but what's stopping me from creating a thousand accounts right now?
@NickDugger modularity - so you can swap it out for a faster or more feature rich parser in the future.
 
ah, ok. Same things happened to EJS. They took out essential features, and a package called ejs-locals was created, but it's unmaintained, so I switched my templating engine :(
 
@BenjaminGruenbaum Nothing. However, in this case, deleting your accounts would be an option.
It wouldn't be a problem.
 
@GabrielTomitsuka registration without secondary validation (email, openid, etc) is almost always a security problem.
 
1:58 PM
@BenjaminGruenbaum OH YES FORGOT IT
You would have to confirm your email
Before that, won't work
I'm assuming you don't have 1000 alias ready for this.
 

« first day (1542 days earlier)      last day (3424 days later) »