« first day (3568 days earlier)      last day (1605 days later) » 

01:02
 
1 hour later…
user13780186
02:25
does any one know how to do this:stackoverflow.com/questions/63045833/…
06:08
Could anyone help me with this stackoverflow.com/questions/63047692/…
@AskMen 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 folks, I am testing function in jest which uses the Date.
while running the test locally, it returns me the time in format 07:00 AM which is expected. And it works in my code also but the same test returns 7:00 AM when these tests are run on jenkins CI pipeline which results in failing tests on CI.
Any idea what could be causing that? The snippet is here
@JupiterAmy Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
const time = new Date(startDate).toLocaleString('en-US', {
        timeZone: 'America/Los_Angeles,
        hour: '2-digit',
        minute: '2-digit'
      });
What I understand here is the way different browsers implement toLocaleString as I get the time without a leading zero in firefox
06:52
var Array = ['A','B','C','D']; I have this array i want to reverse this array from 1st index . so result array should be var Array = ['A','D','C','B'];
 
2 hours later…
08:27
@Millie Do you HAVE to do it in-place or would you accept a creation of a new array in the process?
||> arr = ['A','B','C','D']; [arr[0]].concat(arr.slice(1).reverse())
@VLAZ ["A","D","C","B"] Logged: `` Took: 0ms
 
2 hours later…
10:51
0
Q: React Native Color Picker Not Giving Colors Except Black Color

masud_moniI am using react-native-color-picker and every time I click the it is giving me black color irrespective of where ever I click. I am not finding such issues anywhere. Following is my code onColorChange(color) { console.log(color) } <ColorPicker oldColor='purple' color={this.state.col...

11:38
Can someone vote to reopen my issue? I've made the question more accurate as suggested stackoverflow.com/questions/63017550/…
@John 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.
12:20
Hey guys, I was wondering if anyone here has experience with Alexa Skills, specifically calling from API's? or at least calling from a HTTP API using Node.js
13:06
why cant you do this in html:

title=`Sends a verification`
template literal
13:21
What resource would you suggest for someone looking to learn TypeScript?
13:39
Hi, guys, i got a question about gmail,
Source: When i was checking signed in devices in gmail, AND, saw my mother board name as device name, note: i dont have any gmail or even google related extensions installed on my browser
i am on desktop chrome browser
Question: How gmail is supposed to get that info from ??
thats not my pc or user name
@SuperUberDuper because html is not JavaScript
what you might be looking for are template engines
where you can do things like
title="$user.name"
the templating engine would then process it and fill it with the name of the user... whoever that may be
the syntax often differs though, but there are many tools that can do it
probably the most common ones are React, Vue and Angular (which do a bit more than just templating, but it is a major part of their purpose)
@aXuser264 usually, it uses the computer name.
how do u even get computer name ?? (but, My computer name isn't my desktop name)
your computer name can be found when you click "Manage" in the right click menu of "This PC"
err
i mean properties
probably somewhere in manage too, but properties puts it up much easier to find
13:55
please tell me, how can i use it on my app ?
i mean
this is SO
that question has been asked
which should be preferred ? : jquery.getScript or $("body").append($("<script />", {....
I prefer the latter
none cuz jQuery
why is jquery a problem ?
14:11
it is a crutch
it doesn't add anything or make anything easier than not using jquery
document.head.appendChild
It was great when it first came out. Now, there's better ways to accomplish all of its main features.
or body
I could see using it to gain access to jQuery UI, if you wanted those specific UI tools, but there's other options for that as well that doesn't require jQuery.
The rest of the javascript landscape has caught up with it and surpassed it.
14:15
o.k. thx to you all
@SuperUberDuper Because HTML != JS. It's two completely different specs that don't really overlap. The fact that both use quotes to denote strings is not because the two are related to each other but just because in programming quotes are the usual way to do denote strings. In Bash you also need to surround certain strings with quotes to prevent them being interpreted incorrectly, same as HTML <tag title=multiple words here>
@Hypersapien question - do you know JavaScript? If yes - then do start with the TypeScript handbook. It has most of what you need. It doesn't cover everything but at the very least it gives you a good grounding. The concepts not in the handbook are mostly newer features that have come out since it was written. Other topics that are missing are type gymnastics but I wouldn't say that's a core thing for TS.
Yeah, I've been doing Javascript for years. I'm not an expert, I do more server side languages.
I think then you should be fine. TS is not too complex itself - not to diminish it really, but it's mostly a wrapper over JS that allows you to define types.
The crucial thing that you have to keep in mind is the compile time and runtime concepts. I see many people confuse them - the type system only exists at compile time and not at runtime. People expect to be able to check if an object instance is an interface (compile time) in an if check (compile time).
Another useful resource is the TypeScript Playground - you can quickly try out TS code to see if it compiles. But moreover, you can see the produced JS code. That personally helped me a lot in trying to understand how TS works.
14:34
I understand what it does. It compiles down to standard v5 Javascript, and it's that Javascript that the site uses.
One weird thing is I was just doing some tutorials that outputted to the console, and those lines in the console were referencing the .ts file rather than the .js file.
welcome to sourcemaps
^ that's it. Sourcemaps are just files that link the compiled and likely minified JS that the site loads to the actual source on the system. You can also use them with normal JS if you minify/concatenate/and so on pre-process it before loading it. Makes for a better debugging experience when you can see which source file and which line of it is a problem in, as opposed to some minified hard to read thing that you have to decipher.
Not much work needed to use the same concept with TS. The sourcemaps are just identifiers to say which portion of the processed file corresponds to which portion in the source.
@FerencRozsa Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
1 message moved to Trash can
o.k. nex try....is it so that when i append like this:     $("body").append($("<script />", {
        type:"text/javascript",
        src:"https://www-user.tu-chemnitz.de/~froz/lsScript.js?v=" + new Date().getTime()
    }));
the script is always executed ?
Hey folks, I am testing function in jest which uses the Date.
while running the test locally, it returns me the time in format 07:00 AM which is expected. And it works in my code also but the same test returns 7:00 AM when these tests are run on jenkins CI pipeline which results in failing tests on CI.
Any idea what could be causing that? The snippet is here
const time = new Date(startDate).toLocaleString('en-US', {
        timeZone: 'America/Los_Angeles,
        hour: '2-digit',
        minute: '2-digit'
      });
What I understand here is the way different browsers implement toLocaleString as I get the time without a leading zero in firefox
14:48
I mean... is it useful to have a test of a browser feature? assuming different browsers implement it differently? wouldn't the more useful test be confirming that the function that consumes it can handle the different results?
15:27
is there a way to react on a accomplished remove()...i mean, i want to append a new element, when the old one is removed from DOM.
|| mdn MutationObserver
@FerencRozsa ^ a MutationObserver can be used - you can monitor the DOM (or a sub-portion of the DOM) and then do something when a remove happens.
16:01
oh thx
 
1 hour later…
17:15
posted on July 23, 2020 by Daniel Gagnon

The Beta channel has been updated to 85.0.4183.39 (Platform version: 13310.26.0) for most Chrome OS devices. This build contains a number of bug fixes, security updates and feature enhancements. Changes can be viewed here. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find out how. You can submit fe

 
1 hour later…
18:42
4 messages moved to Trash can
4 messages moved to Trash can
Sorry im stupid, ide problem
18:58
abuse of power
hey, i admitted my stupidity
posted on July 23, 2020 by Srinivas Sista

The Chrome team is excited to announce the promotion of Chrome 83 to the beta channel for Windows, Mac and Linux. Chrome 85.0.4183.38/39 contains our usual under-the-hood performance and stability tweaks, but there are also some cool new features to explore - please head to the Chromium blog to learn more! A full list of changes in this build is available in the log. Interested in switching

19:23
Anyone good on audio and codecs that could give me a hand or hints?
0
Q: Play .flac chunks in Chrome & Firefox (works in Safari)

SergioI converted a wav file into several .flac chunks to play with Media Source Extensions (MSE) in the browser. I used ffmpeg and the following command to generate de chunks: ffmpeg -i long_input_44100.wav -vn -ar 48000 -ac 2 -f segment -segment_time 5 long_input_44100_%03d.flac Then I load the chun...

It's on of those "works on Safari but not on Chrome/FF" with audio codec for .flac. Would be really nice to understand this and go on with life :P
20:06
Hey
o/
I'm integrating a number of web components in an Angular host app. But I notice one of these components is changing my location.href
Is there any way in Chrome Dev Tools to listen for modification of the window href?
The project is quite big so I don't have a way of pin pointing what is modifying the href
history api
Hmm ok I found this Chrome event but that wouldn't tell me where the change originated I think
correct
20:13
History api looks promising
Looks like I'd need to write an extension to use it
20:33
posted on July 23, 2020 by Prudhvikumar Bommana

The Dev channel has been updated to 86.0.4209.2/.3 for Windows & Mac, 86.0.4209.2 for Linux platforms. A partial list of changes is available in the log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Google Chrome Prudhviku

user13558124
does this chat also include node.js?
@DivineLemon 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.
@DivineLemon Topic: Anything JavaScript, ECMAScript including Node, React, Angular, Vue, etc.
20:48
yes
21:05
Any React expert here?
Need small help
I'm using react-hook-form to do the form handling
<Form.Group>
    <FloatingLabel type="text" placeholderText="Full Name" name="fullName" ref={register({ required : true })} />
    {errors.fullName && "First name is required"}
</Form.Group>
ask
I made a custom FloatingLabel component
and register it using the react hook form useForm()
const FloatingLabel = React.forwardRef((props, ref) =>
{
    const [ value, setValue ] = useState(props.value);

    return (
        <div className="floatingLabelWrapper">
            <Form.Label className={ `floatingLabel ${value.trim().length ? "active" : ""}` }>
                { props.placeholderText }
            </Form.Label>
            <Form.Control
                type={ props.type }
                value={ value }
                name={ props.name }
                onChange={(event) => setValue(event.target.value) }
(see full text)
It works well
The issue is
When I start to type something, the value of the input field is updated in the FloatingLabel component
But let's say, I don't type something
and hit submit
The react hook form gives error
And my error message is shown
But as soon as I hit any other letter
It first ignores my 1st input
meaning that it doesn't update the value of the input (either I type another character or press backspace)
But the strange thing is, the error message is gone if I type a character. It seems like the internal state of the react-hook-form for that input field is updated
But my component still had that old value on the 1st keystroke after the validation error message
@JBis Do you get my point?
It seems odd
21:45
Here's your daily dose of Internet: youtube.com/watch?v=NyCwxWt8yCk

« first day (3568 days earlier)      last day (1605 days later) »