小编Gob*_*ins的帖子

交叉编译单臂

没有人能在没有草稿箱或qemu的情况下成功地为Linux下的ARM交叉编译mono?

(也许使用distcc或一些交叉编译器工具链)

mono arm cross-compiling embedded-linux

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

httpsquest和javascript中的二进制数据

在经过多次尝试阅读httprequest的响应后仍然苦苦挣扎,这是一个代表jpg图像的二进制数据流.

编辑:整件事

xmlhttp = false;
        /*@cc_on@*/
        /*@if (@_jscript_version >= 5)
        // JScript gives us Conditional compilation, we can cope with old IE versions.
        // and security blocked creation of the objects.
        try {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (E) {
                xmlhttp = false;
            }
        }
        @end@*/
        if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
            try {
                xmlhttp = new XMLHttpRequest();
            } catch (e) {
                xmlhttp = false;
            }
        } …
Run Code Online (Sandbox Code Playgroud)

html javascript xmlhttprequest binary-data responsetext

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

如何在码头上运行肥皂网络服务?

我正在努力让一个肥皂网络服务在我的嵌入式码头服务器上运行。

我遵循了这个德语教程(ofc不起作用): http://www.torsten-horn.de/techdocs/jee-jax-ws.htm#Deployment-im-Webserver

相关代码片段:

Endpoint ep = Endpoint.publish( url, new BuecherServiceImpl() );
int anzahlBuecherResult = TestWsClient.test( "WsMitEndpointIntegrTest", url, 4000000000L, anzahlBuecher, true );


public static int test( String testName, String url, long startIsbn, int anzahlBuecher, boolean trace ) throws Exception
{
  BuecherServiceIntf buecherService;
  if( url.equalsIgnoreCase( "direkt" ) ) {
     buecherService = new BuecherServiceImpl();
  } else {
     System.out.println( testName + ": " + url );
     Service service = null;
     int timeoutSekunden = 20;
     while( service == null ) {
        try {
           //here …
Run Code Online (Sandbox Code Playgroud)

java soap web-services jetty jax-ws

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

如何在Swagger中使用自定义模板

我有我的模板的JavaJaxRs字典:

/templates/JavaJaxRs
Run Code Online (Sandbox Code Playgroud)

我编辑了其中一些.并希望将它们用于我的API生成(代码的灵感来自这种方法来自https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen-maven-plugin/src/main /java/io/swagger/codegen/plugin/CodeGenMojo.java):

    System.out.println("Generating API for: " + location);
    DefaultGenerator generator = new DefaultGenerator();
    Swagger swagger = new SwaggerParser().read(location);
    CodegenConfig config = CodegenConfigLoader.forName(this.language);
    config.setOutputDir(new File(this.apiGeneratedSrcPath).getPath());

    if (null != templateDirectory) {
        config.additionalProperties().put(TEMPLATE_DIR_PARAM, templateDirectory);
    }
    if (null != modelPackage) {
        config.additionalProperties().put(MODEL_PACKAGE_PARAM, modelPackage);
    }
    if (null != apiPackage) {
        config.additionalProperties().put(API_PACKAGE_PARAM, apiPackage);
    }
    if (null != invokerPackage) {
        config.additionalProperties().put(INVOKER_PACKAGE_PARAM, invokerPackage);
    }

    if (configOptions != null) {
        for (CliOption langCliOption : config.cliOptions()) {
            if (configOptions.containsKey(langCliOption.getOpt())) {
                config.additionalProperties().put(langCliOption.getOpt(),
                        configOptions.get(langCliOption.getOpt()));
            }
        }
    }

    if …
Run Code Online (Sandbox Code Playgroud)

java mustache swagger

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

adfs (oauth2) 令牌验证如何?

我为 OAuth2 设置了 ADFS3.0,我终于在我的客户端应用程序上获得了“访问令牌”。

像这样的东西:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{ 
    "access_token":"<access_token>",
    "token_type":"bearer",
    "expires_in":3600
}
Run Code Online (Sandbox Code Playgroud)

令牌由标头部分、有效负载和签名组成。

现在我将带有令牌的请求发送到我的资源服务器。我想根据 ADFS(身份验证服务器和 IDP)验证资源服务器中的令牌。

这是我在 adfs 上的证书:

CertificateType : Token-Signing
IsPrimary       : True
StoreLocation   : CurrentUser
StoreName       : My
Thumbprint      : xyz
Run Code Online (Sandbox Code Playgroud)

如何才能做到这一点?

更新: 有关令牌的一些信息:

标题:

{
  "typ": "JWT",
  "alg": "RS256",
  "x5t": "abc"
}
Run Code Online (Sandbox Code Playgroud)

有效负载:

{
  "aud": "https://serverurl",
  "iss": "http://.../adfs/services/trust",
  "iat": 1473063317,
  "exp": 1473066917,
  "auth_time": "2016-09-05T08:15:17.875Z",
  "authmethod":     "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport",
  "ver": "1.0",
  "appid": "some-uid"
}
Run Code Online (Sandbox Code Playgroud)

签名:

{
  RSASHA256(
    base64UrlEncode(header) + "." +
    base64UrlEncode(payload),
    Ceritifate/secret
} 
Run Code Online (Sandbox Code Playgroud)

计划授权授予流程(简短版本,无授权代码详细信息):

我们有自己的客户端应用程序(颁发者),它从 …

java adfs oauth-2.0 jwt windows-server-2012-r2

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

如何调用c#(mono,.net)方法,来自本地c的委托

是否可以从本机c代码(以及如何)调用托管代码(可能在类或库中)编写的c#方法?

谢谢

编辑:使用"c#"我主要是指mono或甚至portable.net,操作系统是Linux

c c# mono native compilation

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

如何让Eclipse(pydev)在打开文件时自动折叠所有注释?

有没有办法在我打开python文件时eclipse(编辑:在windows下)自动折叠所有注释和文档字符串?

python eclipse pydev folding

4
推荐指数
2
解决办法
2016
查看次数

ADFS作为OAuth2提供商/认证服务器可能吗?

我们要设置ADFS 3.0以启用基于OAuth2的身份验证.我已阅读了大量文档,但仍不清楚是否支持这些文档.

ADFS可以用作oauth的授权服务器,还是ADFS中的oauth2支持仅用作另一个授权服务器的客户端?

任何有关将adfs设置为oauth提供者/服务器的帮助都表示赞赏.

authentication authorization adfs oauth-2.0 adfs3.0

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

Swagger-ui api(资源)的名字是怎么生成的?

当我使用 swagger 创建 API 时,通常我的 API 具有资源的名称:

Tasks
/tasks
/tasks/{id}
etc.
Run Code Online (Sandbox Code Playgroud)

有时我只得到一个默认值:

Default
GET /tasks
GET /tasks/{uuid}
etc.
Run Code Online (Sandbox Code Playgroud)

什么决定了生成的 API 的标头名称?

期望行为的屏幕截图(任务有时是默认设置):

在此处输入图片说明

json swagger swagger-ui

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

git fatal:从另一个远程挑选提交时坏对象

我有两个远程仓库遇到这种情况:

my-repo
  -master
  -mybranch (branch-to-cherry-pick-to)

other-repo
  -master (branch-to-cherry-pick-from)
Run Code Online (Sandbox Code Playgroud)

所以我想从其他远程主分支中挑选一些到我的分支。

我通过执行以下操作添加了另一个遥控器:git add remote other-origin somegitrepo并验证了git remote -v它显示了我的输出,如下所示:

origin my-repo (fetch)
origin my-repo (push)
other-origin other-repo (fetch)
other-origin other-repo (push)
Run Code Online (Sandbox Code Playgroud)

现在,当我尝试时,git cherry-pick commitnr我收到fatal: bad object 错误。

顺便说一句,我想挑选的提交:https://github.com/wekan/wekan/pull/1003/commits

我也做了git fetch --all

这里有什么问题?

git

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