« first day (4282 days earlier)      last day (649 days later) » 

2:22 AM
 
 
3 hours later…
5:33 AM
> jQuery (.js) files
:sob:
 
 
5 hours later…
10:20 AM
@Loktar speaking of a bad moment of purchase :|
my next car (ordered but delayed due of chips shortage) a plug-in hybrid one. EU has regulated that new cars should be full electric after 2030 .__.
Bit too early, we don't have a good charging infrastructure atm.
it will be a mess in meanwhile. So people directly going to electric cars directly should not complain if they do, later :D
 
 
2 hours later…
11:58 AM
Hello
Can you give me an advice
How to create form where I need to enter name, adress , city, longitude and latitude
Which does not have too much sense for me
But thars
Thats task assesment
Plan is to use redux toolkit and React
Is it possible to return lat and lng based on city and address?
 
You can look those up via the Google API, for example
I'm pretty sure there are others. Probably OpenMaps
 
1:04 PM
posted on July 07, 2022 by Ben Mason

Hi everyone! We've just released Chrome Beta 104 (104.0.5112.37) 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. Erhu Akpobaro Google Chrome

 
```
<script type="text/javascript">
       const image = document.getElementsByTagName("img").item(0);
       console.log(image);
        smartcrop.crop(image, { width: 1025, height: 100 }).then(function(result) {
               console.log(result);
        });
   </script>
```
I'm trying to use smartcrop.js and I'm getting this error. ` Uncaught ReferenceError: smartcrop is not defined`.
 
1:49 PM
@simanacci ensure it's part of the page. Did you have loaded in the script source?
+ also ensure that your snippet is executed only once the script is loaded. A good practice is to wait for domcontentloaded event
 
2:32 PM
@KarelG I've added the listener but I'm still getting the same error.
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/smartcrop/0.0.0/smartcrop.js"></script>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function() {
const image = document.getElementsByTagName("img").item(0);
console.log(image);
smartcrop.crop(image, { width: 1025, height: 100 }).then(function(result) {
 
``` doesn't demark code in chat
chat only accepts 4 spaces before the code
and, it has to be done in it's own message, not mixxed with other non-code text
ctrl+k will add the 4 spaces for you to the selected lines
 
@simanacci 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
 
given the error message, assuming you're following the smartcrop documentation and it's actually exposing a smartcrop object to window, you likely have an error in your network tab.
but i'm fairly certain your problem is the former
aka, you're not following the documentation exactly, smartcrop is exposed to the window as SmartCrop, not smartcrop
You can tell by looking at the end of this file: cdnjs.cloudflare.com/ajax/libs/smartcrop/0.0.0/smartcrop.js
 
3:26 PM
I've expressed that I'm not a huge fan of the JS ecosystem in the past. Maybe not enough but there you go, now you're informed: I dislike it. I think NPM is pretty crappy at managing dependencies. Yet, apparently I was wrong. I just didn't understand how bad it really was. Today for the first time, I got a node-gyp error which was so cryptic that it may as well have just showed me a middle finger. npm install failed because it couldn't build the node-sass dependency.
With some crap about make throwing an error. I tried it on three different operating systems and got three different errors. Took a few hours to figure out that it only meant I had to downgrade my Node installation. You know, because that makes sense - Node 16 or 18 are apparently incapable of compiling C++ code. Node 14 is.
The solutions online weren't helpful, either. None of them explained what the problem is. Just a bunch of people saying what occult ritual they did to get rid of the error.
 
3:40 PM
posted on July 07, 2022 by Rafael Gonzaga

(Update 07-July-2022) Security releases available Updates are now available for the v18.x, v16.x, and v14.x Node.js release lines for the following issues. HTTP Request Smuggling - Flawed Parsing of Transfer-Encoding (Medium)(CVE-2022-32213) The llhttp parser in the http module does not correctly parse and validate Transfer-Encoding headers. This can lead to HTTP Request Smuggling (HRS). More

 
@VLAZ well that's less npm's fault and more node's fault
 
yeah, i mean
i've had similar problems
but i expected them
I was trying to run an older version of a node module on a newer version of node
Once i got compatibile versions it worked fine
 
@JBis It's the entire toolchain. The ecosystem's fault.
@KevinB Yes, but that's not what the error says. It just spews a bunch of crap about C++ code failing to compile because random stuff is not part of the std namespace. Which isn't exactly "please change the version of Node you use".
 
meh
npm can't tell from the response the compiler is returning what is wrong
how can it know that it's a version mismatch?
 
@VLAZ the ecosystem sucks, yes
 
3:47 PM
@KevinB It's apparently a common enough problem. I found mentions of it in a lot of places. It could at least say "Try changing the version of node, or clearing the cache and rebuilding, or this, or that"
 
isn't it just getting a 1 or 0 response?
From NPM's perspective all it sees is the output of the command, 0 for fail 1 for success, all of the other output comes from the command it ran logging directly
you could certainly argue that node-gyp could have better log output
 
Yes, NPM sucks at detecting why the build failed. That doesn't mean it should continue sucking. It could detect what failed and offer suggestions. And node-gyp could also do that. Right now, it just spews out the compiler output which is completely useless. I'm not going to go and change the C++ code of a random dependency until it compiles.
 
lol
 
4:22 PM
posted on July 07, 2022 by Danielle Adams

Notable changes deps: upgrade openssl sources to OpenSSL_1_1_1q (RafaelGSS) #43692 src: add OpenSSL config appname (Daniel Bevenius) #43124 Commits [2303fd3fe5] - deps: update archs files for OpenSSL-1.1.1q (RafaelGSS) #43692 [b219a63c28] - deps: upgrade openssl sources to OpenSSL_1_1_1q (RafaelGSS) #43692 [c6553a4ef5] - deps: update archs files for OpenSSL-1.1.1p+quic (RafaelGSS) #43535

posted on July 07, 2022 by Danielle Adams

Notable Changes [8e8aef836c] - (SEMVER-MAJOR) src,deps,build,test: add OpenSSL config appname (Daniel Bevenius) #43124 [98965b137d] - deps: upgrade openssl sources to 1.1.1q (RafaelGSS) #43686 Commits [b93e048bf6] - deps: update archs files for OpenSSL-1.1.1q (RafaelGSS) #43686 [98965b137d] - deps: upgrade openssl sources to 1.1.1q (RafaelGSS) #43686 [837a1d803e] - deps: update archs files f

posted on July 07, 2022 by Rafael Gonzaga

Notable Changes [3f0c3e142d] - (SEMVER-MAJOR) src,deps,build,test: add OpenSSL config appname (Daniel Bevenius) #43124 [9578158ff8] - (SEMVER-MAJOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) #43124 Node.js now reads nodejs_conf section in the openssl config [dc7af13486] - deps: update archs files for quictls/openssl-3.0.5+quic (RafaelGSS) #43693 [fa72c534eb] - deps:

 
4:44 PM
recently In a codebase I came across this code:
  if (
            ((k.__ = u),
            (k.__b = u.__b + 1),
            null === (w = A[y]) || (w && k.key == w.key && k.type === w.type))
          )
focus on the first 2 expressions:
  if (
            ((k.__ = u),
            (k.__b = u.__b + 1),

          )
I dont'get it...it tests if the assigments are made?
or the minifier just puts these assigments for speed's sake inside the IF parenthese?
 
@DimitrisPapageorgiou The assignment returns the assigned value. So if the assigned value is falsy, the execution won't go inside the if
||> console.log(foo = 4)
 
@VLAZ undefined Logged: [ '4' ] Took: 1ms
 
||> if (foo = 0) { console.log("if") } else { console.log("else") }
 
@VLAZ undefined Logged: [ '"else"' ] Took: 0ms
 
oh...so if ((k.__ = u), is falsy the execution will not continue
 
4:58 PM
posted on July 07, 2022 by Srinivas Sista

The Beta channel has been updated to 104.0.5112.39 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 issues, 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

 
With that said, this is using the comma operator, so only the last value is relevant. Not sure why the minifier decided to put all in the conditional but it's technically valid. The result of the first expressions will be ignored
||> if (foo = 0, true) { console.log("if") } else { console.log("else") }
 
@VLAZ undefined Logged: [ '"if"' ] Took: 0ms
 
||> if (foo = 0, true) { console.log("if") } else { console.log("else") }
console.log("foo is", foo)
 
@VLAZ undefined Logged: [ '"if"', '"foo is"', '0' ] Took: 0ms
 
4:59 PM
@DimitrisPapageorgiou looks minified
 
|| mdn comma operator
 
I'm now getting this error -> Uncaught DOMException: Index or size is negative or greater than the allowed amount - smartcrop.js 324.
https://paste.ofcode.org/Sc2v7DgAvkWudwxUbEmc2P
 
 
1 hour later…
6:08 PM
I have situation where I can't hide MUI Snackbar
I am using Redux Toolkit
and Snackbar alert message is displaying properly, but it's always visible
if it's possible, I would like to avoid using useState, because I already have notificationSlice with initialState
const App = () => {
  // Check notification state
  const notification = useSelector((state) => state.notification);

  return (
    <>
      <Snackbar open={notification.isOpen} autoHideDuration={5000}>
        <Alert severity={notification.type} sx={{ width: "100%", mb: 7 }}>
          {notification.message}
        </Alert>
      </Snackbar>
      <CssBaseline />
      <Router>
        <Routes />
      </Router>
    </>
  );
};
I have autoHideDuration prop , but does not trigger
Any suggestion ?
 
6:30 PM
Ok, I fixed an issue
 
I refuse to use bun because I refuse to support a useless language (Zig)
 
Dafuq is Bun, even? I only heard of it today. Or was it yesterday. There were several questions about it on SO.
None of them gave proper context. And the tag wiki is missing.
 
it's yet another library
 
I got that far. I've no idea what it does.
 
ah, no, so it's yet another js env. ew
 
6:39 PM
> Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.
Oh, so it's shit.
Well, to be honest I was joking. It's not just the NPM thing that makes it sound unappealing. It's yet another tool that does Everything You Want To Be Doing But In One Place! I can predict it doesn't work as well if your project deviates from the standard template it uses.
That's what all those tools do.
 
almost half the questions are self answered
 
About Bun?
Sounds like a promotion campaign then. I'm pretty sure they were from mostly different users.
 
the 3 i'm looking at are all from the same user
within the last hour or so
really stupid simple stuff
and not bun related
lol
 
"how do I do a loop in Bun"
 
Do you have experience with redirecting from redux action ?
I have the same form for login and register
  const submitForm = async (formData) => {
    const email = formData.email;
    const password = formData.password;

    {
      isLoginForm
        ? dispatch(signIn(email, password))
        : dispatch(signUp(email, password));
    }
  };
 
6:45 PM
> bun doesn't seem to exist in my terminal -> add it to your path
> bun types aren't showing up in my ide -> install bun types
 
It's if someone made Node.js today, it'd be bun
tbh i wouldn't start a new project in js
And every old project is using node, so idk why i would ever use bun
 
@KevinB Lol and the other 4 questions are all literally "how do I install Bun"
Oh, wait. One isn't. It's which is faster BUN or Just JavaScript runtime? But I've no idea if "Just" is supposed to be some tech thing or just the plain English word.
There are two questions tagged
It's some sort of build tool, like make. Not sure how it can really be compared to Bun, in that case, which is actually running your code.
 
@KevinB We've answered this question 5+ times in the discord in the past 2 days despite it being in the README. Hopefully people will search here instead of someone needing to take the effort to answer again, — sno2 4 mins ago
 
lol@using Discord for answering questions when you don't want to be answering the same questions over and over again
 
7:00 PM
@sno2 The first mistake was expecting JS devs to read documentation — JBis 1 min ago
 
7:25 PM
ORMs are a scam, i can get far with raw SQL
 
8:09 PM
i kept thinking sno2 was a familiar name
but it's not, i'm thinking wso2
 
 
3 hours later…
11:10 PM
posted on July 07, 2022 by Release Managers

Hello Folks, The Beta channel is being updated to 104.0.5112.36 (Platform version: 14909.52.0) for most ChromeOS devices. If you find new issues, please let us know one of the following ways File a bugVisit our Chrome OS communitiesGeneral: Chromebook Help CommunityBeta Specific: ChromeOS Beta Help CommunityReport an issue or send feedback on ChromeInterested in switching ch

 
11:36 PM
@KarelG Oof...
 

« first day (4282 days earlier)      last day (649 days later) »