RustyNova

joined 11 months ago
[–] [email protected] 2 points 15 hours ago

Technically yes, but a newbie doesn't need that. I doubt it's an application that performance is so critical either.

Too much premature optimisation IMO

[–] [email protected] 6 points 20 hours ago* (last edited 19 hours ago) (2 children)

It's quite simple. Just remove the permalink field! If you are calculating it then no need to store it in the struct.

If you do need the field to be there (ex you serialise it with serde), then create a method called new that takes everything but the permalink, construct your permalink there, then return a new object.

Your permalink method can now just be self.permalink.to_string()

P.S. in the second case I'd recommend to change the return type of self.permalink() to &str. It avoids unnecessary cloning of the string.

[–] [email protected] 7 points 1 day ago

For a second I thought it was the Linux comunity

[–] [email protected] 5 points 1 week ago* (last edited 1 week ago)

I wouldn't mind having a explanation of what you want to do instead of the code. It's not quite clear what you mean.

Anyways, what you want is to transform an iterator (your Select) into an iterator of Option?

For that, there's multiple ways but here's the simplest:

link_nodes.map(|node| node.value().attr("href").to_string())

Essentially, for each elements, we execute a closure (arrow function in JavaScript) that transform the node into your href string.

P.S. can't guarantee it works, I don't know what this "Select" type is, and I'm programming on mobile

[–] [email protected] 2 points 1 week ago (1 children)

And in the porygon episode (sort of)

[–] [email protected] 7 points 1 week ago

2 wins, 1 loss

Saving the bees is nice, and it prevent meta to expand their ai for longer

But this means that it's one nuclear reactor less, and possibly dirtier energy is used

[–] [email protected] 127 points 1 week ago (1 children)

And in my mind "CE" is "Clear everything". I'm keeping OP's method

[–] [email protected] 6 points 2 weeks ago (1 children)

They also accept pulling the power cord out as "oh no" and shutdown for you!

[–] [email protected] 1 points 2 weeks ago

I didn't know it was native too!

[–] [email protected] 4 points 3 weeks ago

True, but my joke wasn't meant to be scientifically accurate at all. We have a genie here. They don't care about science. Apart from monkey paw science

[–] [email protected] 4 points 3 weeks ago (3 children)

0 is the freezing point of water 50 is the boiling point.

If it's 30°c outside, it will be only be 15 after the wish, thus fit what the character said

[–] [email protected] 67 points 3 weeks ago* (last edited 3 weeks ago) (9 children)

Granted. Celsius now range from 0 to 50

Edit: ... or whatever unit you prefer. It's still the same

 

I got an home server that is running docker for all my self hosted apps. But sometimes I accidentally trigger Earlyoom by remotely starting expensive docker builds, which kill docker.

I don't have access to my server outside of my home network, so I can't manually restart docker in those situations.

What would be the best way to restart it automatically? I don't mind doing a full system restart if needed

 

I am looking for an alternative to Easy Effects for windows. It works really well on my Linux machine, but I want something for my work machine that runs windows.

Any suggestions? I don't need all the filters, but at least something to correct the awful bass

 

I got a Zephyrus Duo laptop with Windows 10 and Linux mint dual booted. I've recently heard about Nobara, and I'd want to distro hop to it as it has all my daily apps, more recent drivers, and good Nvidia support. It would replace my linux mint partition.

Thing is, my laptop came in with windows bitlocker, and secure boot. The former isn't really an issue as both OS would be on different drives. But the latter prevents me to boot Nobara as it's a unsigned distro.

I'm wondering about whether I should sacrifice secure boot for Nobara, and if I should, how to deal with windows being bitlocked.

I don't really use windows anymore but I do still need it, so no, I won't uninstall it.

Any help and tips ?

view more: next ›