:07 PM, Maxthon Chan wrote:
>
>> If your app is called Hammersmith, you can retain/autorelease it in your
>> [CBLDatabase dealloc] or [CBLCache dealloc]
>
> It’s not my app, it’s a customer’s that uses my library. But the CBL classes
> are part of my library, yes.
>
>
Sent pull request.
https://github.com/couchbase/couchbase-lite-ios/pull/165
On Oct 22, 2013, at 13:14, Jens Alfke wrote:
>
> On Oct 21, 2013, at 8:07 PM, Maxthon Chan wrote:
>
>> If your app is called Hammersmith, you can retain/autorelease it in your
>> [CBLDatabase
Well you need Xcode and maybe the Command Line Tools package.
On Oct 22, 2013, at 16:56, li shunnian wrote:
> Dear list,
>
> After I updated to Mavericks GM, I can not use man command to find the
> manuals of the C api.
> Can anyone tell me how to solve this problem?
>
> Regards,
> Li Shunnia
As I said, either ARC or C++ objects with constructors and destructors requires
compiler to insert code into the beginning and ending of the current scope (For
C++, it is calls to constructors and destructors; for Objective-C ARC, it is
ARC release/autorelease function calls.). As a rule of thum
gt;>> On Oct 22, 2013, at 2:19 AM, Maxthon Chan wrote:
>>>
>>> Well you need Xcode and maybe the Command Line Tools package.
>>
>> Yes, when I installed to Mavericks GM and put on the latest Xcode, a lot of
>> my man pages for C APIs went away. There
Despite ARC banned retain/release/autorelease functions, there are still
alternatives there in the form of C functions:
From CoreFoundation :
CFRetain() = retain
CFRelease() = release
CGBridgingRelease() = autorelease
From LLVM’s requirements to runtime for ARC to work, as prototyped in GNUstep’
I forgot to zero out the variable after cache is handed to the current
autorelease pool (after objc_autorelease(objc_retain(_cache));) so it did not
work.
On Oct 23, 2013, at 16:07, Andreas Grosam wrote:
> You may try the following, which is probably a hack:
>
> In the dealloc method of the D
There are still situations that you may want a little touch-up so from time to
time a manual call to these is still needed.
On Oct 24, 2013, at 2:01, Greg Parker wrote:
> On Oct 22, 2013, at 7:33 PM, Maxthon Chan wrote:
>> Despite ARC banned retain/release/autorelease functions,
). Calls to those functions are what I
have to do to make the decoder work.
On Oct 24, 2013, at 13:22, Chris Hanson wrote:
> What Greg says on this topic is authoritative.
>
> -- Chris
>
> Sent from my iPad
>
>> On Oct 23, 2013, at 4:35 PM, Maxthon Chan wrote
18:04, Greg Parker wrote:
> On Oct 23, 2013, at 10:57 PM, Maxthon Chan wrote:
>> Situation: I am writing a custom decoder that decodes objects from
>> JSON-based archives. My objects gets released prematurely, hence a manual
>> retain is asked for.
>>
>> I need t
That does not work with GNUstep build system. With that system, I can only
control ARC status on a per-target basis, and I cannot guarantee the
non-existence of CoreFoundation on a GNUstep system.
On Oct 24, 2013, at 18:23, Greg Parker wrote:
> On Oct 24, 2013, at 3:10 AM, Maxthon Chan wr
Quite difficult as they emulated platform defines well, and I cannot reliably
detect either GNUSTEP or __LINUX__ flags.
On Oct 24, 2013, at 18:30, Graham Cox wrote:
>
> On 24/10/2013, at 12:10 PM, Maxthon Chan wrote:
>
>> Neither is appropriate in my situation
>
>
&
And by the way, why not? It is well documented in LLVM documentations that
those functions are required to be identical to the corresponding methods.
Are you refusing your own dogfood, Apple?
On Oct 24, 2013, at 18:23, Greg Parker wrote:
> On Oct 24, 2013, at 3:10 AM, Maxthon Chan wr
You can use uname(3) (on sone other system it is listed as uname(2)) - that is
the most classic UNIX way of telling a system from another.
On Oct 25, 2013, at 11:49, Gerriet M. Denkmann wrote:
> The documentation tells me that NSProcessInfo operatingSystemVersionString
> "is human readable, lo
that is publicly available was 3.3)
On Oct 25, 2013, at 12:21, Gerriet M. Denkmann wrote:
>
> On 25 Oct 2013, at 10:53, Maxthon Chan wrote:
>
>> You can use uname(3) (on sone other system it is listed as uname(2)) - that
>> is the most classic UNIX way of telling a system fr
Well I prefer uname() as it is 1) POSIX standard, cross-platform method and 2)
more fine grained as it tells minor versions apart. (e.g. I can tell Mavericks
DP4 apart from Mavericks DP7 from Mavericks GM from App Store release of
Mavericks from Mavericks 10.9.1)
On Oct 25, 2013, at 13:29, Greg
24, 2013, at 10:36 PM, Maxthon Chan wrote:
>> Well I prefer uname() as it is 1) POSIX standard, cross-platform method
>
> If you're already working around an OS bug then it should be acceptable to
> use OS-specific means to do so.
>
>
>> 2) more fine grained as
Your program sounds like a functional duplicate of TrueCrypt and you can look
at their source code to find out how.
Dist Utility seem like a wrapper of diskutil and hdiutil to me.
On Nov 2, 2013, at 22:07, Luther Baker wrote:
> I'd like to create a UI around mounting and dismounting Volumes,
>
What I stumbled upon is that you should use vector images in PDF format and the
system will scale it for you.
On Nov 10, 2013, at 16:57, Michael Starke
wrote:
> I did stumble upon the deprecation too, but now am unable to find it again.
> What I do rememeber though is, that NSSegmentStyleTextu
Well if that is the case, the SVG-to-NSImage (UIImage) code comes to use - just
store always-being-one-pixel lines in SVG as 0-width paths.
On Nov 12, 2013, at 10:22, Seth Willits wrote:
> On Nov 11, 2013, at 4:44 PM, Maxthon Chan wrote:
>
>> What I stumbled upon is that yo
Alternatively, syscall readlink(2) and some C hack may come to help.
On Nov 14, 2013, at 11:27, Rick Mann wrote:
> In my iOS app, I create a directory in the user’s Documents directory, and
> then later iterate the contents of that directory. The problem is that on
> iOS, that directory has a
You can carry a custom font in your application bundle. That will work for sure.
On Nov 21, 2013, at 13:06, Gerriet M. Denkmann wrote:
> The Thonburi font (default font for Thai) has some issues (since 10.9 / iOS
> 7).
> (E.g. writing ผฺ that is THAI CHARACTER PHO PHUNG + THAI CHARACTER PHINTHU
You can launch a text message composing window on iOS with predefined contents,
however the user will be able to edit the contents before sending, and general
text messaging rules apply, and it may be sent as iMessage when appropriate.
On OS X, you are out of luck.
Sent from my iPad
> On 2013年
Well you just need to detect the device and the numbers are constant:
Screen information:
iPhone 2G/3G/3GS, iPod touch 1G/2G/3G: 320x480px, 163dpi
iPad mini 1G: 1024x768px, 163dpi
iPhone 4/4S, iPod touch 4G: 640x960px, 326dpi
iPhone 5/5C/5S, iPod touch 5G: 640x1136px, 326dpi
iPad mini 2G: 2048x1
the mini came out, there
> wasn't anything then and I don't want to do one of the version or device name
> hacks. Is there yet an API point for this? "
>
> If there isn't a proper API point for it, then I'm not doing it.
>
> On 26 Nov, 2013, at
There is no reason for Apple to provide such an clearly redundant API point.
Developers can somehow predict the new devices’ identifiers and the sizes are
largely correctly guessed so a quick table look-up will work very well.
On Nov 26, 2013, at 21:38, Igor Elland wrote:
>> If there isn't a p
sed on what you think identifiers are or are going to be and to stick to
> the API points there are. They also ask people file bug reports with use
> cases about why one might need the physical device screen size, which I have
> done.
>
> On 26 Nov, 2013, at 9:41 pm, Maxthon
So I think here is the equation:
If you need precise device size, you have to rely on device model, for both
built-in and external screens.
To make that mapping possible, you need some method of reading the device model
and search a database.
Reading model number is easy for main device screen a
sy way around them, that normally leads to the most maintainable,
> sustainable, code.
>
> On 26 Nov, 2013, at 10:16 pm, Maxthon Chan wrote:
>
>> Then why the hell in the five years of public iOS API, Apple always decided
>> against a public API point for that?
>>
I’d like to say just get rid of the old iPad-sized control design and embrace
iPhone-sized controls with iPad-styled layout - they will look good on both
iPad mini and iPhone since they have the same pixel (point) density and when
regular iPads are used, despite being sub-optimal, the UX will no
I’d usually go with this:
MSSTR(NSLocalizedString(@“ui.approxTimeFormat”, nil),
MSLocalizedTimeInterval(timeInterval))
In en_US it expands:
ui.approxTimeFormat = “Approx. %@“
In zh_CN:
ui.approxTimeFormat = “大约 %@后“
Note: MSSTR(...) is a macro expands to [NSString stringWithFormat:__VA_ARGS_
If you are concerned with security, use SHA-512 (member of SHA-2 family, faster
than SHA-1 on 64-bit systems) or Keccak (SHA-3, more secure) will be the best
way as they are both proved secure (while SHA-1 is proved INSECURE) and if you
want efficiency the XOR thing should suite well as it can b
If you are indexing files, maybe a shorter hash (CRC32?), a sparse database
file and mmap(2) can be your friend.
You can bucket files by its CRC32 (very fast) values (hence the sparse database
file that needed to be mmap(2)’d and when CRC32 collides (somewhat likely) then
SHA-512 (Slower, but l
They simulated iOS 7 looks using iOS 6 SDK. It is not that difficult by using
appearance proxy.
On Dec 12, 2013, at 13:26, Rick Mann wrote:
> Why does the Google Hangouts app on iPad, on iOS 7, have a nice-looking iOS-6
> style keyboard? Other UI in the app looks like iOS 7 UI.
>
> Hangouts:
:44, Rick Mann wrote:
> I'm running iOS 7. You're saying they styled their own keyboard to look like
> the iOS 6 keyboard? It's a pretty good imitation.
>
> On Dec 11, 2013, at 21:29 , Maxthon Chan wrote:
>
>> They simulated iOS 7 looks using iOS 6 SDK. I
> In general, not everything works perfectly in iOS6 compatibility mode - so be
> sure and do some testing ... but for instance, it allows my existing app
> released May 2013 to continue to function and run on iOS7 devices without
> requiring an updated binary from me.
>
>
&g
eral, not everything works perfectly in iOS6 compatibility mode - so
>> be sure and do some testing ... but for instance, it allows my existing app
>> released May 2013 to continue to function and run on iOS7 devices without
>> requiring an updated binary from me.
>>
>&
different implementations to support different server
interfaces, either Apache FastCGI or ohttpd bundle interface.
On Dec 12, 2013, at 15:20, Greg Parker wrote:
> On Dec 11, 2013, at 10:46 PM, Maxthon Chan wrote:
>> Bad example - you should use the example between NeXTSTEP/Mach and OS X,
>
Seem to me that Xcode 4.6.3 and iOS 6 SDK is still working, from my friends.
On Dec 12, 2013, at 15:25, Maxthon Chan wrote:
> Well on OS X Mavericks I have
> /System/Library/Frameworks/Foundation.framework/Version/C/Foundation - and I
> can assume tat versions A are from NeXTSTEP
If you run a stock iOS 6 app on iOS 7 you get most of the UI in iOS 6 style. As
what I said, UIAlertView is not in your app but SpringBoard.app so that will
still get the iOS 7 look, for SpringBoard.app is linked against iOS 7 SDK.
If you are styling iOS 6 app in the fashion of iOS 7 app you can
/copy/paste bubble is probably in backboardd.
On Dec 13, 2013, at 13:14, Rick Mann wrote:
>
> On Dec 12, 2013, at 21:11 , Maxthon Chan wrote:
>
>> If you run a stock iOS 6 app on iOS 7 you get most of the UI in iOS 6 style.
>> As what I said, UIAlertView is not in your app b
Yes. This method is there since 10.6 so you can safely call it. using latest
header or category on it.
On Dec 23, 2013, at 1:49, Seth Willits wrote:
> On Dec 22, 2013, at 9:31 AM, Trygve Inda wrote:
>
>> Available in OS X v10.6 and later.
>>
>> This seems to be an error in the docs as the me
No.
Either they are like iPhone 3G or iPad 1 which has been thrown off the iOS 6
train on the first place, or they are like iPhone 4 and iPad 2 get carried over
to iOS 7.
On Feb 23, 2014, at 10:58, Rick Mann wrote:
> There's an update to iOS 6.1 for iPod Touch 4th gen and iPhone 3GS, but none
That NSDecimalNumber is essentially the 128-bit quadruple-percision float
number, in an non-IEEE-754 fashion.
You can still use OpenSSL, either ignore the deprecation or compile and carry
your own copy. Apple deprecated it because OpenSSL API isn’t stable enough.
Alternatively, you can use othe
You can emulate this behaviour somehow by not implementing the methods that is
abstract, and prevent instantiation by introspecting and throwing exceptions in
-init;. Definitely non-trivial but works.
On Mar 19, 2014, at 23:43, William Squires wrote:
>
> On Mar 18, 2014, at 9:29 PM, Luther Ba
No, you can’t. There is no way to accomplish that.
If that is event-based callbacks, try use delegation and/or target-action.
On Apr 7, 2014, at 18:00, jonat...@mugginsoft.com wrote:
> I have a function like macro:
>
> #define DBDispatchMonoEvent(KLASS, NAME) \
> do { \
>[DBManagedEvent dis
If in doubt, use protocols.
@protocol MyProtocol
@property NSString *data1;
// …
@end
Then reference the objects as id objects (or
NSOperation)
On Apr 7, 2014, at 22:17, Trygve Inda wrote:
> Hi have three different NSOperation subclasses:
>
> MyOperationA : NSOperation
> MyOperationB : NS
Concerning if a file is fragmented is sort of useless, I think. Modern
filesystem APIs does not even expose details of that, and the only way I now
how to find out about that, is to roll your own HFS+ driver (or whatever
filesystem you are concerning) and access raw bock devices (e.g. /dev/disk0
You can avoidd this by consolidating all your resource files into one big
archive file that is expanded in-memory into NSData files. I still vaguely
remember a library that parses tar file into a dictionary of NSData objects.
You can use that library to consolidate all your resources into one si
I’d recommend cramfs as it is a real filesystem that is optimised to be
expanded in-memory.
On Apr 9, 2014, at 14:42, Charles Srstka wrote:
> On Apr 9, 2014, at 12:32 AM, John Joyce
> wrote:
>
>> Sure. Core Data would work just as well as binary blobs.
>> Base64 would work in plists / xml /
AM, Maxthon Chan wrote:
>
>> I’d recommend cramfs as it is a real filesystem that is optimised to be
>> expanded in-memory.
>
> Not complicated enough. I'd recommend encrypting the whole thing with an
> AES-256 key which is encrypted using elliptical-curve cryptogra
cramps features decompression in-memory in place and to avoid copying data you
can put uncompressed TIFF in it. cramfs decompresses into NSData objects
in-place and can be taken up directly by NSImage/UIImage/CGImage/CIImage
object. cramfs variant that is based on zlib makes that image a equival
ably hard to get an answer to this, so I may be talking through my
> hat:
>
> Does this involve linking libcramfs.a into the binary you distribute? Have
> you published the source of your app?
>
> — F
>
>
> On 10 Apr 2014, at 2:16 AM, Michael Watson wrote:
>
You can add a category on UIViewController, do some detection and swizzle
-[UIViewController viewWillAppear:] method.
On Apr 14, 2014, at 5:55, Luther Baker wrote:
> Hello all,
>
> I've run into an issue a few times and I'd like to see if someone has a
> good design suggestion to address my pr
Immutables copied are just retained and returned, and mutableCopied are COW.
Mutables copied generates COW.
That would be the fastest way implementing that.
* COW = copy on write
On Apr 27, 2014, at 17:06, John McCall wrote:
> On Apr 27, 2014, at 2:00 AM, Dave wrote:
>> A long time back, I r
I am not exactly familiar with using RSA but as long as the format is followed
I believe whatever mechanism here is okay. Also if I didn’t made it wrong DER
certificates are text files. Try to dump the NSData and try your Android device
if it can directly recognise it.
On May 13, 2014, at 22:20
, 2014, at 8:55 AM, Maxthon Chan wrote:
>
>> I am not exactly familiar with using RSA but as long as the format is
>> followed I believe whatever mechanism here is okay.
>
> This is actually kind of problematic. There are a number of formats for
> encoding public keys,
:
>
> On May 13, 2014, at 9:33 AM, Maxthon Chan wrote:
>
>> Whatever that is there is, for 100% sure, some form of standardised format
>> that iOS, Android and your Java server will be able to deal with with higher
>> level API.
>
> *hollow laugh*
>
> T
Or if you don;t mind GNU, you have GNUTLS package that is just as good. GPG can
be dissected and used if you understand how licensing works there.
On May 14, 2014, at 0:56, Jens Alfke wrote:
>
> On May 13, 2014, at 9:33 AM, Maxthon Chan wrote:
>
>> Whatever that is there is
You are not allowed to run unsigned code from within the app sandbox.
There are some way to circumvent this, but it will require you to call the
compiler as a library. Look into lib clang any you will find out how to link
clang into your app, and compile within your own program code.
On Jun 17,
It is not the problem that they are not signed, but the problem that the
fork(2) syscall is prevented from working in sandbox. Using the compiler as a
library eliminated all the fork(2) calls.
On Jun 17, 2014, at 9:33, SevenBits wrote:
> On Jun 16, 2014, at 9:25 PM, Maxthon Chan wr
Personal suggestion, convert colors to strings (you can use any format, but I
prefer #RRGGBB., drop the . for opaque color, which is compact and
easily understood by humans) and images to PNG data (lossless), then archive.
On Jun 17, 2014, at 17:30, Greg Weston wrote:
> Sean McBride wo
One easy-to-implement method: colour cube.
Define a colour using its RGB values as a 3-tuple (r, g, b) and standard
colours (ri, gi, bi) (where i = 0..n).The square distance between the given
colour and a standard colour is (ri-r)^2+(gi-g)^2+(bi-b)^2. You can calculate
square distances between
Square rooting is slow, and not calculating square root do not throw off
comparison.
On Jun 17, 2014, at 21:14, Mills, Steve wrote:
> On Jun 17, 2014, at 06:43:54, Maxthon Chan wrote:
>
>> One easy-to-implement method: colour cube.
>>
>> Define a colour using its RG
I know, it is just sqared Euclidean distance is simplest to calculate. Sure you
can, for example, add coefficients to the formula, to adjust.
On Jun 17, 2014, at 21:22, Torsten Curdt wrote:
> RGB is not perceptually uniform, hence the Euclidean distance is not quite
> right.
> Wikipedia and St
Alternatively I have an idea based on HSB colours: difference in hue in radians
raised to 4th power (or 6th) plus squared Euclidean distance of saturation and
brightness.
On Jun 17, 2014, at 21:22, Torsten Curdt wrote:
> RGB is not perceptually uniform, hence the Euclidean distance is not qui
nks everyone. I had thought there might be a pre-existing API that would
> do this (I was half expecting to find a method defined for the NSColorList
> class...), but I will implement the euclidean distance test myself...
> Cheers
> Jonny.
>
> On 17 Jun 2014, at 12:43, Maxthon Chan wro
101 - 167 of 167 matches
Mail list logo