Setting bits question

I have a bunch of bytes of data I want to build in a byte array.
I looked at BitSet but I dont' think does what I want.
I'd like to be able to specify a start byte/bit, end byte/bit, along with the data I want to add.
Ex.
I'd like to be able to set the first 4 bits of the first byte or
specify stariting at byte 2, for the next 24 bits write this integer.
I know I could do a bunch of fanagling with and/ors,etc. but I was wondering if there is another way.
Thanks

A few weeks ago, I was playing around with something similar after reading this ACM article (http://queue.acm.org/detail.cfm?id=1563874).
To illustrate his point, the author created a bit-based record format used to hold U.S. Census data. Each record held information on one person. So, the first bit was the sex, the next 7 bits was the person's age, the next 32 bits was the person's income, etc. For fun, I created a Java program which could read and write these records. It was tricky doing this, but I got it to work.
One thing to remember that bothered me was that Java doesn't support the concept of "unsigned" like C does. So, when you read all your bytes into a byte array, you must deal with the fact that if the "left-most" bit of the byte is 1, the byte integer value will be negative. And you'll have to know a lot about bit shifting and AND. I looked into BitSet as well, but it didn't help me either.

Similar Messages

  • Code that handles a set of questions from database and place it on JSP

    Hi,
    How to write a code that handles a set of Quiz questions from database and place it on JSP page..
    Thanks in advance
    Haritha

    975033 wrote:
    Hi,
    I hav got the answer from you r previous link, but not completly. I need help regarding on how to do code that handles a set of questions from database and place it on JSP.
    Any help is highly appreciated.Yes but what kind of help do you expect to get? What kind of help do you think is possible through something as cold and distant as a forum, where you clearly require personal guidance and tutoring?
    If you are going to answer "example code", I should warn you that the answers are not going to be to your liking.

  • How to create yes or no radiogroup dynamically for a set of questions

    hi,
    I am new to APEX.Depending upon my project requirement I need to create a set of questions with yes or no as radiogroup buttons,appended with a textarea for each question.For ex:
    1.Name o Y o N [ "text area"]
    The above line specifies the model I need.
    Here text area is used for writing comments.
    Now the question is how can I create them dynamically using apex_item.
    Its very urgent.Kindly reply me soon.
    Thanks in advance.

    Thanks for ur quick reply.
    But what actually I need is,I need to create the radiobuttons also dynamically.
    I have created them by the following syntax,
    select ename,apex_item.radiogroup(eno,'y' ) yes,apex_item.radiogroup(eno,'N')
    from emp;
    but the problem with this is ,
    when I inserted yes for the first one it is taking and if i am giving the second one also as YES then it is not accepting ..means it is checking the second item by clearing the first one.
    What I need is when I check the second one the first one should not get cleared.
    Thanks in advance.

  • How to redirect user from login page to "Set Challenge question" page

    How to redirect user from login page to "Set Challenge question" page (NOT custom page) after 3 un successful password attempts?
    Meaning when user types wrong password 3 times they will be redirected to set Challenge question page. If user answers the challenge question then password reset page should be appeared other wise (after remaining 3 un successeful challenge question answers) account should be locked out.
    thanks for your help.

    hi sandeep
    Thanks for your answer. Let me ellaborate more on the requirement here.
    - Password Policy and Lost Password management are set up in the identity system
    - Configure login tries allowed= 5. Verify accout is lock out after 5 unsucessful login.
    This is what need to achieve.
    1) If a user attempts to login 3(not 5) times using an incorrect login credential he/she should be redirected to set challenge question (security question) page.
    2) Then if the user attempts (remaining) 2 times incorrect challenge answer then his/her account should be locked out.
    3) If he/she answers the challenge answer correctly then he/she should be redirected to password reset page.
    Is this possible?

  • Sets of Question Papers and answers for SAP ECC 6.0- FICO Module

    Hi,
    If anybody has some material on sets of question papers and answers of SAP ECC 6.0  FI- CO Material please mail the same on [email protected]
    Useful replies will be awared points.
    Regards
    Milind Nair

    Hi,
    Please refer the below link and reward if helpful.
    http://help.sap.com/saphelp_nw04s/helpdata/en/e5/de86f335cd11d3acb00000e83539c3/content.htm

  • Different user options with different sets of questions

    Is there a way I can have two different options and when the user clicks on option A a whole set of questions/form fields appear. Or if they select option B a whole different set of questions/form fields appear?
    How would I go about programming something like that?
    Hopefully I was clear enough. Thanks so much! :)

    Hi Arnold,
    SAP Logon Tickets issued by the Portal contain two user ids, basically one for Java Systems and one for ABAP systems. See also note 843061 for details.
    You do not need passwords for the reference system, if the user mapping is maintained by the user administrator, and the UM property ume.usermapping
    .admin.pwdprotection is set to false, see http://help.sap.com/saphelp_nw04/helpdata/en/fe/d22a41b108f523e10000000a155106/frameset.htm. If you set the mapped user id programmatically, or if you retrieve it from an LDAP server, you also do not need to verify the ABAP password of the user (see https://media.sdn.sap.com/javadocs/NW04/SP12/ume/index.html and http://help.sap.com/saphelp_nw04/helpdata/en/0b/d82c4142aef623e10000000a155106/frameset.htm).
    Best regards,
    Joerg

  • Forcing Users to set Security Questions

    Hi All,
    Currently when a user joins the organization, the user can go to IdM user interface, login and set security questions. But this is an option only if user wants to use self service in IdM. So, it has been found that users are not setting it and it becaomes a pain when they call help desk for password change and help desk is not able to verify the user's identity because security questions are not set.
    Please share your thoughts how other organizations are handling this situation.
    Is there any way that we can force a user to set security questions when the user logs in first time?
    Regards,
    Gaurav

    Hello,
    In our Organization we did the following.
    Under the Security tab there is a Policy tab.
    There you should find a policy called: Default Identity Manager Account Policy.
    Under Secondary Authentication Policy Options make sure "Enforce Answer Policy at Login" is checked.
    In page help states:
    Select this option to enforce the authentication question policy when the user logs in to this interface.
    This solution works however it did become problematic while we had pass-thru authentication configured.
    All the best
    -IDMxml

  • Presenter 8 -- need help with proper settings to allow quiz retake (with a NEW set of questions from a random pool)

    We are publishing a Presenter 8 quiz to an LMS in a SCORM format.  I am having trouble with the following:  the quiz is built with multiple question groups, and a limited number of questions are being selected from each group.  E.g. we have 80+ questions in total, and 25 are presented to a user on a given attempt.
    When a user fails the quiz and exits the quiz normally, we want them to study and try again.  I set the quiz settings to allow infinite attempts, and set the LMS settings to make sure the quiz is not presented in "review mode".  When I test this quiz by failing it the first time, when I reenter the quiz, I am taken to the last slide in the quiz (which is the last one I viewed), and I can retake the quiz by navigating back to the first question.
    Here's the problem:  I am presented with the SAME set of questions, rather than a NEW set of random questions.  This will facilitate cheating (all a user has to do is take the quiz once, review the answers, and then take it again to pass it).
    How do I insure that the user is presented with a NEW set of questions when I retake the quiz?
    I am open to upgrading to Adobe Presenter 10, but would rather not have to do so.  There must be some setting I'm missing.
    Scott Richardson

    If you move a mailbox from one server to another, Outlook will automatically repair the Outlook profile.  Have you tried this, instead of trying to force a profile update using a PRF?

  • How to install Twitter app without setting security questions?

    Hello! I recently registered a Twitter account. iOS 6 includes Twitter integration - great. When I navigate to Settings - Twitter and tap the Install button, a dialog shows up: "Improve your Apple ID security" and "Set security questions" blah blah. There are two buttons in the dialog, "Set questions" and "Cancel". If I tap Cancel, Twitter app download doesn't begin and Twitter icon disappears from my SpringBoard. If I tap "Set questions", I need to answer some stupid questions. If I leave answer boxes empty, I can't continue. I will not set any security questions for my Apple ID, that's for sure.
    How I can install Twitter app?

    I just encountered the same problem when I tried to download Twitter on my husband's new iPhone 5.  There was no problem when I installed Twitter on my iPhone 3GS yesterday :-( 
    You've probably seen by now that there are many, many people who are having problems with the 'Help improve Apple ID security' message - not confined to iPhone but also on iTunes, iPod Touch, iPad etc.
    I chose the 'Not Now' button on his iPhone 5 and the Twitter app wouldn't allow me to proceed ....
    Looks like Apple aren't in any hurry to fix this because people have been complaining about it for months (after all,  your post is more than 3 months old and the problem is still occurring).
    Were you ever able to activate Twitter on your iPhone 4S?
    Tricia

  • Hi .. I can not re- set the questions of confidentiality in order to forget the answers in my account

    Hi .. I can not re- set the questions of confidentiality in order to forget the answers in my account

    If you aren't getting the reset link on the Password & Security section of your account on http://appleid.apple.com then you don't have a rescue email address (an alternate email address is different), and you won't be able to add one until you can answer your questions - you will have to contact Support in your country to get the questions reset.
    Contacting Apple about account security : Contact Apple for help with Apple ID account security
    If your country isn't on that page then try this form and explain and see what they reply with : https://ssl.apple.com/emea/support/itunes/contact.html
    When they've been reset you can add a rescue email address for potential future use : Manage your Apple ID primary, rescue, alternate, and notification email addresses

  • HT5312 I forgot my security questions and  I don't have a rescue mail, how I can set new questions? Or retrieve the old?

    I forgot my security questions and  I don't have a rescue mail, how I can set new questions? Or retrieve the old?

    Apple ID Security -
    Telephone Apple Care for your country and ask for the Account Security Team, then request help resetting the questions.

  • How to set bit rate of audio and video

    I want to set the bit rate of audio and video (48,96.128 kbps) at the time of live streaming . i m not using the flash media live encoder because i have to make it as web applicaton. can any one tell me how to set bit rate.

    When you're using Flash Player to capture and encode video, your only control is Camera.setQuality():
    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/media/Camera.html#setQuality()
    Jody

  • HT201303 I am trying to set security question.but I don't know how to?.i try everything.email or other but not succcess.

    I forget the security question.i am trying to set new question so this time I am write my notebook.

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page should let you reset them : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • HT201363 I never set security questions on my iTunes account!!!

    Hello,
          I have never set up questions for my ITunes account. Soo I can not use my iTunes cards for enny thing!! My and my brother share and he got the cards for his birth day and we want to use it for a game.
                Please help
                      From:Bailey Lerma

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (103321)

  • I need help resetting my security questions, i try to and it says email sent but i never get the email to my main email or alternate email, i never set my questions but somehow there set

    I need help resetting my security questions, i try to and it says email sent but i never get the email to my main email or alternate email, i never set my questions but somehow there set, so i can also not buy apps without entering my question awnsers please help

    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    or
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57
    or           
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions

Maybe you are looking for

  • Remote Desktop To Windows Server Very Slow

    I have OS X 10.6 running on a MBP and a problem that seems to be growing worse over time. I am using Remote Desktop (both CoRD and Microsoft Remote Desktop) to gain access to remote servers. One is a Windows Server 2008, the others are Windows Server

  • Rear Audio Jack not Working on New Mac Pro

    Hello All, Here's the deal. I just pursuaded my company to buy a brand new Mac Pro to run FCP Studio 2 as a test run to see if they perform well enough to eventually replace our remaining PC's. We've had the Mac Pro for less then two weeks and I'm ru

  • How to process a long movie in iMovie?

    I have a 28 min movie in Imovie, that I have had no problem processing once, but can't seem to do it again.  I am turning it into an mp4 file when I process, because it doesn't want to go through straight to YouTube either.  I have already edited the

  • Is the map updated with IOS 6.0.1

    i mad mistake when i install IOS 6 because i had a map problem,anyone has installed the new version IOS 6.0.1 can informe me if it has any update for the map or no.

  • After 11 years with Verizon, they are trying to get away with ripping me off... Edge program...

    Signed up for Edge in May, somehow VERIZON "accidentally" cancelled my Edge program for 5 months, and then sent me a letter saying they were fixing the problem. I never noticed that it had been cancelled, and have never in 11 years had a problem with