Acters

joined 2 years ago
[–] Acters@lemmy.world 2 points 1 week ago

My sister has that snap 4 luxe type item from Amazon and it definitely has such a strong magnet that even attached to the case, it will stay stuck on the wireless charger haha, but I doubt the peltier cooling as effective at keeping it cool because the case is quite thick with snap 4 luxe increasing thickness too. While for my case less phone with only the slim magsafe ring, it is working really effectively at cooling the phone.

I tried those slim frameless cases that had a magsafe ring embedded, too. Unfortunately they were a complete failure. One issue is that they break on the corner that has the S-pen, and one case in particular would fail to stay attached on the phone properly. I wish they were made properly but they were epic fails.(The other case had a metal plate for the magsafe notch, fails at preventing product from twisting)

I looked at those frameless types but they are made of metal and would affect wireless performance. on top of that the design made me feel uneasy.

[–] Acters@lemmy.world 34 points 1 week ago (1 children)

Ah but that means they will have to think about driving instead of going on autopilot

[–] Acters@lemmy.world 2 points 1 week ago

I personally went without a case myself and also decided against putting anything on the phone except the ESR magnetic ring to make my s25 ultra able to attach to magsafe products.(Small dab of Loctite glass glue to keep it from popping off with the magsafe products or just slide off the product instead of straight popping it off)

I agree on it helping the phone keep cooler without the case. I even got one of those peltier cooling qi2 wireless chargers to make the phone extra cool when I am driving.

Its a bit annoying to think a bit more on where I place my phone down or holding it but at least I am making sure I am using the phone and placing it in places that will not lose it.

[–] Acters@lemmy.world 2 points 1 week ago

I am thinking of the nothing CMF phone 2 rn

[–] Acters@lemmy.world 2 points 1 week ago* (last edited 1 week ago) (2 children)

Get the loctite glass glue and place a few dots around to help with adhesion but nott too much that it is permanent when you want to remove it.

I personally sprung for the ESR magsafe hololock ring because I wanted it to be as flush as possible on my Samsung S25 Ultra. Being slim but still help with attaching to magsafe products is nice, especially since I live in a place that gets hot, I bought a qi2 car charger that has a peltier cooling unit in it. Phone is ice cold when I slide it off the charger

Side note:
popping it perpendicular to the surface has shown me that without the loctite glass glue, the ESR magnet ring will stay on the charger. So I just make sure to slide it off horizontally.

[–] Acters@lemmy.world 1 points 1 week ago

Wait doesn't the cyber truck had an issue where it was possible for it to rust? Not to mention the unreasonably large glass windshield that would be expensive to replace?

[–] Acters@lemmy.world 1 points 1 week ago

What's nice about no one adhering to rules is that people who break them usually end up dead or without a car. Self healing in a way, real unfortunate for anyone else who might have to deal with your shitty decisions.

[–] Acters@lemmy.world 1 points 1 week ago

I already am, don't worry, plenty of people like to ride my ass, even when we can't go any faster.

[–] Acters@lemmy.world 1 points 1 week ago

That is pretty significant difference between what I had experienced, i guess not much more mpg for your vehicle for you vs my own eco vehicle. sorry your car doesn't experience more efficiency gains. I am good where I am at. My suggestion wasn't to stop you from achieving what would be higher speeds but rather you will feel the gas pedal be much harder to push. That is all

[–] Acters@lemmy.world 1 points 1 week ago (2 children)

We are now discussing what ifs, and honestly that is valid. Still not worth it in my book. Rather blame the traffic controllers who don't check to make sure all cars are going through the light or straight up there is just too much traffic which isn't solved by everyone driving 75+ MPH. It is solved if we instead offer better public transportation. At the end of the day we have different views here. I firmly believe in my own and do not think it is going to change anytime soon.

[–] Acters@lemmy.world 1 points 1 week ago

I was assuming the 15 time savings is two way, or else 120 miles one way is just insane and abnormal to expect from others. He can go cry me a river.

[–] Acters@lemmy.world 1 points 1 week ago* (last edited 1 week ago)

It is just plain math, we all living with what we can do. If you are stuck with gas, I hope you can save up cash for a house. My sister finds houses for rent that are about the same rental cost as an apartment. I also found apartments that have a garage for me to park into. Similar rent cost but added 150/m probably not going to save money on gas but at least there are options my family has found to accommodate our needs.

At the end of the day, driving electric or riding my bike, I save enough cash that I am able to save 150 to 300 a month.

 

hi I know this is a year old, but I solved it and used a custom implementation of binary search to solve this.
interestingly enough, in python at least, it is almost as performant as the quadratic equation for solving this lol (43.7 microseconds vs 64.9 microseconds) but now that I realized it is a simple parabola, you can just get the maximum after getting the minimum time and practically matches the quadratic equation performance. lol I know the math is faster as search space grows but I still think its interesting how performant this was.

TLDR: I'm so data structures and programming pilled that I forgot basic algebra.

code

from os.path import dirname,realpath,join

def profiler(method):
    from time import perf_counter_ns
    def wrapper_method(*args: any, **kwargs: any) -> any:
        start_time = perf_counter_ns()
        ret = method(*args, **kwargs)
        stop_time = perf_counter_ns() - start_time
        time_len = min(9, ((len(str(stop_time))-1)//3)*3)
        time_conversion = {9: 'seconds', 6: 'milliseconds', 3: 'microseconds', 0: 'nanoseconds'}
        print(f"Method {method.__name__} took : {stop_time / (10**time_len)} {time_conversion[time_len]}")
        return ret
    return wrapper_method

def binary_search(low_point, high_point, record_distance,record_time,min_or_max):
    if min_or_max == 'min':
        # custom binary search algorithm for minimum charge time to surpass the target distance
        while low_point < high_point:
            mid = (low_point + high_point)//2
            if ((record_time - mid) * mid) > record_distance:
                # if it is valid then we mark it as the high_point and continue searching
                high_point = mid
            else:
                # if it is not valid then we check if the next number up is valid and that should be the minimum time
                if ((record_time - mid + 1) * (mid + 1)) > record_distance:
                    return mid + 1
                # else we continue searching
                low_point = mid + 1
    elif min_or_max == 'max':
        # custom binary search algorithm for maximum charge time to surpass the target distance
        while low_point < high_point:
            mid = -((low_point + high_point)//-2) # math trick to do ceiling division
            if ((record_time - mid) * mid) > record_distance:
                low_point = mid
            else:
                # if it is not valid then we check if the next number down is valid and that should be the maximum time
                if ((record_time - mid + 1) * (mid + 1)) > record_distance:
                    return mid - 1
                # else we continue searching
                high_point = mid - 1

@profiler
def solver(input_str: str) -> tuple[int,int]:
    part_1_solve = 1
    for record_time,record_distance in zip( *[ [ int(number) for number in line.split()[1:] ] for line in input_str.split('\n') ] ):
        minimum_time = binary_search(0,record_time//2,record_distance,record_time,'min')
        # maximum_time = binary_search(record_time//2,record_time,record_distance,record_time,'max') # before I realized it was parabola lmao
        maximum_time = record_time - minimum_time
        part_1_solve *= maximum_time - minimum_time + 1

    # part 2
    # instead of splitting the numbers into multiple pairs, we will just remove the spaces and have one pair of numbers for time and distance.
    record_time,record_distance = [ int(line.replace(' ', '').split(':')[1]) for line in input_str.split('\n') ]
    minimum_time = binary_search(0,record_time//2,record_distance,record_time,'min')
    # maximum_time = binary_search(record_time//2,record_time,record_distance,record_time,'max') # before I realized it was parabola lmao
    maximum_time = record_time - minimum_time
    part_2_solve = maximum_time - minimum_time + 1

    return part_1_solve,part_2_solve

if __name__ == "__main__":
    BASE_DIR = dirname(realpath(__file__))
    with open(join(BASE_DIR, r'input'), 'r') as f:
        input_data = f.read().replace('\r', '').strip()
    result = solver(input_data)
    print("Part 1:", result[0], "\nPart 2:", result[1])

view more: next ›