« first day (1850 days earlier)      last day (3081 days later) » 

12:01 AM
Says the guy who would rather drive me out of a chat room than change his avatar.
 
come here and say that to my faces
 
So if anyone asks why I haven't been here in ages...
 
because you're pregnant
 
@JanDvorak what about his avatar?
 
12:28 AM
!!s/ace/ece/
 
@Abhishrek come here and say that to my feces (source)
 
What's going here, JavaScript discussion na
 
salami on my head
 
Salami?
 
indeed
 
12:37 AM
What it related to
Have a nice day..bye
 
 
I'm converting MS Access SQL to postgres and I'm out of vodka.
 
I have almost a full bottle of grey goose behind me
 
ohh.. wait i do have some svedka, but that's for mixing
 
 
1 hour later…
2:04 AM
well i got my ember issue resolved o/
 
 
2 hours later…
3:38 AM
how do you troubleshoot 500 errors?
!!youtube no magic
 
 
1 hour later…
5:06 AM
 
5:43 AM
Hi, I have option to choose frontend technologies for a new project.
Any suggestions on good frameworks or libraries I should use for this complex single page application?
 
6:15 AM
I'd recommend you to use AngularJS for the SPA (single-page application). It makes decoupling a LOT easier and works flawlessly. You can even create your own HTML attributes or tags to something specific. All without that steep a learning curve. Best of luck! :)
 
@weirdpanda Welcome to the JavaScript chat! Please review the room pseudo-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.
 
@weirdpanda I just realised that the project is actually multi-page application
 
6:43 AM
hi all
got an issue with some mocha tests in node - i'm testing a model and calling the objects method to get a response, when in the main code base it returns as expected, but when testing it fails to reach the call back and the tests just time out.. any ideas what the issue might be please? :)
 
7:02 AM
hi
 
@VineetKumarDoshi Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Is there any way to get inspect element like the way we get source code url? I want to scrape this hackerrank.com/leaderboard but source code is diff frm inspect elements
 
7:19 AM
morning
 
ASR
7:31 AM
how do I toggle all my css when I click on a button?
 
crl
@VineetKumarDoshi you'd have to use something like requestable.pieterhordijk.com for sites that load with ajax
 
@ASR why is it called mybev?
 
crl
7:52 AM
@VineetKumarDoshi or phantomjs probably
it annoys me so much that the dragLeave event is fired after the dragEnter
 
8:14 AM
Hello.
 
@pokekart2002 Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Ok. So I have a simple code to get Feeds and merge them, and display in time order.
    <script>
  $(document).ready(function() {
    var blogFeed = $.ajax({
      type: "GET",
      url: "http://www.foxinflame.tk/blog/feed",
      dataType: "xml"
    })
    var videoFeed = $.ajax({
      type: "GET",
      url: "/videoFeed.php",
      dataType: "xml"
    })
    $.when(blogFeed, videoFeed).done(function(blogXML, videoXML){
//The one below this one is the 329 line
      var combinedXML = $(blogXML).find("item").concat(videoXML.find("entry"));
      var sortedXML = combinedXML.sort(function(videoFeedCompare, blogFeedCompare){
It does not work. How would I solve this?
The 329 line displays an error in the console.
 
ASR
@emporio it can be any thing, but I took a div with the id "mybev", so when i click on it i need to disable and I need to enable the css.
 
@pokekart2002 Well there's your problem. Fix that error.
 
Yes. But the error is `Uncaught TypeError: item is not a function (index:329)
`
I don't know what is causing it... The line seems fine.
 
8:17 AM
@ASR please complete your fiddle
and report
repost
 
Here is a fiddle of my question, but the No Access Control Allow Origin header is present... jsfiddle.net/72zbs0a4
 
ASR
@emporio I can't post all the code, because lot is there, my requirement is there is button called "my button", when I click on that button i need to disable the some of the css and again if I click on the same button the css should be enable, like toggle.
 
Can't you do element.toggle() using jQuery, or do you not like using external resources?
 
8:34 AM
mah internet usage for the month gone beyond limit so now I am stuck at 10kbps for 11 days :(
 
hi I have a question regarding autocomplete, I hear that normally as the user keeps typing the previous search query results are removed .. and only the present search query term is retained.. how to achieve that?
 
@argentum47: ^
 
:P .
 
look at especser's autocompletion code. it is rock solid.
 
um, maybe like oninput I have a timer that checks if the present value and the value after timeout is same then send the request
 
8:39 AM
1 message moved to Trash can
@ASR Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
kick
 
1 message moved to Trash can
@ASR Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
ASR
ok.
 $("#mybev").click(function(){
            $(".journal-article-header-edit").css("display", "none");
            $(".taglib-workflow-status").css("display", "none");
    });
@emporio how to do it with toggleclass?
 
@ASR you can't ready the jquery link I sent you?
 
ASR
@emporio yes I read, but not found appropriate example
 
8:42 AM
your answer is there
reformat your code
to use toggleclass
not .css
it's not rocket science
 
ASR
:) ok thank you.
 
@AwalGarg hun, I didnt know there was so much niftyness behind the spec searcher
 
can I combine these two ?
$("#container").on('click', '.Imgbtn img[data-status="2"]', OpenCommentsDialog);
$("#container").on('click', '.Imgbtn img[data-status="4"]', OpenCommentsDialog);
 
with commas ?
 
$("#container").on('click', '.Imgbtn img[data-status="2"], .Imgbtn img[data-status="4"]', OpenCommentsDialog);
like this ?
 
8:50 AM
$("#container").on('click', '.Imgbtn img[data-status="2"], .Imgbtn img[data-status="2"]', OpenCommentsDialog);
Yea
 
excellent, thanks
 
@Cerbrus
@argentum47 :D
 
for a complex muti-page project, which UI framework should I go with?
 
No framework, just libs.
 
like?
 
9:01 AM
I dunno what you need.
 
I was planning on reactjs library
but I don't know how it will work with multi-page responsive web app
 
That's just one piece of the puzzle.
It'll work fine, it's just a view thing.
 
ok and to keep the code organised, what you prefer?
 
Multi-page basically indicates you want routing so either make that yourself (it's just state you pass into the views) or use react-router
(making it yourself is super easy)
 
routing is necessary for single page apps, not for multi-page apps.. right?
 
9:03 AM
some script kiddies in this room like reactjs + react-router + semanticui + babel + webpack.
 
"responsive" basically means some css media queries, no big deal, but hey you might like something like bootstrap or foundation; i'd write them myself, but that's me
to keep code organized I tend to use commonjs modules, nodejs style; and just shim require and release for prod with browserify.
 
@RoelvanUden even I prefer writing css :)
@AwalGarg that's a lot of things!!
I think I can make it short by just using "reactjs + sematicui + webpack"
 
Just grow your stack as you need stuff. But don't grab too many stuff just because you need one thing. Keeping it simple is really quite something, too.
 
yes thanks
 
for example, I develop mobile apps with just react. To release, I use browserify (never during development). And for language features I use TypeScript. So all in all, I really just use one lib, a different language, and a tool to make a realease build
 
9:09 AM
I do what roel said. Except that I dev on FF dev edition, so I can use a lot of ES6 stuff. Thus my release build step includes babel in addition.
 
TypeScript? Yikes
 
Having no build time in development is godsend.
 
Hehe
 
Someday I will write a collection of sweetjs macros and a native extensions lib and ship my own "language" :D
 
!!s/anguage/ibrary/
 
9:13 AM
@Cerbrus Someday I will write a collection of sweetjs macros and a native extensions lib and ship my own "library" :D (source)
 
that's not a library
 
More-or less kinda
It's still JavaScript
So it's not a different language
 
It is a compile-to-js language. Like TypeScript/coffeescript et al.
 
Right. Ignore the nonsense I just said :P
 
user5020521
why is this method returning an undefined value?
 
user5020521
9:17 AM
var a = document.getElementById("r0c1").value;
console.log(a.value);
 
because values don’t have values
 
user5020521
so can't I console log the value of an id?
 
@Abhishrek That Lawrence Krauss video was great! Thanks!
I'll watch the other 2 when I can
 
I think I overwrote a git node...what do I do to get that version of code back?
My initial code base was A. I modified A and commited (to B). I did a checkout A, made some modifications and commited (to C). Now how do I get B back? #git #source-control
 
Memento.prototype.addCollaborator = function(collaborator) {
  return Memento.update({ _id: this.id }, { $addToSet: { collaborators: collaborator.id } })
    .then(() => {
      collaborator.sendShareMemoryEmail(this, (err, data) => {
        if(!err) events.emit("collaborators::add", this, collaborator.id);
      });
    });
};
is the last this == the this inside .then() => {
 
9:24 AM
@deostroll #thisisnotfuckingtwitter
 
I don't think hash tags are exclusively meant for twitter? :)
 
is lexical scope this and the invoking context this the same thing?
 
@argentum47 well to be on the safe side...assume its not...
 
@argentum47 what is "lexical scope this"?
 
9:38 AM
@argentum47 no, it's not.
It, it doesn't have to be
 
@argentum47 yes
@FlorianMargaine awesome
 
@argentum47 I don't see any == in that code...
 
He is asking if the last this the same as the this value inside the .then
 
Oh
@argentum47 Yes, both of which are the Memento instance on which addCollaborator() was invoked on.
 
-2
A: what to do with a question, which isn't a question but a tutorial?

user3032917Create question and tell your friend to reply with tutorial style

Oh meta... You keep surprising me.
 
10:01 AM
Personally I don't even like those (self answered or not) good questions that are only a pretext for a tutorial. IMO answers should be focused on a single problem instead of aggregating all the problems of a how-to.
 
Hence "good" in:
> What the OP probably should have done, is to post a good question
@Zirak: chat.stackoverflow.com/transcript/message/26762025#26762025 Bot's not formatting !!define urls properly
 
@Cerbrus Do you notice I put "good" in my comment ?
The reason an answer should be simple and regard only one problem is that it's the only possible way to decide if it's good or bad and, more importantly, whether it stays good. Those tutorials should be in blogs, not in SO.
 
Ah yes
I can agree to that
 
10:26 AM
@Cerbrus That's... actually how canonicals work basically.
 
"ask a friend", not really, not necessarily
 
@Cerbrus I'm fairly sure that what he meant was "as long as it's in the form of question and answer, it's okay"
He's just not aware that self-answering is a thing.
 
That may be the case
 
lel
best answer NA
 
10:43 AM
1 message moved to Trash can
!!tell spaffy format
 
@spaffy Format your code - hit Ctrl+K before sending and see the faq
 
damn, bad format
 
@MadaraUchiha but canonicals are like wikis, not tutorials.
 
1 message moved to Trash can
@spaffy 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
 
Hi, I've got question.I've got this code before </body>:
<script>
	require(['lvrg', 'jquery', 'jquery.i18n', 'purl'], function (lvrg, $) {
		$('#sidebar-wrapper').load('/menu');
		$("#menu-toggle").click(function(e) {
			e.preventDefault();
			$("#wrapper").toggleClass("toggled");
		});
		$(document).ready(function() {
			var menuOptions = $('a.menu-option');
			console.log("document ready $('a.menu-option'):", $('a.menu-option'));
			$('input#search-term').keypress(function(e) {
				console.log('e:', e);
Now it is formatted, right?
 
10:55 AM
@MadaraUchiha @AwalGarg thanks all..
 
@spaffy Yes, thanks
@spaffy I'm putting my money on "there's not input with an ID of search-term"
 
how would a cancellable implementation of promise look like
 
But there is.
<input type="text" class="form-control" placeholder="Search for option" name="search-term" id="search-term">
it's custom styled by me
 
when I paste this event bind into console, while being on website I'm developing now, and hit enter/return the code is working, because when I type into this input, there are logs of this event in console
using latest opera
 
11:01 AM
@MadaraUchiha I second that.
 
VM2390:3 e: m.Event {originalEvent: KeyboardEvent, type: "keypress", timeStamp: 1447066776167, jQuery111308055775864049792: true, keyCode: 102…} this is log from console
 
@spaffy Then it is not yet available when $(document).ready() is fired.
Please try to reproduce the problem on jsfiddle.net
 
stackoverflow.com/questions/33607684/… 42 numbered variables. Because why not
 
@Cerbrus the fuck is an Agile controller? Do they mean Angular?!
all those $scopes :( it's like abuse.
 
Probably angular
 
11:19 AM
Answered that.
Then I saw:
Thanks for the comment but if you can't answer the question please don't bother, Dude! — user616076 6 mins ago
Ungrateful <redacted>
 
@MadaraUchiha sure it is, because this input is inside of sidebar container, which is just hidden, but fully accessible in DOM.
 
Hi everyone
I used clipboard.js file to copy the contents of pre tag to clipboard, the code is getting highlighted in the pre tag. How to unhighlight the same? Can anyone help me
 
e = mc^2
 
@MatthiasHerrmann Welcome to the JavaScript chat! Please review the room pseudo-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.
 
11:32 AM
sry needed to copy and paste paste paste paste something
 
@MatthiasHerrmann F=ma
 
@argentum47 it seems that they dont have 1440p images
 
alert("Newton 1");
thx @Neoares
 
^ this one better
 
Sexy noice
set my new wallpaper
 
11:39 AM
wth is that
it's a nuclear fusion?
 
@SomeGuy :-) it was kraussic ;-)
@Neoares no
nuclear fusion looks better than that
 
so any idea? :D
 
@Abhishrek so quick
 
ok ... enough browsing wallpapers, I am gonna stick with this one for now:
 
11:46 AM
@tereško thats wonderful
I just follow Nasa's feed and get good ones every now and then
thats mine ^|
 
it's kinda hard to find a wallpaper for a 21:9 screen
btw, @Abhishrek, what did you think of Atom?
 
@tereško Its good.
although i find sublime much lighter than it !
 
well, that's true
however, ST3 has been stuck in "development" for two years now
I think the project is dead
 
@tereško no no no they pushed updates recently
 
Build 3083 - Release Date: 26 March 2015
Build 3080 - Release Date: 24 March 2015
Build 3065 - Release Date: 27 August 2014
Build 3059 - Release Date: 17 December 2013
 
11:54 AM
does TestUtils.renderIntoDocument not work with pure components?
 
ST3 does the things I need it to do though
 
const TestComponent = () => <div key="wat">wat</div>;
const instance = TestUtils.renderIntoDocument(<TestComponent/>);
 
then it's just fine for you
 
instance is null :(
 
but I want PHP7 and ES6 support
 
11:54 AM
plugins?
Or do you need things beyond syntax-highlight?
 
syntax highlighting is not done with plugins in ST3
 
well, I guess packages then. Any way, shame if development died off but I still feel I got my money's worth
Atom still looks interresting though
Whatever happened to Brackets?
 
@ivarni how it's possible that OSX is the most used OS?
 
Dunno, maybe it appeals more to OSX users?
 
maybe :o
 
12:03 PM
Hi, do you know about a good logging library for JavaScript?
(in browsers)
 
Console
 
@ivarni It's still alive, but far outshadowed by Atom in every way.
 
Console is not a robust solution. It's the primitive..
 
St3 got an update this year, and you can get plugins for es6, probably php7 as well
 
Guys. Seeing this answer by somebody who knows more than me : stackoverflow.com/a/33608733/263525 I don't get what are the "many languages" here. Any hint ? Where do you have new Date() && null returning false ?
 
crl
12:09 PM
I need help, doing this kind of drag-n-drop output.jsbin.com/dopeqe where you can insert an element before another if you drag on the top 30% of it, after in the last 30% and inside it else. The problem is it 'flickers' recordit.co/UkIieyLeBQ < not really visible on the gif, but if you try to drag on the limits of elements you should see it
do I need some debounce?, but it would just flicker less often, that doesn't eliminate the problem
 
12:23 PM
@Neoares awesome :D
 
yess
 
!!buy new external hard disk or sabotage dead laptop ?
 
@Abhishrek sabotage dead laptop
 
@CapricaSix oh you
@tereško well 26 March 2015 is not bad
i mean its not like babel :P
 
@Abhishrek in past two years there have been 3 updates and 1 patch. For a software that's still not out of beta.
 
12:28 PM
@tereško thats true
anyways i am using atom today and by tomorrow
lets see if i like it more i will just switch to it
 
@Abhishrek !vote sabotage
 
@DenysSéguret I think he's some dude that farmed too much rep.
 
@RoelvanUden He knows how to code, though, and he knows JS well too.
 
0
Q: TCP Socket Programming in JavaScript

Omar MokhtarHow to make javascript TCP Client connect and send, receive data with C# TCP Server ? Thanks,

 
SO is not a how-to
 
12:38 PM
@DenysSéguret Let me re-read.
 
@Neoares SO is not a code monkey where you dump feature requests.
 
@DenysSéguret Oh, yes, uhm.
 
I think I broke my ass :(
 
@RoelvanUden yes, I think it's introduction wasn't really relevant, if the "many languages" are the C language
 
@DenysSéguret Almost every language I know, that isn't dynamic, requires the result in a statement to be a boolean. So instead of if (a) you must do if (a != null) so the a != null evaluates to a boolean, which is then used in the statement
 
12:40 PM
@Cerbrus SO is not a lie
omg a nazi cat help pls
 
@DenysSéguret I don't know of any. I know plenty languages that require both sides of && to be booleans, but none that actually coerce both to booleans...
 
stackoverflow.com/questions/33603580/… I have read the part of using require('stream').Transform , so I believe I can do the part where I need to send only the parsed html text, but what about the appending part? or should I just dump the idea and save to database?
 
@DenysSéguret he called Java as example, but their logical operator expects two boolean types as input, not just "Expr1" and "Expr2". newDate && null would give compile error
javascript however gives "Expr3", which gets coerced to true or false, dependent of the environment at that point
 
1:05 PM
I should add to my blacklist.
Answer a question, get 2 downvotes on the upvoted answer...
 
seriously ?
which answer
 
Unless you can find something that's actually wrong?
 
spite votes
you thrash other answers :P
 
To be fair, the first revision of Robert's answer was crappy
But that comment be gone
 
nothing wrong. Probably grunt downvote
 
1:29 PM
@rlemon manifest.json in se-chat-dark-theme-plus mentions a whole bunch of non-existent files
 
@Kitler did a merge, some stuff was missed
I have a clean local copy I need to re-merge back in
 
when git says detached HEAD - is that bad?
 
kinda
I think
 
Just means you're not on a branch
 
so how to fix that issue?
 
1:35 PM
Can you apply a jQuery function to a simple HTML element? For example: document.createElement("div").dialog(); (dialog() is a jQuery function.)
 
$(document.createElement('div')).dialog();
 
@deostroll Either switch to the branch you intended to be on, or create the branch you intended to be one
 
ok riemon thanks. I rarely use jQuery. In other words you trace the line between simple javascript and jQuery with the $ ?
 
I don't recall how it got detached...does a git commit --amend do that?
 
jQuery is an abstraction library because DOM is ugly in places
 
1:38 PM
@deostroll if you checkout anything other than a branch, it will do that
 
I've created this question stackoverflow.com/questions/33609987/… could anybody check it and try to answer?
I really can't solve this, still.
 
okay, so I did a git log --oneline' followed by a git checkout <commit-label>` ...
 
yep, that'd do it
What was the reason you didn't check out a branch?
 
I was trying to checkout a version and make commits on the same branch... (which I think now is a horrible idea)
 
If I have a javascript variable, var a = .... how do I use it in jQuery context? $(a).foo() ??
 
1:41 PM
@deostroll I think you intended to create a new branch
 
yep...
except I thought it would (without the branching)
so can there ever be orphan commits in your local repo?
 
I believe if you delete the branch they're on
 
@deostroll Yes, that would create orphaned commits
you can still commit to a detached head
 
yes, but why didn't they get saved?
 
but since the head is the only thing referencing them, if it moves, they will be orphaned
 
1:45 PM
Oh, I've to branch it, is it?
 
@deostroll what do you mean?
 
the commits on the detached head - how do I salvage them?
 
no
 
@deostroll I don't think a "detached head" can be considered salvageable.
 
1:46 PM
@deostroll are they orphaned, or is the head still pointing to them?
 
yes, the HEAD was pointing to them...now I kind of lost it... :(
the damage is done...
so what do you do to commits in a detached HEAD
 
@deostroll Well, I don't know the details of the git GC, but there's a chance they're still around
git reflog should help you find them
gitolite.com/detached-head.html has some instructions on recovery
 
why are athletic clothing the best clothing to just sit around in?
 
@deostroll you can cherry-pick them to a branch maybe? Never tried though.
 
1:55 PM
properly fitted ?
 
So my reflog looks like this: hastebin.com/lekuxehimo.tex and I've checkout at a specific point...but now it says HEAD detached...
 
Hello, is there someone who could help me about angularjs and jasmine testing ?
 
@deostroll where in there are the commits you want to recover?
 

« first day (1850 days earlier)      last day (3081 days later) »