-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi there,
I've got a code snippet here that I can't make working.
NSUInteger i;
//NSMutableArray *textures = [[NSMutableArray alloc] initWithCapacity:kNumTextures];
//NSMutableArray *texturesHighlighted = [[NSMutableArray alloc] initWithCapacity:kNumTextures];
NSMutableArray *textures= [[NSMutableArray…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have two NSArray objects that I would like to be sorted the same. One contains NSString objects, the other custom Attribute objects. Here is what my "key" NSArray looks like:
// The master order
NSArray *stringOrder = [NSArray arrayWithObjects:@"12", @"10", @"2", nil];
The NSArray with custom…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have an NSMutableArray that is populated with objects of strings. For simplicity sake we'll say that the objects are a person and each person object contains information about that person.
Thus I would have an NSMutableArray that is populated with person objects:
person.firstName
person.lastName
person…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
At some point in my Application, I have an NSArray whose contents change. Those contents are shown in a UITableView. I'm trying to find a way to find the diff between the contents of before and after of the NSArray so i can pass the correct indexPaths to insertRowsAtIndexPaths:withRowAnimation: and…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
So, my second question based off of this application I'm teaching myself Objective C with. I have a Data Source class, which for now looks mostly like:
- (id) init
{
if (self = [super init]){
listNames = [[NSArray alloc] initWithObjects: @"Grocery", @"Wedding", @"History class",@"CS Class"…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Forgive me if this is redundant or super basic. I'm coming to Python/Numpy from R and having a hard time flipping things around in my head.
I have a n dimensional array which I want to sort using another n dimensional array of index values. I know I could wrap this in a loop but it seems like there…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
I'm trying to sort a multidimensional array in objective-c i know that i can sort a single dimensional array using the line of code below:
NSArray *sortedArray = [someArray sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
I can't seem to figure out how to sort a 2D array like…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a php form that has a known number of columns (ex. top diameter, bottom diameter, fabric, colour, quantity), but has an unknown number of rows, as users can add rows as they need.
I've discovered how to take each of the fields(columns) and place them into an array of their own.
<input…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
I am playing around with multidimensional array of unequal second dimension size.
Lets assume that I need the following data structure:
[&ptr0]-[0][1][2][3][4][5][6][7][8][9]
[&ptr1]-[0][1][2]
[&ptr2]-[0][1][2][3][4]
int main()
{
int *a[3];
int *b;
int i;
a[0] = (int *)malloc(10…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have an array like this:
$a = array (
0 => array ( 'value' => 'America', ),
1 => array ( 'value' => 'England', ),
2 => array ( 'value' => 'Australia', ),
3 => array ( 'value' => 'America', ),
4 => array ( 'value' => 'England', ),
5 =>…
>>> More