« first day (3154 days earlier)      last day (1801 days later) » 

1:02 AM
Can someone help me fix an overflow issue? I can't reproduce well with a MCRE.
If the screen size is mobile (I am testing with 375x812). The .left elements overflow their parent creating a scroll on mobile.
I am using flex to have a right and left size. Right is the picture. Left is the text description.
I think the issue is that .left is taking 100%of the parent and not accounting for the .right, but I am unsure how to fix this.
I have attempted:
122
Q: Make div fill remaining *horizontal* space in flexbox

Adam BensonI have 2 divs side-by-side in a flexbox. The right hand one should always be the same width, and I want the left hand one to just grab the remaining space. But it won't unless I specifically set its width. So at the moment, it's set to 96% which looks OK until you really squash the screen - then...

But that seems to have no affect. flex-grow: 1 does nothing. Interestingly this does not occur on bigger screen sizes.
^^ Green is where it should be confined to. Red is where it is.
Note: The .left is on the right and the .right is on the left. I don't know why I did it that way but it seems that I did.
thanks
 
 
4 hours later…
5:28 AM
If anyone has any ideas that would be great

https://stackoverflow.com/questions/56439035/node-cannot-find-module-that-exist-when-using-typescript?noredirect=1#comment99472415_56439035
 
 
1 hour later…
6:37 AM
Does var fs = require('fs'); stand for file server?
or file system?
 
second
 
got it thank ya
 
 
1 hour later…
7:44 AM
@forresthopkinsa good thoughts on the apple stuff
to counter balance the pITA though, you also get sso in desktop apps
 
8:27 AM
which good thoughts o.o
 
8:59 AM
Minor question: what is the natural term for the "person who's responsible for maintaining the bank account/incomes/expenses of an organization"? Treasurer or paymaster? Google translate gives both.
 
9:16 AM
@paul23 that can not be mixed up
What you need is "accountant".
but they are not "certified" by a statutory means to be responsible for the book keeping.
that is for "statutory auditors"
 
Isn't the accountant is a third person who actually "checks" the books (on a yearly base?), and is a protected name. I'm talking about the one who does the day to day
 
no that is a statutory auditor
 
Hmm this is going to be a pain to explain: being both dutch and now UK based, I opted for "just use english as terminology so there won't be confusion".
 
@paul23 (pinging you because of relevance) it could be that translations are not correct. In my language, the English word of "accountant" is translated into "boekhouder" while "statutory auditors" is "accountant". See?
 
Hey everyone, quick question: why does w3schools.com/cssref/tryit.asp?filename=trycss3_resize not trigger the JS onresize function: w3schools.com/jsref/event_onresize.asp
 
9:20 AM
oh you are Dutch? then heh
@Falcon how is the onrezise function being bound?
 
jsfiddle.net/v95yLtxd something similar as this
 
Well I need the english for 'penningsmeester".
 
Oh that's a hard one to translate Paul :P
"treasurer" according to Google Translate
 
Yeah see above :P. But Karel explained overseas the term "accountant" is also not protected and hence used.
 
So many dutchies :P
So. Why is this resizing event not getting triggered?
 
9:39 AM
@Falcon There is not resize function attached to the div at w3schools.com/cssref/tryit.asp?filename=trycss3_resize
 
@Elias Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
Hey it's Six !!!
 
@AvinKavish Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
@CapricaSix are you a bot?
 
@Elias yes but I combined those 2 here: jsfiddle.net/v95yLtxd
 
9:42 AM
@paul23 that is a different category as well :P
I think that can be translated into "treasurer"
(because penningsmeester = "schatbewaarder")
 
@Falcon I think resize is an event for resizing the browser window. If you note, the resize event is attached to the body inside the example. You could attach the "mouseup" event tough and then get the size :)
Btw.. I'm not certain about that. It's just what I know
 
Hmmm
 
jsfiddle.net/58ore1pb Take a look at this
 
Thanks
Will take a look!
 
:D let me know if it helped
 
9:53 AM
@Falcon fyi inline events is not a good idea
use the javascript way
 
@KarelG My co-worker prefers them because it produces less code and so cleaner code
I prefer the javascript way as well
 
well, there are exceptions. but we are using data-attributes for that
like data-action-resize="foo"
and there is a global script that scans for these action attributes and applies the right event handlers
it is even possible to do data-action-resize="foo(555, 'wwewewe')"
 
Ohh... well, you could just have a normal attribute like: <p attachResize></p> but i guess data is more correct in the html syntax
 
@Elias No, you could not. That is invalid HTML.
 
Well yes you can. The browser doesn't really care
But yes it's invalid
 
9:57 AM
@Elias Until one day it does.
Don't rely on nonstandard behavior.
 
Weeelll you could say that to everything but sure :D
 
@Elias I do say that to everything.
Do. Not. Rely. On. Nonstandard. Behavior.
It's really not that difficult.
 
Also to your girlfriend? xD
 
@Elias Also to yours ;)
 
@MadaraUchiha That is a reason why I could have less hairs and more gray hair than I should have
and less headaches
 
9:59 AM
People don't even realize how much they get for free for sticking with the standards sometimes
 
xD
 
the CRM I am working on is really a PITA lately. I wish I did not accept the takeover task
 
I use angular for such tasks anyway. Or react
 
@Elias Having DOM selectors is not fun to begin with
 
now there is an issue with parsed texts. The page is loaded straight from database and is unescaped.
 
10:00 AM
But even with React/Angular you have the option to use data attributes if you need DOM access for whatever reason.
 
Ofc you do have access to them. But you wouldn't need them as much
 
people can edit it. That html is being wrapped in a textarea. But that functionally breaks when a <textarea> tag is used within that box.
 
@KarelG HTML... in a textarea?
wat
 
so as result you see these content "leaking" out the edit form. On update, a part of information is lost.
 
hmh
You can copy selected html and it will happily display it
from example: VS Code runs on html. If you paste code from there it will format like vs code did
 
10:02 AM
@MadaraUchiha 😀
It is a known issue it seems. Not important.
lol.
/feels like a mopping up lady
 
@KarelG Ah, let me guess
It's a textarea for editing the HTML directly
 
yeah, that is being displayed on another page (get db entries -> put it as part of the template ect )
 
@KarelG If that's the case, all you need to do is escape the HTML fully
You aren't editing it as HTML, you're editing it as text. Don't treat it as HTML in this case.
(i.e. the textarea has no context that what you're editing is HTML, and it doesn't care)
 
that is the key problem: it does not get escaped.
 
So get it escaped.
!!afk lunch 🍔
 
10:09 AM
Apple forgot the One More thing part in wwdc yesterday
Mouse support for iOS / iPadOS
now we are really screwed as devs
I wonder though if iPadOS will just graduate to MacOS 11 or they'll just merge all of these under a single OS: Apple OS with different experiences
 
how can i use nock to intercept calls to a url regardless of what's in the body
 
@Jarede write an extension
 
I can't do it natively?>
 
is any one angular expert here ?
need a help
 
10:36 AM
!!tell SarjeraoGhadage welcome
 
@SarjeraoGhadage Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
emphasis on
> If you have a question, just post it
 
 
2 hours later…
1:02 PM
Hi, is it possible to add an option of the digest algorithm in crypto's createCipheriv / createCipher method? I am running into an issue that I have two machines with conflicting openssl versions and so I cannot correctly decrypt. Thank you!
 
/inb4 weebs that thinks it is cool to create web apps on their tiny iPad
 
1:28 PM
Is anyone here familiar with d3.js? Apparently d3.queue().defer() got changed when they moved to v5 and I can't figure out how it's supposed to work now.
 
is the difference not documented somewhere?
 
There's a mention of it in the forums, and I tried following what it said, but it still didn't work.
 
how are you using it?
 
@KarelG Let them have their fun
And their x20 reduced productivity
 
eh, the whole marketing dept on one of the branch office (visited them a month ago) has all iMacs. I came with a non-apple laptop and the first topic was just my laptop. One of the arguments was that using an apple product is good for presence towards the client. I had an urge to be a Nicolas Cage.
 
1:49 PM
Ok, I don't think that queue().defer() is the problem. I was using it to call d3.json(). I got rid of queue().defer() and just tried calling d3.json directly, and it's still not working. I put a breakpoint at the first line of the callback and it's never getting hit.
No errors, either
But according to the devtools network tab, the json file IS getting loaded.
 
2:07 PM
Riiiight.. Goddamn it. As of v5, it's no longer d3.json(url, callback). It's now d3.json(url).then(callback)
 
2:17 PM
@Hypersapien you should be happy
it probably means you can also do:
const res = await d3.json(url);
callback(res);
 
@paul23 then returns a promise
(not sure if you are aware of that)
 
"Goddamn it" wasn't for what it was changed to, it was because it took me so long to figure it out and because all the examples that I was learning from use v3 and v4.
 
@Hypersapien Where art thou TypeScript?!
See, this sheet right there is why I use TypeScript.
TypeScript would have told you instantly that you shouldn't pass a callback and that the return type is Promise<whatever>
 
A timeline about web components made out of web components within a presentation about web components comprised of web components within web components
 
ok...
 
2:25 PM
web component-ception
17 hours ago, by earlyriser01
@ndugger I'm Jewish so I find it offensive.
 
@ndugger *blinks*
 
> no magic hebrew hacker glyphs in chat
I didn't realize something so ridiculous would be offensive...
jesus, people
 
I suppose that you don't check social networks...
 
Why? Are they all talking about magic hebrew hacker glyphs?
Bruh, I wish there were magic english hacker glyphs. All we got was a-z
 
recently there is some controversy about an instagram pic from David Beckham (soccer player for USA plebs) doing a little lips-touch-lips kiss with his daughter
I was like "okay...", shrugged and went on.
 
2:29 PM
How is that controvercial? I've known of weirdo families that do that kind of shit
It's not that off-base. I personally find it very weird, but it's not so creepy
 
idk 🤷‍♂️
 
"I've known of weirdo families that do that kind of shit" -- apparently you don't feel it belongs to normal people.
 
No, but it's not the creepy thing I'm sure people are claiming
 
@paul23 I also think that it does not, but I don't care enough about it to whine on social media about it
 
you can just be tolerant: you don't have to agree with this or that, you just accept it and go on. Don't create drama.
 
2:33 PM
@earlyriser01 I just want to ping you while the mod is in the room. What I said was not offensive, and I know that you know that it isn't. StackOverflow is sensitive enough as it is, we don't need pretend outrage piled on top. You can ping the moderator yourself if you need to discuss it.
 
calm down buddy.
 
That is calm
I just pinged the dude, I didn't name call, bruh
 
I don't understand why he said that but there is no need to start a discussion about that.
you could be just careless.
( I know that some SO people can be pedantic but w/e )
 
Well I don't want to be randomly flagged by him. If he wants a resolution, he can talk to a moderator, is all I said.
let's move on
 
@KarelG Did you just say you didn't care about people caring?
 
2:37 PM
@ndugger 👍
 
👌
 
2:59 PM
Hey everyone. This I have a question that isn't really appropriate for a post so I was told to ask here. I'm looking for input more than a solution I guess.

I have a codepen where I'm testing out of JS stuff. I'm having to type the same things over and over again and I'm wondering if there is a better way. Would anyone mind taking a glance and helping out a noob? https://codepen.io/jarrodwhitley/pen/OYGRRb?editors=0010
 
@Telarian Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
@Telarian welcome Telarian! Have you thought about a Selenium script?
 
I have not, because I have never heard of it lol
But I will google it now.
 
@Telarian Also DRY
 
@Telarian check it out, I think it does exactly what you want. It is used to automate testing of web browser usage. You can define test cases consisting of click this, enter that, click this other thing, etc.
 
3:02 PM
Cool thanks. I tried Googling to get answers on this but I think my ignorance of the right terminology was stopping me from getting answers.
@rober
oops
@RobertColumbia thanks I'll look into it
 
@Telarian yvw! Check out seleniumhq.org , also check out our tag!
 
@BenFortune brilliant! This is the answer I was looking for.
I knew that there simply HAD to be a better way lol
 
If you find yourself doing something more than once, put it into a function
 
That is a general rule of programming.
 
3:09 PM
got it. I'll have to do some googling on what exactly you did here. Some of the things you've done here, I've never seen before. I need to learn this for sure.
 
I might have over-modernised it, you're probably looking for template strings, for..of and const
 
Would mind telling me what I should search for while trying to understand this better? As in, here: for(const key of keys) {store(key);} would I just search for JS for loops?
 
Yeah, it's just a loop construct
 
loop constructs. got it.
 
3:12 PM
And this? $(`input[name="${key}"]`).val();

I'm not familiar with this syntax ${key} what is that called?
Yeah MDN is great?
*!
 
Fantastic. Thanks again. I appreciate it!
Love this community <3
 
`<div>${foo}</div>` is basically '<div>' + foo + '</div>'
 
Oh nice. so it's just shorthand
 
@BenFortune errhmm
 
3:16 PM
@KarelG ?
 
you meant foo.toString()
 
what?
 
thus `<div>${foo}</div>` is '<div>' + foo.toString() + '</div>'
no?
 
oh so ${} converts the contents to a string?
 
it's an implicit coercion iirc
same as foo + ''
 
3:19 PM
Oh I see. It attempts to coerce an unexpected value type to the expected type. Cool.
 
One of the fun gotcha's of JavaScript
Even more fun in PHP
 
Nice. Is there any reason to avoid using implicit coercion?
 
!!>'' + 2 + 2
 
@BenFortune "22"
 
Last question. I've used jQuery exclusively for the past year. I'm wanting to mature in this area. Should I go with Vanilla JS or something like Typescript?
If I'm wanting to get away from jQuery
 
3:24 PM
The industry is steadily moving towards TypeScript. I honestly wouldn't be surprised if it becomes "native" in the browser in the next several years
TypeScript doesn't negate your ability to use jQuery, though
I wouldn't recommend it, but you could
 
I've heard really good things about Typescript and unit testing.
 
It's getting there
 
For building UIs, lots of us in this room like React
I'm working on my own alternative to React that uses native web components, but it's not production-ready yet
 
But you know, I've been looking at the job market and there seems to be a lot of demand for Angular.
 
I think there's more React jobs than Angular, these days, but it probably depends a lot on your location
 
3:26 PM
How's the support for web components nowadays?
 
At least in my area (DFW)
 
With Edge moving to chromium, all the major players now support native web components
We're finally here
Yeah, Texas likes Angular for some reason
 
Guessing they still rely on shadow DOM?
 
Yeah, I've been wanting to start learning React or Angular, but I can't make a decision. So I was planning on letting my local job market decide for me unless there's a really good reason not ot.
 
I mean, shadow DOM is included in web components, yeah
I love shadow dom
best thing since sliced bread
 
3:36 PM
Has anyone had any experience with GopherJS? I'm making a business case to my manager to rewrite our React front end
 
@SamF Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
3:46 PM
Is this: let regex = /[foo]/g;
The same as doing this? let regexTwo = RegExp("foo*", "g");
 
What is the difference?
 
/[foo]/ would be the same as RegExp('[foo]')
They're entirely different
not even remotely the same, besides the word "foo"
`[foo]` matches a single character, either "f" or "o" (which makes having a second "o" useless in there)

`foo*` matches the word "foo" and any single character that may follow it
the fuck? my backticks didn't work
garbage chat
 
Ah okay, TY
 
This guide is in desperate need of an update chat.stackoverflow.com/help/desktop-notifications
 
4:00 PM
So if you want to match the word "foo", can foo* still be inside of /[]/g, or must it be formatted like RegExp("foo*", "g");
 
if you want to match "foo", then just do /foo/
 
I am doing a database query to know which equipment will go to maintenance in the interval of 6 months, but in the database I only have one column to say when it is the next maintenance, I was trying to do the following query:


SELECT * FROM[DBSRI].[dbo].[rmm_aval] where nextcall >='2019-06-05' and nextcall >='2019-12-05'

It returns empty, and i have records in 09/2019
any help will be apreciated
 
@ndugger Thx
 
@NoobDEV-GBL please don't cross-post. Especially when it was an obvious copy/paste that has nothing to do with javascript
I see you just posted the same Q in the PHP room
 
@ndugger all teh help is wellcome
 
4:07 PM
@NoobDEV-GBL are the dates stored as strings? Are they properly formatted as dates?
also what is the databse? mysql?
 
Do ya'll think Vue will ever truly compete with Angular and React?
Vue is so great, but no companies seem to be interested in using it.
 
Yeah. I think vue is fantastic. I'm actually using it for a project at my company (it's a really small company)
 
I mean, technically speaking, is there any reason why Vue couldn't be used in place of the other frameworks? Are there scaling limitations?
 
4:33 PM
I'm not sure how scaling would be applied to vue
 
user8729657
4:45 PM
Yo where can I buy content for website
 
user8729657
like about us info and stuff like that
 
 
5:13 PM
I see this on reddit all the time.
"Look at this comment on this sub. Clearly this person's crazy opinion with 5 upvotes represents the subreddit as a whole."
 
i mean, it happens everywhere there are comments that can only be upvoted
 
Hey Could anyone check my javascript for any errors or issues? its not enough to make a question ( cant make questions anyways ) and It doesn't seem to work the way I want it to. Project: codepen.io/SkylerSpark/pen/byzZYB
it was just a stupid attempt of mine to make a code language reader
Is no one on?
@KevinB You seem to have a good reputation, could you help me with my problem? it seems no one in this damn world wants to help me with anything, no matter how I ask or format my questions, people just downvote them.
 
5:32 PM
what's wrong with it
 
It doesnt run
 
Its supposed to change the html
first it highlights with highlight.js, puts the language output to the console, copies it, and writes "Highlight Says its + Language" in the html and Language is represented as the language that highlight.js detects.
Kevin?
 
@TaylorSpark if you're willing to pay people to debug things, they will do that at codementor.io
 
well
 
5:35 PM
I dont have any money, Im a minor, im not allowed to get a job where Im at
 
an error happens
so it's running
 
@TaylorSpark You may get a better response if you're not so demanding. No one "has" to help you, dude.
 
It was "half" working recently, I had an alert instead of a html replacement
and it did make a response, but it was always Undefined
@Telarian Im not demanding, I never told any of you that you required to help me
 
what is this highlight thing
 
Highlight.js
 
5:37 PM
right
 
Its a form of formatting
 
but what is it
 
"is no one on"
"Kevin?"

People will reply when they are able. Most of us are work right now.
 
Its used by codepen and other programs to highlight specific forms of code
Like it colors specific regions of it.
 
is there a non minified version?
documentation?
are you sure you're using it right?
 
5:38 PM
All the info is here highlightjs.org
It was originally working, but It only worked in the way that, you had to manually type the code inside the html, save it, and run it, and an alert box would pop up and tell you the language the code ran from
 
your usage doesn't quite match theirs
they're passing a dom node to the function, where as you're passing a string
 
Yeah I know, but I was trying to make it so, I could type code into an input/textarea and have it detech the language
 
also, it's impossible to style text within a textarea
other than as a whole
highlight plugins rely on adding things to the html, such as spans, to wrap the individual pieces that need to be highlighted
you can't do that with a textarea
 
Im sorry Im really new to javascript
Like I just started managing to understand it in the last month
 
i... don't really care, sorry, i'm just pointing out what's wrong
 
5:41 PM
And you decide to pick something complex like this?
 
Do you know how I can fix it? I thought it wouldnt be THAT complex
Rip.
 
@TaylorSpark please take a look at the chat rules.

"Do not be a Help Vampire... Seriously, we all have to learn this shit and you should too! Don't expect us to write your code for you unless you are willing to shell out a bit of dough. For more details see Asking for Help. http://javascriptroom.github.io/rules/#asking"
 
i hate codepen
give me a damn run button
 
lol
 
So where the hell else am I supposed to get help?! Every single site is like: "Sorry your on your own" or "Learn to code yourself"
 
5:45 PM
I don't have the time, but writing a manual editor is never easy. - Their solution is to highlight text in a manual div.
 
@KevinB You do know if you add a proccessor to it, it forces a run button into the top, IE: it wont run automatically
Though I will say
I hate autorun
So much
 
@TaylorSpark You're supposed to do that. And get help with specific details. Other than that the best way to get help is to ask the developers of highlight.js. On SO you can also ask, but you'll have to show exactly all steps you did so far.
Basically make sure you understand javascript before you try to make things using libraries.
And that you very clearly know the difference between a "problem using library xyz" and "a problem with javascript/html itself".
 
@ShrekOverflow sso within their ecosystem ;)
As you can tell, I'm not super enthused about it
 
Since you know codepen.io uses it you can easily check out that website to see how it's built.
When I press F12 on codepen, and I right-click "inspect" on a "text area" you notice the DOM.
 
Now to be fair I didn't watch the presentation because WWDC tends to be annoying
 
5:50 PM
Codepen's code is relatively messy... whenever they add protection to it (IE: 3rd list iframes with refferrers, or squished javascript with random names for their variables/functions) well its extremely anoyying...
 
But from what I've heard, their only selling point is that they're a better SSO provider because they take privacy more seriously?
 
@TaylorSpark I can understnad it really easy: instead of a textarea they "fake" one using divs.
 
And clearly they believe that the people will flock to it on their own, with no need to leverage their monopoly position
lul
It seems like a cheap trick to me
 
I'm not trying to get the code, I'm looking how the website is "build up". - And I notice that the text area itself is a collection of many divs.
 
I only use codepen because its one of the few good looking live code editors that actually works. And considering the many features it has...
 
5:52 PM
Yes, and it shows that you have to make the live editor yourself.
Which is far from trivial.
 
I'm following this page (dev.to/johnpaulada/synchronous-fetch-with-asyncawait) to try to get the code flow to wait for an async function to finish, but it's not working. The rest of the code continues on while the function is running.
 
The privacy thing is a dumb excuse to force everyone to depend on you for authentication
 
you know, why do they use divs... why not just use the old <font color=""> thing...
 
When it comes to sandboxes Codepen is the best one imo.
 
This is the code I have
 
5:53 PM
More than can be explained here - on SO or anywhere, this is a full project of itself.
 
const fetchPatientCount = async function() {
        const response = await fetch(GlobalFunctions.mainUrl + "Maps/GetPatientCount");
        const json = await response.json();
        return json;
    }

    var patientCount = fetchPatientCount();
 
@TaylorSpark because css is the way to go since 2000 already.
 
@TaylorSpark the <font> tag has been depreciated for years. Well over a decade
 
Wouldnt it take up more space using <div class="?">?</div> and ? { color: ?; } rather than just <font color="?"></font>
 
But honestly: If you are just learning javascript I can only suggest you put creating a "life code editor with highlighting" out of your mind for now.
 
@paul23 Im not making an editor, Im making a textarea that will detech whatever language is writtem im it
 
@TaylorSpark Then highlightjs is not the right tool for the job.
 
^
 
@TaylorSpark, if you have a color that's used in several places in your page, what would you rather do? Repeat the color code every place that it's used, or give every place that it's used a label and define the color in one place, associated with that label? What happens if you want to change the color?
 
could you help me locate such a tool? I was looking around for around 2 hours, and all I managed to find what the highlight.js method, along with a question similar to mine on stackoverflow that never got answered
 
5:57 PM
I doubt you'll find one.
 
@hy
oops
 
Since it's near impossible
 
@hypersapien Yes if you were highlighting LARGE pages, that would make sense
 
You never know if any page is going to get larger in the future.
 
Data is not even a reason why you should use CSS.
It's gzipped anyways.
 
5:59 PM
@paul23 No, I almost created a working one and I have around 2 weeks of code experience in js, do you really thing something that can recognize words is really that impossible? :?
 

« first day (3154 days earlier)      last day (1801 days later) »