Search Results

Search found 13794 results on 552 pages for 'variable scope'.

Page 90/552 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • Adding a variable href attribute to a hyperlink using XSLT

    - by Pete
    I need to create links using dynamic values for both the URL and the anchor text. I have column called URL, which contains URL's, i.e., http://stackoverflow.com, and I have a column called Title, which contains the text for the anchor, i.e., This Great Site. I figure maybe all I need to do is nest this tags, along with a little HTML to get my desired result: <a href="> <xsl:value-of select="@URL">"> <xsl:value-of select="@Title"/> </xsl:value-of> </a> In my head, this would render: <a href=" http://stackoverflow.com"> This Great Site </a> I know there's more to it, but I haven't been able to clearly understand what more I need. I think this issue has been addressed before, but not in a way I could understand it. I'd be more than happy to improve the question's title to help noobs like myself find this item, and hopefully an answer. Any help is greatly appreciated.

    Read the article

  • Objective-C Passing a variable to another IBAction

    - by StuR
    This works fine: NSString *myVariable; - (IBAction) doFirstAction { myVariable = @"123456789"; } - (IBAction) doSecondAction { NSLog(@"%@",myVariable); } However, if I do this (substituting the @"123456789" for some code which returns the same value ie "123456789") I cannot access the value in doSecondAction. NSString *myVariable; - (IBAction) doFirstAction { myVariable = [imageNode getAttributeName:@"value"]; } - (IBAction) doSecondAction { NSLog(@"%@",myVariable); } Any clue as to why I cant access myVariable outside of doFirstAction?

    Read the article

  • Populating a Datagrid with variable number of columns and rows in Flex

    - by Rie Mino
    I am trying to figure out how to manage a Datagrid based on an XML object like this: <matrix rows="5" columns="5"> <column> <row>0.5</row> <row>0.21</row> </column> <column> <row>0.6</row> <row>0.9</row> </column> <column> <row>0.5</row> <row>0.5</row> </column> <column> <row>0.8</row> <row>0.4</row> </column> </matrix> I will need to populate the Datagrid column names based on a different XML object and use the above XML to populate each of the column's rows. I currently am able to create the Datagrid and populate its column headers but I am unsure as to how to how to add the rows for each column. The above XML will be update with new row and column elements added and deleted. This, of course, will be bound to the Datagrid to show updates. Thanks in advanced for your help.

    Read the article

  • python multiprocessing member variable not set

    - by Jake
    In the following script, I get the "stop message received" output but the process never ends. Why is that? Is there another way to end a process besides terminate or os.kill that is along these lines? from multiprocessing import Process from time import sleep class Test(Process): def __init__(self): Process.__init__(self) self.stop = False def run(self): while self.stop == False: print "running" sleep(1.0) def end(self): print "stop message received" self.stop = True if __name__ == "__main__": test = Test() test.start() sleep(1.0) test.end() test.join()

    Read the article

  • Different PATH environment variable for 32bit and 64bit Windows - is it possible?

    - by Piotr Dobrogost
    Is it possible to have whole or part of PATH environment variable specific to the type of running process's image (32bit/64bit)? When I run some app from within 64bit cmd.exe I would like to have it pick the 64bit version of OpenSSL library whereas when I run some app from within 32bit cmd.exe I would like to have it pick the 32bit version of OpenSSL library. FOLLOW UP where.exe does not find OpenSSL libs when %ProgramFiles% variable is used in the PATH environment variable

    Read the article

  • Breakpoint when variable takes on a certain value.

    - by Mick
    I have something analogous to the following code... void function(int x) { // complicated operation on x blah blah } It all appears to be working fine except when x happens to be a particular value, say "273". But x being 273 is a rare event, 99.999% of the time it is some other value. Now I wish to observe the events when this function is called with x=273, so I would like to insert a breakpoint that gets hit only with x is that value. Perhaps I could do it like this: void function(int x) { if (x == 273) { // put breakpoint on this line. } // complicated operation on x blah blah } The problem is that presumably the compiler will optimise away this "if" statement because it doesn't do anything. So my question is what should I put within the "if" statement to to make sure it gets compiled in to something... or should I be tracing the x==273 case in some completely different way.

    Read the article

  • Array of strings and char ** environ variable.

    - by Naruto Uzumaki
    Hello! I want to know how an array of strings is declared? What I do is I declare an array of pointers of pointers to strings. Eg. char *array[]= {"string1","string2","string3"}; I was reading about modifying environment variables in Linux and stumbled upon the pointer char **environ ( http://www.cs.bham.ac.uk/resources/courses/2005/17423/doc/libc/Environment-Access.html#Environment-Access ). char **environ is declared as an array of strings. I think it should be a pointer to a pointer. For eg. char *array[]= {"string1","string2","string3"}; environ = array; Am I doing something wrong? I also read somewhere that char *argv[] = char **argv. How is it possible?

    Read the article

  • dirname(__FILE__) VS setting global variable to directories

    - by SAFAD
    what are the pros and cons of using this : $globals['server_url'] = dirname(__FILE__); $globals['mainfiles'] = dirname(__FILE__).'/main'; and the pros and cons of using this : $globals['server_url'] = '/srv/www/htdocs/somwhere/'; $globals['mainfiles'] = '/srv/www/htdocs/somwhere/main'; And what do you suggest. by the way: these are set in config.php file which is called by other files as well, to stop directory conflicts when including files we use it like this : require_once($globals['server_url'].'/test.php');

    Read the article

  • Constructor with non-instance variable assistant?

    - by Robert Fischer
    I have a number of classes that look like this: class Foo(val:BasicData) extends Bar(val) { val helper = new Helper(val) val derived1 = helper.getDerived1Value() val derived2 = helper.getDerived2Value() } ...except that I don't want to hold onto an instance of "helper" beyond the end of the constructor. In Java, I'd do something like this: public class Foo { final Derived derived1, derived2; public Foo(BasicData val) { Helper helper = new Helper(val); derived1 = helper.getDerived1Value(); derived2 = helper.getDerived2Value(); } } So how do I do something like that in Scala? I'm aware of creating a helper object of the same name of the class with an apply method: I was hoping for something slightly more succinct.

    Read the article

  • Adding "selected" into option from matching variable. PHP

    - by Dolan
    I have $country which stores the 2 letter country code of a user. US for example. <select id="countries"> <option value="US">United States</option> <option value="EN">England</option> <option value="AU">Australia</option> <option value="CA">Canada</option> etc. </select> What's the best practice to add "selected" to the option of the users country code? I'm against adding a million if's. Also note, the countries are harcoded in HTML, so no array. :(

    Read the article

  • PHP Include and sort by variable within file

    - by Jason Hoax
    I have written this PHP include-script but now I'm trying to sort the included files out by variables WITHIN the included php's. In other words, in each included PHP file there is a rating, now I want the ratings to be read so that when they are included they will be sorted out from highest to lowest. (scores are like 6.0 to 9.0) Kind Regards! $location = 'experiments/visualizations'; foreach (glob("$location/*.php") as $filename) { include $filename; } The included files are named randomly like: File1: $filename = "AAAA"; $projecttitle = "Project Name"; $description = "This totally explains the product"; $score = "7.6"; File 2: $filename = "BBBB"; $projecttitle = "Project Name2" $description = "This totally explains the product"; $score = "9.6"; As you can see 9.6 is higher than 7.6 but PHP sorts the includes out by name instead of variables within the file. I tried sorting, but I can't get it fixed. Help!

    Read the article

  • Variable timeouts in GLib

    - by Matachana
    I need to modify a GLib's time-out interval while it is in execution. Is that possible? I took a look to the source code and it seems possible to me, but is required use some non-public functions from GLib internals. Should I reimplement GTimeoutSource or there are a way to do it?

    Read the article

  • How to use parameter variable in xslt

    - by Abbi
    Hi I am new to xslt so please let me know whats wrong with my syntax here. If I compare with a Constant value of '880.50' I get the desired result. But if I try to do the samething with parameter being passed I get nothing. The code snippet is as under. <xsl:template name="ShowJourneyLegs" > <xsl:param name="TotalFare" /> <Key4><xsl:value-of select='$TotalFare'/></Key4> <JourneyLegKeys><xsl:value-of select="/FareSearchResponse/CompleteItineraryFares/AirFare[@Total = '880.50']/JourneyLegKeys/Key[1]"/></JourneyLegKeys> <JourneyLeg><xsl:value-of select="/FareSearchResponse/CompleteItineraryFares/AirFare[@Total = '$TotalFare']/JourneyLegKeys/Key[1]"/></JourneyLeg> </xsl:template>

    Read the article

  • gets (variable)

    - by borlee
    can anyone tell me why gets(abc) works with char[] but not with int? int abc; char name[] = "lolrofl"; printf("Hello %s.\n",name); printf("\n "); fflush(stdin); gets (abc); printf("\n die zahl ist %i.\n",abc); system("Pause"); return(0);

    Read the article

  • how to get get-item cmdlet's output to variable as string

    - by aeon
    i mean when i call get-item with directory it dump to console like this ---- ------------- ------ ---- d---- 2/16/2011 8:27 PM 2011-2-16 -a--- 2/13/2011 8:24 PM 3906877184 SWP-Full Database Backup_2011-02-13 0 -a--- 2/16/2011 8:23 PM 3919766476 SWP-Full Database Backup_2011-02-16.bak 8 -a--- 2/12/2011 8:18 PM 3906877747 SWP-Full Database Backup_2011-02-12 2 -a--- 2/14/2011 8:21 PM 3875484467 SWP-Full Database Backup_2011-02-14 2 but when i convert to string it changes as \\192.168.2.89\BwLive\2011-2-16 \\192.168.2.89\BwLive\SWP-Full Database Backup_2011-02-13 \\192.168.2.89\BwLive\SWP-Full Database Backup_2011-02-16.bak \\192.168.2.89\BwLive\SWP-Full Database Backup_2011-02-12 \\192.168.2.89\BwLive\SWP-Full Database Backup_2011-02-14 i mean length,size,time attributes is omitted how can i keep these attributes while converting to string? thanks.

    Read the article

  • storing an integer constant other than zero in a pointer variable

    - by benjamin button
    int main() { int *d=0; printf("%d\n",*d); return 0; } this works fine. >cc legal.c > ./a.out 0 if i change the statement int *d=0; to int *d=1; i see the error. cc: "legal.c", line 6: error 1522: Cannot initialize a pointer with an integer constant other than zero. so its obvious that it will allow only zero.i want to know what happens inside the memory when we do this int *d=0 which is making it valid syntax. I am just asking this out of curiosity!

    Read the article

  • Processing variable number of form fields

    - by a_m0d
    I am working on a form which displays information about orders. Each order has a unique id, but they are not necessarily sequential on the form. Also, the number of fields can vary (one field per row on the form). The input into the form will not be mapped straight into the database, but will be added to the current value in the database, and then saved. An example of the form is in the picture below - the callout on the right shows the id for each row. I know how to generate the form like this, but I can't work out how I can easily process each of these rows reliably. I also know how to give each of the fields a unique identifier, like name="row-23", but how can I translate that name so that I can update the related record in the database?

    Read the article

  • Js Variable Reference Quickie

    - by Nikki
    Hoping someone can clear this up for me. Let's say I have 2 globals: var myarray=[1,3,5,7,9],hold; and then I do this: function setup() { alert (myarray[0]);//shows 1 hold=myarray; alert (hold);//appears to show 'hold' containing all the values of myarray. first number shown is 1 myarray[0]=2; alert (hold);//shows the values of myarray with the updated first entry. first numbe shown is 2 } Am I to take it that 'hold' is simply keeping a reference to myarray, rather than actually taking all the values of?

    Read the article

  • How to check for undefined or null variable in javascript

    - by Thomas Wanner
    We are frequently using the following code pattern in our javascript code if(typeof(some_variable) != 'undefined' && some_variable != null) { // do something with some_variable } and I'm wondering whether there is a less verbose way of checking that has the same effect. According to some forums and literature saying simply if(some_variable) { // do something with some_variable } should have the same effect. Unfortunately, Firebug evaluates such a statement as error on runtime when some_variable is undefined, whereas the first one is just fine for him. Is this only an (unwanted) behavior of Firebug or is there really some difference between those two ways ?

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >