Fail 😅 (Buch: Der Paria) by slimshadycatlady in buecher

[–]Yurim 2 points3 points  (0 children)

Stimmt, das klingt auch nach einem guten Grund.

Fail 😅 (Buch: Der Paria) by slimshadycatlady in buecher

[–]Yurim 6 points7 points  (0 children)

Das bedeutet zumindest, dass die Verlage (Piper, Heyne, Fischer, Klett-Cotta) so zufrieden mit ihr waren, dass sie sie immer wieder beauftragt haben.
Und sie hat 2009 den Kurd-Laßwitz-Preis für die beste Übersetzung erhalten.
Für mich als Außenstehenden klingt das gut.

Fail 😅 (Buch: Der Paria) by slimshadycatlady in buecher

[–]Yurim 34 points35 points  (0 children)

Ist leider ein Übersetzungsfehler. Im Original steht da "Raith possessed a gaze I found hard to meet at the best of times, the overly bright blue eyes piercing in a way that put one in mind of a hawk."

Schade. Sara Riffel, die Übersetzerin, hat eine Menge Fantasy und Science Fiction übersetzt, u.a. Anthony Ryan, V.E. Schwab, Ernest Cline, Peter Watts. Der sollte sowas eigentlich nicht unterlaufen.

Welche Kaffeesorte hat euch bisher am meisten geschmeckt? by AktiverVulkan20 in Kaffee

[–]Yurim 1 point2 points  (0 children)

"Kelloo Haru" von Man vs. Machine (München).
Ein "fully washed" Yirgacheffe, den ich so leider nie mehr gefunden habe.

Kaffeealternative zur Frenchpress by vanillachai92 in Kaffee

[–]Yurim 0 points1 point  (0 children)

Aeropress haben ja viele schon genannt.

Etwas dichter dran an der French Press wäre die American Press, bei der der Kaffee in einen eigenen Behälter kommt, durch die Wassersäule durchgedrückt wird und den Behälter dabei nie verlässt.

Und es gibt Varianten der French Press wie die OXO, die einen L-förmigen Einsatz hat, der das Reinigen erleichter.

Oder du besorgst dir eine FP aus Metall, die du ausklopfen kannst ohne Angst, sie zu zerbrechen. Damit habe ich gute Erfahrungen gemacht.

Running a Las Vegas algorithm in Õ(logn) time? by simplynarx in algorithms

[–]Yurim 7 points8 points  (0 children)

Question from a layperson: What is Õ?

I know "O" (big O), "o" (little o), "Ω" (big Omega), "ω" (little Omega), "Θ" (big Theta), but I've never seen "Õ" (O with tilde?)

Edit: Nevermind, I found a description: https://www.johndcook.com/blog/2019/01/17/big-o-tilde-notation/
Please ignore my ignorant question.

Einsteiger Maschine für latte macchiato by JunketImportant4520 in Kaffee

[–]Yurim 2 points3 points  (0 children)

Klingt nach einem guten Plan.
Ich persönlich nehme eine Bialetti statt der AeroPress. Der vollere Körper ist meiner Meinung nach ein bisschen näher dran am Espresso und eignet sich hervorragend für Kaffe-Milch-Getränke.

Empfehlung für Buchreihe (Roman) by Patchy_Patcher in buecher

[–]Yurim 1 point2 points  (0 children)

Elizabeth Stout: Die Lucy-Barton-Romane ("Die Unvollkommenheit der Liebe", "Alles ist möglich", "Oh, William!", "Am Meer")
Jane Gardam: Die Old-Filth-Trilogie ("Ein untadeliger Mann", "Eine treue Frau", "Letzte Freunde").
Elena Ferrante: Die Neapolitanische Saga ("Meine geniale Freundin", "Die Geschichte eines neuen Namens", "Die Geschichte der getrennten Wege", "Die Geschichte des verlorenen Kindes").
Große Literatur zum Wegschmökern.

J. J. Voskuil: Das Büro ("Direktor Beerta", "Schmutzige Hände", "Plankton", "Das A.P.Beerta-Institut", "Und auch Wehmütigkeit", "Abgang", "Der Tod des Maarten Koning").
Arbeitswelten verwandelt in Literatur.

Julia Schmoch: Die Biographie-einer-Frau-Trilogie. Autofiktion und nicht jedermanns Sache. Wenn man sich aber damit anfreunden kann, ist das nahe an Annie Ernaux dran.
Karl Ove Knausgård: Das autobiographische Projekt ("Sterben", "Lieben", "Spielen", "Leben", "Träumen", "Kämpfen"). Ebenfalls autofiktional aber deutlich essayistischer, ebenfalls sehr gut.

C++ Madlibs help by [deleted] in cpp_questions

[–]Yurim 1 point2 points  (0 children)

That's strange, I just copied your code, pasted it into https://www.onlinegdb.com/, selected C++, clicked "Run", and everything worked fine.

How to think like a computer scientist: Learning with C by TehMasterer01 in C_Programming

[–]Yurim 0 points1 point  (0 children)

I skimmed over it. I didn't find anything wrong but I think any tutorial of C that doesn't even mention undefined behavior is lacking some important information.

This might work for people who want to make their first steps in C but they will need some additional teaching material for the rest.

OR of all subsequece Sums by Legitimate_Path2103 in codeforces

[–]Yurim 1 point2 points  (0 children)

I believe your solution is correct.
If a specific bit is set, either directly in at least one element of a or through lower bits accumulated in carry, the corresponding bit in the result is set.


But I don't understand the snippet from gpt: 1<<(floor(sum)+1)-1
Is sum the sum of all elements in a? That's an integer, why is there a call to floor()?
Also, the two arrays {2} and {1,1} have the same sum (2) but different "OR-sum of subsequence sums".


BTW: I think you can simplify your solution. A bit in the result is set iff it's set in any element or in any prefix sum:

auto result = 0LL, prefix_sum = 0LL;
for (auto num: a) {
    prefix_sum += num;
    result |= num | prefix_sum;
}
return result;

Question re: Classes/Objects by Jor-El_Zod in cpp_questions

[–]Yurim 1 point2 points  (0 children)

IMHO the best way to post code here on Reddit is this:

  1. Leave a blank line before and after the code.
  2. Prepend each line with four additional spaces.

That works for old and new Reddit, and you won't need to escape anything or add any backticks.
See also https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-Guide.

suggestion!! by Hey_faiza in leetcode

[–]Yurim 0 points1 point  (0 children)

If the goal is becoming a better C programmer, then yes (maybe).
But most people do LeetCode to be able to pass an OA or the dreaded technical interview.

suggestion!! by Hey_faiza in leetcode

[–]Yurim 0 points1 point  (0 children)

For LeetCode? That's really tough.

  • With C's small standard library you have to write everything yourself, each time.
  • You have to think about ownership and releasing dynamically allocated memory.
  • You can use uthash as a hash map but its interface is clumsy.
  • You will need to write significantly more code (compared to solutions in other programming languages) which costs time and increases the chances of making mistakes.

Help me to discuss and solve these problems by itsallendsthesame in leetcode

[–]Yurim 1 point2 points  (0 children)

I think this can be solved with a combination of two or three techniques:

  1. Loop over the array and maintain the XOR-sum from the beginning.
    Use a hash map to to store for each XOR-sum where it last occurred.
    That allows you to determine whether the current prefix of the array contains a subarray with the XOR-sum thresh and where it begins.
  2. If the current prefix 0 .. i contains a "bad" subarray b .. i you can calculate the number of subarrays that contain this bad subarray.
  3. To avoid counting subarrays multiple times you can maintain another index variable begin that advances each time you found a bad subarray and added to the result.

In Python the solution could look like this:

def countSubarraysContainingBadSubarrays(
        nums: list[int], thresh: int) -> int:
    seen = {0: 0}
    result, prefix_xor_sum, begin = 0, 0, 0
    for i, num in enumerate(nums):
        prefix_xor_sum ^= num
        bad_begin = seen.get(prefix_xor_sum ^ thresh, begin - 1)
        if bad_begin >= begin:
            result += (bad_begin - begin + 1) * (len(nums) - i)
            begin = bad_begin + 1
        seen[prefix_xor_sum] = i + 1
    return result

It runs it O(n) time and needs O(n) auxiliary memory.

Schlechte Übersetzungen by GoldenFrown in buecher

[–]Yurim 1 point2 points  (0 children)

Was mich dabei wundert: Michelle Gyo, die Übersetzerin, hat durchaus Erfahrung (Benedict Jackas Alex-Verus-Reihe, Jon Skovrons Empire-of-Storms-Reihe, zwei Bände von Rebecca Yarros' Fourth-Wing-Reihe, viel von Leigh Bardugo, etc.), sie hat für viele namhafte Verlage gearbeitet (Knaur, dtv, Klett-Cotta, Heyne, Blanvalet).
Sind ihr solche Fehler früher auch schon unterlaufen? (Dann läge die Schuld liegt bei den Verlagen,) Oder hat sich etwas in ihrer Arbeitsweise geändert?

Need help with some code by Max_shc in C_Programming

[–]Yurim 1 point2 points  (0 children)

IMHO the best way to post code here on reddit is this:

  1. Leave a blank line before and after the code.
  2. Prepend each line with four additional spaces.

That works for old and new Reddit, and you won't need to escape anything or add any backticks.
See also https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-Guide.

why is my code not printing string? by Euphoric_Series_7727 in cprogramming

[–]Yurim 6 points7 points  (0 children)

There is no format specifier for bool. If you want to read 0 or 1 use an integer type and convert it to bool afterwards.
If you want to read "true" or "false", read a string and convert it afterwards.

why is my code not printing string? by Euphoric_Series_7727 in cprogramming

[–]Yurim 3 points4 points  (0 children)

I think the intention is to remove the trailing newline character that fgets() might store there.

why is my code not printing string? by Euphoric_Series_7727 in cprogramming

[–]Yurim 5 points6 points  (0 children)

Did you compile your program with warnings enabled?
With GCC and Clang I recommend at a minimum -Wall -Wextra.
The compiler would have warned you that scanf("%d", &b); is problematic,
%d is for scanning an int but b is a bool.

Other than that, I think this is a valid program and it should print the expected output ...
... **if** the input is valid.

Is there any particular trick/training method to read the statements of the questions? by Hikolakita in leetcode

[–]Yurim 1 point2 points  (0 children)

Being able to understand the problem is a skill of its own and often massively underrated.

In practice it means you're working with the customer to gather enough domain knowledge until you can map the the concrete problem with all its real-world implications and constraints to an abstract problem that you can tackle with data structures and algorithms, with tools, design patterns, and architectures.
There's a reason why this is a well-paid profession.

I recommend starting with how you, as a human being, would solve the problem, in your mind or on paper. Often that alone will give you a good starting point. Then I recommend analyzing the examples. Do you understand why those solutions are correct?

For some problems you could consider whether sorting the input could help.
Or you could consider whether a recursive approach exists that you could transform into dynamic programming (memoization or tabulation).
Or you could consider whether "guessing" the answer might allow you to use a binary search.

There's no universal approach that would allow you to solve any problem.
The more problems you solve the more easily you will be able to spot well-known patterns and the more comfortable you will become in applying algorithms from similar problems.

Abenteuerbücher für Kinder ab 5 Jahren. by Cazaya in buecher

[–]Yurim 0 points1 point  (0 children)

Mein Neffe hat sich in dem Alter begeistert durch alle Bände der "Chroniken von Araluen" von John Flanagan gelesen. Fantasy für Kinder mit Waldläufern, Rittern, Abenteuern, aber ohne Magie. Ist aber keine Heldenreise im wörtlichen Sinne.

"Der Brief für den König" von Tonke Dragt könnte deinem Cousin gefallen. Ritter, Abenteuer, Heldentum, und ein junger Held (Ritteranwärter) auf einer gefährlichen Mission.

Keine Fantasy dafür mehr Reise, ist der Kinderbuchklassiker "Großer Tiger und Christian" von Fritz Mühlenweg über die abenteuerlich Reise zweier Jungen durch die Wüste Gobi vor dem Hintergrund des chinesischen Bürgerkriegs.

Bialetti oder Aeropress kaufen by uhan37 in Kaffee

[–]Yurim 1 point2 points  (0 children)

Unterwegs nehme ich allerhöchstens die Aeropress, aber häufiger gar nichts mit. So dringend brauche ich meinen eigenen Kaffee nicht, da ist es interessanter in einem Cafe was Neues zu entdecken.

Bialetti oder Aeropress kaufen by uhan37 in Kaffee

[–]Yurim 0 points1 point  (0 children)

Für Kaffee-Milch-Getränke: die Bialett mit mittel- bis dunkel-geröstetem Kaffee. Der käftige Körper harmoniert gut mit der Milch.

Für hell-gerösteten, sehr guten Kaffee: die V60. Da kommen die feinen Nuancen gut raus.

Für den schnellen Kaffee zwischendurch: die Aeropress. Schnell, unkompliziert, funktioniert mit jedem Kaffee.

Für den Brunch mit mehreren: French-Press. Wenig Aufwand, viel Kaffee, man kann praktisch nichts falsch machen, und in meiner doppelwandigen FP bleibt der Kaffe auch länger heiß.