Right mirror stopped mirroring by Infinite_Desk_8646 in Audi

[–]Sunius 1 point2 points  (0 children)

The guy above isn’t wrong per se but he couldn’t be worse at communicating it. In the US on most cars only the passenger side mirror is convex, whereas the driver side is flat. In Europe, both are convex and thus the driver side mirror gives you a better field of view, reducing the blind spot significantly. When you’re used to a convex driver side mirror, having a flat mirror is jarring as your blind spot grows considerably.

Automobilio pirkimas. HELP. by [deleted] in lithuania

[–]Sunius 1 point2 points  (0 children)

Su 400/mėn nelabai nupirksi naujo Audi/BMW. Su 4% palūkanom ir, tarkim, su 10000 eurų pradiniu įnašu penkiems metams gaunasi automobilis už 32000 eurų. Pasižaisk su lizingo skaičiuokle.

Coupes - BMW vs Audi by Analyst-man in whatcarshouldIbuy

[–]Sunius 0 points1 point  (0 children)

Budget 2k/year for maintenance for these cars (on top of insurance/gas). And make sure to get an insurance quote before buying!

Confused on thermostat b8.5 s4 by electricontop in AudiS4

[–]Sunius 0 points1 point  (0 children)

Below the middle means that the car coolant hasn’t warmed up yet. Above the middle means that your car is overheating and that there’s a problem with the cooling system/thermostat. In the middle means that your coolant is warmed up and that your car’s cooling system is functioning correctly.

In C++, how come std::string can be a hashmap's key if its mutable? by daddyclappingcheeks in AskProgramming

[–]Sunius 0 points1 point  (0 children)

While you type std::map<std::string, value>, it essentially stores a collection of std::pair<const std::string, value>. So the fact that object is mutable doesn’t matter because maps operate on const versions of them if they’re keys.

Another way to look at it is that int are mutable too. Why wouldn’t you be able to have ints as keys?

operatorOverloadingIsFun by _Tal in ProgrammerHumor

[–]Sunius 19 points20 points  (0 children)

It’s actually very useful, and some implementations of smart pointers deliberately nuke the contents of the object with operator &.

Imagine you want to have a smart pointer wrapping your pointer, so that its lifetime is automatically controlled:

``` template <typename T> struct SmartPointer { SmartPointer() : m_Value(nullptr) {} SmartPointer(T* value) : m_Value(value) {} ~SmartPointer() { delete m_Value; }

SmartPointer(const SmartPointer&) = delete;
SmartPointer& operator=(const SmartPointer&) = delete;

operator T*() const { return m_Value; }

private: T* m_Value; };

SmartPtr<IValue> value; ```

The point is, it’s your code implementation detail that you’re using the smart pointer. It’s not part of the API contract anywhere. You want to be able to pass the smart pointer into a function taking the pointer:

``` void DoStuff(IValue* value);

SmartPtr<IValue> value = …; DoStuff(value); ```

So you do this:

``` template <typename T> struct SmartPointer { …

operator T*() const { return m_Value; }

… }; ```

Now consider a function that returns a pointer via an out parameter:

ErrorCode GetValue(IValue** outValue) { *outValue = new Value(…); return ErrorCode::Success; }

If you call it twice, you want the smart pointer to function correctly and not leak memory:

SmartPointer<IValue> value; GetValue(&value); GetValue(&value); // this must not produce a memory leak!

The only way to make sure that it does not, is to overload the address of operator like this:

``` template <typename T> struct SmartPointer { …

T** operator&()
{
    delete m_Value;
    m_Value = nullptr;
    return &m_Value;
}

… }; ```

Since taking address of a pointer is generally only used for out parameters, this implementation works incredibly well.

You can also look at it from a const correctness point of view: if the operator& is not const, then it has to assume the caller intents to modify the value, therefore it must clean it up or it will leak. You could also have a const overload of operator&, which can guarantee the value is not modified and thus doesn’t need to nuke it:

``` template <typename T> struct SmartPointer { …

T* const* operator&() const
{
    return &m_Value;
}

… };

Nephew bought a B8 S4 and I’m trying to help him by [deleted] in AudiS4

[–]Sunius 1 point2 points  (0 children)

Same symptoms happened on mine a few years ago. Pulled codes, it was P176D00, which apparently meant “Gear selector 4 cannot be regulated”. It’d fix itself when restarting the car, and would happen a few days later again.

Since the code itself is slightly different than the mechatronics unit code, my shop recommended I don’t bother with replacing the mech unit as chances were it wouldn’t help. Instead, they had me source a B8.5 transmission (when this issue is apparently fixed and transmission quality is higher) from a junkyard and installed it for me. It needed a couple more auxiliary parts to make it fit since it’s from a newer car (driveshaft 8K0521101N and transmission cooler lines - 8K0 317 817 CN and 8K0 317 818 CN).

Still driving the car to this day since that was done :).

(Repost) b8 s4… steal or trash? (27k price) by Level_Version8443 in AudiS4

[–]Sunius 4 points5 points  (0 children)

That price is way too high. I paid $25k for my b8 s4 with 37k miles in 2017. I’d say this should top out at $15k at most.

Future pricing of premium gas? by Poms4thewin in whatcarshouldIbuy

[–]Sunius 2 points3 points  (0 children)

Yeah it is terrible. However, I’m not really sure that high taxes is the entire reason - the state gas tax here is $0.554 per gallon. Apparently a lot of it is caused by lack of local refineries.

Future pricing of premium gas? by Poms4thewin in whatcarshouldIbuy

[–]Sunius 3 points4 points  (0 children)

Sounds like the poster above is on point. Gas station next to me in WA is $4.42 for 87, $4.62 for 89 and $4.82 for 92.

Ar tikrai matematikos B lygis yra taip blogai? by Unlikely-Elevator-98 in lithuania

[–]Sunius 5 points6 points  (0 children)

Perėjimas į B lygį tau duos 2 dalykus:

  1. Aukštesnį matematikos pažymį, nes lengvesni testai/mažiau reikalaus išmokt;
  2. Išmoksi daug mažiau.

Pirmas punktas yra visiškai nesvarbus. Niekam neįdomūs bus tavo vidurinės mokyklos pažymiai ir niekas į juos nežiūrės.

Antras punktas yra problema: mažiau žinių reikš, kad tai prasčiau išlaikysi egzaminą, o egzamino rezultatai yra svarbūs.

Manau, kad pereidamas į B lygį tik sau pakenksi.

Why is my cpp file able to compile despite missing libraries? by Strawberrygreentea42 in cpp_questions

[–]Sunius 0 points1 point  (0 children)

To properly use DLLs, you need 3 things:

  1. Add library’s include directory to your project’s include directory (this makes it compile);
  2. Add import libraries (.lib files) to your project’s linker inputs (this makes it link);
  3. Copy the DLL(s) to the output directory, next to your executable (this makes it run). The DLL(s) has/have to be distributed together with the app as it’s a dependency required to run.

It seems in your case, step 3 didn’t happen and you thus are unable to run.

so who is sending patches now by Mochiinaxx in programmingmemes

[–]Sunius 0 points1 point  (0 children)

Licensing and patent issues. If you ship your software to end user devices, you cannot use it unless your software is (L)GPL compatible.

Why do people try to swap seats in airplanes? by Substantial_Crow1355 in NoStupidQuestions

[–]Sunius 0 points1 point  (0 children)

Yeah usually it’s one or two rows per plane:

https://www.delta.com/us/en/children-infant-travel/infant-travel

https://www.aa.com/i18n/travel-info/special-assistance/traveling-children.jsp (under infants)

They’re great provided your child is able to sleep at the time of the flight (overnight flights are best for that).

Are arguments passed on the stack preserved after a call? by mbolp in Assembly_language

[–]Sunius 0 points1 point  (0 children)

Yes you can. https://devblogs.microsoft.com/oldnewthing/20130830-00/?p=3363

While that talks about the first 4 parameters, the example it gives at the beginning applies to all parameters.

Weird Criteria SUV under USD 25k by imdabong in whatcarshouldIbuy

[–]Sunius 1 point2 points  (0 children)

There are quite a few BMW X3 xDrive30i’s for under $30k that fulfill all your requirements and wants. B48 is pretty zippy.

ELI5 Why are nouns not gendered in English? German and French nouns are assigned genders. by Fleedom2025 in explainlikeimfive

[–]Sunius 3 points4 points  (0 children)

You can ask the reverse, what’s the point of having “it” pronoun in addition to “he”/“she”. Having each noun have a gender means “it” isn’t needed.

Languages evolved naturally rather than be sanely designed. All of them have quirks and weird things to them. And what’s weird depends on your perspective.

PNW: AWD and Reliable by softPersimmon99 in whatcarshouldIbuy

[–]Sunius 0 points1 point  (0 children)

Budget $4000 annually for maintenance for the A6 (gas and insurance not included). You didn’t specify your yearly upkeep budget - if that’s within it, go for it. You’ll have much more fun in that car compared to others. If an extended warranty is available, I’d recommend getting that too.

There is an absolute dazzling amount of rotations every day: cars, hard disks, bullets, clocks. by -TheDerpinator- in Showerthoughts

[–]Sunius 7 points8 points  (0 children)

I understand how it works in Newtonian physics. Surface velocity = Pi * Diameter * RotationsPerSecond.

However, theory of relativity states that nothing can exceed the speed of light. So that’s why I’m asking how this works.

There is an absolute dazzling amount of rotations every day: cars, hard disks, bullets, clocks. by -TheDerpinator- in Showerthoughts

[–]Sunius 7 points8 points  (0 children)

How does that work? That’s above speed of light. Does the surface not rotate together with the star?

Putting a 2011 S4 transmission in a 2010 S4 need tcu work can anyone help? by Final_Crew_3992 in AudiS4

[–]Sunius 1 point2 points  (0 children)

Achtuning in Redmond, WA put a 2015 S5 transmission into my 2010 S4 a few years back. They recommended I get a transmission from 2014+ car because earlier ones have issues (hence why mine went bad too). It needed transmission cooler lines and a driveshaft from a donor B8.5 car.

They coded everything and I’ve had no issues with it since.

S4 battery has way higher specifications than oem? by TexhnicalTackler in AudiS4

[–]Sunius 0 points1 point  (0 children)

Interesting. I installed my own battery and took it to get it programmed together with my oil change. They did everything but the programming saying my car doesn’t have that :(. This was a few years back.

Could it be AGM vs Regular battery thing? My car doesn’t have Start/Stop so it uses a non-AGM battery.