-
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
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
;; structure representing homework points
;; nr: number - the number of the homework
;; points: number - the number of points reached
(define-struct homework (nr points))
;; parse-homework: (list of number pairs) -> (list of homework)
;; The procedure takes a list of number pairs and produces…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Okay so I have started a new language in class. We are learning Scheme and i'm not sure on how to do it. When I say learning a new language, I mean thrown a homework and told to figure it out. A couple of them have got me stumped.
My first problem is:
Write a Scheme function that returns true (the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm very new to Unix, and currently taking a class learning the basics of the system and its commands.
I'm looking for a single command line to list off all of the user home directories in alphabetical order from the /etc/passwd directory. This applies only to the home directories, and not the contents…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Consider a disk file containing 100 records
a. How many comparisons would be required on the average to find a record using sequential search, if the record is known to be in the file?
I figured out that this is 100/2 = 50.
b. If the record has a 68% probability of being in the file, how many comparisons…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
For a school project i need to write or use a online programming editor. It is a part of a bigger project. I thought of a java application, php/html/javascript or flash.
I have a couple of things i could do:
Find a good working application and edit it so it works with the rest of the project
Find…
>>> More