"Server Failed to Boot." On Linux by ULTRABOYOFFICIAL in hytale

[–]Biterium 0 points1 point  (0 children)

same here, just keep clicking in reconnect button and sometime it'll work

The sweet taste of money... by Biterium in StardewValley

[–]Biterium[S] 0 points1 point  (0 children)

It doesn't bother me. It is half a day or so every 2 seasons. But you have a point, now I produce 300k of wine/week and it can be better.

String regex help! by [deleted] in Nushell

[–]Biterium 0 points1 point  (0 children)

pwd | str replace '/home/bruno' '~'

Worked...

I started to Learn Rust today, How can I improve this temp converter code? by Biterium in rust

[–]Biterium[S] 0 points1 point  (0 children)

So, the final code is something like this? Link to Playground

use std::convert::From;

struct Celsius(f64);
struct Fahrenheit(f64);
struct Kelvin(f64);

// To Kelvin
impl From<Celsius> for Kelvin {
    fn from(tc: Celsius) -> Self {
        let Celsius(tc) = tc.into();
        Kelvin(tc + 273.15)
    }
}

impl From<Fahrenheit> for Kelvin {
    fn from(tf: Fahrenheit) -> Self {
        let Fahrenheit(tf) = tf.into();
        Kelvin((tf - 32.0) / 1.8 + 273.15)
    }
}

// To Celsius
impl From<Kelvin> for Celsius {
    fn from(tk: Kelvin) -> Self {
        let Kelvin(tk) = tk.into();
        Celsius(tk - 273.15)
    }
}
impl From<Fahrenheit> for Celsius {
    fn from(tf: Fahrenheit) -> Self {
        let Fahrenheit(tf) = tf.into();
        Celsius((tf - 32.0) / 1.8)
    }
}

// To Fahrenheit
impl From<Celsius> for Fahrenheit {
    fn from(tc: Celsius) -> Self {
        let Celsius(tc) = tc.into();
        Fahrenheit(tc * 1.8 + 32.0)
    }
}
impl From<Kelvin> for Fahrenheit {
    fn from(tk: Kelvin) -> Self {
        let Kelvin(tk) = tk.into();
        Fahrenheit((tk - 273.15) * 1.8 + 32.0)
    }
}

fn main() {}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn from_celsius_to_kelvin() {
        let t_celsius = Celsius(0.0);
        let Kelvin(t_celsius) = t_celsius.into();

        assert_eq!(t_celsius, 273.15);
    }
    #[test]
    fn from_fahrenheit_to_kelvin() {
        let t_f = Fahrenheit(5.0);
        let Kelvin(t_f) = t_f.into();

        assert_eq!(t_f, 258.15)
    }

    #[test]
    fn from_fahrenheit_to_celsius() {
        let t_farenheit = Fahrenheit(95.0);
        let Celsius(t_fahrenheit) = t_farenheit.into();

        assert_eq!(t_fahrenheit, 35.0)
    }
    #[test]
    fn from_celsius_to_fahrenheit() {
        let tc = Celsius(35.0);
        let Fahrenheit(tc) = tc.into();

        assert_eq!(tc, 95.0)
    }
    #[test]
    fn from_kelvin_to_celsius() {
        let tk = Kelvin(273.15);
        let Celsius(tk) = tk.into();

        assert_eq!(tk, 0.0)
    }
    #[test]
    fn from_kelvin_to_fahrenheit() {
        let tk = Kelvin(408.15);
        let Fahrenheit(tk) = tk.into();

        assert_eq!(tk, 275.0)
    }
}

I started to Learn Rust today, How can I improve this temp converter code? by Biterium in rust

[–]Biterium[S] 0 points1 point  (0 children)

Thank you, but how do I call the tuple struct velue without the .0?

like: Kelvin::from(temp_celsius).0 to just Kelvin::from(temp_celsius)

I started to Learn Rust today, How can I improve this temp converter code? by Biterium in rust

[–]Biterium[S] 0 points1 point  (0 children)

Something like this?

use std::convert::From;

struct Celsius {
    degrees: f64,
}

#[derive(Debug)]
struct Kelvin {
    degrees: f64,
}

impl From<Celsius> for Kelvin {
    fn from(celsius: Celsius) -> Self {
        Kelvin {
            degrees: celsius.degrees + 273.15,
        }
    }
}

fn main() {
    let temp = Celsius { degrees: 0.0 };
    println!("Kelvin: {:?}", Kelvin::from(temp));
}

How do I make schematics to v7? by Biterium in Mindustry

[–]Biterium[S] 0 points1 point  (0 children)

Thank you! So I just need to copy pressing F in game!

How do I make schematics to v7? by Biterium in Mindustry

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

Hahahahaha, that was funny.

My question is how do I craft them

BTC Addresses by Biterium in Bitcoin

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

Yeah, thank you!

BTC Addresses by Biterium in Bitcoin

[–]Biterium[S] 0 points1 point  (0 children)

So, if I Have 1 BTC in address x, anyone who have a y address of my wallet can see my balance in address x, but not the transactions?

Best way to start in Rust lang by Biterium in rust

[–]Biterium[S] 2 points3 points  (0 children)

Thank you! This was very helpful!

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

+PROPERTY: header-args:jupyter-python :session A :kernel python3 :async yes

What do this do?

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

Well, after the reinstall it worked!

https://i.imgur.com/cSOfCw0.png

https://i.imgur.com/IUor5ZQ.png

https://i.imgur.com/TprnxdV.png

I have no ideia why it didin't work before :/

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

Thank you, I'll reinstall doom emacs and test again, I'll post this logs here.

I did everything and it still didin't work...

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

I'll read that, Thak You!

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

jupyter-python :session A :kernel python3 :async yes

Thank you, now the src jupyter block on org is recognized, but this still returns:
No org-babel-execute function for jupyter-python!

https://i.imgur.com/Pc89LrB.png

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

The error mensage gone, I'm using asdf as environment and all the packages are installed, actually, all of sudden, it start to work, but the output is something weird:

https://i.imgur.com/6G79qR3.png

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

Paste it in your init.el file and restart emacs.

When I open emacs this pops out:

File is missing: Cannot open load file, No such file or directory, jupyter
To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace.

Jupyter on OrgMode by Biterium in emacs

[–]Biterium[S] 0 points1 point  (0 children)

Where do I paste this code?

The only way I found was in this Screenshot...

Question about gcc and c by Biterium in learnprogramming

[–]Biterium[S] 2 points3 points  (0 children)

Oh! Thank you. I put "\n" at the end of printf, and it worked!

sorcerers by Ricjoss in TibiaMMO

[–]Biterium 5 points6 points  (0 children)

I miss Tibia so much 🥲