elixir

    0热度

    1回答

    当我运行命令elixir -v或mix,它将返回: {"init terminating in do_boot",{undef,[{elixir,start_cli,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}} Crash dump is being written to: erl_crash.dump...done init term

    0热度

    1回答

    我正在学习凤凰和ecto协会,但我偶然发现了一个问题,我似乎无法解决,同时尝试预载嵌套关联。我有3种模式 有 schema "offers" do ... has_one :albumMariageSmall, Album, on_delete: :delete_all, on_replace: :delete has_one :prewedding, Prewedd

    0热度

    1回答

    如何在终端文件中编译为可执行文件的elixir文件? 我读了那个编译elixir我需要创建一个新项目。 但是我想编译的文件是 IO.puts "hello world"。

    0热度

    1回答

    我在一个节点上创建一个文件流,我担心文件访问,如果我从另一个节点启动流,该怎么办? 一样,在节点A,我没有启动它创建流: stream= File.stream!(path) Agent.start(fn -> %{"stream" => stream} end, name: {:global, :my_stream}) 然后,在节点B,我开始流: stream= Agent.get({:g

    1热度

    1回答

    我想了解如何在我的查询中使用Absinthe嵌套项目上使用参数。 我试图做到的是: { users(order: ASC) { id email clients(order: DESC) { id email } } } 这里是我的模式和类型: query do @desc "Get all use

    3热度

    2回答

    我是一位尝试进入万灵药的Ruby开发者。我正在尝试与API进行交互以学习一点药剂。我基本上试图做一个HTTP请求。在红宝石里,我想要做的事情看起来像这样。 require 'httparty' url = "https://api.sportradar.us/nba/trial/v4/en/games/2016/11/05/schedule.json?api_key={api_key}"

    0热度

    1回答

    我试图在嵌套的JSON响应中查找URL并映射它们。我的功能到目前为止是这样的: def list(env, id) do Service.get_document(env, id) |> Poison.decode! |> Enum.find(fn {_key, val} -> String.starts_with?(val, 'https') end) end

    0热度

    1回答

    我正在通过unit testing the handle_{call,cast,info} callbacks测试GenServer。我的一个文档测试 S的如下: @doc """ Call the GenServer to retrieve the initial workout ## Examples

    0热度

    1回答

    我正试图编写一个简单的模块函数,它将一个表达式看作一个字符串,如"123 + 45"并返回一个答案。所以: Calculator.calculate("123 + 45") # => 168 我想到了刚刚在分裂的(" ")字符串来获取整数和运营商的话,基本上调用它Code.eval_string。这是我第一次尝试天真: defmodule Calculator do def cal

    1热度

    1回答

    我有些感动代码后/ index.html.eex <%= if @user do %> <ul class="nav navbar-nav navbar-right"> <li>Hello <%= @user.username %>!</li> </ul> <ul class="nav navbar-nav navbar-right">