« first day (3833 days earlier)      last day (1100 days later) » 

7:27 AM
Hi All
i have tried this and it was running fine, i was able to hit the below API
https://oauth2.googleapis.com/token
and was getting the access token by passing the refresh token and related clientId, secretId
but now suddenly im getting below exception
unauthorized_client
 
So your authorization is failing...
Are you setting the token properly in your requests?
 
7:53 AM
yes
refreshToken im passing
below is what my code looks like
public accessToken = async (refreshToken: string): Promise<any> => {
        return new Promise(async (resolve, reject) => {
            axios({
                method: 'POST',
                headers: {
                    'Content-type': 'application/x-www-form-urlencoded'
                },
                data: qs.stringify({
                    client_id: XXXXXXX,
                    client_secret: XXXXXXXX,
                    refresh_token: refreshToken,
                    grant_type: 'refresh_token'
 
 
1 hour later…
9:26 AM
Hi, someone can help me here with the last question? stackoverflow.com/questions/67042646/…
 
@AvielPalgi 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.
 
 
2 hours later…
11:17 AM
Dude, @AvielPalgi, answers are not the place to ask a new question.
 
11:37 AM
lol
 
https://replit.com/@MisterSirCode/CGame-Engine-Alpha-2#testing-it.js

I added physics...
thoughts? opinions?
 
11:54 AM
Why are you prefixing variable names with #?
 
@Cerbrus Private fields, so they dont clutter the public API with private variables that dont need to be accessed
You cant set / get them from outside of the class
They arent supported everywhere yet, but soon
Firefox supports em, but its disabled. Safari is just... safari... and IE doesnt support anything
other than that, theyre supported on most browsers
 
I'v never seen that use before, apparently it's a stage 3 proposal
 
Oh I thought it was stage 4
huh
oh wells, if most modern browsers support it, and firefox will enable it by default soon
then it shouldnt be too much of an issue
 
"all the cool kids are using ES2021"
 
No idea why they chose # over the more generally recognizible _ prefix
 
12:06 PM
I think theyre saving the lodash prefix for Static fields
currently you can use static #field for private static fields, or static field for static fields in general
but... I dont think they want to use the word...
 
@Cerbrus compatibility
 
However, it would be easier if they just use the word for both
 
Yea, found it
 
go full on C#
private static variable and such
would be a lot more readable and consistent
 
@MisterSirCode compatibility
 
12:08 PM
They didn't use _ because of backwards compatibility
 
Oh, yeah, forgot thats a valid variable char
lots of lodash libraries using _ as a variable
 
... Not just libraries
 
Im aware... other libraries also use it
a few of my super small APIs I have for personal use also have underscores for variables
 
|| status
 
I am currently alive!
 
12:10 PM
It is (was?) pretty common to prefix variables with _ to mark them as private.
Whilst it didn't functionally change anything.
 
I've done that as well. Well it's more to mark them internal.
 
Now, if they were to spec it so that _ actually made it private, quite a lot of code would actually break
 
/shrug
itd be fixed in a few months
the internet may die for a while
but hey
think about the future :3
 
s/months/decades
 
months to decades? alright
 
12:13 PM
@MisterSirCode you forget how many old websites there are
 
I dont think itd take 10 years to update JS frameworks / libraries
let alone more than 10
 
NOT JUST LIBRARIES
Geez
 
many of which that don't use js frameworks/libraries
 
You have no idea how much custom code there is on the web
 
Cerbrus.. When I say library...

I mean every single separated file of javascript
 
12:14 PM
Yea, that's not a "library"
 
LOL
Alrighty then
 
all of this will be fixed when js is replaced in a couple years
 
It's pretty darn difficult to communicate with a programmer for whom words mean something completely different than they actually mean...
s/years/decades/
Well, there's typescript
 
that compiles to js tho
 
But fixes a lot of this uglyness
 
12:18 PM
I find transpiling irrelevant... Why put in the work to write something in a different language, learn the new syntax, setup the precompiler, and have it all transpile to another language anyways...

When you can skip all that shit and just write the original language
 
because the developer experience is better and its (arguably) easier to maintain
same reason you write C++ instead of x86
 
@JBis How is it easier to maintain two different languages together then just one
 
Yea, why bother writing something readable when you can instead write memory leaks
You're not maintaining two languages
 
Yes... You are...
 
You're writing, debugging, testing in TS
 
12:21 PM
^
 
How the hell do you expect to maintain your transpiler... if you cant maintain its parent language anyways
 
The JS it transpiles to is irrelevant
 
@MisterSirCode thats someone elses job
 
i dont need to maintain every library i use, i just need to make sure it is maintained
 
12:22 PM
How the hell do you maintain your IDE, @MisterSirCode?
 
user1986815
I am not used to this messenger here, it is very difficult to understand witch thread is the active.
 
Or how do you maintain the OS your PC is running?
 
lol
 
You don't. It's someone else's job.
 
user1986815
Is it possible that the Storage Inspector in Firefox capping the value of session storage variables?
 
12:30 PM
Session storage itself has a max size, iirc
 
@Cerbrus 3 mb iirc
Session and LocalStorage both have 3-15mb I think, I dont remember
 
|| google session storage max size
 
oh, "About ~5mb"
yes
Guess it depends on the year and browser
some are saying 5mb
 
If you need more use indexdb which doesn't have a limit
 
12:37 PM
some 10mb, or 3mb
@JBis Isnt that storage abuse? Theres no way thats true
just fill up a user's browser with useless shit
 
yep
 
bruh
well, that is useful information
 
so be careful of plugins made by @JBis
 
I can cache my raymarched meshes
@CrabsStew rLemon's old gist plugins are scarier
I wonder if his github still exists
 
1:13 PM
I have yet to meet someone who gave TypeScript a solid chance and decided that it sucked and they went back to plain javascript. It’s ok to be uninformed, it’s not ok to let that drive your decision making
3
 
Mar 26 at 12:59, by Cerbrus
Hating a programming language just means you don't understand the language... Unless it's PHP. PHP sucks.
 
1:40 PM
There is also informed critique
also long time no see @ndugger :)
 
Hating on !== Critique
 
user1986815
2:07 PM
could you please vote to reopen this question ? stackoverflow.com/questions/67067168/…
 
How does the dupe not answer your question?
 
2:50 PM
Hi,
I try to send some data using ReactJS Forms and Axios. However, the data is only sent after the second submission. Also when I change the value and submit again it takes the previous value not the current one.

Please Help. Here is my code. What am I doing wrong ?

function handleDataSubmit(e) {
        e.preventDefault();
        let formData = new FormData();
        formData.append("data", data);
        axios.post('http://localhost:8080/api/searchEngine/searchTerm', data)
            .then(response => {
 
Where is data coming from?
 
It is in a normal useState-variable. See the full code
 
There is no variable declaration for data in there.
 
oops sorry. Little correction of the code:

const [data, setData] = useState('');

function handleDataInput(value) {
        setData(value);
    }
 
Also, you're appending that nonexistent data to formData, and subsequently not doing anything with formData
 
2:56 PM
Sorry, a small mistake in the MWE look the post above yours
Like I said, it is no problem with nonexistend data, or appending it to something.
The form submission lags and does not get current data
 
Then I don't know enought about react to be of help
 
If I input "Test" and press Enter, the response.data ist empty, If after this I input "Test 2" and press enter, the response.data contains data about the first input "Test"
 
3:15 PM
hey,
addEventListener("change", ({target}) => {
	           if(target.matches(".class1"))
	           {
				  console.log("target.value = " , target.value );
	           }
		});
 
wat
 
i have this ` target.value` printed 3-5 times every time i change it's value
is there is a reason for this ?
 
yes
you have this add event listener inside another add event listener
don't do that
 
lol holy cow u are psychic!
it's true, i have inside another one by mistake :D
thanks !! :D
 
 
1 hour later…
4:37 PM
KevinB isnt psychic. He just knows what hes talking about
 
5:03 PM
o/
 
5:35 PM
posted on April 14, 2021 by Srinivas Sista

 The Beta channel has been updated to 90.0.4430.72 for Windows Mac and Linux. A full list of changes in this build is available in the log. Interested in switching release channels?  Find out how here. 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. Srinivas Sista Goog

 
6:22 PM
-1
Q: Regex not lazy enough

Jonathan LafleurI have this regex : /<iframe[\s\S]*?data-context[\s\S]*?<\/iframe>/ig and I want to match all iframe that contain the data-context attribute. The problem is that if there's two iframe and the first one don't have the data-context but the second have it, it match from the first to the second one....

 
@KevinB I wish my girlfriend had the same complaint about me
 
7:16 PM
i like popups that have a "Dont ask me this again" option that pop up again the next time you use it irregardless of whether or not you select the option
 
 
2 hours later…
9:08 PM
posted on April 14, 2021 by Veenita Joshi

Hi, everyone! We've released Chrome Beta 91 (91.0.4472.8) for iOS: it'll become available on App Store in next few days. You can see a partial list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Veenita Joshi Google Chrome

 
9:43 PM
posted on April 14, 2021 by Srinivas Sista

 The Chrome team is delighted to announce the promotion of Chrome 90 to the stable channel for Windows, Mac and Linux. This will roll out over the coming days/weeks. Chrome 90.0.4430.72 contains a number of fixes and improvements -- a list of changes is available in the log. Watch out for upcoming Chrome and Chromium blog posts about new features and big efforts

 

« first day (3833 days earlier)      last day (1100 days later) »