Search Results

Search found 8446 results on 338 pages for 'dynamic cast'.

Page 119/338 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • How to set dynamic value to "value" attribute of struts html:button tag ?

    - by Prat1
    I am using following button tag to display button by passing some runtime value to "value" attribute: <html:button styleClass="button50" value="<%=no_list %>" onclick="callOneFunction(this);" /> it is not throwing an jasper exception saying, setValue(String) cannot work with html:button. Please help me out ot resolve my problem, I want to pass some value at runtime to vale attribute. How to do it ? Thanks in advance.

    Read the article

  • C++ enum casting and templates

    - by JP
    I get the following error with VS2008: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) When casting a down casting a ClassA to ClassA_1 and ClassA_1 is a templated class that received an enum for parameter such as: ClassA { virtual ~ClassA(){}; } template <class Param1> ClassA_1 : public ClassA { public: //constructor ClassA_1(Param1 p1) { _p1 = p1; } Param1 _p1; } So I have a upcasted ClassA a = new ClassA_1<myenum>(); When I need to do this: ClassA_1<myenum> a1 = (ClassA_1<myenum> a); // This fails ... The only way it works is: ClassA_1<int> a1 = (ClassA_1<int> a); but this break my template as it must always deal with int... How to properly cast a enum that is now a int, back into the enum?

    Read the article

  • Trying to build a dynamic PHP mysql_query string to update a row and getting back the updated row

    - by adardesign
    I have a form that jQuery tracks the onChage .change() event so when something is changed it runs a ajax request and i pass in the column, id, and the values in the url. Here i have the PHP code that should update the data. My question is now how do i build the mySQl string dynamically. and how do i echo back the changes/updates that where just changed on the db. Here is the PHP code i am trying to work with. <?php require_once('Connections/connect.php'); ?> <?php $id = $_GET['id']; $collumn = $_GET['collumn']; $val = $_GET['val']; ?> <?php mysql_select_db($myDB, $connection); // here i try to build the query string and pass in the passed in values $sqlUpdate = 'UPDATE `plProducts`.`allPens` SET `$collumn` = '$val' WHERE `allPens`.`prodId` = '$id' LIMIT 1;'; // here i want to echo back the updated row (or the updated data) $seeResults = mysql_query($sqlUpdate, $connection); echo $seeResults ?>

    Read the article

  • How to dynamic adding rows into asp.net table ?

    - by user359706
    How can I add rows in a table from server-side? if (!Page.IsPostBack) { Session["table"] = TableId; }else TableId = (Table)Session["table"]; } protected void btnAddinRow_Click(object sender, EventArgs e) { num_row = (TableId.Rows).Count; TableRow r = new TableRow(); TableCell c1 = new TableCell(); TableCell c2 = new TableCell(); TextBox t = new TextBox(); t.ID = "textID" + num_row; t.EnableViewState = true; r.ID = "newRow" + num_row; c1.ID = "newC1" + num_row; c2.ID = "newC2" + num_row; c1.Text = "New Cell - " + num_row; c2.Controls.Add(t); r.Cells.Add(c1); r.Cells.Add(c2); TableId.Rows.Add(r); Session["table"] = TableId; } in debug I found out the number in the "TableID", but the rows are not drawn. Have you got an idea about this issue? Thanks

    Read the article

  • How do game trainers change a address in memory thats dynamic?

    - by GameTrainersWTF
    Lets assume i am a game and i have a global int* that contains my health. A game trainers job is to modify this value to whatever in order to achieve god mode. I've looked up tutorials on game trainers to understand how they work, and the general idea is to use a memory scanner to try and find the address of a certain value. Then modify this address by injecting a dll or whatever. But i made a simple program with a global int* and its address changes every time i run the app, so i don't get how game trainers can hard code these addresses? Or is my example wrong? What am i missing?

    Read the article

  • Any dynamic database frontend tool from which you can update directly?

    - by Enjoy coding
    Hi Gurus, This is with reference to this question where I got one tabular report format. I need to update the user entered values correctly back to the same table rows. I am in the process of doing this by using general form post data methods by using some logics which I think will not be easy to maintain. So, just out of curiosity, Is there a front end creator javascript libraries or frameworks which can create the front end for any query's resultset and updates the corresponding rows when the user updates them from front end. This need not have all the full functionality, any one usable, customizable thing will reduce the code maintenance problems. I have googled for some javascript libraris for this but not able to get which will be suitable. Please suggest any useful tools. My environment is Mysql, PHP, JQuery, XAMPP server on Windows. Is JQuery provides one. Thanks in advance.

    Read the article

  • How do game trainers change an address in memory that's dynamic?

    - by GameTrainersWTF
    Lets assume I am a game and I have a global int* that contains my health. A game trainer's job is to modify this value to whatever in order to achieve god mode. I've looked up tutorials on game trainers to understand how they work, and the general idea is to use a memory scanner to try and find the address of a certain value. Then modify this address by injecting a dll or whatever. But I made a simple program with a global int* and its address changes every time I run the app, so I don't get how game trainers can hard code these addresses? Or is my example wrong? What am I missing?

    Read the article

  • Is dynamic evaluation of xpath variable string possible using .net 2.0 xslt implementation?

    - by Crocked
    Hi, I'm trying to evaluate an xpath varable I'm building dynamically based on the position of the node. I can create the xpath string in a variable but when I select the value of this just get the string and not the node set I need. I use the following to create the xpath <xsl:variable name="xpathstring" select="normalize-space(concat(&quot;//anAttribute[@key='pos&quot;,position(),&quot;']&quot;))"/> and try to output the value with the following. <xsl:value-of select="$xpathstring"/> If I execute the xpath in my debugger I get the nodeset but in my xml output only get the xpath string which looks like this //anAttribute[@key='pos1'] I had a look at exslt dyn:evaluate which seems to enable this but this seems to be only supported by certain processors and doesn't provide a standalone implementation or at least as far as I could see (currently using the standard .net 2.0 xslt whihc is only xslt 1.0 as far as I recall) Is there anyway to handle this without changing processor? Kind Regards, Crocked

    Read the article

  • How to generate a PDF of dynamic HTML content?

    - by chris Frisina
    I am trying to be able to allow users to generate content dynamically, and have that information be in a , and then allow that specific to be exportable to a pdf. I have got Joomla up and running (with the appropriate mySQL and ANT) locally with the Web2PDF extension, but how would I get those running on my domain (hosted by Dreamhost). Are there any other approaches you might recommend. The content is generated by JS and JQuery, and formatted with CSS and HTML. Other considerations: Web2PDF generates a PDF on the entire content, (pulling the entire page's HTML, not just the specific <div>.

    Read the article

  • Dynamic jQuery dialog after data append w/o reloading page. Possible?

    - by Arun
    Howdy, So I have a page with an enormous table in a CRUD interface of sorts. Each link within a span calls a jQuery UI Dialog Form which fetches it's content from another page. When the action taking place (in this case, a creation) has completed, it appends the resulting new data to the table and forces a resort of the table. This all happens within the JS and the DOM. The problem with this, is that the new table row's CRUD links don't actually trigger the dialog form creation as all the original links in spans are only scanned on document.ready and since I'm not reloading the page, the new links cannot be seen. Code is as follows: $(document).ready(function() { var $loading = $('<img src="/images/loading.gif" alt="Loading">'); $('span a').each(function() { var $dialog = $('<div></div>') .append($loading.clone()); var $link = $(this).one('click', function() { // Dialog Stuff success: function(data) { $('#studies tbody').append( '<tr>' + '<td><span><a href="./?action=update&study=' + data.study_id + '" title="Update Study">Update</a></span></td>' + '</tr>' ); fdTableSort.init(#studies); // This re-sorts the table. $(this).dialog('close'); } $link.click(function() { $dialog.dialog('open'); return false; }); return false; }); }); }); Basically, my question is if there is any way in which to trigger a jQuery re-evaluation of the pages links without forcing me to do a browser page refresh?

    Read the article

  • Is allocating a dynamic array without specifying size well formed code?

    - by Als
    The following simple program snippet gives compilation errorswith gcc-4.3.4. Program: int main() { char *ptr = new char[10]; char *ptr1 = new char[]; return 0; } Compilation errors: prog.cpp: In function ‘int main()’: prog.cpp:4: error: expected primary-expression before ‘]’ token prog.cpp:3: warning: unused variable ‘ptr’ prog.cpp:4: warning: unused variable ‘ptr1’ But the same compiles cleanly with MSVC without any diagnostic message. So my question is: Does the Standard allow an new [] to be called without specifying the size? Or this a bug in MSVC? Can someone provide a reference from the standard which will conclusively say that the above code example is ill-formed or well-formed? I have had a look at: 5.3.4 New [expr.new] & 18.4.1.2 Array forms [lib.new.delete.array] but couldnt find any conclusive evidence about the behavior.

    Read the article

  • Why does Java ArrayList use per-element casting instead of per-array casting?

    - by user1111929
    What happens inside Java's ArrayList<T> (and probably many other classes) is that there is an internal Object[] array = new Object[n];, to which T Objects are written. Whenever an element is read from it, a cast return (T) array[i]; is done. So, a cast on every single read. I wonder why this is done. To me, it seems like they're just doing unnecessary casts. Wouldn't it be more logical and also slightly faster to just create a T[] array = (T[]) new Object[n]; and then just return array[i]; without cast? This is only one cast per array creation, which is usually far less than the number of reads. Why is their method to be preferred? I fail to see why my idea isn't strictly better?

    Read the article

  • In C/C++,how to link dynamic link lib which compiled in GCC/G++ in MS VStudio?

    - by coanor
    These days, I use Flex & Bison generated some codes to develop a SQL-parser alike tools, these code can't compiled silently(may be this another topic) in VS2005,but GCC/G++ works well, then I compiled these code with mingw in dll(in windows xp), and then linked these function facades in VS2005, but it seems can't link the dll during linking. Does MS VS2005 recognize the dll which compiled using mingw on windows? Is there anything I need to do additional? For example, adding something in the include-file that declare the exported APIs? Does any one can give some advices? The condition is, as in VS2005, if you want to export some APIs, you may show a *.def file to tell nmake which API you want to export, and then you may create a(or some) *.h file to declare somthing about these APIs(adding some stdcall alike prefix as a call protocal) and some data-type definition. But with GCC/G++, you do not need to do such boring things, just use [ar], you can get these APIs, so my *.h file do not add call protocol and no *.def, just like common function declaration. After *.dll generated, add the *.h file and [mv] generated *.dll in VS2005 project directory, then set the linking *.dll in project setting. Does these steps generated my Question? BTW, I found and tested VC6-compiled dll can be linked with mingw in Windows XP, but the reverse can't work. Anyway, forgive my poor English, and thanks for your concern.

    Read the article

  • Runtime casting from String to other datatype

    - by Gengrlin
    Hi I have Map of String values. I want to cast this value at runtime. e.g. Map map = new HashMap(); map.put("key1","101"); map.put("key2","45.40"); Now runtime I know key1 is integer and key2 is double How can I cast this. I tried this: ("101").getClass().cast(Integer). Thanks.

    Read the article

  • Excel isn't reading sql exported csv properly

    - by mhopkins321
    I have a batch file that calls sqlcmd to run a command and then export the data as a csv. When viewed in a cell the trasancted date for example shows 35:30.0 but if you click on it the formula bar shows 1/1/1900 2:45:00 PM. I need the full timestamp to show in the cell. Any ideas? The batch file is the following sqlcmd -S server -U username -P password -d database -i "D:\path\sqlScript.sql" -s "," > D:\path\report.csv -I -W -k 1 The script is the following. Now I currently have them cast as varchars, but that's simply because i've tried to change it a bit. Varchar doesn't work either. SET NOCOUNT ON; select top(10)BO.Status, cast(tradeDate AS varchar) AS Trade_Date, CAST(closingTime AS varchar) AS Closing_Time, CAST(openingTime AS varchar) AS openingTime FROM GIANT COMPLICATED JOINS OF ALL SORTS OF TABLES

    Read the article

  • Is there a way to have a dynamic google map that opens links in _blank?

    - by danieltalsky
    I came up with a good solution for a client showing a google map iFrame using the normal google maps embed. Only problem? They want the links inside the iFrame to open in a new window instead of there on the page. So, I used the static API to come up with a static image of a map and have that link to the google maps site with target="_blank". Great, but they don't get the pretty draggable map. Is there a way to do what I want using the google maps API? I'm reading the API documentation but without actually trying it I'm not sure if it can be done, and would love it if someone with some experience with the API can point me in the right direction or just tell me why it's WAY not worth the effort.

    Read the article

  • How to set a dynamic width on a floating div?

    - by user330144
    I have a div container with 3 div elements inside (A, B, and C). I'll know the width of the container and the width of A and B) the problem is that in some cases B won't be there in which case I need C to expand to fill the rest of the container. How would I do this with straight css or am I going to need to use javascript to calculate the width? Thanks.

    Read the article

  • compare date split across colums

    - by alex-tech
    Greetings. I am querying tables from Microsoft SQL 2008 which have date split across 3 columns: day, month and year. Unfortunately, I do not have control over this because data is coming in to the database daily from a 3rd party source in that format. I need to add between to a where clause so user can pull records within a range. Would be easy enough if date was in a single column but finding it nearly impossible when its split across three columns. To display the date, I am doing a CAST( CAST(year as varchar(4)) + '-' + CAST(month as varchar(2)) + '-' + CAST(day as varchar(2)) as date) AS "date"` in a select. I tried to put it as a parameter for datediff function or just the regular between but get no results. Thanks for any help.

    Read the article

  • any way to simplify this with a form of dynamic class instantiation?

    - by gnychis
    I have several child classes that extend a parent class, forced to have a uniform constructor. I have a queue which keeps a list of these classes, which must extend MergeHeuristic. The code that I currently have looks like the following: Class<? extends MergeHeuristic> heuristicRequest = _heuristicQueue.pop(); MergeHeuristic heuristic = null; if(heuristicRequest == AdjacentMACs.class) heuristic = new AdjacentMACs(_parent); if(heuristicRequest == SimilarInterfaceNames.class) heuristic = new SimilarInterfaceNames(_parent); if(heuristicRequest == SameMAC.class) heuristic = new SameMAC(_parent); Is there any way to simplify that to dynamically instantiate the class, something along the lines of: heuristic = new heuristicRequest.somethingSpecial(); That would flatten that block of if statements.

    Read the article

  • How do I display/compare a dynamic value of a mysql row in a if statement?

    - by Ralph The Mouf
    I have a checkboxes on my site that when unchecked, update their row in in the db as unchecked, and if checked,update their row in the db as checked. I am creating an ifstatement that will commence with its command if checked, and not if unchecked. I have echoed the variable and it is holding the proper value (checked or unchecked) but not sure if I am syntactically correct on displaying the state of the row in the db. This is what I am trying and will not work. I am new at php still and thank you very much for any help. if($auth->check_prof == 'checked'){// do the stuff in here}

    Read the article

  • How to pass dynamic id text box value to another page without refreshing with jquery and php

    - by linlin
    $('.btncomment').click(function() { var id = $(this).attr('id'); $.post('SaveTopicInformation.php',{tid:commentform.(topic_+id).value, topicdetail:commentform.(topicdetail_+id).value,userid:commentform.(user_+id).value}); }); $userid=$rows['UserID']; $topicid=$rows['TopicID']; ? " " class="commentAlink"Comment " " value=""/ " value=""/ " cols="50" rows="5" "Cancel " value="Comment" / ?

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >