163 Topics

Member Avatar for
Member Avatar for musikluver4

[code] import java.io.*; public class SortDoubleArray { public static void main(String[] args) throws IOException { double[] doubleValue = new double[10]; Input(doubleValue); ascendingSort(doubleValue, doubleValue.length); descendingSort(doubleValue, doubleValue.length); } public static void Input(double[] array) throws IOException { BufferedReader dataIn = new BufferedReader (new InputStreamReader(System.in)); String[] numbers = {"first", "second", "third", "fourth", "fifth", "sixth", …

Member Avatar for litchi
0
218
Member Avatar for XerX

Hello. I am asking for help. I have 2 input files containing sorted integers. These 2 have to be concatenated into a third file and now all the integers must be sorted. (Example: file1 contains 1 5 8, file2 - 2 3 6 and file3 must contain 1 2 3 …

Member Avatar for WaltP
0
151
Member Avatar for Mercian

Hello all, I am currently teaching myself Python 3 and came across a project at work that would be ideal for this. The department in which I work is an IT support desk with a number of us taking calls and providing support to end-users. There is a field in …

0
84
Member Avatar for rhoit

I was trying to Compare the 5 Sorting Algorithms using 4 test cases. [U]Sorting Algorithms[/U] [LIST=1] [*]Selection Sort [*]Insertion Sort [*]Bubble Sort [*]Quick Sort [*]Merge Sort [/LIST] [U]Test cases[/U] [LIST=1] [*][URL="http://the.nube.googlepages.com/Sort.Analysisplot1.svg"]Random Data [/URL](completed) [*]Reverse Sorted Data (completed) [*]Almost Sorted Data (can't generate Data) [*]Highly Repetitive Data (can't generate Data) [/LIST] …

Member Avatar for rhoit
1
862
Member Avatar for player_d

hey, i have a table with 10 rows: id | name | age | class. i need to make the headlines clickable for sorting . ex: if i press the "id" column then it will sort the rows descending and ascending. i need it to be most simple. it is …

0
58
Member Avatar for Narue

Consider the following program and input file: [code] #include <algorithm> #include <cstdlib> #include <ctime> #include <functional> #include <fstream> #include <iostream> #include <iterator> #include <string> #include <vector> #include "natural_compare.h" struct natural_less: std::binary_function<std::string, std::string, bool> { bool operator()(const std::string& a, const std::string& b) { return natural_compare(a, b) < 0; } }; std::vector<std::string> …

Member Avatar for dusktreader
7
2K
Member Avatar for yila

two static arrays size 10 need to be copied to an empty target array size 20. like this: you copy from the first array the nums till arr1[i] = 0 then you switch to the second array and copy to the nums till arr2[i] = 0. then you switch back, …

Member Avatar for yila
0
158
Member Avatar for Reborn121

Hi everyone...I am building a program to input students names(first and last) and also GPA. I have everything working but the sort by last name. Everything works fine, even the GPA sort but the last name sort will not. Please help. Below is the function in my program i am …

Member Avatar for hag++
0
136
Member Avatar for salibaray

Hi there, I'am developing a snippet for a website widget that will read/fetch data from an XML file, sort it in array's and then show it back to the user - formated as a sentence. [b]Example:[/b] [b]XML sample:[/b] [code=text] <row id="1"> <username>GGR1024</username> <name>Raymond</name> <surname>Saliba</surname> <game>Lotto</game> <won>5000</won> </row> <row id="2"> <username>GGR1111</username> …

Member Avatar for salibaray
0
177
Member Avatar for er.daljeetsingh

i have a datagridview with checkboxes in my window form and i want to sort my result with textbox without losting checkbox checked value. i place code in textbox_textchange() event. first i fill datatable with label click() [code] Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label8.Click …

0
112
Member Avatar for P00dle

Hi all, and thanks for your help, in advance. I 'm stiing here with 2 choices, and I need help deciding which one to take. I want to take certain factors into account(i.e. efficiency, speed) I have values that I want to place into a SortedMap. I can do this …

0
138
Member Avatar for smco9

How do I sort an array of struct? For example: struct data { string city; string state; int zip; }; data listing[];

Member Avatar for VernonDozier
0
95
Member Avatar for ddanbe

OK Quicksort IS fast. But what if you just wanna sort 30 items? Then Quicksort becomes a bit of overkill. So what most people then use is the one and only popular "bubblesort", also called "standard exchange sort". Let me present you here with my implementation of another sort(among many …

Member Avatar for ddanbe
1
525

The End.