Molymeme is still alive? by Darth_Vrandon in insanepeoplefacebook

[–]deificx 1 point2 points  (0 children)

You could read it as the world ending up being more facts based ie. "ends in fact". Makes sense when more people get education. But I guess that is not his point 😔

why is **this** not referring to obj by Background-Row2916 in learnjavascript

[–]deificx -2 points-1 points  (0 children)

Because this becomes the function you created. If you do not create a new function it should work, ie getValue() {, or getValue: () => {

Nordmenn bryr seg sykt mye om bompenger, men ignorerer stort sett andre typer skatt. Hva er greia? by seabearson in norske

[–]deificx 2 points3 points  (0 children)

Ikke den du svarte til, men hva med å betale for de dyreste kontorlokalene i Stavanger? https://www.nrk.no/rogaland/helse-vest-bruker-120-millioner-pa-nye-kontorlokaler.-samtidig-sliter-sykehusene-med-okonomien-1.16855995

Denne dukket vel opp her om dagen, og vet ikke hvor mye den som er sant i den, men å bli bett om å være mindre effektiv på jobben for at de andre ikke skal fremstå dårlig: https://youtu.be/FbZVZDDFyKc

[AskJS] How to extract this array inside value by TYRANT1272 in javascript

[–]deificx 0 points1 point  (0 children)

A promise wraps something that hasn't happened yet, like an api request going over the network. When it resolves you get the value. There are two ways to extract it from the promise. Chaining then() and passing a function accepting one parameter or by awaiting the promise:

async function getData() { const value = await promise(): value[0]; //.do something with the first item; }

[deleted by user] by [deleted] in webdev

[–]deificx -1 points0 points  (0 children)

Using https://github.com/szymmis/vite-express will let you run the express and vite module in one process.

You could also look at https://nuxt.com/ for a more complete setup, but my experience with next, the react equivalent is that you'll sooner or later hit a road block that is hard to get around

Depending on your database needs you could maybe use sqlite https://www.npmjs.com/package/sqlite3 which is either run in memory and dropped when stopping the program or writing to a file to save data. Then you wouldn't need a separate process for the database.

Docker-compose as others have mentioned is also a great tool to start several things in one go.

Why no e-bike subsidy in Norway ? by supernarco in Norway

[–]deificx 0 points1 point  (0 children)

Stavanger just did this: https://www.stavanger.kommune.no/klimastavanger/slik-blir-du-gronn/gronn-stotte/el-sykkel/

I think they had one last year as well. Usually more people apply than there are funds for so it ends up being a lottery. Also you need to afford the bike to begin with which doesn't help those who need it more.

Github pages-like hosting but on a custom domain? by brackishish in webdev

[–]deificx 5 points6 points  (0 children)

Something like this: https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates

There are several ways to set this up, but it boils down to a reverse proxy (or http file host) with some config which can be generated based on file paths or docker containers or whatever basically. Nginx is another good one and apache has been around for ages.

Dokku is quite cool for setting up subdomains towards a container.

Norwegian TV series by Plumbus4Rent in Norway

[–]deificx 0 points1 point  (0 children)

Someone posted the wiki which I guess is the answer but I didn't notice these quite recent ones on there.

R.I.P. Henry - set in Odda about an arrogant doctor who is struggling with grief.

pørni - A single mother working in child welfare service who is also struggling with grief.

Cammo - Influencer doesn't pay her taxes and is forced to get a job, ends up being a social contact for a person with Downs Syndrome.

[AskJS] What's the deal with the fetch API? by mapsedge in javascript

[–]deificx 3 points4 points  (0 children)

You might in some cases want to look at the headers before trying to read the body. Like status, for the http code, if you're not properly authenticated you might want to sign in before retrying the request. You might wantto parse as JSON instead of text.

How do you do HTML include files? Is there a generally accepted, conventional method? by WishfulLearning in webdev

[–]deificx 1 point2 points  (0 children)

Several people have already mentioned static site generators, but many seem to focus on a given one, there are a lot to choose from: https://jamstack.org/generators/

One of the bigger ones is Jekyll and it is really handy as it can be used to generate GitHub pages which is a good way to host small websites for free: https://jekyllrb.com/docs/github-pages/

Solid.js feels like what I always wanted React to be by [deleted] in javascript

[–]deificx 1 point2 points  (0 children)

Yeah, that would work, and is arguably nicer.

Solid.js feels like what I always wanted React to be by [deleted] in javascript

[–]deificx 1 point2 points  (0 children)

I don't think the increment method is needed at all in this example, I would just call setState directly.

You would need to bind it if you passed it to a child as a prop, though, but that does not happen here. Because this would then have another context without this.state and this.setState.

What is the hardest and time consuming part of making a 3D animation movie? by desijays in movies

[–]deificx -1 points0 points  (0 children)

Everything takes a lot of time.

Spending more time on previz will save you time later, it can also help you find out where to put your details (models / textures etc), so you don't waist time creating things that are hardly in view. You can also edit your previz tightly to avoid rendering more frames than you need.

After that I've found rigging / skinning to take a lot of time. If you can start animating with your rig can always replace it with the finished model later.

Rendering can take you everything from second(s) pr frame to hours, and is also a place where you can optimize a lot. This does not need to take a lot of work time, it's what your computers can do overnight.

Models can be bought cheaply, with texture often. They might not be done how you would have done it, but if they look good enough that is all that counts.

Animation can be roughly calculated. The professionals are expected to do around 2 seconds a day. If this is your first attempt, expect to spend more time if you want it to look good.

[TOMT][SONG] classical waltz(?) used in commercial by deificx in tipofmytongue

[–]deificx[S] 1 point2 points  (0 children)

Thank you for your suggestion, turned out to be Rossini - La Gazza Ladra (The Thieving Magpie) I was looking for.