Please help explain these bitwise operations!

I am working with a file that has a header with the size of the file encoded into 4 bytes like:
>
The ID3v2 tag size is encoded with four bytes where the most significant bit (bit 7) is set to zero in every byte, making a total of 28 bits. The zeroed bits are ignored, so a 257 bytes long tag is represented as $00 00 02 01.
I have found someone's code that puts this together into the integer value, but i don't understand why they do each step. Is there anyone here who can explain this code to me?
//Read in the bytes (why do they read char[] instead of byte[]?)
char[] tagSize = br.ReadChars(4);    // I use this to read the bytes in from the file
//Store the shifted bytes (why is it int[], not byte[]?)
int[] bytes = new int[4];      // for bit shifting
int size = 0;    // for the final number
* Why are they combining these bytes in this way if they're
* going to again combine them below (in the line setting "size")?
//how do they know they only care about the rightmost bit on the 3rd byte?
//how do they know to shift it 7 to the left?
bytes[3] =  tagSize[3] | ((tagSize[2] & 1) << 7) ;
//Why do they use 63 here (I know it's 111111)?
//how do they know they only want the 3 rightmost of byte 2nd byte?
//And how know to shift it 6 to the left?
bytes[2] = ((tagSize[2] >> 1) & 63) | ((tagSize[1] & 3) << 6) ;
bytes[1] = ((tagSize[1] >> 2) & 31) | ((tagSize[0] & 7) << 5) ;
bytes[0] = ((tagSize[0] >> 3) & 15) ;
//how do they know to shift these bytes the amount that they do to the left?
size  = ((UInt64)bytes[3] | ((UInt64)bytes[2] << 8)  | ((UInt64)bytes[1] << 16) | ((UInt64)bytes[0] << 24)) ;

6tr6tr wrote:
You've GOT to be kidding! I posted only ONCE on THIS forum. Javaranch is owned by a different company and does NOT have all the same members that this web forum has. Posting the same question on completely different websites' forums is NOT cross-posting. Cross-posting is posting the same thing in different boards of ONE website's forums.Absolute rubbish. Here a couple of links for you:
Wikipedia:
[Crossposting is the act of posting the same message to multiple forums, mailing lists, or newsgroups.|http://en.wikipedia.org/wiki/Crossposting]
JavaRanch's FAQ:
[There might be times when you are inclined to post a question not only at JavaRanch, but also at some other site. When you do so, keep in mind that this is not generally in the interests of the posters who might be responding to your posts - those folks may find they've wasted their time. You certainly don't want to annoy those you want to help you, so you might want to make the experience as painless as possible.|http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites]
Sun's FAQ, section C2:
[Post once and in the right area: Multiple postings are discouraged, because they make the category lists longer and create more email traffic for developers who have placed watches on multiple categories. Because of this, duplicate posts are considered a waste of time and an annoyance to many community members, that is, the people who might help you.|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ]

Similar Messages

  • Please HELP join these 2 iTunes folders in Windows 7 preserving album artwork & tags (discussion reply requested)

    (Discussion Reply Requested ) Please HELP join these 2 iTunes folders in
    Windows 7 preserving album artwork & "tags"
    I have searched and not found an up to date understandable answer as how
    to join 2 working portable same (apple ID) user iTunes folders into one itunes folder
    while above all else preserving hand edited Abum Artwork and hand edited tags.
    ( It was many hours of hand edited added Album Artwork and editing of tags )
    Situation is Windows 7 ( 64 bit ) with current iTunes installed ( 2014-03-17 )
    The hard drive crashed and the old \iTunes folder and all old contents have been copied and backed up.
    The windows 7 64 bit and latest iTunes 64 bit has been re-installed cleanly ( no old music added )
    Music from the iTunes cloud was then added/downloaded into iTunes
    Now \itunes has 40 gig of music available to play.
    Now I want to join the currently installed working \itunes folder ( 40 gig of music )
    with  the old saved \itunes folder  ( 100 gig of music ) into just one \iTunes folder
    with preserving the current Album Artwork and editing of "tags" of both folders.
    I have seen previous answers that use words like " consolidate " , " export / import ",
    " merge " , " apple home sharing " , " use explorer to copy  ..." , ect
    none of which mentioned if the current Album Artwork
    or tags survive unchanged from their current "specially edited" status.
    I know their may be the ineviatable "duplicates", but there seems
    to be several ways to handle them.  ( If you know the best way to
    prevent or remove duplicates in this situation with joining two
    iTunes folders in Windows please include that information also ).
    Please provide an explanation of how to join these 2 iTunes folders
    in Windows 7 into one \iTunes folder while preserving Album Artwork and tags.

    Mike, thanks for the response. I will try this. I'll have to dig around here too, bc I want to know more about how I can import a windows xml file (while replacing the drive paths) and it creating a seperate itunes library with the pointers on the mac. Essentially, I have 2 libraries and there may not be a way around this with a windows machine and a mac - ive read plenty on Choose library on open, and mac to mac, windows to windows.
    I also need to know more about what is getting stored in the album art folders. I believe it seems that when you select all, and copy the image in the artwork get info page its actually embedding these images in the files themselves, but if you paste into the left bottom artwork display pane its just adding where?? If I deleted the contents of this folder what would happen, should I not be copying this content?
    If I update the images on the mac and swap out the drive paths and move the external drive back to the windows box, will i lose any updates I did while on the mac?
    Good suggestion though, I'll try this out.

  • HT1222 I have 10 gb more than what the update requires available and it still prompts that I don't have enough storage please help as I'm operating of of iOS 5 and I'm ready to smash my iPad

    I just purchased more storage and still prompts that I don't have enough storage please help as I'm operating of of iOS 5 and I'm ready to smash my iPad

    Have you tried doing the Update using iTunes on your Computer.?
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch
    Make sure you have the Latest Version of iTunes (v11) Installed on your computer
    iTunes free download from www.itunes.com/download

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • Slow running data for heart rate variability VI Please help my thesis is due in 3days!! :(

    Hi there i'm having a great issue with a VI i have created to detect heart rate variabilty from ECG and PPG signals and seeing which one is most accurate with regards to HRV.
    I initially recorded 25 minutes worth of data and saved this into a text file. which has 2 columns the 1st being PPG data the 2nd ECG. There are at least 1000000 rows of data 
    I am now running this data into a VI which should give me results such a RMSDD PNN50, poincare plots and histograms etc  the trouble i'm having is the VI is initially starts of fast then becomes incredibly slow i left it running for over 10hours and it hardly read any data 
    and me not being such a big labview expert knows how to fix this. I would be most grateful if somone could help me find my error as my thesis is due in 3 days and i'm stuck on this last part. I have attached my VI below . please please help me!
    Attachments:
    CV Report1.vi ‏41 KB

    First question: does the code produce the correct result, just slowly?
    So you have a million data points and process them one point at a time in a FOR loop, updating several xy graphs and charts and building arrays. Most indicators will get overwritten with each iteration.
    You are heavily filtering the data (twice!) and take the derivative (twice=second derivative). You are doing a pt-by-pt peak finding on 50 points with every new point added, meaning that you mostly analyze the same data (differing by only one point with each iteration. Seems inefficient. Wouldn't you detect most peaks 50x?
    Since your data is filtered, maybe it would be sufficient to decimate the data before the loop processing. How correlated are adjacent points?
    Have you analyzed which part of the code is slowest? What is the current execution time ("slow" is subjective) and what speed would you like to have instead?
    Things like the histogram only needs to be done exactly once at the end. It seems pointless to do it over and over, a million times in a row even if the data did not change. Same problem for all the graphs.
    You seems to take the difference between adjacent points in the generated array. Again you are repeating the same calculation over and over. Wouldn't it be much more effiicent to keep the array of pairwise differences in the shift register and use a scalar shift register to retain the immediately previous point. Subtract the new point from the previous and add it to the array instead.
    LabVIEW Champion . Do more with less code and in less time .

  • I forgot my passcode. Please help explain the steps to restore

    Forgot the password after changing it :/ So what should i do? It locked me out for a good 5 days. now i can stop it getting locked by attempting to sync into itunes and that way i tried 40 different combinations with similar patterns to what i THOUGHT i'd set it to. i don't want to loose my contacts or texts. most of my music is in my library so thats not an issue. i've seen a few videos on youtube where you hold down the power button and the home button. would this work? i backed it up last week (before i set the new password). when i just went to restore it, it offered me a choice to back it up again as well. if i were to back it up now would that make it imposible for me to restore since the new back up has the lost password on it? or should i just restore it to the one from last week??? Please help?? Phoning doesnt seem to work. i want to restore it to the backup i made last week but the way its asking me if i want to back up before i restore is what's confusing me.... if i click "dont back up" it says it will restore to factory defaults and everything will be lost but if i back up does'nt that mean it'll just restore to the way it is now...as in it'll restore itself to the part where i dont know the password... if any of that made any sense :S

    If you are unable to restore your iPhone with iTunes without having to enter the passcode, you will not be able to update your iPhone's backup. You will need to place the iPhone into recovery mode in order to restore the iPhone with iTunes and you can restore from the most recent backup available.
    http://support.apple.com/kb/ht1808

  • Please help with these 3d photo panels

    http://theflashblog.com/?p=834
    I download the files, open the fla, test the movie, and get the errors seen here:
    http://aaronpenton.net/screen.html
    Can anyone tell me what I'm doing wrong??
    Thank you.

    Please help me!! Nobody can help you unless you have shown the willingness to learn and are seeking help only where you are stuck.
    My assignment is due in 2 days That doesn't matter to people over here.
    hese are practice questions and not part of the actual assignment so dont hesitate to provide the answer!!Doesnt matter again. what you have posted here is a problem text without any effort on your part to understand it or implement it. That is an assignment to us and we did our Java assignments for our course work long time ago.
    Bottom line - learn Java. If your course is not helping you with that, find a different course.

  • Please help explain strange behaviour of progressive relaxation..

    Hello
    I am building theo Oracle text querry and I stumbled on a behaviour which I cannot explain...
    here is the topo:
    I have created a synonym thusly:
    ctx_thes.create_relation('GR_THESAURUS','LEBOURGNEUF','SYN','BOURGNEUF');
    when I issue this select:
    SELECT      SCORE(1) NIVEAU_RECHERCHE, NOM,NO_MATRC,NO_NOM_REGST
    FROM DUMMY
    WHERE CONTAINS(nom, 'SYN(LEBOURGNEUF, GR_THESAURUS)', 1) > 0 ;
    I get the expected result set which containsentries with either 'LEBOURGNEUF' or 'BOURGNEUF'. So far so good.
    Now, when I combine search criterias using progressive relaxation, thus:
    SELECT SCORE(1) NIVEAU_RECHERCHE, DUMMY.NO_MATRC,DUMMY.NO_NOM_REGST,DUMMY.NOM
    FROM DUMMY
    WHERE CONTAINS(nom, '<query>
    <textquery lang="FRENCH" grammar="CONTEXT">LEBOURGNEUF golf
    <progression>
    <seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "OR"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    </progression>
    </textquery>
    <score datatype="INTEGER" algorithm="DEFAULT"/>
    </query>', 1) > 0;
    I do NOT get any results matching synonym 'BOURGNEUF'.. only those with 'LEBOURGNEUF' are returned...
    further, if I intentionaly make a syntax error in the line
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    say like this:
    <seq><rewrite>transform((TOKENS, "xSYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    no error is returned and I get the same result set...
    so this leads me to conclude that only the first two lines of the query are parsed/executed...
    does anyone here have any ideas what is going one here?
    in the preceding quire I neeed to add
                                                      <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    and possibly
    <seq><rewrite>transform((TOKENS, "NT(", ",2,GR_THESAURUS)", "OR"))</rewrite></seq>
    can this be done???
    why is there no errors when I execute the query (in sqldeveloper) ???
    any hints will be greatly appreciated!
    Cheers
    Edited by: user8848610 on 2009-10-29 07:46

    now it works... although the simpler and cleaner solution of using transform would have been perfect, this function does a somewhat adequate job... I put it here so maybe it will help others ;)
         FUNCTION BuildSearchPredicate (texte IN NOM_ASSJT.NOM%TYPE) RETURN VARCHAR2 IS
         sSQL VARCHAR2(5000);
         sSeq1 VARCHAR2(1000);
         sSeq2 VARCHAR2(1000);
         sSeq3 VARCHAR2(1000);
         iFirst NUMBER(1);
         iPosition NUMBER;
         iToken NUMBER;
         CURSOR curWords(line_text IN VARCHAR2)      IS      
                   select regexp_substr(line_text, '[^ ]+', 1, level) word
                   from dual
                   connect by regexp_substr(line_text, '[^ ]+', 1, level) is not null;
         BEGIN
         sSQL := sSQL || '<query><textquery lang="FRENCH" grammar="CONTEXT"><progression> ';
         sSeq1 := '';
         iFirst := 1;
         iToken := 0;
         FOR r_curWord IN curWords(texte)
         LOOP
         iToken := iToken + 1;
         IF iFirst = 0 THEN
                   sSeq1 := sSeq1 || ' AND {' || trim(r_curWord.word) || '}';
                   sSeq2 := sSeq2 || ' OR {' || trim(r_curWord.word) || '}';
                   sSeq3 := sSeq3 || ' OR SYN(' || trim(r_curWord.word) || ',GR_THESAURUS)';
              ELSE
                   sSeq1 := '{' || trim(r_curWord.word) || '}';
                   sSeq2 := '{' || trim(r_curWord.word) || '}';
                   sSeq3 := 'SYN(' || trim(r_curWord.word) || ',GR_THESAURUS)';
                   iFirst := 0;
              END IF;
         END LOOP;
         sSQL := sSQL || '<seq>' || sSeq1 || '</seq>';
         iPosition := instr(sSeq1, ' AND ');
         IF instr(sSeq1, ' AND ',iPosition + 1) > 0 THEN -- we must have at least 2 AND operator for this to make sense
              WHILE iPosition > 0
              LOOP
    IF instr(substr(sSeq1, iPosition + 5), ' AND ') > 0 THEN
    sSQL := sSQL || '<seq>' || substr(sSeq1, iPosition + 5) || '</seq>';
    END IF;
                   iPosition := instr(sSeq1, ' AND ', iPosition + 1);
              END LOOP;
         END IF;
         IF iToken > 1 THEN -- no use in having OR if there is only one word
              sSQL := sSQL || '<seq>' || sSeq2 || '</seq>';
         END IF;
         sSQL := sSQL || '<seq>' || sSeq3 || '</seq>';
         RETURN sSql;
         END BuildSearchPredicate;     
    END GR_RECH;
    this will combine search words using AND and OR and SYN like so:
    SELECT GR_RECH.BuildSearchPredicate('LEBOURGNEUF GOLF') FROM DUAL;
    will result in :
    <query><textquery lang="FRENCH" grammar="CONTEXT"><progression> <seq>{LEBOURGNEUF} AND {GOLF}</seq><seq>{LEBOURGNEUF} OR {GOLF}</seq><seq>SYN(LEBOURGNEUF,GR_THESAURUS) OR SYN(GOLF,GR_THESAURUS)</seq>
    thanks for you help!
    cheers
    gth

  • Please help explain SAP Benchmark Terminology

    Hello,
    I am looking for help in understanding the terminology of some benchmarks for SAP applications.  I have read and re-read several pages on their website, including http://www.sap.com/solutions/benchmark/index.epx but still are not 100% clear.  I would greatly appreciate if someone familiar with SAP would answer the following questions:
    Q1. SD Standard Benchmark  - is it correct that this is not a single benchmark, but actually a generic term referring to all the SAP benchmarks including benchmarks for: Power, ERP, Supply Chain, Banking, Utilities, NetWeaver, Enterprise Portal, Customer Relationship Management, Product Lifecycle Management, and Retail?  If not, what is it?
    Q2. SAPS - is it correct that this is a unit of measurement and not a benchmark?  It looks like the results of the Sales and Distribution (SD) Benchmark are reported in SAPS.
    Q2b. I have seen cases where people refer to the "SAPS" benchmark.  If SAPS is a unit of measurement, is it safe to say that SAPS is another way of referring to the Sales and Distribution (SD) benchmark?  If yes, is it the 2-tier or 3-tier version?
    Q3. I have also seen cases where people refer to the "SAP" benchmark.  What are they most likely referring to?
    Q4. Please confirm that the following all refer to the same benchmark: SAP-SD Two-Tier, SAP SD 2-tier, SD2 SAPS, and SAP SD2
    Q5. Similarly, please confirm that the following all refer to the same benchmark: SAP-SD Three-Tier, SAP SD 3-tier, SD3 SAPS, and SAP SD3
    Q6. Finally, out of all of the SAP benchmarks, which one benchmark, if any, is most widely used?
    Thanks so much for your help!!!!

    apparently, I have to repackage ALL my classes via the "export to JAR" link in NWDS.  Using winzip is somehow screwing up the JAR.

  • Dv7t-3000 - Sata or Sata 2 - Please help explain what this has!

    I assumed that Sata 2 being mainstream for so long, this new laptop of mine would have it.
    I want to buy one of the nicer SSD for this unit, but I can NOT confirm anywhere that it will run up to 300 megs.
    If it's Sata 1 then I wouldn't be getting much performance gain from a SSD as this 7200RPM HDD rates up to 100 megs.
    I contacted HP Support and got told that my laptop only has Sata 1.
    I find this impossible to believe.  Why in the world would HP do that?  I read in a post on the forums that this laptop
    falls into the top 5% for overall performance for laptops.  How is that so unless it has sata 2?  Why would they
    have old Sata 1 in such new technology? 
    Can anyone confirm if HP Support is correct?  I have the guy second guessing himself right now and he asked for serial number to try and find documentation to support his claim.  I may have to RMA this beast and start searching for a laptop that has SATA II because that is the main reason I wanted a laptop!  For the SSD to WOW me!
    Thanks in advance for your thoughts, input, and effort you may put into this!
    WWW2000
    UPDATE:
    Otay.  Now I understand why all the reviews out there say what they say about HP support.  Makes you feel like you carried your new puppy into an auto garage to learn about it.  WRONG people, wrong place!
    Can anyone who knows english and knows about computers please tell me why the ...  why HP would be retarded and put Sata 1 in this killer laptop?  Do they really enjoy upsetting their customers?  All I kept getting for that supervisior was "you computer customized and you hard drive you choose sata 1" 
    I bought it directly from HP.com so I could have everything in it that you may not get from a retail store.  She couldn't seem to grasp that nowhere on hp.com does it let you know if you get sata 1 or sata 2.   Option not offered and it SHOULDN'T be.  It should automatically be sata 2!  Sata one was like so 1998!
    Sorry for being so upset.  I just want a killer SSD to make this beast all it should be and HP is telling me it's not going to happen.  Do I need to start an RMA?  Or can someone confirm that I can get read speeds of 230 from that SSD I want?
    Message Edited by www2000 on 12-01-2009 11:07 AM
    This question was solved.
    View Solution.

    Hi,
    Many owners(those who can afford it) of the dv7t series are putting OCZ agility and vertex drives in to replace their SATA hard disk.
    I have no doubt that the speed of the SSD disk will wow you even if it isn't SATA2. Think about restart times of 58 seconds!
    regards,
    erico 
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Please help me to understand operator precedence and associativity

    I am trying to run following code:
    long i = 10;
    long k = ++i + i - i - --i ; // here i is pre incremented and decremente
    System.out.println(k);
    gives output: 4
    and
    long i = 10;
    long k = i++ + i-- - i-- - i-- ; // here i is post incremented and decremente
    System.out.println(k);
    gives output: 2
    Please give me the steps of each evaluation
    I mean how this gives output value:
    any suggesion highly appreciated

    I am trying to run following code:
    long i = 10;
    long k = ++i + i - i - --i ; // here i is pre
    incremented and decremente
    System.out.println(k);
    gives output: 4
    and
    long i = 10;
    long k = i++ + i-- - i-- - i-- ; // here i is post
    incremented and decremente
    System.out.println(k);
    gives output: 2
    Please give me the steps of each evaluationNo one in their right mind would ever write code this way.
    Looks like a certification or homework problem.
    >
    I mean how this gives output value:
    any suggesion highly appreciatedI'd suggest that you read the precedence rules and go through these very carefully.
    %

  • Please help explain: Difference btw Seekbar in a skin and Seekbar standalone component

    Hi,
    I am confused about the follwing, can someobe please
    enlighten me.
    I noticed that the "Seekbar" component inside any of the
    default skins (e.g StellOverAll.fla) is just a place holder, it has
    2 layers with one layer having just an outline of a rectangle. And
    the SeebarProgress and the SeekbarHandle are place somewhere else
    inside the Skin component. However, if I select the "Seekbar"
    component from the component window and place it on the stage and
    double click to look inside, I can see 4 layers, with the
    SeekbarProgress component in one layer and the SeebarHandle on
    another layer.
    So my question is the following:
    1. Is the "Seekbar" component in the skin DIFFERENT than the
    "Seebar" component from the Component Window?
    2. How does the "Seekbar" component in the skin interact with
    the "SeekbarProgress" and "SeekbarHandle" components in the skin,
    when they are OUTSIDE the "Seekbar" component?
    Any answer will be greatly appreciated.

    20. How Throttling is implemented in OSB?
    SOA Work and Guide: OSB 11g - Throttling
    21. How Transactions are configured in OSB? How you would set the transaction time-outs?
    http://atheek.wordpress.com/2011/04/21/transaction-handling-within-osb/
    Regards
    Nasir

  • Please help explain

    Hi,
    I do not understand why my customized logon.par is not loading.  I have modified my SAPMLogonLogic.java file so that my reset password functionality is customized.  I have managed to load the classes and resolved build errors.  I have removed the com folder from the umelogonbase.jar file.  Prior to all these modifications, my logon.par was working without any complications.  With all these modifications, my logon.par is not loading with a class not found exception (IAccessToLogic).  I can understand that the logon.par fails because the portal is attempting to find this class in the umelogonbase.jar, which no longer has the class.  However, I do not understand why it should still refer to umelogonbase.jar for the class since the class has already been built and output to the classes.api folder. 
    If I put a privatesharingrefernce or add com.sap.runtime.logon to the sharingreference, the logon.par loads, but without my customizations. 
    Questions:
    1. why does my logon.par refer to the umelogonbase.jar for a class that is no longer there, but defined within classes.api (or src.core)?
    2. wat should I do with the rest of the properties file in umelogonbase.jar?
    Thank You.

    apparently, I have to repackage ALL my classes via the "export to JAR" link in NWDS.  Using winzip is somehow screwing up the JAR.

  • Please help explain this formulae

    if {SOP10100.SOPTYPE} in [3, 4] then
    {SOP10200.QUANTITY}
    else
    0
    Does "in(3,4) mean that if the value of SOP10100.SOPTYPE is 3 or 4 ?

    Yes the IN function means if the tested value is one of the possible values
    for example
    if 1 in [1,2] then
    "in"
    else
    "not in"
    will result in the word in being displayed because the tested value 1 is one of the possible values 1 OR 2
    The square brackets [ ] surround the list of possible values
    You can also do this
    if "abc" in "abcdefgh" then
    "in string"
    else
    "not in string"
    Look in the help index for IN
    Best regards
    Patrick

  • Blackberry Virgin - Please help with these questions

    Hi there
    I have just received my Blackberry 8900 and have a few questions if anyone can help:
    - Is there any way of having a clock display whilst the phone is on "sleep" mode. I use my phone to keep track of time alot so is there anyway of having the clock permanently displayed when phone is not in use?
    - I cant seem to be able to send a contact by SMS which seems a bit strange. Usually with my old phones I have been able to click on the Contact and access a "Send contact  by text" option.
    - The track ball I find a bit uncomfortable to use especially when having to click it, are there other navigation type pads on other phones rather than track ball?
    - I am  not currently connected to internet and wont be until next week when my new billing system starts. Can I use IM without internet access?
    Thats it for starters! Thanks in advance for your help

    Please help me!! Nobody can help you unless you have shown the willingness to learn and are seeking help only where you are stuck.
    My assignment is due in 2 days That doesn't matter to people over here.
    hese are practice questions and not part of the actual assignment so dont hesitate to provide the answer!!Doesnt matter again. what you have posted here is a problem text without any effort on your part to understand it or implement it. That is an assignment to us and we did our Java assignments for our course work long time ago.
    Bottom line - learn Java. If your course is not helping you with that, find a different course.

Maybe you are looking for

  • Ipod Touch keeps crashing, now wont open at all.

    I got my ipod touch a little under a year ago, and soon after getting it i noticed that the music would randomly stop and go to the homepage. It wasn't that bad because the music would always come back up, and it didn't happen that often. But then it

  • Intel Macs and .exe files

    I have a modem I got from Verizon for use with Verizon DSL. A check at the site of the modem's manufacturer reveals that this modem was made exclusively for Verizon and there are no links to support, etc., for the modem at the manufacturer's website

  • Unable to load Quicktime

    I am getting an Error 1402 Could not open key, while trying to install quicktime. The error is telling me the registry key is HKEYLOCALMACHINE\Software\Microsoft\Windows\Current version\Uninstall\Quicktime. When I do REGEDIT, it will not let me delet

  • Shippment cost-service tax

    Hi SD Guru, I am working on shippment whre i stuck at shippment cost level for service tax assigment. my client want service tax should get calculate at shippment cost level i.e. at VI01 and it should be posted while settlement to service tax payable

  • Materials in a work center

    Is there a way to lookup all the materials that are being produced at a given work center? is there a FM that I could use? Thanks for all our help. Vinay