163 Topics
|
|
I have a Sudoku puzzle and I need to make sure that each row and column have each number 1 through 9. What is the easiest way of doing this? The code snippet that I have so far is below. public static boolean rowsAreValid(int[][] array){ for(int i = 0; i … |
|
Hi friends., Actually I use datagrid to show my result from XML file.I load my data from XML file easily.But i need Sorting method for that and i don`t know how to solve it Please give me solution for that My code is [CODE] Imports System.Data Imports System.Xml Imports System.IO.StringReader … |
|
I have a problem with this code : [CODE] #include<iostream> using namespace std; void qsort(int A[], int len) { if(len>=2){ int l=0; int u=len-1; int pivot=A[rand()%len]; while(l<u) { while(A[l]<pivot)l++; while(A[u]>pivot)u--; swap(A[l], A[u]); } qsort(A,l); qsort(&A[l+1],len-l-1); } else{return;} } void swap(int a, int b) { int temp; temp=a; a=b; b=temp; } … |
|
need to make a function that sorts integers from smallest to largest without using the sort function in python python must open a file with integers one per line store the data in a list then print the unsorted list then bubble sort code sorts the list from smallest to … |
|
I got an assignment to create a program to sort 10 students' data by grade (and if they have the same grade sort by name) using selection sort only(can't use any other method) in an ascending order. My problem is I can sort their grades using selection just fine but … |
|
How print this series in while loop square root 1 2 4 8 16 32 64 128.......... and cube root 2 8 24 72........ |
|
I have to sort a large array of numbers wherein the numbers are random and range from 1 to 9,99,999...till the time the length of array is less than 2,00,000, all sorts work fine (i tried selection, insertion and quick sort)...but when the length of array is increased to 3,00,000 … |
|
I am trying to sort a record according to their respective number like this: [CODE] 5 reyes d r 1 2 3 3 delos d k 4 5 6 9 go t r 7 4 5 1 po w w 2 2 2 2 bun b m 3 3 3 … |
|
So Im trying to make a boggle program. It loads a text file for the word list. So my question is, How could I allow the user to specify a word and then have the program check if that word is on the game board. Heres my code so far: … |
|
Hey i have a program that i need to write where a user has to enter 3 names and then my program has to spit them back in alphabetical order. i know how to display the answers i just dont know how to code it to get the answer :/ … |
|
Hello! I just made an program, but now i have problem with sorting output in the asc. order (int datum) thats date in our language :) [CODE] #include <iostream.h> #include <stdlib.h> struct datum { char dan [32]; char mesec [13]; char leto [5]; void vnosDatum(); void izpisDatum(); }; void datum::vnosDatum() … |
|
Can someone show me what bubble-sorting an int[] of { 5, 4, 3, 2, 1 } looks like? I have to place it inside [CODE]public class SortIntArray { // this method needs your code to be added to work public static void sort(int[] list) {[/CODE] with no calls to any … |
|
|
I would like to start this post off with, I am not looking for someone to do my homework for me. If I was looking for someone to "do it for me", I would go to one of the sites where you can pay someone to do your work for … |
i am trying to put this together so it opens a file sorts the data saves a file and appends a file i have got my self so confused. can any one help???? this is the code Ive got so far. [code]import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import … |
|
So, it sorts the books by price just fine, but I cannot get it to sort the books by title. I am most likely over thinking this, but I've spent a couple hours trying to figure it out. I've looked online and couldn't find the answer. I'm guessing the problem … |
|
i am looking for some advice on what is the best approach to get this done :) my datababase holds a table categories with the columns [CODE]|category_id|category_name|category_parent_id|[/CODE] i am showing my users a html sortable table with the following columns |category_id|category_name|category_parent_name| so what i want, is to do a ORDERBY … |
|
I'm having trouble sorting my column tables. When a title of a column is clicked, it is sorted alphabetically or by number smallest to biggest. I'm also having trouble formatting the date (Born and Died dates). Currently it looks like this YYYY-MM-DD. I need it to look like this MM-DD-YYYY. … |
|
Please help me find the error with my code. Whenever I try to run the program, it returns a Segmentation Fault message. I've been trying to find and play with the codes but I'm really stuck.. Please help me.. Here's my code: [CODE] .section .data format: .asciz "%d\n" values: .int … |
|
hi, I worked around to modifying regular expression below but i could't get what I need. I google it, many things found but not for what i want. [CODE] Dim valid AS Boolean = Regex.IsMatch(TextBox1.Text, "^(,?\d+){0,20}$") [/CODE] Allow numbers exactly like 32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744 in TextBox1. Perfect. NOW i want 20 numbers … |
|
hi , i want to sort my two merged iterable with heapq. everything is good but in result which starts with Turkish character locate end of all result. exm: Ö,Ş,İ ... locate end of result how can i solve this problem? |
|
Yay guys, it's me again. I am using the code from here: [url]http://www.daniweb.com/software-development/vbnet/code/370426[/url] to sort my listview items. But I want something more 'dynamic': when I click on a header column, I want that it changes the sorting based on the column that has been clicked. here is my code: … |
|
Hello all, I have a DataGridView that is being populated via SQL with one table and is being filtered by Stock Code. I need to sort the view of one Stock Code by Nutrient names, but the sequence number is in anther SQL table. it would be easy if i … |
|
Hello there, My teacher in programming require to make a phone book style using C language and I almost done this project and I trying to sort up some minor problems. Would somebody our there help me? (please try to run this program by your own to see what I … |
|
[CODE] public i As Integer Dim num(18) As Integer Private Sub cmdEntry_Click() For i = 0 To 18 Step 1 num(i) = InputBox("Enter a number:", "Array", 0) Next i grd.TextMatrix(0, 0) = "Array" For i = 0 To 18 Step 1 grd.TextMatrix(grd.Rows - 1, 0) = num(i) grd.Rows = grd.Rows … |
|
I was writing a program that involves the console inputting integers and strings. For my project i prompt the user to enter the number of strings he would like. Then i prompt the user to enter the strings so i could order them alphabetically. I am supposed to use any … |
|
Can anyone help me with external direct merge sorting? Here is my code [code=cpp] #include<iostream> #include<conio.h> #include<stdio.h> using namespace std; int GetKey(char infoLine[30]) //Getting sorting key { char temps[30]; strcpy(temps,infoLine); return atoi(strtok(temps," ")); //returns first number in a line } void DirectMerge(char fileName[20]) { FILE* FTS; //file wich will be … |
|
hey, i'm supposed to prompt a user to enter 6 sets of numbers, find the difference of each set based on which number is greater(so that no negative number will be seen, enter the difference into the array, rearrange the array in ascending order and then print the array. the … |
|
Hi, I'm a beginner with Java and I need help with an assignment: Write a program that will help the Toronto Blue Jay's scouts decide which players they should draft next year. For each player the scouts have been watching, a record has been prepared showing the player's name, age, … |
|
In my current project (homework), I am storing a pair of values in a map. The ID is an integer, and the value is a string (name of a movie) and an integer (rating of the movie on a 1-5 scale). I need to get the elements into the map … |
|
hi there! i am using a radgridview(a datagrid in telerik). can you give me a code that sorts the contents of the datagrid? there is an ascending/descending button wherein users can choose how they want the data to be sorted. there is also a combobox that contains the column names … |
The End.