Top "Elixir" questions

Elixir is an open-source, dynamic, compiled, general purpose functional programming language.

How to Log something in Controller when Phoenix Server is running?

I'm trying to print some debug information from one of my Controllers in my Phoenix app when the server is …

elixir phoenix-framework
How to use raw sql with ecto Repo

I have an upsert requirement, so I need to call a postgres stored procedure or use a common table expression. …

elixir ecto
Elixir - Looping through and adding to map

I'm rebuilding something in Elixir from some code I built in C#. It was pretty hacked together, but works perfectly (…

enumeration elixir
Elixir: use vs import

What's the difference between use and import? use is a simple mechanism for using a given module into the current …

elixir
Elixir convert struct to map

I'm trying to convert a struct to a map to be able to clean all the nil values I'm currently …

dictionary struct elixir telegram-bot
In Elixir how do you initialize a struct with a map variable

I know its possible to create a struct via %User{ email: '[email protected]' }. But if I had a variable …

elixir
Add / Remove key-value pairs from a Map

How to add (and remove) key-value pairs in an Elixir map? This does not work: map = %{a: 1, b: 2, c: 3} map[:…

elixir
How to generate a random url safe string with Elixir

I need to be able to generate random url safe strings so I could use those in links (like in …

elixir phoenix-framework
How to check if a string is blank in Elixir

I mean a string is blank if it's empty or contains whitespaces only. For example, "", " " and "\n" are all blank. …

elixir phoenix-framework
How to create a map from a list of two item tuples in Elixir

What would be an elegant way for converting a list of two item tuples like [{1,2},{3,4}] into the map %{1=>2, 3=>4}? …

elixir