|
i am not codeproject old member just new sorry for problem.
|
|
|
|
|
Despite the fact that you posted your entire project instead of the relevant code, and despite the fact that you didn't put the code in a code block so that it would retain it's formatting, and despite the fact that you didn't write a proper description of what the code is supposed to do, I took a quick look at it.
I didn't find anything that resembles any known form of sorting algorithm.
If you name your variables something that is a bit more descriptive than "a", "b", "c" and "arr", it would help in determining what the code is supposed to do.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
i am sending my all project visual studio 2008 c# project
i told people just help not humliation or stupid reaction.
you can control project thanks.
|
|
|
|
|
|
oraanupi wrote: i told people just help not humliation or stupid reaction.
Dude, as a friendly tip, you need to lighten up. Seriously, just post only your sorting algorithm and give people some kind of idea what it is supposed to do. Have you created test cases? If so, do they work or not. If you haven't created test cases, then you should do that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
i tested it works
telling you again and no more explanation
yes its look like new things maybe not
i need help. i gave the link get it and check it ok man.
|
|
|
|
|
oraanupi wrote: i gave the link get it and check it ok man
No thanks, I built my own project
It looks like it works. What is it you need check/confirmed? It looks like it sorts, not sure about the efficiency with the loading into a Listbox, and working off the listbox (nice for the visual, though)
Now, time for constructive criticism:
You should really comment the more unclear parts of your code, describing your algorithm. Do think about this, no comments, you walk away from this program and 5 years from now, would you still understand it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
It's nice how you make it generate random numbers and all, but the easiest way to test a sorting algorithm is by unit testing as leppie suggested. Do look into how to do that.
In your unit testing, you'll want to test for the (1) typical case, (2) best case, and (3) the worst case.
You already did the typical case by generating the random numbers. The best case is where you have the following: the list already sorted in ascending order - sort by ascending order - nothing gets sorted - no work done, and repeat in reverse for descending order - have the list already sorted in descending order.
The worse case test is like the best case, however, you test the ascending sort by a list that is already sorted in descending order, and do the reverse for descending.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
You have far too much patience
|
|
|
|
|
I'm actually trying to be nice for once.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
about these cases help me man
first should i remove textbox replace regular array?
|
|
|
|
|
oraanupi wrote: about these cases help me man
Nope, sorry, I've got soccer games to go to soon.
oraanupi wrote: first should i remove textbox replace regular array?
No, keep what you have, put in a checkbox on your form for the different types of test cases, so when you run the app, you can choose which one you want to do.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
no prob it is not soccer it is real fotball
|
|
|
|
|
I stand corrected
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
oraanupi wrote: i tested it works
Did you unit test it? If not, Google the term, find out how to do it, then apply your new found knowledge.
|
|
|
|
|
|
What kind of data did you test it with?
I haven't tried this, but I believe it will fail in all of these cases:
1.
Enter the numbers:
999999
999998
999997
When you sort them, all but one should disappear.
2.
Enter the numbers:
100
200
200
200
300
When you sort them, all duplicate values should disappear.
3.
Enter the numbers:
1000
1
When you sort them, you should get an IndexOutOfRangeException.
4.
Enter any numbers you like.
Then try to enter the number:
1000000000
This will of course not be accepted.
When you try to sort, you should get an OutOfMemoryException.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I want to open windows application from image button click of web page.
I am using System.Diagonistic.Process.Start("exe path of local machine");
But it is throwing exception related to process and thread.
|
|
|
|
|
It is not possible to open an application from within an asp.net website. The main reason for this is security and secondly, you simply can't access the client machine as the asp.net webpage codebehind runs on the server.
What are you trying to achieve?
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
First of all thanks for your reply.
Actually each client will have the exe on his machine on particular path.
one more question is that System.Diagonistic.Process.Start("exe path") will it work or not.
|
|
|
|
|
Like I said before, it won't work. You will have to find another way.
What will work is when you let the user start a clickonce installation from the server.
Using clickonce is the best way to run a client application "from the server".
It will install the application on the fly and start it immidiately after that.
Be aware though that the application that is installed through clickonce is limited in security too.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Can you please explain me, How i can implement it?
|
|
|
|
|
Check this out: ClickOnce deployment[^] it should explain what it is and how it works.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|