我想按照这篇文章制作一个Python聊天机器人。
但是通过npm或Windows 32位版本或Windows 64位版本安装heroku-cli后,我收到以下错误:
“heroku”不被识别为内部或外部命令、可操作程序或批处理文件。
安装时自动设置Path如下:
在这里,我想将JSON文件转换为RDF.这是JSON
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我找不到将其转换为RDF的正确方法.
我在刀片上添加了一个按钮作为变量,该按钮的属性如下所示
var $btnDelete = $('<input />',{
'id': 'btn_delete'+ x,
'type':'button',
'name':'btn_delete'+ x,
'class':'btn btn-danger editor_remove editor_remove_leave_types ',
'onclick':'RemoveUpdateLeaveTypes(this)',
'data-id':x });
Run Code Online (Sandbox Code Playgroud)
注意:x只是一个变量(0,1,2等)
这是按钮附加到id ="xx2"div的方式: -
$('#xx2').append($btnDelete);
Run Code Online (Sandbox Code Playgroud)
这里是上面提到的那个按钮的JavaScript函数:
function RemoveUpdateLeaveTypes(el)
Run Code Online (Sandbox Code Playgroud)
{
var currentId=$(el).id.slice(-1);
console.log('currentId '+currentId);
Run Code Online (Sandbox Code Playgroud)
}
单击此按钮后,控制台上将显示此错误消息
Uncaught TypeError: Cannot read property 'slice' of undefined
at RemoveUpdateLeaveTypes (leavePolicyDetails.js:944)
at HTMLInputElement.onclick (leave-policies:1)
Run Code Online (Sandbox Code Playgroud)
但是,如果我使用此命令,我将没有错误
var currentId=$(el).attr("id").slice(-1);
Run Code Online (Sandbox Code Playgroud)
请在此解释我的冲突,提前谢谢..
chatbot ×1
facebook ×1
heroku ×1
java ×1
javascript ×1
jquery ×1
json ×1
laravel-5.3 ×1
npm ×1
python ×1
rdf ×1
windows-10 ×1
xampp ×1