Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: hex Pin
DaveyM698-Sep-09 4:02
professionalDaveyM698-Sep-09 4:02 
GeneralRe: hex Pin
sanforjackass8-Sep-09 4:02
sanforjackass8-Sep-09 4:02 
GeneralRe: hex Pin
Luc Pattyn8-Sep-09 4:09
sitebuilderLuc Pattyn8-Sep-09 4:09 
QuestionUpdate Cache Data Pin
sjs4u8-Sep-09 2:17
sjs4u8-Sep-09 2:17 
AnswerRe: Update Cache Data Pin
Manas Bhardwaj8-Sep-09 2:18
professionalManas Bhardwaj8-Sep-09 2:18 
GeneralRe: Update Cache Data Pin
sjs4u8-Sep-09 2:38
sjs4u8-Sep-09 2:38 
QuestionGet the automated changes from excel Pin
NarVish8-Sep-09 2:09
NarVish8-Sep-09 2:09 
QuestionSearch for repeated character combinations Pin
khalidelmeknesi8-Sep-09 2:07
khalidelmeknesi8-Sep-09 2:07 
Hi everybody,

I have an tool that reads an file. That file has for example the follow content:


²{öï#°ÿùpO¬[ÿùpO¬ÿùpO¬¿ÿùpO¬ñÿùpO­#ÿùpO­Nÿ

I would like to search for repeated character combinations like the bold characters. The character combination ùpO repeated 6 times.

I would like to return some top 5 with the most repeated character combinations. Something like this:

ùpO : 6 times
xyz : 5 times
ab4 : 3 times
ab : 2 times
66 : 2 times

This is the code that reads the file:

string path = @openFileDialog1.FileName;
                try
                {
                    // Open the stream and read it back.
                    using (FileStream fs = File.OpenRead(path))
                    {
                        byte[] b = new byte[1024];
                        //UTF8Encoding temp = new UTF8Encoding(true);
                        UTF7Encoding temp = new UTF7Encoding(true);

                        while (fs.Read(b, 0, b.Length) > 0)
                        {
                            textBox1.Text += temp.GetString(b);

                        }
                    }
                }


Thanks!
AnswerRe: Search for repeated character combinations Pin
sanforjackass8-Sep-09 2:58
sanforjackass8-Sep-09 2:58 
GeneralRe: Search for repeated character combinations Pin
khalidelmeknesi8-Sep-09 3:08
khalidelmeknesi8-Sep-09 3:08 
AnswerRe: Search for repeated character combinations [modified] Pin
sanforjackass8-Sep-09 4:00
sanforjackass8-Sep-09 4:00 
GeneralRe: Search for repeated character combinations [modified] Pin
khalidelmeknesi16-Sep-09 22:48
khalidelmeknesi16-Sep-09 22:48 
AnswerRe: Search for repeated character combinations Pin
sanforjackass18-Sep-09 12:05
sanforjackass18-Sep-09 12:05 
AnswerRe: Search for repeated character combinations Pin
Ian Shlasko8-Sep-09 5:41
Ian Shlasko8-Sep-09 5:41 
GeneralRe: Search for repeated character combinations Pin
khalidelmeknesi8-Sep-09 21:48
khalidelmeknesi8-Sep-09 21:48 
QuestionRedirect Console for In-Memory Execution Pin
Anindya Chatterjee8-Sep-09 1:49
Anindya Chatterjee8-Sep-09 1:49 
AnswerRe: Redirect Console for In-Memory Execution Pin
Not Active8-Sep-09 2:19
mentorNot Active8-Sep-09 2:19 
GeneralRe: Redirect Console for In-Memory Execution Pin
Anindya Chatterjee8-Sep-09 3:27
Anindya Chatterjee8-Sep-09 3:27 
GeneralRe: Redirect Console for In-Memory Execution Pin
Not Active8-Sep-09 3:36
mentorNot Active8-Sep-09 3:36 
GeneralRe: Redirect Console for In-Memory Execution Pin
Anindya Chatterjee8-Sep-09 3:43
Anindya Chatterjee8-Sep-09 3:43 
GeneralRe: Redirect Console for In-Memory Execution Pin
Not Active8-Sep-09 4:14
mentorNot Active8-Sep-09 4:14 
Questionhow to change individual gridline color in datagridview Pin
gtag8-Sep-09 1:48
gtag8-Sep-09 1:48 
QuestionXML tags for documentation: How to link to data type of parameter / function? Pin
Guido Carl8-Sep-09 1:24
Guido Carl8-Sep-09 1:24 
AnswerRe: XML tags for documentation: How to link to data type of parameter / function? Pin
N a v a n e e t h8-Sep-09 2:11
N a v a n e e t h8-Sep-09 2:11 
AnswerRe: XML tags for documentation: How to link to data type of parameter / function? Pin
Guido Carl8-Sep-09 2:19
Guido Carl8-Sep-09 2:19 

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.