Basically I have an array of jokers for a card game. The number of jokers in this array can be any number really. What I need to do is loop through every possible combination of those jokers being any of the other 52 cards. So something like this needs to happen:Jokers array (A, B, C)1-52 representing each of the 52 possible cards.Results for looping:A1, B1, C1A1, B1, C2...A1, B1, C52A1, B2, C1A1, B1, C2...A1, B2, C52...A1, B52, C52A2, B1, C1...A52, B52, C52So this scenario would be 140,608 possible combinations: 52 * 52 * 52, since there are 3 jokers.How would I write this in obj c?
Post
Replies
Boosts
Views
Activity
Can anyone help me determine what to do next with the metadata.imageProvider? I'm trying to display a preview of my link but there is nothing anywhere on the web of how to do this in obj c.// vars
LPMetadataProvider *metadataProvider = [LPMetadataProvider new];
[metadataProvider startFetchingMetadataForURL:[NSURL URLWithString:@"http://www.apple.com/ipad"] completionHandler:^(LPLinkMetadata *metadata, NSError *error){
// check
if(!error){
NSLog(@"metadata: %@", metadata.title);
NSLog(@"metadata: %@", metadata.imageProvider);
NSLog(@"metadata: %@", metadata.iconProvider);
// get ui
dispatch_async(dispatch_get_main_queue(), ^{
//
});
}
}];
I have an array [3, 5, 6, 7, 11, 12] .I want to count, in obj c, the maximum number of consecutive numbers. In the case above it would be 3 becase of 5-7. The array is already sorted by integer values.
I have two paths on two separate layers/views that intersect at only one point. I need to find the point of intersection. I've searched and can't seem to find how this is possibe.The light grey vertical line intersection point with the blue line graph. Both paths are UIBezierPaths. Is there a method to get a array of insection points? Which in my case would return one result?