Should using unsigned long long be this difficult?

So I have a number. Possibly a big number that I would like to use. When I do the following, valueToGet is fine (1252904880010) when it returns but when I step to currentTimeStamp the value is something like 18446744072483981194.
I can only assume that maybe I am missing some basic understanding of how methods return this value.
-(void)processTimestampReceived
NSString* timeString = @"1252904880010";
unsigned long long currentTimestamp = [self getUnsignedLongLong: timeString];
NSLog(@"currentTimeStamp (converted from timeString): %qu", currentTimestamp);
-(unsigned long long)getUnsignedLongLong:(NSString*)longString
NSScanner* scanner = [NSScanner scannerWithString:longString];
unsigned long long valueToGet;
if([scanner scanLongLong:&valueToGet] == YES) {
return valueToGet;
return -1;

That is so discouraging that code that SHOULD work actually does work for everyone but me. Here is the data after I changed the following code. I had to use scanHexLongLong to actually return an unsigned long long instead of just long long. Is it possible that maybe something is just stomping on that memory location somehow and giving me bad data? But consistently the same way? Seems odd.
2009-09-14 02:36:37.325 TestApp[46744:20b] lVal=322333076619280
2009-09-14 02:36:37.530 TestApp[46744:20b] currentTimeStamp (converted from timeString): 322333076619280
Run using:
[self processTimestampReceived];
unsigned long long lVal = [self getUnsignedLongLong:@"1252904880010"];
NSLog(@"lVal=%qu", lVal);
-(void)processTimestampReceived
NSString* timeString = @"1252904880010";
unsigned long long currentTimestamp = [self getUnsignedLongLong: timeString];
NSLog(@"currentTimeStamp (converted from timeString): %qu", currentTimestamp);
-(unsigned long long)getUnsignedLongLong:(NSString*)longString
NSScanner* scanner = [NSScanner scannerWithString:longString];
unsigned long long valueToGet;
if([scanner scanHexLongLong:&valueToGet] == YES) {
return valueToGet;
return -1;

Similar Messages

  • Should using MacBook Pro really be this difficult???

    Here's my question - should I return this Mac and just buy something else or should I attempt to continue to go ahead with using this brand new Mac I just purchased?
    I'm really not happy with Apple's new MacBookPro and as much as I hate PCs, I'm just thinking that they might be the lesser of the evil here. I have had such an incredibly difficult time with this brand new Mac and it has been such a nightmarish experience trying to use it, I really have to ask that question here. I have just sent the thing off to a technician for an hourly fee to try and get it up and running. He got some things going at my studio but others were appearing to take so long, we decided it best for him to take it to his shop to work on it.
    I've had out of the box 1 nightmare after another trying to get going with it. Compared to my past experience with my Powerbook and other Macs, this has really just blown me and my hopes about working on my new Mac out of the water and I've had so many problems with it, I have just not been able to figure out where to post for help here.
    It took 3 hours with my ISP on the phone to get my email and internet connection up and running (was automatic with my old Powerbook), the new MBP couldn't talk to the printer (old PB connected to printer using wireless via the printer being on appletalk talking to modem via ethernet, wireless router allowed the wireless connection and the PB never had a problem with this), scanner worked once and never again, mouse lost its settings (mouse purchased at Apple store), iWork application suite I purchased from Apple and ordered to be installed on the new Mac - this stuff required entering s/n number (which I was told was supposed to have been done when the software was installed - had to go get box and find disks, etc.), web sites were incredibly slow to load and pages would hang... and apparently there were a lot of updates to all of the required software from Apple that had not been put on the machine yet.
    The technician I hired will be charging around $200 to get the computer up and running and working with everything. Would ProCare have been able to do this? Probably not unless I brought in printer, router, modem, and scanner to the store - or am I mistaken on this? How would Apple's care have been able to have supported me here?
    Should I return the Mac altogether given the depth and amount of problems I'm having doing anything? Would an iMac have been better? Should I just give up on Macs now with this new OS and Intel chip?
    Even having now to spend this additional money, I'm VERY worried that I will end up then having to spend even more money for some other problem that may arise after this given this auspicious start. I'm really really worried that MacBook Pro is just not very dependable at least in comparison to the PowerBook I had and loved for the past several years. What do you think? What's your experience?
    Message was edited by: Actually Human

    Yes. I think you're right about this.
    But I'm not at all new to Macs and used to myself work for Apple as part of the design folks. The experience I'm having right now is NOT the norm with Macs... AT ALL. Apple has been a leader if not THEE leader in usability where computers are concerned and they have been since their birth. Many many many $ and time at least used to be spent in targeting specific usability metrics. I firmly believe that what has happened here is a combo of your observation along WITH what has happened here and there in the past at Apple - the usability group/s demonstrate a clear need and solution for problems such as I'm having (I know - I've witnessed this). Decision makers or 1 decision maker at a higher level "rules" out the proposed solution. The consequences are errors and problems that you can read throughout the entire discussion board here - various problems people have are not necessarily because a solution has not been proposed, found, known, and pushed forward at Apple but is because someone/s rule out that solution being executed... the time/money business.
    The group, when I was in it, would have been livid and fired up had they seen what I have just been through trying to get going with this new Mac ...and I am no stranger to Macs and am not a new user and know my way around a Mac a lot more than most users.
    It has now been 2 weeks that I've had my new Mac and I've not been able to do anything with it due to the enormous problems. I hired a former genius bar guy who has gone out on his own to see what he can do. Unfortunately, the genius bar at the Apple store can't come to me (and I can't bring printer, scanner, router, modem down to the store with the computer - even harder for me since I'm disabled) so I hired this guy to come to me and see what he could do. There were so many problems with the thing, he has taken the computer back to his shop where he's going to find out whether the box is simply a bum Mac from the get go or whether it just needs a lot more tweaking and configuring than was led to have been the case from the outset.
    Some helpful info from him to keep in mind - I got my new Mac online from the Apple store here. He told me that actual human beings are preparing these Macs before they go out to customers. The preparation of the boxes can vary depending upon the experience of whoever is preparing one's new Mac. If the guy/gal was fairly new and didn't now all that much... he was saying you don't know if everything that was supposed to be updated at that time or included or checked GOT checked or included. He told me, for example, s/n number for software I purchased that I ordered them to install at the factory SHOULD have been entered already allowing me to get up and running immediately upon launching the software.
    Also he told me - there are a lot of folks here, as we can all imagine, who purport to be very expert and sound good but he told me there is a plethora of just plain false information and incorrect info all over these boards. For example, when I first posted with problems here, I was told the Migration Assistant doesn't work to migrate stuff from non-Intel-based Macs to Intel based Macs. He told me that is absolutely BS and he has used MA to do that very thing. He told me if there were a problem, it's due to other stuff... example, not ALL software on the computer (either one) have been updated or updates weren't completed or there was a glitch in an update or there is a low level problem that wasn't sussed out (in my case, for example, the FIRST thing he did was run DUtility on the SOURCE computer and repair ANYthing or any naming or any problem whatsoever on the HFS there... this is before doing ANYthing). Ok, not a single person here mentioned starting with that before even touching the new computer. This is why I really tend to believe those genius bar guys/gals that there is an unfortunate amount of mis-information here on these boards that is even more unfortunately passed off by the poster (not by Apple) as being all knowing and authoritative. And myself having worked for Apple, I also know (going back to your original post here) that usability and the design history at Apple is quite different than your current understanding and expectation of Macs. You need to raise the bar you've been using now that you're using a Mac. That's what the Mac is all about - usability. It is the primary way Apple has become a leader in everything it touches and its why long time users like myself are really shocked and affected when the user experience is as poor as its become for me.
    I WILL be taking this up with members of CHI because it really needs to be discussed and addressed. Have we lowered the bar. For Mac users, Mandy, it was NOT always as you have accepted it to be.

  • Which version I should use

    Hi,
    I got this
    Java 1.5.0_03 or later is required for installing Oracle Solaris Studio. Make sure that Java is properly installed and run installer again.
    You can specify valid Java location using --javahome installer argument.
    Can anyone tell me which JDK version I should use there?

    Moderator Action:
    This post has been moved from the Oracle Linux forum.
    You don't have a Linux question.
    You actually don't have a JRE/JDK question.
    You have a Solaris Studio question.
    You needed to spend an extra moment choosing where to post it.
    We moved it for you.

  • Taking an array of unsigned word an using it in a subVI that accepts an unsigned long

    I have a user specified sized array that is in unsigned word(16bit). I need to use a subVI, but the subVI only accepts unsigned long(32bit). I was wondering if anyone would know how to make this work.

    Hi Amy;
    Unless I am missing something, there should not be any problem inside LabVIEW.
    To play it safe and keep LabVIEW performance up, convert the array using the "To Unsigned Long Integer" vi located in the function palette:
    Numeric -> Conversion
    Regards;
    Enrique
    www.vartortech.com

  • HT1727 I have 2 Apple ID's one from 2008 which is an email account I no longer use. Can I terminate this account and just use the preferred one?

    I have 2 Apple ID's one from at least 5 years ago which I no longer use - last purchase 2008. It is linked to an email account which I no longer use regularly. I established this account on my laptop which I use in the city where I work. The newer account uses an Apple ID which I use to purchase music and relates to an email account I now use at my home PC in another community. Can I somehow terminate the old apple account and ID? Will i lose anything? It is causing problems syncing my iPod. Wisely I have decided to sync only with my home PC from here on. Advice would be appreciated.  

    Having read some other posts I think I have answered my question. If I was somehow able to terminate my old (unwanted) account and Apple ID I would no longer be able to access the material I bought with that ID-  so I'm stuck. I have to learn how to manage that situation.
    This is unfortunate for Apple consumers. Life is complicated for families these days and this "rule" although it is in place to prevent cheating and fraud makes things unnnecessarily difficult for me and my family as in my niaevity (sic) with the online world I bumbled into this situation. Not everyone is out to rip off Apple - one of the worlds richest corporations- or the entertainers who market their work through iTunes.I would just like to be able to enjoy the entertainment I pay for where and when I like to on whichever computer is available to me. And I'm not terribly computer literate.   
    It would have been nice to have had the opportunity to speak just once to a real person in the employ of Apple to explain my situation to them.

  • My Apple ID is blocked and the recover email I stopped using it long time ago also I forget my security questions answers what I should do

    My account is blocked and I can't recover it because I forget the security questions and the recover email I stopped using it long time ago

    If you can't get access to it via http:iforgot.apple.com then try contacting Support in your country and see if they can get access to it for you (they should also be able to reset yor security questions) : http://support.apple.com/kb/HT5699
    If they do then update the rescue email address on it to an account that you have access to in case you need to use it in the future - steps 1 to 7 half-way down this page should let you update it : http://support.apple.com/kb/HT5312

  • The battery life on my ipod nano 6th generation only lasts about 2 hours.  Is this standard or should it last longer?

    The batterly life on my ipod nano 6th generation only lasts about 2 hours.  Is this standard or should it last longer?

    - When sleeping the iPod can use wifi and if it has trouble connecting it will keep trying and drain the battery.  I leave mine in airplane mode when sleeping. Otherwise it is frequenlty drained like you see on yours.
    - The rapid drop whe playing vido seems to indicae that something is wrong.
    - If your iPod is defective and under warranty, Apple will give you a refurbished one of the same model.

  • I can no longer read my bank statements. I believe they are using a PDF to display this information.

    I can no longer read my bank statements. I believe they are using a PDF to display this information. If I go to chrome it will open the bank statements but Firefox no longer open these flies. Why??????

    It's very unusual to get no results for PDF in the Application preferences list. It's possible that the file which stores those preferences might have become corrupted. Perhaps it would be best to rename or delete the file and let Firefox re-create it.
    Here's how:
    Open your current Firefox settings (AKA Firefox profile) folder using
    Help > Troubleshooting Information > "Show Folder" button
    Switch back to Firefox and Exit
    Pause while Firefox finishes its cleanup, then rename '''mimeTypes.rdf''' to something like mimeTypes.old
    Restart Firefox. After things setting down, check the Application preferences again to see whether PDF is listed and then set the drop-down on the right side to the desired action.
    orange Firefox button or classic Tools menu > Options > Applications
    Does that work any better?

  • How can I copy multiple slides with a HP Scanjet 4050 to photoes using Maverick? HP apparently no longer supports this product for this OS.

    How can I copy multiple slides with a HP Scanjet 4050 to photoes using Maverick? HP apparently no longer supports this product for OS Maverick.

    VueScan
    VueScan FAQ

  • My secondary e-mail address used on my daughter's ipod can no longer work.  It states, that it is already in use with another apple id.  She used it for weeks before this happened.

    My secondary e-mail address used on my daughter's ipod can no longer work.  She uses this as her imessage texting.  First it needed to be verified.  Once I tried to verify it on appleid support, It states, that it is already in use with another apple id.  She used it for weeks before this happened.

    Maybe:
    iOS: Troubleshooting FaceTime
    iOS: Troubleshooting FaceTime and iMessage activation

  • In camera raw, I am no longer able to use the adjustment brush.  This is a recent phenomenon.?

    In camera raw, I am no longer able to use the adjustment brush.  This is a recent phenomenon.

    Well, it worked fine for me as well for the past couple of years. I had not had any problems using it for the past few years. I use a Mac OS X Yosemite.  As far as I can tell nothing had changed. I had not added any new updates, and a week ago the adjustment brush in camera raw simply ceased working. Everything else in camera raw works.  However, the adjustment brush is a critical tool. I have checked my permissions, and even repaired my permissions with no results.  Of course I have also tried several restarts to no avail.

  • I used to be able to see a preview of my scan which i can no longer see only the adobe acrobat symbol I am using Adobe pro 9 can this be changed??

    I used to be able to see a preview of my scan which i can no longer see only the adobe acrobat symbol I am using Adobe pro 9 can this be changed??

    Yes, that appears how Mavericks works right now. However, you can open the Address Panel, select all your contacts, then click the To (or CC, or Bcc) buttons to move the selection to the address field.
    If it is not already in the Toolbar, right-click on the Toolbar and select Customize Toolbar…
    Then, drag the address panel up to wherever you want it.
    You may also want to add it to the New Message window in the same way.

  • I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    You're welcome.
    Going back to your original post:
    5) Tried running Itunes in 'safe mode', running itunes as an administrator..nothing.
    Was that iTunes' safe mode as opposed to Windows' safe mode? iTunes safe mode is invoked by holding down CTRL+SHIFT immediately after clicking the icon to launch iTunes and continuing to hold until this message pops up:
    Click continue, then close iTunes and reopen. With luck iTunes now opens normally every time.
    tt2

  • I used to able to access and listen to my itunes library from my ipad using the remote app but this no longer works.  I am connected but sound thru ipad.  Is this because of they want us to use itunes match

    I used to able to access and listen to my itunes library on my ipad  using the remote app but this no longer works.  I am connected but sound thru ipad- just controls my library on iMac.  Is this because of they want us to use itunes match

    That has nothing to do with iTunes match. The Remote app on iPad can control the computer's iTunes but not play content from iTunes on your iPad.
    To play for example iTunes imusic on iPad
    You need to have Home Sharing On.
    Check Settings > Music > Home Sharing (key in your Apple ID & password here, must be the same on computer's iTunes)
    Start iPad's Music app, tap the ... More (bottom right), tap Shared.
    Choose your iTunes' library and have fun.

  • I used to have a +.- displayed in upper left corner to click and change text size. My sister used my computer and now I can no longer find this feature.

    I used to have a +.- displayed in upper left corner to click and change text size. My sister used my computer and now I can no longer find this feature

    Do you still have all toolbars visible (View > Toolbars)?
    Did you use an extension or the standard zoom buttons that you can find in the toolbar palette in the View > Toolbars > Customize window ?
    Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily.

Maybe you are looking for