Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
QuestionCapture image from camera Pin
RA|-|UL PATEL3-Jun-10 3:27
RA|-|UL PATEL3-Jun-10 3:27 
AnswerRe: Capture image from camera Pin
dan!sh 3-Jun-10 4:15
professional dan!sh 3-Jun-10 4:15 
QuestionIssue with Crystal Report Pin
spankyleo1233-Jun-10 2:09
spankyleo1233-Jun-10 2:09 
AnswerRe: Issue with Crystal Report Pin
Abhinav S3-Jun-10 2:21
Abhinav S3-Jun-10 2:21 
GeneralRe: Issue with Crystal Report Pin
spankyleo1233-Jun-10 23:04
spankyleo1233-Jun-10 23:04 
Questiongridview rows stored in database Pin
jadhavShubhangi3-Jun-10 1:23
jadhavShubhangi3-Jun-10 1:23 
AnswerCross Post Pin
Not Active3-Jun-10 1:59
mentorNot Active3-Jun-10 1:59 
QuestionInsertions sort reversed - optimize Pin
bolikej3-Jun-10 0:03
bolikej3-Jun-10 0:03 
I'm looking for a reversed insertion sort. I would like to, as usual, take a number (the first) in the right part of the array and then, as opposed to the standard, start looking at the last item in the left array and then work my way to the beginning of the left part of the array.

My current solution for this is the below I wonder if someone has a better (cleaner version). I doubt mine is as good as i gets...

(Why? - school assigment...)

/Rgds

public int[] InsertReversed(int[] arr)
       {
           for (int h = 1; h < arr.Length; h++)
           {
               int curr = arr[h];
               int v = h - 1;

               for (; v >= 0; v--)
               {
                   if (curr > arr[v])
                       break;
               }

               for (int i = h; i > v+1; i--)
               {
                   arr[i] = arr[i - 1];
               }

               arr[v+1] = curr;
           }
           return arr;
       }

GeneralRe: Insertions sort reversed - optimize Pin
harold aptroot3-Jun-10 1:00
harold aptroot3-Jun-10 1:00 
GeneralRe: Insertions sort reversed - optimize Pin
bolikej3-Jun-10 1:21
bolikej3-Jun-10 1:21 
GeneralRe: Insertions sort reversed - optimize [modified] Pin
harold aptroot3-Jun-10 1:42
harold aptroot3-Jun-10 1:42 
GeneralRe: Insertions sort reversed - optimize Pin
harold aptroot3-Jun-10 2:15
harold aptroot3-Jun-10 2:15 
GeneralRe: Insertions sort reversed - optimize Pin
bolikej3-Jun-10 2:31
bolikej3-Jun-10 2:31 
QuestionBest performance LAN communication for a Server/Client application Pin
teknolog1232-Jun-10 22:58
teknolog1232-Jun-10 22:58 
AnswerRe: Best performance LAN communication for a Server/Client application Pin
#realJSOP3-Jun-10 1:50
professional#realJSOP3-Jun-10 1:50 
QuestionCreating Events Pin
Roger Wright2-Jun-10 22:37
professionalRoger Wright2-Jun-10 22:37 
AnswerRe: Creating Events Pin
Abhinav S2-Jun-10 23:05
Abhinav S2-Jun-10 23:05 
AnswerRe: Creating Events Pin
OriginalGriff3-Jun-10 0:45
mveOriginalGriff3-Jun-10 0:45 
GeneralRe: Creating Events Pin
Roger Wright3-Jun-10 4:08
professionalRoger Wright3-Jun-10 4:08 
AnswerRe: Creating Events Pin
DaveyM693-Jun-10 1:38
professionalDaveyM693-Jun-10 1:38 
GeneralRe: Creating Events Pin
Roger Wright3-Jun-10 4:09
professionalRoger Wright3-Jun-10 4:09 
QuestionSystem.DBNull returned for whitespace strings Pin
GDavy2-Jun-10 22:07
GDavy2-Jun-10 22:07 
AnswerRe: System.DBNull returned for whitespace strings Pin
Pete O'Hanlon2-Jun-10 23:30
mvePete O'Hanlon2-Jun-10 23:30 
GeneralRe: System.DBNull returned for whitespace strings Pin
GDavy2-Jun-10 23:59
GDavy2-Jun-10 23:59 
GeneralRe: System.DBNull returned for whitespace strings Pin
Pete O'Hanlon3-Jun-10 0:23
mvePete O'Hanlon3-Jun-10 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.