Send int value to my http server from a Spinner in android

pair.add(new BasicNameValuePair("gender", gender.getSelectedItem()

How can I fix this? I need to send an int value to my database from the spinner.



pair.add(new BasicNameValuePair("gender", Integer.parseInt(gender.getSelectedItem() .toString())));

Convert String to int and after add integer value into pair, it will solve your problem.

String s=gender.getSelectedItem().toString();
int i=Integer.parseInt(s);
pair.add(new BasicNameValuePair("gender", i));

Need Your Help

setugid() error using matplotlib with apache and django

django osx apache matplotlib

I'm using matplotlib in a Django app served through apache on Mac OS X 10.7.5 but I can't get it to plot a figure for me. I've imported import matplotlib.pyplot as plt, and the line in my view,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.