250 Topics
|
|
I did this code to compare to Delphi code in Delphi forum [URL="http://www.daniweb.com/software-development/pascal-and-delphi/threads/357771"]TListBox and sorting[/URL] which ran in my computer compiled in free Lazarus environment at time 7,235 s for generate and insert to listbox, 13,265 s sorting the listbox. |
|
This program accepts input in the form of a String of names and grades. It picks out the names and picks out the grades and puts them in seperate arrays. Then it needs to output them together sorted by grades and then by names. I can get the Grade Order … |
|
Hey everyone, I am writing a program that needs to take 10 integers and display them, then it needs to sort them in order from lowest to highest and then display them again. I was trying to use selection sort to sort them, but I think I set it up … |
|
Hello! I'm trying to modify opensourced application but due to lack of knowledge, I'm stuck. Explantions are in the comments of the app :-) Thanks in adavance for your support! [CODE]void CBaseGame :: FixSlots( ) { struct Struct1{ list<string> UserList; list<CGameSlot> PlayerSlots; }; list<string>::iterator IT; list<CGameSlot>::iterator TI; for( vector<CGamePlayer *> … |
|
I have a large amount of items stored in my DB (around 3,000 total and growing) and I have a list of them sorted alphabetically that displays on a page. I was interested; however, in having the items display in blocks instead that look something like: [INDENT][B]A[/B] [All items that … |
|
Hi All I have the following XML (which is generated automatically and cannot be modified): [CODE]<ExportQuery> <ELEC01_SOWaitingParts3> <OrderDtl_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></OrderDtl_PartNum> <JobOper_OprSeq><![CDATA[10]]></JobOper_OprSeq> <Part_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></Part_PartNum> <OrderDtl_OrderNum><![CDATA[18432]]></OrderDtl_OrderNum> <OrderHed_OrderNum><![CDATA[18432]]></OrderHed_OrderNum> <JobHead_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></JobHead_PartNum> <JobHead_JobComplete><![CDATA[Yes]]></JobHead_JobComplete> <JobOper_JobNum><![CDATA[018957]]></JobOper_JobNum> <JobOper_OpCode><![CDATA[GB STORE]]></JobOper_OpCode> <JobOper_OpDesc><![CDATA[GET BATCH STORES]]></JobOper_OpDesc> <JobOper_OpComplete><![CDATA[No]]></JobOper_OpComplete> <JobOper_QtyCompleted><![CDATA[0.00]]></JobOper_QtyCompleted> <FalseJobNum><![CDATA[18957]]></FalseJobNum> </ELEC01_SOWaitingParts3> <ELEC01_SOWaitingParts3> … |
|
Hello, I have this code that sorts strings but it does not sort them at all. I've been working on it for 2 hours already. Any help will be appreciated. Thanks in advance :)[code]public void SelectionSort() { for (int i = 0; i < myList.length - 1; i++) { int … |
|
Hello - Looking to find a function that works just like the php function uasort() but have it maintain the relative order of items when equal keys are found. Here's my code now: [CODE] $array = array("item1"=>-1,"item2"=>-1,"item3"=>-1,"item4"=>0,"item5"=>2,"item6"=>2,"item7"=>1); function sortThis($a,$b) { if( $a == -1 || $b == -1 ) { … |
|
I need to use mergesort to sort the data in a file that has the names and ages of 10 different people , first i have to sort the names in ascending ascii order and then i have to sort them by their age but im not sure how to … |
|
[CODE]#include<stdio.h> #include<conio.h> main() { clrscr(); double sales[10]; int index; double largestsale,smallestsale,sum,average; //initializing for(index=0;index<5;index++) sales[index]=0.0; //reading printf("Enter Value:\n"); for(index=0;index<5;index++) scanf("%d",&sales[index]); //printing for(index=0;index<5;index++) if(sales[index]<index) printf("%2d",sales[index]); //sum & average sum=0; for(index=0;index<5;index++){ sum = sum+sales[index];} average = sum/5; printf("\nThe Sum is %d",sum); printf("\nThe Average is %d",average); //largestsale int maxIndex = 0; for(index=1;index<5;index++) if(sales[maxIndex] < … |
|
The past few days I've posted some sorting routines customized to the tasks they were required to solve. Since I have a bunch of different sorting routines already coded, I decided to post them. Please note that some of these sorts are fast, but not a single one is as … |
|
so. . . i guess you could say i'm kinda new here but. . . this site really helps me alot this past few days and i decided to join... i was surfing all over the internet and i can't find what's the problem with my program. this always says … |
|
Hello, I am new to daniweb. I am a student in my first coding class and I am stuck trying to figure out one of my projects. My teacher wants me to have a text box that you can type a number in, then add it to a list box … |
|
I was wondering whats the simplest way to count and sort the elements of each array when using a set like [CODE]char list[40][30];[/CODE] theyre being brought in from a text file that would simply look something like this apples bannanas oranges grapes i would need to count each element, sort … |
|
Hey, So I have an ArrayList that has some people in it. It's like: First Name, Last Name, and Position (At a job). So, I have it make the name complete. so like... Last name and then first name, no space... So, then, I need to sort the ArrayList by … |
|
Hi, I want to sort a TStringList but not by the strings in it, but by the Objects. Here's my code: [CODE]var i : integer; iCount : integer; idxFound : integer; someText : string; s : TStringList; oneWord : string; aux : integer; begin someText := memo_txtfile.text; oneWord := ''; … |
|
I have one table that I need to pull data from to display. there are two fields that a user's id can be attached to. Field1 and Field2, but they are always either or. In addition, I have a couple of extra where clauses in my query. My experience in … |
|
Hey all so im a bit new to python and I need to create a select sort function without any for or whiles but this is all i have so far any help would be greatly appreciated. [CODE]def selection_sort(list): l=list[:] sorted=[] while len(l): lowest=l[0] for x in l: if x<lowest: … |
|
I've been writing a piece of code that will use a brute force approach to find 50 exponential equations that fit 5 points (x,y) that i've entered. The code is fine and works without a glitch.. The problem is when i try to make it keep a record of the … |
|
The below method is for my database assignment, and we are supposed to check if the "username" the user adds is already in the database. Somehow "newRecord.username = sc.nextLine();" this line does not work, the second time through the do-while loop It seems like it just ignores the line or … |
|
Hello, I have implemented different sorting algorithms (bubble sort, merge sort, heap sort, etc...) and want to calculate the running time for each one on different sets of data. I'm using Visual Studiois but am familiar with Dev C++ and Xcode on Mac. I used C++. Is there some special … |
|
I have a file with a list of names. Jane Huston Bob Brown Jack Tracy they should be ordered by last line like this Bob Brown Jane Huston Jack Tracy but my program wont compile and i dont know how to fix it? here is my code #include <iostream> #include … |
|
Hi guys, this is my first post here, and I'd love any feedback you guys can give me. I'm writing a basic program that bubble sorts its ints in an array to ascending order, then resorts some of those specific ints to the element of the position they represent. What … |
|
I am having a hard time understanding subqueries. I am pretty sure that is what I need to accomplish my task, but not sure how to put it together. I have a unique ID field that auto-increments, so that a new entry always gets a higher number assigned to that … |
|
Hi! Having some problems with functions in this one. As ypu can see I'm a tottal beginner. What I'm trying to do here is make a program checking if a word is a palindrome. Using 2 functions, one to check and one to reverse the user input string. My problem … |
|
I a table that I have added the function to be able to sort, it works, but it is coming up with an errors: Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 25 Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 28 Notice: Undefined index: sort in C:\wamp\www\test … |
|
Hello, I'm new to this thread but have referenced to it before many times. I have finally joined thanks to all the great responses I have read in the past. Okay, I recieved an assignment which is as follow... "Declare a dynamic array of Person to store the information of … |
|
I have 6 rows of items in a ListView within 2 columns that are listed like so: [CODE]1 Milk 2 Pepsi 3 Juice 4 Water 5 Coffee 6 Tea[/CODE] I'm trying to make it so when you modify the number in the first column, it will sort the list based … |
|
I am working on a C++ program that wants me to read in 52 unsorted states. All the states have randomly Capitalized letters.The objective is to sort the states in alphabetical order by the last letter of the state. Case sensitivity is the least of my problems but i am … |
The End.