为root studio传递null给了我这个警告:
避免将null作为视图根传递(需要解析膨胀布局的根元素上的布局参数)
它显示为空值getGroupView.请帮忙.
public class ExpandableListAdapter extends BaseExpandableListAdapter {
private Context _context;
private List<String> _listDataHeader; // header titles
// child data in format of header title, child title
private HashMap<String, List<String>> _listDataChild;
public ExpandableListAdapter(Context context, List<String> listDataHeader,
HashMap<String, List<String>> listChildData) {
super();
this._context = context;
this._listDataHeader = listDataHeader;
this._listDataChild = listChildData;
}
@Override
public Object getChild(int groupPosition, int childPosititon) {
return this._listDataChild.get(this._listDataHeader.get(groupPosition))
.get(childPosititon);
}
@Override
public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}
@Override
public …Run Code Online (Sandbox Code Playgroud) 我想在响应头(Set-Cookie)中获取会话令牌.如何才能访问Response头中的值?
var headers = new Headers();
headers.append('Content-Type', 'application/json');
console.log('url',this.loginUrl)
this.http.post(this.loginUrl,
JSON.stringify({ "username": value.username, "password": value.password }),
{ headers: headers })
.map((res: Response) =>
res.json())
.subscribe((res) => {
console.log("res", res);
this.loading.hide();
if (res.message_code == "SUCCESS") {
this.nav.setRoot(HomePage, {
username: value.username,
});
} else {
let alert = Alert.create({
title: "Sign In Error !",
subTitle: 'Please Check Username or Password.',
buttons: ['Ok']
});
this.nav.present(alert);
}
}, err => {
this.loading.hide();
console.log('error', err);
});
Run Code Online (Sandbox Code Playgroud)
这是我的标题回复
设置路径的正确方法是什么?
在我的应用程序我这个代码我使用设置路径发送文件.
app.get('/',function(req, res){//get,put,post,delete
res.sendfile(__dirname + '/client/views/index.html');
});
Run Code Online (Sandbox Code Playgroud)
但它给出了这个错误:
express deprecated res.sendfile: Use res.sendFile instead server.js:22:6
Run Code Online (Sandbox Code Playgroud)
可以指出这里的错误是什么.请
应用程序在localhost上正常工作.但是当它连接到服务器时它会出错.
我通过端口22连接服务器
这是错误
Error: listen EADDRNOTAVAIL Error: listen EADDRNOTAVAIL
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1023:19)
at listen (net.js:1064:10)
at net.js:1146:9
at dns.js:72:18
at process._tickCallback (node.js:419:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:906:3
Run Code Online (Sandbox Code Playgroud)
任何帮助!
-update-
我跑 netstat -tulpn | grep 22
结果:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 683/sshd
tcp6 0 0 :::22 :::* LISTEN 683/sshd
Run Code Online (Sandbox Code Playgroud)
但我跑了 netstat -tulpn | grep 80
什么都没有显示.
任何Help.is这个服务器故障?
赛跑 netstat -nlt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State …Run Code Online (Sandbox Code Playgroud) 我有片段活动与contatin导航抽屉.点击导航抽屉项后,它打开片段1,片段2,片段3.然后在片段1中按钮点击事件后打开新的片段4.
我想要处理后退按键事件我怎样才能在片段4上执行此操作?在片段4中单击后退键后我想返回片段1.
我尝试使用统一的新UI图像系统实现健康到我的播放器.但它不工作.任何人都帮助我.谢谢.
using UnityEngine.UI;
if (health_value == 3) {
GameObject.Find("health").GetComponent<Image>().color.a = 1;
GameObject.Find("health1").GetComponent<Image>().color.a = 1;
GameObject.Find("health2").GetComponent<Image>().color.a = 1;
}
Run Code Online (Sandbox Code Playgroud)
我得到这个错误.
error CS1612: Cannot modify a value type return value of `UnityEngine.UI.Graphic.color'. Consider storing the value in a temporary variable
Run Code Online (Sandbox Code Playgroud) 我更新我想用搜索corrent POS机inspectionid,activityid,subactivityid但调用更新状态换货即时得到这个error.can有人帮助的时候。
public int updateSubActivityActivityComment(String comment, int rating, int subActivityId, int activityId, int inspectionId){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(KEY_RATING, rating);
contentValues.put(KEY_COMMENT, comment);
return db.updateWithOnConflict(TABLE_INSPECTION, contentValues,KEY_SUB_ACTIVITY_ID+ " = ? "+subActivityId+" AND "+KEY_INSPECTION_ID + " = ? "+inspectionId +" AND "+KEY_ACTIVITY_ID +" = ? "+activityId,new String[]{String.valueOf(subActivityId)} ,SQLiteDatabase.CONFLICT_IGNORE);
}
Run Code Online (Sandbox Code Playgroud)
日志猫
java.lang.IllegalArgumentException: Too many bind arguments. 3 arguments were provided but the statement needs 2 arguments.
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:68)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1574)
at …Run Code Online (Sandbox Code Playgroud)