« first day (2350 days earlier)      last day (2600 days later) » 

12:19 AM
There, fixed my toolbar buttons; they look decent now
 
i see what y dosen't auto play on mobile.
 
should it be import document or import documents?
clear imports is plural :/
 
Clear Import wouldn't really make much sense
 
You can only import one at a time currently, but clear removes them all
so it makes sense kind of, but I'm gonna make the importer allow multiple documents later
our MVP reqs are pretty barebones
I'll probably go above and beyond at the end once I get the minimum built out
 
To me it makes perfect sense
 
12:36 AM
Jesus... Roblox is hiring; stackoverflow.com/jobs/companies/roblox who wants to go work for the most autistic game company out there?
 
lol why do you say that @ndugger?
 
I keep finding myself converting iterators into arrays just so I can use map on it, so I can avoid writing a bunch of generators that wrap them and only get used once. Am I missing something here, or do I have to wait for comprehensions?
 
@KevinMGranger 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.
 
why do I say roblox is autistic?
clearly you've never played roblox
 
note to self play roblox
 
12:38 AM
@KevinMGranger comprehensions will never make it into the language. That proposal died so fast, thankfully... those are gross as shit.
 
In that case, do you think iterators will get map and filter in the future?
Or will we get fat-arrow-generators so it's at least less typing? :/
 
Don't call them fat-arrows
As for your question, I have no idea
If you're concerned about character count, though, you're in the wrong business
 
Indeed I am, RIP
Okay, fine, "rotund-arrows"
 
The only people that call them fat-arrows are people that like coffeescript, and people that like coffeescript are terrible human beings
 
wait what are you iterating over?
 
12:41 AM
just "arrows" will do
or lambdas
 
why don't you just add a map method to the prototype of the thing you are iterating over?
 
@derp because extending objects you don't own is a good way to create bugs
 
willing to be proven wrong and told what a terrible being i am for suggesting that
 
I'm wary of monkeypatching
 
do you own those objects?
 
12:44 AM
Looking at it now, it's mostly iterating over map keys or entries. I could own it if I extend it, but I might just live with splatting it each time
 
12:54 AM
1 message moved to Trash can
@derp Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
function map(iterable, func){
	let ret = [];
  for(const x of iterable){
		ret.push(func(x));
  }
  return ret;
}
 
jsfiddle.net/pengwah/486rt19a/1 why doesn't this display anything?
 
because myFunction never runs?
 
you've only declared it
 
window.addEventListener("load", myFunction, false);
 
12:58 AM
in the jsfiddle, you need to set the load type for the javascript
in that link, its set as "no wrap in <head>"
 
ahhh
 
by default, the javascript runs on the load event in jsfiddle
 
yeah i was going to ask, i will always turn that setting off in jsfiddle ]
thnks sir!
 
1:20 AM
hi
0
Q: Query multiple ids from a field with $in condition mongoose does not return any data

user2280016I have written a function as follows, i have followed this post let inputIds = ['42cb3766-3862-4321-bd1c-7691e3f5ec8b']; dbService.connectDb(commonService.DB_CONFIG.CONNECTIONSTRING, {}).then(() => { return dbService.querySort(uploadInfoModel, { processId: { $in :...

 
 
1 hour later…
2:23 AM
@user2280016 There's not a single question mark in that question.
 
Are you sure.
 
The phrase "This does not return any data" is not a question, but a statement.
 
I was just asking?
 
2:43 AM
the joke
-----------> phew
head
 
you mean
<html>
<the_joke />
<head>
...
 
@derp I don't think it's good practice to be placing the_joke above head
 
1 message moved to Trash can
@derp Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
that's a
<body>
</body>
<blow />
 
I'm trying to think of a response but I'm coming up blank < />
Yeah that's the best I've got :|
 
2:55 AM
All VR users, you need to try Mission:ISS. Do it now.
I never could figure out the layout of the ISS before now, but it's super easy to learn in 3D.
@Loktar @BenCraig who else has one?
 
alright will do, won't be able to until tomorrow though
 
NO SLEEP FOR YOU
but seriously though
the cupola man
mindblowing
side note: I'm rubbish at berthing the Dragon
 
 
1 hour later…
4:18 AM
quick question about html elements and destroying them with javascript
i use document.createElement('a') to create an element to click() and download a file
I never append it to the dom
what happens to it when the function exits? do I need to destroy it myself or will it just vanish
if I use $('a') after my function runs it is not selected, which makes sense as I never appended it to the dom
I just wanna be sure I'm not leaving bits behind
 
If someone isn't being used then it gets garbage collected
 
so I'm good to create, click and abandon?
kewl
thanks
 
@hsimah So you're creating an a element to fake a click to push a download?
 
yes
I'm not exactly happy about it, but it appears that's the solution
I am using the devexpress devextreme datagrid and I need to export to csv file. The grid only supports exporting to xlsx, so the recommended practice is to write my own export function, and this is the example they provided
they append it to the dom and then remove it, but it seems like an unnecessary step
 
4:42 AM
Hmm for some reason I thought that a browser would block a download like that
If it works, great!
 
it works in chrome
 
I had to make an iframe to go about pushing my download
 
ie11 required me to do some ms magic
 
some ms magic
Like always
 
ms told me IE11 was the most compatible browser, but they lied :(
 
4:53 AM
I don't even know how they can make a claim like that
It's not something that's debateable
 
to be honest, until now I haven't actually had issues with it since like ie9
but I do simple front ends with complex back ends, using asp
 
Wait do you use it for your main browser?
 
no
well yes and no
personally I use chrome most of the time
for work we code for ie first
well, used to. now I'm learning backbone.js and stuff to move away from that style of web development
 
Ah I haven't even put my web app in IE yet
I don't want to know what's gunnu come out the other end
It's almost finished but I need to drink a couple beers before I test it on IE
 
5:13 AM
@Alesana I recommend hard liquor
Actually, Edge seems to play nicer than Safari these days
 
The hard liquor is for after I see it
I still haven't looked at it's specs
I am going to look up some things on caniuse
 
Wax
5:43 AM
Hello,
 
hi everybody
I want load some data with ajax in my web site all of things is ok on firefox but on chrome it cant parse large json
I has some value as unicode in my json
chrom parse small json as well but when my json is large it cant parse it
any Idea?
 
What do you mean it can't parse it? What happens?
 
1 message moved to Trash can
@Wax Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
Wax
I can't format it for some reason
 
What does it say?
 
Wax
5:47 AM
<li>
    <input type="checkbox" name="BD" ng-true-value="'Some text" ng-model="BD.first" id="BD1">
    <label for="BD1">{{Interpolate here}}</label>
</li>
There we go
 
There we go
 
Wax
What I want done is to get the value of ng-true-value
To the label element
Is there a short hand way of doing it?
 
I don't use angular sorry :\
 
Wax
It's okay
Haha.
 
@HatterisMad wanna play ARAM?
 
5:54 AM
Dunno what happened with zohreh and their problem
 
6:47 AM
@Wax {{BD.first ? 'Some text' : foo}}
 
Wax
Hello @Oliver
What if the user hasn't checked the textbox yet
will it have the data of ng-true-value?
 
hello people, does anyone here know if IE is written in such a way that it can by-its-self take care of NTLM redirects?
 
@deostroll As in, without 3rd-party components?
 
7:09 AM
@ssube Only 1 project left in our old CI. It's amazing what you can achieve if you don't sleep. I'm still very positive and excited about GitLab CI. With the proper mindset, it's way more versatile than what we previously had
 
7:25 AM
Morning everyone
 
@Luggage like what?
I mean, you would have to do that for typechecking
but I think you said you just wanted any
 
8:23 AM
one of the intellij IDEA update 2017.1 notes: Emoji: The editor now supports Unicode emoji characters (handy for writing comments).
 
8:41 AM
@OliverSalzburg IE somehow takes the windows logged-in user directly...doesn't present user with a challenge...other browsers are however presented with a login screen...I am wondering howcome...?
 
@deostroll Yeah, IE does that
 
@deostroll IE is deeply integrated into the operating system
Only IE can do that, yes.
 
Other browsers could do that just as well, but they don't bother because it's a "Windows thing"
Nobody, other than Microsoft, uses NTLM Passthrough
 
I don't get that specific things...the login screen isn't the browser's... its the web page served by the centralized authentication web app...
If I'd have done this via chrome, I would have expected the browser popup a form that asks me to input username/password
clearly the webserver is sending down some instruction to override this...I wonder what that is...?
 
@deostroll IIRC, IE sends a header with the correct details, which makes the login screen obsolete.
 
8:48 AM
^--
btw, NTLM uses a custom protocol
invented by ... Windows !
 
@rlemon I'm going to use one of my zerow's as a bluetooth relay, since my car bluetooth doesn't support my phone. Any experience with anything like that?
 
( i thinlk .. )
 
why is it in case of chrome...I get a web page and not the traditional browser popup then?
 
@deostroll The server says "I accept NTLM", the browser takes it from there
The "WWW-Authenticate: NTLM" header is something to look for
Dunno what's up with the misinformation level right now :P
 
@OliverSalzburg It's not misinformation, it's alternative facts.
 
8:55 AM
Well, as long as they're facts
 
eh dat alternative fact reference
it appears that they "accidentally" gathered intel about trump's campaign team
that's just another silly bullet for trumpie to attack democrats
 
9:14 AM
Madara ?
 
Yeah?
 
I'm currently doing some Triage, and I cannot find an appropriate flag for "coding requests" like this question It's a pure coding request but there isn't an appropriate flag
 
@KarelG I'd go with "too broad"
 
but that's not really correct option :p
 
It's the closest vOv
 
9:17 AM
I thought to ask meta to put an extra option because coding requests is being asked frequently lately
 
@KarelG Go for it
Maybe as a new off-topic reason
 
Asking for additional, more specific close reason is a sure way to waste some time
 
9:33 AM
o/
 
9:44 AM
Hey guys how can i do an if else with timeout ?
if(container.Medewerkers.length == setTimeout(function(){$(".folder-box").length},1500 ))
{
	console.log("ja")
}
else
{
	console.log("nee")
}
i need a delay in the folder-box to get the outcome\
 
What does this code mean ? $("div[id*='showLangsAudio']").remove(); I do not understand the id* part
 
It means someone is having jQuery fever
 
nvm i have the answer
 
@NayirNolamaz * scratches hair * why are you using a timeout for that ? It gives an unique id btw ...
not the "folder-box" length
 
10:02 AM
I'm in dire need for some inspiration naming a method that tests if a collection exclusively contains a list of values, and all values at least once
 
heh, a co-worker adapted catalina configs but put it at the wrong server. Result: mail server crashed. all debug data of test server were sending mails to the company mail servers. OMG . I'm afraid of my inbox
 
@KarelG i have an function that loops in 3 folders so i get the answer 1 1 14 but i need 14 only if i do time out of 1500 i get 14
 
[1, 2, 3, 3, 2, 1].exclusivelyContainsAtLeastOnce([1, 2, 3]); -> but with a cooler name
 
@Jonathan Array.from(new Set(...yourArray))
Something like that I think it was
 
I'm only interested in the naming
I can do the code :)
but I can't figure out a name that reflects this
 
10:06 AM
@Jonathan So, "Set"?
 
@Jonathan [1, 2, 3, 3, 2, 1].yoDawgnGimmeSetOfUniquesWith([1, 2, 3]);
 
:D
 
It's not even clear to me what that is supposed to do the longer I look at it
 
Only contains the provided values, no other values
Contains all provided values at least once
 
.consistsOf ?
 
10:09 AM
@Jonathan So it would check if any index in the left array, contains the right array
Which seems stupid, as in your example the array does not contain arrays
 
consistsOf
pretty cool
thanks
 
.has?
Stop making it so damn complicated ._.
 
Oh, you're looking for a possible name for a function you're writing
 
has 0.o
 
[1,2,3].has([1,2])
 
10:12 AM
I like it, but it doesn't convey that it hasExclusifely
[1, 2, 3, 4].has([1, 2]);
that should fail
hasOnly?
 
you found it
but contains is similar if you ask me
 
So far I'm going with consistsOf it sounds cool
column('Service status').consistsOf(['Out Of Inventory', 'Out Of Order', 'Out Of Service']); Perfect
 
Why would you use a list to display tabular data? I'm asking because I'm working on a component like this and I'm starting to question myself about it (but now I'm ashamed of questioning the rest of the team). I think they said they wanted clickable rows... but couldn't this be just as easily done in a table?
Btw I'm loving how the chat title changes everyday 🤗
 
Don't both tables and lists have rows?
I would have assumed columns to be the difference
 
10:31 AM
@OliverSalzburg that does make more sense. But can you make a row clickable if it's a list?
 
@Thaenor I bet you can put a click handle on an li if that's what you mean
 
you can make all elements clickable ;)
 
@Thaenor You wouldn't
If it's tabular data, use a table
 
10:52 AM
Hi , I am executing this code :
 
1 message moved to Trash can
@IccheGuri Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
success: function(result) {
var str = "test"+result;
alert(str);
document.write(str);
}
The result of alert is as following :
 
If I write a string with Ctrl+K does it show as code?
Oh, cool
 
But the result of document.write(str); is as following :
test file updated successfully
 
Oh god...
 
10:55 AM
you can use console.log for debugging btw. alerts are annoyance
 
I can't understand why the alert is showing so many new lines in its ?
 
because the result string contains (whitespace) noise
the DOM handles it for you
 
how can I check whether result string contains noise
 
let the server respond with a proper result ( use json )
 
In your case .trim() will probably already work wonders
 
10:58 AM
.trim() does not work
 
log only the result. you will see new lines i assume
(server's fault)
 
what if we don't call then() on a promise...?
is it going to sit there in the program's memory?
 
Yes console.log shows the following :
test
file updated successfully
 
@IccheGuri to test new lines, use result.replace(/(\r\n|\r|\n)/g, '$NL$');
you will probably see lots of $NL$
please edit your post. The box is big
@deostroll .then handles the promise result. If it's not provided, then it's just voided. Ready for removal from memory
 
Thanks @KarelG . It works
 
11:09 AM
To bring back to the table/list discussion. I asked around and what I got back is that we want each row not only to be clickable but to be a semantically correct link.
 
what do they mean with "semantically correct link" ?
 
That means to have an anchor tag after each <li>
 
then it's not really a tabular data
 
@KarelG good question. From what I picked up it means something that does stuff without too much js. Just uses the default browser behaviour to archieve what we need.
It can easily not be tabular data but a series of things you want to act upon.
 
@Thaenor What's the difference between 1 li with 1 a in it, and 100 td after another with 1 a in them each?
While the "linked text" is not a single link, all 100 links may as well point to the same target, making them equivalent
 
11:15 AM
@OliverSalzburg in this case it wouldn't be a 100 td with anchors. But in <tr> with an onclick event and javascript manipulating the browser to take you to another page.
 
That's not really what I imagined when you said "semantically correct link" :D
I figured the opposite of what you described is desired
 
Hi guys I have a problem. I'm using the following function so I can have a single html with multiple div containers:
 
1 message moved to Trash can
@Useraro Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
Ctrl+K doesn't work!
 
11:21 AM
do it after your input and before enter (sending)
 
function show(hidden, show) {
	document.getElementById(shown).style.display='block';
	document.getElementById(hidden).style.display='none';
	return false;
}
Makes sense
So with this function I can hide divs and show them using this simple formula:
 
Aside from the fact that it won't work
 
<button onclick="return show('div 1','div 2')">Choice</button>
It works actually!
 
not as given
 
What did I miss?
 
11:23 AM
an n in the second parameter
 
It works so I might have forgotten to add something else that makes it work but I don't think so
n?
 
the letter after m in the alphabet
 
What "n"
No I mean, I don't see any extra n nor any missing n
Anyway my issue is that I got a function that I want to work WHEN the div is shown but not work when the div is not shown
function changeVariable(event){
body = event.target.textContent;
nbody.textContent = body;
}
document.body.addEventListener("click", changeVariable);
 
1 message moved to Trash can
@Useraro Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
I think it's better if I just upload the file actually
 
11:26 AM
Not if it's not a MCVE
 
It's javascript
Should have pointed that out, sorry
 
i love your reactions kendall. And a good morning
 
My issue is that the function changevariable should only work WHILE the div it is in is shown, whereas when it is hidden it should stop working
Good morning KarelG!
Wanna help me out with this please?
 
what kendall was saying is this ----> ...entById(shown).sty... <---
 
I think this might be something simple using the if function
 
11:29 AM
see something boldy ?
 
Oh, didn't notice that
It's actually "shown"
 
the 2nd argument isn't
 
@Useraro Warning, not a MCVE
 
Fixed it
What is MCVE?
 
11:30 AM
Oh
 
Sorry
Gimme a couple minutes
I don't think I can use jsfiddle here...
 
Hi. Is this possible in plain html5/css/javascript...rotate text in a plane normal to the screen?
 
Just please take a look at my document: https://drive.google.com/open?id=0B4Us2i3fj58-MWM3Z1NfRldaT0U

My issue could probably be solved with the if function somehow, I just want that when the div is hidden the function stops working.
The idea is that you press a button, then the function stays with that value forever instead of changing the second you press something again
 
@deostroll what do you mean with "plane"... and yes, you can rotate text. (css thing)
 
11:33 AM
@deostroll You mean 3D transforms?
 
@KendallFrey I think so...
 
@Useraro I already did. I refuse to read that much code.
 
Sorry
I'll see if I can simplify it
I'm really really new at this :(
 
for 3D stuff, you need to use canvas
 
One of the essential skills of debugging is basically the scientific method. Keep eliminating possible causes by experiment/trial-and-error until you have the minimum possible reproducible scenario, and then the problem becomes much simpler.
@KarelG No
 
11:36 AM
is it not difficult to do that without canvas ?
 
No
It's part of CSS
 
I think I got it. I'm gonna check if there's something like getdocumentbystyle or something like that I could use.
 
@Useraro querySelector?
 
i know that there is rotateX|Y|Z
 
@KendallFrey No I'm trying to get the style of a <div> as part of an if statement.
Something like:
if(shown){
function
}
In the shown part I want to put the thing I'm trying to find out
Not the actual word "shown", of course, that wouldn't work, I think.
 
11:38 AM
!!afk lunch
 
The obvious solution is to use CSS classes instead of inline styles
Then you can check if the element has a specific class
You can also check the style itself I think
 
How do I check the style itself of a specific div?
 
element.style
 
The id is "body selection"...
Oh, thanks!
 
protip: google is your friend, and will be there for you when we aren't
 
11:41 AM
You shouldn't have spaces in element IDs
 
I'm not that good at googling coding stuff... yet
Good point I'll fix that, thanks @Archer
 
Use something else like _ or - if you want to separate things
 
Thanks.
 
@KarelG , many many thanks
 
@IccheGuri KarelG is afk: lunch
 
11:43 AM
@CapricaSix , get lost .
I am not talking with you .
 
One thing. Here's the other function again (sorry to bring it up so often):
function show(hidden, shown) {
	document.getElementById(shown).style.display='block';
	document.getElementById(hidden).style.display='none';
	return false;
}
I'm doing it so that it can be used to hide divs, however there's one problem.
if (Bodyselection.style != "none"){
	function changeVariable(event){
	body = event.target.textContent;
	nbody.textContent = body;
	}
	document.body.addEventListener("click", changeVariable);
	}
	else console.log("2")
(ignore the changevariable function)
The thing is that when the style of the div bodyselection is none, it still works!
 
Have a look at this... jsfiddle.net/r8jw3ceo
 
And also the console never gives me the result of "2" either
@Archer You mean instead of the other function?
It seems it could work actually!
Actually I'm not sure what to do with it...
 
It's just to detect the visible state of elements. To be honest, jQuery makes this kind of thing very, very simple, but stick with vanilla JS if that's your preference. Also, move all your JS into one block of code at the end of the page, rather than dispersing it. It makes it much easier for another developer to understand.
 
Still, can I do something to the code above so the if function works?
I've been told jquery is suicide given my non-skill level
The thing about this is that I want to each page to contain a set of buttons which allow me to change a variable by pressing each.
It's absurdly complicated to do something so simple-looking...
 
11:50 AM
That if statement defines a function inside it, so that function will not exist until that code is executed and the logic returns true.
 
But the div gets the style of "none" because of the function above it right?
Then if it has that style then shouldn't it stop the function inside the if?
 
No. You define functions and then call them later. Move the function out of the if statement first of all.
In fact, I'm not sure what you're trying to achieve there. The if statement may need to be inside the function - it's difficult to tell
 
Well...
Also, tiny embarrassing question here, what did I need to do to call a function within an if statement?
if(condition){
function
}
The function "function" doesn't get called this way I'm afraid
 
No - that's part of your problem. Functions are bits of code you define and then call when you need them, like this...
function doSomething() {
// do something in this function
}

if (something == true) {
doSomething();
}
 
@Archer Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
11:55 AM
Oh I forgot, thanks!
 
@CapricaSix Nob off
 
@Archer no u
 
Grow up kid. Help the guy with an issue or butt out.
@MadaraUchiha ^^
 
Wait, if you write a function within <script> it actually gets called by itself!
 
No. It only gets called when you execute it.
 

« first day (2350 days earlier)      last day (2600 days later) »