Search Results

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

Page 111/632 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • Getting two variables in the URL with htaccess

    - by Wayne
    What way it is to be to get two GET methods in the URL by htaccess? RewriteRule ^adm/(.*)$ adm.php?mode=$1 I've used that for the example URL: http://www.domain.com/adm/thismode Now I want to get two methods like: http://www.domain.com/adm/thismode/othermode I've tried this: RewriteRule ^adm/(.*)$/(.*)$ adm.php?mode=$1&othermode=$2 But doesn't seem to work... how do I get it to do that? EDIT: $mode1 = $_GET['mode']; $mode2 = $_GET['othermode']; Like this...

    Read the article

  • Java: InitialContext.lookup(String) - what should the value o the parametr be?

    - by bguiz
    To instantiate a Stateful Session Bean inside of a JSP/ servlet, I am using: InitialContext ic = new InitialContext(); SomeStateful state = (SomeStateful) ic.lookup("java:comp/env/SomeStatefulBean"); Trial and error had me prefix the name of my EJB with java:comp/env/, so the above works (on Glassfish 2.1). However I want to know what the proper way to obtain this prefix is. Is there a CLI tool or function somewhere in the admin panel that will allow we to examine/ alter this? Is this platform/ application server dependant? Is there a setting within my ear, EJB-jar or war which I can examine or alter for this? (Forgive the beginner question) Thanks!

    Read the article

  • Using PHP, can I put variables inside of variables?

    - by Rob
    For example, take this code: $ch = curl_init($resultSet['url']."?get0=get0&get1=".$get1."&get2=".$get2."&get3=".$get3); This of course, looks very ugly, and kind of a pain in the ass to read. So my question is, would I be able to use something like this: $allgets ="?act=phptools&host=".$host."&time=".$duration."&port=".$port; $ch = curl_init($resultSet['url'] . $allgets); Very simple question I suppose, but my server is undergoing maintenance, so I can't upload it and test it myself. I suppose a yes or no answer will suffice, but if you have a more efficient way of doing this, that would be even better. :)

    Read the article

  • Referencing global variables in local scopes

    - by Jineesh
    Hello, I would like to know memory leak in the below mentioned code. Does JavaScript do automatic garbage collection. var aGlobalObject = SomeGlobalObject; function myFunction() { var localVar = aGlobalObject; } Do I have to clear the memory as given below. var aGlobalObject = SomeGlobalObject; function myFunction() { var localVar = aGlobalObject; localVar = null;// or delete localVar } Thanks

    Read the article

  • Best Tomcat6 JNDI + Hibernate configuration for session/transaction support

    - by EugeneP
    I use tomcat6 as a servlet container, and need to integrate Hibernate 3.2 into the project. I found a document how to configure SessionFactory lookup through JNDI, though it does not work as expected. Quote: Hibernate works in any environment that uses JTA, in fact, we recommend to use JTA whenever possible as it is the standard Java transaction interface. End of quote. In hibernate config I indicate current_session_context_class = jta and now I get an error "No TransactionManagerLookup specified". The problem is that Tomcat does not support JTA, and to get it worked, if I understand it correctly, you need to add JOTM or other library to Tomcat. But according to quote it is recommended to use JTA. What can you recommend in this situation?

    Read the article

  • set variables in an MVC application?

    - by Melissa
    I am trying to learn about the Orchard MVC application. I see the following code but cannot understand what it is doing. Can someone explain what this: User.As<UserPart>().Record.UserName = value; means? public class UserEditViewModel { [Required] public string UserName { get { return User.As<UserPart>().Record.UserName; } set { User.As<UserPart>().Record.UserName = value; } } [Required] public string Email { get { return User.As<UserPart>().Record.Email; } set { User.As<UserPart>().Record.Email = value; } } public IContent User { get; set; } }

    Read the article

  • Accessing variables of an object of a particular class through a different class within the construc

    - by Haxed
    class Student { private String name; public Student(String name){ this.name = name; } public String getName(){ return name; } } class StudentServer { public StudentServer(){ Student[] s = new Student[30]; s[0] = new Student("Nick"); System.out.println(s[0]); // LINE 01:But this compiles, although prints junk System.out.println(s[0].getName()); // LINE 02:I get a error called cannot find symbol } public static void main(){ new StudentServer(); } } Hey, there are two lines, I want the reader to focus on, the first line prints junk as usual, but suprizingly the second one gives me an error. Do you know why ? Many Thanks

    Read the article

  • How to configure grails and shiro to mark cookies secure?

    - by j4y
    I'm using Grails 2.2.4 with the Shiro plugin (v1.1.4) and would like to mark the cookies as secure so the session information won't be sent over http. This is the attribute I want to set: securityManager.sessionManager.sessionIdCookie.secure = true The shiro source says to use the Grails bean property override mechanism, which is grails-app/conf/spring/resources.groovy How can I override just the one setting? // If the legacy 'security.shiro.filter.config' option is set, // use our custom INI-based filter... if (application.config.security.shiro.filter.config) { log.warn "security.shiro.filter.config option is deprecated. Use Grails' bean property override mechanism instead." 'filter-class'('org.apache.shiro.grails.LegacyShiroFilter') 'init-param' { 'param-name'('securityManagerBeanName') 'param-value'('shiroSecurityManager') }

    Read the article

  • Using colon syntax and variables in Sass

    - by corroded
    I am still using the old colon syntax (I prefer it more than the bracket syntax) and this particular code: a.button-link +box($main-color) +border-radius(5px) :background :color $main-color :color #fff :padding 5px generates a warning like so: DEPRECATION WARNING: On line 12, character 3 of '/Users/eumir/rails_apps/dxconnect/app/ stylesheets/partials/utilities/_link-styles.sass' Setting properties with = has been deprecated and will be removed in version 3.2. Use "background: $main-color" instead. I tried that but my background color still doesn't show up. Any help on this please? Thanks!

    Read the article

  • force all session log-out

    - by cometta
    i'm using spring+tapestry for authenticate webuser. I wonder is there any technique i can force all users that currently login in to logout let say i'm on scenario where the site is 'under maintenance mode'

    Read the article

  • Drupal Theming and custom variables in custom pages

    - by GaxZE
    hello, I have created a custom page which sits at site.com/user/me/soe now im trying to theme this page and have created a subsequent template file. however if i copy in any basic html into my template file, all it does is produce a white page with my text and abandons the sites structure i originally had. i was hoping somebody could help me understand preprocessing as i feel that is the way to solve this.

    Read the article

  • xcode - defining integer variables

    - by Mike
    If I have #define myVariable 10 and later I use this as in [self doSomething:myVariable]; Supposing doSomethign method is like - (void) doSomething:(int)myNumber; I receive a warning telling me that a "]" is expected before the ";" why is that and how to solve this? thanks for any help.

    Read the article

  • Convert Google Analytics cookies to Local/Session Storage

    - by David Murdoch
    Google Analytics sets 4 cookies that will be sent with all requests to that domain (and ofset its subdomains). From what I can tell no server actually uses them directly; they're only sent with __utm.gif as a query param. Now, obviously Google Analytics reads, writes and acts on their values and they will need to be available to the GA tracking script. So, what I am wondering is if it is possible to: rewrite the __utm* cookies to local storage after ga.js has written them delete them after ga.js has run rewrite the cookies FROM local storage back to cookie form right before ga.js reads them start over Or, monkey patch ga.js to use local storage before it begins the cookie read/write part. Obviously if we are going so far out of the way to remove the __utm* cookies we'll want to also use the Async variant of Analytics. I'm guessing the down vote was because I didn't ask a question. DOH! My questions are: Can it be done as described above? If so, why hasn't it been done? I have a default HTML/CSS/JS boilerplate template that passes YSlow, PageSpeed, and Chrome's Audit with near perfect scores. I'm really looking for a way to squeeze those remaining cookie bytes from Google Analytics in browsers that support local storage.

    Read the article

  • jquery dialog form with dynamic variables

    - by Patrick
    Hello, Currently I have an html form - which I call with jquery dialog - to insert new records into a table. But I also would like to update existing records with the same form - using jquery dialog. I'm not sure within the dialog how I access these data values - or pass them in as arguments - and hook them up with the form elements...? Anyone has done this before and knows an agile technique to do this? kind regards, Patrick

    Read the article

  • Actually XSLT Lookup (Store variables during loop and use in it another template)

    - by krisvandenbergh
    Is there a way to store a variable/param during a for-each loop in a sort of array, and use it in another template, namely <xsl:template match="Foundation.Core.Classifier.feature">. All the classname values that appear during the for-each should be stored. How would you implement that in XSLT? Here's my current code. <xsl:for-each select="Foundation.Core.Class"> <xsl:for-each select="Foundation.Core.ModelElement.name"> <xsl:param name="classname"> <xsl:value-of select="Foundation.Core.ModelElement.name"/> </xsl:param> </xsl:for-each> <xsl:apply-templates select="Foundation.Core.Classifier.feature" /> </xsl:for-each> Here's the template in which the classname parameters should be used. <xsl:template match="Foundation.Core.Classifier.feature"> <xsl:for-each select="Foundation.Core.Attribute"> <owl:DatatypeProperty rdf:ID="{Foundation.Core.ModelElement.name}"> <rdfs:domain rdf:resource="$classname" /> </owl:DatatypeProperty> </xsl:for-each> </xsl:template> The input file can be found at http://krisvandenbergh.be/uml_pricing.xml

    Read the article

  • PHP Populating array with $variables

    - by Tom
    Hi, I'm trying to create a basic shopping cart, having an issue with the product page allowing users to add more items to their cart then are in stock (I have code in place to prevent this on the view cart page, just not the view product page) This is what I have so far; for ($i = 0; $i < $numItem; $i++) { extract($cartContent[$i]); $subTotal += $price * $cartQuantity; $cartLimiter[$itemNo => $cartQuantity]; Using an array so the position number becomes the item number and the cart quantity becomes the assigned value, however it doesn't seem to like it and throws out on the bottom line of code: Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ']' Thanks

    Read the article

  • Sorting function/variables in an object by name

    - by sissonb
    I was wondering if PHPStorm by Jetbrains has a tool to sort the methods in my JavaScript object by name. If not are there any other tools that can do this for me? Ext.regController("dashboard", { goToShoppingCart:function() { Ext.dispatch({ controller:"shoppingCart", action:"loadCart" }); }, goToDashboard:function() {}, goToContact:function() {} } ); to Ext.regController("dashboard", { goToContact:function() {}, goToDashboard:function() {}, goToShoppingCart:function() { Ext.dispatch({ controller:"shoppingCart", action:"loadCart" }); } } ); This is only for organization. Thanks

    Read the article

  • JQuery - Pass variables to PHP script via AJAX call and then display file

    - by hfidgen
    Hiya, I'm trying to generate Outlook event files for my events, doing so on the fly as and when someone requests it by pressing a link on the page. Here's what i've got so far, but I can't find out how to get the browser to download the content which is returned. I know how I could do this if I sent everything via _GET, but I'd prefer to do it via _POST, hence I'm going down this route.. Any thoughts? Thanks! HTML / Javascript <script> $(function() { $(".button").click(function() { // validate and process form // first hide any error messages var start = $("input#start").val(); var end = $("input#end").val(); var dataString = 'start='+ start + '&end=' + end; $.ajax({ type: "POST", url: "/calendar.php", data: dataString, success: function(data) { //Need to return the file contents somehow! } }); return false; }); }); </script> <form name="calendar" method="post" action=""> <input type="hidden" name="start" id="start" value="<?php echo $start; ?>" /> <input type="hidden" name="end" id="end" value="<?php echo $end; ?>" /> <input type="submit" name="submit" class="button" id="submit_btn" value="Outlook" /> </fieldset> </form> PHP File <?php if (isset($_POST['start'])) { $start = $_POST['start']; $end = $_POST['end']; $c = header("Content-Type: text/Calendar"); $c .= header("Content-Disposition: inline; filename=calendar.ics"); $c .= "BEGIN:VCALENDAR\n"; $c .= "VERSION:2.0\n"; $c .= "PRODID:-//xxxyyyy//NONSGML //EN\n"; $c .= "METHOD:REQUEST\n"; // requied by Outlook $c .= "BEGIN:VEVENT\n"; $c .= "UID:". $start . $end ."-" . "-xxxxyyyy.com\n"; // required by Outlook $c .= "DTSTAMP:".date('Ymd').'T'.date('His')."\n"; // required by Outlook $c .= "DTSTART:20080413T000000\n"; $c .= "SUMMARY:" . "\n"; $c .= "DESCRIPTION:" . "\n"; $c .= "END:VEVENT\n"; $c .= "END:VCALENDAR\n"; echo $c; } else { echo "Sorry you can't access this page directly"; } ?>

    Read the article

  • Doesn't JavaScript support closures with local variables?

    - by qollin
    I am very puzzled about this code: var closures = []; function create() { for (var i = 0; i < 5; i++) { closures[i] = function() { alert("i = " + i); }; } } function run() { for (var i = 0; i < 5; i++) { closures[i](); } } create(); run(); From my understanding it should print 0,1,2,3,4 (isn't this the concept of closures?). Instead it prints 5,5,5,5,5. I tried Rhino and Firefox. Could someone explain this behavior to me? Thx in advance.

    Read the article

  • ASP.NET masterpage public variables error

    - by eugeneK
    I have public variable 'MessagePlaceholder' on MasterPage and a Class that accesses this property like that setting it's value to string from getMessage(); ((HttpContext.Current.Handler as System.Web.UI.Page).Master as MasterPage).MessagePlaceholder = getMessage(); which gives me an error like this one Error 3 'System.Web.UI.MasterPage' does not contain a definition for 'MessagePlaceholder' and no extension method 'MessagePlaceholder' accepting a first argument of type 'System.Web.UI.MasterPage' could be found (are you missing a using directive or an assembly reference?) What should i do ?

    Read the article

  • rand () for c++ with variables...

    - by timothy
    int userHP = 100; int enemyHP = rand() % ((userHP - 50) - (userHP - 75)) + 1; okay, for some reason this doesnt seem to work right, im trying to get 50 -25 hp for enemys. also id rather it be a percentage... like int enemyHP = rand() % ((userHP / 50%) - (userHP / 75%)) + 1; but id like to stick with integers and not mess with floats or doubles... can someone help me?

    Read the article

  • slashes in url variables

    - by namtax
    Hi there I have set up my coldfusion application to have dynamic urls on the page, such as www.musicExplained/index.cfm/artist/:VariableName However my variable names will sometimes contain slashes, such as www.musicExplained/index.cfm/artist/GZA/Genius This is causing a problem, because my application presumes that the slash in the variable name represents a different section of the website, the artists albums. So the URL will fail. I am wondering if there is anyway to prevent this from happening? Do I need to use a function that replaces slashes in the variable names with another character? Thanks

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >