Conversion from BitSet to long

Hi!
I want to convert a BitSet to a number in long format, and it shouldn't be very complicated because BitSet uses an internal array of longs, but I don't know how to do it.
Any idea?
Thanks!

platters wrote:
Thanks so much!
I always have a lot of problems with bits! In the reverse mode, that is, from long to BitSet, until now I do:
long data      = ..
String sd = Long.toBinaryString(data);and then I convert the String to BitSet, is that very few efficient??If you want only the first 64 bits, why are you using a BitSet anyway? Converting to and from a long all the time isn't very efficient. You can use the long itself as if it were a 64 bit set. A few getBit(long set, int bit) and setBit(long set, int bit, boolean value) methods are al you have to implement:
boolean getBit(long set, int bit) { // get bit 'bit' from the set
   return (set&(1L<<bit)) != 0;
long setBit(long set, int bit, boolean value) { // return the new set with bit 'bit' (un)set
   if (value)
      return set|(1L<<bit);
   else
      return set&~(1<<bit);
}kind regards,
Jos

Similar Messages

  • ITunes will no longer play nor add to the library any mp3 files which I have created by conversion from a wav file.

    I am running iTunes 10 on XP Pro and it will no longer play those mp3 files which I have created by conversion from wav files.  I tried to delete some from the library and then re-add them but iTunes will not add them back to the library.
    Can anyone help solve this, please?

    Back up your purchased music before you upgrade, I've read at least 5 cases where purchased music has just gone.....missing.
    That is not supposed to happen, didn't happen to me or thousnds of other iTunes users, but you don't want to be the 6th person, do you?
    There are two things to try before you upgrade:
    Barbara Hall, "Unknown Error (-208)" #1, 07:42pm Oct 19, 2005 CDT
    http://docs.info.apple.com/article.html?artnum=302478

  • Getting ÿþ as saved conversations from Lync in Outlook in Office 2013

    Hi,
    I've been trying to get to the bottom of this and have found similar posts, but no one seems to have an answer.
    When I IM someone using Lync 2013, they get a pop up notification but instead of the message they see ÿþ<.  Once they open the chat window, they can see my typed text.  Occasionally, certain people can't see the first line of my chat, but as
    long as they keep the chat window open, they can see everything new I type.
    All my conversations that are saved in outlook show ÿþ< for the text and are unreadable.  I've disabled the saving of conversations because they have become worthless.
    I believe it has to do with BOM but have not been able to find a way to fix this.
    If I copy a conversation from the chat window and paste it into Microsoft Word it shows ÿþ<, but if I paste it into notepad the conversation appears.
    (I had inserted a screenshot here, but am unable to because I am unable to figure out how to get my account "verified")
    I've tried changing the preferred encoding for outgoing messages: to Unicode (UTF-8) in Outlook, but this had no effect and I can't find a similar option in Lync 2013.
    (I had inserted a screenshot here, but am unable to because I am unable to figure out how to get my account "verified")
    I enabled logging for Lync and the event IDs that come up are 1, 11 and 12, to which I cannot find any information for at the moment.
    Any help and or suggestions would be appreciated.

    Hi,
    Did the issue happen only for you or for multiple users?
    Please try to delete Lync User Profile and information on Registry, then repair Office 2013.
    The path of Lync User Profile: %UserProfile%\AppData\Local\Microsoft\Office\15.0\Lync
    The path for information on Registry: HKCU\Software\Microsoft\Office\15.0\Lync\[email protected]
    Then test the issue again.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Page numbers incorrect after conversion from Excel to pdf

    Page numbers incorrect after conversion from Excel to pdf
    ""This above link (thread:834599) is from a case back in 2011 that claims to solve this problem, but it does not solve this problem. I think that customer only cared about having continuous page numbering, not discrete page numbering per sheet.
    ========================
    I still have this issue in Acrobat XI and MS Office Professional Plus 2010. I keep upgrading to no avail. This regression has resulted in a huge time drain for me. If you fixed it, please explain how I can get my hands on the resolution.
    Previous versions of Excel and Adobe Acrobat enabled flexibility around the "Page #" of "Number of Pages" (Page &[Page] of &[Pages]) token, depending on context and usage. The "# of pages" token could represent EITHER the number of pages in the workbook OR the number of pages in the tab/sheet, depending on how you generated the PDF:
    You could select "Selected Sheets" and then select all or some of the individual sheets in the workbook, and the PDF would honor the discrete numbering of each of the sheets, so the first page of each sheet was p1 and the "# of pages" was the number of pages in the sheet; not the number of pages in the workbook; or
    You could select "Entire Workbook" and the PDF would honor continuous page numbers across all sheets, as a single document.
    Now, it only honors the total number of pages in the workbook, regardless of the method you use to publish to PDF: saving as PDF, printing to PDF, using "createPDF" from Acrobat plugin to Excel's menu ribbon; selecting all sheets, some sheets, or Entire Workbook; automatic First page number or "1" under Page Setup > Page> First page number. (This last option, btw, does restart every sheet at p1, but it hardly makes sense if the total number of pages is still the total number in the workbook instead of the number in the sheet.)
    I spent a lot of time trying each which way that the blog posts recommended and have tried this on multiple versions of Excel and Acrobat now.
    NONE of these time-consuming experiments gave me what I wanted.They all insist that "Page #" of "Number of Pages" (Page &[Page] of &[Pages]) is the total number of pages in the workbook or the total number of pages in the selected sheets combined.
    The numbering are correct in Excel Page Layout.
    The same issue happens when using LibreOffice calc. (Although, I never tested with Libre Office before, so I don't know that it ever worked).
    The workaround now is to create PDF for each spreadsheet one at a time, and then compile them using the Acrobat combine/binder feature. All alternatives are extremely time consuming and tedious. It used to be automatic. This is a major regression that has gone untreated for over a year now, maybe two years.
    My task takes infinitely more time to complete than it did with previous versions of Acrobat. That means that days are added to my project, when the functionality used to enable a quick pdf generation that was ready for review, now I have to do this very manual time-consuming set of steps to generate a draft. As the project has grown and more tabs are added, my pdf-generation task takes that much longer. We require lots of drafts. It used to be easy and fast. Now it is hard and time-consuming.
    In my opinion, the problem is not Excel; it is Acrobat because it was introduced with an upgrade in Acrobat, not an upgrade in Excel. The problem was introduced in Acrobat 9 or 10. Please provide a patch or add-on or something.

    If you are setting up the page numbers in Excel, the resulting PDF would display the the page numbers created in Excel. On Excel 2010 support page, (http://office.microsoft.com/en-us/excel-help/insert-and-remove-page-numbers-on-worksheets- HA010342619.aspx#BM2) is stated the following "tip" which indicates by default Excel 2010 starts numbering each tab with 1. Exel's workaround tip is below - 
    Set a different number for the starting page
    Tip   To number all of the worksheet pages in a workbook sequentially, first add page numbers to all worksheets in a workbook, and then use the following procedure to begin the page number for each worksheet with the appropriate number. For example, if your workbook contains two worksheets that with both be printed as two pages, you would use this procedure to begin the page numbering for the second worksheet with the number 3.
    On the Page Layout tab, in the Page Setup group, click the Dialog Box Launcher next to Page Setup.
    On the Page tab, in the First page number box, type the number that you want to use for the first page.
    Tip   To use the default numbering system, type Auto in the First page number box.
    Also helpful in the same section is the note on viewing page numbers. To see if the page numbering dilemma originates in Excel make sure you are using the Page Layout View see below:
    Hide All
    If you want numbers shown on pages when you print a worksheet  you can insert page numbers in the headers or footers of the worksheet pages. Page numbers that you insert are not displayed on the worksheet in Normal view — they are shown only in Page Layout view and on the printed pages.
    Overall it may be easier not to create the page numbers in Excel but instead create then in Acrobat using the Headers and Footers option in Acrobat.  I hope this helps - it sounds like a frustrating issue you are experiencing.

  • Best practice video conversion from download

    I am looking for best practice for video conversions.
    I am downloading adobe recordings via this method:
    http://server.adobeconnect.com/xyz/output/filename.zip?download=zip
    From here, I have been converting the FLVs using either freemake video converter or FLV converter. I have tried converting into AVI (XVID), MOV, WMV, etc. (I need the file to be under 600 MB for an hour of recording, therefore it is going to need some type of compression).
    My goal is to import the video into Sony Vegas Pro 10 for further editting. I have found that whatever method I use, the video and audio does not sync properly about 50% of the time. The video time is longer than the audio time usually. Or that there are other various errors, such as the video just freezing halfway through the video.
    I have been using connect for a few years now, but with each update I find (connect 8, 9, etc), that the problems are getting worse. At this point I am just wasting time trying to convert into various formats using various codecs just trying to luck upon one where the video is at least without error.
    What methods are others using to convert the FLV to a workable editable format?

    Can't the FLV files be changed into many different formats through Apple's
    Compressor or Adobe Media Encoder? These formats can then be opened in
    standard video editing software for editing.
    Best practice video conversion from download
    mach5kel
    to:
    jsb152
    05/21/12 01:03 PM
    Please respond to jive-509399086-9dnu-2-2mvb7
    Re: Best practice video conversion from download
    created by mach5kel in Connect General Discussion - View the full
    discussion
    Yes, I use this as a last resort, as the quality of capture this was is
    signifcatnly lower. As well as it is a much more time consuming process. I
    sometimes have over 50 parts of 1 hour video. To use camtasia, you need
    first to record it, then it must be saved in a camtasia format, and then
    lastly rendered into avi or wmv. Therefore, it is does take awhile.
    Really, I feel there shouldnt be so many errors in the conversion process,
    but I am finding the FLV recordings themselves have problems. This last
    file I am looking at, even the recording playback on adobe connect, has
    serious issues with audio and video sync. A problem that is all too common
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page: [
    http://forums.adobe.com/message/4426243#4426243]
    To unsubscribe from this thread, please visit the message page at [
    http://forums.adobe.com/message/4426243#4426243]. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Connect General Discussion by email or at Adobe
    Forums
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.

  • How to remove silence (gaps in conversation) from video?

    I have both Premiere Pro and Premiere Elements. I'm not sure which tool is the right one to use for this so I will post this qustion in both forums.
    How can I delete or remove the silence (long pauses in a conversation) from a video? I know that I can find and remove the silence from an audio track in Audition, but I cannot figure out how to apply those edits or changes to my video track so that everything stays in sync.
    Please keep in mind that I wnat to do this automatically across several videos so I need this to be as automated as possible.
    Any help would be greatly appreciated.
    Thanks.

    ...and if you want to avoid "jumpcuts" you put some cutaways over the jumpcut to hide it.
    /Ulf

  • Conversion from string "" to type 'Double' is not valid

    We're using BPC 7.5 MS and on patch level 111.02
    There's two front-end servers and one back-end.  we have about 100 users but concurrency is likely in the 50 range.
    We've been running extremely well for about 4 years but are now starting to run into problems.
    There are about 5-6 applications but none greater than 10 million records.  We optimize regularly.
    However over the past two months admin processes seem to take a lot longer.  Optimization now times out after about 1.25 hours and none used to take greater than 15 minutes.
    Today after processing dimensions we checked the application status and we were not able to check if it was available or not.  We got a pop up box saying
    conversion from string "" to type 'Double' is not valid
    I've processed dimensions and applications since and still this error persists.
    We're attempting a reboot to see if that helps but I've never seen this before and in combination with the slower admin processing I'm wondering if there's something drastic going to happen.
    Michael

    Hi Michael,
    for the poor performances you have to check the guides about performance on bpc if you have scheduled regurarly optimize during day and night (just verify that never factwb reach 50.000 and fac2 500.000 records) maybe you need to change some parameter on the server as MaxThreads.
    For the conversion string error on admin console see please this note 1803092 - Set application set status error
    Regards
         Roberto

  • IPhone 6 plus- how to delete some of the texts feeds in a conversation from a sender without deleting all texts from sender?

    How can you delete some of the text messages  from a sender without deleting the entire conversation from that sender? After selecting the message or messages...the top left option is "delete all" and the top right says "cancel". I simply want to save some of the history of the texts and delete those that are no longer needed.

    Hey Mari7Can,
    Thanks for the follow up. Hmmm…the options should have shown at the bottom of the screen. Let’s try forcing the Messages application to close and restarting your phone:
    Force an app to close in iOS - Apple Support
    https://support.apple.com/en-us/ht5137
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    https://support.apple.com/en-us/HT201559
    Thanks,
    Matt M.

  • Project Conversion from 11.03 to R12- need help

    Hi All,
    I need some information regarding conversion from 11.03 to R12 along with Capital Project's conversion, do we need to take care Asset Assignment and Assets information at the time of Project Conversion. Iam doing Project and Task conversion different. Is there any good mapping document or Conversion FD, if any body have please send my mail ID. [email protected]
    Thanks for your help.
    Thanks,
    Srini..

    Usually only Open Invoices and Unapplied Receipts are migrated from Old system to New Instance.
    Post Migration Reconciliation shall be tough in that scenario. Reconsider/Rediscuss with Client.
    Migration can be done using APIs or Custom Scripts using Standard Interfaces.
    Hope this is helpful
    Regards,
    Sridhar

  • How do I add multiple songs to an existing playlist from the (no longer called) Library? Highlighting multiple songs and clicking the "Add to" button will only add the with the little arrow, not all the highlighted ones!

    How do I add multiple songs to an existing playlist from the (no longer called) Library? Highlighting multiple songs and clicking the "Add to" button will only add the one with the little arrow, not all the highlighted ones! I am using the "new" iTunes.

    For the moment there isn't a way for us end-users to control what is "matched" or "uploaded." That is purely a result of Apple's server-side algorithms.
    To re-add multiple songs at once simply highlight all the songs you want to re-add, then right-click (or Control+click) the list and choose "add to iCloud."

  • Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view. Also, when I go to enter a new event in google calendar, I now have to click the cursor in the box to type the event (it used to let me just start typing).

    Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view (either one or several conversations) as it says "No Conversations Selected" when I have selected one or several. Also, when I go to enter a new event in google calendar, I have to click the cursor in the box to type the event (it used to let me just start typing) or else it flips out and starts jumping to day view or another month. Does anyone know how to fix either of these?

    I have had this problem; but while trying to fix another problem, I reset my preferences for Firefox and it fixed this problem as well. To reset preferences, follow this link: http://support.mozilla.com/en-US/kb/Resetting%20preferences

  • How can I print a text message conversation from my iPhone? Not using screenshots.

    How can I print a text message conversation from my iPhone? Not using screenshots. It's around 500 messages so screenshots is not a option.

    Yes, you can delete from iphone:
    http://manuals.info.apple.com/enUS/iPhone_iOS4_UserGuide.pdf
    It is covered in the manual.
    Page 172:
    "Delete a podcast: In the Podcasts list in iPod, swipe left or right over the podcast, then
    tap Delete. "

  • I can´t sync iCal events written in the iphone4 to the macbook ical, but conversely from macbook to iphone there´s no problem, can somebody help me?

    I can´t sync iCal events written in the iphone4 to the macbook ical, but conversely from macbook to iphone there´s no problem, can somebody help me?

    Thanks for your answer! I tried as you say, erase the Sync History, but now does not sync any calendar, only displays the birthday ...do not know whatelse to try.

  • Conversion from string "20041023 " to type 'Date' is not valid.

    Hi ,
       I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report. 
    Following methods i tried in textbox expression but no luck.
    =Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
    =Cdate(Fields!EmpHireDate.Value)
    Error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023  " to type 'Date' is not valid.
    Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
    Thanks,
    Kittu

    Hi Jmcmullen,
         Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
    , when i use above expression values(ex:"20141023")
    are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
    Even i tried to pass its original value("00000000") as below but no luck.
    =IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Also tried this:
    =IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Please Suggest. 
    Thanks ,
    Kittu

  • Error while loading : Time conversion from 0CALDAY to 0FISCPER

    Hi ,
           I get the following error when loading to an ODs .
    My 0FISCPER is mapped to one of the date fields from the extractor (Document date) and also Have 0FISCVARNT as part of data fields  .
    " Time conversion from 0CALDAY to 0FISCPER (fiscal year ) failed with value 20060405 " .
    thanks .

    Hello CG
    Please refere this forum
    Time conversion problem
    Thanks
    Chandran

Maybe you are looking for

  • XML page display Error in IE5

    To JDev Team: When I generate XML under IE5 browser I get the following error: The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. Invalid xml decla

  • All CX traffic dropped on data plane with error message 'Unable to create policy params (policy-params-failed)

    Problems with CX dropping all traffic - error message: Unable to create policy params (policy-params-failed) seen when issuing cli cmd show opdata framedrop on CX. Data hits ASA Service Policy and is redirected to CX, but no traffic is passed (user e

  • IPhoto 6 Slideshows: "Show Titles" not as nice as iDVD 6

    I was thrilled in iDVD 6 when the slideshows had a new option to display both titles and comments. They display in the lower middle of the image in a semi-transparent box. Even better, if there is no text in the title or comment, the box doesn't disp

  • Adding new record in user table via DI API

    Dear all, I created in SAP B1 two user tables (Master data and master data rows) I need to add a new header record in my master data user table by DI code. This is my source code... Dim sboDestTable As SAPbobsCOM.UserTable = oCompany.UserTables.Item(

  • Puzzled about fonts

    In a listing of these fonts one is white and not orange like the others. When I click (high light) on the orange fonts they get an orange dot. When I click (high light) on the white font the orange dot does not appear. All the fonts display perfect o