[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2008-08-12T00:33:50-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2737 2008-08-12T00:33:50-05:00 2008-08-12T00:33:50-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17695#p17695 <![CDATA[SORT]]> I WILL LOOK INTO THIS ONE !

THANKS TO ALL

Statistics: Posted by JIMMMMYG — Tue Aug 12, 2008 12:33 am


]]>
2008-08-11T19:11:23-05:00 2008-08-11T19:11:23-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17692#p17692 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]>
FIrst I generate random scores for the 12 students and 32 courses each. I display that matrix first.

Then I display the student records unsorted and then sort the records based on the following conditions.

1. I sort the records in descending order by Score (biggest score first)
2. I then browse the students and if two students have the same score:
___ I compare the 100% counts (PerfectCount field) and swap then as needed
___ if they're equal I compare the Failure count (FailCount field) an swap if they need to. (this means the student with the least failures go first in the list)
____Now if the two students compared both have the same failures the one with the most 100% goes on top.
____If they both have the same 100% counts the one with the least failures goes on top.
____If they both have different 100% count and failures then ultimately the one with the least amount of failures goes on top. (you can look at the SortStudents routine to see how it works (last routine in the code below).

The code to my student classification idea can be found here:
http://www.symbioticsoftware.net/files/students.txt

here's a sample run:

THE STUDENT SCORE MATRIX:

Code:

  96%  77%  54%  96%  75%  60%  72%  81%  58%  72%  94%  94%  52%  64%  51%  54%  60%  60%  92%  95%  59%  71%  73%  52%  89%  88%  73%  75%  77%  62%  63%  63%  95%  91%  84%  57%  87%  84%  90%  56%  84%  75%  80%  52%  91% 100%  80%  83%  53%  71%  75%  63%  77%  65%  72%  92%  71%  54%  87%  65%  70%  86%  54%  87%  99%  54%  67%  51%  71%  90%  73%  83%  80%  73%  75%  94%  88%  64%  81%  96%  67%  51%  57%  93%  89%  83%  62%  53%  82%  77%  62%  66%  64%  84%  51%  93%  81%  79%  84%  67%  97%  95%  80%  75%  98%  70%  61%  92%  98%  61%  66%  52%  58%  73%  86%  86%  63%  56%  52%  93%  75%  61%  84%  77%  72%  52%  99%  98%  80%  78%  76%  55%  80%  95%  63%  85%  63%  97%  91%  95%  62%  91%  86%  98%  94%  75%  60%  95%  75%  97%  54%  92%  57%  94%  98%  64%  56%  87%  67%  59%  77%  86% 100%  82%  97%  59%  82%  80%  66%  56%  64%  96%  61%  67%  72%  82%  57%  54%  81%  96%  68% 100%  92%  72%  65%  98%  98%  92%  56%  66%  99%  82%  99%  51%  83%  66%  70%  66%  74%  64%  57%  73%  81%  54%  93% 100%  78%  65%  51%  74%  74%  90%  61%  76%  73%  93%  63%  57%  52%  81%  77%  73% 100%  93%  84%  56%  91%  72%  74%  94%  73%  64%  67%  83%  65%  65%  82%  70%  80%  63%  65%  95%  60%  56%  77%  68%  76%  94%  70%  97%  72%  90%  68%  52%  94%  58%  59%  60%  76%  70%  56%  99%  63%  61%  87%  58%  68%  74%  83%  53%  93%  60%  61%  56% 100%  54%  66%  80%  93%  82%  71%  89%  62%  66%  78%  74%  81%  76%  57%  75%  60%  83%  63%  71%  77%  52%  65%  88%  91%  93%  97%  57%  79%  51%  63%  54%  62%  77%  88%  84%  54%  86%  95%  71%  74%  89%  97%  82%  76%  62%  73%  92%  52%  84%  67%  71%  53%  65%  59%  85%  97%  94%  79%  54%  69%  77%  88%  84%  57%  53%  67%  94%  80%  70%  59%  92%  66%  74%  59% 100%  71%  87%  61%  59%  92%  77%  76%  54%  75%  53%  55%  96%  59% 100%  79%  52%  77%  63%  67%  96%  60%  65%  64%  98%  80%  88%  98%  87%  80%  56%  89%  58%  88%  55%press a key to view sorted students
THE STUDENT LIST (UNSORTED THEN SORTED:

Code:

UNSORTED STUDENTSStudent Name       Total Avg.  Ps  Fs-------------------------------------Stephane Richard    2431  76%   0   6Paul Anka           2479  77%   3   6Dorothy Wilcox      2248  70%   0   7Mathew Simmons      2343  73%   1   9Alan Parson         2352  74%   0   4Mark Baxton         2332  73%   0   6Lucy Witherspoon    2530  79%   2   1Maria Gandolpho     2451  77%   0   4Peter Norton        2291  72%   0   8Terrence Callahan   2400  75%   1  10Julie Manhattan     2430  76%   1   5Nathaly Wilson      2430  76%   0   7SORTED STUDENTSStudent Name       Total Avg.  Ps  Fs-------------------------------------Lucy Witherspoon    2530  79%   2   1Paul Anka           2479  77%   3   6Maria Gandolpho     2451  77%   0   4Stephane Richard    2431  76%   0   6Julie Manhattan     2430  76%   1   5Nathaly Wilson      2430  76%   0   7Terrence Callahan   2400  75%   1  10Alan Parson         2352  74%   0   4Mathew Simmons      2343  73%   1   9Mark Baxton         2332  73%   0   6Peter Norton        2291  72%   0   8Dorothy Wilcox      2248  70%   0   7

Note to Pete: I tried to do a [ code ] tag to paste the code here instead but got very weird results, missing lines, bad cuttouts of lines. (pasted from a windows editor too) so I included the link above instead.


Hope this helps you Jimmy :)

Statistics: Posted by MystikShadows — Mon Aug 11, 2008 7:11 pm


]]>
2008-08-11T12:51:45-05:00 2008-08-11T12:51:45-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17687#p17687 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]>
You total the courses up put it in the hidden total column and you do any sort on that total column. then you just sort the array based on that last column. using SWAP to swap the rows of data as needed to move the student's scores to the right position in the array based on that total (or average) field.

This way you don't have to worry about the scores of each 32 courses. on a global scale the one with the highest total (or the biggest average) is the one that belongs in the first position, and so on and so forth for the other students . ;). Now that I wrote this, average probably gives a more realistic value to work with...assuming the following scenario:

Suppose one student has 80% in all his/her courses
Suppose another student failed 2 courses but had 100% in all other courses.

Which deserves to go at the top of the list?

Student 1 has a total of 2560
Student 2 has a total of 3100 but failed 2 courses.

Or this scenario.

same student that failed two courses but has 100% everywhere else
Another student that has 90% everywhere. and let's say both these students have the same total of say 3100 which would give them the same average too. Which goes on top in this case? you could keep tract of how who has the highest notes and evaluate that, 32 90% versus 30 100% and see which deserves the top position. Or you could just use the total and average.

Sound like an interesting challenge to me :). I think I'll be busting my brains a bit on that one.

I'll share my results here.

Statistics: Posted by MystikShadows — Mon Aug 11, 2008 12:51 pm


]]>
2008-08-11T10:39:14-05:00 2008-08-11T10:39:14-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17685#p17685 <![CDATA[sort this problem]]> each student has 32 courses (L)
and each student has different grades in each course, of course, buy you want to rank them from 1 to 12 and print it on one page with student's name on the left side vertically - the course accross the top and their rank in each under that.
what kind of sort routine would you use ?????
-- there are no caps in this one
:D

Statistics: Posted by JIMMMMYG — Mon Aug 11, 2008 10:39 am


]]>
2008-08-10T21:18:42-05:00 2008-08-10T21:18:42-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17683#p17683 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]>
I sure hope he finds that CAP LOCK key and quits yelling at us!

Statistics: Posted by burger2227 — Sun Aug 10, 2008 9:18 pm


]]>
2008-08-10T19:52:35-05:00 2008-08-10T19:52:35-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17682#p17682 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]> Statistics: Posted by Nodtveidt — Sun Aug 10, 2008 7:52 pm


]]>
2008-08-10T18:39:14-05:00 2008-08-10T18:39:14-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17680#p17680 <![CDATA[Re: THANKS]]>
.....
I HAVE A THREE DEMINSIONAL SORT ROUTINE WHICH I HAVE USED FOR THE LAST 20 YEARS.....
What is a three-dimensional sort, and what do you use it for?

Regards..... Moneo

Statistics: Posted by moneo — Sun Aug 10, 2008 6:39 pm


]]>
2008-08-09T14:09:34-05:00 2008-08-09T14:09:34-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17670#p17670 <![CDATA[THANKS]]> BUT I WILL
I DO TEND TO PUSH THE LIMITS ON MY PROGRAMS AND THEN WIND UP CUTTING IT DOWN ...SPLITTING IT UP AND "CHAINING" THE PROGRAMS TOGETHER.//
ALSO, IF ANYBODY NEEDS IT , I HAVE A THREE DEMINSIONAL SORT ROUTINE WHICH I HAVE USED FOR THE LAST 20 YEARS. I CREATED IT ONE CHRISTMAS AT THE DINING TABLE..

Statistics: Posted by JIMMMMYG — Sat Aug 09, 2008 2:09 pm


]]>
2008-08-08T20:43:32-05:00 2008-08-08T20:43:32-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17662#p17662 <![CDATA[Re: ??????]]>
What error code is returned for "Out of Data Space"?

Never saw it listed anywhere.
Curiously enough, my Quickbasic manual has error code 7 for both "Out of data space" and "Out of memory."

Regards..... Moneo

Statistics: Posted by moneo — Fri Aug 08, 2008 8:43 pm


]]>
2008-08-08T19:41:31-05:00 2008-08-08T19:41:31-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17661#p17661 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]> http://support.microsoft.com/kb/58023

Statistics: Posted by MystikShadows — Fri Aug 08, 2008 7:41 pm


]]>
2008-08-08T18:27:10-05:00 2008-08-08T18:27:10-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17660#p17660 <![CDATA[??????]]>
Never saw it listed anywhere.

Statistics: Posted by burger2227 — Fri Aug 08, 2008 6:27 pm


]]>
2008-08-08T13:47:05-05:00 2008-08-08T13:47:05-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17653#p17653 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]>
For both the "Out of data space" and the "Out string space", as well as the "Out of memory" errors, the Quickbasic manual recommends:

* Use a smaller file buffer in the OPEN statement's LEN clause.
* Use the $DYNAMIC metacommand at the top of your program.

I hope these suggestions work for you.

Regards..... Moneo

Statistics: Posted by moneo — Fri Aug 08, 2008 1:47 pm


]]>
2008-08-08T09:22:13-05:00 2008-08-08T09:22:13-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17651#p17651 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]>
Perhaps it's time to find yourself QuickBasic which doesn't have this limit. Either that or for the sake of getting the program to run, see where you can streamline your code if at all possible.

Statistics: Posted by MystikShadows — Fri Aug 08, 2008 9:22 am


]]>
2008-08-07T23:55:31-05:00 2008-08-07T23:55:31-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17650#p17650 <![CDATA[OUT OF STRING SPACE andOUT OF DATA SPACE]]>
Error 4 - Out of data, caused by a READ statement trying to read a DATA after the last data was read. One can re-read data by using the RESTORE staement. But, there is no "Out of Data Space" error listed there.

Error 14 - Out of string space, which I think burger77 explained very well. My QuickBASIC 4.5 Help also shows, under Types, the 32,767 byte limit for strings.

Statistics: Posted by Ralph — Thu Aug 07, 2008 11:55 pm


]]>
2008-08-08T01:09:21-05:00 2008-08-07T23:40:13-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17649#p17649 <![CDATA[STRINGs]]>
To reduce memory type problems, etc. try creating some SUB programs. SUBs release the memory used when they are exited. I've never seen an "Out of Data Space" message.

Ted

Statistics: Posted by burger2227 — Thu Aug 07, 2008 11:40 pm


]]>