|
Hi mehdi
Post your questions with proper subbject
thanks
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
Delete the second copy of your question, before it gets replied to.
Never post your email to any forum - unless you really like spam! CP will send you emails as necessary when people reply to you. (Just like this one)
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
I decided not too use it as a singleton (or in my case as I was being silly a "Global" object !).
Thank's
|
|
|
|
|
venomation wrote: I decided not too use it as a singleton (or in my case as I was being silly a "Global" object !).
Ok. So what are you answering to?
Are you referring to some other article / post?
Then please post that link here or better, post this message within that same article or link.
My signature "sucks" today
|
|
|
|
|
I want to assign 10 threads (it could be n) to a listview of (10000 records).
The listview's first coloumn is email. So I want to send email to a method and get a return string as a result (valid or not). which i want to add to the second column of the listview. Pls help me how to do it?
Code would be much appriciated.
|
|
|
|
|
So you deleted your original post to repost your request for code.... why?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
so he decided to completely ignore forum guidelines, ignore and down-vote my earlier reply, delete the question, create a new thread on the same subject, and use a meaningless subject line. Not a compelling start.
|
|
|
|
|
Well it would appear that I was down voted as well... oh the calamity.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Wes Aday wrote: oh the calamity
little ones can be cured easily.
|
|
|
|
|
Luc Pattyn wrote: little ones can be cured easily
Only if you believe the SPAM...
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
First of all I posted in this forum for the first time.( i know it is a mistake now).
Secondly if my code was working i will not be looking for help. About deleting my code and reposting the question. You only said that it does not look right.
Anyway i will do it myself thanx have a nice day
|
|
|
|
|
People here are more than willing to help out; however there are some rules to make that easier and to get things a bit streamlined. Good luck with those threads.
|
|
|
|
|
thanx buddy
|
|
|
|
|
safame20 wrote: i know it is a mistake now
Posting was not the mistake that you made.
safame20 wrote: You only said that it does not look right.
I said no such thing.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Hi
i am new in C#. i am developing a banking system in which each bank sends encrypted messages to each other. i am using 3-DES algorithm.
i am facing following problem.
user sends encrypted message to bank A and bank A decryptes it.here this algorithm works fine but when bank A sends this to Bank B then i am getting this runtime error
"Invalid character in a Base-64 string."
i am using the following code.
string cipherText = richTextBox2.Text.Trim();
string mykey;
byte[] keyArray;
byte[] toDecryptArray = Convert.FromBase64String(cipherText);
StreamReader objReader = new StreamReader("c:\\encryptkey.txt");
mykey = objReader.ReadToEnd();
objReader.Close();
if (mykey.Length < 24) mykey = mykey.PadRight(24, '.');
keyArray = UTF8Encoding.UTF8.GetBytes(mykey);
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform myTransform = tdes.CreateDecryptor();
byte[] resultArray = myTransform.TransformFinalBlock(toDecryptArray, 0, toDecryptArray.Length);
tdes.Clear();
data = UTF8Encoding.UTF8.GetString(resultArray);
the same code works very fine for first time decryption but not for 2nd time. i am getting error in
byte[] toDecryptArray = Convert.FromBase64String(cipherText);
plz help me.
thanx
|
|
|
|
|
So, when you look at it in a debugger, what is the invalid character and where did it come from? Are you sure there are no control characters getting added on somewhere?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Hi All;
I have created a user control that contains a generic list. When I instantiate this control in a Windows Form for some reason and array of the list type as (List<of type="">) is being added to the forms resources (.resx file). It runs ok for 2/3 times and then I get an error as follows:
Object of type 'NameSpace.Type[]' cannot be converted to type 'NameSpace.Type[]'. (where Namespace and Type are my class namespace and type.
Both list type and usercontrol are in teh same namespace.
Can anyone please help in clearnign this.
Thanks
Bin
|
|
|
|
|
I have had this problem before, but not for some time.
If memory serves it is caused by your having changed the Namespace.Type[] class/control/whatever in some way and when you next try to load the parent form it still has the 'old' style one serialized and of course cannot deserialize it. Again purely from memory the work-around is to delete the *.resx file for that form, although renaming/moving it might be safer from a restoration point of view.
Also a long, long, long time ago .NET 1.0/1.1 days this could happen if the 'build' part of the version information changed between runs. Not sure if this still applies though. The work-around here was to change the Version specification from [assembly: AssemblyVersion("X.Y.*.*")] to [assembly: AssemblyVersion("X.Y.*.1")] in AssemblyInfo.cs.
Hope this is of some help.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec.
Business Myths of the Geek #4 'What you think matters.'
|
|
|
|
|
Hello Henry;
That's it. I have to remove the UC instance from my form everytime I do an update to it, before recompling.
Thanks
|
|
|
|
|
|
Hi,
That is an ugly piece of code. For one, lacking any indentation, it is hardly readable; please read the forum guidelines (how to ask a question) and use PRE tags. Then a lot of declarations are absent, making it hard to understand. I also wonder where the code shown resides, is it part of some event handler, maybe a button click one?
Furthermore, the definition of DoWork() is absent, and it seems like a strange way to specify the thread's jobs. I'm not sure how "x" will ever get from the thread calculation result into the ListView either.
I suggest you edit your existing message and fix it with PRE tags and declarations, so someone can maybe give you further directions.
|
|
|
|
|
Hello,
How can I measure the time that controls are being painted on a panel ?
Thanks,
berlus
|
|
|
|
|
If I understand you correctly you have a Form, a Panel on that Form, and some Controls on the Panel. The Controls get painted whenever there is a need to, and you would like to measure how long it takes to paint them. Correct?
I could explain how to get the measurement done (or what to change so it can be done), however I'd rather tell you that you asking this tells me (1) it is slow, and (2) you should fix that.
Event handlers, including the Paint handler, should execute in a snap, never keeping the GUI thread busy (or waiting) for more than say 20 milliseconds, otherwise the GUI experience would be bad (e.g. a window covering most of your form, then disappearing, would take too long for everything to settle; or you dragging the Form by its title would not follow your mouse smoothly).
I suggest you tell more about your current situation: which controls, showing what kind of data (and where it comes from), etc. Plus a detailed symptom description.
|
|
|
|
|
Thanks for your answer.
I'm developing a GDI+ (can't use direct draw or open GL) framework, and i'm trying to decide between two alternatives to draw a certain symbol.
In order to decide which method to use, i'm creating a PanelWithStopwatch (derived from Panel), and drawing on this panel the desired symbol.
I want to use the stopwathc to measure the time that each panel was painted.
I hope I have clarified the need for the performance test.
Thanks,
Berlus
|
|
|
|
|
I understood you had Controls on the Panel, now you say it is a symbol, so I'm still confused. If there are no listing controls involved (ListBox, TreeView, DataGridView) and no databases, I doubt it will take more than say one millisecond (unless you are messing with huge images, transparency, ...).
Anyway, you could implement one way of painting things, then have a button click handler that contains:
start stopwatch
for (onethousand times) Panel.Refresh
stop stopwatch
This should repaint your panel all the time, whatever it contains. And then you could repeat it with your alternative way of painting things.
When in doubt it really repaints every time, change it a bit, e.g. perform a TranslateTransform.
|
|
|
|