Search Results

Search found 3646 results on 146 pages for 'escape sequence'.

Page 4/146 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Mapping Repeating Sequence Groups in BizTalk

    - by Paul Petrov
    Repeating sequence groups can often be seen in real life XML documents. It happens when certain sequence of elements repeats in the instance document. Here’s fairly abstract example of schema definition that contains sequence group: <xs:schemaxmlns:b="http://schemas.microsoft.com/BizTalk/2003"            xmlns:xs="http://www.w3.org/2001/XMLSchema"            xmlns="NS-Schema1"            targetNamespace="NS-Schema1" >  <xs:elementname="RepeatingSequenceGroups">     <xs:complexType>       <xs:sequencemaxOccurs="1"minOccurs="0">         <xs:sequencemaxOccurs="unbounded">           <xs:elementname="A"type="xs:string" />           <xs:elementname="B"type="xs:string" />           <xs:elementname="C"type="xs:string"minOccurs="0" />         </xs:sequence>       </xs:sequence>     </xs:complexType>  </xs:element> </xs:schema> And here’s corresponding XML instance document: <ns0:RepeatingSequenceGroupsxmlns:ns0="NS-Schema1">  <A>A1</A>  <B>B1</B>  <C>C1</C>  <A>A2</A>  <B>B2</B>  <A>A3</A>  <B>B3</B>  <C>C3</C> </ns0:RepeatingSequenceGroups> As you can see elements A, B, and C are children of anonymous xs:sequence element which in turn can be repeated N times. Let’s say we need do simple mapping to the schema with similar structure but with different element names: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Beta>B1</Beta>  <Gamma>C1</Gamma>  <Alpha>A2</Alpha>  <Beta>B2</Beta>  <Gamma>C2</Gamma> </ns0:Destination> The basic map for such typical task would look pretty straightforward: If we test this map without any modification it will produce following result: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Alpha>A2</Alpha>  <Alpha>A3</Alpha>  <Beta>B1</Beta>  <Beta>B2</Beta>  <Beta>B3</Beta>  <Gamma>C1</Gamma>  <Gamma>C3</Gamma> </ns0:Destination> The original order of the elements inside sequence is lost and that’s not what we want. Default behavior of the BizTalk 2009 and 2010 Map Editor is to generate compatible map with older versions that did not have ability to preserve sequence order. To enable this feature simply open map file (*.btm) in text/xml editor and find attribute PreserveSequenceOrder of the root <mapsource> element. Set its value to Yes and re-test the map: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Beta>B1</Beta>  <Gamma>C1</Gamma>  <Alpha>A2</Alpha>  <Beta>B2</Beta>  <Alpha>A3</Alpha>  <Beta>B3</Beta>  <Gamma>C3</Gamma> </ns0:Destination> The result is as expected – all corresponding elements are in the same order as in the source document. Under the hood it is achieved by using one common xsl:for-each statement that pulls all elements in original order (rather than using individual for-each statement per element name in default mode) and xsl:if statements to test current element in the loop:  <xsl:templatematch="/s0:RepeatingSequenceGroups">     <ns0:Destination>       <xsl:for-eachselect="A|B|C">         <xsl:iftest="local-name()='A'">           <Alpha>             <xsl:value-ofselect="./text()" />           </Alpha>         </xsl:if>         <xsl:iftest="local-name()='B'">           <Beta>             <xsl:value-ofselect="./text()" />           </Beta>         </xsl:if>         <xsl:iftest="local-name()='C'">           <Gamma>             <xsl:value-ofselect="./text()" />           </Gamma>         </xsl:if>       </xsl:for-each>     </ns0:Destination>  </xsl:template> BizTalk Map editor became smarter so learn and use this lesser known feature of XSLT 2.0 in your maps and XSL stylesheets.

    Read the article

  • XSLT Escape Character not working

    - by liveek
    I am trying to use escape charaters in my text output, as i would like too surround the output in emailData tags. I am using <xsl:text>&#60;emailData&#62;</xsl:text> In the XSLT to esnure that this works however because i am using a tool called Cast Iron for some reason it is not converting the &#60; into < and just spits out &lt;emailData> You can see am image of it HERE that illustrates the output i am getting. My source code is this. How else could i wrap this in emailData tags? <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="header"> <xsl:text>&#60;emailData&#62;</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>From: </xsl:text> <xsl:value-of select="from/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>To: </xsl:text> <xsl:value-of select="to/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Subject: </xsl:text> <xsl:value-of select="subject/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Type: </xsl:text> <xsl:value-of select="contentType/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text> boundary="</xsl:text> <xsl:value-of select="boundary/text()"/> <xsl:text>"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>MIME-Version: </xsl:text> <xsl:value-of select="mimeVersion/text()"/> </xsl:template> <xsl:template match="email"> <xsl:text>&#10;&#10;</xsl:text> <xsl:text>--</xsl:text> <xsl:value-of select="../header/boundary/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Type: </xsl:text> <xsl:value-of select="contentTypeBody/text()"/> <xsl:text> charset="us-ascii"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Transfer-Encoding: </xsl:text> <xsl:value-of select="contentTransfer/text()"/> <xsl:text>&#10;&#10;</xsl:text> <xsl:value-of select="body/text()"/> </xsl:template> <xsl:template match="Attachment"> <xsl:for-each select="Attachments"> <xsl:text>&#0010;&#0010;</xsl:text> <xsl:value-of select="../../header/boundary/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Type: </xsl:text> <xsl:value-of select="attachmentContentType/text()"/> <xsl:text> name="</xsl:text> <xsl:value-of select="attachmentDescription/text()"/> <xsl:text>"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Description: </xsl:text> <xsl:value-of select="attachmentDescription/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Disposition: attachment; filename="</xsl:text> <xsl:value-of select="atachementDisposition/text()"/> <xsl:text>"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Transfer-Encoding: </xsl:text> <xsl:value-of select="attachmentContentTransfer/text()"/> <xsl:text>&#10;&#10;</xsl:text> <xsl:value-of select="attachementBody/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>&#60;/emailData&#62;</xsl:text> </xsl:for-each> </xsl:template> <xsl:template match="text()"/> </xsl:stylesheet>

    Read the article

  • In bash, how do I escape an exclamation mark?

    - by Matthew
    I want to do something like bzr commit -m "It works!". I can sort of escape the exclamation mark by doing bzr commit -m "It works\!". However, then my commit message includes the backslash. How do I escape the exclamation mark, while still ignoring the backslash?

    Read the article

  • Sequence reduction in R

    - by drknexus
    Assume you have a vector like so: v <- c(1,1,1,2,2,2,2,1,1,3,3,3,3) How can it be best reduced to a data.frame like this? v.df <- data.frame(value=c(1,2,1,3),repetitions=c(3,4,2,4)) In a procedural language I might just iterate through a loop and build the data.frame as I go, but with a large dataset in R such an approach is inefficient. Any advice?

    Read the article

  • MySQL id sequence

    - by Michal Fronczyk
    Is this a correct way for id generation in MySQL ? INSERT INTO Picture (PictureId,First_pick,Title,Description,File_Name,Is_Vertical)VALUES ((SELECT max(pictureid)+1 FROM Picture),0,?,?,?,?) I mean if it is guaranted that PictureId will be unique when this query is run by many threads ? I can't modify table structure. Should I use any specific locks, index or transaction isolation level ? Regards, Michal

    Read the article

  • Encode/compress sequence of repeating integers

    - by Alex
    Hey there! I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now I need some algorithm to convert this string into something compressed like a9b3a3c3a2d5 Which means "a 9 times, then b 3 times, then a 3 times" and so on, where "a" stands for 0, "b" for 1, "c" for 2 and "d" for 3. How would you do that? So far nothing suitable came to my mind, and I had no luck with google because I didn't really know what to search for. What is this kind of encoding / compression called? PS: I am going to do the encoding with PHP, and the decoding in JavaScript.

    Read the article

  • Most elegant way to morph this sequence

    - by Ed Woodcock
    Hi folks: I've got the Day of the week stored in a database table (that I do not control), and I need to use it in my code. Problem is, I want to use the System.DayOfWeek enum for representation for this, and the sequences are not the same. In the database, it's as follows: 1 2 3 4 5 6 7 S M T W T F S I need it as follows: 0 1 2 3 4 5 6 M T W T F S S What's the most elegant way to do this? for example, I could do: i = dayOfWeek; i = i - 2; if (i < 0) { i = 6; } but that's a bit inelegant. Any suggestions?

    Read the article

  • How to play sequence video continuously on iPhone?

    - by iPhoney
    I'm trying to play two videos continuously using MPMoviePlayer. I let the second video play when the MPMoviePlayerPlaybackDidFinishNotification is posted. The problem is when the first video stops, the view will go back to the previously view for a short while before play the next video. Is there any idea about how to play video continuously or is it possible to get the image of the last frame in the first video?

    Read the article

  • PHP escape $ sign and echo a string my fetching database

    - by pnm123
    Hello, I want to know how to echo a string that have a $ sign from a database. At this time, the value on database 'Buy one for $5.00' converts to 'Buy one for .00'. Ex:- Field: title | Value: Buy one for $5.00 <?php $row = mysql_fetch_array..... $title = $row['title']; echo $title; ?> Thank you, pnm123

    Read the article

  • Sequence diagram example

    - by Pamela
    The use case to model is the register of a new appointment. The user logins in the system as a patient (role). To make an appointment shoudl enter medical specialty and date. System shoudl look for the doctors availables for that specialty on that date. From the results patient should choose one and then system save the appointment. At the end user shoudl receive an email with the information of the appointment. The classes that I have in my model are: User PAtient Doctor Appointment DoctorShcedule and some more but I think these ones will be involve. I have this initial sequnce diagram: I have problem to set the return messages and also with the email step. Thanks

    Read the article

  • How to choose between UUIDs, autoincrement/sequence keys and sequence tables for database primary keys?

    - by Tim
    I'm looking at the pros and cons of these three primary methods of coming up with primary keys for database rows. So assuming I am using a database that supports more than one of these methods, is there a simple heuristic to determine what the best option would be for me? How do considerations such a distributed/multiple masters, performance requirements, ORM use, security and testing have on the choice? Any unexpected drawbacks that one might run into?

    Read the article

  • Randomly generating sequence of ints in a specific range

    - by vvv
    Hi, I am unsure how to put this and my math skills aren't that strong. But here's what I need. I want to generate a list of all the 16bit integers (0-65535). But everytime I do so I want to seed the algorithm randomly that each time the list starts with a different integer and all the subsequent integers will be generated once but also in random order. small example (1-5): ... 1, 5, 3, 2, 4 4, 3, 1, 5, 2 2, 1, 4, 5, 3 ... Any help?

    Read the article

  • Sequence of the Events in Java

    - by ozlegolas
    Hi, I have two events for two seperate components, but there is a problem. JTabbedPane's stateChanged event is fired before JFormattedField's focusLost event. Is there a way of making stateChange event to be fired after focusLost event. Thanks, Tuna

    Read the article

  • Escape not idempotent in zsh's vi emulation?

    - by user1063042
    I have zsh configured to use vi keybindings. I've noticed some unexpected behavior with "escape". In vim (I haven't tested vanilla vi) if I hit escape twice, I can hit 'i' once to return to insert mode. In zsh if I happen to hit escape twice, hitting 'i' won't return me to insert mode, I have to hit it twice. Another example of this comes up in navigation. If I hit escape once, I can use '^' and '$' as expected. But if I've accidentally hit escape twice (or more) they fail to work until I return to insert mode and escape again. Do I somehow have zsh configured incorrectly, or is this just a known difference in zsh's vi emulation?

    Read the article

  • How to write a C program using the fork() system call that generates the Fibonacci sequence in the

    - by Ellen
    The problem I am having is that when say for instance the user enters 7, then the display shows: 0 11 2 3 5 8 13 21 child ends. I cannot seem to figure out how to fix the 11 and why is it displaying that many numbers in the sequence! Can anyone help? The number of the sequence will be provided in the command line. For example, if 5 is provided, the first five numbers in the Fibonacci sequence will be output by the child process. Because the parent and child processes have their own copies of the data, it will be necessary for the child to output the sequence. Have the parent invoke the wait() call to wait for the child process to complete before exiting the program. Perform necessary error checking to ensure that a non-negative number is passed on the command line. #include <stdio.h> #include <sys/types.h> #include <unistd.h> int main() { int a=0, b=1, n=a+b,i,ii; pid_t pid; printf("Enter the number of a Fibonacci Sequence:\n"); scanf("%d", &ii); if (ii < 0) printf("Please enter a non-negative integer!\n"); else { pid = fork(); if (pid == 0) { printf("Child is producing the Fibonacci Sequence...\n"); printf("%d %d",a,b); for (i=0;i<ii;i++) { n=a+b; printf("%d ", n); a=b; b=n; } printf("Child ends\n"); } else { printf("Parent is waiting for child to complete...\n"); wait(NULL); printf("Parent ends\n"); } } return 0; }

    Read the article

  • Get previous element in IObservable without re-evaluating the sequence

    - by dcstraw
    In an IObservable sequence (in Reactive Extensions for .NET), I'd like to get the value of the previous and current elements so that I can compare them. I found an example online similar to below which accomplishes the task: sequence.Zip(sequence.Skip(1), (prev, cur) => new { Previous = prev, Current = cur }) It works fine except that it evaluates the sequence twice, which I would like to avoid. You can see that it is being evaluated twice with this code: var debugSequence = sequence.Do(item => Debug.WriteLine("Retrieved an element from sequence")); debugSequence.Zip(debugSequence.Skip(1), (prev, cur) => new { Previous = prev, Current = cur }).Subscribe(); The output shows twice as many of the debug lines as there are elements in the sequence. I understand why this happens, but so far I haven't found an alternative that doesn't evaluate the sequence twice. How can I combine the previous and current with only one sequence evaluation?

    Read the article

  • Separating merged array of arithmetic and geometric series

    - by user1814037
    Given an array of positive integers in increasing order. Separate them in two series, an arithmetic sequence and geometric sequence. The given array is such that a solution do exist. The union of numbers of the two sequence must be the given array. Both series can have common elements i.e. series need not to be disjoint. The ratio of the geometric series can be fractional. Example: Given series : 2,4,6,8,10,12,25 AP: 2,4,6,8,10,12 GP: 4,10,25 I tried taking few examples but could not reach a general way. Even tried some graph implementation by introducing edges if they follow a particular sequence but could not reach solution.

    Read the article

  • How does one escape the GPL?

    - by tehtros
    DISCLAIMER I don't pretend to know anything about licensing. In fact, everything I say below may be completely false! Backstory: Recently, I've been looking for a decent game engine, and I think I've found one that I really like, Cafu Engine. However, they have a dual licensing plan, where everything you make with the engine is forced under GPL, unless you pay for a commercial license. I'm not saying that it's a bad engine, they even say that they are very relaxed about the licensing fees. However, the fact that it even involves the GPL scares me. So my question is basicly, how does one escape the GPL. Here's an example: The id Tech engine, also known as the Quake engine, or the Doom engine, was the base for the popular Source engine. However, the id Tech engine has been released under the GPL, and the Source engine is proprietary. Did Valve get a different license? Or did they do something to escape the GPL? Is there a way to escape the GPL? Or, if you use GPL'd source code as a base for another project, are you forced to use the GPL, and make your source code available to the world. Could some random person take the id Tech engine, modify it past the point of recognition, then use it as a proprietary engine for commercial products? Or are they required to make it open source. One last thing, I generally have no problem what-so-ever with open source. However I feel that open source has it's place, but that is not in the bushiness world.

    Read the article

  • Ideal programming language learning sequence?

    - by Gulshan
    What do you think? What is the ideal programming language learning sequence which will cover most of the heavily used languages and paradigms today as well as help to grasp common programming basics, ideas and practices? You can even suggest learning sequence for paradigms rather than languages. N.B. : This is port of the question I asked in stackoverflow and was closed for being subjective and argumentative.

    Read the article

  • Ideal programming language learning sequence? [closed]

    - by Gulshan
    What do you think? What is the ideal programming language learning sequence which will cover most of the heavily used languages and paradigms today as well as help to grasp common programming basics, ideas and practices? You can even suggest learning sequence for paradigms rather than languages. N.B. : This is port of the question I asked in stackoverflow and was closed for being subjective and argumentative.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >