« first day (2476 days earlier)      last day (2475 days later) » 

9:00 AM
He gets upvotes because he doesn't let a question without answer, because he knows JavaScript well enough (even if far from Bergi level) and writes clear concise and usefull answers
(and somehow isn't subject to crappy questions fatigue)
 
:P
But keh, I see some questions that are duped. But before I could flag it as dupe, there is/are already 1+ answers
I'm slow
and gives up after
 
It usually takes more time to find the relevant QA than to write a simple answer
 
I wonder what is the 'unanswerable' questions ratio on SO. Unanswearable, due to them being far from descriptive
 
Yeah, I'd guess above 30%. Maybe 40
 
9:16 AM
Too bad I've scrapped my copy of SO. I had computed some metrics to evaluate this kind of things
(for example to refine my own chrome extension hidding obviously crappy questions)
 
LOL, when an answer starts with "It's called AJAX dude."
 
@Nick It looks like the guy answering feels unsecure
link?
 
Answer is already deleted
brbs
 
denys can see deleted answers ;)
10k+ privilege
 
Start of a question:
> So I'm sorta bored and I want to build the most efficient website possible
 
9:38 AM
Did he just link pastebin.com main site?
 
can you please help me here
0
Q: Html tags Errors (MVC)

Ahmad Zakariai am working on my MVCOnlineShop Project, i made the homepage so far , categories on the navbar , when i press the categories , it take me to the product list , now i want to apply this bootstrap to the product Partial View, i tried a lot , but sometimes div and li problems and sometimes body and...

 
<-- Ubuntu newbie here. My terminal window has this long name aaaaaa.bbbb@cccccc@ddddd:~ can I shorten it using an alias ?
 
cool
nope
@FlyingGambit Can't you read?
 
@FlyingGambit yes (not an alias)
 
@DenysSéguret how any idea?
 
9:50 AM
change hostname
 
@BenFortune Please edit your msg to prevent GoT fans from reading the thrash can
 
@KamilSolecki Good idea
 
With ******spoilers******* Maybe :)
 
@FlyingGambit What you want is to customize your shell prompt, right ?
 
9:51 AM
so you know what to google now
 
yes doing that now
ddint know we called it shell prompt
 
I guessed so
 
Hi everyone, can someone suggest me some jQuery plugin for Autocomplete, I have form and need to integrate autocomplete?
Which is the best, because I need also box of autocomplete to style to my design, I need to keep on mind that also.?

Thank you in advance!
 
@ml92 Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
denys, I thought that changing hostname was sufficient
 
9:53 AM
@KarelG maybe. I don't know
 
You would change your hostname before you change your shell prompt?
That's like moving to another city because you don't like the name of your street
 
110
Q: How can I shorten my command line (bash) prompt?

Michael DurrantCurrently it is: michael@Castle2012-Ubuntu-laptop01:~/Dropnot/webs/rails_v3/linker/spec/controllers$ Outside of renaming my machine and directory structure... How could I make it be something more like: michael:controllers$

 
@OliverSalzburg this looks like a valid solution. I know I always write the name of another town than mine on my checks because mine is too long
 
@OliverSalzburg it's my own server :P
 
Well, that's understandable, given that you seem to live in the 80s with your ancient form of payment ;P
 
9:56 AM
but it's risky thing if you don't know what to do. I guess my answer isn't a good one for flying
 
@OliverSalzburg You don't always choose the payement methods of your local craftmen
 
@DenysSéguret my bad, was in a scrum standup. question was stackoverflow.com/questions/45346392/…
 
Ok, so it wasn't just starting with that stupid sentence, it was also totally lacking any content...
 
user3956566
10:20 AM
@MadaraUchiha how on earth did that comment get flagged?
 
The funny thing is this, not having seen the new episodes of game of thrones, I still can't talk about it for fear of accidentally revealing spoilers and consequently getting kicked
 
Hi guys
below is my array :
var arr=[{ id: -1, selected: false },{ id: 0, selected: false }]
 
@Learning hello, array
 
Now i am trying to make selected property to true whose id=-1
is this correct :
arr.some(function (p) { return p.selected = p.id==-1; });
 
I can't say, not being able to see the full line on mobile phone
 
10:25 AM
changing the array elements in the some callback seems especially perverse
 
^--
 
You're assuming the implementation
 
loop through it, if it meets the requirement, adapt the content. Then go on
 
I want to use inbuilt array function to save some lines of code
 
...
 
10:26 AM
@Learning it's not that important
Better simplicity
 
using the for loop will also give you speed advantage ...
 
Those functions are intended for functional use
 
(but that's not the main reason)
 
but i see lots of answer using those array function
and not for loop
 
This tendency to have to make it work in a functional manner, I don't really get it
 
10:28 AM
i thought there is performance benefit of using this array functions
 
If it doesn't improve on the code, just stick with simple
 
no, there is no perf benefit of using callbacks over a for loop
In fact when you really dive into performance problems you often have to remove those pretty constructs...
 
So in which case i should use this functions over for loop as i am using this array functions at lots of place with the impression of gaining performance benefit
 
@Learning some of those answers are actually abusing the ES5 array functions. It works yes but is used incorrectly. It's like using a pliers tool instead of a hammer to nail a nail into something
 
When it makes the code looks cleaner, easier to read and understand
just like using map when you need forEach: you can. It's just abusive and you'll make a maintainer lose time
 
10:31 AM
there is that female that answers with working but obscure javascript code. It works but is bad practice and will score poor on quality
 
What most people don't get at first is that these functions carry a connotation as well as functionality
"I want to map this array to another array" is something that people understand and associate many things with
"I'm creating a new array", for example
 
Making the intent obvious is one of the main goals in coding
 
@Learning nobody will accuse you of writing inefficient and/or complex code if you favor a for loop and 4 lines of code
 
@KarelG are you talking about nina scholz??
 
yes
 
10:32 AM
link?
 
Yeah she had given answers for some of my questions in which she mostly uses this array functions
 
she comprehends javascript, I admit it. but I wouldn't recruit her if I need js devs
 
(not everybody sees the code the same way. I know many devs really dislike mine)
 
Denys, don't you know her?
 
10:33 AM
now he will know her :)
 
user3956566
@Neil I'm behind by several seasons O>O
 
I mean links to answers you find bad, not to her profile
 
@YvetteColomb spoiler: Gandalf dies
 
@KarelG Given the mountains of shite candidates we keep getting on a regular basis, someone who's good but has a different opinion than mine would be a refreshing change.
2 hours ago, by Madara Uchiha
CV Tip #57214: If you're proud of your quality standers, make sure you spell 'standards' correctly.
 
user3956566
@Neil in GoT? lol
 
10:34 AM
Actually i really dont know whether answers using those array functions are good or bad
 
Well, he gets introduced later. ;)
 
but as those answers are given by SO users so i assume that those are best answers considering performance
 
Yeah mostly answers which i get on array related questions uses map,reduce,some functions
 
10:35 AM
And Zelda? You're forgetting the part where he saves Link
 
well... some parts are good but I don't get the point of things like
  r[hash[key]] = [+r[hash[key]].split(',')[0] + delta, key].join();
so you might be right...
 
@Learning not necessarily. The answers given are that ones that works (or fixes what OP tries to implement). There is no attention to performance. that's not the point of the site
look to the 3th link I gave
When I saw that, I was going to eat my pen
 
@Learning they're popular these days, but not more efficient by any means
Not that that is the kind of optimization you'd really need to worry about
 
So guys what do you suggest that when to use this map,reduce,some functions and when to use for loop
 
Those are the kind of shitty write-the-code-for-me questions I don't even look at...
 
10:37 AM
Actually i am not that good with javascript
 
My idea is that you can't screw up code if it works and it's simple
 
@Learning array functions are cool as long as you make the intent clear, don't assume implementation, don't have weird side effects
 
Leave clever solutions to the clever.. No wait..
 
@DenysSéguret stackoverflow.com/questions/44834902/… <-- too many overload for something simple
she's just obsessed with the ES5 array functions
 
10:40 AM
@KarelG Just use lodash or smth
 
I'm usually the one telling people to use reduce, and saying that some clever construct is OK, but I really don't find her code easier to read than the obvious one other devs would have written
But I know that when you're deep into this kind of game you barely see that some people aren't as agile as you and can't read it
 
She comes with good answers though, but those that I've linked are just a part of hers other answers which is in same "quality" level
 
Hey Can someone help for tampermonkey?
 
@KarelG well everybody codes differently
I guess you can't fault her for writing in that way.
 
that's always the case. But I'm annoyed because she uses the ES5 array functions in a wrong way and makes it as something casual
look, even Learning started to use those functions while he shouldn't in that problem he just give
 
10:44 AM
Hehehe
 
So long as you're not doing gotos or if else chains 100 lines long, can't really bash other people's codes too much
 
what Learning did was plain wrong. Her code is just hard to read to people not used enough to those constructs and probably sub optimal
 
Can someone tell me how to access dom , without showing user the page
 
Sujar , check for DOMParser
 
hm?
 
10:46 AM
its Suraj
 
sorry :P *suraj ... fast typed <.<
 
Example I want to access some input elemenet and change that, I want the user just to see changed text
rapidtyping nice software
 
* shows fingers *
 
haha
 
@SurajJain what is it doing "instead"?
 
10:47 AM
@SurajJain The JS code you execute immediately (i.e. not waiting for the load event) is executed before the page is even rendered
 
It will only show alterations if you continually change it in events
 
I want like for example if user search for something on google
I want to edit theier serach query and then display them results
I am using window.location='http://www.google.com/search?q='+escape(finalQuery); for final results
In this case first the original result page
is rendered and then they go to other result page
now how to stop that
I just want them to see edited result page
 
Hmm
They go to any result page because you triggered the action to load the page
 
user3956566
@Neil lol
 
So just wait
Add a timeout that resets when they type in input
 
10:51 AM
Can you tell me any other way instead of using windows.location
 
When they finish typing and 1 second has passed, trigger page search
 
They can come on the seach from anywhere
 
@SurajJain that is the way. You just need to change when you do it
 
not typing really
 
@rlemon Wild chickuns appeared at my workplace
 
10:53 AM
@KamilSolecki checking out the local chicks I see..you dog you
 
haha
I just want that result to be different, and they can come from anywhere not necessary typing in google, or browser and where
I just have their url like www.google.com/q=""" ..something like this
 
@Neil and so it happened when chicks saw a dog - they fleed.
 
Now i want their page to not dispalyed, and then I would edit theier search query
 
I'm having trouble visualizing what you mean. Could you write an example using jsfiddle.net?
 
Wait
var initialQuery = document.getElementById("lst-ib").value;

     var finalQuery = initialQuery + " -w3schools.com";
     window.location='http://www.google.com/search?q='+escape(finalQuery);
here lst-ib is id of google search box
When someone types something On google
I edit their seach query and then search them
I just want that w3schools result ,Out.
 
10:58 AM
You're doing it when? When user changes input, right?
 
Whenever browser see like google.com/Search...
I just replace the query
and then search again
Have you understood What I am trying to do
whenever some query is searched I am doing this
 
oh hi
good afternoon
 
11:16 AM
@MadaraUchiha do you know what the best practice of passing state or variables down into child components is?
 
@GNi33 Not really, it depends on your circumstances
 
    if(isLoaded) {
            comp = <RoomCompass
                        adventure={this.props.adventure}
                        room={this.props.room}
                        compass={this.state.roomCompass}
                        handleClick={this.handleClick}
                        handleListItemClick={this.handleListItemClick}
                        selectedDirection={this.state.selectedDirection}
                        rooms={this.state.rooms}
                        roomListLoading={this.state.roomListLoading}
^ because I start to loath this
this is basically my top level component and it handles most if not all the state right now
whenever I add a new handler, I'll need to pass it down through a few components and it seems to get really messy at this point already
 
@AntoineGrandchamp Can I play it online?
 
@KamilSolecki capture them and send em my way
thanks.
 
11:31 AM
Is that really right ?
0
Q: Do I have to await all the way down the call chain?

Ben AstonIf I have an async function, do I have to repeatedly use the await keyword down the call chain, even if the methods being invoked are marked as async and use the await keyword themselves? async function foo() { const result = await bar(); // is this await required? console.log(result);...

(making an answer)
 
that ben is also a strange person
he asks quite intellectual question that didn't got dupes before
sometimes he answers it himself, another time he just votes and asks another one
 
yes
And most often those are in fact trivial questions
 
true
if you return await promise you're actually returning the whole object (incl await)
 
I answered in comments another of his strange questions a few minutes before...
 
that can be removed if he uses await before call bar()
2 of them isn't required
 
11:41 AM
Why not just function foo(c) { var { a, b } = c; ... ? — Denys Séguret 51 mins ago
It sometimes look like a strategy to just get rep, especially as he always wait before closing the obviously answered questions.
 
even set as community answer, it's just awkward
 
Yes you do.

This is for my future reference.
what does he mean with future reference
 
he pretends he'll search SO tomorrow to know whether await is necessary
BTW what to do with this question ? stackoverflow.com/questions/45348608/…
 
i'm not sure if I should answer on his question
jonas is almost close on it I think
Eh, benjamin should answer that >_>
 
There's no need. It's a simple question which doesn't deserve a long answer.
Just like the one I answered in a one line comment...
 
11:48 AM
how does he have 15.6k points
 
@Nick those are the kind of QA you easily find when googling. I guess they accumulate a lot of views and points
 
Karel comming in with a detailed answer
I know nothing about promises :(
 
gave an answer
eh denys. Got a little help from me? :P
 
Why can't I post an image from the clipboard here ? This chat should be improved...
 
it's not miau
 
11:55 AM
Yeah but pasting images from the clipboard isn't rocket science in 2017
 
this chat didn't have been updated for a while i believe
 
and it won't be I think
 
@DenysSéguret that's available only in ES9
 
freebies for denys (your answer got marked)
 
Aren't they founding new features upon it (meta.stackoverflow.com/questions/353845/…) ? So why not giving some love to the chat?
@KarelG go answer the other one, maybe ^^
 

« first day (2476 days earlier)      last day (2475 days later) »