Search Results

Search found 45031 results on 1802 pages for 'same name'.

Page 47/1802 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • XSLT 1.0 recursion

    - by DashaLuna
    I'm stuck with recursion, was wondering if anyone can help me out with it. I have <Receipts> and <Deposits> elements, that are not verbose, i.e. that a <Receipts> element doesn't have an attribute to show what <Deposit> it is towards. I need to figure out <Deposits> "still amount due" and when a last receipt towards it was paid if any. I'm trying to do it with the following code: The idea was to take 1st deposit and see if there are receipts. If the deposit isn't fully paid and there are more receipts - call that recorsive function with all the same params except now count in following receipt. If there aren't any more receipts or deposit is payed - process it correctly (add required attributes). Otherwise proceed with 2nd deposit. And so on. However, the XSLT crashes with error message that "a processor stack has overflowed - possible cause is infinite template recursion" I would really appreciate any help/teps... I'm not that great with recursion and can't understand why mine here doesn't work. Thanks! :) <!-- Accumulate all the deposits with @DueAmount attribute --> <xsl:variable name="depositsClassified"> <xsl:call-template name="classifyDeposits"> <!-- a node-list of all Deposits elements ordered by DueDate Acs --> <xsl:with-param name="depositsAll" select="$deposits"/> <xsl:with-param name="depositPrevAmount" select="'0'"/> <!-- a node-list of all Receipts elements ordered by ReceivedDate Acs --> <xsl:with-param name="receiptsAll" select="$receiptsAsc"/> <xsl:with-param name="receiptCount" select="'1'"/> </xsl:call-template> </xsl:variable> <xsl:template name="classifyDeposits"> <xsl:param name="depositsAll"/> <xsl:param name="depositPrevAmount" select="'0'"/> <xsl:param name="receiptsAll"/> <xsl:param name="receiptCount"/> <xsl:if test="$deposits"> <!-- Do required operations for the 1st deposit --> <xsl:variable name="depositFirst" select="$depositsAll[1]"/> <xsl:variable name="receiptSum"> <xsl:choose> <xsl:when test="$receiptsAll"> <xsl:value-of select="sum($receiptsAll[position() &lt;= $receiptCount]/@ActionAmount)"/> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="diff" select="$depositPrevAmount + $depositFirst/@DepositTotalAmount - $receiptSum"/> <xsl:choose> <xsl:when test="$diff &gt; 0 and $receiptCount &lt; $receiptsQuantityOf"> <xsl:call-template name="classifyDeposits"> <xsl:with-param name="depositsAll" select="$depositsAll"/> <xsl:with-param name="depositPrevAmount" select="$depositPrevAmount"/> <xsl:with-param name="receiptsAll" select="$receiptsAll"/> <xsl:with-param name="receiptCount" select="$receiptCount + 1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <!-- Record changes to the deposit (@DueAmount and receipt ReceivedDate) --> <xsl:apply-templates select="$depositFirst" mode="defineDeposit"> <xsl:with-param name="diff" select="$diff"/> <xsl:with-param name="latestReceiptForDeposit" select="$receiptsAll[position() = $receiptCount]"/> </xsl:apply-templates> <!-- Recursive call to the next deposit --> <xsl:call-template name="classifyDeposits"> <xsl:with-param name="depositsAll" select="$depositsAll[position() &gt; 1]"/> <xsl:with-param name="depositPrevAmount" select="$depositPrevAmount + $depositFirst/@DepositTotalAmount"/> <xsl:with-param name="receiptsAll" select="$receiptsAll"/> <xsl:with-param name="receiptCount" select="'1'"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <!-- Determine deposit's status, due amount and payment received date if any --> <xsl:template match="Deposits" mode="defineDeposit"> <xsl:param name="diff"/> <xsl:param name="latestReceiptForDeposit"/> <xsl:choose> <xsl:when test="$diff &lt;= 0"> <xsl:apply-templates select="." mode="addAttrs"> <xsl:with-param name="status" select="'paid'"/> <xsl:with-param name="dueAmount" select="'0'"/> <xsl:with-param name="receipt" select="$latestReceiptForDeposit"/> </xsl:apply-templates> </xsl:when> <xsl:when test="$diff = ./@DepositTotalAmount"> <xsl:apply-templates select="." mode="addAttrs"> <xsl:with-param name="status" select="'due'"/> <xsl:with-param name="dueAmount" select="$diff"/> </xsl:apply-templates> </xsl:when> <xsl:when test="$diff &lt; ./@DepositTotalAmount"> <xsl:apply-templates select="." mode="addAttrs"> <xsl:with-param name="status" select="'outstanding'"/> <xsl:with-param name="dueAmount" select="$diff"/> <xsl:with-param name="receipt" select="$latestReceiptForDeposit"/> </xsl:apply-templates> </xsl:when> <xsl:otherwise/> </xsl:choose> </xsl:template> <xsl:template match="Deposits" mode="addAttrs"> <xsl:param name="status"/> <xsl:param name="dueAmount"/> <xsl:param name="receipt" select="''"/> <!-- Constract a new MultiDeposits element with required info --> <xsl:copy> <xsl:copy-of select="./@*"/> <xsl:attribute name="Status"><xsl:value-of select="$status"/></xsl:attribute> <xsl:attribute name="DueAmount"><xsl:value-of select="$dueAmount"/></xsl:attribute> <xsl:if test="$receipt"> <xsl:attribute name="latestReceiptDate"> <xsl:value-of select="$receipt/@ActionDate"/> </xsl:attribute> </xsl:if> <xsl:copy-of select="./*"/> </xsl:copy> </xsl:template>

    Read the article

  • How to remove "Server name" items from history of SQL Server Management Studio

    - by arsenalogy
    When trying to connect to a server in Management Studio (specifically 2008), there is a field where you enter the Server name. That field also has a drop-down list where it shows a history of servers that you have attempted to connect to. I would like to know: How to remove an individual item from that history. How to remove an item from the Login field history for each Server name. Thanks!

    Read the article

  • php object : get value of attribute by computed name

    - by groovehunter
    hi simple question - How do I access an attribute of an object by name, if i compute the name at runtime? Ie. i loop over keys and want to get each value of the attributes "field_".$key In python there is getattribute(myobject, attrname) It works, of course, with eval("$val=$myobject-".$myattr.";"); but IMO this is ugly!! TIA florian

    Read the article

  • What is "Call By Name"?

    - by forellana
    Hi to everyone! I'm working in a homework, and the professor asked me to implement the evaluation strategy called "call by name" in scheme in a certain language that we developed and he gave us an example at http://www.scala-lang.org/node/138 in the scala language, but i don't understand in what consists the call by name evaluation strategy? what differences it has with call by need? thanks, greetings

    Read the article

  • VS2010 - RiaServices - A project with that name is already opened in the solution

    - by andrecarlucci
    Hello, The problem started after installing RiaServices Toolkit Dec 2010. If I unload the project and reload it again, I get this message, even on an empty Silverlight project (no changes made to the project file). "error : A project with that name is already opened in the solution." The solution has only 2 projects: the host (web) and the silverlight one. Any help is appreciated :) UPDATE: It only happens if I give the Silverlight project the same name as the solution.

    Read the article

  • C# - Name the Design Pattern

    - by nettguy
    Using Fluent Interface design here if i call something like dog.Train("Running").Train("Eating").Do("Running").Do("Eating"); what is the name of this pattern ? is it chain-of-responsibility or there any specific design pattern name associated with it?

    Read the article

  • Drupal - get program name

    - by ernie
    I would like to get program name in Drupal (actually name in URL that calls program or function). example: http://localhost/drupal6/my_widget This works: $myURL = (basename($_SERVER['REQUEST_URI'])); // $myURL=my_widget but not when I have additional parameters: http://localhost/drupal6/my_widget/parm1/parm2

    Read the article

  • Django: name of many to many items in the admin interface

    - by Adam
    I have a many to many field, which I'm displaying in the django admin panel. When I add multiple items, they all come up as "ASGGroup object" in the display selector. Instead, I want them to come up as whatever the ASGGroup.name field is set to. How do I do this? My models looks like: class Thing(Model): read_groups = ManyToManyField('ASGGroup', related_name="thing_read", blank=True) class ASGGroup(Model): name = CharField(max_length=63, null=True) But what I'm seeing the m2m widget display is:

    Read the article

  • Getting the name of a Clojure struct type?

    - by j-g-faustus
    When defining a struct type and instance, I can print the value and get the "struct" implementation type: (defstruct person :name :age) (def p (struct person "peter" 30)) user=> p {:name "peter", :age 30} user=> (type p) clojure.lang.PersistentStructMap But is it possible to tell whether p is an instance of the struct type "person"?

    Read the article

  • Change imported Dll name ?

    - by Rajakumar
    hi to all , In a Portable-Executable ,we can change the imported dll name ,by editing PE file , here , i had changed in one imported dll name of application exe,that time it changed normally ....e.g advapi32.dll to ^dvapi32.dll ,so here system32 or any other PATH location doesnt have ^dvapi32.dll ..this time simply i changed the real advapi32.dll into ^dvapi32.dll and put in the application directory ,this time its work fine ....but when i am trying with ntdll & gdi32.dll ,it doesnt supported ,i cant resolve the problem ,pls help me towards the problem ..thanks.

    Read the article

  • Find package name for Android apps to use Intent to launch Market app

    - by eom
    I'm creating a mobile website that will include a page from which people can download relevant apps that we recommend. I've found good instructions for creating the links to launch the Market but this assumes that you are the developer of the app in question and know the exact package name. Is there any way to get the package name, other than just contacting the developers and asking? For the iPhone, I found easy instructions for getting the URL I need from the iTunes store, so I'm looking for info like that.

    Read the article

  • [sql server 2005]how to list all table name in T-SQL

    - by shrimpy
    SELECT name FROM sys.databases -- this can list all database name in the server user database SELECT * FROM INFORMATION_SCHEMA.TABLES -- these two line can list the table for one particular database but how to do something in order can have the result like the following Database Table --------- ------------- db1 t1 db1 t2 db2 t1 ... ... -thx

    Read the article

  • Change Name of Outputted DLL

    - by Changeling
    If my project name is ABC and the DLL currently outputs as ABC.DLL, how can I make my DLL be outputted as say CBA.DLL and so that when the .LIB is compiled linked against, it is not looking for ABC.DLL, but CBA.DLL. I tried changing the name under Linker General Output File but when I linked to the .lib in my other application, it was still looking for ABC.DLL and CBA.DLL.

    Read the article

  • Web service for Location name using Latitude & Longtitude

    - by Joy
    I have an iPhone application where i need to find out the current location(in terms of city name or probably the address). But i'm not been able to do that. I can find out the current latitude and longitude. Is there any web service(preferably free of cost) which can return me the current location name if i supply the latitude and longitude? Waiting For any reply. Thanks in advance.. Joy

    Read the article

  • Seam IllegalStateException: Two components with the same name and precedence

    - by Anand
    Hi, When I run my seam application I get the following error Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.IllegalStateException: Two components with the same name and precedence - component name: wizardController, component classes: package.WizardController, package.WizardController at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:543) at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:809) at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:756) at org.jboss.seam.init.Initialization.init(Initialization.java:629) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35) I am not able to resolve this problem.

    Read the article

  • Richfaces fileupload - perform name check on 'add'

    - by Fortega
    Hi, I would like to perform a check on the name of a file being uploaded via richfaces fileupload component. I would like to check this as soon as the user selects the file. A file with a wrong name, should not appear in the list, and an alert() should be called specifying the filename was not correct. Is there a way to check the add event, and to interrupt it when the filename is not correct?

    Read the article

  • Changing the name of a folder in php

    - by SpikETidE
    Hi everyone... All are aware of the rename function in php .... But is there a way to just change the name of a folder using php...? Or copying the whole folder to a new place with the intended name is the only way..? Thanks for your answers...

    Read the article

  • hiberate named query variable schema name

    - by Sandeep Jindal
    Hi, Other than default schema, for some SQL queries I need to access a particular schema. The issue is that the name of that particular schema is different for different environments. After goggling I found that using this link I am able to specify the schema name in variable. If that’s true that I have following questions: Will that would for SQL queries in the named query? How to set the value for the variable names? Thanks in advance.

    Read the article

  • where to use route-name of routing in aspnet mvc

    - by FosterZ
    hi,i'm new to routing in aspnet mvc.. i have following code: Action Controller public ActionResult SchoolIndex() { return View(SchoolRepository.GetAllSchools()); } here is the routing routes.MapRoute( "School", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "School", action = "SchoolIndex", id = "" } ); // Parameter defaults when i enter "localhost/school" in addressbar, it is giving 404 error instead it should route to my "schoolIndex" action i have given route-name as "School" where it is used ?

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >