250 Topics
| |
Hello helpers, I'm having a problem with sorting (3rd column) a flat file. flat file looks like this: 20210103|~|3 jan 2021|~|Harold|~|m| 20210121|~|21 jan 2021|~|Elly|~|f| 20210213|~|13 feb 2021|~|Silvy|~|f| 20210330|~|30 mrt 2021|~| George|~|m| Now I want to save it in a new flat file sorted on the **3rd column** Result: 20210121|~|21 jan … | |
##vbScript - A Multi-column Sort With Minimal Coding Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. A previous post dealt with sorting. The code easily handles sorting simple things like lists of words, lines of text - cases where you only had to compare two … | |
Hi, i want to sort divs alphabetically both asc and desc. I am using a dropdown list created by using bootstrap: <div class="btn-group"> <a href="#" data-target="dropdown-menu" class="btn btn-default btn-block dropdown-toggle" data-toggle="dropdown"> Sort By <span class="caret"></span> </a> <ul class="dropdown-menu" style="width: 100%;"> <li><a href="#" class="nameAsc">Name: A to Z</a></li> <li><a href="#" class="nameDes">Name: Z … | |
Hie,I have Merge Sort Program .It's giving correct output but when checked through debugger it gives different values everytime.I also tried doing it manually but I am not getting the actual output. I will not ask now for complete program explanation. I just want to know the value over here.This … | |
// Also attached to this question is the assignment sheet. Need help pls. import java.util.*; import java.awt.*; import java.applet.*; public class Lab15st extends Applet { private int numBars; // number of bars to be sorted private int barHeight[]; // array of bar heights private int sortDelay; // delay between comparison … | |
How to implement bucket sort in C using Linkedlist.. Or any weblinks please share... | |
i should to move the biggest value to the last index in the array then to print the array. when i print it i get things like letters, smiles... what is the wrong in the code? .model small .stack 100h .data array db 3,8,5,3 n equ 4 b db dup … | |
I have to store the scores of people in a text file as an array, and I should be able to add each record on the array. This is the part of the code where the scores are being stored: if group == "a": with open("class scores A.csv", "a+") as … | |
I need to sort some information from an array. I'm trying to find the minimum value out of two numbers, from a csv file, the first part of the information in the file is the names of people, so instead of 0, I put 1 in int(row[1]) import csv print("1 … | |
Let assume that ‘k’ is an integer that indicate and reveals exactly the length of subset that sum to 0. Thus length of subset to pick is determined by ‘k’. If I would like to pick only ‘k’ distinct set of integers from any given set of integers in polynomial … | |
Hi, I hope you can help me out of this because i really dont understand how to fix this code anymore, i tried and tried and it don't work. When i debug this code in Microsoft Visual Express 2010, it says the following erros are: 1>------ Build started: Project: Adreesbook2, … | |
Part 2 of exploring/tasting the Swift language takes a look at dictionaries; process flow controls like loops, if/else and switch/case; functions and sorting. I hope I can follow this up with part 3, a closer look at class operations. | |
The bubble sort is slow and I thought it would be interesting to visualize the progress as it sorts an array of integers. | |
A little experiment with custom sorting the result of a word frequency count using Google's Go language. | |
I have DatagridView on form. My database has three fields. - userId (bigint) - userName (varchar) - userDob (date) Now, on Form I have comboBox, which lists Months (Jan, Feb, March and so on...). I want my program to work like this. If I select any month on ComboBox, birthdays … | |
This is supposed to used quick sort using the header "arrayListType.h using quick sort and get the numbers entered smallest to largest but I'm not sure on how to do it. Can I please get some help? #include <iostream> #include "arrayListType.h" #include <cstdlib> using namespace std; void printList(arrayListType<int>& list); void … | |
Use Google's modern Go language (aka. golang) to convert a denary number (base 10) to a roman numeral. Just a good exercise to explore Go's map, slice, sort and for loop features. Note that in Go the **:=** is shorthand for assigning a type (by inference) and a value to … | |
Here is the code for [B][COLOR="Red"]Insertion Sort, Bubble Sort and Selection Sort[/COLOR][/B] [B]Insertion Sort[/B] [CODE] #include <stdio.h> main() { int i,j,key; int a[5]={5,2,3,4,1}; for(i=1;i<5;i++) { key=a[i]; while(i>0 && a[i-1]>key) { j=a[i]; a[i]=a[i-1]; a[i-1]=j; --i; } } int k; for(k=0;k<5;k++) {printf("%d ", a[k]);} printf("\n"); } [/CODE] [B]Bubble Sort[/B] [CODE] #include <stdio.h> … | |
I have been trying to create a program which the teacher log in to view the scores of a test of a school class. The scores are stored in a text file like this: Charlotte:7 Charlotte:4 Charlotte:3 Chelsea:2 Chelsea:9 Chelsea:5 Jeff:1 Jeff:10 As you can see there are multiple scores … | |
Hello, for a school assignment I was supposed to write an insertion sort algorithm for a doubly linked list. As the feedback system of this particular course is rather weak (actually non-existent) I would like to ask you for your honest opinion about how well this is implemented, what could … | |
I'm new at C++ ..and I dont know what should I do whith my program ... this program's input for exg. is: 5 mary sara kimi lili olive : : and then sorting them .. but my problem is that when I submit my home work they score me "0" … | |
Dear all, I need the code for counting sort algorithm but I try this code but is not working #include <iostream> #include <conio.h> #include <time.h> #include <stdlib.h> //srand and rand functions using namespace std; void add_random_numbers(long arr[], long b); void countingSort( long left, long right, long vector[], int k, long … | |
I want to make this code with random numebr array and time executation? Does anybady nows how can I do? #include <iostream> using namespace std; void print(int a[], int sz) { for (int i = 0; i < sz; i++ ) cout << a[i] << " "; cout << endl; … | |
I want to do one example of Radix sort generating random numbers and timing. Can anybady help me? Here is the radix pseudocode function radixSort(String s) for i in (s.length - 1) -> 0 do stableSort(s[i]) | |
Hello All, I want to write a c++ code to sort a queue with the help of another queue and a non array element. Please help me getting the code. | |
Hey Guys, Was wondering if anyone could help me with this sort function for a vector of struct type. What i'm aiming to do is to make a score board being based on a player's score and print out the scores (along with the name) in descending order. I've looked … | |
Hi, I have a 3-column data (below) from excel file. How can I write a perl code to sort all rows according to the first numeric number of a numeric interval and the word "complement" if they appear before the numeric interval as shown in the expeceted output below? Data: … | |
I'm supposed to create a program to sort a names.dat file. It compiles but nothing is displayed. names.dat Collins, Bill Smith, Bart Michalski, Mel Griffin, Jim Sanchez, Manny Rubin, Sarah Taylor, Tyrone Johnson, Jill Adams, Andrew Moreno, Juan Wolfe, Bill Whitman, Jean Moretti, Bella Wu, Jeff Patel, Renee Harrison, Rose … | |
I am trying to get my head around the functions etc in xslt with xml. I have made a dummy xml file <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="books.xslt"?> <books> <book> <title>Hello Dolly</title> <author>John Thumb</author> <readers> <young_readers>17</young_readers> <older_readers>23</older_readers> <total_readers>40</total_readers> </readers> </book> <book> <title>Goodbye John Thumb</title> <author>Dolly Smith</author> <readers> <young_readers>12</young_readers> <older_readers>3</older_readers> <total_readers>15</total_readers> … | |
#include <cstdlib> #include <ctime> #include <iostream> using namespace std; int findSmallestRemainingElement (int array[], int size, int index); void swap (int array[], int first_index, int second_index); void sort (int array[], int size) { for ( int i = 0; i < size; i++ ) { int index = findSmallestRemainingElement( array, size, … |
The End.