Need help about byte-to-bit

I wanna convert a byte to 8-bits and store them in a bit array. any API method I could use or how to write it by myself?
8bits-to-byte method is needed as well
Thanks!
Message was edited by:
xixiao

There's java.util.BitSet.

Similar Messages

  • Need help about ref cursor using like table

    Hi Guys...
    I am devloping package function And i need help about cursor
    One of my function return sys_refcursor. And the return cursor need to be
    join another table in database . I don't have to fetch all rows in cursor
    All i need to join ref cursor and another table in sql clause
    like below
    select a.aa , b.cc form ( ref_cursor ) A, table B
    where A.dd = B.dd
    I appeciate it in advance

    My understanding is that you have a function that returns a refcursor and is called by a java app.
    Because this is a commonly used bit of code, you also want to reuse this cursor in other bits of sql and so you want to include it like table in a bit of sql and join that refcursor to other tables.
    It's not as easy as you might hope but you can probably achieve this with pipelined functions.
    Is it a direction that code should be going down? yes, eventually. I like the idea of pulling commonly used bits of code into a SQL statement especially into the WITH section, provided it could be used efficiently by the CBO.
    Is it worth the effort given what you have to do currently to implement it? possibly not.
    what else could you do? construct the sql statement independently of the thing that used it and reuse that sql statement rather than the refcursor it returns?
    Message was edited by:
    dombrooks

  • Need help about the SHA Message Digest ? & what is use of Message Diagest ?

    need help about the SHA Message Digest ? & what is use of Message Diagest ?
    1>i have one program of making message digest
    2>which requires two files name
    3>one for input like txt
    4> second is out put file of message digest
    can any one tell what is the use of second generated file .

    MessageDigest md = MessageDigest.getInstance("SHA");
    FileInputStream fis = new FileInputStream(args[0]);
    byte[] b = new byte[1024];
    int readed = -1;
    while((readed = fis.read(b)) > 0)
         md.update(b, 0, readed);
    fis.close();
    FileOutputStream fos = new FileOutputStream(args[1]);
    byte[] d = md.digest();
    StringBuffer sb = new StringBuffer();
    for(int i = 0; i < d.length; i++) {
         String str = Integer.toHexString(d[i] & 0xff);
         sb.append(str.length() < 2 ? "0" + str : str);
    fos.write(sb.toString().getBytes());
    fos.close();

  • Need help with representing 2 bits of data in a column

    I Need help representing only 2 bits of data in a column in order to save space.
    Is that possible?

    CommitMan wrote:
    I Need help representing only 2 bits of data in a column in order to save space.
    Is that possible?Yes - using Assembler....
    If you need to count bits to save space, then you must be on 70's, or early 80's, hardware. So using Assembler should not be a problem. Let me guess.. a 8051 microcontroller from the 1980?
    Here's what the 8051 code and memory optimisation manual says:
    >
    The simplest and best way to get dramatic improvements
    in efficiency is to look for all variables that will have only
    binary values (0 and not 0), and define them as type 'bit‘:
    bit myVar;With bit variables, the full set of 8051 bit-level assembler
    instructions can be used to generate very fast and
    compact code. For example, the following C code:
    myVar = ~myVar;
    if (!myVar)
    }Generates only two lines of assembler:
    B200    CPL myVar
    200006  JB myvar,?C0002This example uses only 5 flash bytes and 8 CPU cycles.
    When you use bit variables, you can implement a
    nontrivial line of C code with just one assembler
    instruction.
    >
    <i>PS. Yes, the above is really from a manual for a real 80s microcontroller. And yes, I'm poking fun at your question as saving bits were a problem in the 80s and prior. It should not be a problem in the 21st century information system and database.</i>

  • Need help about Hidden Markov Model model

    I want to make classification for EEG signal using Hidden Markov Model
    algorithm based on neural network.
    plz need help about how to implement this algorithm using LABVIEW.
    if not I want another thing to make classification.
    any one know information about this topic, send me a reply
    thanks

    Have you derrived the HMM that you want to implement?
    If so, post the algorithm and we can provide comments on how to implement it using LabVIEW.
    Message Edited by Ray.R on 04-12-2010 12:54 PM

  • Need help about boot SUNFIRE V120

    Hi all....
    I need help about how to change boot from boot net to boot disk....
    after i installed sun solaris 10 at my sunfire v120, then reboot the machine ... this sunfire still boot from net not from disk...
    can i change it?
    please i really need help ....
    thanks

    If its booted, try "eeprom boot-device=disk"
    If your at the OBP, "setenv boot-device disk".
    If that doesnt work check the value of "diag-switch?".
    It could be booting off the the diag-device instead

  • Need Help about 3D and revolving in illustrator

    I really need help about 3D, Please tell me that How i create 3D in illustrator
    i want to revolve text or shape around any object like this, any plugin? or other software required for this?
    if somebody know this it will be really help full
       http://rcgrafix.fizwig.com/1452732-large.jpg    
       http://rcgrafix.fizwig.com/1384370-large.jpg
       http://rcgrafix.fizwig.com/1062180-large.jpg
    Thanks
    Arsi

    if links are not working try Copy and paste it in to your browser address bar
    thank you

  • Need help about 1015

    need help about 1015 it says connect iphone to itunes on screen i did it but it doesnt work and says unexpected 1015

    Try restoring it: Make sure you are following the instructions in this procedure to the letter.  Here they are, with emphasis on some easily overlooked requirements:
    Disconnect the USB cable from the iPhone, but leave the other end of the cable connected to your computer's USB port.
    Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.If you cannot turn off the device using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the device turns off, release only the Sleep/Wake button.
    Continue pressing and holding the Home button while you reconnect the USB cable to the device. The device should turn on.
    Note: If you see the "low battery" screen, let the device charge for at least ten minutes to ensure that the battery has some charge, and then start with step 2 again.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears (iTunes icon and USB connector) release the Home button.
    If necessary, open iTunes. You should see the "recovery mode" alert ("iTunes has detected a phone in recovery mode").
    Use iTunes to restore the device.
    If you do not see the "Connect to iTunes" screen, try these steps again.
    If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
    If you have backed up the iPhone in the past, select the device in iTunes and choose "restore from backup".

  • Hi, Need help about ios7 upgrade, after this upgrade I cannot watch youtube or any video with my Ipad,

    Hi, Need help about ios7 upgrade, after this upgrade I cannot watch youtube or any video with Ipad, and Iphone as well
    I think my wireless rooter's setting has some problem but cannot found anything to solve,
    I can watch if there is another wireless network , I tried this option in another place who has wireless network and I can watch.
    Do you have any idea to do these setting , I dont have any problem when Ipad has 6.1.3 IOS,
    need help
    thanks

    Thanks
    I will and share the result.

  • Need help about refurbished MacBook Pro 15" 2012 vs 2013

    Hello All,
    I'm planning to buy a refurbished MacBook Pro since I'm tight with budget. This would be my first mac machine ever. So I was hoping if someone can shed some opinion on which one should I go for. But first, I will be using the MacBook for basic photoshop, Office documents (Word, Excel, Outlook, Powerpoint), internet, and maybe (just maybe) if I have time from my busy work, I could try to learn in movie editing (just for fun). So anyway, I found 2 refurbished 15" MacBook Pro that fits my budget and seems like they're quite similar (2012 and 2013). The 2013 is only $20 more.
    1) Refurbished 15.4-inch MacBook Pro 2.3GHz Quad-core Intel i7 with Retina Display - $1,469.00
    Originally released June 2012
    15.4-inch (diagonal) Retina display; 2880-by-1800 resolution at 220 pixels per inch
    8GB of 1600MHz DDR3L SDRAM
    256GB Flash Storage
    720p FaceTime HD Camera
    NVIDIA GeForce GT 650M with 1GB of GDDR5 memory
    2) Refurbished 15.4-inch MacBook Pro 2.0GHz Quad-core Intel i7 with Retina Display - $1,489.00
    Originally released October 2013
    15.4-inch (diagonal) Retina display; 2880-by-1800 resolution at 220 pixels per inch
    8GB of 1600MHz DDR3L SDRAM
    256GB Flash Storage1
    720p FaceTime HD camera
    Intel Iris Pro Graphics
    So it looks like the difference between the two is obviously the CPU, the 2012 having an extra GPU, and the 2013 uses the Thunderbolt 2 as far as I know. And I'm not sure if the SSD on the 2012 is SATA as oppose to the 2013 it's PCIe? Base from what I explained above on how will I'll be using the MacBook for, is the 2012 best fit for my needs or is the 2013 a better one?
    Thanks all. Please remember I don't have any experience with Macs at all. So I'm hoping someone can help me a little bit. Thanks again.
    - Eddie

    PS: side-by-side specs, graphics and drive data rates,
    the newer of the two may be the better one to get, as
    it has later Thunderbolt  with higher capacities, too.
    Look into mactracker or other specification chart that
    can be opened beside each other (as I have now) &
    then you can see sections in each model, one at a
    time. MacTracker shows general-software-memory+
    graphics-connections-history by category.
    2013 model Thunderbolt, Hard Drive Interface, graphics
    spec all look good. Not sure if the history of graphic issue
    in the dual-graphic card model 2012, was overcome or not.
    However this may require some research...
    If yours is one that shipped with Mavericks OS X 10.9
    you may do well to get a copy of the installer on a
    USB and dedicate it as a backup or set up a second
    drive or other device to safe a download of the installer
    and/or a copy-clone of the Mavericks. The limited total
    of RAM available may not be a problem, with both units
    shipping with an SSD and not a rotational HDD. And if
    you like (& if yours has OS X 10.9) you could then use
    OS X 10.10 too.  Be careful an 'upgrade' isn't done to
    an older system by accident; surprises aren't so nice.
    With either choice, be sure to get & make suitable backup
    of your files in addition to a device to use Time Machine.
    Good luck & happy computing!

  • Need help about career life

    Hi All,
    Em..i just need some advice about choosing correct career path.I graduated with a first class in IT with business information science in 2009. In 2009 after looking for jobs for few months i took a manager post in a petrol station which i never wanted.(Due to the credit crunch & the Family financial reasons) .Then unfortunately i had to stay out of work for 18months due to a serious spinal code operation i had to face.now in 2011 July im fit & ready to start my life again. but im lost where to start/ which career path to choose. (i've still got the job at the petrol station as the manager)
    ive liked data base management subject when i was in the University so, Ive been reading OCA-051 & interested on OCA qualification I just want to know what are the possible jobs i can apply if i get the certification? Basically what should i do to get any IT related job? :( ( i dont like programming)..
    Please be kind to reply.
    ps:i live in the Uk.
    Thanks.

    872882 wrote:
    Hi All,
    Em..i just need some advice about choosing correct career path.I graduated with a first class in IT with business information science in 2009. In 2009 after looking for jobs for few months i took a manager post in a petrol station which i never wanted.(Due to the credit crunch & the Family financial reasons) .Then unfortunately i had to stay out of work for 18months due to a serious spinal code operation i had to face.now in 2011 July im fit & ready to start my life again. but im lost where to start/ which career path to choose. (i've still got the job at the petrol station as the manager)
    ive liked data base management subject when i was in the University so, Ive been reading OCA-051 & interested on OCA qualification I just want to know what are the possible jobs i can apply if i get the certification? Basically what should i do to get any IT related job? :( ( i dont like programming)..
    Please be kind to reply.
    ps:i live in the Uk.
    Thanks.You'll sit on your bum and ruin your back again with most IT jobs. With your government shrinking, OCA qualification won't have much worth unless you personally know someone in the private sector that needs help. An operator job with your petrol company (assuming it's not just a mom 'n pop station) would probably require heavy lifting.
    IT is a good, solid, growing career path, but most of the work is still programming, and most ways up to better jobs go through that experience. You might be an exception if you have a way to join other skills with your IT education, such as business analysis or sales or web prettyfying. Perhaps the determinants are your personality and goals.
    I know, it's tough, but if you are honest with yourself and check out some of the "what color is my parachute" kinds of career advice books, you can find a happy medium. There actually are some benefits in starting a career during economically troubled times, but you only see that in retrospect. You have to decide on goals, pursue them vigorously, and reevaluate when it doesn't work for you.

  • Need Help About AC or battery or pc :(

    Hello!
    i am kinda new to the forum,i have GT70 2pe dominator pro laptop(bought from ibuypower) When i play demanding games,my ac unplugs itself from the laptop i dont know what to do ,i updated ec,bios,did the ec reset,battery calibration(from msi support page), but i did these long time ago i dont know if this started then or the problem was already on pc when i bought it,i didnt test playing demanding games before i did those things
    I tried playing w/o battery sometimes when the game loads laptop shuts down
    So i really need help..? 

    i think i have the correct model,well if it is going to fail can i use it until i buy a new one 2 weeks later?,i mean is this going to do harm to my computer until i get a new one?
    Thanks for the help  (sorry about the full sized picture)

  • Need help about how to capture the name of an object before inserting.

    Hi everybody,
    how i can capture the name of an object before it inserts in a table.
    i will use a pre-insert trigger to do this, but i don't know how to specify the name of the object that's inserting.
    any help about this issue will be appreciated.

    Mentioning objects you mean: You have a procedure which inserts data into some table and this procedure needs to know the name of the caller (another procedure or ...)
    Can this be of some help http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:382218730166 ?
    Regards
    Etbin

  • Need help about button

    Hi everybody!
    I'm from Italy, so I need help regarding button
    I create an animation, I put a button to replay the movie by this code:
    on (release) {
    gotoAndPlay(1);
    but in AS3 doesn't work. Can you help me pls?
    Another problem...I need a very simple preloader that display only percentage, stop.
    Anybody knows a template or tutorial about this?
    Thx in advance!

    What do you mean by scene2?. You can only preload external content like a picture, another swf, etc...a much simpler example:
    var myLoader:Loader = new Loader();
    addChildAt(myLoader,0)
    myLoader.load(new URLRequest("http://www.snowman-jim.org/science/images/north-pole-sun-moon.jpg"))
    myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loading)
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading)
    function loading(e:ProgressEvent):void{
        info_txt.text="Loading.."Math.floor(e.currentTarget.bytesLoaded/1024)" Kb";//e.currentTarget is referring to myLoader.contentLoaderInfo
    function finalizado(e:Event):void{
        info_txt.text="I'm done!";
    Just change myLoader.load(new URLRequest("http://www.snowman-jim.org/science/images/north-pole-sun-moon.jpg")) path for the relevant path to the file you want to preload.

  • Need Help about Spatial Data Load - Mapviewer

    Hello everybody,
    I need an immediate help about spatial data load. I installed Oracle mapviwer quick start and try to work on it. However, I could not pass the load step. My questions are;
    1- Where can I find and download my country's data set (spatial data)
    2- With mapviwer, how can I load spatial data to my tables on database (Oracle). Those tables have sdo_geometry columns and I want to query location data, but could not load
    Regards,
    Dilek

    For Mapviewer questions, please post in the following forum:
    MapViewer
    Thanks

Maybe you are looking for

  • Error when downloading iTunes.

    I haven't synced my ipod classic in a while so I went to plug it in and nothing happened. I then discoved iTunes was not even installed on my computer anymore. So, I went to apple.com, itunes, download, all of that... it was working and showed all si

  • 30" Monitor resolution

    I have an X1 Carbon driving dual monitors through a USB 3.0 dock.  A 27" and a 24" monitors both worked fine at 1920 x 1200.  But when I replaced the 24" with a Del 2007wfp, the one and only resolution available for the 30" is 1200 x 800. (the 27" is

  • Sub contracting scenario:- G/L accounts updation..........?

    Hai every body, Q) can any body tell me which G/L accounts get updated in subcontracting scenario?during Goods receipt, goods issue, Invoice. Points will be rewarded. Rgds, K.Praveen

  • Slide video

    Hello,    I have created a Captivate 8 responsive project. In this project I captured a software simulation. One of the software sim slides was captured as a video slide. How do I remove the video part of the slide w/o being prompted top delete the w

  • Tax amount difference in Invoice verification (MIRO) and PO

    Hi Experts, I create a PO of say 10000/- and 2% tax so the total po value is 10020/-. It is calculating correctly. But while doing the GR the GR/IR value is less say 8500/- .I don't no the reason it is picking the wrong value.The price control in mat