小编Din*_*esh的帖子

使用npm安装d3会导致上下文错误

得到一些神秘的上下文错误(但其他安装似乎没问题.)

npm install d3

    MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install
Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  
[C:\Users\dinesh\m3\node_modules\d3\node_modules\jsdom\node_modules\contextify\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! …
Run Code Online (Sandbox Code Playgroud)

npm d3.js

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

在ios上,在离子混合应用程序中,如何绕过证书检查(使用自签名证书)

我的离子/ cordova应用程序现在在与HTTPS后端一起使用时会出错

`The certificate for this server is invalid`
Run Code Online (Sandbox Code Playgroud)

我在我的开发环境中,使用自签名证书,并使用IP地址连接后端.

我检查了证书openssl s_client,它看起来有效.事实上,我可以使用与这个混合应用程序的Android版本相同的后端.

是否有一些plist或其他Xcode设置接受自签名证书或一起忽略此测试 - 类似于NSAppTransportSecurity::NSAllowsArbitraryLoads设置?

- 编辑

我有<access origin="*"/>我的config.xml档案.

非常感谢

ssl-certificate ios cordova ionic

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

使用 SAML 2.0 出现 CORS 错误

尝试使用 SAML 2.0 对访问进行身份验证时出现 CORS 错误,我完全不知所措。

我们有一个后端 Web 服务器,它提供 3 个不同的路径/html /js/services. 我们已经定义了一个 SAML ID 提供者,导入了 IDP 元数据并在服务器端配置了一个服务,其中服务 url 已设置为/html。这生成了一些已在 IDP 世界端注册的元数据 xml。

从新的浏览器开始,用户输入https://host:port/html并显示联合登录页面。用户登录后,后端服务器返回会话cookies和剩余请求/js/services顺利运行​​。

现在,当用户关闭浏览器并重新打开时,HTML、JS/CSS 将从浏览器缓存中提供。从应用程序到后端服务器的第一个出站请求是 to/services/a-service-name并且失败并显示以下内容:

XMLHttpRequest cannot load https://fed.xxx.com/fed/idp/samlv20?SAMLRequest=some-charater-string. 
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'https://my-host:port' is therefore not allowed access.

NETWORK ERROR; xhr= 0 error ; settings= GET /services/a-service-name <<<<<<<<<< this print is from my app
Run Code Online (Sandbox Code Playgroud)

是什么赋予了?我需要在我的后端服务器端创建 3 个服务提供者(即 …

cors saml-2.0

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

如何在 .ssh/authorized_keys 中添加命令

我读到man sshd当用户使用特定密钥登录时可以添加登录后处理:

environment="FOO=BAR" ssh-rsa AAA... keytag
Run Code Online (Sandbox Code Playgroud)

但是当我尝试通过 ssh 进入系统时,目标主机不会注册该线路,而是要求输入密码。添加这个的正确方法是什么?我想做类似的事情

command="echo|mail -s ${USER},${HOSTNAME} a.monitored.email@example.com" ssh-rsa AAA... keytag
Run Code Online (Sandbox Code Playgroud)

我使用的是 Suse SLE 11 SP2。

谢谢迪内什

sshd

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

postgresql存储过程返回多个表

我有一个函数需要从多个表返回结果.这可以在Postgresql中实现吗(9.1现在,计划很快迁移到9.2)?如果是这样,怎么样.

例如

create or replace function f1()
returns ???
as $body$ begin
    return query select x.*
        from users x;
    return query select x.*
        from user_preferences x join users y using(user_id) ; -- more where clauses
    return query select x.*
        from user_permissions x join users y using(user_id) ; -- more clauses
end; $body$ language 'plpgsql';
Run Code Online (Sandbox Code Playgroud)

我考虑的替代方案是:(a)做一个用户和user_preferences(等)的笛卡尔积,但这将导致一个巨大的结果表和一个真正复杂的代码.(b)首先对用户进行选择,然后迭代用户列表并根据其属性进行额外的迭代,但这将导致太多的数据库调用.而且,为什么我要编写SQL非常擅长的代码?

是否有一种简洁的方法可以从pg函数中获取多个结果集?我搜索了postgresql文档但找不到任何指导.

非常感谢.

postgresql plpgsql

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

如何使用IFS从变量拆分中读取数组

我试图通过拆分变量来初始化读取数组.

x=abc:def:gh
declare -a xa
# I want xa[0] = abc, xa[1] = def, and so on

IFS=: read -a xa <<< $x
echo ${#xa[@]} $xa ######### the above did not work
1 abc def gh

# but type the same value from console?
IFS=: read -a xa
abc:def:gh ########## this is what I typed in
echo ${#xa[@]} $xa ######### this worked
3 abc
Run Code Online (Sandbox Code Playgroud)

使用<<<读取变量时如何使IFS工作?

非常感谢您的建议.

此外,这是我的实际问题,以防万一有更智能的解决方案.我使用SVN,不同的人有兴趣知道不同的路径集.在SVN提交后,我想过滤更改列表,并根据他们的愿望向不同的人群发送电子邮件.所以我想我会在hooks-env中设置类似下面的内容

NOTIFY_LIST=mailinglist:grep options:grep options:......
Run Code Online (Sandbox Code Playgroud)

然后,在post-commit中,解析svnlook数据以查看是否有任何候选电子邮件.有没有一种声明性的方式可以说这种和这样的路径的变化对这样的人员名单有意义?

谢谢Dinesh

编辑:尝试组合IFS和简单xa=($x).因此看起来IFS=: 不能与阅读合并.所以我有办法完成我的工作,但仍然好奇发生了什么?

IFS=: xa=($x) …
Run Code Online (Sandbox Code Playgroud)

bash

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

在-exec arg上找到命令fusses

我正在尝试find从脚本构建和运行命令.但是我收到了一个非常神秘的错误信息find.以下基本总结了我如何构建命令行并运行它

$ xx="find . -name 'p*' -mmin +10 -exec echo {} \\;"
$ echo "$xx" #.....and I get the same print from echo $xx
find . -name 'p*' -mmin +10 -exec echo {} \;
$ $xx
find: missing argument to `-exec'
$ find . -name 'p*' -mmin +10 -exec echo {} \;
./p2.sh
./p1.sh
$ read xx
find . -name 'p*' -mmin +2 -exec echo {} \\;
$ $xx
find: missing argument to `-exec'
Run Code Online (Sandbox Code Playgroud)

我被困住了,非常感谢你的帮助.我也想知道造成这种情况的原因.我在SLES上使用bash 3.2.51. …

bash find

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

标签 统计

bash ×2

cordova ×1

cors ×1

d3.js ×1

find ×1

ionic ×1

ios ×1

npm ×1

plpgsql ×1

postgresql ×1

saml-2.0 ×1

sshd ×1

ssl-certificate ×1