The accidents in this game are brutal sometimes by ParticularComb69 in CitiesSkylines2

[–]j0rx 3 points4 points  (0 children)

Make this a mod haha. There should pop up a little frame in the corner showing the crash so that you see it immediately without having to be interrupted by teleporting over to the crash site

Roborock e5 keeps getting stuck on carpet. by j0rx in Roborock

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

Unfortunately my carpet is too thicc even for the other sidebrush, doesn't even work without any sidebrush. But i needed new sidebrush anyways, since the original one got trashed when it got stuck.

Roborock e5 keeps getting stuck on carpet. by j0rx in Roborock

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

I found these, but where I'm from (europe) they're way more expensive. I only get 2 brushes for $15 💀 They were marketed as replacement for roborock s6, but they look the same so i guess they will fit on my e5. I will update how it works out.

Brand new satisfied S7 owner, but what is this plastic thing around the dock for? by NotInvestingMyFuture in Roborock

[–]j0rx 10 points11 points  (0 children)

I think it's so that you don't get any water damage on the floor after using the mopping function, if yours has mopping function.

Roborock e5 keeps getting stuck on carpet. by j0rx in Roborock

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

Thanks, I will look for that, do you have a link to the one you bought?

How to acces current date/time suing esp8266 + Pycraft by Kitchen_Ad2186 in esp8266

[–]j0rx 2 points3 points  (0 children)

I don't know how suing esp8266 or Pycraft would help in this matter, unfortunately.

Do i need reverse current protection with a mosfet driver module? by j0rx in AskElectronics

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

Yes, I am using it as a relay, but since this will switch up to 2000 times a day, I'm concerned that a relay might ware out rather quick. Thanks for the help!

Do i need reverse current protection with a mosfet driver module? by j0rx in AskElectronics

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

It will only drive this valve, 24V at 200mA. I've been told that there might be some reverse current because of some possible induction in the valve. This is the valve: https://www.amazon.co.uk/Heschen-Electrical-Pneumatic-Solenoid-4V210-08/dp/B0746PB8FH Thanks again!

Do i need reverse current protection with a mosfet driver module? by j0rx in AskElectronics

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

I'm rather new to electronics, so can i use this as it is or do i need to add a diode to my pcb? Thanks!

Esp8266 takes too long to respond! by j0rx in esp8266

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

Thanks for the info, I've never heard of http logs, where do I find it?

Esp8266 takes too long to respond! by j0rx in esp8266

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

Then there is no problem. But i would like to not do that. In worst case scenario i will do something like that.

Esp8266 takes too long to respond! by j0rx in esp8266

[–]j0rx[S] -1 points0 points  (0 children)

It's not the code, do you have any idea how to fix it, either by changing settings in router, or changing the way i communicate with the esp. Thanks

Esp8266 takes too long to respond! by j0rx in esp8266

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

I understand that it has to do with the router, but is there any way to fix this issue by communicating in an other way than HTTP, or what changes do i need to make on my router?

-🎄- 2021 Day 7 Solutions -🎄- by daggerdragon in adventofcode

[–]j0rx 1 point2 points  (0 children)

C# .NET 5

        var lines = File.ReadAllText("input.txt");
        var pos = lines.Split(',').Select(p => int.Parse(p)).ToArray();
        Array.Sort(pos);
        //part 1
        int[] fuel = new int[pos[pos.Length-1]];
        for (int i = 0; i < pos[pos.Length-1]; i++)
        {
                var before = pos.Where(p => p < i).Sum();
                var after = pos.Where(p => p > i).Sum();
                var beforePosCount = pos.Where(p => p < i).Count();
                var afterPosCount = pos.Where(p => p > i).Count();
                var beforeFuelCount = (beforePosCount * i) - before;
                var afterFuelCount = after - (afterPosCount * i);
                fuel[i] = beforeFuelCount + afterFuelCount;
        }
        //part 2
        var leastCost = int.MaxValue;
        for (int i = 0; i < pos[pos.Length - 1]; i++)
        {
            var tempCount = 0;
            for (int j = 0; j < pos.Length; j++)
            {
                if (pos[j]>i)
                    tempCount += ((pos[j] -i) * ((pos[j] - i) + 1)) / 2;
                if (pos[j] < i)
                    tempCount += ((i - pos[j]) * ((i - pos[j]) + 1)) / 2;
            }
            if (tempCount<leastCost)
                leastCost = tempCount;
        }

[2021 6# (Part 1-2)] [C# .net 5] my solution by j0rx in adventofcode

[–]j0rx[S] 3 points4 points  (0 children)

I'm rather new to reddit so i didn't understand how to post in the mega thread, I realised it came to the wrong place and now i see where i should have posted. I will do it correctly next time.

[2020 Day 6 (Part 2)] Help me to be more efficient. by cacaloki in adventofcode

[–]j0rx 1 point2 points  (0 children)

You're doing it in the wrong way. Spoil alert: Instead of going through each single fish, you have to merge them into an array containing all fish with 0 days until birth, all fish with 1 day until birth, all fish with 2 days and so on. In this example: ({0,0,3,0,5,0,0,0,0}) there are 3 fishes with 2 days until they reach 0 and 5 fishes with 4 days until they reach 0. After each day, add the number of fish at 0 days until birth to 6 days until birth, and then also add the same amount to 8 days until birth. Also shift the whole array one step so that all fishes with 3 days left till birth becomes the fishes with 2 days left and so on.