Re: [NSMutableData resetDataRangeTo:(NSRange)range];
On 15 Jul 2014, at 00:32, Jens Alfke j...@mooseyard.com wrote: On Jul 14, 2014, at 1:07 PM, Carl Hoefs newsli...@autonomy.caltech.edu wrote: modifiableData = [ NSMutableData dataWithData: [ external call that gives me an NSData ] ]; It’s shorter and more idiomatic to just say modifiableData = [external mutableCopy]; (plus an autorelease if you’re not using ARC) Will get it working first, and if there's a performance panic, perhaps something can be done (but I extremely doubt it). Well, the most optimal thing to do would be to create an empty NSMutableData of the correct size, then use memcpy to copy in the correct pieces from the original NSData and whatever other sources there are. That will save you some unnecessary copies and possibly realloc calls. Another possibility is to use dispatch_data. Rather than copy bytes around to assemble them into a contiguous buffer, your use case might be just as well suited to dispatch_data’s approach of tying together various non-contiguous buffers. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
can I safely ignore Error: CGAffineTransformInvert: singular matrix?
I added a bannerView to a custom UI detailController view, wired it up to a property in the class's .h file then added self.canDisplayBannerAds = YES;j to my implementation file. The banner works fine, but I'm getting several instances of Error: CGAffineTransformInvert: singular matrix in console every time I segue into the view. The app isn't crashing or producing any other kinds of error output, but I'm wondering whether I'm just storing up trouble for later in the day. The discussion here http://stackoverflow.com/questions/7471027/overriding-layoutsubviews-causes-cgaffinetransforminvert-singular-matrix-ran offered some good theoretical perspective, but if its correct, I'm not sure what I need to adjust. I suspect its something to do with the iAd banner wanting to redraw the content view, but as I say, the banner displays and works fine. The parent view is mostly empty at the moment, but I will be adding controls to it next. Another bunch of search results claim that this error message is/was a bug or (at least) an oddness associated with Storyboards. One remedy suggested switching off AutoLayout (see http://www.raywenderlich.com/forums/viewtopic.php?f=20t=2793start=120#p32794). However, I'm using Xcode 6 beta 3 and the new Size Classes option, which doesn't allow for AutoLayout being switched off. So, my apps not crashing, the banner ad is displaying, can I ignore it this message? Or am I going to be tearing my hair out over it further down the line? Thanks for your thoughts. Phil signature.asc Description: Message signed with OpenPGP using GPGMail ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: can I safely ignore Error: CGAffineTransformInvert: singular matrix?
On Jul 15, 2014, at 8:00 AM, 2551 2551p...@gmail.com wrote: offered some good theoretical perspective, but if its correct, I'm not sure what I need to adjust. You don’t need to adjust anything, unless you were calling CGAffineTransformInvert with a singular matrix. This is a general case – if you see logs that you can’t attribute directly to your code, Report a Bug. You don’t need to try to resolve the issue yourself when it isn’t in code you control. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
On Jul 15, 2014, at 1:45 AM, Mike Abdullah mabdul...@karelia.com wrote: Another possibility is to use dispatch_data. Rather than copy bytes around to assemble them into a contiguous buffer, your use case might be just as well suited to dispatch_data’s approach of tying together various non-contiguous buffers. Awesome! I had been wondering if this concept existed in Cocoa, didn't see it in the NSData docs. It's sort of like using iovec structs with readv/writev for sockets. I would primarily use the dispatch_data_create_map() function, right? Looks like it's supported in OS X 10.7+. Très cool. -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
On Jul 15, 2014, at 9:50 AM, Carl Hoefs newsli...@autonomy.caltech.edu wrote: Awesome! I had been wondering if this concept existed in Cocoa, didn't see it in the NSData docs. It's sort of like using iovec structs with readv/writev for sockets. I would primarily use the dispatch_data_create_map() function, right? Looks like it's supported in OS X 10.7+. Très cool. I’ve seen evidence that NSData/CFData supports data objects built out of multiple non-contiguous buffers, because I’ve received some such objects in an NSURLConnection delegate callback. There just doesn’t appear to be any public API for _creating_ such an NSData object, sadly. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
On Jul 15, 2014, at 10:20 AM, Jens Alfke j...@mooseyard.com wrote: On Jul 15, 2014, at 9:50 AM, Carl Hoefs newsli...@autonomy.caltech.edu wrote: Awesome! I had been wondering if this concept existed in Cocoa, didn't see it in the NSData docs. It's sort of like using iovec structs with readv/writev for sockets. I would primarily use the dispatch_data_create_map() function, right? Looks like it's supported in OS X 10.7+. Très cool. I’ve seen evidence that NSData/CFData supports data objects built out of multiple non-contiguous buffers, because I’ve received some such objects in an NSURLConnection delegate callback. There just doesn’t appear to be any public API for _creating_ such an NSData object, sadly. If you look closely, you’ll see those are dispatch_data_t’s, which are toll-free bridged to NSData. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
iBeacons - enter and exit?
I have an application built and ready for iBeacon support. It's intention is to tell whether someone is in the office or not. I was planning on placing an iBeacon at the entrance to our office - and use that to tell my server who is in or out of the office. For fun. Well, if you walk into the office, it would work, but if you enter the region again, turn around and go back in the office, you're out of sync. I could use a geoFence - would this be a better solution? Is this type of enter/leave functionality beyond what an iBeacon can provide? Or would I need to have multiples to gather direction of movement? Like a minimum of 3 beacons? I'm looking for some strategy that would work best for such a thing. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iBeacons - enter and exit?
You could definitely use a geofence. But iBeacons have a big advantage in power consumption. On Tue, Jul 15, 2014 at 4:19 PM, Eric E. Dolecki edole...@gmail.com wrote: So only if you have multiple interior locations covered... assuming when no beacons are detected that the person has left the area. kCLLocationAccuracyNearestTenMeters seems like it would be good enough of a geofence to use without beacons. I don't want to go all kCLLocationAccuracyBestForNavigation Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki On Tue, Jul 15, 2014 at 4:58 PM, Joseph Dixon jwdi...@gmail.com wrote: iBeacons are useful as proximity detectors, but not much else. A few months ago I did some extensive testing with the idea that I would use multiple iBeacons to triangulate a user's position. After digging through the data what I realized was the signals from the beacons were far too unpredictable to be of much use for determining location. The user's location was jumping all around the map even after significant filtering. A common proximity scenario is to place beacons at the entrance and then scatter a few more throughout your office in strategic locations. By determining which beacons are visible you should be able to infer if the user is inside the office and get an idea about which area they are closest to. If no beacons are visible (for more than a few seconds) you can reasonably assume the user has left. On Tue, Jul 15, 2014 at 3:40 PM, Eric E. Dolecki edole...@gmail.com wrote: I have an application built and ready for iBeacon support. It's intention is to tell whether someone is in the office or not. I was planning on placing an iBeacon at the entrance to our office - and use that to tell my server who is in or out of the office. For fun. Well, if you walk into the office, it would work, but if you enter the region again, turn around and go back in the office, you're out of sync. I could use a geoFence - would this be a better solution? Is this type of enter/leave functionality beyond what an iBeacon can provide? Or would I need to have multiples to gather direction of movement? Like a minimum of 3 beacons? I'm looking for some strategy that would work best for such a thing. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/jwdixon%40gmail.com This email sent to jwdi...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com