« first day (3832 days earlier)      last day (1099 days later) » 

12:46 AM
posted on April 13, 2021 by Krishna Govind

Hi everyone! We've just released Chrome Beta 90 (90.0.4430.66) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 
 
5 hours later…
6:14 AM
how can I use the replace function or simular to replace 3003 or 3003.dat or 3003.dat.dat or 3003.dat.dat.dat with just 3003.dat
so replace any number of .dat at the end with just one
 
 
2 hours later…
8:43 AM
when you use <script type="module">


does the saw download other dependencies before the page runs?
 
8:58 AM
"the saw" ?
anyways, when it contains other imports, these gets loaded yes. But the page is already running at that moment
remember it's async
 
 
2 hours later…
10:56 AM
ok thx, its just that all the network files get downloaded before the code runs inside the <script module
 
11:06 AM
Thats the raw binary of a PNG encoded image..

How and why do you have that in a variable
you should be storing images as Image() objects
 
@MisterSirCode these can be stored as bytearrays?
or even strings
 
I mean I guess it doesnt matter
but if you dont parse an image into an Image object, itll be more annoyying to work with
Image objects can work with HTML, Canvas and the default javascript methods related to it...
It just makes things easier
 
yeah, I agree with you, using the image class is more appropriate
eh more correct I would say
 
 
2 hours later…
12:51 PM
never mind I solved my problem
 
 
1 hour later…
2:20 PM
Anyone know of a good Cloud Algorithm for javascript?
for something like Cloud Noise?
Wanted to add procedural noise rendering to my engine but I dont know of any good alogorithms
 
2:36 PM
lmgtfy: js noise
 
Perlin noise is a type of gradient noise developed by Ken Perlin. == History == Ken Perlin developed perlin noise in 1983 as a result of his frustration with the "machine-like" look of computer-generated imagery (CGI) at the time. He formally described his findings in a SIGGRAPH paper in 1985 called An image Synthesizer. He developed it at Mathematical Applications Group, Inc. (MAGI) for Disney's computer animated sci-fi motion picture Tron (1982). In 1997, Perlin was awarded an Academy Award for Technical Achievement for creating the algorithm. To Ken Perlin for the development of Perlin Noise...
 
> Ken Perlin developed perlin noise in 1983 as a result of his frustration with the "machine-like" look of computer-generated imagery (CGI) at the time
ha
 
james keeps dyeing and idk why
 
no errors?
 
nope
 
2:41 PM
memory? socket not starving out?
 
def not memory, probably related to websocket
the process isn't crashing
 
@JBis Thanks, that library looks really useful for my purposes josephg.com/perlin/3
Looks pretty performant aswell
 
2:57 PM
funny how when googling for noise you find not white noise or even pink noise: but a very specific noise that was applicable to what you needed.
 
3:35 PM
https://replit.com/@MisterSirCode/CGame-Engine-Alpha-2#testing-it.js

Blegh... This is totally nasty... I need to implement transitional velocity
this is actually crap
issue is... I have no idea how to implement velocity in javascript :3
oh... I found some research papers on Acceleration and Friction in javascript
well, time to burn 3 hours
 
 
2 hours later…
5:26 PM
you're going from noise to velocity, to finally land on ... acceleration and friction?
 
gotta make it pretty and slow before making it functional
 
The secret is to make it so slow you can't tell it's not functional
 
To people who have used jmeter here...how can I compute my assertion value based on my previous thread group? I am trying to compute the assertion value based on the # of users and loop count I specify in the previous thread group...
 
 
2 hours later…
7:40 PM
Could someone help me answer this question? I would really appreciate with any help/suggestion/recommendations ^^!

https://stackoverflow.com/questions/67030137/why-does-array-allow-string-as-an-index-in-javascript
 
user14354123
1
Q: How can i keep the first Image Element of the div to be clicked by default?

DemogorgonHow can I keep the first Element of the div the be clicked by default ? I have given a div below which contains images and i want the first image of the div to be clicked by default.I am using this as a view in react functional component ```<div className="tv_tabs" style={{ marginLeft: "110px" }}>

 
user14354123
can someone help
 
@NguyễnVănPhong I don't think presenting this quirk of the language is... useful to anyone. It's a.. err... "feature" of arrays that should never be used.
 
Yes, I do think so. And I want to clarify some concerns/question in my post :(
 
arrays are objects, and thus can have string keys, however those keys won't be iterated over using normal methods of iterating over an array.
they can get in the way of some methods
causing unexpected behaviors, etc
not to mention, any array method that returns a new array wouldn't have any of the non-array index properties
it's kinda like asking a question about labels and drawing a bunch of attention to it... just because it exists doesn't mean it needs to be documented/presented as a feature worth knowing about, it's only there because it's always been there
 
7:52 PM
I have 4 questions like that
 
52
Q: Add property to javascript array

ellabeautyArrays have a "length" property by default. Can I add custom properties to them? Without having to make them objects

tldr i think you are creating content for the sake of creating content, than creating content that will contribute to the knowledgebase this is meant to be.
 
Thanks for your recommendation. Sorry if my question is not good. But I really need someone answer my concerns instead:)
Don't get me wrong:(
 
what's.. the concern then
arrays are objects, and can have properties like any other object
 
Ok. And how about question #2, #3?
 
it's an object, no, and no
 
8:03 PM
As you can see the answer: stackoverflow.com/a/67030221/9071943
 
it's all covered in the duplicate
at teh top, not sure how i got a link to a subsection
 
8:20 PM
Thanks. Let me check it out. I'm actually from C#, and quite newbie with JavaScript (Especially the inconsistency behavior like that). Hopefully someone can summarize then give me the full answer. Good night:)
 
9:08 PM
I can create an "empty" react object with <></>. But is there a way to wrap a list entry in an empty object in some way? (I would like to avoid wrapping the object in another div)
foo.map((bar, index) => (<div key={index}>...</div>)
that's the div i would like to aviod
 
hello
 
@23908938 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.
 
anyone know why my tabs don't change when clicked???? jsfiddle.net/hxgydakf
 
@Markus not sure what you mean
that's what <></> is for?
 
for example you can do:
...
return (
<>
  <div />
  <div />
</>
)
to work around that the return only take one child
 
9:12 PM
right
but why can't you do that
 
foo.map((bar, index) => (<??? key={index}>...</>)
like that
I can't create a <key={index}> element
 
but from what I understand the key is never used in the dom, so it shouldn't really be necessary to use a dom object
 
actually seems to be built-in now
 
i doubt that will work
react needs to be able to manipulate specific elements
 
9:18 PM
Yes it actually works. Thanks!
 
i stand corrected
In large lists that will probably not be performant. It has to replace the entire thing to change one piece basically eliminating the point of key.
 
anyone know why my tabs don't change when clicked???? jsfiddle.net/hxgydakf
 
ok, worth noting, but for now it's only some 10 objects or so.
But I don't really get your point... Why replace the whole list? it has a key.
 
i assume the thought is that if it doesn't have a key, react can't target it in the dom for replacement
if it doesn't have an element wrapper, where would that key and dom reference exist?
maybe on the text node?
(i don't know)
 
I am wrong again. My thinking was that it simply does one .innerText = meaning that it wouldn't be able to change part of the text without replacing all of it, but react is smart and creates individual textNodes and appends those. Therefore, there is nothing wrong with doing what you did.
 
9:25 PM
But... isn't that the whole point with react, it holds it's own DOM.
 
well, yes and no
even if it holds it's own dom, it still eventually has to touch the real one
good to know it's smart enough to use textnodes and be able to directly interact with them
 
true...
textnodes?
 
yeah, you can have individual text nodes within a dom element
 
@23908938 Please provide a minimal example. Also you have no JS.
 
the come across as different children when you do element.childnodes
or is it .children
.childNodes
 
9:29 PM
@JBis Hi, I had some but it wasn't working so I removed
 
@23908938 Please try to create a minimal example
|| mcve
 
If you would like assistance, please create a
If you would like assistance, please create a Minimal, Complete, and Verifiable Example
@23908938 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
 
$(function() {
      $( 'ul.nav li' ).on( 'click', function() {
            $( this ).parent().find( 'li.active' ).removeClass( 'active' );
            $( this ).addClass( 'active' );
      });
});
@JBis I added this
 
9:49 PM
@jb
 
posted on April 13, 2021 by Prudhvikumar Bommana

The Stable channel has been updated to 89.0.4389.128 for Windows, Mac and Linux which will roll out over the coming days/weeks. 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

 
10:02 PM
so I have a div that has height: 200px, and in that div I have two other divs, now I want the first div to take * height, and the last to be auto. So is there some "name" for *
I mean it should take 200 - height(last)
this will make last stick to the bottom of the container
 
so, the height of the first div should be the height of the content, and the second div should take up the remaining of the 200 px
correct?
 
posted on April 13, 2021 by Krishna Govind

Hi, everyone! We've just released Chrome 90 (90.0.4430.66) for Android: it'll become available on Google Play over the next few weeks. 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. Krishna Govind Google Chrome

 
flex would be one way of accomplishing that
 
maee...
 
but...
it might be simpler for the second div to be... fake
 
10:05 PM
the second should take the height of it's content, but the first should take the rest
 
Ah
that's a bit more complicated, but with flex is just one style change
 
maybe it's just simplest to make a flexbox or grid
 
i find flexbox generally annoying
but it's often the simplest way to get close to what i want
it's rarely exactly what i want, but close enough to suffice, lol
 
mm. I learnt about the flex box about 4 weeks ago... and grid 1 week ago...
much C# development, but focusing on js/react etc now. I like it, but it takes some getting used to.
 
without flexbox... the difficulty of your design is getting the top div to take up the remaining space
the opposite is much easier
position absolute could do it... but... that's often like using a socket wrench as a hammer
 
10:11 PM
I actually got really happy when finding out about flex and grid. css before that was... very annoying.
top: 50%
transform: translate(-50%)
or what it was...
geeee
 

« first day (3832 days earlier)      last day (1099 days later) »