synrc / n2o Goto Github PK
View Code? Open in Web Editor NEW⭕ N2O: Distributed WebSocket Application Server ISO 20922
Home Page: https://ws.n2o.dev
License: Other
⭕ N2O: Distributed WebSocket Application Server ISO 20922
Home Page: https://ws.n2o.dev
License: Other
there Is two errors when running make in samples directory on CentOS6.5 with linux kernel 2.6.32.
i upgrade the kernel to 2.6.39.4, the first error is disappear, but the second is still there.
what should i do?
thank you!
Hi, N2O team!
I have some trouble when make, I get follow errors:
./mad get-deps
Bundle: "./mad"
escript: exception error: no match of right hand side value {["get-deps"],[]}
in function mad_utils:fold_params/1 (src/mad_utils.erl, line 81)
in call from mad:main/1 (c:/Synrc/n2o/samples/deps/mad/src/mad.erl, line 10)
in call from escript:run/2 (escript.erl, line 747)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1
in call from init:start_em/1
make: *** [get-deps] Error 127
Алгоритм такой:
С точки зрения фреймворка все логично. Пользователь не был залогинен, но что-то шлет.
Хочется ему сделать wf:redirect("/login") , но не знаю где. Патчить n2o только для себя не хочется, что бы потом каждый раз патчи не накладывать. А придумать генеральную политику партии надо авторам идеи и фреймворка.
Hi,
I'm not sure of the correct way to create elements, but have written a first attempt at a upload file element.
element_upload.erl
-module (element_upload).
-include_lib("n2o/include/wf.hrl").
-export([ reflect/0, render_element/1] ).
-spec reflect() -> [atom()].
reflect() -> record_info(fields, upload).
render_element(Record) ->
Id = Record#upload.id,
Hidden_id = list_to_atom(Id ++ "_data"),
Fun = wf:f("function (evt) {"
"var input = evt.target;"
"if(input.files && input.files[0]) {"
"var reader = new FileReader();"
"reader.onload = function(e) {"
"var data = e.target.result;"
"var hidden = document.getElementById('~s');"
"hidden.value = data; "
"};"
"reader.readAsDataURL(input.files[0]); } }",[Hidden_id]),
wf:wire(wf:f("document.querySelector('#~s').addEventListener('change',~s);"
,[Id,Fun])),
[
wf_tags:emit_tag(<<"input">>, [
{id,Id},
{value, Record#upload.value},
{type, file},
{style, Record#upload.style}
]),
wf_tags:emit_tag(<<"input">>, [
{type, hidden},
{id, Hidden_id}
])
].
and wf.hrl
-record(upload, {?ELEMENT_BASE(element_upload), name}).
Hi, N2O team!
I have some trouble when rebar compile, I get follow errors:
n2o/samples/apps/web/src/index.erl:23: field body undefined in record button
n2o/samples/apps/web/src/index.erl:25: field body undefined in record button
n2o/samples/apps/web/src/index.erl:26: field body undefined in record button
n2o/samples/apps/web/src/index.erl:29: field body undefined in record button
I get n2o from here, github repo.
Many thanks for help! Best regards. Dmitriy.
Hi, again. :)
It's just interesting for me. Why do you return string like "item1,item2,item3" from multiple select element ? It would be easy to handle if select will return array of items like ["38","41"] or ["item1","item2"]. In single case will fine to return single element in array like ["42"] or [42] or ["selected item"].
Thank you.
От меня что-то типо issue (можно не читать:) )
а тут я просто записал на мой взгляд ключевые вещи, что прозвучали в irc
Речь идет про модуль обработки контроллеров
хочется (кому-то):
Тезис: окультурить все нужно, похуй на совместимости
Тезис: СОБЫТИЕ = УПАКОВАННОЕ СООБЩЕНИЕ ПРОТОКОЛА + КОНТЕКСТ ПРОЦЕССА
Вроде все вписывается в handle(#ev{},#cx{})
28.07.13 попытался собрать n2o как описано в http://synrc.com/framework/web/setup.htm
Получил сабж.
./rebar compile
Compiled src/wf_utils.erl
Compiled src/wf_context.erl
Compiled src/wf_render_elements.erl
Compiled src/static_file.erl
==> n2o_sample (compile)
Compiled src/users.erl
Compiled src/login.erl
Compiled src/routes.erl
Compiled src/web_app.erl
Compiled src/index.erl
Compiled src/web_sup.erl
ERROR:
===============================================
You need to install erlydtl to compile DTL templates
Download the latest tarball release from github
http://code.google.com/p/erlydtl/
and install it into your erlang library dir
===============================================
ERROR: compile failed while processing /home/evgeny/projects/erlang/n2o/samples/deps/n2o_sample: rebar_abort
You definitely should add LICENSE file with proper license
=ERROR REPORT==== 17-Aug-2014::08:58:16 ===
driver_select(0x000000001a9c00a0, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.63512> stealing control of fd=0 from input driver fd (0/1) #Port<0.420>
Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.1 (abort with ^G)
1>
=INFO REPORT==== 17-Aug-2014::08:58:17 ===
application: fs
exited: {
{shutdown,
{failed_to_start_child,fs_server,
{enoent,
[{erlang,open_port,
[{spawn_executable,"deps/fs/priv/mac_listener"},
[stream,exit_status,
{line,16384},
{args,[
"-F",
"/Users/homeway/erlang/n2o/homeway-fork/n2o/samples"]},
{cd,"/Users/homeway/erlang/n2o/homeway-fork/n2o/samples"}]],
[]
},
{fsevents,start_port,2,
[{file,
"/Users/homeway/erlang/n2o/homeway-fork/n2o/samples/deps/fs/src/sys/fsevents.erl"},
{line,12}]
},
{fs_server,init,1,
[{file,
"/Users/homeway/erlang/n2o/homeway-fork/n2o/samples/deps/fs/src/fs_server.erl"},
{line,11}]
},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},
{line,239}]}]}}},
{fs_app,start,[normal,[]]}
}
type: temporary
In the browser creates two copies using functions to add items to the DOM.
True for the function wf:insert_top/2 and wf:insert_bottom/2 inside event(init):
%% table.erl
event(init) ->
wf:insert(test,#span{body= wf:f("~p", [erlang:now()])}).
<!-- table.html template-->
<div id="test"></div>
%% routes.erl
route(<<"/table">>) -> table;
route(<<"/ws/table">>) -> table;
Hi, it's me again. :-)
I saw in examples ( skyline ) next code:
main() ->
case wf:user() of undefined -> wf:redirect("/login"); _ -> [#dtl{file = wf:cache(mode), ext="dtl",bindings=[{title,<<"Account">>},{body,body()}]}] end.
In case of undefined It's not working. Why ? Cowboy returns empty page with next headers:
HTTP/1.1 200 OK
connection: keep-alive
server: Cowboy
date: Tue, 06 May 2014 19:07:55 GMT
content-length: 0
set-cookie: n2o-sid=1AKKkVnwL+qF4A4gSKYapA==; Version=1; Expires=Wed, 07-May-2014 19:07:55 GMT; Max-Age=86400; Path=/
But redirect works well when it called from event(X). WTF ?
Version HEAD.
I'm so sorry that I know this isn't a really code issue, but I can't find other community for N2O.
I'm working for a project needing iOS and android client, and I want to use N2o to build a backend service. Of course, there is a web client too.
I'm finding a solution for integrating the web, iOS and android, and erlang/N2O.
I think to use websocket is a good idea, isn't it ?
But how can I do it ?
Is there some example code for N2O?
Thanks a lot !
As for me for ubuntu I should do at first
sudo apt-get install inotify-tools
I got a error:
=ERROR REPORT==== 17-Aug-2014::19:27:05 ===
Error in process <0.5205.0> with exit value: {[{reason,badarg},{mfa,{bullet_hand"],[]},{wf,log,4,[{file,"/Users/homeway/erlang/n2o/samples/deps/n2o/src/wf.erl"},{line,160}]},{n2o_bullet,terminate,2,[{file...
Is there any problem in follow code?
-module(about).
-compile(export_all).
-include_lib("n2o/include/wf.hrl").
title() -> [ <<"About">> ].
main() -> #dtl{file = "index", app=n2o_sample,bindings=[{title,title()},{body,body()}]}.
body() ->
wf:wire(#event {target=mybutton, type=click, postback=myalert}),
[#button { id=mybutton, body="Submit" }].
event(myalert) ->
wf:info(?MODULE, "event info", []),
wf:wire(#alert{text = "my alert"});
event(Unkown)->
wf:info(?MODULE, Unkown, []).
follow page have three problem:
%% page source
%% ----------------
-module(hello).
-compile(export_all).
-include_lib("n2o/include/wf.hrl").
title() -> [ <<"Hello">> ].
main() -> #dtl{file = "index", app=n2o_sample,bindings=[{title,title()},{body,body()}]}.
body() ->
wf:info(?MODULE,"RENDER!", []),
[
#h1 {body= <<"你好">>},
#button { id=mybutton, body="my button", postback=confirm}
].
event(confirm) ->
wf:info(?MODULE, "confirm message...", []),
wf:wire(#confirm{text= "确定吗?", postback=continue}),
wf:info(?MODULE, "我还没挂", []);
event(continue) -> wf:info(?MODULE, "你是对的!", []).
Version: HEAD.
DTL: 0.8.0
I created new another template. It's rendered normally. But something set text/plain mime type. What do I wrong ?
Cannot compile n2o using rebar get-deps compile
:
arch:n2o:<master>% rebar get-deps compile ==> ranch (get-deps) ==> cowboy (get-deps) ==> mimetypes (get-deps) ==> gproc (get-deps) ==> erlydtl (get-deps) ==> n2o (get-deps) ==> ranch (compile) ==> cowboy (compile) ==> mimetypes (compile) ==> gproc (compile) ==> erlydtl (compile) ==> n2o (compile) Compiling src/endpoints/cowboy/bullet_handler.erl failed: src/endpoints/cowboy/bullet_handler.erl:1: cannot parse file, giving up src/endpoints/cowboy/bullet_handler.erl:1: no module definition src/endpoints/cowboy/bullet_handler.erl:1: cannot translate from UTF-8 ERROR: compile failed while processing /home/wal/work/erlang/n2o: rebar_abort
I have compiled the version 1.5 n2o, make success.
n2o/samples/>make console
./orderapps.erl n2o_sample n2o fs erlydtl cowboy sh mad gproc rest cowlib ranch active > .applist
ERL_LIBS=apps:deps erl -args_file rels/web/files/vm.args -config rels/web/files/sys.config -eval '[application:start(A) || A <- [kernel,stdlib,xmerl,compiler,syntax_tools,erlydtl,crypto,cowlib,ranch,cowboy,gproc,n2o,n2o_sample,fs,sh,mad,rest,active,asn1,edoc,eunit,gs,hipe,inets,mnesia,parsetools,public_key,runtime_tools,ssl,tools,webtool]]'
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:5] [hipe] [kernel-poll:true]
Eshell V5.10.4 (abort with ^G)
([email protected])1>
=INFO REPORT==== 5-Jun-2014::15:28:50 ===
application: fs
exited: {{bad_return_value,executable_not_found},
{fs_app,start,[normal,[]]}}
type: temporary
In the PDF document page 23 Active ELements are described. It mentions text box area,but maybe it refers to textarea?
I am trying to implement todo exactly as it looks on http://todomvc.com, but where most code runs on the server. I want to compare with http://todomvc.com/architecture-examples/angularjs-perf/#/ and see if MVC is worth the extra complexity.
Джентельмены,
У меня есть странный баг в javascript. Воспроизводится у меня следующим образом.
try
error_logger:info_msg("[~s] SMS view camp #pn", [U#smsuser.email, CampId]),
CampTable = get_camp_table(store_pgsql:pgsql_client(), CampId),
Sms = store_pgsql:read_camp_messages(CampId, CampTable),
Table = smsviewer:table_view(Sms),
Modal = modal(Table),
wf:update(modal_camps, Modal),
wf:wire("$('#modal_camps').modal('show');")
catch
throw:{error, Reason} -> wf:error("pn",[Reason]), wf:wire(wf:f("alert('~s');",[Reason]))
% _:Reason -> wf:error("pn",[Reason]), wf:wire(wf:f("alert('Ошибка при выполнении запроса.');"))
end
Пояснения к коду.
CampTable = название временной таблицы в БД. Sms - массив СМС с типом #sms.
Table = сгенерированная записями n2o таблица. Modal - сгенерированное n2o-записями модальное окно для Twitter Bootstrap.
В результате wf:update() происходит Syntax error в Google Chrome с диагностикой ILLEGAL TOKEN и div #modal_camps остается не изменненным.
ВНИМАНИЕ! Только если в тексте СМС встречается какая-то херня. Какая именно, я еще не определил. И именно в тексте, а не в других полях. Если #td{body = Sm#sms.readable } закомментировать, то все работает ОК. Readable = text в БД = binary() в erlang. В большинстве случаев этого эффекта нет. Но в последнем случае текст равен ->
pearlsms=> select id,readable from camp_messages_161_20140107_1722 order by id limit 3;
id | readable
--------+---------------------------------------------------------------------
193850 | Вы можете автоматически подставлять в сообщения данные из списков.
193851 | Например, Имя. Вместо необходимого параметра используйте следующие
193852 | модификаторы: +
|
(3 rows)
Подозреваю дело в переводе строки в сообщении 193852, но это я проверю в течение дня.
Но не могли бы Вы и со своей стороны проверить работу wf:update()? Спасибо.
Hi, again.
I have element like this:
#checkbox{id=islatin, name=islatin, class=["checkbox"],
checked=false, value=off, body= <<" ">>},
After button click: #button{class=["btn btn-primary"], id=btn_send_one, body= <<"Send">>,delegate=sendsms, postback=send_one, source=[sender, msisdn, msgtext, issubst, islatin, isdelayed ]} I got event
event(send_one) ->
error_logger:info_msg("Submit send one message: ~p, ~p, ~p, ~p, ~p, ~p, ~p", [
wf:q(sender),
wf:q(msisdn),
wf:q(msgtext),
wf:q(issubst),
wf:q(islatin),
wf:q(isdelayed)
]);
When 'islatin' checkbox was checked as result I got :
[info] Submit send one message: "privatbankas", "380504139380", "privet", "off", "off", "off", []
Why ? How I can get state "checked or not" from checkbox called 'islatin'.
Should I declare postback and delegate names and get event when state changed ?
Can't install N2O.
Ubuntu 12.04, Erlang R16B02, rebar 2.0.0 R15B01
Shell output:
...
==> Leaving directory `/home/asakura/n2o/samples/deps/n2o'
==> n2o_sample (compile)
Compiled src/users.erl
Compiled src/login.erl
Compiled src/web_sup.erl
Compiled src/web_app.erl
src/routes.erl:3: Warning: behaviour route_handler undefined
Compiled src/routes.erl
Compiled src/index.erl
:0: Warning: function render_tag/3 is unused
:0: Warning: function render_tag/3 is unused
:0: Warning: function render_tag/3 is unused
ERROR: Compiling template priv/templates/hello.html failed:
{ok,hello_view,[{[],[{0,erl_lint,{unused_function,{render_tag,3}}}]}]}
Hi,
I tried the following
but wf:q(admin) always equals 'on' - the default value whether it is checked or not. My first attempt to correct this was:
and then to handle the postback
event({setvalue,Id,Val}) ->
wf:update("check_" ++ Id, #panel{id= "check_" ++ Id, body=[#checkbox{id=Id,\
checked=Val, body=Id, postback={setvalue,Id,not Val}, value=Val}]});
while it worked, it seems overly complex. Then I modified action_event.erl to
render_action(#event{postback=Postback,actions=Actions,source=Source,target=Control,
type=Type,delegate=Delegate}) ->
Data = "[" ++ string:join([begin
{Key, Id} = if is_atom(Src)-> S = atom_to_list(Src),
{"atom('"++S++"')", S};
true -> {"utf8.toByteArray('" ++ Src ++ "')", Src} end,
"tuple(" ++ Key ++ ", document.querySelector('#" ++ Id ++ "').type == 'checkbox' ?
utf8.toByteArray(document.querySelector('#" ++ Id ++ "').checked.toString()) :
utf8.toByteArray(document.querySelector('#" ++ Id ++ "').value))" end || Src <- Source]
++ ["tuple(tuple(utf8.toByteArray('"++ Control ++"'), bin('detail')), event.detail)"],",") ++ "]",
PostbackBin = wf_event:new(Postback, Control, Delegate, event, Data),
[wf:f("document.querySelector('#~s').addEventListener('~s',function (event) {", [Control,Type]),PostbackBin,"});"].
Basically testing if the element is a checkbox, and returning the value of 'checked' instead of 'value'. This implements the behaviour I was expecting for the checkbox. Am I missing something on the checkboxes?
Thanks, Stephen
Джентельмены, у Вас тут какая-то фигня написана.
Script = wf:f("jQuery($('#~s').datepicker(~s);", [Anchor, Options]),
На нее javascript console ругается. Я её заменил на
Script = wf:f("$('#~s').datepicker(~s);", [Anchor, Options]),
Но так и не понял, что Вы хотели этим сказать.
Для корректной работы надо добавить в проект bootstrap-datepicker.css & bootstrap-datepicker.js. В конце своей страницы выполнить скрипт
<<"$('.datepicker_textbox').datepicker();">>.
Я это сделал подстановкой в шаблон страницы куска со скриптами в дополнение к title, body.
line 20 in n20_cowboy.erl
headers(Req) -> cowboy_reg:headers(Req).
reg should be req
$ ./release.sh
Releasing node web...
==> web (generate)
ERROR: generate failed while processing /Users/********/Dropbox/Code/Erlang/n2o/samples/rels/web: {'EXIT',{{badmatch,{error,"Release "node" uses non existing application sync"}},
[{rebar_reltool,generate,2,[]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,4,[]},
{rebar_core,process_dir0,6,[]},
{rebar_core,process_commands,2,[]},
{rebar,main,1,[]},
{escript,run,2,[{file,"escript.erl"},{line,747}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]}]}}
./release_sync.sh: line 14: rebar.config: syntax error: invalid arithmetic operator (error token is ".config")
./release_sync.sh: line 25: rels/web/node/lib/n2o_sample-: division by 0 (error token is "/node/lib/n2o_sample-*")
Running Bash 4.2 on OSX.
Меня всегда с Bert интересовал один момент: как избежать передачи атомов в пакете? А точнее при декодировании пакета.
Дело в том что в n2o_websocket ты используешь binary_to_term(Info).
Если передать в Info атом, то он успешно декодируется и останется в памяти Erlang VM до перезагрузки.
Получается очень легко организовать DOS атаку по памяти.
Есть ли защита от этого или хотябы идеи как избежать ?
Hi --
There's an assumption the definition of #dtl that the app name is "web". When it's not it fails with
{erlang,'++', [{error,bad_name},"/priv/templates/plain.html"], []},
{element_dtl,render_element,1, [{file,"src/elements/layout/element_dtl.erl"},{line,12}]},
This is corrected by including app=real-app-name when returning from main/0 but hardcoding an app name all over the place isn't optimal. I'm not sure what the best resolution for the underlying issue might be but a note somewhere that this is the case might be helpful for the next guy.
Thanks!
Latest n2o, fresh rebar, windows 7 64-bit, visual studio express 2012
==> jsonx (compile)
Compiled src/jstream.erl
Compiled src/jsonx.erl
Compiling c:/dev/n2o/deps/jsonx/c_src/jsonx.c
Оптимизирующий компилятор Microsoft (R) C/C++ версии 17.00.50727.1 для x64
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
jsonx.c
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(105) : warning C4820: <unna
med-tag>: "4"-байтовые поля добавлены после данные-член "arity"
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(114) : warning C4820: enif_
entry_t: "4"-байтовые поля добавлены после данные-член "num_of_funcs"
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(79) : error C2036: void *: неизвестный разме
р
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(84) : error C2036: void *: неизвестный разме
р
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(127) : warning C4018: <: несоответствие типо
в со знаком и без знака
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(149) : error C2036: void *: неизвестный разм
ер
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(159) : error C2036: void *: неизвестный разм
ер
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(169) : error C2036: void *: неизвестный разм
ер
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(179) : error C2036: void *: неизвестный разм
ер
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(74) : error C2143: синтаксическая ошибка: от
сутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(75) : error C2143: синтаксическая ошибка: от
сутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : error C2275: EncEntry: недопустимое ис
пользование этого типа в качестве выражения
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(75): см. объявление "EncEntry"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : error C2065: priv: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : error C2223: выражение слева от "->enc
oder_RSTYPE" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : error C2065: resource_sz: необъявленны
й идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : warning C4047: функция: "ErlNifResourc
eType *" отличается по уровням косвенного обращения от "int"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : warning C4024: функция по указателю: р
азличные типы для формального и фактического параметров 1
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(76) : error C2198: функция по указателю: сли
шком мало аргументов для вызова
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(78) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(78) : error C2223: выражение слева от "->rec
ords_cnt" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(79) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(79) : error C2223: выражение слева от "->fie
lds_cnt" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(80) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(80) : error C2223: выражение слева от "->bin
" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(80) : error C2198: функция по указателю: сли
шком мало аргументов для вызова
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(83) : error C2275: ErlNifBinary: недопустимо
е использование этого типа в качестве выражения
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(132): см. объявлени
е "ErlNifBinary"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(83) : error C2146: синтаксическая ошибка: от
сутствие ";" перед идентификатором "ebin"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(83) : error C2065: ebin: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(83) : warning C4555: выражение не имеет резу
льтата; требуется выражение с побочным действием
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(84) : error C2065: ebin: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(84) : warning C4133: функция: несовместимые
типы - из "int *" в "ErlNifBinary *"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(85) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(85) : error C2223: выражение слева от "->bin
" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(85) : error C2065: ebin: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(85) : error C2224: выражение слева от ".data
" должно иметь тип структуры или объединения
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(85) : error C2224: выражение слева от ".size
" должно иметь тип структуры или объединения
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(85) : error C2198: memcpy: слишком мало аргу
ментов для вызова
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(87) : error C2275: ERL_NIF_TERM: недопустимо
е использование этого типа в качестве выражения
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(94): см. объявление
"ERL_NIF_TERM"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(87) : error C2146: синтаксическая ошибка: от
сутствие ";" перед идентификатором "list"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(87) : error C2065: list: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(87) : error C2065: head: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(87) : warning C4548: выражение перед запятой
не имеет результата; требуется выражение с побочным действием
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(87) : error C2065: tail: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(88) : error C2065: list: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(88) : warning C4242: =: преобразование "cons
t ERL_NIF_TERM" в "int", возможна потеря данных
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(89) : error C2143: синтаксическая ошибка: от
сутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(90) : error C2065: list: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(90) : error C2065: head: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(90) : warning C4133: функция: несовместимые
типы - из "int *" в "ERL_NIF_TERM *"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(90) : error C2065: tail: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(94) : error C2065: head: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(95) : error C2143: синтаксическая ошибка: от
сутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(96) : error C2065: records: необъявленный ид
ентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(96) : error C2065: i: необъявленный идентифи
катор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(96) : error C2109: для индекса требуется мас
сив или указатель
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(98) : error C2065: records: необъявленный ид
ентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(98) : error C2065: i: необъявленный идентифи
катор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(98) : error C2109: для индекса требуется мас
сив или указатель
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(100) : error C2065: records: необъявленный и
дентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(100) : error C2065: i: необъявленный идентиф
икатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(100) : error C2109: для индекса требуется ма
ссив или указатель
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(101) : error C2065: i: необъявленный идентиф
икатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(102) : error C2065: list: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(102) : error C2065: tail: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(104) : error C2065: list: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(104) : warning C4242: =: преобразование "con
st ERL_NIF_TERM" в "int", возможна потеря данных
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(105) : error C2065: i: необъявленный идентиф
икатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(106) : error C2065: list: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(106) : error C2065: head: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(106) : warning C4133: функция: несовместимые
типы - из "int *" в "ERL_NIF_TERM *"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(106) : error C2065: tail: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(110) : error C2065: head: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(111) : error C2143: синтаксическая ошибка: о
тсутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(113) : error C2065: fields: необъявленный ид
ентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(113) : error C2065: i: необъявленный идентиф
икатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(113) : error C2109: для индекса требуется ма
ссив или указатель
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(115) : error C2065: fields: необъявленный ид
ентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(115) : error C2065: i: необъявленный идентиф
икатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(115) : error C2109: для индекса требуется ма
ссив или указатель
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(116) : error C2065: i: необъявленный идентиф
икатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(117) : error C2065: list: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(117) : error C2065: tail: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(119) : error C2275: ERL_NIF_TERM: недопустим
ое использование этого типа в качестве выражения
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(94): см. объявление
"ERL_NIF_TERM"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(119) : error C2146: синтаксическая ошибка: о
тсутствие ";" перед идентификатором "ret"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(119) : error C2065: ret: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(119) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(119) : warning C4306: приведение типов: прео
бразование из "int" в "void *" большего размера
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(119) : warning C4242: =: преобразование "ERL
_NIF_TERM" в "int", возможна потеря данных
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(120) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(120) : warning C4022: функция по указателю:
несоответствие указателя для фактического параметра 1
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(121) : error C2065: ret: необъявленный идент
ификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(123) : error C2065: enc_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(123) : warning C4022: функция по указателю:
несоответствие указателя для фактического параметра 1
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(134) : error C2143: синтаксическая ошибка: о
тсутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(135) : error C2143: синтаксическая ошибка: о
тсутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : error C2275: DecEntry: недопустимое и
спользование этого типа в качестве выражения
c:\dev\n2o\deps\jsonx\c_src\jsonx.h(145): см. объявление "DecEntry"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : error C2065: dec_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : error C2065: priv: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : error C2223: выражение слева от "->de
coder_RSTYPE" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : error C2065: resource_sz: необъявленн
ый идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : warning C4047: функция: "ErlNifResour
ceType *" отличается по уровням косвенного обращения от "int"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : warning C4024: функция по указателю:
различные типы для формального и фактического параметров 1
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(136) : error C2198: функция по указателю: сл
ишком мало аргументов для вызова
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(138) : error C2065: dec_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(138) : error C2223: выражение слева от "->re
cords_cnt" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(139) : error C2065: dec_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(139) : error C2223: выражение слева от "->uk
eys_cnt" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(140) : error C2065: dec_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(140) : error C2223: выражение слева от "->ke
ys_cnt" должно указывать на структуру или объединение
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(142) : error C2275: ERL_NIF_TERM: недопустим
ое использование этого типа в качестве выражения
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(94): см. объявление
"ERL_NIF_TERM"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(142) : error C2146: синтаксическая ошибка: о
тсутствие ";" перед идентификатором "list"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(142) : error C2065: list: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(142) : error C2065: head: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(142) : warning C4548: выражение перед запято
й не имеет результата; требуется выражение с побочным действием
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(142) : error C2065: tail: необъявленный иден
тификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(143) : error C2143: синтаксическая ошибка: о
тсутствие ";" перед "тип"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(144) : error C2275: ERL_NIF_TERM: недопустим
ое использование этого типа в качестве выражения
c:\PROGRA~1\ERL510~1.1\erts-5.10.1\include\erl_nif.h(94): см. объявление
"ERL_NIF_TERM"
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(144) : error C2065: ukeys: необъявленный иде
нтификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(144) : error C2065: dec_entry: необъявленный
идентификатор
c:/dev/n2o/deps/jsonx/c_src/jsonx.c(144) : fatal error C1003: число ошибок превы
шает 100; остановка компиляции
ERROR: compile failed while processing c:/dev/n2o/deps/jsonx: rebar_abort
/home/whw/bak/n2o/n2o-1.8.0/samples/>make
fatal: Not a git repository (or any of the parent directories): .git
./mad get-deps
==> dependency: "git://github.com/evanmiller/erlydtl" tag: {tag,"0.8.0"}
==> dependency: "git://github.com/extend/cowboy" tag: {tag,"1.0.0"}
==> dependency: "git://github.com/extend/cowlib.git" tag: "1.0.0"
==> dependency: "git://github.com/extend/ranch.git" tag: "1.0.0"
==> dependency: "git://github.com/uwiger/gproc.git" tag: {tag,"0.3"}
Error evaluating script remove_deps.script
Error evaluating script check_edown.script
==> dependency: "https://github.com/esl/edown.git" tag: "HEAD"
==> dependency: "https://github.com/garret-smith/gen_leader_revival.git" tag: "HEAD"
==> dependency: "git://github.com/synrc/fs" tag: {tag,"0.8"}
==> dependency: "git://github.com/synrc/sh" tag: {tag,"0.8"}
==> dependency: "git://github.com/synrc/active" tag: {tag,"0.8"}
==> dependency: "git://github.com/synrc/mad" tag: {tag,"0.8"}
==> dependency: "git://github.com/synrc/rest" tag: {tag,"1.5.0"}
==> dependency: "git://github.com/synrc/kvs" tag: {tag,"1.5.0"}
==> dependency: "git://github.com/5HT/n2o" tag: {tag,"1.8.0"}
rm -rf apps/n2o_sample/priv/static/nitrogen
ln -s ../../../../deps/n2o/priv apps/n2o_sample/priv/static/nitrogen
./mad compile
==> "erlydtl"
==> "cowboy"
==> "cowlib"
Unknown file type: "/home/whw/bak/n2o/n2o-1.8.0/samples/deps/cowlib/src/cow_mimetypes.erl.src"
==> "ranch"
==> "gproc"
Error evaluating script remove_deps.script
Error evaluating script check_edown.script
==> "edown"
==> "gen_leader"
==> "fs"
==> "sh"
Port Compilation Error: <<99,99,58,32,67,111,114,101,70,111,117,110,100,97,116,
105,111,110,239,188,154,230,178,161,230,156,137,233,
130,163,228,184,170,230,150,135,228,187,182,230,136,
150,231,155,174,229,189,149,10,99,99,58,32,67,111,
114,101,83,101,114,118,105,99,101,115,239,188,154,
230,178,161,230,156,137,233,130,163,228,184,170,230,
150,135,228,187,182,230,136,150,231,155,174,229,189,
149,10,99,99,49,58,32,233,148,153,232,175,175,239,
188,154,230,151,160,230,179,149,232,175,134,229,136,
171,231,154,132,229,145,189,228,187,164,232,161,140,
233,128,137,233,161,185,226,128,156,45,102,114,97,
109,101,119,111,114,107,226,128,157,10,99,99,49,58,
32,233,148,153,232,175,175,239,188,154,230,151,160,
230,179,149,232,175,134,229,136,171,231,154,132,229,
145,189,228,187,164,232,161,140,233,128,137,233,161,
185,226,128,156,45,102,114,97,109,101,119,111,114,
107,226,128,157,10,99,99,49,58,32,233,148,153,232,
175,175,239,188,154,230,151,160,230,179,149,232,175,
134,229,136,171,231,154,132,229,145,189,228,187,164,
232,161,140,233,128,137,233,161,185,226,128,156,45,
102,114,97,109,101,119,111,114,107,226,128,157,10,99,
99,49,58,32,233,148,153,232,175,175,239,188,154,230,
151,160,230,179,149,232,175,134,229,136,171,231,154,
132,229,145,189,228,187,164,232,161,140,233,128,137,
233,161,185,226,128,156,45,102,114,97,109,101,119,
111,114,107,226,128,157,10,99,99,49,58,32,233,148,
153,232,175,175,239,188,154,230,151,160,230,179,149,
232,175,134,229,136,171,231,154,132,229,145,189,228,
187,164,232,161,140,233,128,137,233,161,185,226,128,
156,45,102,114,97,109,101,119,111,114,107,226,128,
157,10,99,99,49,58,32,233,148,153,232,175,175,239,
188,154,230,151,160,230,179,149,232,175,134,229,136,
171,231,154,132,229,145,189,228,187,164,232,161,140,
233,128,137,233,161,185,226,128,156,45,102,114,97,
109,101,119,111,114,107,226,128,157,10>>==> "sh"
Port Compilation Error: <<99,99,58,32,67,111,114,101,70,111,117,110,100,97,116,
105,111,110,239,188,154,230,178,161,230,156,137,233,
130,163,228,184,170,230,150,135,228,187,182,230,136,
150,231,155,174,229,189,149,10,99,99,58,32,67,111,
114,101,83,101,114,118,105,99,101,115,239,188,154,
230,178,161,230,156,137,233,130,163,228,184,170,230,
150,135,228,187,182,230,136,150,231,155,174,229,189,
149,10,99,99,49,58,32,233,148,153,232,175,175,239,
188,154,230,151,160,230,179,149,232,175,134,229,136,
171,231,154,132,229,145,189,228,187,164,232,161,140,
233,128,137,233,161,185,226,128,156,45,102,114,97,
109,101,119,111,114,107,226,128,157,10,99,99,49,58,
32,233,148,153,232,175,175,239,188,154,230,151,160,
230,179,149,232,175,134,229,136,171,231,154,132,229,
145,189,228,187,164,232,161,140,233,128,137,233,161,
185,226,128,156,45,102,114,97,109,101,119,111,114,
107,226,128,157,10>>==> "active"
==> "mad"
==> "rest"
==> "kvs"
==> "n2o"
==> "/home/whw/bak/n2o/n2o-1.8.0/samples/apps"
==> "/home/whw/bak/n2o/n2o-1.8.0/samples/apps/n2o_sample"
==> erlydtl
/home/whw/bak/n2o/n2o-1.8.0/samples/>
Hello, I hope this is the right place to ask this question.
Does n2o support https, hence secure websockets? I tried to switch to https in my app, but the server won't try protocol upgrade (page is rendered and then no events/actions work).
I found many element does not support 'text' property yet, such as label, span or button.
The compiling shell said : field text undefined in record button.
Is it a bug?
erlang.mk is compatible with projects that use rebar, so long as there is a Makefile.
Also, in the .src file there needs to be a {modules,[]} declared.
With a recent rebar, REBAR_DEPS_DIR is respected and a dependency's deps are placed in the parent's root deps directory.
/Peter
I really like the quick edit-compile-test cycle.
Since the clients is listening on a websocket, I assume it would be possible to ask itself to reload immediately. Reloading the url is not that hard, just press Enter, but the websocket is broken and reconnected.
It would be great to be able to change the default bridge (n2o_cowboy). It is possible now by using the BRIDGE define, but you can't easily do it when using n2o as dependency. The only way I found so far is adding erl_opts to n2o's rebar config, but I'd like to avoid changing dependencies' code.
Could it be configurable via application env, like for instance session handler?
As http://www.erlang.org/doc/apps/erts/erl_ext_dist.html#id87902 sint should be 1 byte unsigned int, however it is decoded by bert.js as signed int.
Hello again,
I ran into a bug - see the title. Example:
wf:update(test_id, <<"This string contains ' an apostrophe">>);
renders into:
$('#test_id').html('This string contains ' an apostrophe');
which of course creates a syntax error.
I can imagine there are some more chars that might cause similar problems.
Kind regards.
N2O in default configuration allows remote code execution. I was able to do this with the sample application. I'm not sure if production apps do any kind of filtering to prevent this. You can contact me privately for PoC code. [email protected]
Can I let it support the browsers not including web socket such as IE8/9?
Thanks.
Все-таки либо у Вас что-то незадокументировано, либо ошибка. Я подчеркнул где.
13:53:03.290 [error] Cowboy handler bullet_handler terminated in bullet_handler:websocket_handle/3 with reason:
call to undefined function undefined:control_event("filename", {query_file,"/Users/rad/git/erlang/Pearl-SMS-
Stream/rels/web/node/lib/web-1/priv/static",[],<<"1.c...">>,…})
As the title say!
Therefore make && make console failed!
I have to use tag 1.8 and it works!
Это, конечно, проблема make freebsd-way, однако unknown modifier ',' говорит оно при запуске консоли примера.
What's happend?
Only info/3 worked well in follow functions:
info(Module,String, Args) -> log(Module,String, Args, info_msg).
info(String, Args) -> log(?MODULE, String, Args, info_msg).
info(String) -> log(?MODULE, String, [], info_msg).
Perhaps warning/1,2,3 and error/1,2,3 have the same problems.
I'm just setted up n2o as described in http://synrc.com/framework/web/setup.htm and when try to login from page http://carbona.su:8000/ I've got next errors:
Chrome console shows:
Object function (e,n){return new x.fn.init(e,n,t)} has no method 'ajax'
and Firefox console shows:
Firefox can not setup connection with server ws://carbona.su:8000/ws/. @ http://carbona.su:8000/static/nitrogen/bullet.js:125
TypeError: $.ajax is not a function @ http://carbona.su:8000/static/nitrogen/bullet.js:101
Hello,
wf:logout() ends up calling n2o_session:clear(), which is undefined. Can I hope for this to be implemented in near future?
Thanks and kind regards.
привет
тоже была запарка с wf:update\wf:js_escape как в #53 но проблема в том что я передавал в wf:update #dtl, т.е. js_escape нужно делать после wf:render - имхо нужно в action_jq это вставить
оригинал
[wf:to_list(T),wf:to_list(P),binary_to_list(iolist_to_binary(wf:render(R)))]);
....
[wf:to_list(T),wf:to_list(P),binary_to_list(iolist_to_binary(wf:render(R)))]).
правки
[wf:to_list(T),wf:to_list(P),binary_to_list(iolist_to_binary(wf:js_escape(wf:render(R))))]);
....
[wf:to_list(T),wf:to_list(P),binary_to_list(iolist_to_binary(wf:js_escape(wf:render(R))))]).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.