Search Results

Search found 17734 results on 710 pages for 'values'.

Page 79/710 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • putting values from database into a drop down list

    - by sushant
    hi. my tool is in asp. i am using this code for a query in sql dim req_id req_id=Request.Form("Req_id") if req_id<>"" then Set conn=server.CreateObject("adodb.connection") conn.Open session("Psrconnect") Set rs=CreateObject("Adodb.Recordset") rs.Open "select * from passwords where REQ_ID='"&req_id&"'", conn i want to put the results of this query into a drop down list. how do i do it? any help is very much appreciated.

    Read the article

  • F# match char values

    - by rwallace
    I'm trying to match an integer expression against character literals, and the compiler complains about type mismatch. let rec read file includepath = let ch = ref 0 let token = ref 0 use stream = File.OpenText file let readch() = ch := stream.Read() let lex() = match !ch with | '!' -> readch() | _ -> token := !ch ch has to be an int because that's what stream.Read returns in order to use -1 as end of file marker. If I replace '!' with int '!' it still doesn't work. What's the best way to do this?

    Read the article

  • how to get values sent by location.replace(URL)

    - by kawtousse
    hi everyone, In my javascript function I do livke this in order to redirect parameters to servlet: var ids1=document.getElementById("projet").value; document.location.href("http://localhost:8080/Opc_Web_App/ServletAffectation?ids1="+ids1); and in the servlet I do the following to get Value: String idprojet= request.getParameter("projet"); System.out.println("le projet selectionné est :" +idprojet); the problem that i didnt have the result of System.out.print in my screen; so in other terms the servlet didn't get the parameter. I can not see the problemn untill now. Please help. Thank you.

    Read the article

  • Android - Add other values to websettings settextsize

    - by user1681477
    In my application I am using a webview, and in order to increase/decrease text size, I am using WebSettings().setTextSize method, but, this method is limited to 5 predefined enum sizes only (SMALLEST, SMALLER, NORMAL, LARGER,LARGEST). I know I can use WebSettings().setTextZoom(int), but my application is available for API Level 8 and above, and this method was introduced in API Level 14... My question is: Is there any way to add other sizes to webSettings().setTextSize? maybe by extending textSize enum, or define other sizes?

    Read the article

  • A pointer member variable having different values

    - by Rohan Prabhu
    Ok, to begin with, this is my code: HyperSprite::HyperSprite() { _view = 0; } void HyperSprite::publish(QGraphicsView* view) { _view = view; } void HyperSprite::getKFrame() { if(_view != 0) { qDebug()<<(void*)_view; } } Now, if I call HyperSprite::getKFrame() from within main(), I get the output: 0xbf8ffb84 I have a TCP server, which requires this QGraphicsView* variable. So whenever a new connection is made, HyperSprite::getKFrame() is called. However, whenever I make a connection to my server, this is the output: 0x1e425ff I honestly don't understand this. Shouldn't the value of a member remain same throughout? Why is the pointer value changing? As is obvious, whenever I try to use the _view pointer to access any of its members, a Segmentation Fault occurs. I tried using QSharedPointer, but it also results in the same problem. The data of the QSharedPointer automatically changes. Why is this happening?

    Read the article

  • Struts 2 + Reading values from the action

    - by Panther24
    I writing a Struts 2 application. The main operation I'm trying now is to read from the action call a List and display it in the form of a table in the JSP. I've searched the net and check out a lot of examples, but in vain. Can someone point out to a good working example?

    Read the article

  • (Action<T>).Name does not return expected values

    - by Tomas Lycken
    I have the following method (used to generate friendly error messages in unit tests): protected string MethodName<TTestedType>(Action<TTestedType> call) { return string.Format("{0}.{1}", typeof(TTestedType).FullName, call.Method.Name); } But when I call it as follows, I don't get the expected results: var nm = MethodName<MyController>(ctrl => ctrl.Create()); After running this code, nm contains "<Create_CreateShowsView>b__8", and not (as expected) "Create". How should I change the code to obtain the expected result?

    Read the article

  • Best way to get distinct values from large table

    - by derivation
    I have a db table with about 10 or so columns, two of which are month and year. The table has about 250k rows now, and we expect it to grow by about 100-150k records a month. A lot of queries involve the month and year column (ex, all records from march 2010), and so we frequently need to get the available month and year combinations (ie do we have records for april 2010?). A coworker thinks that we should have a separate table from our main one that only contains the months and years we have data for. We only add records to our main table once a month, so it would just be a small update on the end of our scripts to add the new entry to this second table. This second table would be queried whenever we need to find the available month/year entries on the first table. This solution feels kludgy to me and a violation of DRY. What do you think is the correct way of solving this problem? Is there a better way than having two tables?

    Read the article

  • Replace BIT values with some text

    - by nihi_l_ist
    I have a BIT column with gender (0,1) and want to replace 0 and 1 in the resulting view with the words "man" and "woman". Can i do this right in the view with some system finction or i have to write my own function to do that?

    Read the article

  • display php foreach values in div

    - by San82moon
    Hi, I have foreach ($a as $key = $value) { echo $value; } which displays result one below other, like 1234 5678 2010-05-20 5678 1590 2010-05-19 but i want it in a table like structure like 1234 5678 2010-05-20 5678 1590 2010-05-19 how can i do that?

    Read the article

  • reading into table: comma values and quotes SQL

    - by every_answer_gets_a_point
    i have a string like this something = "something, something1, "something2, something else", something3" i need it to be read into a table like this: field1 = "something" field2= "something2" field3 = "something2, something else" field4 = "something3" please notice that the double quotes in the something string signified that the string inside the quotes is to be placed in one field anyone know how to do this with an insert into statement or some other way? the answer can be purely sql or can be vba with sql. thanks!

    Read the article

  • Passing values between pages in JavaScript

    - by buni
    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; using System.Text; using System.Web.Services; using System.IO; namespace T_Smade { public partial class ConferenceManagement : System.Web.UI.Page { volatile int i = 0; protected void Page_Load(object sender, EventArgs e) { GetSessionList(); } public void GetSessionList() { string secondResult = ""; string userName = ""; try { if (HttpContext.Current.User.Identity.IsAuthenticated) { userName = HttpContext.Current.User.Identity.Name; } SqlConnection thisConnection = new SqlConnection(@"data Source=ZOLA-PC;AttachDbFilename=D:\2\5.Devp\my DB\ASPNETDB.MDF;Integrated Security=True"); thisConnection.Open(); SqlCommand secondCommand = thisConnection.CreateCommand(); secondCommand.CommandText = "SELECT myApp_Session.session_id FROM myApp_Session, myApp_Role_in_Session where myApp_Role_in_Session.user_name='" + userName + "' and myApp_Role_in_Session.session_id=myApp_Session.session_id"; SqlDataReader secondReader = secondCommand.ExecuteReader(); while (secondReader.Read()) { secondResult = secondResult + secondReader["session_id"].ToString() + ";"; } secondReader.Close(); SqlCommand thisCommand = thisConnection.CreateCommand(); thisCommand.CommandText = "SELECT * FROM myApp_Session;"; SqlDataReader thisReader = thisCommand.ExecuteReader(); while (thisReader.Read()) { test.Controls.Add(GetLabel(thisReader["session_id"].ToString(), thisReader["session_name"].ToString())); string[] compare = secondResult.Split(';'); foreach (string word in compare) { if (word == thisReader["session_id"].ToString()) { test.Controls.Add(GetButton(thisReader["session_name"].ToString(), "Join Session")); } } } thisReader.Close(); thisConnection.Close(); } catch (SqlException ex) { } } private Button GetButton(string id, string name) { Button b = new Button(); b.Text = name; b.ID = "Button_" + id + i; b.Command += new CommandEventHandler(Button_Click); b.CommandArgument = id; i++; return b; } private Label GetLabel(string id, string name) { Label tb = new Label(); tb.Text = name; tb.ID = id; return tb; } protected void Button_Click(object sender, CommandEventArgs e) { Response.Redirect("EnterSession.aspx?session=" + e.CommandArgument.ToString()); } } I have this code when a user clicks a button www.mypage/EnterSession.aspx?session=session_name in the EnterSession.aspx i have used the code below to track the current URL _gaq.push(['pageTrackerTime._trackEvent', 'Category', 'Action', document.location.href, roundleaveSiteEnd]); Now I would also like to track in the Action parameter the session_name from the previous page.see the code below from the previous page test.Controls.Add(GetButton(thisReader["session_name"].ToString(), "Join Session")); Some idea how to do it? Thanx

    Read the article

  • Get CCK values, without the html in Drupal templates

    - by DasRakel
    I'm storing a string in a CCK field. The problem is getting it back out. I have a node-node_type.tpl.php and ask it $node->content['field_custom_map_data']['#value'] That returns html, three nested div's and uses HTML entities, I want the pure text, as entered. What is the Drupal 5 way to fix this?

    Read the article

  • Oracle - Count distict values of a column

    - by Luciana Borela
    Hi I have this table: Reason|Area_Code|Id x dig 1 x dig 2 y dig 3 h util 4 x dig 5 I'm trying a sql that returns: Reason|Amount of distinct Reason|Area_code x 3 dig y 1 dig h 1 util I will use this result to plot a chart. I don´t have any ideia on how this SQL can be. Could you help me?

    Read the article

  • Order a foreach, by the value of a calculation of values in the array

    - by Mark
    I have an array as follows: $players = array( $player = array( 'name' => 'playername', 'speed' => '10', 'agility' => '10', 'influence' => '10' ) etc Then I calculate a $score, based on the sum of speed, agility and influence. $score = $p['speed'] + $p['agility'] + $p['influence']; How can I loop through my array, but order the results from highest to lowest $score? PS- http://pastebin.com/eUEQ5y4u

    Read the article

  • setting variables and values in html & js

    - by air
    i have one js file in that js file i have following variables var image_path="images"; var style_path="style"; i want to use these variables in html file(s) like in image statement <img src="path from js/logo.gif"> or in style sheet statement <link rel="stylesheet" href="path from js/constant.css" type="text/css" /> Basic idea behind this is: if we change name of image folder or path of image folder we only do change in one JS file not 1000 html files. same for style sheet. or any other way to do same in java script or Jquery Thanks

    Read the article

  • PHP get values from SimpleXMLElement array

    - by seanp2k
    I have this: [1]=> object(SimpleXMLElement)#6 (1) { ["@attributes"]=> array(14) { ["name"]=> string(5) "MySQL" ["acknowledged"]=> string(1) "1" ["comments"]=> string(1) "1" ["current_check_attempt"]=> string(1) "1" ["downtime"]=> string(1) "0" ["last_check"]=> string(19) "2010-05-01 17:57:00" ["markdown_filter"]=> string(1) "0" ["max_check_attempts"]=> string(1) "3" ["output"]=> string(42) "CRITICAL - Socket timeout after 10 seconds" ["perfdata_available"]=> string(1) "1" ["service_object_id"]=> string(3) "580" ["state"]=> string(8) "critical" ["state_duration"]=> string(6) "759439" ["unhandled"]=> string(1) "0" } } (I used var_dump($child) to generate that) How do I get the 'name' attribute out of there as a string? Here is my code: $xml = simplexml_load_string($results); foreach($xml->data->list as $child) { var_dump($child); echo $child->getName() . ": " . $child->name . "<br />"; }

    Read the article

  • elegant way to extract values from array

    - by smoove666
    Something that bugs me for a long time: I want to convert this Array: // $article['Tags'] array(3) { [0] => array(2) { ["id"] => string(4) "1" ["tag"] => string(5) "tag1" }, [1] => array(2) { ["id"] => string(4) "2" ["tag"] => string(5) "tag2" }, [2] => array(2) { ["id"] => string(4) "3" ["tag"] => string(5) "tag3" }, } To this form: // $extractedTags[] array(3) { [0] => string(4) "tag1", [1] => string(4) "tag2", [2] => string(4) "tag3", } currently i am using this code: $extractedTags = array(); foreach ($article['Tags'] as $tags) { $extractedTags[] = $tags['tag']; } Is there any more elegant way of doing this, maybe a php built-in function?

    Read the article

  • C++ Macro problem, not remplacing all values

    - by JP
    I have the following 2 macros: #define SCOPED_ENUM_HEADER(NAME) struct NAME{ enum _NAME{ #define SCOPED_ENUM_FOOTER(NAME) };}; typedef NAME::_NAME NAMEtype; Only the first instance of NAME get remplaced by the passed NAME. What's wrong with it? Is is to be used in such a way: SCOPED_ENUM_HEADER(LOGLEVEL) UNSET, FILE, SCREEN SCOPED_ENUM_FOOTER(LOGLEVEL) Thanks you

    Read the article

  • Oracle - Count distinct values of a column

    - by Luciana Borela
    Hi I have this table: Reason|Area_Code|Id x dig 1 x dig 2 y dig 3 h util 4 x dig 5 I'm trying for a SQL that returns: Reason|Amount of distinct Reason|Area_code x 3 dig y 1 dig h 1 util I will use this result to plot a chart. I don´t have any idea on how this SQL can be done. Could you help me?

    Read the article

  • Help with enum values in registry c++

    - by vBx
    DWORD type = REG_NONE; int i = 0; size = sizeof(ValueName); size2 = sizeof(ValueData); BOOL bContinue = TRUE; do { lRet = RegEnumValue(Hkey , i , ValueName , &size , 0 , &type , ValueData , &size2); switch(lRet) { case ERROR_SUCCESS: print_values(ValueName , type , ValueData , size2); i++; size = sizeof(ValueName); size2 = sizeof(ValueData); break; case ERROR_MORE_DATA: size2 = sizeof(ValueData); if(NULL != ValueData) delete [] ValueData; ValueData = new BYTE[size2]; break; case ERROR_NO_MORE_ITEMS: bContinue = false; break; default: cout << "Unexpected error: " << GetLastError() << endl; bContinue = false; break; } }while(bContinue); it always goes to ERROR_NO_MORE_DATA ,why is that ? :-/

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >