Search Results

Search found 271 results on 11 pages for 'female gay'.

Page 7/11 | < Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >

  • Future Trends and Challenges for Aircraft Cabins

    - by Bill Evjen
    Ingo Wuggetzer The aircraft cabin changes from the 60s till now has worsened. First class is actually premium / economy is still moving down in quality The challenge is to do efficiency and comfort Graying population is a challenge will be 14% of the world’s population soon Obesity increasingly becoming an all-milieu core societal problem Will have impact on seat sizes Female forces – women will increasingly influence business and lifestyle There are now more women in college than men People want to be green and this reflects into aircrafts. You can now buy carbon-offsets when you buy a ticket in some airlines 20% are willing to pay for green products 13% would like to but are not doing it yet Seamless Connectivity Internet is obviously mainstream and the influence of our daily lives 2 billion users in 2010 One direction is going mobile Another direction is going social computing We have to explore this to use more with our products Convergence of products iPad usage on Finair , Virgin, Jetstar iPhone share 2% Other smartphones – 11% Feature Phone – 87% Plans to invest in technology trends within the next 3 years connectivity to/from aircraft – 21% major investment / 47% R&D nominal investment Web 2.0 – 22% major investment / 57% R&D nominal investment Cabin technical investments Lighting Wireless Sensors Displays People want to use technologies on the plane that they can use on the ground Planes have moved to digital in the last decade – now they are moving to wireless Data volumes are going through the roof – (Moore’s Law)

    Read the article

  • The requested resource is not available

    - by James Pj
    I have written a Java servlet program and run it through local Tomcat 7, But it was showing following error : HTTP Status 404 - /skypark/registration type Status report message /skypark/registration description The requested resource is not available. Apache Tomcat/7.0.33 I don't know what was the reason for it my Html page is <html> <head> <title> User registration </title> </head> <body> <form action="registration" method="post"> <center> <h2><b>Skypark User Registration</b></h2> <table border="0"> <tr><td> First Name </td><td> <input type="text" name="fname"/></br> </td></tr><tr><td> Last Name </td><td> <input type="text" name="lname"/></br> </td></tr><tr><td> UserName </td><td> <input type="text" name="uname"></br> </td></tr><tr><td> Enter Password </td><td> <input type="password" name="pass"></br> </td></tr><tr><td> Re-Type Password </td><td> <input type="password" name="pass1"></br> </td></tr><tr><td> Enter Email ID </td><td> <input type="email" name="email1"></br> </td></tr><tr><td> Phone Number </td><td> <input type="number" name="phone"> </td></tr><tr><td> Gender<br> </td></tr><tr><td> <input type="radio" name="gender" value="Male">Male</input></br> </td></tr><tr><td> <input type="radio" name="gender" value="Female">Female</input></br> </td></tr><tr><td> Enter Your Date of Birth<br> </td><td> <Table Border=0> <tr> <td> Date </td> <td>Month</td> <td>Year</td> </tr><tr> <td> <select name="date"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> . . . have some code . . . </table> <input type="submit" value="Submit"></br> </center> </form> </body> </html> My servlet is : package skypark; import skypark.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class Registration extends HttpServlet { public static Connection prepareConnection()throws ClassNotFoundException,SQLException { String dcn="oracle.jdbc.driver.OracleDriver"; String url="jdbc:oracle:thin:@JamesPJ-PC:1521:skypark"; String usname="system"; String pass="tiger"; Class.forName(dcn); return DriverManager.getConnection(url,usname,pass); } public void doPost(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); try { String phone1,uname,fname,lname,dob,address,city,state,country,pin,email,password,gender,lang,qual,relegion,privacy,hobbies,fav; uname=req.getParameter("uname"); fname=req.getParameter("fname"); lname=req.getParameter("lname"); dob=req.getParameter("date"); address=req.getParameter("address"); city=req.getParameter("city"); state=req.getParameter("state"); country=req.getParameter("country"); pin=req.getParameter("pin"); email=req.getParameter("email1"); password=req.getParameter("password"); gender=req.getParameter("gender"); phone1=req.getParameter("phone"); lang=""; qual=""; relegion=""; privacy=""; hobbies=""; fav=""; int phone=Integer.parseInt(phone1); Connection con=prepareConnection(); String Query="Insert into regdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; PreparedStatement ps=con.prepareStatement(Query); ps.setString(1,uname); ps.setString(2,fname); ps.setString(3,lname); ps.setString(4,dob); ps.setString(5,address); ps.setString(6,city); ps.setString(7,state); ps.setString(8,country); ps.setString(9,pin); ps.setString(10,lang); ps.setString(11,qual); ps.setString(12,relegion); ps.setString(13,privacy); ps.setString(14,hobbies); ps.setString(15,fav); ps.setString(16,gender); int c=ps.executeUpdate(); String query="insert into passmanager values(?,?,?,?)"; PreparedStatement ps1=con.prepareStatement(query); ps1.setString(1,uname); ps1.setString(2,password); ps1.setString(3,email); ps1.setInt(4,phone); int i=ps1.executeUpdate(); if(c==1||c==Statement.SUCCESS_NO_INFO && i==1||i==Statement.SUCCESS_NO_INFO) { out.println("<html><head><title>Login</title></head><body>"); out.println("<center><h2>Skypark.com</h2>"); out.println("<table border=0><tr>"); out.println("<td>UserName/E-Mail</td>"); out.println("<form action=login method=post"); out.println("<td><input type=text name=uname></td>"); out.println("</tr><tr><td>Password</td>"); out.println("<td><input type=password name=pass></td></tr></table>"); out.println("<input type=submit value=Login>"); out.println("</form></body></html>"); } else { out.println("<html><head><title>Error!</title></head><body>"); out.println("<center><b>Given details are incorrect</b>"); out.println(" Please try again</center></body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } } catch(Exception e) { out.println("<html><head><title>Error!</title><body>"); out.println("<b><i>Unable to process try after some time</i></b>"); out.println("</body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } out.flush(); out.close(); } } And the web.xml file is <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <servlet-name>reg</servlet-name> <servlet-class>skypark.Registration</servlet-class> </servlet> <servlet-mapping> <servlet-name>reg</servlet-name> <url-pattern>/registration</url-pattern> </servlet-mapping> This i kept in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\web.xml and servlet class in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\classes\skypark and registration.html in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\ if any mistake in this makes above error means please help me.Thanks in advance....

    Read the article

  • Make my radio buttons become selected in Android

    - by NickTFried
    When I run this could and click on the dialog box my radiobuttons do not become selected like intended package edu.elon.cs.mobile; import edu.elon.cs.mobile.R; import edu.elon.cs.mobile.R.id; import edu.elon.cs.mobile.R.layout; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.text.Editable; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.RadioButton; import android.widget.TextView; import android.widget.Toast; public class PTCalculator extends Activity{ private RadioButton maleRadioButton; private RadioButton femaleRadioButton; private EditText ageEdit; private EditText pushUpsEdit; private EditText sitUpsEdit; private EditText mileMinEdit; private EditText mileSecEdit; private Button calculate; private TextView score; protected AlertDialog genderAlert; private int currScore; private int age; private int sitUps; private int runTime; private int pushUps; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pt); maleRadioButton = (RadioButton) findViewById(R.id.male); femaleRadioButton = (RadioButton) findViewById(R.id.female); ageEdit = (EditText) findViewById(R.id.ageEdit); pushUpsEdit = (EditText) findViewById(R.id.pushupEdit); sitUpsEdit = (EditText) findViewById(R.id.situpEdit); mileMinEdit = (EditText) findViewById(R.id.minEdit); mileSecEdit = (EditText) findViewById(R.id.secEdit); calculate = (Button) findViewById(R.id.calculateButton); calculate.setOnClickListener(calculateButtonListener); score = (TextView) findViewById(R.id.scoreView); genderAlert = makeGenderDialog().create(); } private OnClickListener calculateButtonListener = new OnClickListener() { @Override public void onClick(View arg0) { age = (Integer.parseInt(ageEdit.getText().toString())); pushUps = (Integer.parseInt(pushUpsEdit.getText().toString())); sitUps = (Integer.parseInt(sitUpsEdit.getText().toString())); int min = (Integer.parseInt(mileMinEdit.getText().toString())*60); int sec = (Integer.parseInt(mileSecEdit.getText().toString())); runTime = min + sec; if(maleRadioButton.isChecked()){ MalePTTest mPTTest = new MalePTTest(age, pushUps, sitUps, runTime); currScore = mPTTest.malePTScore(); score.setText((Integer.toString(currScore))); }else if(femaleRadioButton.isChecked()){ FemalePTTest fPTTest = new FemalePTTest(age, pushUps, sitUps, runTime); currScore = fPTTest.femalePTScore(); score.setText((Integer.toString(currScore))); }else genderAlert.show(); } }; public AlertDialog.Builder makeGenderDialog(){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Select a Gender") .setCancelable(false) .setPositiveButton("Female", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { femaleRadioButton.setSelected(true); FemalePTTest fPTTest = new FemalePTTest(age, pushUps, sitUps, runTime); currScore = fPTTest.femalePTScore(); score.setText((Integer.toString(currScore))); } }) .setNegativeButton("Male", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { maleRadioButton.setSelected(true); MalePTTest mPTTest = new MalePTTest(age, pushUps, sitUps, runTime); currScore = mPTTest.malePTScore(); score.setText((Integer.toString(currScore))); } }); return builder; } } Any suggestions?

    Read the article

  • the requested resource is not available [closed]

    - by James Pj
    I have written a Java servlet program and run it through local Tomcat 7, But it was showing following error : HTTP Status 404 - /skypark/registration type Status report message /skypark/registration description The requested resource is not available. Apache Tomcat/7.0.33 I don't know what was the reason for it my Html page is <html> <head> <title> User registration </title> </head> <body> <form action="registration" method="post"> <center> <h2><b>Skypark User Registration</b></h2> <table border="0"> <tr><td> First Name </td><td> <input type="text" name="fname"/></br> </td></tr><tr><td> Last Name </td><td> <input type="text" name="lname"/></br> </td></tr><tr><td> UserName </td><td> <input type="text" name="uname"></br> </td></tr><tr><td> Enter Password </td><td> <input type="password" name="pass"></br> </td></tr><tr><td> Re-Type Password </td><td> <input type="password" name="pass1"></br> </td></tr><tr><td> Enter Email ID </td><td> <input type="email" name="email1"></br> </td></tr><tr><td> Phone Number </td><td> <input type="number" name="phone"> </td></tr><tr><td> Gender<br> </td></tr><tr><td> <input type="radio" name="gender" value="Male">Male</input></br> </td></tr><tr><td> <input type="radio" name="gender" value="Female">Female</input></br> </td></tr><tr><td> Enter Your Date of Birth<br> </td><td> <Table Border=0> <tr> <td> Date </td> <td>Month</td> <td>Year</td> </tr><tr> <td> <select name="date"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> . . . have some code . . . </table> <input type="submit" value="Submit"></br> </center> </form> </body> </html> My servlet is : package skypark; import skypark.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class Registration extends HttpServlet { public static Connection prepareConnection()throws ClassNotFoundException,SQLException { String dcn="oracle.jdbc.driver.OracleDriver"; String url="jdbc:oracle:thin:@JamesPJ-PC:1521:skypark"; String usname="system"; String pass="tiger"; Class.forName(dcn); return DriverManager.getConnection(url,usname,pass); } public void doPost(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); try { String phone1,uname,fname,lname,dob,address,city,state,country,pin,email,password,gender,lang,qual,relegion,privacy,hobbies,fav; uname=req.getParameter("uname"); fname=req.getParameter("fname"); lname=req.getParameter("lname"); dob=req.getParameter("date"); address=req.getParameter("address"); city=req.getParameter("city"); state=req.getParameter("state"); country=req.getParameter("country"); pin=req.getParameter("pin"); email=req.getParameter("email1"); password=req.getParameter("password"); gender=req.getParameter("gender"); phone1=req.getParameter("phone"); lang=""; qual=""; relegion=""; privacy=""; hobbies=""; fav=""; int phone=Integer.parseInt(phone1); Connection con=prepareConnection(); String Query="Insert into regdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; PreparedStatement ps=con.prepareStatement(Query); ps.setString(1,uname); ps.setString(2,fname); ps.setString(3,lname); ps.setString(4,dob); ps.setString(5,address); ps.setString(6,city); ps.setString(7,state); ps.setString(8,country); ps.setString(9,pin); ps.setString(10,lang); ps.setString(11,qual); ps.setString(12,relegion); ps.setString(13,privacy); ps.setString(14,hobbies); ps.setString(15,fav); ps.setString(16,gender); int c=ps.executeUpdate(); String query="insert into passmanager values(?,?,?,?)"; PreparedStatement ps1=con.prepareStatement(query); ps1.setString(1,uname); ps1.setString(2,password); ps1.setString(3,email); ps1.setInt(4,phone); int i=ps1.executeUpdate(); if(c==1||c==Statement.SUCCESS_NO_INFO && i==1||i==Statement.SUCCESS_NO_INFO) { out.println("<html><head><title>Login</title></head><body>"); out.println("<center><h2>Skypark.com</h2>"); out.println("<table border=0><tr>"); out.println("<td>UserName/E-Mail</td>"); out.println("<form action=login method=post"); out.println("<td><input type=text name=uname></td>"); out.println("</tr><tr><td>Password</td>"); out.println("<td><input type=password name=pass></td></tr></table>"); out.println("<input type=submit value=Login>"); out.println("</form></body></html>"); } else { out.println("<html><head><title>Error!</title></head><body>"); out.println("<center><b>Given details are incorrect</b>"); out.println(" Please try again</center></body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } } catch(Exception e) { out.println("<html><head><title>Error!</title><body>"); out.println("<b><i>Unable to process try after some time</i></b>"); out.println("</body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } out.flush(); out.close(); } } And the web.xml file is <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <servlet-name>reg</servlet-name> <servlet-class>skypark.Registration</servlet-class> </servlet> <servlet-mapping> <servlet-name>reg</servlet-name> <url-pattern>/registration</url-pattern> </servlet-mapping> This i kept in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\web.xml and servlet class in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\classes\skypark and registration.html in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\ if any mistake in this makes above error means please help me.Thanks in advance....

    Read the article

  • how to solve ArrayList outOfBoundsExeption?

    - by iQue
    Im getting: 09-02 17:15:39.140: E/AndroidRuntime(533): java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1 09-02 17:15:39.140: E/AndroidRuntime(533): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251) when Im killing enemies using this method: private void checkCollision() { Rect h1 = happy.getBounds(); for (int i = 0; i < enemies.size(); i++) { for (int j = 0; j < bullets.size(); j++) { Rect b1 = bullets.get(j).getBounds(); Rect e1 = enemies.get(i).getBounds(); if (b1.intersect(e1)) { enemies.get(i).damageHP(5); bullets.remove(j); Log.d("TAG", "HERE: LOLTHEYTOUCHED"); } if (h1.intersect(e1)){ happy.damageHP(5); } if(enemies.get(i).getHP() <= 0){ enemies.remove(i); } if(happy.getHP() <= 0){ //end-screen !!!!!!! } } } } using this ArrayList: private ArrayList<Enemy> enemies = new ArrayList<Enemy>(); and adding to array like this: public void createEnemies() { Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.female); if (enemyCounter < 24) { enemies.add(new Enemy(bmp, this, controls)); } enemyCounter++; } I dont really understand what the problem is, Ive been looking around for a while but cant really find anything that helps me. If you know or if you can link me someplace where they have a solution for a similar problem Ill be a very happy camper! Thanks for ur time.

    Read the article

  • Why are prefab customizations being applied to only a single character? [on hold]

    - by m0rgul
    I've built my (networked) game to the point where I have a room, some characters and a character customization screen. In the character customization screen I get to chose gender, chose from three different wardrobe options and assign custom colors to these wardrobe items. Then I use a custom object to store these options, serialize them and store them in PlayerPrefs, then load the next scene and apply them to my chosen character in this scene. Then I go and spawn some more characters, customize them, etc. The problem is that my character is always customized, but all other characters in the scene are default copies of the prefab. The prefabs themselves are a generic male and a generic female, both with three different wardrobes to chose from (they are included in the prefab). When I spawn my character, I go to the saved options in PlayerPrefs, destroy the two discarded wardrobes, apply color to my chosen wardrobe and then spawn the character. How would it be possible to make the other characters also show up in their customized form rather than just the generic prefab (which shows all three wardrobes at the same time)?

    Read the article

  • iOS: Interpreted code - where do they draw the line?

    - by d7samurai
    Apple's iOS developer guidelines state: 3.3.2 — An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). Assuming that downloading data - like XML and images (or a game level description), for example - at run-time is allowed (as is my impression), I am wondering where they draw the line between "data" and "code". Picture the scenario of an app that delivers interactive "presentations" to users (like a survey, for instance). Presentations are added continuously to the server and different presentations are made available to different users, so they cannot be part of the initial app download (this is the whole point). They are described in XML format, but being interactive, they might contain conditional branching of this sort (shown in pseudo form to exemplify): <options id="Gender"> <option value="1">Male</option> <option value="2">Female</option> </options> <branches id="Gender"> <branch value="1"> <image src="Man" /> </branch> <branch value="2"> <image src="Woman" /> </branch> </branches> When the presentation is "played" within the app, the above would be presented in two steps. First a selection screen where the user can click on either of the two choices presented ("Male" or "Female"). Next, an image will be [downloaded dynamically] and displayed based on the choice made in the previous step. Now, it's easy to imagine additional tags describing further logic still. For example, a containing tag could be added: <loop count="3"> <options... /> <branches... /> </loop> The result here being that the selection screen / image screen pair would be sequentially presented three times over, of course. Or imagine some description of a level in a game. It's easy to view that as passive "data", but if it includes, say, several doorways that the user can go through and with various triggers, traps and points attached to them etc - isn't that the same as using a script - or, indeed, interpreted code - to describe options and their conditional responses? Assuming that the interpretation engine for this XML data is already present in the app and that such presentations can only be consumed (not created or edited) in the app, how would this fare against Apple's iOS guidelines? Doesn't XML basically constitute a scripting language (couldn't any interpreted programming language simply be described by XML) in this sense? Would it be OK if the proprietary scripting language (ref the XML used above) was strictly sandboxed (how can they tell?) and not given access to the operating system in any way (but able to download content dynamically - and upload results to the authoring server)? Where does the line go?

    Read the article

  • JSON serialization of c# enum as string

    - by ob
    I have a class that contains an enum property, and upon serializing the object using JavaScriptSerializer, my json result contains the integer value of the enumeration rather than its string "name". Is there a way to get the enum as a string in my json without having to create a custom JavaScriptConverter? Perhaps there's an attribute that I could decorate the enum definition, or object property, with? As an example: enum Gender { Male, Female } class Person { int Age { get; set; } Gender Gender { get; set; } } desired json result: { "Age": 35, "Gender": "Male" }

    Read the article

  • HTML parsing - fetch and update data from the .html file

    - by Amit Jain
    I have a form in a .html files where input/select box looks like this <input type="text" id="txtName" name="txtName" value="##myName##" /> <select id="cbGender" name="cbGender"> <option>Select</option> <option selected="selected">Male</option> <option>Female</option> </select> I would need to remove '##' value textbox and also update them with different values if needed be in the textbox/checkbox/ selectbox. I would know the id of the input types. The code is to be written in groovy. Any ideas?

    Read the article

  • Using ADO.net Entity Framework 4 with Enumerations? How do I do it ?

    - by Perpetualcoder
    Question 1: I am playing around with EF4 and I have a model class like : public class Candidate { public int Id {get;set;} public string FullName {get;set;} public Gender Sex {get;set;} public EducationLevel HighestDegreeType {get;set;} } Here Gender and EducationLevel are Enums like: public enum Gender {Male,Female,Undisclosed} public enum EducationLevel {HighSchool,Bachelors,Masters,Doctorate} How do I get the Candidate Class and Gender and EducationLevel working with EF4 if: I do model first development I do db first development Edit: Moved question related to object context to another question here.

    Read the article

  • Flot Pie Chart using Ajax, Php and MySql

    - by Neriza Almirol
    Good Day! Can you help me? I have a problem getting values from database. I want to control the legend. I've been googling the best approach for the pie chart, but still looking for the best answer for my problem. It's easy to query the data from the database, but I want to show it using the flot pie chart and I need it for statistic reports. From database, I need to get the percentage of Female and Male followers and separate it according to age groups. The data (dateOfbirth) is available from our database using facebook integration. Can you give me an example using Ajax, Php and MySql? Thank you! :) $.plot($("#graph_3"), graphData, { series: { pie: { show: true } }, grid: { hoverable: true, clickable: true } }); $("#graph_3").bind("plothover", pieHover); $("#graph_3").bind("plotclick", pieClick);

    Read the article

  • Bubble chart with X and Y labels of string type [closed]

    - by MrGenius
    I have a scenario where I need to display how many males, females and Unspecified are there from City1, City2, City3, etc. I am trying to use bubble chart for this. So I want to display this chart with y axis showing Male, Female and Unspecified as Y axis labels and City1, City2,City3 as X axis labels. The actual count being displayed as a square bubble on the chart. This is little urgent. I could not locate any similar sample on MS documentation too. Edit: How to use the bubble chart to display genders on the y axis and cities on the x axis?

    Read the article

  • ASP.NET 2.0: Specifying an instance of an object for an ObjectDataSource

    - by Austin Salonen
    I'm using an ObjectDataSource to bind data to a GridView; it works fine except that it always creates a new object to use as a data source. I can do all the setup just fine but I cannot use an instance of an existing object to specify as the "data source" for it. Is it possible to do this? If so, how? If it's not possible, why? EDIT: Here's the gist of what's going on (object types changed): On the first page you are editting the attributes for a dog. One of the attributes is "has puppies" and if it's true, the next page you specify the names of those puppies. What's happening in my case is that those puppies are not getting linked to the original dog but to a "new" dog. (The implication that my problem is a "female dog" was coincidental. ;-) )

    Read the article

  • Create a set column with database migration in rails

    - by Micke
    Hello. I need to add a new column to my users table in the database. I want the type of the column to be set. The column represents the users gender. There should be two options to the set. One form Male "m" and the other for Female "f". But i havent found any doccumentation for adding a column with the set type. How can i do this?

    Read the article

  • MySQL GROUP BY and JOIN

    - by christian
    Guys what's wrong with this SQL query: $sql = "SELECT res.Age, res.Gender, answer.*, $get_sum, SUM(CASE WHEN res.Gender='Male' THEN 1 else 0 END) AS males, SUM(CASE WHEN res.Gender='Female' THEN 1 else 0 END) AS females FROM Respondents AS res INNER JOIN Answers as answer ON answer.RespondentID=res.RespondentID INNER JOIN Questions as question ON answer.Answer=question.id WHERE answer.Question='Q1' GROUP BY res.Age ORDER BY res.Age ASC"; the $get_sum is an array of sql statement derived from another table: $sum[]= "SUM(CASE WHEN answer.Answer=".$db->f("id")." THEN 1 else 0 END) AS item".$db->f("id"); $get_sum = implode(', ', $sum); the query above return these values: Age: 20 item1 0 item2 1 item3 1 item4 1 item5 0 item6 0 Subtotal for Age 20 3 Age: 24 item1 2 item2 2 item3 2 item4 2 item5 1 item6 0 Subtotal for Age 24 9 It should return: Subtotal for Age 20 1 Subtotal for Age 24 2 In my sample data there are 3 respondents 2 are 24 yrs of age and the other one is 20 years old.

    Read the article

  • Enum in Hibernate, persisting as an enum

    - by niklassaers
    In my MySQL database, there's the column "gender enum('male','female')" I've created my enum "com.mydomain.myapp.enums.Gender", and in my Person entity I'm defined "Gender gender". Now I'd want to keep the enum type in my MySQL database, but when I launch my application I get: Wrong column type in MyApp.Person for column Gender. Found: enum, expected: integer Why is this? This would be the equivalent as if I'd annotated my "Gender gender" with "@Enumerated(EnumType.ORDINAL)", which I haven't. EnumType seems only to be able to be either ORDINAL or STRING, so how do I specify that it should treat the field as an enum, not as an int? (not that there's much difference, but enough for it to get upset about it.)

    Read the article

  • Key/Value pyqt QComboBox

    - by Danilo
    I want to use a QComboBox with the "keys" and "values" from a tuple similar to the ones used in a django models. For example I have the following structure for a person's sex. SEX_CHOICES = (('M', 'Male'), ('F', 'Female')) The first item of the tuple contains the code of the sex that is stored in the database, and the second one the text that I want to display in the QComboBox as an item. Is there a way in wich I could set the QComboBox value as M and it displays Male. An also when the user select the element Male I could get the selected value as M. Thanks

    Read the article

  • MYSQL select query where multiple conditions in same column must exist

    - by David
    I'm putting together a dating site and I'm having a mysql query issue. This works: SELECT * FROM `user` , `desired_partner` , `user_personality` WHERE dob BETWEEN '1957-05-18' AND '1988-05-18' AND country_id = '190' AND user.gender_id = '1' AND user.user_id = desired_partner.user_id AND desired_partner.gender_id = '2' AND user.user_id = user_personality.user_id AND user_personality.personality_id = '2' The sql finds any male (gender_id=1) with ATLEAST personality trait 2 (and possibly other personality traits) between certain age range in the USA (country_id=190) looking for a female (gender_id=2). Question 1) How do I make it so it returns those with personality type 2 ONLY and no other personality traits? Find any man in the USA that is between 22 and 53 that is of personality type 2 (only) that is looking for a woman. Question 2) Supposing I want to find someone that matches personality type 1, personality type 2, and personality type 5 ONLY. There are 14 personality traits in the database and a user can be associated with any of them. Find any man in the USA that is between 22 and 53 that is of personality type 1, 2, and 5 (ONLY) that is looking for a woman.

    Read the article

  • Update multiple rows with one query?

    - by kavoir.com
    I found something that works with updating one field at here: http://www.karlrixon.co.uk/articles/sql/update-multiple-rows-with-different-values-and-a-single-sql-query/ UPDATE person SET name = CASE id WHEN 1 THEN 'Jim' WHEN 2 THEN 'Mike' WHEN 3 THEN 'Precious' END WHERE id IN (1,2,3) My question is how to update more than one field? Such as: UPDATE person SET name = CASE, sex = CASE id WHEN 1 THEN 'Jim', 'female' WHEN 2 THEN 'Mike' 'male' WHEN 3 THEN 'Precious', 'male' END WHERE id IN (1,2,3) Which doesn't work of course. Tried a few other combination and failed. Any idea? Thanks!

    Read the article

  • How to manipulate data in View using Asp.Net Mvc RC 2?

    - by Picflight
    I have a table [Users] with the following columns: INT SmallDateTime Bit Bit [UserId], [BirthDate], [Gender], [Active] Gender and Active are Bit that hold either 0 or 1. I am displaying this data in a table on my View. For the Gender I want to display 'Male' or 'Female', how and where do I manipulate the 1's and 0's? Is it done in the repository where I fetch the data or in the View? For the Active column I want to show a checkBox that will AutoPostBack on selection change and update the Active filed in the Database. How is this done without Ajax or jQuery?

    Read the article

  • NHibernate Validator - how to validate enum type

    - by Herr W.
    I'm using nhibernate validator in my current solution. Everythings is almost fine but... My view model has a property of type Gender (see example below) public virtual Gender Gender { get; set; } public enum Gender { Female = 1, Male = 2 } Now i like to have some validation to ensure that the gender property ist set. But neither the NotEmpty nor the NotNull Attribute fulfil the requirement. Is there a kind of a generic solution or best practice to handle enum validations. Thanks in advance.

    Read the article

  • A table that has relation to itself issue

    - by Mostafa
    Hi , I've defined table with this schema : CREATE TABLE [dbo].[Codings]( [Id] [int] IDENTITY(1,1) NOT NULL, [ParentId] [int] NULL, [CodeId] [int] NOT NULL, [Title] [nvarchar](50) COLLATE Arabic_CI_AI NOT NULL, CONSTRAINT [PK_Codings] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] And fill it up with data like this : Id ParentId CodeId Title ----------- ----------- ----------- ---------- 1 NULL 0 Gender 2 1 1 Male 3 1 2 Female 4 NULL 0 Educational Level 5 4 1 BS 6 4 2 MS 7 4 3 PHD Now , I'm looking for a solution , in order , When i delete a record that is parent ( like Id= 1 or 4 ), It delete all child automatically ( all records that their ParentId is 1 or 4 ) . I supposed i can do it via relation between Id and Parent Id ( and set cascade for delete rule ) , But when i do that in MMS , the Delete Rule or Update Rule in Properties is disabled . My question is , What can i do to accomplish this ? Thank you

    Read the article

  • doubt about radio button mysql php beginner

    - by Marcelo
    Hi, i'm an engineering student and i'm developing a simple software based on html,php and mysql. I learned this topics on w3schools, i know only the basics. I tired to search about this in this website but I thought the doubts about php,mysql, radio buttons but they were much more complex than I need, and that i could understand. Sorry for the english. (Q1)Ex: $email=$_REQUEST['email'] , in this case the input is text, if it where like a radio button for ex: sex: male or female, how would it be? (Q2) what would be the type of this field (for exemple sex in question 1) in the database: text, int, varchar ? thanks for the attention

    Read the article

  • How can i get all TD data upon clicking on a TR with Jquery

    - by KillerFish
    Hi friends, I am having a table with multiple rows and i want to get all the TD data after clicking on a particular ROW. My Table is <table> <tr class="person"> <td class="id">1900</td> <td class="name">John</td> <td class="gender">Male</td> </tr> <tr class="person"> <td class="id">2000</td> <td class="name">Pitt</td> <td class="gender">Female</td> </tr> </table> How can i Get id, name, gender after clicking on Row using Jquery. Ex: If i click on John Row i should get 1900, John, Male and same for Pitt also Thank You

    Read the article

  • How to manupilate data in VIew using Asp.Net Mvc RC 2?

    - by Picflight
    I have a table [Users] with the following columns: INT SmallDateTime Bit Bit [UserId], [BirthDate], [Gender], [Active] Gender and Active are Bit that hold either 0 or 1. I am displaying this data in a table on my View. For the Gender I want to display 'Male' or 'Female', how and where do I manipulate the 1's and 0's? Is it done in the repository where I fetch the data or in the View? For the Active column I want to show a checkBox that will AutoPostBack on selection change and update the Active filed in the Database. How is this done without Ajax or jQuery?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >