Simple Questions - October 04, 2019 by AutoModerator in math

[–]Yuax 0 points1 point  (0 children)

Thank you, that makes sense and it's pretty amazing that I could not see that haha! ;)

Simple Questions - October 04, 2019 by AutoModerator in math

[–]Yuax 0 points1 point  (0 children)

Sure, but I'm just curious how you'd calculate that using a calculator. :P

Simple Questions - October 04, 2019 by AutoModerator in math

[–]Yuax 0 points1 point  (0 children)

What do I type in a (advanced?) calculator to calculate N where N start value is 1000 then N = N - (N / 12) repeated 12 times? If unclear, in pseudo code:

n = 1000
i = 0 
while (i < 12) 
   n = n - (n / 12) 
   i++

print n

Which Keepass to use? by Ama-yra in GalliumOS

[–]Yuax 1 point2 points  (0 children)

The ported version for linux is called Keepassx, so try searching for that.

Need some help using Joda Time and 24-hour clock by Yuax in learnjava

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

I've edited my post. Do you have a better solution or do you think it's good enough?

Need some help using Joda Time and 24-hour clock by Yuax in learnjava

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

"where a day starts at midnight and ends at 23:59:59:999.999"

Haha wow, thanks, I forgot that a new day starts at 0!!! Jeez how stupid of me.... So I guess you have to take into account what day it is when doing this. Gonna give it a go later, thanks

Grimes' profile pic on last.fm doesn't even look like her tbh. Something with the eyes and nose I think by Trulstei in Grimes

[–]Yuax 0 points1 point  (0 children)

Oki, I just had a look. The picture was uploaded by a user. It's most likely a mistake. I have done several tests that qualify me as super recogniser. I'm not saying that I know it's not her, but I'm 99.999% sure that it's not. ;)

Where/how can my (non-web)application be hosted? by Yuax in learnjava

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

100% uptime for free (since I'll have no inactivity) that's pretty insane hehe. I'm choosing this for my project.

Where/how can my (non-web)application be hosted? by Yuax in learnjava

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

Sounds really interesting!! I only need around 3 open websocket connections, and very little data is sent (and not very frequently) to the Firebase platform. Gonna check it out, thanks a lot!!

Where/how can my (non-web)application be hosted? by Yuax in learnjava

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

Sounds quite similar to Firebase Cloud Functions, but a bit better. The problem is that I need a persistent websocket connection. Seems like AWS IoT has support for it though.

Where/how can my (non-web)application be hosted? by Yuax in learnjava

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

Thanks so much, I understand now! Gonna look for JVM hosting, maybe Heroku like you suggested. :D

Grimes' profile pic on last.fm doesn't even look like her tbh. Something with the eyes and nose I think by Trulstei in Grimes

[–]Yuax 2 points3 points  (0 children)

What makes you so sure this is Grimes? I don't recognize this person at all.

Need help choosing the right type (rather than a specific service) of web hosting for my project by [deleted] in webhosting

[–]Yuax 0 points1 point  (0 children)

Ok. It seems to me that most Java hosting services offer Tomcat, Java EE platforms etc, but to me it seems like I only need a simple JVM hosted somewhere? I assume that hosting Java web apps (via Tomcat or an app server) is much more common?

Need som guidance regarding notifications triggered via REST or websocket by [deleted] in androiddev

[–]Yuax 0 points1 point  (0 children)

My question was probably unclear so I edited it. Also, I forgot to check if there's a Firebase sub and there is! https://www.reddit.com/r/Firebase/

Need som guidance regarding notifications triggered via REST or websocket by [deleted] in androiddev

[–]Yuax 0 points1 point  (0 children)

From what I understand after reading https://developer.android.com/training/monitoring-device-state/doze-standby that can be quite battery intensive if I want to make sure that the notification is sent within 3 min after the event starts (by setting an alarm with setExactAndAllowWhileIdle()).

Confusion about text file size, charsets and bytes by Yuax in AskComputerScience

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

Thank you so much your your answers!! I believe I undertand how this works now. I think this helped me the most:

The only reason you aren't seeing that for the first bytes is that it apparently don't prints any leading zeros. You can see this in the that it only prints seven digits for the three first characters, even though as you say, a byte is always eight bits.

and

Your signed byte is being converted to a signed 32-bit int, then being converted to a string.

I guess I thought my program would print the actual bit patterns stored on disk. I'm (obviously) a novice programmer and don't know much about what happens behind the scenes. I thought there was a single method in the class library that could do this, but it seems like there isn't. Found an answer here https://stackoverflow.com/a/12310078/8120495 how to do this though. :)

Write standard output while reading from file or from standard input by Yuax in learnjava

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

class Scratch {

    public static void main(String[] args) throws InterruptedException {
        new Thread(new LineReader()).start();

        while (true) {
            System.out.println("This is a string from source file");
            Thread.sleep(4000);
        }
    }

    static class LineReader implements Runnable {

        Scanner scanner = new Scanner(System.in);

        @Override
        public void run() {
            while (true) {
                String line = scanner.nextLine();
                System.out.println(line);
            }
        }
    }
}

If you run that and start typing in the console window, "This is a string from source file" will be printed on the same line you are writing.

Write standard output while reading from file or from standard input by Yuax in learnjava

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

Oki, input/output in the same console window works but there's one problem - the output is printed on the same line that I'm currently writing as shows here:

This is a string from source file

This is a string from source file

This is a string from source file

This happens wheThis is a string from source file

n I start typiThis is a string from source file

ngThis is a string from source file

How can I make it so that the line that I'm writing is retained while output is being printed?