我在Mac OSX Mavericks上使用MAMP.我想安装最新的XDebug,v2.2.4.根据XDebug向导,我下载了XDebug 2.2.4源代码.我的系统上安装了许多版本的phpize - 一个位于/ usr/bin /中,还有许多其他版本的MAMP.MAMP为它包含的每个PHP版本提供所需的phpize.
寻求使用正确的phpize,根据XDebug向导说明 - http://xdebug.org/docs/faq#custom-phpize - 我通过以下方式运行php.5 for PHP 5.5.3:
/Applications/MAMP/bin/php/php5.5.3/bin/phpize
Run Code Online (Sandbox Code Playgroud)
..得到了这个输出:
grep: /Applications/MAMP/bin/php/php5.5.3/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.3/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.3/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Run Code Online (Sandbox Code Playgroud)
万一这不是一个错误(因为它似乎我遵循XDebug向导),然后我运行configure via:
./configure --with-php-config=/Applications/MAMP/bin/php/php5.5.3/bin/php-config
Run Code Online (Sandbox Code Playgroud)
......我跑了:
make
Run Code Online (Sandbox Code Playgroud)
...但得到了这个错误:
fatal error: 'php.h' file not found
Run Code Online (Sandbox Code Playgroud)
在OSX上构建XDebug以供MAMP使用的正确方法是什么?
非常感谢所有人的想法或信息.
我正在使用Sequelize连接到Postgres数据库.我有这个代码:
return Promise.resolve()
.then(() => {
console.log('checkpoint #1');
const temp = connectors.IM.create(args);
return temp;
})
.then((x) => console.log(x))
.then((args) =>{
console.log(args);
args = Array.from(args);
console.log('checkpoint #2');
const temp = connectors.IM.findAll({ where: args }).then((res) => res.map((item) => item.dataValues))
return temp;
}
)
.then(comment => {
return comment;
})
.catch((err)=>{console.log(err);});
Run Code Online (Sandbox Code Playgroud)
在检查点#1的第一个.then块中,新记录成功添加到Postgres数据库.在console.log(x)在未来再块,这被记录到控制台:
{ dataValues:
{ id: 21,
fromID: '1',
toID: '2',
msgText: 'Test from GraphIQL',
updatedAt: Wed Oct 12 2016 09:52:05 GMT-0700 (PDT),
createdAt: Wed Oct 12 2016 09:52:05 GMT-0700 (PDT) …Run Code Online (Sandbox Code Playgroud) 在下面的代码中:
$string1 = "function doesn't work as expected";
$string2 = html_entity_decode($string1);
Run Code Online (Sandbox Code Playgroud)
$string2 仍然包含:
'
Run Code Online (Sandbox Code Playgroud)
...调用 html_entity_decode() 之后。
我已经检查过有关此主题的其他主题,但尚未找到答案。我缺少什么?
我正在尝试让 AWS SageMaker 调用 AWS Comprehend。我在 SageMaker 中收到此消息:
ClientError:调用 StartTopicsDetectionJob 操作时发生错误 (AccessDeniedException):用户:arn:aws:sts::545176143103:assumed-role/access-aws-services-from-sagemaker/SageMaker 未被授权执行:iam:PassRole on资源:arn:aws:iam::545176143103:role/access-aws-services-from-sagemaker
在创建 Jupyter notebook 时,我使用了这个角色:
arn:aws:sagemaker:us-east-2:545176143103:notebook-instance/access-comprehend-from-sagemaker
...附有以下政策:
我在 SageMaker 中使用相同的 IAM 角色:
data_access_role_arn = "arn:aws:iam::545176143103:role/access-aws-services-from-sagemaker"
Run Code Online (Sandbox Code Playgroud)
看起来我正在为该角色提供所需的所有访问权限。我该如何纠正这个错误?
amazon-web-services amazon-iam amazon-sagemaker amazon-comprehend
我有三个不同的 PostGres 表,每个表包含不同类型的同事。每种类型的数据库字段都不同——这就是它们位于三个单独的表中的原因。
我有一个组件可以访问任何类型的同事。现在从我迄今为止遇到的示例来看,一个组件通常与一个 GraphQL 查询相关联,例如:
const withData = graphql(GETONEASSOCIATE_QUERY, {
options({ navID }) {
return {
variables: { _id: navID}
};
}
,
props({ data: { loading, getOneAssociate } }) {
return { loading, getOneAssociate };
},
});
export default compose(
withData,
withApollo
)(AssociatesList);
Run Code Online (Sandbox Code Playgroud)
似乎给定的 GraphQL 查询只能返回单一类型的记录,例如在模式中:
getOneAssociate(associateType: String): [associateAccountingType]
Run Code Online (Sandbox Code Playgroud)
问题:是否可以设计一个 GraphQL 模式,使得单个查询可以返回不同类型的对象?解析器可以接收一个 AssociateType 参数,该参数告诉它要引用哪个 postGres 表。但是架构会是什么样子,以便它可以根据需要返回 AssociateAccountingType、associateArtDirectorType、associateAccountExecType 等类型的对象?
预先感谢所有人提供的任何信息。
我的应用程序访问相机以用于webrtc,并且正常工作.
我正在使用pwacompatGoogle实验室pwa为我的网络应用添加功能.
当作为一个应用程序运行时pwa,一切正常,直到我访问相机.然后我得到这个console.log错误:
getUserMedia failedObject {type:"error",msg:"undefined不是对象(评估'navigat ..."}
getUserMedia失败类型:错误消息:undefined不是对象(评估'navigator.mediaDevices.getUserMedia')
我错过了什么?
agora.io ×1
amazon-iam ×1
apollo ×1
apollostack ×1
ecmascript-6 ×1
es6-promise ×1
getusermedia ×1
makefile ×1
mamp ×1
node.js ×1
php ×1
sequelize.js ×1
webrtc ×1
xdebug ×1