问题描述
我一直在尝试实现Silhouette库来为Angular前端提供一些基本的JWT身份验证,但是遇到了一些#+BEGIN_SRC julia
function idealf(x::Array{Float64,2})
y = sort(x,dims=1);
n = length(x);
j = floor(Int64,n/4+5/12) # 25%ile is in [y[j],y[j+1]]
k = n-j+1 # 75%ile is in [y[k],y[k-1]]
g = n/4+5/12 - j # weighting for the two data surrounding quartiles.
(1-g).*y[j]+g.*y[j+1],(1-g).*y[k]+g.*y[k-1]
end
function outBox(x::Array{Float64,2}; mBox::Bool=false,gval::Real=NaN,method::Bool=true)
n = length(x);
lower_quartile,upper_quartile = idealf(x)
iqr = upper_quartile-lower_quartile
cl = cu = 0.0
if mBox
if isnan(gval)
gval=(17.63*n-23.64)/(7.74*n-3.71)
end
cl = median(x) - gval*iqr
cu = median(x) + gval*iqr
elseif !mBox
if isnan(gval)
gval=1.5
end
cl = lower_quartile - gval*iqr
cu = upper_quartile + gval*iqr
end
flag = dropdims((x.<cl) .| (x.>cu),dims=2)
vec = collect(1:n)
outid = vec[flag]
keepid = vec[.!flag]
outval = x[flag]
nout = length(outid)
if method && !mBox
METHOD = "Outlier detection method using \nthe ideal-fourths based Boxplot rule\n"
elseif method && mBox
METHOD = "Outlier detection method using \nthe ideal-fourths based Boxplot rule\n(using the modification suggested by Carling (2000))\n"
else
METHOD = nothing
end
return outid,keepid,outval,nout;
end
a=rand(20,1)*10; a[10]=1000.0;a[2]=2000.0;
outBox(a)
#+END_SRC
#+RESULTS:
: ([2,10],[1,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20],[2000.0,1000.0],2)
错误的问题。为了提供一些上下文,我正在尝试验证仅由用户名和密码组成的管理员登录名。我正在使用它(为Silhouette添加了No implementation for [...] was bound
字段)充当Silhouette的LoginInfo
身份验证存储库,而我的User
也扩展了Silhouette的AdminService
。
我遵循了一些实现基本Silhouette环境的示例项目,但是我还没有克服guice编译器错误。在写完我的Identity Service
本质上是这些示例项目中的内容之后(this是我可以找到的最新项目),尝试将SilhouetteModule
注入我的控制器类中会导致一些结果guice CreationException找不到绑定的实现。这些错误发生在CredentialsProvider
和AuthInfoRepository
上。
感谢您的帮助!很难找到这个错误,即使查看示例项目使我在实现Silhouette方面走得更远,但在这一点上我还是很困惑。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)