Click here to Skip to main content
14,977,980 members

Comments by phil.o (Top 200 by date)

phil.o 17-Jun-20 7:25am View
I added the pre tag in which you can paste your current CSS code. Please use the green "Improve question" widget.
phil.o 16-Jun-20 19:43pm View
What don't you understand in that? Right now, this just looks like you asking us to do your homework.
phil.o 10-Jun-20 17:22pm View
If no row is selected, selected index will equal -1. With the code I wrote, no button will be enabled then. You can change the logic to make it whatever you find appropriate.
And, yes, basically I think you do not need inc and maxRows class variables.
phil.o 5-Jun-20 10:59am View
If "the part of the program that works fine" is raising an exception, it might not be as fine as you think. Just sayin' :)
phil.o 2-Jun-20 11:05am View
Problem is, the code that you are showing is not relative in any way to your original question.
phil.o 2-Jun-20 11:05am View
Thanks :)
phil.o 2-Jun-20 9:10am View
Please use the green "Improve Question" button and qualify the "What I have tried" part with what you actually tried. No one will do your homework for you.
phil.o 31-May-20 12:58pm View
You're welcome.
phil.o 31-May-20 7:41am View
Well, explaining all of it may take quite an amount of time, and goes far beyond the purpose of a quick answers forum. If you could use the green "Improve Question" button, and qualify your question with the relevant part of the code that you have so far, then it would be easier to provide a concrete solution.
If you really are a total beginner, I would advise to put your current project on hold, and invest some time in learning the basics of the language first. It wouldn't be a waste of time, but instead will make your learning curve much smoother, in the long term.
phil.o 31-May-20 5:50am View
You're welcome.
phil.o 31-May-20 5:17am View
I updated my comment. It is completely possible to do that, with any database system. As I told in the comment, you should escape the double-quotes inside the string.
phil.o 31-May-20 5:06am View
string DataLoad = "SELECT Format([Date], \"mm/yyyy\") AS \"Month/Year\", Count([Name]) AS \"Count\" FROM [customer] GROUP BY Format([Date], \"mm/yyyy\")";

You have to escape double quotes inside the string itself.
phil.o 31-May-20 4:51am View
You're welcome.
phil.o 31-May-20 4:47am View
I edited my answer to provide a solution for an MS Access query.
phil.o 31-May-20 4:43am View
So, you are using access database, but have tagged your question MySQL.
And you wonder why you don't get valid answers?
phil.o 31-May-20 4:33am View
Would you mind explaining what that means exactly? What result do you get?
phil.o 30-May-20 13:52pm View
If the last line is not an empty line, you may be off by one (I'm not sure, though; this would need to be checked). In this case, this might overcome the issue:
awk 'BEGIN {sum=0} {sum+=length($0)} END {print sum+NR-1}'
phil.o 30-May-20 10:30am View
Sorry, no. While I like to help those who genuinely provide some thoughts and hard-working to their own tasks, I'm really not into doing others' work for them.
phil.o 30-May-20 9:39am View
phil.o 30-May-20 9:35am View
Nope, that does not work like that. If you want to hire a developper, CP is not the right place.
phil.o 30-May-20 9:08am View
The text of the macro as shown in my snippet is just an example. You have to modify it with the text of your own macro. file1 holds the path of the word document you want to write to, and file2 is only here because there was the need of its value in the example. You may not need the file2 variable.
And, if you have some code to share, please use the green "Improve Question" widget, and put it in the "What I have tried" section, using pre tag for code formatting.
phil.o 30-May-20 8:32am View
You have to adapt the code to your specific situation, by giving these variables whatever values are relevant
phil.o 30-May-20 8:07am View
Try to replace each ampersand (&) with & VbCrLf &.
phil.o 30-May-20 6:27am View
I corrected the snippet.
phil.o 30-May-20 6:03am View
Here's the snippet translated to VB.NET:
Imports System.Runtime.InteropServices
Imports Microsoft.Vbe.Interop
Imports Word = Microsoft.Office.Interop.Word.Application

Private Sub TheMethod()
    Dim file1, file2 As String
    Dim word = New Word
    word.Visible = True
    Dim doc = word.Documents.Open(file1)
    Dim project = doc.VBProject
    Dim [module] = project.VBComponents.Add(vbext_ComponentType.vbext_ct_StdModule)
    Dim script = String.Format("Sub MacroTest() " & _
"Const path1 As String = ""{0}"" " & _
"Set doc1 = Documents.Open(path1) " & _
"End Sub", file2)
End Sub
phil.o 30-May-20 5:11am View
I would also say that, among all tutorials on Unity development that can be found out there, some of them may exhibit some really questionnable coding practices.
phil.o 29-May-20 15:51pm View
Sorry I still don't understand. Please answer my question: what is the type of the idControl variable?
phil.o 29-May-20 15:06pm View
Sorry, I don't understand what you mean. Where do ids come from? What is the type of the idControl variable?
phil.o 29-May-20 15:02pm View
Unclear. Please use the green "Improve Question" widget and specify what you have tried exactly, and how the result was incorrect.
phil.o 29-May-20 9:33am View
This is not an answer. If you have got a question, please post a new question instead. But, please, format your code properly with <pre> tags, and provide an acurate description of the error. "but showing some error in code" does not tell us anything useful.
phil.o 28-May-20 21:09pm View
Thanks :)
phil.o 28-May-20 21:08pm View
You're welcome :)
phil.o 28-May-20 20:32pm View
Yes: someone apparently managed to stole some informations about you. I would have a thourough check on my computer, if I were in the same situation. Maybe you have some sort of spyware. Or maybe it is just that you are using the same password on different places, and that one of them has been stolen. There is no way for us to tell for sure from where this comes. You should also change your existing passwords, and use a different one on each site. Password manager applications exist to help you with that. Anyway, you should consider any activity on your computer as highly risky until you have had it checked free from any malware/keylogger/spyware.
phil.o 28-May-20 20:08pm View
No, you should either create a parameterless constructor in the Task class, so that your existing code finds this constructor. Or modify the line Task newTask = new Task(); to Task newTask = new Task(DateTime.MinValue, PriorityType.NotUrgent, "Default task"); (for example) so that it calls the already existing constructor.
phil.o 28-May-20 19:15pm View
Have my virtual pound :)
phil.o 28-May-20 19:10pm View
You could start by clicking on the numerous links at the right side of this page which relate to this issue :)
phil.o 28-May-20 18:46pm View
You're welcome. You could try two things: first, explicitly declaring the Task class as public. Second: giving it a parameterless constructor, which assigns default values for date, priority and description; or use in the calling code the existing constructor (the one with parameters).
Edit: as there already exists a Task class in the System.Threading.Tasks namespace, you should give your own class another name; or, if you want to keep that name, then use the fully qualified name (FriendlyReminder.Task) in every file where the System.Threading.Tasks namespace has been imported.
phil.o 28-May-20 18:42pm View
Please delete this answer; the place for this is in the question, like you already did :)
phil.o 28-May-20 17:38pm View
I don't know. System.Threading.Tasks.Task class does not have any empty constructor (a constructor without any argument). But then, you wouldn't get the error message you actually get (it would rather be something along "No constructor accepting zero argument is defined").
What is this task class you are using exactly? Did you create it yourself? If so, could you please use the green "Improve Question" button and provide the definition of this class?
Edit: the error message suggests that Task would rather be a property, but then you would get a compilation error since the Task class would appear non-existent. None of this makes really sense.
phil.o 28-May-20 15:50pm View
That puzzled me too, what I proposed is just a long, long shot. Under this form, I guess the AddXY(Object, Object[]) overload will be used.
The meaning of 'not working' should really be detailed.
phil.o 28-May-20 14:29pm View
phil.o 28-May-20 14:23pm View
phil.o 28-May-20 12:41pm View
In this case, you have to count whitespaces in the function determining how many 'special' characters there are.
phil.o 28-May-20 11:51am View
I wondered why, too. But, who knows... :)
phil.o 28-May-20 11:38am View
I cannot see why $, %, ^, &, etc. would be special; they are all representable glyphs. So is whitespace, even if this glyph actually is blank.
So, what exactly is your definition of special? Do you mean a character which is not a letter nor a digit? A whitespace is not a letter nor a digit, but it is printable.
phil.o 28-May-20 10:40am View
The requirement is not totally clear to me. Besides, it goes beyond your original question. Please, try to do it by yourself first, then ask a new question about this new requirement if you are stuck, eventually. Sorry, but I won't write it all for you.
phil.o 28-May-20 9:14am View
Thanks :)
phil.o 28-May-20 9:13am View
Often people will post their "question" as an answer to and old question which looks like theirs. I wouldn't qualify this as spam right away; let's wait for an eventual payload to flag it formally, but I wouldn't bet on qualifying this as spam.
phil.o 28-May-20 9:01am View
This is not an answer. Besides, solution 2 already explains in clear words what the core of your issue is.
phil.o 28-May-20 8:54am View
This is the same as what you have tried and which was not correct.
The only decent way is to use a parameterized query:
using (SqlCommand Cmd = ...)
   Cmd.CommandText = "SELECT * FROM Table1 WHERE Field1 = @value";
   Cmd.Parameters.Add("@value", SqlDbType.NVarChar).Value = TextBox1.Text;
   // Then execute the command.
phil.o 28-May-20 8:14am View
The Next function, when called with two parameters, will return an integer greater than or equal to the first parameter, and strictly lower than second parameter. Thus, it will return a value between 0 and 255 (inclusive). If this value is greater than 127, we choose white (255); otherwise, we choose black (0).
phil.o 28-May-20 7:56am View
Your only option is to debug your code and investigate the value of the variable holding the server name.
phil.o 28-May-20 6:48am View
No, because there is no obvious reason for not using a boolean type when it actually exists :)
phil.o 28-May-20 6:05am View
Then debug your code to see where is the issue.
The python debugger

I do not understand why you don't return True or False from your function. Python has a boolean type, so why no using it?
status = True  # instead of status = 1
status = False # instead of status = 0
return status  # instead of return (int)status
phil.o 28-May-20 5:20am View
Your reply to Rick's comment does not exactly fit your original question. Without deeper context, it is not obvious that all labels are made invisible each time before one of them is set visible.
phil.o 28-May-20 5:17am View
Thanks Maciej :)
phil.o 28-May-20 3:42am View
This is a common non-issue. You should not care that your ids in the database are not contiguous. They are not meant to make your data pretty, they are meant to index a row unambiguously. Strict continuity of numeric ids is nothing else than cosmetic.
phil.o 27-May-20 10:27am View
The problem isn't in the setup. It is in your code relying on a file which it is expecting to find in the Program Files folder. Change the code so that this file is placed in one of the directories I told, and you will get rid of the issue.
phil.o 26-May-20 21:19pm View
What do you mean by your real IP?
phil.o 26-May-20 7:30am View
The "What I have tried" section is for you to show us the code you have tried so far. Please use the green "Improve Question" widget and qualify this section properly.
phil.o 26-May-20 6:53am View
Anything which aims at verifying that the payment has been actually done. This depends on so many factors that there is not a single code fitting all situations. See with the entity processing the payments to know how to properly use their services.
phil.o 25-May-20 4:29am View
public Counter(int _val, int _min, int _max)
   min = _min;
   max = _max;
   Value = _val;

OG means that: since setting the Value property internally calls the InRange() method, then you have to set minimum and maximum values before setting the value itself; otherwise, both minimum and maximum will equal zero, and your constructor won't accept any other value than zero.

In addition, you should have a look at what is debugging; it would allow you to have a better understanding of what your code is doing by investigating its state step-by-step.
Tutorial: Learn to debug C# code using Visual Studio
phil.o 25-May-20 1:55am View
No. We would need to know the exact type of the exception, as well as the pace in the code where it happens.
phil.o 25-May-20 1:49am View
What mistake?
And I see obvious flaw: you do not test whether bounds are properly ordered on creation.
phil.o 23-May-20 18:12pm View
Please define 'wrong'.
phil.o 23-May-20 16:43pm View
You could have told him to modify his conditions in if..else blocks as well.
phil.o 23-May-20 16:37pm View
Please indicate what you have tried exactly, and where you are stuck, because for now this just looks like you asking us to do your homework.
Please do not post your question several times. You already have asked this once, and with a more precise description of what you have tried, so please just be patient; someone will help if possible.
phil.o 23-May-20 4:56am View
System.Windows.Media.Brushes is not a collection, i.e. it does not implement basic collection interfaces. In this case, you'd better create your own collection. A possible choice would be a Dictionary<string, Color> mapping the colour-name to its colour-value. Another possible choice would be a List<Tuple<string, Color>>.
phil.o 22-May-20 11:06am View
Did you really change the code in the VisbTbU setter as well?
phil.o 22-May-20 11:00am View
Because you are using N0 as format specifier, which leads to a decimal number with 0 decimal digits. Try to replace N0 with N, for example.
phil.o 22-May-20 10:57am View
NumberStyles.Number already includes NumberStyles.AllowThousands. No need to specify the latter, then.
value = Decimal.Parse(txtInput.Text, System.Globalization.NumberStyles.Number)
phil.o 22-May-20 8:02am View
If you have a question, please post your own using the "Ask a Question" red button. Please make sure to be as precise as possible, and include a code block explaining where you are stuck exactly.
But do not post your question as an answer to a question which looks like yours.
phil.o 22-May-20 6:15am View
Thanks :)
phil.o 22-May-20 4:36am View
Well, no answer from OP, so I guess you are right.
phil.o 22-May-20 4:20am View
Repost of How can I fix this code? from May 9th.
phil.o 21-May-20 14:13pm View
Credentials are managed at the connection level, not at the query level. You cannot issue a query to change the login of a connection.
phil.o 21-May-20 14:10pm View
You have to get rid of --- \t at the end of the string. This is what prevents the date from being properly parsed.
phil.o 21-May-20 13:40pm View
What is in the file is one thing; but this is what is exacly in the date variable which matters.
Tutorial: Learn to debug C# code using Visual Studio
Put a breakpoint on the line string date = columns[0];, and start a debug session (F5). When the program will get to the breakpoint, its execution will pause, and you'll be able to execute it line by line (F11) and watch for the values held in variables.
phil.o 21-May-20 13:26pm View
Withot knowing what exact value there is in the string, it is hard to tell a solution. It is time for you to start a debug session and investigate this value which cannot be parsed. Do you know how to conduct a debug session?
phil.o 21-May-20 12:25pm View
My bad, I corrected my answer.
phil.o 21-May-20 9:29am View
You add a double value to the list. Only when you present the data to the end user, then the string representation becomes relevant. You seem to still think that 1.1 and 1.10 are two distinct values; they are not.
phil.o 21-May-20 9:05am View
Thank you Carlo :)
phil.o 21-May-20 9:05am View
Thank you Maciej :)
phil.o 20-May-20 16:00pm View
In the helloYou function:
1. Get the length of the string parameter.
2. Test whether it is odd:
2a. If it is odd, return "undefined".
2b. Else, concatenate "Hello, ", the parameter, then "!", and return the result.

There is absolutely no difficulty nor trick in that. You just have to start writing and testing.
phil.o 20-May-20 15:56pm View
You're welcome!
phil.o 20-May-20 15:12pm View
You have the atom variable containing all the data of this specific "line".
phil.o 20-May-20 13:12pm View
You're welcome. Please mark your question as answered if your problem is solved.
phil.o 20-May-20 11:57am View
Please see my updated answer.
phil.o 19-May-20 15:26pm View
Try to provide a session id to the -i switch (eg., -i 1).
phil.o 19-May-20 15:13pm View
You can use the -i switch so that it can interact with the desktop.
phil.o 19-May-20 7:51am View
No, because you did not provide any information about what you have tried, nor what this error is.
phil.o 19-May-20 7:38am View
We won't do your homework. You have just a few minutes left to change your way of homeworking and start trying to do things by yourself.
phil.o 18-May-20 8:03am View
access C#
This will give you plenty of material on how to connect to an access database from C#. Teaching you this sort of thing is way beyond the purpose of a quick answers forum.
Please note that you cannot read from and write to a database at the same time. You can read from it with a SELECT command, and you can write to it with an INSERT or UPDATE command, for example. Again, all of this is rather generic, and you should have a minimal understanding of relational database queries before attempting to use one in your application.
phil.o 18-May-20 7:37am View
What prevents you from doing that?
phil.o 18-May-20 7:37am View
What is the problem?
phil.o 18-May-20 3:48am View
Everything is explained on the link I provided. You can also type
man adduser
to get syntax and usage examples. There also exists an useradd command accepting -g as option. Check it with
man useradd
phil.o 16-May-20 10:48am View
You should make it an answer.
phil.o 14-May-20 11:03am View
Without the input CSV file, there is not much we can say, apart from the fact that this input file does not match your COPY statement in some way.
phil.o 14-May-20 7:52am View
Your XML file does not look like a well-formed XML document. You are showing no closing tags.
You should validate your XML file first, to ensure it is in a proper format. If your XML file is not valid XML, you cannot expect proper results while browsing the document tree.
XML validation
phil.o 13-May-20 5:15am View
And yet, you have at least two accounts on a developper's forum. This is kind of confusing.
phil.o 13-May-20 3:53am View
The purpose of your assignment is not to test your ability to find some code on the internet and copy/paste it as your own work, but rather to teach you how to analyze a problem, draw a diagram of the required steps to solve it, and translate that into actual C code.
phil.o 13-May-20 3:43am View
Because it is your assignment, you have to put a minimal work into it.
You should begin by drawing a diagram of required steps to satisfy the requirements. Once done, translate these steps into a C program.
You will only learn how to copy/paste if we do your assignment for you. For now, your question rather looks like a "please do my homework" type of question. On the other hand, if you put some minimal effort into your work, and come up with a concrete question about some code you wrote, we will be glad to help.
phil.o 10-May-20 14:33pm View
Please see my comment to your question. I would not be helping you, in the long term, by doing your assignments for you.
phil.o 10-May-20 14:32pm View
Answering your now deleted comment, I showed you one of many ways to accomplish your requirement. As a developper, producing this kind of pseudo-code is the very first thing that you should be able to do. You showed no attempt at all on your side, stating that you don't know how to go about it. I just put you on the road, providing a direction. Now, it is up to you to follow it and provide some work of your own. The important thing here is not the final result, but rather the steps you have to follow to get to it. Put in other terms, in a learning process, the journey is way more important than the destination itself.
phil.o 10-May-20 14:24pm View
Answering your now deleted comment, I just explained you one of many ways to do it. Aq a
phil.o 10-May-20 12:16pm View
Have you followed the advise of the first answer from the link I provided?
phil.o 10-May-20 9:41am View
Well, I was asking this because I was going to propose a regular expression for it... What is the point not willing to answer a simple question like this?
phil.o 10-May-20 8:04am View
Another quick question: what are the enclosing characters? Are they double quotes, as stated in your question, or are they parentheses, as stated in your comment.
phil.o 10-May-20 7:16am View
Repost of Please help how to do this. Please don't do that; not only it won't help you getting better/quicker answers, but it will also more likely annoy people. Please read the FAQ to know what are the rules of this forum.
phil.o 10-May-20 7:11am View
It is unclear what your goal is. Are you talking about CP articles? For what reason would you want to modify them?
phil.o 9-May-20 5:19am View
And you still did not provide the exact error message.
phil.o 9-May-20 4:41am View
What is the x y line? Are you talking about axis?
phil.o 9-May-20 3:39am View
I'm not sure if it's related to method overloading
No, it's not.

It justs asks you to create the class and give it four instance variables.
There is absolutely no difficulty in this, so, please, just try.
phil.o 8-May-20 7:10am View
5'd :)
phil.o 8-May-20 5:57am View
Thanks Richard, I corrected the placement of the return statement. Thanks also for the precisions about the Enumerable.Range behaviour.
phil.o 7-May-20 10:48am View
It dates back a long time ago, I remember I had to combine my queries into a single one while using a DataAdapter because Fill method did not append data like I thought it would. But it seems problem must have been elsewhere. My bad.
phil.o 7-May-20 10:28am View
You are right. I modified my solution to enumerate the nodes in doc2 and append them to doc1.
phil.o 7-May-20 7:38am View
Thanks for summarizing this thread :)
phil.o 7-May-20 7:27am View
Thanks :)
phil.o 7-May-20 5:50am View
You put these values as properties of the class you define.
I think you are confusing a multidimensional array with a tuple.
phil.o 7-May-20 5:33am View
You create a class holding all values you need. Then you create a single-dimension array of this class.
public class Whatever
   // Properties

Whatever[] theArray = new Whatever[ARRAYSIZE];
// or (easier)
var list = new List<Whatever>();
phil.o 7-May-20 5:00am View
It is unclear what you want to store in your six-dimensions array. What is the requirement behind it, because I have the feeling that you are not using the right tool here.
phil.o 7-May-20 4:58am View
This won't compile :) The array has six dimensions.
phil.o 6-May-20 10:45am View
Some part of the code appears to be missing from your sample (in the getStudentV1() function. Could you correct that please? And there is a double-quote missing at the end of the string in the printf() function in it.
phil.o 6-May-20 10:20am View
Please use the green "Improve question" widget and qualify the "What I have tried" section with the code causing the problem.
phil.o 6-May-20 7:31am View
phil.o 6-May-20 4:50am View
You're welcome. Please mark the question as answered if that is the case, so that it leaves the unanswered questions queue.
phil.o 6-May-20 4:39am View
Thanks :)
phil.o 6-May-20 4:38am View
Thanks :)
phil.o 6-May-20 4:06am View
phil.o 5-May-20 20:22pm View
Please, don't shout :)
phil.o 5-May-20 18:49pm View
Thanks for your vote.
I learnt basic in the early eighties from the language guide of my computer, a Texas Intruments TI99-4A. This guide was only describing formal grammar and syntax, with a few examples, but was nowhere near an exhaustive recipe about any requirement that a human being could even think of. I bought specialized press to get more detailed examples of what can be done and how.
The older guy you are talking about may suffer from the "It was way better before" syndrom.
I don't get what you mean by "these videos", "with strings". Which videos? What strings?
I would also add that the language is not the only thing to study: generic algorithmic, data structures, diagrams, are also quite important to learn, and they are not bound to any specific language.
phil.o 5-May-20 16:42pm View
You're welcome. Please mark your question as answered if it's the case.
And please, do not put links in your questions like you did; you could be flagged as spammer over this. I redacted the link to avoid that.
phil.o 5-May-20 13:33pm View
Thanks Patrice :)
phil.o 5-May-20 13:33pm View
Thanks Carlo :)
phil.o 5-May-20 12:39pm View
The error suggests that it is in an ASP.NET project, so this has nothing to do with Unity. Moreover, this has been asked and marked as answered more than four years ago.
phil.o 5-May-20 12:27pm View
Please see my modified answer.
phil.o 5-May-20 10:23am View
Please do not put code in comments; better use the green "Improve Question" widget and qualify your question instead. I do it for you this time, next time please follow this guideline.
phil.o 5-May-20 9:58am View
I think Maciej Los deserves the mark better than I do; his solution appears to be slightly more elegant than mine. If you could correct this, that would be great.
phil.o 5-May-20 9:56am View
Thanks as well :)
phil.o 5-May-20 9:20am View
phil.o 5-May-20 9:09am View
And yet, Split(String, StringSplitOptions) is defined. edit: in .NET Core 3.1 ...
I modified the solution with a syntax compatible with .NET Framework.
phil.o 5-May-20 8:19am View
Please tag which UI you're interested in: Windows Forms, WPF, ASP.NET?
Please also detail what you have tried exactly which was unsuccessful.
phil.o 5-May-20 7:55am View
phil.o 5-May-20 5:17am View
Whatever you will do, client side code will always be vulnerable to alteration by the client. The only place where you should handle what is possible and what is not based on user rights is on the server side.
phil.o 5-May-20 5:14am View
This is not a question. Please read the FAQ to know what is acceptable and what is not.
phil.o 4-May-20 21:06pm View
You're welcome. Please do not post a solution to reply to an answer. Use the "Have a Question or Comment?" button instead. And please formerly mark the question as answered if the case is solved.
phil.o 4-May-20 20:51pm View
You're welcome. This already is C# code.
phil.o 4-May-20 15:05pm View
You are aware that this code will be executed on server side, and thus will give information about server's interface, not client's one, right? Plus, this is basically a duplicate of solution 2.
phil.o 4-May-20 14:53pm View
You're right. I upvoted your solution as it better fits the question.
phil.o 4-May-20 14:38pm View
This is an answer to the question; not to the implied one, I agree, but to the formal one.
phil.o 4-May-20 12:47pm View
You have to iterate the array, counting whatever you have to count in the process. Read your course carefully, it contains invaluable material regarding your exercise.
phil.o 4-May-20 12:19pm View
Please use the green "Improve question" widget and describe the problem.
phil.o 4-May-20 9:12am View
I'd prefer KRTTD: Kindly refer to the documentation.
Thanks :)
phil.o 4-May-20 3:28am View
You're welcome.
phil.o 3-May-20 14:09pm View
5'd just to compensate the stress you felt while reading this code :)
phil.o 3-May-20 11:14am View
Sorry, this is the answer to a question which I did not ask.
phil.o 3-May-20 7:55am View
Here are a couple of links to get you started with debugging:
Tutorial: Learn to debug Visual Basic code using Visual Studio
Breakpoints and Debugging Tools
Knowing how to debug is an essential skill; it allows to investigate your code to see why it does not produce the results you are expecting.
phil.o 3-May-20 7:40am View
Then you should begin using the debugger and watch for the contents of the elements list. Do you need help on how to conduct a debug session?
phil.o 3-May-20 7:25am View
Weird, because elements.ToArray() will return a String() (a string array), which is inherently an Object() (an object array).
phil.o 3-May-20 7:10am View
Corrected. You will need to import System.Linq namespace for the ToArray() method.
phil.o 3-May-20 7:01am View
Then maybe try
phil.o 3-May-20 7:00am View
That's why the search page I gave a link for will give you plenty of sources to get what you need done.
phil.o 3-May-20 6:49am View
It selects only the first one because that is what you ask for with your i variable, which is initialized to zero (the first item), and is incremented outside the loop: your loop won't ever see another value for i than zero. If you want an index-based access, then don't use a ForEach loop, but a plain For loop instead:
Dim selectedCategory As XmlNodeList = feedDoc.SelectNodes("category/" + category)
Dim elements As New List(Of String)
For i As Integer = 0 To selectedCategory.Count - 1
   Dim feedLink As XmlNode = selectedCategory.ItemOf(i)
   If feedLink IsNot Nothing Then
   End If
combo.DataSource = elements
phil.o 3-May-20 5:25am View
My bad; try
Dim doc As New XmlDocument()
phil.o 2-May-20 18:14pm View
What do you mean exactly by 'check integer'?
phil.o 2-May-20 10:16am View
Oops ^^
phil.o 2-May-20 10:08am View
while (FALSE) maybe?
phil.o 2-May-20 9:20am View
I wrote XmlDocument, you wrote XDocument. Those are distinct objects whose usages are also distinct.
phil.o 2-May-20 8:54am View
You have to change the datatype of the column in the database, too.
phil.o 2-May-20 8:46am View
phil.o 2-May-20 8:44am View
Put a breakpoint at the beginning of the button click handler, and start a debug session (F5 in Visual Studio). Then carefully execute line-by-line, and watch for the values of variables along the way. This will allow you to pinpoint the issue. We cannot do that for you, since it needs the exact code as well as the actual data.
phil.o 2-May-20 8:25am View
You may have to add a reference to System.Xml.dll.
The Load method really exists:
XmlDocument.Load Method
phil.o 2-May-20 8:05am View
You should never store as string a value for which there exists an appropriate type.
phil.o 2-May-20 7:34am View
Are you storing the wallet value as a string in your database?
phil.o 1-May-20 13:01pm View
I've been wondering, just waiting for some basic feedback to spot the obvious, if needed :)
phil.o 1-May-20 9:22am View
It means that one of the column has not been provided any value, and thus is null.
As a side note, please do NOT use Convert class to handle valuetype's parsing; use DateTime.TryParse() method instead.
if (!DateTime.TryParse(dataGridView2.CurrentRow.Cells["LasttDate"].Value, out DateTime lastDate))
   // Problem: lastDate could not be properly parsed. You have to decide what to do in that case.
   // ...
if (!DateTime.TryParse(dataGridView2.CurrentRow.Cells["TodayDate"].Value, out DateTime todayDate))
   // Problem: todayDate could not be properly parsed. You have to decide what to do in that case.
   // ...
int remaining = (lastDate - todayDate).Days;
phil.o 1-May-20 8:49am View
Thanks :) I wondered the same, but we can just ammend the answer if strings were used instead of proper datatype.
phil.o 1-May-20 8:27am View
Repost of How to open encrypt excel and write closexml data using C#. Please don't do that; not only it won't help you getting better/quicker answers, but it may instead cause you to be flagged as abusive user.
phil.o 1-May-20 6:14am View
There is the place for such demands:
Bugs & Suggestions[^]
Please make sure to provide a more informational description than just 'not working'.
phil.o 29-Apr-20 8:06am View
You're welcome! Your code does not look messy at all. On the contrary, it is quite clear for a rookie's one.

If I had to give another advise, that would be to avoid using AddWithValue method. Better use Add() method[^] instead; this allows to clearly specify the database type you are working with (and prevents some issues with string fields between unicode and non-unicode fields). Applied to your code, this would give:
command.Parameters.Add("@FullName", SqlDbType.NVarChar).Value = txtFullNameJudge.Text
command.Parameters.Add("@Contact", SqlDbType.NVarChar).Value = txtContactJudge.Text
command.Parameters.Add("@UserName", SqlDbType.NVarChar).Value = txtUserNameJudge.Text
command.Parameters.Add("@Password", SqlDbType.NVarChar).Value = txtPasswordJudge.Text

Note that you may have to correct the SqlDbType value according to your database schema.
As to how to write code efficiently, this is the kind of question which is impossible to answer in a Quick Answers question, let alone a comment. Experience is what will bring most answers to it, and remaining curious and always be able to question one's own practices are key elements, too. Wandering through CodeProject and reading questions, answers and comments can help, too.
phil.o 29-Apr-20 1:47am View
Please, when you have a question, put it in a single place. You asked this in three other forums, two of them being the wrong place (Java and Visual Studio). Duplicating the same question all over the site will not help you to get better/quicker answers.
phil.o 29-Apr-20 1:39am View
You did not ask any question; your generic help request looks more like a demand that we do your homework.
What is the problem? Which part of your assignment are you having trouble with, and why?
phil.o 28-Apr-20 16:22pm View
And what is your question?
phil.o 28-Apr-20 9:42am View
Your "question" is inapropriate on this forum for several reasons. First, this has nothing to do with software development. Second, we strongly disaprove malicious activities; we are a community of software developpers, so what makes you think we would help you cracking softwares? Third, this strongly smells like a very clumsy spam-attempt.
phil.o 28-Apr-20 9:38am View
Nonsense. A number is a number, independently of its formal representation.
No matter which notation system you are using, algebric rules will always stand.
phil.o 28-Apr-20 9:32am View
Thanks :)
phil.o 28-Apr-20 5:14am View
We do not do your homework.
phil.o 28-Apr-20 3:30am View
You mainly need to study the basics of OOP and C# syntax.
phil.o 27-Apr-20 11:08am View
Then you should ask this on MySQL forums, as diagnosing your issue requires some informations that we don't have.
MySQL Forums :: Connector/J, JDBC and Java[^]
phil.o 27-Apr-20 7:54am View
Then check that you are using a JDBC/MySQL connector version at least 3.1.1, because the error message suggests that the version you are actually using does not implement this functionality.
phil.o 26-Apr-20 8:38am View
Thanks for the update :)
phil.o 26-Apr-20 7:41am View
Unclear. Please use the green "Improve question" widget and show relevant piece of code.
You may also be interested in reading about variable scope[^].
phil.o 24-Apr-20 8:41am View
This is basically the correct answer :)
phil.o 23-Apr-20 15:13pm View
Please use the green improve question button and show the relevant piece of code.
phil.o 23-Apr-20 10:22am View
My bad ^^
phil.o 23-Apr-20 7:39am View
There isn't any array in the code block you have shown, let alone anything which has to do with a stored procedure.
phil.o 21-Apr-20 3:00am View
I fully agree with you on this Maciej; not knowing which culture the OP is actually using, I just assumed the invariant culture, for which the floating format does not have any thousand separator.