Zhe Wang
Zhe Wang
这应该是能够提高论坛参与度的一个好办法。 不知道@tony612怎么看 :)
``` iex(1)> Enum.take_every(1..10, -1) [1] ``` That is undesired. I will tackle this one.
Seems like after the commit https://github.com/elixir-lang/elixir/commit/ea31bc3b30b32757182155047f1d5abf58bc17f9, the test result on copy is not stabilized. For the same code on the same OTP version, for some build I will get all...
``` iex(1)> trunc(222222222222222300.0) 222222222222222304 iex(2)> trunc(2222222222222222300.0) 2222222222222222336 iex(3)> trunc(22222222222222222300.0) 22222222222222221312 iex(4)> trunc(222222222222222222300.0) 222222222222222229504 iex(5)> trunc(2222222222222222222300.0) 2222222222222222163968 iex(6)> trunc(22222222222222222222300.0) 22222222222222222688256 iex(7)> trunc(222222222222222222222300.0) 222222222222222218493952 ``` Current the Kernel.trunc/1 just simply call :erlang.trunc/1:...
``` iex(1)> String.split_at("abc", -0.1) {"abc", ""} iex(2)> String.split_at("abc", -7.1) {"", "abc"} iex(3)> String.split_at("abc", 0.1) ** (FunctionClauseError) no function clause matching in String.do_split_at/4 (elixir) lib/string.ex:377: String.do_split_at({"b", "c"}, 1, 0.1, "a") iex(4)>...
Just a discussion. In Rails and PHP, they parse a uri of something like `http://localhost:3000/?foo=1&bar[]=2&bar[]=3`to `Parameters: {"foo"=>"1", "bar"=>["2", "3"]}`. Yet right now we just treat `bar[]` as a literal string,...
https://travis-ci.org/elixir-lang/elixir/jobs/43639646 ``` test elixir_auto_completion_on_modules_from_load_path (IEx.AutocompleteTest) test/iex/autocomplete_test.exs:37 Assertion with == failed code: expand('Ex') == {:yes, [], ['Exception', 'ExUnit']} lhs: {:yes, [], ['ExUnit', 'Exception']} rhs: {:yes, [], ['Exception', 'ExUnit']} stacktrace: test/iex/autocomplete_test.exs:41 ```...
If you go to http://hexdocs.pm/ecto/ and click on the source link under any function listed there, you will be brought to the broken page. e.g. : https://github.com/elixir-lang/ecto/blob/c6ef9fd225800c10cc4a953a7525d9518fc0e3c3/lib/ecto/adapter/test_transactions.ex#L50 I think the...
Say a user got a calendar with 20 events on a Monday and 2 events on other days of that week, then to display all 20 events on Monday does...