Post

Replies

Boosts

Views

Activity

Reply to Are there any macOS framework references for C?
You're not going find much of anything on Carbon due to deprecation since os X 10.8 https://developer.apple.com/documentation/coreservices/carbon_core and Xcode 5 https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html#//apple_ref/doc/uid/TP40001067-CH210-BBCFGHBB
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’23
Reply to How to translate data from c language void * pointer to [UInt8 ] in swift code.
Anything that's not declared within the struct is deallocated from the stack when set data returns. typedef struct { uint8_t *memo; uint8_t array[5]; int why[4]; char *books; } Bounce; implemenation of fix. void fix(Bounce *model) { memset(model->array,0x53,5); model->why[0] = 2; model->why[1] = 3; model->why[2] = 2; model->why[3] = 2; model->books = "Hello world"; model->memo = model->array; } import Foundation var bounce = Bounce() fix(&bounce) bounce.books.map({print(String(cString: $0))}) for value in 0..<5 { print(bounce.memo.advanced(by: value).pointee) } let why = bounce.why print(why) Output: Hello world 83 83 83 83 83 (2, 3, 2, 2) Program ended with exit code: 0 With the void* or anonymous type. typedef struct { void *memo; uint8_t array[5]; int why[4]; char *books; } Bounce; for value in 0..<5 { let thing = bounce.memo.assumingMemoryBound(to: UInt8.self).advanced(by: value).pointee print(thing) }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’23
Reply to Xcode 15, how to uncheck "Connect via network" for physical device?
On an AnyConnect VPN setup, disabling Bluetooth, WIFI, and Data has no effect unless you disconnect the VPN. Making this thing exclusive to the network is crazy. What if all this traffic leaves the local network before reaching its internal point-to-point target because of how a given network is configured? USB 3+ and Thunderbolt 2+ are more reliable in the form of a cable connection. If it's not broken, don't change it.
Dec ’23