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

00:02
posted on December 07, 2021 by Krishna Govind

Hi, everyone! We've just released Chrome 96 (96.0.4664.92) for Android: it'll become available on Google Play over the next few days. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Ben Mason Google Chrome

 
2 hours later…
user17382064
02:04
vlaz
@htmlcssjava321 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
1 message moved to Trash can
user17382064
The players array has an object at that index. That object has a wrapper property. I have to return the wrapper that is at the index of the players array.
user17382064
const manageUI = (function makeManageUI() {
  const body = document.body;

  const players = [];

  function findPlayers() {
    const allCovers = document.querySelectorAll(".cover");
    const allWrappers = document.querySelectorAll(".wrap");
    allCovers.forEach(function addToPlayers(cover, index) {
      players.push({
        "cover": cover,
        "wrapper": allWrappers[index]
      });
    });
  }

  //callback syntax
  function getWrapper(cover) {
    function isCover(player) {
    return player.cover === cover;
user17382064
How do I do that?
02:19
say what?
I've seen:

const { a, b, ...rest } = obj;

But has anyone seen:

const { a, b, ..._ } = obj;
 
2 hours later…
user17382064
03:54
vlaz
04:40
 
3 hours later…
07:57
hello folks, new to javascript and am very confused by the use of Zeroes(0). trying to build a simple bill split application and am stuck when I console.log(type of 0):
HTML input type="number" however still returning a string when console.log
1 message moved to Trash can
1 message moved to Trash can
1 message moved to Trash can
 is that okay since the calculation seems to be working correctly?
      function billSplit() {
      let totalBill = document.getElementById("bill").value;
      let groupSize = document.getElementById("split").value;

      if (totalBill == "" || groupSize == "") {
        document.querySelector("h2").innerHTML = "Missing field";
      }

      else if (totalBill == 0 || groupSize == 0) {
        document.querySelector("h2").innerHTML = "Value cannot be zero"
      }
      else {
        let splitTotal = (totalBill / groupSize).toFixed(2);
 
1 hour later…
09:02
10 messages moved to Trash can
09:14
@cool-peaches, its ok right now but this(string type) will create a bug when you try to add something. So u can use Number(totalBill) to convert to number type.
Bug(for string type): What is 2+2 you are right 4 but as these are strings so you will get 22 if not converted to number because "2"+"2" = 22 (string concatenation)
09:35
@duhaime It's valid code. You can use it if you wish. It's not very typical as an underscore tends to mean "I don't care about this", while if you use a rest variable you typically do care. But it's also not very wrong.
 
1 hour later…
10:47
@Rana yes, i also tried to add Number(totalBill) but after doing that my if/else statement for the error message "Value cannot be zero" stopped working. the code seems to started treating the zero as an empty field " "
So what u get in the output after entering 0
@cool-peaches change to: else if (Number(totalBill) == 0 || Number(groupSize) == 0) {
See if it works but that shouldn't be the problem because u are not checking for type(i.e, === in condition) while matching 0
@Rana undefined Logged: [ '"Match"' ] Took: 57ms
||> someVar = 0; if (someVar == 0){console.log("Match", typeof someVar )} else {console.log("No Match", typeof someVar)}
@Rana undefined Logged: [ '"Match"', '"number"' ] Took: 35ms
||> someVar = "0"; if (someVar == 0){console.log("Match", typeof someVar )} else {console.log("No Match", typeof someVar)}
11:02
@Rana undefined Logged: [ '"Match"', '"string"' ] Took: 1ms
I also tried to add a resetBtn but the global variable doesn't work in this case?
let totalBill = document.getElementById("bill").value;
let groupSize = document.getElementById("split").value;

function billSplit() {
  let totalBill = document.getElementById("bill").value;
  let groupSize = document.getElementById("split").value;

  if (totalBill == "" || groupSize == "") {
    document.querySelector("h2").textContent = "Missing field";
  }
  // else if ((isNaN(totalBill)) || (isNaN(groupSize))) {
11:26
what *<name> means in git blame ?
11:47
@SuperUberDuper Do you have an example?
@cool-peaches if function is running this way(without Number()) than use that (as I am not able to catch up what you wanted) and when you add something than just change NUmber(a) + Number(b) at that place only
when you can see a name, eg
*james
*james
paul
@VLAZ can u tell about these comments plz. Like when we hover on tags in SO tooltips(description) are shown below tag but if space run out below it than they(tooltip-description) shown above tag.
Is it done using constant monitoring of change in position or is there a library to change position accordingly
@SuperUberDuper Dunno, without seeing it in context I'm not sure what you refer to.
@Rana Also dunno. I just leave a tooltip library to deal with tooltips, so I don't have to bother.
its just git blame
do you know what that is?
11:58
Can you suggest good library that you use.
@SuperUberDuper Yes, I do. I just can't remember seeing this. I might have or I might have not, hence why I asked for an example.
* i see all the time in various codebases
might be a webstorm thing
@Rana Just the jQuery UI one: jqueryui.com/tooltip nowadays we have Syncfusion components and they have some tooltip themselves. But I wouldn't recommend it - Syncfusion is paid and...I'm not sure it's worth the money.
12:20
Thanks @VLAZ, but it is not changing position when no space left, I think my expedition still remain ON or leave it as your suggested method is also good to try.
Hi all
hello
Getting started with VueJS. I've got gulp + babel and wondered how to set up the environment to use the correct version of VueJS source file
The .global files will compile the templates during runtime. What if we want the templates compiled during the development
Thinking precompiling is faster for the page loading
user17382064
I need help with instructions I was given.
user17382064
At the end of the getWrapper we need a wrapper variable to be defined, called wrapper. That wrapper is retrieved from the players object at the index location. The item at that index location is an object with both cover and wrapper properties. I need the wrapper property from that item.
user17382064
12:34
const manageUI = (function makeManageUI() {
  const body = document.body;

  const players = [];

  function findPlayers() {
    const allCovers = document.querySelectorAll(".cover");
    const allWrappers = document.querySelectorAll(".wrap");
    allCovers.forEach(function addToPlayers(cover, index) {
      players.push({
        "cover": cover,
        "wrapper": allWrappers[index]
      });
    });
  }

  //callback syntax
  function getWrapper(cover) {
    function isCover(player) {
    return player.cover === cover;
12:48
"We" let your other mates do some work @htmlcssjava321. Don't pressurize yourself, start learning step by step and soon you will find the solution of problems you are looking for by yourself. Just focus and start with small step
user17382064
  function getWrapper(cover) {
    function isCover(player) {
    return player.cover === cover;
    }

const wrapper;
user17382064
Like that @rana
user17382064
That is part of it.
user17382064
13:05
Like this?
user17382064
  function getWrapper(cover) {
    function isCover(player) {
    return player.cover === cover;
    }

    const index = players.findIndex(isCover);
  }

  const wrapper = {};
user17382064
Next:

The item at that index location is an object with both cover and wrapper properties. I need the wrapper property from that item.

I am looking at this line:
user17382064
const index = players.findIndex(isCover);
user17382064
I don't understand.
user17382064
I do see cover and wrapper here.
user17382064
13:17
      players.push({
        "cover": cover,
        "wrapper": allWrappers[index]
      });
    });
  }
user17382064
This is wrong.
user17382064
 players.push({
        "cover": cover,
        "wrapper": allWrappers[index]
      });
    });
  }

  return wrapper;

  //callback syntax
  function getWrapper(cover) {
    function isCover(player) {
    return player.cover === cover;
    }

    const index = players.findIndex(isCover);
  }

  const wrapper = {};
Vlaz found a library used by Stack Exchange for tooltips and other stuff: PopperJs
user17382064
What I am trying to do:

At the end of the getWrapper a wrapper variable needs to be defined, called wrapper. That wrapper is retrieved from the players object at the index location. The item at that index location is an object with both cover and wrapper properties. I need the wrapper property from that item.
user17382064
At the end of the getWrapper a wrapper variable needs to be defined, called wrapper.
user17382064
13:23
I did that here:
user17382064
 function getWrapper(cover) {
    function isCover(player) {
    return player.cover === cover;
    }

    const index = players.findIndex(isCover);
  }

  const wrapper = {};
user17382064
I am stuck on this:

That wrapper is retrieved from the players object at the index location. The item at that index location is an object with both cover and wrapper properties. I need the wrapper property from that item.
user17382064
This is wrong. A return wrapper; doesn’t go there I don’t think.
user17382064
  players.push({
        "cover": cover,
        "wrapper": allWrappers[index]
      });
    });
  }

  return wrapper;
user17382064
13:56
index is not something I have used regularly in code so this is relatively new to me
user17382064
It's confusing.
ah, I thought ...rest was some kind of reserved term, I didn't realize it's just a variable :)
14:37
I have a new question: I can load <img src='yeet.jpg'> just fine, but if I try to `fetch('yeet.jpg')` I get:

Access to fetch at (requested url) from origin (my localhost) has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Has anyone seen that before?
14:58
I'm using this code to detect connections going offline but I don't notice anything: webinuse.com/how-to-warn-users-when-the-connection-is-lost
I have it display a div when the connection goes offline. I disconnect my laptop from the network and it doesn't trigger
Anyone have a more sure-fire way of detecting connectivity issues via the web?
My question is so lonely, guys: stackoverflow.com/q/70207066/1439748
If your goal is get wrapper by cover, why not this?

const getWrapperByCover = (cover) => players.find(p=>p.cover === cover)
15:27
Hey. I'm using create-react-app for my page. Now it bundles all images smaller than 10kb (or what it was). Is there some way to fiddle around with this? What I want is to add ALL images to the bundle (I know about the size configuration), but can I also split the bundle into a code bundle and an image bundle?
@duhaime Yes. I believe you need to allow CORS on the server side.
anyone who is Ajax pro? :)
@SvetGEoff 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, do you have any good tech articles about comparison NoSQL and SQL-like databases?
15:44
@entithat look up in pdfdrive.com
can you explain me pls?

SQL databases are vertically scalable in most situations. You’re able to increase the load on a single server by adding more CPU, RAM, or SSD capacity. NoSQL databases are horizontally scalable. You’re able to handle higher traffic by sharding, which adds more servers to your NoSQL database. Horizontal scaling has a greater overall capacity than vertical scaling, making NoSQL databases the preferred choice for large and frequently changing data sets.
Why noSQL databases could not be scaled vertically? I can upgrade CPU or ram on the server too as with SQL-like datab
i would assume (since i have no real knowledge of why it would be this way) that no-sql databases that existed when that was written do not benefit from vertical scaling as well as SQL databases do.
Adding more resources to something doesn't always result in an equal amount of increased capability
16:10
It doesn't say NoSQL databases are not scaled vertically. Nothing in the text says that. It only says they are horizontally scalable and that horizontal scalability offers greater benefits. What it implies is that SQL databases are the ones that are not horizontally scalable and it's overall true. Like with most stuff in tech, it's possible, just not something done often or easily. Hence the popularity of NoSQL databases which you can use this way almost out of the box.
@LCIII but the images load on the same host if they're just image tags -- wouldn't the lack of cors prevent them from loading there too?
NoSQL databases historically were not ACID compliant, which I believe is often cited as one of the reasons they're not vertically scalable. But Mongo 4 is ACID compliant now
I think you can shard MySQL now too, so it's horizontally scalable
ok thanks
16:38
Has anyone setup a Graphql Express server on Github codespaces and been successful querying with Postman?
 
2 hours later…
18:41
is there a way to ask eslint to ignore the previous line?
@duhaime Technically, if you ignore the file, it also ignores the previous line. There isn't something specific for "previous line", just next.
Can anyone direct me to what this is called(hard to search without clue): Like in most of documentation(say google) when you hover on heading a link appears and on clicking it takes that heading to top of screen(means scroll to top view)
19:02
my bad question :( add link to id of headings on hover
@entithat NoSQL scales horizontally, SQL scales vertically and scaling horizontally is cheaper than scaling vertically is the general rule of thumb.
"So why not use NoSQL?" because it sucks and unless you're Google, you probably don't need it
The way I see it, if you don't know whether you should use SQL or NoSQL, you should be using SQL. If you have lots of experience and know the benifits and drawbacks of NoSQL and you think you would benefit from it then use it. But again, you likely don't need it.
 
1 hour later…
20:20
posted on December 07, 2021 by Harry Souders

Hi, everyone! We've just released Chrome 96 (96.0.4664.94) for iOS: it'll become available on App Store in the next few hours. This release includes stability and performance improvements. You can see a full 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

 
2 hours later…
22:08
posted on December 07, 2021 by Srinivas Sista

The Dev channel has been updated to 98.0.4750.0 for Linux, Windows and Mac 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. Srinivas Sista Google Chrome

user17382064
22:27
jbis
user17382064
or someone.
user17382064
wrapper variable, and assign to it the players variable.
user17382064
That means this?
user17382064
const wrapper = {players}
23:21
haha, touche
I think you want to go the other way htmlcssjava321

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