15,892,072 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 Herboren (Top 55 by date)
Herboren
26-Feb-23 23:56pm
View
there are four pieces of evidence (raw, cr2, png, canon camera) in my question which suggest I am referring to imagery and 1 hint suggesting Emgu.CV. At which point do you decide to determine the best possible response to this question? The part where you only read what you want, or the part where you're completely oblivious?
I understand despite my response to you I may not receive the answer I am looking for. However, even I could have thought outside of the box and put 2 and 2 together. I've learned over the years how uncouth CP responses can be towards people looking for answers. Despite the age of my profile, I have been here since 2013. Don't bother responding that is going to exacerbate on the problem, just keep moving and let the next individual pass through with a more likely response.
Ultimately I will find my answer with or without CP. But hoping to expedite my efforts from a more tenure source that could help me shape what I am looking for.
Herboren
14-Jul-16 0:37am
View
I will have to move oKey inside the ecrypt function, I dont want it to go any deeper than the initial encrypt
Herboren
13-Jul-16 23:49pm
View
The oKey's initial value is always 'P', however it will change as soon as the first characters offset has been found. Once the distance or position between 'P' and 'H' is found it moves onto the next char in the array being 'H' and find the distance between 'H' and 'I', then 'I' and '-' and so forth. oKey always takes the previous element in the array to find the distance of the element ahead of it.
Regardless oKey's initial value will always be 'P' at the beginning of the encrypt function() but will change through this process
Herboren
13-Jul-16 22:54pm
View
I havent tried it yet, but I believe if I reverse the string and find the distance backwards I may be able to find my string
Herboren
13-Jul-16 21:49pm
View
I updated it, sorry forgot that was left out =\
Herboren
6-Dec-15 0:22am
View
I've updated the question to make more sense.
Herboren
6-Dec-15 0:22am
View
I've updated the question to make more sense.
Herboren
6-Dec-15 0:18am
View
Im sorry, I used the wrong terminology. I meant break the hex string in bytes.
Herboren
5-Dec-15 18:44pm
View
I knew I was on the right track under solution 1. Is there a specific way of doing this or do I just break the string up into a byte array and the count the elements?
Herboren
5-Dec-15 17:55pm
View
Im just windering, This guys application at Nirsoft is able to identify the hash values when importing a file containing hashes.
http://www.nirsoft.net/utils/hash_my_files.html
If that is the case, it he just counting the amount of bytes in the string to identify its type?
Herboren
5-Dec-15 2:44am
View
My Sincerest Apologies. Everything works great. Now if I want to add a combo box to change the hash function what exactly would I change? The ProcessItem()?
Herboren
3-Dec-15 15:05pm
View
Ahah! that did it. That was my fnckup sorry
Herboren
3-Dec-15 14:52pm
View
My Runworkercomplete:
private void bgw_RunWorkerCompleted(object SHA_sender, RunWorkerCompletedEventArgs rwc_e)
{
if (bgWorkerMD5.CancellationPending)
return;
if (rwc_e.Error != null)
{
MessageBox.Show(rwc_e.Error.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
StringBuilder sb;
sb = new StringBuilder();
try
{
foreach (byte b in (byte[])rwc_e.Result)
{
sb.AppendFormat("{0:X2}", b);
}
}
catch (Exception ex) { }
int index = _currentIndex;
ListViewItem update_lvi = listDetailedResults.Items[index];
update_lvi.SubItems[2].Text = (sb.ToString().ToLower());
//Resize Columns For Each Listview Item
foreach (ColumnHeader columns in listDetailedResults.Columns)
columns.Width = -2;
ProcessItem(index + 1);
menuExport.Enabled = true;
}
My DoWork
if (bgWorkerMD5.CancellationPending)
{
MD5_e.Cancel = true;
return;
}
And it just skips over the working index and moves to the next and begins to process that
Herboren
3-Dec-15 14:45pm
View
It worked, however it only stop to present file being generated. It then skips hashing the file and moves to the next. However I suspect ProcessItem() has a lot to do with why.
Herboren
3-Dec-15 14:07pm
View
I didnt mean to res a dead thread, but still related. But I was trying to implement a cancel button to stop the async by adding a while to the DoWork method
while (bgWorkerMD5.CancellationPending != true)
{
try
{
using (Stream stream = File.OpenRead((string)MD5_e.Argument))
using (HashAlgorithm md5 = MD5.Create())
{
long size = stream.Length;
byte[] buffer = new byte[4096];
long totalBytesRead = 0;
int bytesRead;
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
{
totalBytesRead += bytesRead;
md5.TransformBlock(buffer, 0, bytesRead, null, 0);
bgWorkerMD5.ReportProgress((int)((double)totalBytesRead * 100 / size));
}
md5.TransformFinalBlock(new byte[0], 0, 0);
MD5_e.Result = md5.Hash;
}
}
catch (Exception ex) { }
} MD5_e.Cancel = true;
and then in my button that I used to start the DoWork is renamed to cancel with an if within
private void button1_Click(object sender, EventArgs e)
{
if (!bgWorkerMD5.IsBusy)
ProcessItem(0);
else
bgWorkerMD5.CancelAsync();
}
But the progress bar keeps updating and hashes are still being generated. I read somewhere online that dowork may have already completed which is why the cancel didnt fire. However, its hashing files in the GB which should give me enough time to cancel. But I have tried everything now.
Herboren
1-Dec-15 16:41pm
View
When I was tidying up the code after you minimized it, I was Ctrl+Z and undoing code so while I was undoing it cast the totalbytesread back to int from long. So I changed it back and put 2 try..catch statements in, works perfect. Problem fixed! Thank you so much =)
Herboren
1-Dec-15 16:34pm
View
Hold on I think I fixed it. Will post back in a sec.
Herboren
1-Dec-15 16:23pm
View
I set the break on
bgWorkerDigest5.ReportProgress(percent);
Checked the totalbytesread value and still produced these results: Imgur: http://i.imgur.com/J0tBXfa.png
Herboren
1-Dec-15 16:07pm
View
Its weird, when I try to break at totalbytes read anywhere in the DoWork block, it only returns the minimum of 8192, but when I step out, my 'Step' buttons grey out and wont allow me to interact with the application or step further. Any suggestions where I should break?
Herboren
1-Dec-15 15:29pm
View
When I set my breakpoint on
private void bgw_Md5_ProgressChanged(object md5_sender, ProgressChangedEventArgs md5_e)
{
progressBackGroundWork.Value = md5_e.ProgressPercentage;
}
I get
md5_e.ProgressPercentage = -2147483648
ProgressPercentage = -2147483648
UserState = null
Herboren
1-Dec-15 15:18pm
View
totalBytesRead is long, still throwing.
Herboren
1-Dec-15 15:13pm
View
No, not at all. No hatred here friend. However I have seen some of your posts towards most of these people, and your enthusiasm seems a bit abrasive. I know you're an intelligent individual but most of time we are looking for simple answers and the only reason I say this is the level of intelligence that some people come in here with. Sometimes the syntax you explain is beyond our reach; in another sense, the key wording you use is beyond what our teacher is showing us. Those of us or are still in fundamental training in community college or fresh into a University, are just being exposed to this content.
I try to help people with fundamentals in /r/csharp but I don't want to coin their level of intelligence by throwing them something that their teachers haven't even offered them, so I have to work from a lower subject level with them and slowly migrate their way into something modern. I hope you smell my drift.
I will have you know I don't down vote because it really is depressing being down-voted. I will however select a solution, I won't lie. If star ratings are considered down voting, I am very sorry that wasn't the intention, I only mark it 5 stars because I know this issue is common with this particular snippet. So if anyone decides to stop and search code project, I'm hoping this thread will appear to help them before they ask. I know people are in a rush to get the answer, but some of us do stay for the fire works and it really does make the most in the end when understanding the logic behind it. I am sure your expectation of people is that they don't comeback after you offered help, this just means that select few finally listened and understand the bedrock.
So please accept my gesture as kind concern and understand the level of intelligence that you come face to face within the quick questions forum =)
Herboren
1-Dec-15 14:41pm
View
Your solution worked wonders and the tidying helped the code be more readable thank you =).
I was faced with this error after trying to hash multiple files ranging in the Gigabytes: Additional information: Value of '-2147483648' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'
from code:
private void bgw_Md5_ProgressChanged(object md5_sender, ProgressChangedEventArgs md5_e)
{
progressBackGroundWork.Value = md5_e.ProgressPercentage;
}
when hashing files larger than 1.5GB
However I am gonna assume that the value of the progress bar is not reseting and its just counting more than the maximum value.
Herboren
1-Dec-15 13:09pm
View
Code updated in question.
Herboren
24-Sep-15 16:32pm
View
Which is exactly what I asked several times earlier. I kept asking, which numbers are being plugged into the n values, or how can I display what numbers are plugging into those values, in the full formula that the user can see. I can get the Fibonacci answers without problems, this is easy, it is the Formula I want to show the end user how the answer was found. I am trying to display the whole formula as the answer itself, what it would look like if it was written on paper. And the correction that you guys gave me is still producing the wrong formula with the incorrect 'n-1; n-2' results, which does not provide that right answer if worked left to right. I have written the produced formulas on paper and they DO NOT equate. I have shown the output several times with all of your code corrections in a compiled format and still does not produce the result that it should. I am not trying to sound like frustrated really, I know you guys are amazing at what you do and I couldn't begin to compare, but I know it's mostly my perspective that you don't see. I'll try my best to esplain what I want the end user to see.
This is what the end user should see in the text window after press a button:
F(0) = F((a number, not n) - 1) + F((a number, not n) - 2) = 0
F(1) = F((a number, not n) - 1) + F((a number, not n) - 2) = 1
F(2) = F((a number, not n) - 1) + F((a number, not n) - 2) = 1
F(3) = F((a number, not n) - 1) + F((a number, not n) - 2) = 2
F(4) = F((a number, not n) - 1) + F((a number, not n) - 2) = 3
F(5) = F((a number, not n) - 1) + F((a number, not n) - 2) = 5
Instead of seeing after pressing a Button
F(0) = 0
F(1) = 1
F(2) = 2
F(3) = 3
F(4) = 5
F(5) = 8
The goal is, I should be able to explain to someone how the operation is performed, rather than giving the answer. I guess you could say step by step operation. So not only than give the computer the formula produce and answer, but use the computer to also explain how the answer was produced by using the Fibonacci formula directly.
Herboren
24-Sep-15 14:29pm
View
Deleted
I fixed it by removing the separate function and just including it in the button down:
private void button1_Click(object sender, EventArgs e)
{
int Term1, Term2 = 0, ReturnTerm = 1, i;
for (i = 0; i < Int32.Parse(txtLengthOfSeries.Text); i++)
{
Term1 = Term2; Term2 = ReturnTerm; ReturnTerm = Term1 + ReturnTerm;
txtFibonacciOutput.Text = txtFibonacciOutput.Text + string.Format("F({0}) = F({1})+F({2}) = {3}", i,Term1, Term2, ReturnTerm) + Environment.NewLine;
}
Herboren
24-Sep-15 12:57pm
View
So you're just removing the whole F(n-1) and replacing it with the term F(Term1) or F(Term2), or in other words F(1)+F(1) = 2 then F(1)+F(2) = 3 and then F(3)+F(2) = 5, and in this case these are the terms of Fib#'s 1,1,3,5,8,13,21, rather than trying to process the whole formula F(Term1 -1) + F (Term2 -2) = ??
Herboren
24-Sep-15 12:33pm
View
Prolly not asking this in the right place, what does n-1 mean, if you are just plugging the term into F(3) + F(5) = 8
Herboren
24-Sep-15 12:02pm
View
Within F(n) = F(1-1) + (1-2) does not equal to 1
Within F(n) = F(3-1) + F(3-2) does not equal to 2
F(n) = F(1-1) + (1-2) equals to -1
F(n) = F(3-1) + F(3-2) equals to 3
So where 1,1,2,3.. is the correct sequence when output, the formula values are not.
Herboren
24-Sep-15 11:43am
View
As much as the string.Format cleaned it up, that helped, but the formula does not equate to the Fibonacci value when output. Results:
F(n) = F(1-1) + F(1-2) = 1
F(n) = F(2-1) + F(2-2) = 1
F(n) = F(3-1) + F(3-2) = 2
F(n) = F(4-1) + F(4-2) = 3
Herboren
16-Jun-15 14:16pm
View
My listview contains the first item and then 6 sub-items following it. There is about 7 rows in the third column which is what I need to dump to a csv
Herboren
31-May-15 19:35pm
View
It comparing other entries in the file to the selected text which is why it is coming back false, even though it exists.
Herboren
21-May-15 16:57pm
View
Solutions was already given. Should just leave it at that. =\
Herboren
21-May-15 15:30pm
View
Wow thank you soo much, I can't believe I didn't see this. I never knew there was a control for this. This cleared it right up, thank you so very much!
Herboren
6-Oct-12 10:17am
View
Where would I go about multi-threading for console applications? Or at least research it. I did a Google search but nothing related to consoles.
Herboren
6-Oct-12 10:08am
View
Its just a process of learning. I remember I had done it before about 2-3 years ago but cannot remember how.
Herboren
20-Jul-11 8:35am
View
Gee I don't think your opinion matters now seeing how it got answered correctly.
Herboren
19-Jul-11 10:32am
View
It worked, but what I didn't understand is how 'Console.WriteLine("Your Car: {0}", car);' knew where to get the formatted string. Because 'public override string ToString()' doesn't have any type of identifier involved in it to show ownership of what its trying to accomplish.
Herboren
14-Jul-11 12:34pm
View
I just happened to come across this in my google search which I will take a look at on my lunch break:
http://wps.pearsoncustom.com/wps/media/objects/4172/4272958/Ch03.pdf
Herboren
14-Jul-11 12:33pm
View
Now that is concrete, I just scanned through some of that pages and it is what I am looking for, hopefully I can find it on www.half.com.
Herboren
14-Jul-11 12:08pm
View
You could try adding a timer control. When the user clicks the button the timer is enabled, checks the case and then updates the textbox then of course when the button is released, disable the timer control.
Herboren
11-Jul-11 14:04pm
View
Maybe you are right, with mobile app development. I think I would rather work in that environment just to see where I can go from there. Sadly I am an iphone user and that of course would be my main focus, but I heard Objective-C only works in an apple environment. Unless there is something that I can use in windows or linux?
Herboren
11-Jul-11 10:43am
View
No its ok, my wife keeps telling me that I am very smart at what I can do and what I accomplish, she makes it seem as if I am a genius and then I understand the underlying logic of information that others don't see, but what I cant see is the hue above the ground to imagine what to create. What your saying helps, because im trying to find a niche in the field.
Herboren
11-Apr-11 18:57pm
View
So the hex value is used, I just figured it was a custom var created by the user, mmkay I see now.
Herboren
11-Apr-11 18:53pm
View
^ Posted 5 Mar '10
Herboren
9-Apr-11 12:29pm
View
You know of all the forums I have been to everyone has the same output, I am here to learn but telling me im wasting my time as well as others, I think I have every right to display such an emotional response. Maybe it did not occur to you that I have tried reading the manual and trying the samples and examples but still not understood how it works. Did you ever stop to think about that? Just because you understand it and I don't doesnt give you any right to make such statements. Try a little professionalism, it could have prevented this. It doesnt hurt to mentor someone but when your tenure with your reputation and bolster in such a way of the knowledge you have, you tend to put off a negative effect because there is no control in this forum. If this were a paying job i'm sure you would have been disciplined very quickly on your actions. There was nothing wrong with my question, whether it made no sense to you or little sense at all, it got answered period. Im satisfied with the answer I received but not satisfied with you so this discussion is over with, I am not going to entertain myself anymore, this post can be pruned off now, btw I enjoy being here at the forum and I thank you for the welcome s(^.-)-b
Herboren
8-Apr-11 20:47pm
View
Deleted
If you didn't want to answer the question, then don't answer, no one asked you to take your precious time to come here to look for an argument. Now had I said, "Oh gracious and most knowledgeable, SAKryukov, come to thy rescue!", it would be different, but I see the fiction yet to be true and will surely not happen in the future, so don't get caught up on nonsensical abstraction.
Herboren
8-Apr-11 20:47pm
View
If you didn't want to answer the question, then don't answer, no one asked you to take your precious time to come here to look for an argument. Now had I said, "Oh gracious and most knowledgeable, SAKryukov, come to thy rescue!", it would be different, but I see the fiction yet to be true and will surely not happen in the future, so don't get caught up on nonsensical abstraction.
Herboren
8-Apr-11 20:19pm
View
Perhaps you are missing the point because not everyone thinks on the same level as you. Perhaps if you took the time to understand and accept that people who may have or have not RTFM, is because what you perceive as general knowledge by or acquired knowledge, doesn't me the world will revolve or 'evolve'(change for you) for that matter because it somehow just seems that best way. There are people out there that are geniuses because they think by symbols and patterns, and as long as it works for them, then what is the use in knowledge itself. People struggle to get where their at right now, so you need to take that 5 second delay and understand what you say before you actually say it rather assume what seems to be the worst in people. You can have all the back up in the world, hell they can help you hang your dirty clothes out to dry it it floats your boat, but I will tell you one thing, and attempt to belittle or discriminate against ones knowledge and how they should see things will just get your ass chewed out.
Herboren
8-Apr-11 16:43pm
View
Lol moar fail, its okay Naerling, you answered my question and that all that matters.
Herboren
8-Apr-11 16:40pm
View
That was just an example cause im at work I cant whip something up fast enough to prime my question, but I understood what Naerling posted. The question seemed perfect to everyone else, honestly 2 people answered what i was looking for. =) Maybe it was the lack of punctuation that threw you off.
Herboren
8-Apr-11 16:37pm
View
Sweet, ty sir you have been great! s(^.-)-b
Herboren
8-Apr-11 16:27pm
View
Ok so to use an loose anology:
while()
I am the while at the beginning and I am the lock, you can not access my statement unless your expression is true!
do while()
I will let you process my statements once or possibly more than once, but if I find your expression to be true then you are no longer allowed to process what I have to offer!
I know it sound ghey but, please tell me I hit the nail on the head?
Herboren
14-Jan-11 11:53am
View
Sorry there isn't enough emphasis. But apparently the question was intelligent enough to get a valid response until you nerd raged in. Now it's unfortunate for me as I had to lower my standard to fail in an attempt to psychologically harm you. Fail clap for you my friend.
Herboren
27-Sep-10 10:55am
View
well I know it can be done with parallel ports but there is no way with the IDE? or am I just using the wrong language?
Show More