var UsersMenu = function(){
this.returnUsers = [];
this.retrieve = function(posts){
var temp = [];
$.post("router.php", { "action": "getUsersMenu", "posts" : posts},
function(data)
{
if(data.response){
for(var i=0; i<data.returnUsers.length; i++){
temp.push(data.returnUsers[i]);
}
this.returnUsers = temp; // i know what 'this' is incorrect
}
}, "json");
alert(this.returnUsers);
}
}
Run Code Online (Sandbox Code Playgroud)
2个问题:
1.如何从jq对象(returnUsers)访问父'this'?
2.为什么jq post之后在jq post中发出警告之前会发出警报?
我正在使用Swagger在线编辑器。我在定义中创建一些模型
Object:
type: object
properties:
id:
type: integer
format: int32
name:
type: string
some_variable_to_exclude:
type: string
Run Code Online (Sandbox Code Playgroud)
这是完整的模型,我在不同的响应中使用它。但是在其中之一中,我希望我的模型不显示属性“ some_variable_to_exclude”。我如何排除它?可能吗 ?
好吧,也许不排除,也许在物业附近发表一些评论,但仅针对该回应。
在我生命中的下一次,我会在函数__halt_compiler之后看到一些字节码.在这种情况下,它是symfony安装程序.怎么做 ?如何生成在__halt_compiler之后可执行的代码?