도움이 되었습니까?

해결책

You can disable such behavior with shell:strings/1 function starting with Erlang R16B.

Just remember that this is option global to all node shells, and it might be wise to set it back after finishing playing is shell in longer living nodes.

다른 팁

I don't know if it's possible to change the default behavior of the shell, but you can at least format your output correctly, using io:format.

Here is an example:

1> io:format("~p~n", [[65, 66, 67]]).
"ABC"
ok
2> io:format("~w~n", [[65, 66, 67]]).
[65,66,67]
ok

And since the shell is only for experimenting / maintenance, io:format() should be at least enough for your real application. Maybe you should also consider to write your own format/print method, e.g. formatPerson() or something like that, which formats everything nicely.

편집 : 문제를 해결할 수있는 더 안정적인 방법을 발견했기 때문에 솔루션을 업데이트했습니다.

미래 에이 문제가있는 다른 사람의 경우 문제가 무엇인지 알아 냈습니다.

SharePoint \ System 계정과 관련하여 SharePoint에서 다른 계정 (일반적으로 서비스 계정)에서 사용하는 별칭이 많거나 적습니다. 이 경우 내 응용 프로그램 풀에서 사용하는 계정입니다. 참조 : SharePoint \ System 정보 - 어떤 계정입니까? 그것이 어떻게 결정됩니까? .

워크 플로는 지정된 SSS 또는 BDC가 사용하고있는 계정을 실제로 사용하는 것으로 나타납니다. 내 경우에, 내 SharePoint 사이트가 기본적으로 사용중인 Secured Secure Service "가 SP_ServiceApps 계정을 실행 중임으로써 SP_ServiceApps 계정을 실행중인 것입니다. SharePoint 서버에서 IIS 관리자를 시작하고 다양한 응용 프로그램 풀 중 적절한 SSS를 찾아이를 결정했습니다. sp_serviceApps 계정이 ID로 나열되었습니다.

SSS가 작동하도록 어려움을 겪기 때문에 나는 대신 BDC ID를 사용하기로 결정했습니다. SharePoint Designer에서 먼저 사용자 정의 비즈니스 데이터 연결 서비스 (SP_ServiceApps)에서 사용하는 서비스 계정을 결정했습니다. 둘째, SP_ServiceApps 및 SharePoint / System 계정은 외부 목록에서 "Full Control", "Design"및 "Contribute"권한을 모두주었습니다. 이것은 아마도 오버 킬 일이지만 외부 목록에 액세스 할 수 있는지 확인하고 싶었습니다. 또한 원래 "완전한 통제"권한이 있지만, 각각에 대해 "사용자 권한 편집"을 클릭하면 결과 대화 상자가 사용 권한이 없었습니다. 그런 다음 SharePoint 서버에서 Reverttoself를 사용하도록 설정했습니다. BCS 문제 인증 모드 및 Reverttoself 마지막으로, 중앙 관리자 -> 응용 프로그램 관리 -> 서비스 응용 프로그램 관리 -> [비즈니스 데이터 연결 서비스 이름] -> 외부 시스템 (리본의보기에서) -> [외부 시스템 이름] -> [외부 시스템 인스턴스 이름] -> 인증 모드를 "BDC ID"로 설정하십시오.

last (그리고 이것은 내 부품의 멍청한 실수였습니다), 외부 콘텐츠 유형에서 잘못 맵핑 된 식별자가있었습니다. 나는 "vendorname"을 선택할 때 "Vendoremail"을 식별자로 실수로 선택했습니다. 나중에 "항목 만들기"작업을 만들었을 때 "Vendorname"이 실수로 선택한 "Vendoremail"에 매핑되고 "vendorname"이 아닌 "vendorname"을 식별자로 매핑했습니다. 올바른 식별자가있는 새 외부 콘텐츠 유형을 작성 하여이 문제를 해결했습니다.

이후 내 워크 플로우가 외부 목록에 성공적으로 썼습니다.

As of Erlang/OTP R16B, you can use the function shell:strings/1 to turn this on or off. Note that it also affects printing of things that are actually meant to be strings, such as "foo" in the following example:

1> {[8,9,10], "foo"}.
{"\b\t\n","foo"}
2> shell:strings(false).
true
3> {[8,9,10], "foo"}.   
{[8,9,10],[102,111,111]}

No, there is no way to disable it. The best alternative I find is to either explicitly print out the value in the query (with io:format) or after the fact do: io:format("~w\n", [v(-1)]).

I don't think you can prevent it. Prepending an atom seems like a kludge - it does alter your original string.

I typically use lists:flatten(String) to force it to a string - especially the returnvalue of io_lib:format() does not always print as a string. Using lists:flatten() on it makes it one.

I use the following "C-style":

sprintf(Format) ->
     sprintf(Format, []).
sprintf(Format, Args) ->
    lists:flatten(io_lib:format(Format, Args)).

The problem is that the string is not a type in Erlang. A string is just a list of integers, so there's no way for the shell to distinguish a printable string from a generic list. Don't know if this answer to your question.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top