GetPosition for in between two markers

I  hope someone can help me with a bit of code that I can't figure out - I don't even know if it's possible. The following code works fine:
if (sym.getPosition() > 4000) {
    sym.getSymbol("symbol1").playReverse();
sym.stop("symb1");
else {
sym.stop("symb1");
What I know need to add to the code is tell it to execute those actions only when the position is between 4000 and 5000, not when it is just above 4000. Symbol1 should play if the position is between 4000 and 5000 and symbol2 when the position is above 5000. Basically, a click on this element should decide: if below 4000 do this, between 4000 and 5000 do this and above 5000 do this. A normal if - else probally doesn't suffice as my problem has three instances and not two. I have no idea how to code this though.
To clarify what I want to do with this: the current code checks if a box is open (the symbol1 box is in the timeline after 4000) and either closes the box or not (because it's already closed). Now I need two boxes in the same setup. The code should check if a box is open (only one box can be open at the same time) and then closes whichever of the two boxes is open.

I am answering my own post - I found my solution. The following works fine:
if ((sym.getPosition()> 4000)&&(sym.getPosition() < 5000)) {
    sym.getSymbol("symbol1").playReverse();
sym.stop("symb1");
if ((sym.getPosition()> 5000)&&(sym.getPosition() < 6000)){
    sym.getSymbol("Symbol2").playReverse();
sym.stop("symb2");
else {
sym.stop("symb1");
I had forgotten to add && - with just one & it didn't work.

Similar Messages

  • Regular expression help please. (extractin​g a string subset between two markers)

    I haven't used regular expressions before, and I'm having trouble finding a regular expression to extract a string subset between two markers.
    The string;
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    ERRORS 6
    Info I want line 1
    Info I want line 2
    Info I want line 3
    Info I want line 4
    Info I want line 5
    Info I want line 6
    END_ERRORS
    From the string above (this is read from a text file) I'm trying to extract the string subset between ERRORS 6 and END_ERRORS. The number of errors (6 in this case) can be any number 1 through 32, and the number of lines I want to extract will correspond with this number. I can supply this number from a calling VI if necessary.
    My current solution, which works but is not very elegant;
    (1) uses Match Regular Expression to the return the string after matching ERRORS 6
    (2) uses Match Regular Expression returning all characters before match END_ERRORS of the string returned by (1)
    Is there a way this can be accomplished using 1 Match Regular Expression? If so could anyone suggest how, together with an explanation of how the regular expression given works.
    Many thanks
    Alan
    Solved!
    Go to Solution.

    I used a character class to catch any word or whitespace characters.  Putting this inside parentheses makes a submatch that you can get by expanding the Match Regular Expression node.  The \d finds digits and the two *s repeat the previous term.  So, \d* will find the '6', as well as '123456'.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Create time slicing for transformation between two InfoSources

    Hi All,
    i would like to create a time slicing for transformation between two InfoSources in bw.
    Could you please explain the scenario and steps?
    Thanks.
    Gilo

    Hi Brendon,
    The non- cumulative key figures are not mapped in the transformation. Only the 'Inflow' and 'Outflow' key figures for the non- cumulative key figure are mapped.
    You can check the property for the non- *** KF in RSD1, where you would find the corresponding inflow and outflow kf. If both of these are mapped in the transformation, the non- *** kf would calculate the value in the report in which it is included as:
    Non-*** KF value = Inflow value - Outflow value.
    Hope this helps.
    Regards,
    Abhishek.

  • Use of  "findByMultipleParameters" for   "OR " between two Query Filters

    Hi,
    I am also working in CE7.1 .I have  a query regarding the use of  "findByMultipleParameters" .
    That is how to use "OR " between two Query Filter condition,because if we add multiple queries into Query Filter List it will by default taking "AND " .
    For an example, I have to pull data from a table/BO with a condition col A = 10 OR ( col B > 100 AND col c = "XYZ") .
    My code snippet looks like given below.......
    List queryFilters = new ArrayList();
    QueryFilter queryFilterOne = QueryFilterFactory.createFilter("ROLLUMBER",Condition.EQ, rollNumber);
    QueryFilter queryFilterTwo = QueryFilterFactory.createFilter("NAME",Condition.EQ, "123");
    queryFilters.add(queryFilterOne);
    queryFilters.add(queryFilterTwo);
    List students = studentServiceLocal.findByMultipleParameters(queryFilters, false, "xyz");
    I have tried all these and found all of them deprecated,Please suggest something appropriate.Your quick response will help a lot.
    //queryFilterOne.setAction(QueryFilter.OPERATION_OR);
    //QueryFilterFactory.createBoolOperator(queryFilterOne.OPERATION_OR);
    //queryFilters.add(QueryFilter.OR);
    //queryFilters.add(queryFilterOne.setOperation(QueryFilter.OPERATION_OR));
    My another Query is what is the role of implCheck(Boolean),findByName(String) in "findByMultipleParameters()" ?
    Thanking you for your help in advance.
    Regards,
    Sonali
    Edited by: Sonali Das on Sep 14, 2010 2:32 PM

    Hi Praveen/Harris,
    As Mr Bhanu said , we can get the result by using formula variable defined on attribute with replacement path as processing type.
    There is document in https://websmp101.sap-ag.de/bi
    in infoindex->How to Calculate with attributes
    To findout the difference between formula variable and current date, define one more formula variable with processing as custoemr exit.And fill this variable with sy-datum or something else.
    with rgds,
    Anil Kumar Sharma .P

  • SSRS expression for difference between two currency values

    Hi All;
    I need to get the difference between two currency values
    Below is my report
    I need to get differene between Actual Income and Profile Income and this value should be in "£" In this example it should be £0.00
    Any help much appreciated
    Thanks
    Pradnya07

    =sum(Fields!ProfileIncome.Value - Fields!ActualIncome.Value)
    This could have either field first, but depends on which field is expected to be larger. You would then format the textbox to show in pounds.
    HTH

  • Recommendations for switching between two machines and one monitor

    Hi,
    I have a MacMini and a MacBook Air, both with Thunderbolt Display ports but I have one monitor. I'd like to switch between the two without having to unplug and plug the monitor back in every time. Any recommendations for some sort of switch or Thunderbolt hub would be greatly appreciated.
    Best,
    Chris

    This should work if the display use display port/mini displayport inputs. A mini display port connectors plugs into the Mac's Thunderbolt port for video
    http://www.kanexlive.com/snapx

  • Wait for while between two functions execution

    Hi, Pro,
    I am now using jdk1.2 to develop GUI using Swing. I need help from you to figure out how do you make program waiting for while(like sleep) between function A and function B, and still not block the screen allow user to do other thing on the screen.
    like:
    private void Function(){
    functionA();
    //wait for 30 seconds here but
    functionB();
    Thank you very much!!
    ywang

    I did put it on, but I got message as:
    java.lang.InterruptedException: operation interrupted
    at java.lang.Thread.sleep(Native Method)Then you're probably trying to sleep the dispatcher thread. Sleep should never be called in event handler processing. A GUI event which triggers a process taking a substantial ammount of time, like this one, should always spawn a new thread to do it and, itself, return promptly.

  • Howto deploy a temporary exchange 2013 server for migration between two Office 365 accounts?

    Objective:
    We plan to migrate our office 365 from our current tennant (E3) to a new tennant (M) to drastically cut our annual costs for the same services, while retaining the mail and group memberships of all our users. This will involve installing an exchange server
    to download and upload mail from the old tennant to the new tennant.
    Background: 
    We are a longtime O365 customer, and have been a customer since before the "Midsize business" plans existed. There is no "cookie cutter" migration path from E3 to M. Microsoft currently recommends deploying an MS exchange server and off-boarding
    the mailboxes from your E3 subscription and then On-boarding them to a new account under the M plan.  As ridiculous as this is, this is indeed the path our company has decided to go. It isn't cool/fair that we're being shackled to the E plans (that are
    vastly more expensive) when we're a small/midsize business that has been a longtime customer of O365, while new customers of equal size to us can expect to save over $4000 annually. The services (when compared) offered are nearly identical.
    After calling MS support several times for guidance for this issue, I am advised that we should contact a 'partner' and ask for their support in doing this migration. We did as requested and were provided a quote to the tune of approximately $15,000 to do this
    migration for us. Obviously this is unacceptable, and thus our business has decided to rely on my abilities to get it done. Again, involving an MS partner is not an option.
    Environment:
    1 MS AD domain:
    - Original FQDN was @contoso.ca of this domain and UPNs were [email protected]
    - UPN has been changed to [email protected] to allow for ADFS
    - ADFS has been deployed and SSO works for all users with UPN [email protected]
    - An "On-Prem exchange server" does not yet exist
    1 O365 Account where main tennant FQDN is @corp.com
    - There are 5 registered domains
    -contoso.ca
    -corp.com
    - contoso.legacy.ca
    -deprecated/will be deleted
    -deprecated/will be deleted
    - There are 40 E3 licenses, all using a @corp.com UPN
    - There are 5 E1 licenses (we acknowledge that these will be upgraded to an M following the migration) that use the UPN contoso.legacy.ca
    - No accounts currently use contoso.ca for email
    - O365 was upgraded to 'the latest version' sometime in summer 2013.
    Migration Plan (High Level):
    Setup a local windows server (trial license)  
      Deploy an exchange 2013 server (trial license) on the aforementioned windows server  http://technet.microsoft.com/en-us/evalcenter/hh973395.aspx
      Prepare and deploy Dirsync Deployment
    of Dirsync
      Add exchange to office 365 and begin replicating the mailboxes from the cloud to the exchange server. Wait for synchronization to complete.
    More information: http://technet.microsoft.com/en-us/library/hh534377(v=exchg.150).aspx
    http://help.outlook.com/en-us/140/ff633682.aspx
      Evaluate total time it took to sync data. 
    Time it takes to download data to exchange should be relatively similar to time it takes to restore mail to the new service.
      Open a new office365 account under the M plan.
      Plan a 1 hour mail & contoso.ca domain login outage
      temporarily change all user UPN's to match the new tennant
      perform a dirsync to the new tennant
      disable dirsync after all accounts have been auto-created/provisioned
      re-establish UPN + mail access.
      Plan a date and time for the cut over.
      remove the exchange hybrid server from the old tennant. 
      Point MX records directly to the exchange server.
      Cut office 365 service.
      After the 30 minutes ~ 1 hour 'mandatory' wait time imposed by MS to 'register' the domain with O365, add @corp.com to
    the new tennant
      fix all user UPN's in the cloud to match their real UPN's.
    This can be done with powershell.
      attach exchange hybrid server to new tennant
      Point MX records to the new tennant 
      Migrate all data from the local exchange server to the cloud under the new plan.
    Current progress (Lab):
    I have created a sandbox (Lab with no internet access or connectivity to production) environment in VMware and cloned the following servers to it:
    1x Domain Controller (DC) running windows server 2012 (named DC02)
    1x DC running windows server 2008 R2 (named DC01)
    1x windows server 2012 R2 - prepped with all the pre-requisites to install exchange 2013. (named EXC01)
    Where I am stuck / Problem:
    I have installed exchange on the server EXC01 in the lab environment using my account. I am a domain administrator in the contoso.ca domain, but my UPN is [email protected]
    After the installation of exchange, I notice that my email address in Active Directory changed from @corp.com to @contoso.ca. By default, I do not see @corp.com to be an available email address to select as my email address, and changing it in AD does not resolve
    the problem. 
    In the exchange portal, I found "Mail flow ---> Accepted Domains", and believe I should add @corp.com to the accepted domain list. Questions:
    1) Must I add corp.com and the other domains that exist in office 365 to the local exchange before I go through with the hybrid wizard?
    2) If I must add them to exchange, I am provided with three choices: 
    - Authoritative Domain
    - Internal Relay Domain
    - External Relay Domain
    Given that the domain is currently in office365 and is authoritative there, which of these applies?
    3) Most documentation I have found has been about a one way migration from on-prem to the cloud. I have had a hard time finding a step by step guide for cloud to local (new server) and then back to cloud. Does anyone here have any good documentation for this
    process? Would love it if it took into consideration multiple UPN/email addresses.

    Hi,
    Here are my answers you can refer to:
    1. Yes, we should select the primary SMTP domain for our organization and any other accepted domains that will be used in the hybrid deployment:
    http://technet.microsoft.com/en-us/library/jj200787(v=exchg.150).aspx
    2. It depends on the usage of the specific accepted domain. And Exchange version has no influence.
    To determine it, you can firstly check the function of the three types in the following article:
    http://technet.microsoft.com/en-us/library/bb124423(v=exchg.150).aspx
    3. Here are some reference about the migration from on-premise Exchange server to Office 365:
    http://www.msexchange.org/articles-tutorials/office-365/exchange-online/configuring-exchange-2013-hybrid-deployment-migrating-office-365-exchange-online-part1.html
    Additionally, since the issue is related to Exchange online, I recommend you ask for help on our Exchange online forum to get more professional help:
    http://social.technet.microsoft.com/Forums/msonline/en-US/home?forum=onlineservicesexchange
    If you have any question, please feel free to let me know.
    thanks,
    Angela Shi
    TechNet Community Support

  • Adding markers and color between the markers to a knob

    Fairly new Labview user.  I'm having trouble figuring out how to control via program the markers and colors on a knob.  Basically, I need a zero marker, and green between two markers where range of motion is permitted and red outside these markers where range is not permitted.  (This program is for a machine that measures a patient's wrist flextion). The positions of all markers (except the zero) needs to be programatically changeable for different patients, so I need to do it via property nodes.  The Labview help and menu system isn't helping me much.  Maybe you can.  Thanks.
    -joel

    Take a look at this thread for other ideas
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • HT4623 By updating my iphone 4 by IOS 6 the map is not working when i ask for route between places it gives direction not found between places

    I have updated my IOS to IOS 6 of my iphone 4.
    When i ask for route between two famous places, it gives reply that direction not found between places.
    I dont understand
    Whats this

    I had the same experience with a new iPhone 5 that I bought  last week. Did not have a chance to measure battery life before the 6.0.2 upgrade installed but I set up my phone exactly like my 4S and immediately started running out of power after short periods. Went to Xmas get together with fully charged 5 and 4S. Heading home the iPhone 5 shut down for low battery and the 4S had 65% power. Both phones had two half phone calls on then and no data usage.
    That night I fully charged the iPhone 5 and, without lighting it up, put it on my night table. Next morning I picked it up and looked at battery indicator and I had 42% charge with NO activity!
    Tried it again next night and wound up with 37% charge. (Slept longer).
    Today I called the carrier and reactivated the 4S.  Took the 5 to Apple Store and they kindly gave me choice of new replacement phone or refund. I took the refund. Uniquely, the Apple Store said it was Verizon CDMA phones that were coming back.
    The are other strings on this with temporary solutions, but from my experience with 7 firmware changes on an HTC 4G phone the problem will continue because the solution will be hardware caused. We are in the days where RTM means Rush to Market - not Release To Manufacturing.
    I fear the only solution is to either wait for the next model (I did not notice a really major change in performance over the 4S in LTE heavy Seattle area) - or switch to another manufacturer.
    It might be useful for these forums to indicate if you have a GSM or CDMA phone to see which have more problems.
    Discouraged....

  • Swap between two different item categories in sales orders for sub-contracting

    Dear gurus,
    my requirement is to have the ability to swap between two different item categories for sales orders for sub-contracting.
    This should be controlled by a combination of the material and a value maintained the Usage field in the Customer Material Info Record (for example by entering a ‘V’).  A combination of Sales Doc Type, Item Cat Group and Usage should result in the creation of a purchase requisition.
    In the event that a process order is required instead of a purchase requisition (i.e. the product is to be manufactured in-house instead of sub-contracted) the user must have the ability to change the Item Category within the sales order to produce a process order.
    The user would just change the item category within the sales order, and the system would automatically remove the purchase requisition assigned to the SO, and create a process order and assign it to the SO.
    Can you suggest any possible solution?
    Thank you in advance.

    Hi Majlo,
    In my system, I checked.  First created sales order with third party line item and then changed item category to normal item category.
    Till Purchase order not created, I can change Item category of my sales order line item.
    In this case SAP inform by log and once save delete purchase requisition of that line item .
    For this you need to assign another item category as an manual item category in SPRO Item category assignment.
    After this user can manually change item category to other one manually, if PO do not exist.
    Please let me know if your query is different.
    Regards

  • HT1379 The USB ports on my 30" Cinema are not working.  The monitor has not been used for a year or so, and the computer is a Mac Book Pro, 1012 model running OS Mavericks.  I need to move the computer between two locations, and the other monitor is a 27"

    The USB ports on my 30" Cinema HD display appear to not work.  The monitor has not been used for almost a year, when I upgraded to a new Mac Book Pro and the 27" retina display.  Now I need to move the computer back and forth between two locations using the two displays.  The need for operating USB ports is essential.  Any ideas.  The display appears entirely normal.  Am running OS X 10.9.

    Disregard, problem solved.

  • HT5646 should I set up a different account for each child?  if so, how do I manage itunes money between two kids?

    should I set up a different apple account for each child?  if so, how do I manage itunes money between two kids?

    Hello staatsfamily,
    Having a separate Apple ID for each child will allow each child to keep their purchases and iCloud information separate.  It will also allow you to provide an iTunes Store Allowance for each child:
    With iTunes Allowance, you can send a monthly iTunes Store credit to anyone with an iTunes Store account. It's a great way for parents to manage their children's spending on the iTunes Store, App Store, and iBooks Store.
    Once you have created an Apple ID for each child, you can provide an iTunes Store allowance to each Apple ID. The following article will guide you in how to set this up:
    iTunes Store Allowance
    http://support.apple.com/kb/ht2105
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Need to know how to calculate and allocate the server side bandwidth between two exchange sites for DAG replication

    Hi All,
    Please have a look in to the below mentioned environment.
    primary site :SITE 1
    server 1 
    server 2 
    secondary site :SITE 2
    server 3
    Note : All the above three servers are in single DAG .All the database are mounted on the server (server 1) which is located in the primary site (I.E SITE 1).
    On that 5 databases we are having 3500 users .Based on the user designation we have allocated the mailbox size.
    Query : Each and every day we are having the large no copy queue length for all the five databases to the server located in SITE 2.
    Please help me out on this and also tell me is there any tool available to exactly get the required bandwidth for the exchange servers located between the active directory sites.
    Thanks & Regards S.Nithyanandham

    I don't know of any tool that can calculate things for you but latency is the biggest thing you have to worry about. The other issues is looking at the network gear between the 2 sites. I have seen many times were switches get maxed out if they are set to
    1 GB or even ports getting maxed out and need to bonded for more throughput. Test your latency from the edge of each site then test it within to see if there is a difference. 
    Regardless of their geographic location relative to other DAG members, each member of the DAG must have round trip network latency no greater than 500 milliseconds between each other member.
    As the round trip latency between two Mailbox servers hosting copies of a database increases, the potential for replication not being up to date also increases. Regardless of the latency of the solution, customers should validate that the networks between
    all DAG members is capable of satisfying the data protection and availability goals of the deployment. Configurations with higher latency values may require special tuning of DAG, replication, and network parameters, such as increasing the number of databases
    or decreasing the number of mailboxes per database, to achieve the desired goals.
    Round trip latency requirements may not be the most stringent network bandwidth and latency requirement for a multi-datacenter configuration. You must evaluate the total network load, which
    includes client access, Active Directory, transport, continuous replication, and other application traffic, to determine the necessary network requirements for your environment.
    http://technet.microsoft.com/en-us/library/dd638104(v=exchg.150).aspx
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com

  • Function Module for getting Number ranges between two number

    Hi guys,
    Is there any Function module which provide us the number range between two numbers?
    For Ex:If i give 1 and 10 to FM it must give me 1
    2
    3
    4.....upto 10.
    is there any FM for doing this,but i'm not able to find exact Fm for same.
    I can write small piece of code for getting number ranges, but if i get FM it could save little work.

    Hi
    But why do u need a fm, can't you do it by yourself?
    DATA: FROM_NUMBER TYPE I VALUE 1,
          TO_NUMBER   TYPE I VALUE 15.
    DATA: NUMBER            TYPE I.
    DATA: BEGIN OF T_NUMBER OCCURS 0,
                  NR TYPE I,
              END    OF T_NUMBER.
    NUMBER = FROM_NUMBER.
    DO.
      IF NUMBER <= TO_NUMBER.
        T_NUMBER-NR = NUMBER.
        APPEND T_NUMBER.
      ELSE.
        EXIT.
      ENDIF.
      NUMBER = NUMBER + 1.
    ENDDO.
    LOOP AT T_NUMBER.
      WRITE: / T_NUMBER-NR.
    ENDLOOP.
    Max

Maybe you are looking for

  • Caller ID not working since i upgraded to IOS6

    Has anyone had trouble with Caller Id on the IOS6 upgrade on and iPhone 4s??

  • Foreign language (chinese?) error message when trying to connect airtunes

    http://img822.imageshack.us/img822/705/screenshot20101006at144.png Trying to connect with itunes, I get this message in an Eastern language font. What the ....? And of course, I can't connect. Message was edited by: modernape

  • DLU - Zen3.2sp3 and Windows 2003 Server TS

    Hey guys, Im using Windows 2003 Server with TS installed for Citrix 4.0 running Netware 5.1 Sp7 with Zen3.2 sp3. Are there any issues with DLU working on this setup. At this stage its not working. Using the Novell Client 4.90 Sp2. Policy works fine o

  • Creating instances using a string identifier

    Is there a way to create an instance of a class given it's class name as a string( for example). I know I could do it simply by using conditional logic, but I'd like this to be extensible and don't want to have to keep adding conditions as the system

  • Problem with Graphic Card when Update 10.5.5

    Hi, I update from Combo update to 10.5.5 and when Mac restart the desktop looks "like pixelate" all around the screen (only desktop wallpaper no icons) when i opened finder or other application this "pixels" erased like use "tool eraser in photoshop"