Search Results

Search found 15797 results on 632 pages for 'session variables'.

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

  • Drupal Imagecache Actions with ImageField and Node variables

    - by HS2323
    I am able to add text to onto a imagefield using the imagecache textrender preset action (for a content type). I pull the node title using the following in the imagecache preset text: global $node; return $node->title; However this only works when an image is uploaded when creating new content. If I have an image set as a default for the content type (and none are added when creating the new page) then it won't overlay the node title. I tried just regular text in the preset action field on the default image and it worked. Can anyone help me with this?

    Read the article

  • How to mock static member variables

    - by pkrish
    I have a class ClassToTest which has a dependency on ClassToMock. public class ClassToMock { private static final String MEMBER_1 = FileReader.readMemeber1(); protected void someMethod() { ... } } The unit test case for ClassToTest. public class ClassToTestTest { private ClassToMock _mock; @Before public void setUp() throws Exception { _mock = mock(ClassToMock.class) } } When mock is called in the setUp() method, FileReader.readMemeber1(); is executed. Is there a way to avoid this? I think one way is to initialize the MEMBER_1 inside a method. Any other alternatives? Thanks!

    Read the article

  • variables in batch scripts

    - by richzilla
    I'm trying to set up a batch file to automatically deploy a php app to a web server. Basically, what I want is an entirely automated process: I would just give it a revision number from the repository and it would then export the files, upload via ftp and then update deployment info at the repo host (codebase). However, I'm starting from scratch here. How would I set up a batch file to accept a variable when it was run? For example, the command myfile.bat /revision 42 should deploy revision 42 to my server. If anyone can point me in the right direction I'd appreciate it.

    Read the article

  • Permissions for Large Variables to Be Sent Via Stored Procedures (SQL Server)

    - by Joe Majewski
    I can't figure out a way to allow more than 4000 bytes to be received at once via a call to a stored procedure. I am storing images in the table that are around 15 - 20 kilobytes each, but upon getting them and displaying them to the page, they are always exactly 3.91 KB in size (or 4000 bytes). Do stored procedures have a limit on how much data can be sent at once? I double-checked my data, and I am indeed only receiving the first 4000 characters from the varbinary(MAX) field. Is there a permission setting to allow more than 4k bytes at once?

    Read the article

  • Session Issue only in IE for an ASP .NET application

    - by Siva
    We have migrated our Asp .NET application from Windows 2000 server to Windows 2003 Server when we access the site from Internet explorer we are facing some cache issues like when we click on logout its redirecting to homepage instead of login page but when i try to navigate inside its not allowing me i.e. its throwing me the user id and password is wrong.. i am facing this issue only in IE if i access the same page from Firefox i am not gettiing these kind of issue.. Is this problem related to some IIS settings or some code change is required? please help me in solving this issue...

    Read the article

  • ggplot: showing % instead of counts in charts of categorical variables

    - by wishihadabettername
    I'm plotting a categorical variable and instead of showing the counts for each category value, I'm looking for a way to get ggplot to display the percentage of values in that category. Of course, it is possible to create another variable with the calculated percentage and plot that one, but I have to do it several dozens of times and I hope to achieve that in one command. I was experimenting with something like qplot (mydataf) + stat_bin(aes(n=nrow(mydataf), y=..count../n)) + scale_y_continuous(formatter="percent") but I must be using it incorrectly, as I got errors. To easily reproduce the setup, here's a simplified example: mydata <- c ("aa", "bb", null, "bb", "cc", "aa", "aa", "aa", "ee", null, "cc"); mydataf <- factor(mydata); qplot (mydataf); #this shows the count, I'm looking to see % displayed. In the real case I'll probably use ggplot instead of qplot, but the right way to use stat_bin still eludes me. Thank you. UPDATE: I've also tried these four approaches: ggplot(mydataf, aes(y = (..count..)/sum(..count..))) + scale_y_continuous(formatter = 'percent'); ggplot(mydataf, aes(y = (..count..)/sum(..count..))) + scale_y_continuous(formatter = 'percent') + geom_bar(); ggplot(mydataf, aes(x = levels(mydataf), y = (..count..)/sum(..count..))) + scale_y_continuous(formatter = 'percent'); ggplot(mydataf, aes(x = levels(mydataf), y = (..count..)/sum(..count..))) + scale_y_continuous(formatter = 'percent') + geom_bar(); but all 4 give: Error: ggplot2 doesn't know how to deal with data of class factor The same error appears for the simple case of ggplot (data=mydataf, aes(levels(mydataf))) + geom_bar() so it's clearly something about how ggplot interacts with a single vector. I'm scratching my head, googling for that error gives a single result.

    Read the article

  • curl multiple request session issue

    - by embedded
    I'm using curl multi API for multiple curl requests. first I'm using a single request to login to a site and save the cookie file. then I'm using the curl multi API to get some data from that site. The problem I'm facing is that from some reason the cookie file does not get read and I'm redirecting to the main login page. I must say that this work once in awhile so I can't point what went wrong. Any help would be much appreciated. Thanks

    Read the article

  • mvc - how to avoid log out when refresh a page

    - by user235973457
    I have built the MVC application with WCF service. The major problem I have experienced with refreshing page. I have created a login page with session (username and password). But when you refresh the home page by pressing F5, it would automatically log out. That is my problem. I need to stay the home page after refresh. I have been googling around to find a solution but it seems not helpful. Any idea? Your advise or code example much appreciated.

    Read the article

  • ActionScript: Using 'in' on protected/private variables?

    - by David Wolever
    Is there any way to mimic the in operator, but testing for the existence of protected or private fields? For example, this: <mx:Script><![CDATA[ public var pub:Boolean = true; protected var prot:Boolean = true; private var priv:Boolean = true; ]]></mx:Script> <mx:creationComplete><![CDATA[ for each (var prop in ["pub", "prot", "priv", "bad"]) trace(prop + ":", prop in this); ]]></mx:creationComplete> Will trace: pub: true prot: false priv: false bad: false When I want to see: pub: true prot: true priv: true bad: false

    Read the article

  • How to write a CASE WHEN statement with multiple DATEDIFF variables

    - by Anne C
    I need to calculate the difference between two dates (facility_start_date, facility_end_date) for a report in Reporting Services in SQL 2005. If the facility_end_date is null then it needs to use the report parameter @EndDate in the calculation. However if the facility_end_date is greater than the parameter @EndDate, then it also needs to use the paramenter @EndDate. The code below works fine except that if the facility_end_date is greater than the parameter @EndDate it is still calculating between the facility_start_date and facility_end_date, rather than between the facility_start_date and @EndDate. Any help would be appreciated. CASE WHEN facility_start_date > facility_end_date THEN NULL WHEN DATEPART(day , facility_start_date) > DATEPART(day , facility_end_date) THEN DATEDIFF(d , facility_start_date , ISNULL(facility_end_date , @EndDate)) - 1 WHEN DATEPART(day , .facility_end_date) > DATEPART(day , @EndDate) THEN DATEDIFF(d , facility_start_date , @EndDate) - 1 ELSE DATEDIFF(d , facility_start_date , ISNULL facility_end_date , @EndDate)) END

    Read the article

  • Dynamic URL to Stay the Same on all Pages

    - by JCBiggar
    so when my url looks like this: http://mywebsitehere.com/?kw=1 I am using this code below to do stuff with it: <?php if( isset($_GET['kw'] )){ //my div here } ?> It works great, and I am getting exactly what I want on the page. However, any link I click on that page will change the url structure and remove the ?kw=1 . Is there anyway to add the ?kw=1 to every link for that session? I have no clue how to do this? Any ideas or answers would be great! Thanks! Let me know if I need to give more to my question.

    Read the article

  • R equivalent of SELECT DISTINCT on two or more fields/variables

    - by wahalulu
    Say I have a dataframe df with two or more columns, is there an easy way to use unique() or other R function to create a subset of unique combinations of two or more columns? I know I can use sqldf() and write an easy "SELECT DISTINCT var1, var2, ... varN" query, but I am looking for an R way of doing this. It occurred to me to try ftable coerced to a dataframe and use the field names, but I also get the cross tabulations of combinations that don't exist in the dataset: uniques <- as.data.frame(ftable(df$var1, df$var2))

    Read the article

  • Pass variable number of variables to a class in PHP

    - by user325282
    I need to pass a variable number of strings to instantiate different classes. I can always do a switch on the size of the array: switch(count($a)) { case 1: new Class(${$a[0]}); break; case 2: new Class(${$a[0]}, ${$a[1]}); break; etc... There has to be a better way to do this. If I have an array of strings ("variable1", "variable2", 'variable3", ...), how can I instantiate a Class without manually accounting for every possibility?

    Read the article

  • retrieving variables with jquery ajax

    - by vick
    <div class="lead_detail_box_routing"> <div class="lead_detail_box_left">location 1</div> <div class="lead_detail_box_right">Route</div> <div class="lead_detail_box_left">location 2</div> <div class="lead_detail_box_right">Route</div> <div class="lead_detail_box_left">location 3</div> <div class="lead_detail_box_right">Route</div> <div class="lead_detail_box_left">location 4</div> <div class="lead_detail_box_right">Route</div> <div id="results" style="text-align:center;"></div> </div> <!-- end lead_detail and routing--> e.g. when user clicks on "route" I want my jquery-manual-routing.php to get the "3" .. so far I have: <script type="text/javascript"> $(document).ready(function() { $("a#route").click(function() { $("#results").load( "jquery-manual-routing.php", { route_to: ???? } ); return false; }); }); </script> so in my php script, when the user clicks on route next to location 3 I want to be able to grab $_GET['route_to'] =3; Also note that my table already has the class assigned since I am using css to style it The answer will be pure php echo

    Read the article

  • Need help with some functions and variables

    - by Doug
    function createXMLHTTP() { xmlhttp = =new XMLHttpRequest(); return xmlhttp; } I'm trying to create 3 instances of this, but it all has the same variable name which is xmlhttp. How can I dynamically create different variable names? I'm not sure if that's the right way to ask the question. I want to create like xmlhttp1, xmlhttp2, xmlhttp3, so then I can reference each one.

    Read the article

  • IE Kills Session After Exporting CSV [CakePHP]

    - by OneBlueMidnight
    i have a web application that export CSV and i logged in as admin but what happened during the exportation the IE opens a new tab and export the CSV but what happens next when you click any of the link on the web app you will automatically logout! This only happen on IE. here is the header i used: header("Content-type:application/vnd.ms-excel"); header("Content-disposition:attachment;filename=".$this->filename); I am using cakephp 1.3.x.x TIA :D

    Read the article

  • php adding value to session

    - by antikbd
    I am trying to implement a 'shopping cart' where, if the 'Add to Cart' has been clicked, the respective item is either added to the cart or incremented by one if already present. However, the following code isn't working and giving me a "Cannot use a scalar value as an array" error. Any help would be highly appreciated. if (isset($_POST['fan']) && ($_POST['fan']=="Add to Cart")) { if (($_SESSION['cart']['fan']==0) || (!isset($_SESSION['cart']['fan']))) { $_SESSION['cart']['fan']=1; } else { $_SESSION['cart']['fan']++; } }

    Read the article

  • Logging a user session for playback

    - by justSteve
    Running an MVC2 site against IIS7 and would like to capture more detail of how users traverse the site - ideally to the point of being able to replay even the duration between mouse clicks - feedback of where people pause and/or backtrack. I could do this with flash but that's no longer an option. Now it's just IIS7 via asp.net f4. That should be enough IIS7 is supposed to be extensible enough that there'd be any number of 3rd party options for this sort of niche need. I'm willing to consider client-side .net components but this sure seems to be the responsibility of the server. [opps...does this belong on serverfault?] thx

    Read the article

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