How can I use an unsigned 'byte' (so it reaches 255 but is still 1 byte)

I'm doing some compression programmes for school. I've done a framework and now I'm implementing the algorithms.
My problem is that I need to work on bytes (I user array of bytes for IO purposes) and after all was developing nicely, I discovered that byte is signed and I can't do something like
byte pivot |= 128;
I neeed this because I use a vector containing "1" and "0"s that represent my coded symbol and I must apply this to a byte value.

You could allways use ints instead of bytes.
For the IO you could allways convert from one to another.

Similar Messages

  • HT5622 How can i use the facetime, its appearing in the screen but i cannot use it...

    How can i use the facetime, its appearing in the screen but i cannot use it.

    http://support.apple.com/kb/ht4319

  • I have audio on my iOS imovie app that I want to delete. How can I do this. I tried recording over it but it still is heard.

    I have audio on my iOS imovie app that I want to delete. How can I do this. I tried recording over it but it still is heard.

    I think Apple User is mistaken and wandered into the wrong forum, do ignore that advise.
    I am unclear as to where the audio is?
    If you want to silence the audio on a clip in the timeline,
    double tap the clip,
    In the audio clip settings turn the sound off.
    If it is a sound recording, sound effect, or music then you can double tap, and choose delete.
    Have a look at this help guide, specifically the part under create a project, add and adjust audio
    http://help.apple.com/imovie/ipad/1.3/index.html
    http://help.apple.com/imovie/iPhone/1.3/index.html
    hope it helps

  • How can I use find a phone with my family members but they each have there own email

    How can I use find a phone with my family's iphone when they already have email addresses?

    Welcome to the Apple Community.
    You can't use find my phone from your phone if your other family members use another iCloud account.
    You have two options depending on why you want to find the phones.
    Use find my phone at iCloud.com on a mac/PC and log in using their account.
    Use the find my friends app

  • How can i use FaceTime on my Macbook Pro to iPhone 4?

    Hi,
    i've MacBook Pro (version 10.6.8) and iPhone 4 (version 4.3.5) so how can i use FaceTime on Mac as well iPhone 4 but tried so many times if i try to Facetime call from Mac to iPhone 4 its showing missed call on my iPhone there is no ringing tone try from iphone 4 to Mac same missed Facetime call indicated on Mac's FaceTime so settings also correct i cann't call to both devices so is there any invitation we need to be send to iPhone or Mac? please suggest me.
    Thanks in advance,
    Suresh Balakrishnan

    iOS: Using FaceTime

  • How can I use my software CD to fix operational system's problems?

    the cd that came with the MacBook, how can I use it to fix problems with the OS, but not deleting the files that I have ?

    You can boot up off of the CD and run Disk Repair including Repair Permissions or Verify Disk. Other than that, there aren't many choices From Apple for "fixing problems" from the CD as such.. unless you call reinstalling the OS "fixing problems".
    Alternatively, if Safari is slow you can "reset Safari" from the Safari pull-down menu.
    You can also download the 10.6.8 Snow Leopard Combo upgrade and reistall that from your desktop.
    You can also let you rmachine run over night and let the S/L utilities run automatically at night.. no intervention on your part.
    Genreally speaking there isn't really that much a user can actively do to "fix things".. however, suggest you keep all the software on your machine current. You can go to support and see all the 10.6.8 software updats availale. Be careful nto to download the "server" software for 10.6.8 though.
    Niel gave a great suggestin... always back-up your user files.

  • How can I use Automator to extract specific Data from a text file?

    I have several hundred text files that contain a bunch of information. I only need six values from each file and ideally I need them as columns in an excel file.
    How can I use Automator to extract specific Data from the text files and either create a new text file or excel file with the info? I have looked all over but can't find a solution. If anyone could please help I would be eternally grateful!!! If there is another, better solution than automator, please let me know!
    Example of File Contents:
    Link Time =
    DD/MMM/YYYY
    Random
    Text
    161 179
    bytes of CODE    memory (+                68 range fill )
    16 789
    bytes of DATA    memory (+    59 absolute )
    1 875
    bytes of XDATA   memory (+ 1 855 absolute )
    90 783
    bytes of FARCODE memory
    What I would like to have as a final file:
    EXCEL COLUMN1
    Column 2
    Column3
    Column4
    Column5
    Column6
    MM/DD/YYYY
    filename1
    161179
    16789
    1875
    90783
    MM/DD/YYYY
    filename2
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    MM/DD/YYYY
    filename3
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    Is this possible? I can't imagine having to go through each and every file one by one. Please help!!!

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • How can I use LabVIEW to send the equivalent of a CTRL D (in VT 100 format) out the serial port of my computer?

    I am trying to write a vi that interfaces with a piece of OEM equipment that is set up to talk with a VT 100 terminal. I can't seem to locate the ASCII equivalent string (if there is such a thing) of a CTRL D. Is there a vi that emulates VT 100 commands?

    If I recall, CTRL-D is EOF on most ASCII tables.
    You'd probably have to use an escape sequence
    or if you can use an unsigned 8-bit that might be
    easier.
    In article <[email protected]>, TLS
    wrote:
    > How can I use LabVIEW to send the equivalent of a CTRL D (in VT 100
    > format) out the serial port of my computer?
    >
    > I am trying to write a vi that interfaces with a piece of OEM
    > equipment that is set up to talk with a VT 100 terminal. I can't seem
    > to locate the ASCII equivalent string (if there is such a thing) of a
    > CTRL D. Is there a vi that emulates VT 100 commands?

  • How can we use mode "UsePDF" in Interactive form?

    Hello everybody,
    I want to know that how can i use the mode usePdf in Interactive form?
    My scenario is:
    I have pdf form saved locally with blank fields.
    I save this file after requied values in all fields.
    Now i want to import this pdf file in interactive form and needs to submit this form so all the data in this pdf file are submitted to the System.
    How can i do this?
    regards,
    Bhavik

    Hi Bhavik,
    you do not need to use the upload ui element, if your pdf-file which you want to upload resides in you web application project. In the following you can find Web Dynpro code snippets I use in one of my demos for displaying an uploaded pdf-file:
    wdDoModifyView method of FormView:
        //@@begin wdDoModifyView
         try {
              // get interactive form element by ID
              InteractiveForm form = (InteractiveForm) view.getElement("Evaluation");
              if (wdContext.currentContextElement().getCurrentMode().equals("usePDF")) {
                   form.setMode(WDInteractiveFormMode.USE_PDF);
         catch (Exception e) {
              e.printStackTrace();      
        //@@end
    onPlugFromUploadView method of UploadView:
        //@@begin onPlugFromUploadView(ServerEvent)
         try {     
              // modify the context and set needed attributes
              wdContext.currentContextElement().setCurrentMode( "usePDF" );
              // extend the attribute "pdfSource" from the context to a modifiable binary type
              IWDAttributeInfo attInfo = wdContext.currentContextElement().node().getNodeInfo().getAttribute("pdfSource");
              ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
              IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;
              binaryType.setFileName("evaluationForm.pdf");
              binaryType.setMimeType(WDWebResourceType.PDF);
              // add the generated pdf to the context
              wdContext.currentContextElement().setPdfSource( evaluationForm ); // byte[] evaluationForm
         catch (Exception e) {
              wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
        //@@end
    If you do not want to display the data before submitting the data, then you have to use the WDInteractiveFormHelper class for extracting the form data after upload in the context. This class is available since NetWeaver04 Support Package Stack (SPS) 10. The class com.sap.tc.webdynpro.clientserver.adobe.api.WDInteractiveFormHelper contains at the moment one helper function for PDF document. Here are the details:
    Constructor Detail
    public WDInteractiveFormHelper()
    Method Detail
    public static void transferPDFDataIntoContext(byte[] pdfSource, IWDNode targetNode)
    Method transferPDFDataIntoContext extracts data from a PDF document and copies the values into the Web Dynpro Context. The xml structure of the document data is applied starting from the specified target node. Usually, this node should be the same context node to which InteractiveForm-UIELement property dataSource is bound during PDF generation.
    Parameters:
    pdfSource - PDF document as byte[]
    targetNode - target IWDNode
    Hope this will help you,
    Regards, Carsten

  • How can free + used space tbs size, can someone explain

    Hi Gurus
    Can someone explain this, How can free + used space in a tablespace can be greater than size of a tablespace. What am I missing here . Thanks a lot .
    I am on 10.2.0.1, HP-UX
    14:38:52 SQL> select owner,sum(bytes), sum(BYTES) /1024/1024 "MB" from dba_segments where tablespace
    name='USERDB1ADATA' group by owner;
    OWNER SUM(BYTES) MB
    USERDB1A 839680000 800.78125
    1 row selected.
    14:40:42 SQL> select bytes, BYTES /1024/1024 "MB" from dba_data_files where tablespace_name='USERDB1
    A_DATA';
    BYTES MB
    3758096384 3584
    1 row selected.
    14:40:42 SQL> select sum(bytes) , sum(BYTES) /1024/1024 "MB"from dba_free_space where tablespace_nam
    e='USERDB1A_DATA';
    SUM(BYTES) MB
    3067412480 2925.3125
    1 row selected.
    14:40:43 SQL> select 839680000 + 3067412480 "used + free space" from dual;
    used + free space
    3907092480
    1 row selected.
    New DBA

    Good point, Howard, about the recycle bin. So I cleaned up, recreated the table, filled it, dropped it but did not purge it, and ...
    SQL> create table test.x tablespace test as select * from dba_objects where 1=2;
    Table created.
    SQL> insert into test.x select * from dba_objects;
    12617 rows created.
    SQL> commit;
    Commit complete.
    SQL> drop table test.x;
    Table dropped.
    SQL> with
      2  dbf_size as (select sum(bytes) size_
      3                 from dba_data_files where tablespace_name='TEST'),
      4  dbf_free as (select sum(bytes) free_
      5                 from dba_free_space where tablespace_name='TEST'),
      6  dbf_used as (select sum(bytes) used_
      7                 from dba_segments where tablespace_name='TEST')
      8  select size_, free_, used_, (size_ - free_ - used_) left_
      9         from dbf_size, dbf_free, dbf_used
    10  /
         SIZE_      FREE_      USED_      LEFT_
       5242880    5177344    2162688   -2097152
    SQL>and then I played around with my SQL and came up with
    WITH
    dbf_size AS (SELECT SUM(bytes) size_
                   FROM dba_data_files
                  WHERE tablespace_name='TEST'),
    dbf_free AS (SELECT SUM(bytes) free_
                   FROM dba_free_space
                  WHERE tablespace_name='TEST'),
    dbf_used AS (SELECT SUM(bytes) used_
                   FROM dba_segments
                  WHERE tablespace_name='TEST'),
    dbf_fbin AS (SELECT SUM(bytes) fbin_
                   FROM dba_segments
                  INNER JOIN
                        dba_recyclebin
                     ON (tablespace_name=ts_name
                         AND segment_name=object_name)
                  WHERE tablespace_name='TEST')
    SELECT      size_, -- tablespace size
         free_, -- free space reported
         used_, -- segment space used
         fbin_, -- segment space in recycle bin
         (size_ - free_ - used_ + fbin_) left_ -- 64K overhead per data file
      FROM      dbf_size, dbf_free, dbf_used, dbf_fbin
    /which does
    SQL> WITH
      2  dbf_size AS (SELECT SUM(bytes) size_
      3                 FROM dba_data_files
      4                WHERE tablespace_name='TEST'),
      5  dbf_free AS (SELECT SUM(bytes) free_
      6                 FROM dba_free_space
      7                WHERE tablespace_name='TEST'),
      8  dbf_used AS (SELECT SUM(bytes) used_
      9                 FROM dba_segments
    10                WHERE tablespace_name='TEST'),
    11  dbf_fbin AS (SELECT SUM(bytes) fbin_
    12                 FROM dba_segments
    13                INNER JOIN
    14                      dba_recyclebin
    15                   ON (tablespace_name=ts_name
    16                       AND segment_name=object_name)
    17                WHERE tablespace_name='TEST')
    18  SELECT     size_,
    19     free_,
    20     used_,
    21     fbin_,
    22     (size_ - free_ - used_ + fbin_) left_
    23    FROM     dbf_size, dbf_free, dbf_used, dbf_fbin
    24  /
         SIZE_      FREE_      USED_      FBIN_      LEFT_
       5242880    5177344    2162688    2162688      65536
    SQL> alter tablespace test add datafile 'C:\ORACLE\ORADATA\XE\TEST2.DBF' size 5m;
    Tablespace altered.
    SQL> WITH
      2  dbf_size AS (SELECT SUM(bytes) size_
      3                 FROM dba_data_files
      4                WHERE tablespace_name='TEST'),
      5  dbf_free AS (SELECT SUM(bytes) free_
      6                 FROM dba_free_space
      7                WHERE tablespace_name='TEST'),
      8  dbf_used AS (SELECT SUM(bytes) used_
      9                 FROM dba_segments
    10                WHERE tablespace_name='TEST'),
    11  dbf_fbin AS (SELECT SUM(bytes) fbin_
    12                 FROM dba_segments
    13                INNER JOIN
    14                      dba_recyclebin
    15                   ON (tablespace_name=ts_name
    16                       AND segment_name=object_name)
    17                WHERE tablespace_name='TEST')
    18  SELECT     size_, -- tablespace size
    19     free_, -- free space reported
    20     used_, -- segment space used
    21     fbin_, -- segment space used in recycle bin
    22     (size_ - free_ - used_ + fbin_) left_
    23    FROM     dbf_size, dbf_free, dbf_used, dbf_fbin
    24  /
         SIZE_      FREE_      USED_      FBIN_      LEFT_
      10485760   10354688    2162688    2162688     131072Message was edited by:
    Hans Forbrich
    Cleaned up the script and tested with second data file added to verify LMT overhead.

  • How can I use phonetic fonts for cursors name

    Hi all!
    I need to use phonetic characters in cursors names. Does somebody know wich font I have to use for this ?
    One other problem is that I need to use Vietnamese characters at the same time. Is it possible to change the font of the cursors names run-time (in the diagram)?
    Last quetion: Does LabVIEW support unicode? If yes,how can I use it?
    Thank you for your help!
    Nico

    > Effectively, dual-byte encodind is allright to support Vietnamese and
    > Western languages. But how did I get the phonetics characters? With
    > shortcut key ?
    > As I need the user to change the cursor name run-time without using
    > the frontpannel cursor legend, I'm using property node and a subVI
    > asking for this name. (The user will enter the name in a string
    > control).
    > Moreover I would like the user to have the possibility to choose a
    > character in a pannel (something similar to the menu 'insert symbol'
    > in MS Word). Is it possible to do this ? With Active X maybe, but I
    > don't know which activeX objet I can use....(I am not very familiar
    > with ActiveX).
    Unfortunately, I don't know what the phonetic characters look like, so I
    can't
    tell you what to type to enter them. If you find them in Word,
    you should be able to copy them to the clipboard, they will be in
    Unicode, and paste them into LV -- where they will be converted to dual
    byte. If it doesn't work, try to find out if they are exist in the
    locale of your machine, or more importantly, the target machine.
    If you can display them, you can build a simple ring with short strings
    containing the phonetic characters. When the user picks something from
    the ring, use the strings property and value to index out the string and
    replace/append to the string the user is editing. You will want to pay
    attention to the string's selection if this is supposed to act like a
    character palette and either do an insert or replace.
    If you want a more compact grid menu, you will need to convert the
    strings to images and paste them in a pict menu. That value can be used
    to index a constant array that matches the order in the pict ring.
    Greg McKaskle

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • How can I use one photo twice in a slideshow

    I am in iPhoto '11 9.4.3 making a slideshow to send to iDVD for my mother-in-laws funeral next Wednesday.
    How can I use this one particular photo of her several times in the slide show.
    I have tried copy/past and that does not seem to work.
    Thanx in advance

    I would just duplicate the picture several times and keep inserting duplicates ...

  • How can i use microsoft word on ipad 2

    how can i use the microsoft application on my ipad 2?

    The Pages app is also compatible with MS Word. Unlike some of the others mentioned, the document is actually stored on the iPad as opposed to 'the clouds'. Again, most of those mentioned are cut down versions of MS Word.
    Stand back and look at this constructively; do you need to regularly access to the document from more than one computer/device without the need to keep amending your document on your computer and sending it to your iPad? If so, Documente to Go etc may be the best choice.

Maybe you are looking for

  • My iPod is stuck in Recovery Mode after trying to Update...

    I was trying to update my ipod 4th gen (ios 6.1.3 or something like that) and it went into Recovery Mode. My laptop have Windows XP on it and doesn't allow me to plug anything into the USB thingys. I've tried everything to get them to work, but it wo

  • Blank DVD and CD not showing up in Finder or anywhere

    My blank dvd and cd are not showing up in Finder. I checked my preference and deleted from my library com.apple.finder.plist. All to no avail. I have the new upgraded Lion.

  • Using the unix telnet command in java

    I am using Runtime.getRuntime().exec("telnet ......") to excute the telnet command within my java program. Basically, I'm writing a program to automate a bunch of processes, and one of them requires the process to be executed in another machine. It k

  • Help with creating photo folders!!!

    I have a 30 gig photo and I finally got around to loading photos on the thing. The only problem is that I can figure out how to create seperate folders. Right now, all of my photos are all lumped together in the "Photo Library" link on my pod and I w

  • [svn:osmf:] 15951: Attempting to fix server build ( missing source path to sample plug-in).

    Revision: 15951 Revision: 15951 Author:   [email protected] Date:     2010-05-07 09:57:57 -0700 (Fri, 07 May 2010) Log Message: Attempting to fix server build (missing source path to sample plug-in). Modified Paths:     osmf/trunk/apps/samples/framew