据我所理解;
只在reducer中排序
按订单排序全球,但将所有东西都推到一个减速器中
通过密钥散列智能地将东西分配到reducers中并进行排序
所以我的问题是集群保证全球秩序?分配通过将相同的密钥放入相同的减速器但是相邻的密钥呢?
如果我自己编写escript,我可以使用nif,但是当我使用rebar escriptize时,无法找到nif函数.我认为这是因为*.so对象没有像束文件那样被打包.这是一个简单的例子;
rebar.config:
{deps, [
{'jiffy', "", {git, "https://github.com/davisp/jiffy.git", {branch, master}}}
]}.
{escript_incl_apps, [jiffy]}.
%% I tried this to see what happens if the so got in there but didn't help
{escript_incl_extra, [{"deps/jiffy/priv/jiffy.so", "/path/to/my/proj"}]}.
Run Code Online (Sandbox Code Playgroud)
test.erl:
-module(test).
-export([main/1]).
main(_Args) ->
jiffy:decode(<<"1">>),
ok.
Run Code Online (Sandbox Code Playgroud)
rebar get-deps compile escriptize ./test
结果是
escript: exception error: undefined function jiffy:decode/1
in function test:main/1 (src/test.erl, line 7)
in call from escript:run/2 (escript.erl, line 741)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1
in …Run Code Online (Sandbox Code Playgroud) 如果有一个包含按日期排序的日期字段的项目列表.我希望按日期分类这些项目;
等等......
我拥有的是这个;
<ul>
<li ng-repeat="listing in listings | filter:query">
<h1 ng-show="$index === 0 || listings[$index - 1].created !== listing.created">
{{listing.created | date:mediumDate}}
</h1>
{{listing.title}}
</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
但是这种方式h1元素成为了弄乱演示的li元素的孩子.有没有其他方法以我想要的方式写这个ng-repeat?