Member Avatar
Here is the code for Insertion Sort, Bubble Sort and Selection Sort Insertion Sort 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"); } Bubble Sort include <stdio.h> main() { int …
by Anil2447 in Software Development ()
Member Avatar
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" …
by rayhaneh in Software Development ()
Member Avatar
I'm new to mobile development. I'm using html5,php,cordova,phonegap for the development of mobile application. I have done everything which i need.But i need to populate the dropdowns dynamically based on the previous dropdown selection. i.e., Based on the state the cities to be populated and based on the cities the …
by Sushmaja in Mobile Development ()
Member Avatar
could anyone tell me how to dynamically select an item in a listview?? i tried and both of them don't work..please help me.
by cool_zephyr 7 in Mobile Development ()
Member Avatar
i need to create 2 selection; 1st selection has fix option and the second selection will be base on the selected selection 1 selection 1 option 1 = number option 2 = letter option 3 = char number option 1 = 1 option 2 = 2 option 3 = 3 …
by momonq1990 in Web Development ()
Member Avatar
I'm supposed to create a program to sort a names.dat file. It compiles but nothing is displayed.
by phony in Software Development ()
Member Avatar
When selecting from DataGridView as program line below: Diameter = DesignationsDataGridView.Rows(e.RowIndex).Cells(0).Value I get following exception message box:- System.ArgumentOutOfRangeException was unhandled Message="Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" If I select 'continue' from message box then I return to …
by Centorpe in Software Development ()
Member Avatar
We are struggling with color identification in a selection filter for a digital image website. I want to have the ability to let the user pick a color value in a variety of perspectives, i.e., pantone, hex, RGB, CMYK, etc. and also to select the closeness of the match. Then …
by mskat02 in Software Development ()
Member Avatar
Hi there, I am interested in phone selection by using if..else statement. so after viewing the phone specification we can select the phone and purchase that. so do you have python sample codes for that? a rough idea is enough. Thank you. and python is really interesting.
by alagez in Software Development ()
Member Avatar
Hello good day. Thank you for trying to help. My problem is as follows. A few columns in my table, use a JComboBox as the editor for their cells. Each cell, in a row (via JComboBox) presents the same choices to the user. The user is allowed to choose from …
by CoilFyzx in Software Development ()
Member Avatar
Hi Folks – I am trying to identify a good desktop primarily for use doing statistical computing with the R language. Not sure if I should be posting here or in custom builds or somewhere else. I have some very large files (Census & BLS stuff, mainly – as much …
by ClimateWonk in Hardware ()
Member Avatar
Dear friends pl help me I want to select data from a data base table Tran with two selection criteria one is number and the other one is text When i use one criteria it works well But i am failed to use the two criteria my code is here …
by mavtcr in Software Development ()
Member Avatar
Good days folks, I have a dgv where I have to select a text in a certain cell. For example in a cell there is a text like - "A SELECTED TEXT". What I want to do is when I highlight the word "SELECT" in "A SELECTED TEXT" it will …
by GeekPlease 16 in Software Development ()
Member Avatar
can you help me with the code for that using the logic: 1) randomly select the start point 2) predetermine the distance you need that car to travel using nextGaussian() 3) identify all the end points that are that distance away 4) randomly select one as you can see, i …
by proconfusion in Software Development ()
Member Avatar
Hello! I'm just a beginner in java and also a newbie,in fact this is my first post. I already programmed some stuffs such as games, calculators and other stuff. I also have a good grasp on the language and some of it's libraries . I am planning to take my …
by Sacrificer_911 in Software Development ()
Member Avatar
Upon resizing an anchored combobox - I noticed the text was always selected. This sparked the initiative to fix this problem. (Microsoft decided not to) So by extending the combobox class we can fix this. The following class can be dropped into a form for designer manipulation or as a …
by Begginnerdev 256 in Software Development ()
Member Avatar
I have been working on this assignment for a while now and I can't figure this one issue out. I was given four files, Name.java, SortableArrayList.java, NameListDriver.java, and SortableArrayListWithBubbleSort.java. The program is meant to take a text file with a list of names and sort them alphabetically. Part one of …
by ray.chappel in Software Development ()
Member Avatar
Hi guys, I have a php code that displays a list of dishes where a user can check on those dishes and then save the selection to the database. My code works find when selecting and saving the data. But the problem is that when I try to uncheck one …
by dashawk 4 in Web Development ()
Member Avatar
Hello guys im in need of a help. I have a checkbox on a Listview1 and i also have listview2, textbox and 2 buttons. On listview1, i have a list of items and its subitems. Then im going to put a check on the one of the listview item then …
by lymwale.pablo in Software Development ()
Member Avatar
hello i am trying to use selection formula with crystal report viewer i write the formula in string and set it to crystalReportViewer1.SelectionFormula here whe i use this formula " {Customer.LastYearSales} > 11000"; it said a string is required here & when i change it to this " {Customer.LastYearSales} > …
by kimAugust in Software Development ()
Member Avatar
hello i am trying to use selection formula with crystal report viewer i write the formula in string and set it to crystalReportViewer1.SelectionFormula here whe i use this formula " {Customer.LastYearSales} > 11000"; it said a string is required here & when i change it to this " {Customer.LastYearSales} > …
by kimAugust in Software Development ()
Member Avatar
Here's the entirety of my code. The problem I'm having trouble with is in the sortArray function. The first part of that function is used to sort the words gathered in a text file from A to Z, the second part is meant to find any duplicate words, ie 'a' …
by Secone in Software Development ()
Member Avatar
Hello, I'm trying to have my program locate any duplicate strings in an array, say, there were two instances of the word 'man', it would add 1 to the Word Amount of that word, and move the duplicate to the back of the array in some way. The problem is, …
by Secone in Software Development ()
Member Avatar
HI, I have a doubt in multiple selection fetching data whil edit the page. output data stored in database as comma separated.
by aaadee in Web Development ()
Member Avatar
hi, can u pls help me understand this code line by line.. i understand how selection sort works. but not able to get this code properly. just anyone pls explain me the wrking of this code( selection sort function)
by shibu2all -1 in Software Development ()
Member Avatar
Dear All, Please suppose that I have this line of code, and that my selection range goes from div element with id=1, starting at '2', to div element with id='2', ending at '8'. 28. I'm using chrome, I would like to get the position of the cursor inside each element. …
by softDeveloper in Web Development ()
Member Avatar
Hi all, Heres my problem, not sure if this is the right place but daniweb users seem to answer every other question I have so here goes. I have windows 7 on my laptop. I have a repair disc that I have made from the same machine when it was …
by gotboots 2 in Microsoft Windows ()
Member Avatar
Hello again, I am asked by my professor to create a program using selection sort in a linked list. Selection sort with sorting only the data is pretty easy, but I'm having a hard time because he made us sort the nodes themselves. Can anyone help by giving atleast the …
by cryonize in Software Development ()
Member Avatar
Hello. I am learning C++, and I am a little stuck. Right now, I'm working on pointers. The problem I'm working on requires sorting an array of structures, using pointers instead of array indices, using a selection sort. My code is not working, and I can't quite figure out why. …
by nik2012 in Software Development ()
Member Avatar
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 …
by Aphrite in Software Development ()