小编Jam*_*mie的帖子

包含ACL条件下的功能

我有一个名为MedicalFile的资产,其中包含对组织的引用.参与者HealthCareProfessional也属于一个组织.

现在,我想定义一个ACL规则,该规则限制医疗保健专业人员仅查看MedicalFile与其组织相关联的医疗文件.

我想出了以下规则:

rule OrganisationMedicalFilePermission {
    description: "An organisation may updates a medical file which they have permission from"
    participant(h): "nl.epd.blockchain.HealthCareProfessional"
    operation: ALL
    resource(m): "nl.epd.blockchain.MedicalFile"
    condition: (m.organisations.includes(h.organisation))
    action: ALLOW
Run Code Online (Sandbox Code Playgroud)

}

一旦我使用Loopback调用RESTful API,这将导致一个空数组.我被认证为医疗保健专业人士.

资产和参与者:

asset Organisation identified by id {
      o String id
      o String name
      o String city
      o String zipCode
      o String street
      o String houseNumber
      o String houseNumberExtra optional
      o OrganisationType organisationType
}

asset MedicalFile identified by bsn {
  o String                 bsn
  --> Patient              owner
  --> Patient[]            mentors …
Run Code Online (Sandbox Code Playgroud)

hyperledger-fabric hyperledger-composer

2
推荐指数
1
解决办法
1176
查看次数

Facebook oauth2登录返回(400)错误请求

我正在将我的C#ASP.NET MVC 4 facebook登录转换为VB ASP.NET MVC 2版本项目.

不幸的是我得到这个错误,我无法弄清楚问题是什么.

主要错误:Bad Request 400错误.更详细的错误:

WWW-Authenticate:OAuth"Facebook平台""invalid_code""验证验证码时出错.请确保您的redirect_uri与您在OAuth对话框请求中使用的redirect_uri相同"

控制器:

<HttpPost> _
    <AllowAnonymous> _
    Public Function ExternalLogin(provider As String, returnUrl As String) As ActionResult
        Return New ExternalLoginResult(provider, Url.Action("ExternalLoginCallback", New With { _
            Key .ReturnUrl = returnUrl _
        }))
    End Function



    Public Function ExternalLoginCallback(returnUrl As String) As ActionResult
        Dim result As AuthenticationResult = OAuthWebSecurity.VerifyAuthentication(Url.Action("ExternalLoginCallback", New With { _
            Key .ReturnUrl = returnUrl _
        }))

        ' Eind resultaat krijg je hier
        If result.IsSuccessful Then
            ' Temporary Properties
            Dim strTempGeslacht …
Run Code Online (Sandbox Code Playgroud)

vb.net asp.net facebook facebook-graph-api

1
推荐指数
1
解决办法
2704
查看次数

尝试在空对象引用上调用虚拟方法'android.content.Context com.google.android.gms.common.api.GoogleApiClient.getContext()'

我在我的Android应用程序中使用Ionic 2.

每当我尝试使用Cordova Google Plus插件登录时,都会返回以下错误:

尝试在空对象引用上调用虚拟方法'android.content.Context com.google.android.gms.common.api.GoogleApiClient.getContext()'

我正在安装并激活Google+的真实设备(Android 5)上进行测试.

 GooglePlus.login().then((data) => {
  console.log(data);
}).catch((data) => {
  console.log(data);
});
Run Code Online (Sandbox Code Playgroud)

google-plus cordova ionic2

1
推荐指数
1
解决办法
2154
查看次数

Jquery - 将文本编辑为多个元素

我一直在研究这个错误2个小时,这让我发疯了.

我想要做的是从元素中获取一个数字(可以工作)并更改数字并将其替换为前一个数字.但是数字会被字符串替换,之前的数字仍然存在.

HTML:

<span class="likesAmount">1</span>
Run Code Online (Sandbox Code Playgroud)

JQuery的:

  //get number
  Likes = parseInt($(this).parent().parent().find('.likesAmount').text());
  //replace number
  $(this).parent().parent().find('.likesAmount').text(Likes = (Likes - 1 == -1 ? Likes = 0 : Likes - 1));
Run Code Online (Sandbox Code Playgroud)

我尝试了诸如html,数据之类的东西,将其解析为带有文本等的int.

提前致谢!

编辑:对不起的家伙,我忘了使用我的commen sence它进入喜欢两次导致不正确的结果..此代码与它无关.但是感谢帮助我!

html jquery

0
推荐指数
1
解决办法
85
查看次数

如果内容不适合,如何在新页面上开始内容

我正在使用 Pechkin 将带有 css 的 html 内容转换为 pdf 文件。

我面临的问题是 html 块的一部分被切断,因为它不再适合当前页面。

现在我想要的是,当内容不适合当前页面时,它会在下一页上创建它。

佩希金可能做到这一点吗?

代码:

var pechkin = new SynchronizedPechkin(new GlobalConfig());
return pechkin.Convert(new ObjectConfig()
                         .SetLoadImages(true).SetZoomFactor(1.5)
                         .SetPrintBackground(true)
                         .SetScreenMediaType(true)
                         .SetPrintBackground(true)
                         .SetCreateExternalLinks(true), html);
Run Code Online (Sandbox Code Playgroud)

问题

.net c# pdf-generation pechkin tuespechkin

0
推荐指数
1
解决办法
3158
查看次数