« first day (4263 days earlier)      last day (907 days later) » 

4b0
4b0
00:31
@NineCattoRules No its about guess, no proper answer allowed. Lack of mcve nothing there to answer . sorry.
01:00
posted on June 18, 2022 by Ben Mason

Hi everyone! We've just released Chrome Beta 104 (104.0.5112.8) for iOS; it'll become available on App Store in the 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. Harry Souders Google Chrome

01:48
posted on June 18, 2022 by Ben Mason

The Dev channel has been updated to 104.0.5112.14 for Windows, Mac and Linux. A partial list of changes is available in the Git 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. Srinivas Sista Google Chrome

 
2 hours later…
03:36
 
6 hours later…
09:20
Dear all, I'm having trouble with React JS...
@NineCattoRules Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. 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.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
"books": [
    {
        "item": [
            {
                "title": "Any reason for hate you",
                "preview": "blob:localhost:3000/da032196-27f9-40a8-a300-836bb0431a80";
            }
        ]
    },
    {
        "item": [
            {
                "title": "Why am I doing this?",
                "preview": "blob:localhost:3000/e0b7562a-cd5a-4a9a-8d72-a38a23025ed7";
            }
        ]
    }
]
so the problem is this...if I map through "books", since "item" is dinamically, at the start is undefined
how can I skip undefined arrays on object?
I tried this:
books?.map((obj, index) => {
    if (index === 0) obj.item?[0].id = index + 1;
    return obj;
});
unlike this give me error "TypeError: Cannot read properties of undefined (reading 'item')
 
2 hours later…
11:47
I end up with this:
books.filter(e => e !== undefined).map((obj, index) etc...
 
2 hours later…
13:18
@VLAZ Thank you very much I am trying now :-)
 
1 hour later…
14:41
@VLAZ Thank I just tried it now but it does not work, I think I have to define first defaults compress to false, but then I have to write all compress options manually and I don't have any Idea how to do it correctly, I have to try...... things....
14:57
@LaraLandis a quick question - why are you eval'ing values?
 
3 hours later…
18:01
@Oleg Valter because this is a perosonal project to learn Javascript and writing a tokenizer -- which I'd have tried if it were Python -- is a bit too much for this
18:32
I am on windows and I run mongod in a separate terminal
Even then when I use mongoose to make a connection it fails,
MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
For some weird reason changing localhost to 127.0.0.1 is working
@LaraLandis oh, I am just curious what the is - in general, Function constructor is a little safer rgan eval. Brw, can you expand on the desired output and what is wrong?
I'll provide some screenshots in a little bit. The one thing I don't understand is why it's throwing an unexpected token error for what appears to be valid Javascript code. I can understand why I was getting NaN because Python would throw a tyhpe error or None in the same circumstance
s
The error: VM6:1 Uncaught SyntaxError: Invalid or unexpected token
at HTMLButtonElement.Newtons_Method (newtonsmethod2.js:32:29)
Newtons_Method @ newtonsmethod2.js:32
the line generating the error: answer = answer - (eval(newEqValue)) / (eval(newDValue));
19:18
const BlogPost = mongoose.model('BlogPost', new Schema({
  title: String,
  tags: [String]
}));

// Because there's both `await` **and** a callback, this `updateOne()` executes twice
// and thus pushes the same string into `tags` twice.
const update = { $push: { tags: ['javascript'] } };
await BlogPost.updateOne({ title: 'Introduction to Promises' }, update, (err, res) => {
  console.log(res);
});
This is given in mongoose documents, I dont understand why twice??
Also what is await doing outside async function
@LaraLandis looks like eval encounters an unparseable expression - can you share example values?
@jeea no idea, that's not how callbacks are supposed to work. Maybe under the hood registering a callback branches into executing the underlying query twice
@jeea likely as an example, but in recent versions of Node.js, and earlier with TypeScript you can use top-level await
 
1 hour later…
20:29
Hey, this may be a harder question, but I'm using React Native to develop a mobile application, and I'm having a lot of trouble understanding some of the differences between componentDidUpdate and shouldComponentUpdate for what I am essentially trying to do
Suppose a user has initially enabled push notifications on the app and in their phone settings
But the same user decides to the go directly to the phone settings and revoke the notifications settings
I am having trouble making that change reflect in on the application
async shouldComponentUpdate() {
    if (await Notifications.getPermissionsAsync() !== 'granted') {
        console.log("the permission was not granted so change the setting to false");
        if (this.state.newsNotifications === true) {
            this.setState({ newsNotifications: false });
        }
    }
}
This is the code that I have been trying to implement, and I've tried using this block in a componentDidUpdate as well, but for some reason I can't seem to figure out why the state of the newNotifications is not changing
If anyone happens to know what the ideal state management function should be or any ideas on what I should do to check the state of the notification settings every time the component either renders or the setting has changed, I would really appreciate it
Thank you prayer hands lol
21:15
@OlegValteriswithUkraine The input values are: 1.5, 5x**2 + 3x + 2, 10x + 3

« first day (4263 days earlier)      last day (907 days later) »