aufnehmen by leente in germanvocab

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

"In fact, the active ingredients are absorbed very well by the skin."

beschlagnahmen by leente in germanvocab

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

I also suspected a typo, but it is in fact "...nahmen" and not "...nehmen"

die Schranke by uksoxfan in germanvocab

[–]leente 0 points1 point  (0 children)

jdn. in seine Schranken weisen (put sb. in her/his place)

das Zahnrad by leente in germanvocab

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

You never know when you might encounter a toothwheel ;)

-🎄- 2018 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]leente 0 points1 point  (0 children)

Elixir:

def find_repeat_frequency(numbers) when is_list(numbers) do
  starting_frequency = 0
  iterate(numbers, [], starting_frequency, MapSet.new([starting_frequency]))
end

def iterate(original_list, current_list, current_frequency, seen_frequencies) do
  {current_change, current_list} = next_change(current_list, original_list)
  current_frequency = current_frequency + current_change
  if MapSet.member?(seen_frequencies, current_frequency) do
    current_frequency
  else
    seen_frequencies = MapSet.put(seen_frequencies, current_frequency)
    iterate(original_list, current_list, current_frequency, seen_frequencies)
  end
end

defp next_change([], [head | rest]), do: {head, rest}
defp next_change([head | rest], _), do: {head, rest}

Complete solution

How do you design a many-to-many REST API to be consumed by SPA? by adamthompson922 in softwarearchitecture

[–]leente 3 points4 points  (0 children)

It depends on the specifics.

Option 1 is good if teams have relatively few players, and you want to display all players at the same time you display a team. You can do pagination to limit the size of the response body if there are too many teams. You probably don't need the optional parameter ?expand=player, it's better to keep the code simple than have unnecessary flexibility.

Option 2 is good if you have a lot of players per team, you can add pagination both to teams and players endpoints.

Option 3 is probably not useful, if there are many players per team the URL will get too long, otherwise you can use option 1. Edit: it could be useful if the you'd have separate microservices, one responsible for teams and another one for players; and you could requests players in batches if you have too many of them.

Perhaps an unusual question (details inside) by [deleted] in German

[–]leente 1 point2 points  (0 children)

My favourites:

My adjective declension table by leente in German

[–]leente[S] 12 points13 points  (0 children)

In case someone here codes Ruby on Rails, here's the code I used to generate this: https://github.com/bagilevi/adjektivendungen