15,881,173 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by brknlpr (Top 7 by date)
brknlpr
24-Jul-14 9:47am
View
thanks but ı already check that articles I wrote my codes but I just want to know why it doesnt work
brknlpr
12-Nov-13 17:05pm
View
thank you for your response. Ok then I am reading a negative or positive comment from a txt file.I have to separate each DISTINCT word from this file at first.(This is my first problem)Then I have to count each DISTINCT word each sentence and write it to the richtextbox.(This is second problem)
Let's look this sentence as an example think that I read this from txt file.
"I have to count each DISTINCT word each sentence"
{1 1,2 1,3 2,4 1,5,2,6,1,7,1,8,1} the first number is index of the word and the second one is how many times this word is in a sentence. But as you see we have 9 words but we write 8 index because the word "each" we have 2 and I have to write it once.
I hope that I make it clear
Thank you again
brknlpr
18-Jun-13 11:16am
View
Thank you very very much again. you helped me a lot have a good day :)
brknlpr
18-Jun-13 10:45am
View
thank you very much it worked :) could you please explain a little bit why we do this ?
brknlpr
18-Jun-13 10:42am
View
when I run it in debug mode I can see in my string st this --> 24445098 LS\0\0\0\0\0\02\0G?e1I-00023280DF5VF6844007354S\0\0\0\0S001010339S001010339S001010339\0\0\0\0\0\0030725\0\0\0\0\0\0\0\0\0\0\0\005\0\a??\a??\a??\a??\a??\a\0??$?\b?b?)???^??n??Fl?\a??\a??\a??\a??\a??\a\0??$?\b?b?)???^??n??Fl?\a??\a\0\0\0\0??\0??\a??\a\0??$?\b?b?)???^??n??Fl?" but I it only writes 24445098 LS to the textbox
brknlpr
18-Jun-13 10:36am
View
I am getting only this in my textbox as ascii -- 24445098 LS but file is not short as this
brknlpr
18-Jun-13 10:12am
View
firstly thank you for your response. However I tried it before and also tried it now again
but it didnt work again I am getting the same result just like I got before.
this is my whole reading bin file codes
private void açToolStripMenuItem_Click(object sender, EventArgs e)
{
hexAc.ShowDialog();
rtb.Text = "";
try
{
string filepath = Path.GetDirectoryName(hexAc.FileName);
string filename = Path.GetFileName(hexAc.FileName);
//dosya uzantısı için 2 sini birleştiriyoruz
string file = filepath + "\\" + filename;
label1.Text = filepath;
label2.Text = filename;
FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
FileInfo fInfo = new FileInfo(file);
int s = Convert.ToInt32(fInfo.Length);
byte[] bit = br.ReadBytes(s);
int count = 0;
for (int i = 0; i < bit.Length; i++)
{
rtb.Text += bit[i].ToString("X2") + " ";
count++;
if (count == 16)
{
rtb.Text += "\n";
count = 0;
}
}
string st = Encoding.ASCII.GetString(bit);
textBox4.Text = st;
}
catch(Exception){
MessageBox.Show("Dosya Açılamadı Lütfen yeniden deneyiniz");
}
}
is there anything that I miss ?
Show More