Search Results

Search found 11238 results on 450 pages for 'miserable variable'.

Page 39/450 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • XSLT: If Node = A then set B=1 Else B=2

    - by Larry
    I am looping thru looking at the values of a Node. If Node = B, then B has one of two possible meanings. --If Node = A has been previously found in the file, then the value for A should be sent as 1. --If Node = A has NOT been found in the file, the the value for A should be sent as 2. where file is the xml source to be transformed I cannot figure out how to do this. If I was using a programming language that allowed for a variable to have its value reassigned/changed, then it is easy. But, with XSLT variables are set once.

    Read the article

  • MacOSX + Eclipse: Rename variable function not working

    - by MIsha
    Good day. I have Eclipse PHP Galileo for Mac OSX, 32bit Cocoa version. The problem is the rename function doesn't work properly. While editing PHP file I choose Refactor-Rename menu or a rename hotkey and Eclipse doesn't offer me to rename a variable, instead a rename file dialog appears. Tried to configure hotkeys but no luck. If you do know the solution – please tell. Thank you.

    Read the article

  • TSQL: Variable scope and EXEC()

    - by Joel
    declare @test varchar(20) set @test = 'VALUE' exec(' select '+@test+' ') This returns: Invalid column name 'VALUE'. Is there an alternate method to display the variable value on the select statement?

    Read the article

  • jQuery .get appends an unknown variable to URL

    - by ILMV
    I'm using this code as the starting point to an overhaul of our JavaScript framework: $("#get").click(function(){ $("#result").html(ajax_load); $.get( "http://www.google.com", {}, function(responseText){ $("#result").html(responseText); }, "html" ); }); But when the request is made it includes a variable within the URL that I am unfarmiliar with, here is what Firebug says it's requesting: http://www.google.com/?_=1268993359215 How do I get rid of this, when we target our internal scripts it's firing a 404 error :-( Cheers!

    Read the article

  • Why do I get this error when trying to set up a class variable

    - by Jennifer
    I'm new to PHP so maybe I am overlooking something here but the following: class someClass { var $id = $_GET['id']; function sayHello() { echo "Hello"; } } gives the following error: Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\files\classes.php on line 13 If instead of $_GET['id'] I set the variable $id to a string, everything is fine though.

    Read the article

  • Variable lenght arguments in log4cxx LOG4CXX_ macros

    - by Horacio
    I am using log4cxx in a big C++ project but I really don't like how log4cxx handles multiple variables when logging: LOG4CXX_DEBUG(logger, "test " << var1 << " and " << var3 " and .....) I prefer using printf like variable length arguments: LOG4CXX_DEBUG(logger, "test %d and %d", var1, var3) So I implemented this small wrapper on top of log4cxx #include <string.h> #include <stdio.h> #include <stdarg.h> #include <log4cxx/logger.h> #include "log4cxx/basicconfigurator.h" const char * log_format(const char *fmt, ...); #define MYLOG_TRACE(logger, fmt, ...) LOG4CXX_TRACE(logger, log_format(fmt, ## __VA_ARGS__)) #define MYLOG_DEBUG(logger, fmt, ...) LOG4CXX_DEBUG(logger, log_format(fmt, ## __VA_ARGS__)) #define MYLOG_INFO(logger, fmt, ...) LOG4CXX_INFO(logger, log_format(fmt, ## __VA_ARGS__)) #define MYLOG_WARN(logger, fmt, ...) LOG4CXX_WARN(logger, log_format(fmt, ## __VA_ARGS__)) #define MYLOG_ERROR(logger, fmt, ...) LOG4CXX_ERROR(logger, log_format(fmt, ## __VA_ARGS__)) #define MYLOG_FATAL(logger, fmt, ...) LOG4CXX_FATAL(logger, log_format(fmt, ## __VA_ARGS__)) static log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger()); int main(int argc, char **argv) { log4cxx::BasicConfigurator::configure(); MYLOG_INFO(logger, "Start "); MYLOG_WARN(logger, log_format("In running this in %d threads safe?", 1000)); MYLOG_INFO(logger, "End "); return 0; } const char *log_format(const char *fmt, ...) { va_list va; static char formatted[1024]; va_start(va, fmt); vsprintf(formatted, 1024, fmt, va); va_end(va); return formatted; } And this works perfectly but I know using that static variable (formatted) can become problematic if I start using threads and each thread logging to the same place. I am no expert in log4cxx so I was wondering if the LOG4CXX macros are handling concurrent thread access automatically? or do I have to implement some sort of locking around the log_format method? something that I wan't to avoid due to performance implications. Also I would like to ask why if I replace the vsprintf inside the log_format method with vsnprintf (that is more secure) then I get nothing printed? To compile and test this program (in Ubuntu) use : g++ -o loggertest loggertest.cpp -llog4cxx

    Read the article

  • use variable within a linq query

    - by jstawski
    take this linq into consideration: list.Where(sil => sil.XML.Element("ticket") != null && sil.XML.Element("ticket").Attribute("id").Value == smsRequestIn.TicketID) if the "ticket" element is not null it searches for it twice and hence is not very effective. Is there a way to use some sort of variables within the linq expression so I can reference the variable instead of doing a double search for the "ticket" element or is linq intelligent enough to not do a double search?

    Read the article

  • Using match variable $1 for a substitution in Perl

    - by justintime
    What is the cleanest way of picking up a match variable form a subsitution in Perl I sometimes find myself writing s/(something)// ; my $x = $1 ; then I realise that if the s/ / / fails $1 might be carrying over a value from a previous match. So I try my $x = 'defaultvalue' ; if ( s/(something)// ) { $x = $1 ; } Is this be cleanest way of doing it.

    Read the article

  • how to use variable name with image tag

    - by drake
    my controller uses code like this: if params[:commit] == "Submit" this used to work fine when I just had buttons. however, now I am using images as buttons like below: <%= image_submit_tag 'butons/Add-08.png', :class => 'image-button-submit' %> How can I pass the commit variable with value Submit along with this image_submit_tag?

    Read the article

  • Userscript: pass a variable to new page

    - by Anon
    I am trying to pass a variable from one page, load another and enter that information. something Like this: When 127.0.0.1/test.html&ID=1234 location.href = "127.0.0.1/newpage.html" if (location.href == newpage.html){ var e = document.GetElementById("Loginbx"); e.Value = ID } I don't have access to modify 127.0.0.1/test.html nor newpage.html but would like to pass variables to them from another. Is this possible?

    Read the article

  • Access static class variable of parent class in Python

    - by fuenfundachtzig
    I have someting like this class A: __a = 0 def __init__(self): A.__a = A.__a + 1 def a(self): return A.__a class B(A): def __init__(self): # how can I access / modify A.__a here? A.__a = A.__a + 1 # does not work def a(self): return A.__a Can I access the __astatic variable in B? It's possible writing a instead of __a, is this the only way? (I guess the answer might be rather short: yes :)

    Read the article

  • Variable assignment in bash

    - by Werner
    Hi, this is probably a very stupid question; in a bash script, given the output of, for instance; awk '{print $7}' temp it gives 0.54546 I would like to give this to a variable, so I tried: read ENE <<< $(awk '{print $7}' temp) but I get Syntax error: redirection unexpected Could you tell me why, and what is the easiest way to do this assignment? Thanks

    Read the article

  • How to echo Hyperlink Containing a Variable?

    - by John
    Hello, In the code below, I would like to make the word that prints out as the variable "$submittor" a hyperlink to "http://www...com/.../members/index.php?profile=$submittor" . I can't get it to work; I think I'm doing the formatting wrong. How can I do it? Thanks in advance, John echo '<div class="sitename3name">Submitted by '.$submittor.' on '.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</div>';

    Read the article

  • Subclass not seeing superclass' instance variable

    - by hyn
    I have a situation where my subclass is not seeing the superclass' instance variable x. The ivar is obviously @protected by default, so why do I get a compiler error "x undeclared"? If I make this ivar a property then I can access it by self.x. What's worse is sometimes the error disappears, so something in my code is obviously causing this error but I cannot figure it out.

    Read the article

  • SSIS global variable

    - by Pramodtech
    Is there anything similar to global variable in SSIS? I have 4 variables (FromAddress, ToAddress,...) which will be used in all packages (32). So if I can set them only once it will be very easy to use in all packages and will save my time. Please advise.

    Read the article

  • how to get path froma variable

    - by yoshco
    following http://stackoverflow.com/questions/659647/how-to-get-folder-path-from-file-path-with-cmd i want to strip the path (without the filename) from a variable. following the logic of the methods discussed above i would like to use batch bellow, which doesnt work. any takers? possible? set cpp="C:\temp\lib.dll" echo %cpp% "C:\temp\lib.dll" echo %~dpcpp "C:\temp\" > doesn't work

    Read the article

  • Accessing an owners variable

    - by Dyldo42
    Okay, I have a ViewController that has 12 UIButtons as instance variables, and they are created in interface builder. I want to access another variable in the viewController from the UIButton's init method. Is that possible? By the way, I'm writing in Objective-C in the iPhone SDK. Cheers.

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >