Click here to Skip to main content
15,077,137 members

Comments by TheRealSteveJudge (Top 200 by date)

TheRealSteveJudge 20-Oct-21 5:26am View
Answering an eleven years old question makes no sense at all.
TheRealSteveJudge 20-Oct-21 5:24am View
"Answering" an eleven years old question makes no sense at all.
TheRealSteveJudge 19-Oct-21 5:50am View
This is not a code writing service.
We do not do your homework!
TheRealSteveJudge 14-Oct-21 10:08am View
Please have a look at the updated solution.
TheRealSteveJudge 7-Oct-21 2:32am View
Please see updated solution.
TheRealSteveJudge 6-Oct-21 5:40am View
You're welcome! But why did you not accept the answer?
TheRealSteveJudge 24-Sep-21 5:26am View
TheRealSteveJudge 14-Sep-21 4:26am View
TheRealSteveJudge 14-Sep-21 4:26am View
TheRealSteveJudge 14-Sep-21 1:59am View
Thank you, Bill!
TheRealSteveJudge 13-Aug-21 4:22am View
TheRealSteveJudge 11-Aug-21 5:40am View
If you want to make your web site responsive without using an established framework I wish you good luck!
TheRealSteveJudge 5-Aug-21 8:00am View
You are "answering" a nearly two years old question.
BTW your "answer" has nothing to do with the question asked.
If you want to get kicked from Code Project keep on that way!
TheRealSteveJudge 5-Aug-21 4:12am View
Thank you!
TheRealSteveJudge 29-Jul-21 7:47am View
Have a look at the updated solution.
TheRealSteveJudge 29-Jul-21 7:44am View
You are right the wrong filename is used.
TheRealSteveJudge 29-Jul-21 5:39am View
Not working is the most useless description available on earth.
Show us your source code, maybe we can see what is wrong.
TheRealSteveJudge 29-Jul-21 5:07am View
This is a link to the original Microsoft documentation.
There are also lots of examples how to start a process.
might be interesting for you.
Just search for OpenWithStartInfo()

TheRealSteveJudge 29-Jul-21 3:00am View
This is what you must ask your provider.
Maybe they have two ports,
one SSL port and one non SSL port.
TheRealSteveJudge 29-Jul-21 2:01am View
You're welcome!
TheRealSteveJudge 28-Jul-21 10:05am View
Try this
<option id="@klient.Id" name="@klient.Name" value="@klient.Id">@klient.Id - @klient.Name</option>
TheRealSteveJudge 28-Jul-21 8:49am View
When you debug the GetKontoplan method after clicking the button what value is KlientId?
TheRealSteveJudge 27-Jul-21 8:23am View
Thank you!
TheRealSteveJudge 21-Jul-21 4:52am View
Good approach! 5*
TheRealSteveJudge 9-Jul-21 6:34am View
Why only 4*? This answer is worth 5*.
TheRealSteveJudge 24-Jun-21 7:11am View
You should ask the manufacturer, this is for programming questions only.
TheRealSteveJudge 24-Jun-21 2:14am View
Please do not abuse a solution to add comments and then accepting it as the best solution. You should remove your "solution" to avoid downvoting. You should update your question if you want to provide more information.
TheRealSteveJudge 23-Jun-21 10:01am View
You should assign fallback values to your text boxes e.g. Text="{Binding Tlf, Mode=TwoWay,FallbackValue=Tlf}, so that you can see if the text boxes are at the right positions. I assume that you assign the wrong values in your ViewModel
TheRealSteveJudge 23-Jun-21 9:42am View
The XAML seems not to correspond to the screenshot.
TheRealSteveJudge 23-Jun-21 9:15am View
Can you show us the complete XAML file as well as the properties from your ViewModel?
TheRealSteveJudge 23-Jun-21 8:14am View
TheRealSteveJudge 23-Jun-21 8:13am View
TheRealSteveJudge 23-Jun-21 8:12am View
Thank you, Maciej!
TheRealSteveJudge 22-Jun-21 8:18am View
An elegant approach! 5*
TheRealSteveJudge 22-Jun-21 8:15am View
The RegEx is even better as the positions of "12201" and "N" are exactly defined. 5*
TheRealSteveJudge 22-Jun-21 8:11am View
Thank you!
TheRealSteveJudge 21-Jun-21 7:59am View
This is a more versatile solution! 5*
TheRealSteveJudge 21-Jun-21 7:30am View
You're welcome! Thanks a lot for accepting the answer and happy coding!
TheRealSteveJudge 21-Jun-21 7:05am View
Now your source code looks like mine.
Have a look at the regular expression.
Yours is @"P\d -\d -\d -\d -\d"
instead of @"P\d-\d-\d-\d-\d"
So the code attributes cannot be extracted.
TheRealSteveJudge 21-Jun-21 6:42am View
You once again did not follow my suggestions.
Please try the functions I have given you in my solution.
TheRealSteveJudge 21-Jun-21 4:01am View
You're welcome! Thank you for accepting the solution.
TheRealSteveJudge 21-Jun-21 3:44am View
That is perfectly normal as Regex.Matches returns a MatchCollection.
You must loop through this MatchCollection.
See updated solution.
TheRealSteveJudge 21-Jun-21 3:23am View
You did not follow my suggestion.
Please have a look at the updated solution
TheRealSteveJudge 25-May-21 2:05am View
Thank you for your feedback!
TheRealSteveJudge 1-Feb-21 3:27am View
You're welcome!
TheRealSteveJudge 29-Jan-21 3:03am View
Limiting the number of threads does not help.
Please read Dave's comment and also read the proposed links.
TheRealSteveJudge 29-Jan-21 3:02am View
Excellent explanation!
TheRealSteveJudge 28-Jan-21 10:17am View
You're welcome. Good luck!
TheRealSteveJudge 28-Jan-21 10:15am View
throws System.ArgumentException: 'Illegal characters in path.'
TheRealSteveJudge 28-Jan-21 9:13am View
That's right. But the System.ArgumentException already comes when loading the XML.
TheRealSteveJudge 28-Jan-21 8:55am View
Your XML is not valid.
You can store the XML I suggested in a file e.g. input.xml
and load it like this:
var xmlDoc = new XmlDocument();
TheRealSteveJudge 18-Dec-20 5:23am View
2nd warning issued!
TheRealSteveJudge 18-Dec-20 5:22am View
As CHill60 already said,
plagiarism is not appreciated here.
TheRealSteveJudge 18-Dec-20 5:19am View
TheRealSteveJudge 16-Dec-20 10:30am View
TheRealSteveJudge 16-Dec-20 10:30am View
TheRealSteveJudge 8-Dec-20 5:10am View
Sorry. I have no more ideas!
TheRealSteveJudge 8-Dec-20 4:48am View
What happens if you change your Mutex like this?
Mutex mutex = new Mutex(true, "Global\\77aca664-ba25-4964-bc05-d7ba57030720");
TheRealSteveJudge 8-Dec-20 4:17am View
What is wrong? I tried your source code and it behaves like this:
When opening another instance the MessageBox is shown.
After closing the MessageBox the second instance is closed.
TheRealSteveJudge 1-Dec-20 5:15am View
Please let us know whether your problem is solved by Solution 1.
TheRealSteveJudge 27-Nov-20 5:08am View
You're welcome.
If you like our answers please accept them.
Thank you!
TheRealSteveJudge 27-Nov-20 5:06am View
Who did change my reply?
I did not write this.
TheRealSteveJudge 27-Nov-20 2:49am View
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
TheRealSteveJudge 27-Nov-20 2:32am View
fyi: this was an eye opener for me:

in terms of understanding the internals of StringFormat, and making me aware of the AppendFormat method of StringBuilder.
TheRealSteveJudge 26-Nov-20 2:19am View
Hi Bill,
thank you again for your encouraging comments and suggestions and the upvote as well!
The term "beginner" was not meant to insult the OP.
A better would have been "less experienced developer".
I like the term "Projective Identification" as I indeed was a beginner as well and did not see the wood for the trees and was intimidated sometimes when asking the experts for help in the company I worked.
They sometimes went above and beyond what I was asking for.
I will improve my solution according to your suggestions.
TheRealSteveJudge 25-Nov-20 9:30am View
I know, 3* ist just a neutral vote. Never mind.
In my opinion it is not necessary to frighten a beginner who does not now how to save a file on disk with a perfect and highly sophisticated solution.
This is not what the OP asked for.
Your suggestions make sense seen from a professional and experienced perspective but may probably not be understood.
BTW the usage of an ObservableCollection in a non MVVM scenario makes me wonder as well.
TheRealSteveJudge 25-Nov-20 7:42am View
Thank you! But the OP asked exactly this: "Save a list to a text file".
He did not ask for a sophisticated solution as we would think of.
TheRealSteveJudge 25-Nov-20 7:05am View
5* for suggesting a machine readable data format.
TheRealSteveJudge 23-Nov-20 6:17am View
5* as compensation for the 4* only!
TheRealSteveJudge 12-Nov-20 9:08am View
Wenn ist das Nunstück git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!
TheRealSteveJudge 30-Oct-20 6:19am View
Debugging and a more detailed description of the symptoms is always a good idea! 5*
TheRealSteveJudge 21-Sep-20 8:53am View
You can only assign valid DateTime Values or NULL to Nullable<system.datetime> DateOfBirth.
You cannot assign a string to a DateTime variable.
You cannot parse '-' to DateTime.
This is what the exception message says.
TheRealSteveJudge 16-Sep-20 3:15am View
5* for good solution and encouraging as well as useful comments
TheRealSteveJudge 16-Sep-20 3:02am View
Thank you, Maciej!
TheRealSteveJudge 11-Sep-20 5:18am View
Never post your phone number
TheRealSteveJudge 9-Sep-20 2:16am View
TheRealSteveJudge 7-Aug-20 6:19am View
You're welcome!
TheRealSteveJudge 7-Aug-20 6:18am View
5* for asking an understandable question!
TheRealSteveJudge 7-Aug-20 6:15am View
5* for the generic approach!
TheRealSteveJudge 7-Aug-20 6:04am View
What do the file names really look like?
Don't they have a file type e.g. 11111111111_a.txt?
TheRealSteveJudge 5-Aug-20 8:54am View
This is a brilliant idea!
TheRealSteveJudge 5-Aug-20 8:50am View
Thank you, Bill!
TheRealSteveJudge 5-Aug-20 4:35am View
You're welcome!
TheRealSteveJudge 5-Aug-20 4:33am View
Please have a look at the updated solution.
TheRealSteveJudge 9-Jun-20 7:52am View
OK. Please have a look at solutions 2 and 3...
TheRealSteveJudge 9-Jun-20 6:53am View
When debugging, what does the 'lines' object look like?
Is it an array? If yes, how many entries does it have?
TheRealSteveJudge 2-Jun-20 7:37am View
Which Article do you mean? When did that happen?
TheRealSteveJudge 14-May-20 8:39am View
"please stop wasting time on VB6 it has effectively been dead for almost 20 years => 5*
TheRealSteveJudge 14-May-20 4:37am View
TheRealSteveJudge 8-May-20 8:56am View
The question is over 6 years old.
I hope the OP is still alive.
TheRealSteveJudge 8-May-20 8:52am View
The question is nearly 4 years old.
Maybe the OP is already an experienced developer...
TheRealSteveJudge 7-May-20 5:09am View
My solution is not a good one. I will withdraw it.
TheRealSteveJudge 7-May-20 5:08am View
I fear you cannot convert e.g. a string into an int.
TheRealSteveJudge 7-May-20 5:05am View
You're right! I corrected it.
TheRealSteveJudge 7-May-20 4:43am View
Good advice! 5*
TheRealSteveJudge 6-May-20 8:42am View
Good examples! 5*
TheRealSteveJudge 6-May-20 4:43am View
TheRealSteveJudge 6-May-20 4:42am View
TheRealSteveJudge 6-May-20 4:38am View
Thank you Maciej!
TheRealSteveJudge 6-May-20 2:25am View
You're welcome! Thank you for accepting the answer.

In fact I noticed this strange behaviour but neglected it.
I updated the solution accordingly.

img.onclick = function(){ = "block";
modalImg.src = this.src;
captionText.innerHTML = this.alt;

was replaced by = "block";
modalImg.src = img.src;
captionText.innerHTML = img.alt;
TheRealSteveJudge 14-Apr-20 9:22am View
TheRealSteveJudge 26-Mar-20 9:59am View
Thank you, Maciej!
TheRealSteveJudge 26-Mar-20 8:52am View
Sorry. This was just an idea.
TheRealSteveJudge 11-Mar-20 3:00am View
ur welcome
TheRealSteveJudge 13-Feb-20 3:22am View
TheRealSteveJudge 12-Feb-20 3:49am View
Thank you, Peter!
TheRealSteveJudge 12-Feb-20 2:34am View
Short but effective solution for Windows Forms. 5*
TheRealSteveJudge 12-Feb-20 2:11am View
Thank you, Maciej!
TheRealSteveJudge 7-Feb-20 8:11am View
Good hints! Especially concerning the regex pattern. I was aware that my regex was not strict enough.
TheRealSteveJudge 7-Feb-20 3:46am View
Thank you!
TheRealSteveJudge 7-Feb-20 3:27am View
Effective approach without too much code! 5*
TheRealSteveJudge 5-Feb-20 4:20am View
Apologize. I do not understand.
TheRealSteveJudge 5-Feb-20 4:05am View
Did you read the article ""?
TheRealSteveJudge 5-Feb-20 2:08am View
Thank you for accepting the answer. I am glad that it helped you!
TheRealSteveJudge 6-Jan-20 4:44am View
Happy new year! You're welcome.
TheRealSteveJudge 10-Dec-19 4:50am View
I tested the code and it works. Maybe he is using an old version of C#.
TheRealSteveJudge 10-Dec-19 4:36am View
Maybe you are using an old version of C#.
Microsoft Docs says: "This feature is available starting with C# 6."
Then you should use what F-ES Sitecore suggested.
TheRealSteveJudge 11-Oct-19 8:15am View
If you read the Java code thoroughly you will find that a "getBytes" method is used.
This converts e.g. '123456,00' into a byte array.
You must do the same by using the BitConverter Class
TheRealSteveJudge 11-Oct-19 8:02am View
5*, but also the allowed range of 0 to 255 must be respected.
TheRealSteveJudge 31-Jul-19 10:16am View
So you should remove solution 1 because solution 2 is enough.
TheRealSteveJudge 31-Jul-19 10:13am View
TheRealSteveJudge 31-Jul-19 10:08am View
Post this as solution and you get 5 points.
TheRealSteveJudge 23-Jul-19 9:15am View
You seem to have understood the question and gave a good advice. 5*
TheRealSteveJudge 23-Jul-19 8:35am View
then I would like to apologise.
Your problem looked to me very similar to the one described in the link.
Best regards,
TheRealSteveJudge 23-Jul-19 4:02am View
Good advice! 5*
TheRealSteveJudge 22-Jul-19 3:09am View
Thank you Bill!
TheRealSteveJudge 22-Jul-19 2:53am View
Hi Bill,
thank you for the encouraging comment and valuable hints.
I updated the solution accordingly.
Best regards,
TheRealSteveJudge 17-Jul-19 5:18am View
You answered an almost 4 years old question which is marked as solved.
Moreover it is just a copy of
TheRealSteveJudge 2-Jul-19 8:14am View
Also good! 5*
TheRealSteveJudge 2-Jul-19 7:43am View
Elegant workaround! 5*
TheRealSteveJudge 1-Jul-19 6:19am View
Then please show us what you tried.
TheRealSteveJudge 1-Jul-19 4:01am View
Reasonable advice 5*
TheRealSteveJudge 1-Jul-19 4:01am View
Reasonable advice 5*
TheRealSteveJudge 4-Jun-19 5:09am View
TheRealSteveJudge 27-May-19 8:41am View
Thank you!
TheRealSteveJudge 27-May-19 8:37am View
5* Sorry I edited your question...
That was not my intent.
TheRealSteveJudge 24-May-19 9:55am View
Also valuable information! 5*
P.S. I added the word 'Please'.
Otherwise Bill will complain and downvote ;-)
TheRealSteveJudge 24-May-19 9:42am View
These are valuable tips! 5*
TheRealSteveJudge 24-May-19 9:29am View
Thank you!
TheRealSteveJudge 24-May-19 8:52am View
You did not use the Copy Code function, therefore "28980" instead of "54"...
TheRealSteveJudge 24-May-19 7:44am View
This is what I found:

A quick introduction:

This here features 30 examples:

I hope this will be helpful.
TheRealSteveJudge 24-May-19 7:29am View
Thank you for accepting my answer! I hope my answer did not insult you as it was assumed by Bill. If that is the case I would like to apologise.
TheRealSteveJudge 24-May-19 5:12am View
Thank you Bill. It was not my intention to insult the OP.
My intention was to give the OP some useful resource in order to easily do the constrast adjustment instead of self developping image manipulation stuff thus saving time. Maybe you got up on the wrong side of the bed today.
Nevertheless have a nice weekend!
TheRealSteveJudge 15-May-19 1:57am View
Indeed a good answer to a poor question. 5*
TheRealSteveJudge 13-May-19 5:01am View
TheRealSteveJudge 7-May-19 3:12am View
Hard but true words. 5*
TheRealSteveJudge 3-Apr-19 8:07am View
You're welcome. I just tried this:

and it showed the Google logo in the web browser control without any dialogue.
TheRealSteveJudge 22-Mar-19 6:54am View
TheRealSteveJudge 22-Mar-19 6:53am View
TheRealSteveJudge 22-Mar-19 6:53am View
TheRealSteveJudge 22-Mar-19 6:52am View
Thank you Maciej!
TheRealSteveJudge 8-Mar-19 8:23am View
5*! I only thought of System.Drawing...
TheRealSteveJudge 5-Mar-19 1:56am View
5* for good example
TheRealSteveJudge 26-Feb-19 3:32am View
TheRealSteveJudge 26-Feb-19 2:56am View
Good explanation! 5*
TheRealSteveJudge 25-Feb-19 10:15am View
I am sorry, I ran out of ideas. Maybe you should ask the guys who provided the Web API.
TheRealSteveJudge 25-Feb-19 10:08am View
You're right. Identity should be used. 5*
TheRealSteveJudge 22-Feb-19 10:29am View
TheRealSteveJudge 22-Feb-19 10:12am View
C'est vrai. Cinq étoiles pour toi! :-)
TheRealSteveJudge 20-Feb-19 4:50am View
You're welcome! Upper case / Lower case issues often are not easy to find, even for experienced developers.
TheRealSteveJudge 20-Feb-19 2:45am View
You're right with
the variable will go out of scope

But it is nearly impossible to provide a perfect answer to such a poor question.
The StringBuilder hint is valuable though. 5*
TheRealSteveJudge 19-Feb-19 7:56am View
TestHelpers.Tasks.Run(new Action(TestTasks.CustomTasks.DummyTask));

is the same as

Task.Run(() => TestTasks.CustomTasks.DummyTask());
you have brackets.

There is no need to write 'new Action(TestTasks.CustomTasks.DummyTask)' as it is a redundant explicit delegate creation.
TheRealSteveJudge 19-Feb-19 6:10am View
You're welcome.
According to the documentation the method 'Run' has an object of type 'Action' as parameter.
Your 'TestHelpers.Tasks.Run' Method also has an object of type 'Action' as parameter.
TheRealSteveJudge 15-Feb-19 2:08am View
You're welcome!
TheRealSteveJudge 14-Feb-19 8:50am View
You're welcome. Another one downvoted my solution. :-(
TheRealSteveJudge 14-Feb-19 8:47am View
WTF? My solution is right. Thank you for downvoting!
TheRealSteveJudge 13-Feb-19 9:07am View
Exactly. This is what I also thought yesterday when I was trying to help.
TheRealSteveJudge 13-Feb-19 8:41am View
It's a complete waste of time..
TheRealSteveJudge 12-Feb-19 7:55am View
Please see the updated solution.
Now no one else can understand the solution
as you changed the question...
Please, in future, one question for each problem.
TheRealSteveJudge 12-Feb-19 6:44am View
you're welcome
TheRealSteveJudge 12-Feb-19 6:34am View
Just replace line 3 to 5 by the example I showed you.
TheRealSteveJudge 12-Feb-19 6:23am View
Please see updated solution.
TheRealSteveJudge 10-Jan-19 2:01am View
You are almost right.
The event handlers are defined in MainWindow.xaml.
I updated the solution.
TheRealSteveJudge 9-Jan-19 9:50am View
5 stars. Hope the questioner is able to understand your code.
TheRealSteveJudge 9-Jan-19 9:47am View
Did you try my solution?
TheRealSteveJudge 9-Jan-19 8:07am View
Thank you, Maciej!
TheRealSteveJudge 22-Nov-18 11:32am View
The debugger shows after loading the web page that the two spans are empty.
span class="nowPlayingArtist"></span
span class="nowPlayingTitle"></span
Maybe something more must happen that these two fields are actually filled.
A real web browser seems to behave differently in contrast to just downloading
the web page.
Sorry for any inconvenience.
TheRealSteveJudge 27-Feb-18 3:26am View
Which platform is the C++ dll? x86 or x64? What is the target platform of your C# solution?
TheRealSteveJudge 11-Oct-17 10:23am View
Please see updated solution.
TheRealSteveJudge 17-Jul-17 5:49am View
How do you construct the ViewModel?

I do it like this:

public partial class MainWindow
public MainWindow()

var vm = new ViewModel();

DataContext = vm;
TheRealSteveJudge 17-Jul-17 4:15am View
OK. I thought maybe the background was white as well.
What do you see when using the debugger at the first line of the OnUserReceived method? How often is the breakpoint hit after logging in?
TheRealSteveJudge 17-Jul-17 3:58am View
No problem.
You set the foreground colour to 'White'.
What happens if you set it to e.g. black?
TheRealSteveJudge 14-Jul-17 3:49am View
It is not a good idea to use drop down lists for year, month and day.
A user could select e.g. 2017-February-31 which makes no sense.
TheRealSteveJudge 11-Jul-17 10:45am View
You're welcome.
TheRealSteveJudge 11-Jul-17 10:08am View
It is an own class named ListConverter.cs in subfolder converters.
Therefor it has the namespace WpfApplicationTest1.Converters

Maybe you can try something different.
I just found here:

This is a newsticker project.
TheRealSteveJudge 11-Jul-17 9:57am View
Don't give up. Just try my suggested code.
TheRealSteveJudge 11-Jul-17 9:06am View
I updated the solution with another approach.
Both my suggestions are tested and work.
TheRealSteveJudge 11-Jul-17 8:15am View
Please have a look at the updated solution.
TheRealSteveJudge 11-Jul-17 8:06am View
Do you want to concatenate all elements of the ObservableCollection to just one string?
TheRealSteveJudge 11-Jul-17 7:39am View
Do you mean horizontal scrolling? Like a news ticker?
TheRealSteveJudge 11-Jul-17 7:32am View
Just try it. It will automatically show AM or PM.
The standard formats are described with examples
in F-ES Sitecore's comment
TheRealSteveJudge 11-Jul-17 7:09am View
Maybe the DataGrid is what you want.
It also shows a vertical scrollbar if needed.
Please see updated solution.
TheRealSteveJudge 4-Jul-17 9:22am View
You're right. Thank you.
TheRealSteveJudge 30-Jun-17 3:59am View
Hope the questioner still can remember the asked question.
TheRealSteveJudge 29-Jun-17 3:25am View
Then show us your complete source code.
(All *.cs files and all *.xaml files)

My crystall ball is out of order...
TheRealSteveJudge 28-Jun-17 10:52am View
Unfortunately I cannot see all your code.
Maybe this hint may help you.

e.g. if the ViewModel is called ViewModel.cs you should write this
in the constructor of the code behind file e.g. MainView.xaml.cs:

var vm = new ViewModel();
DataContext = vm;
TheRealSteveJudge 27-Jun-17 7:53am View
Can you show us your App.xaml.cs and MainWindow.xaml.cs?
Maybe you forgot to set the DataContext?
TheRealSteveJudge 5-Jun-15 12:57pm View
5 Stars!
TheRealSteveJudge 5-Jun-15 9:46am View
Hi Sergey,
your own saying is awesome!
I wish I could give five stars for it!
TheRealSteveJudge 18-May-15 2:17am View
So did I...