Click here to Skip to main content
14,920,488 members

Comments by Richard MacCutchan (Top 200 by date)

Richard MacCutchan 9hrs 10mins ago View
I think there is some information missing; e.g. what is a and what are the criteria for a's contents?
I have no idea. This is something you need to try for yourself. If you really do not understand what to do then go and explain to your manager that he needs to find someone else to do the project.
Ask them for all technical information on the product and whether they provide any software interfaces.
Well that is not something that we can help with. You need to contact the manufacturer, or study some of those links to see if it is similar enough to your product.
Sorry, I missed the original.
Why do you think that would help?
There is no error in that code. Whatever you are compiling on your system, it is not the code you have posted above.
Why not compile it, run it and see what the answer is.
You're welcome.
As I said, this is the Quick Answers forum, please read[^].
Probably by studying whatever you are interested in. This forum is named Quick Answers as it is for answering actual coding questions. There is neither the time nor the space to provide tutorials on obscure subjects.
Is Google broken where you live?
"this code is correct but not working"
If it is not working then it is not correct.
"I have a problem"
Well why are you keeping it a secret?
And you think we can guess which error message, and what code causes it?
Given that this was answered 10 years ago, it is unlikely that the questioner is still waiting for any more replies.
Given that you did not ask a question there was nothing more that we could suggest.
You can find lots of good information at The Python Tutorial — Python 3.7.10 documentation[^].
Right under your nose.
There is not space here to teach you something like that; see the link below.
Explain what you tried and what happened. We are not very good at guessing what happens on your system.
The query should be: IF dayofmonth == 13 AND dayofweek == TUESDAY ...
+5, especially for referring to such a brilliant film.
The initial values are set in the compiled object. The string is null and the number is 0. Stepping through the code with the debugger shows this.
Then please show us the code, and any error messages and explain where the problem occurs. Please do not think that we can magically guess what you are doing.
"Intercepter la valeur de la cellule et la convertir en chaine ne me semble pas une solution élégante"
Please do not remove the content of your question. If you have solved it then just mark it as solved.
Thanks. Yes, I wondered about that.
That CLSID is the same one that I have. As far as I am aware that is installed automatically with Office.
That tells you that you need to install Office Excel in your system.
Incidentally if you really need password protection on the file then you must use the Excel Interop classes.
You save the updated Excel file to a temporary file, and then use a streamreader to read it back into memory, and a streamwriter to write that memory data to the output file. Why not just use the File.Copy method provided? Or save the updated information direct to the output file.
Help how?
The debug version does not look correct according to your format string. And we still have no idea what code you are using.
"Please explain the solution"
Until you explain the question, anything we suggest is pure guesswork.
"the representation is correct in a debug build, but completely wrong in a release build."
And we still have no idea what either representation looks like, or what code is used to generate it. As previously suggested, please provide complete details.
Use the Visual Studio debugger. I do not know of any tools for network tracing, but I am sure google will know of some.
Ask the person in StackOverflow who gave you the code.
A better idea would be for you to do it. Apart from anything else it will be a good learning exercise.
"am I the only one?"
Since you have not provided any details it is impossible to say.
"Kindly help to sort it out."
Sort what out? We have no idea what your code is doing. Please use the Improve question link below your question, and add complete details.
Yes, because word_dictionary[word] returns an int, and you are trying to apply the subscript [total] to it.
Why are you trying to use a second index that does not exist? The valiue of the dictionary item is returned by the simple expression word_dictionary[word]. If you do not understand hoe to use dictionary types then go and study the information at the link that Maciej provided above.
You too, dude.
Well you posted the question. And by the way, you are not paying for this, so please stop giving us orders.
And you please think about your problem, and provide a proper detailed explanation.
Ask the people who own the application.
There are many reasons why a request may time out, but the only way to find the answer is by debugging and testing.
Thanks Maciej.
What is the question?
"but it didn't work with me"
Probably because you have not written the code that is required. You ask for two names but never allow the user to enter them.
You need to use the debugger to see exactly what is received from the remote site.
It would be easier tp read if you used proper indentation.
Since we know nothing about this API then it is unlikely that we can offer suggestions apart from:
1. It looks like it is trying to find some information and delete it.
2. No idea.
3. See 2.
You are still doing everything in the one method. Like we said, create separate methods that do only one task; apart from anything else it makes it much easier to test and debug.

So the basic definitions should be:
private List<timespan> ReadText(string strPath)
    // This method reads the input file and creates the List.
    // On completion it returns the List to the caller.

    // Note: do not use Parse to convert strings to values, as it can cause failures.
    // use TryParse, which allows you to capture invalid data

private void WriteText(string strPath, List<timespan> tsList)
    // This method should just write the elements of the list
    // to the new output file.

private void SortTimes(List<timespan> tsList)
    // This method sorts the data in the List

// etc.
You can write each method one at a time and test it in isolation. Only when that test has completed successfully should you think of writing the next one.

And all methods should be driven from the main method, which controls the overall flow of the program.
And what exactly is a reference?
O-level English?
The MSDN documentation has examples.
"But in Java the reference variable is not properly defined."
What reference are you talking about? And in simple terms a reference is the memory address of the object.
Finished. Do I get your grade marks?
What happens when you run it?
European locales generally use the 24 hour clock for times, based on the system regional settings. You would need to create a custom locale based on the system and modify the time settings. But this is not a good idea as it means the user would see times in an unfamiliar format.

1. I try to learn to code
2. and I came up with a task that is too difficult
3. but I would like to finish it

OK, well that is fine, but you need to consider some of the advice you have been given.

1. You will not easily learn to code from forums like this. Find a good online tutorial, or get hold of a book. Many are translated so you should be able to study in your own language.

2. If the task is too difficult then consider something simpler. Alternatively, break it down into sections as I suggested above.

3. And that is very commendable but you must learn to walk before you can run. Start simple and build up slowly. There are no shortcuts to becoming skilled in any subject.
butbthis is not what I want
What do you want?
Have a 5 from me. I omitted the width specification in the (rather forlorn) hope that OP would actually study the documentation in detail.
As already suggested, check the documentation: ChromeDriver - WebDriver for Chrome - Getting started[^]
Like I said; please do not repost, it causes duplication of effort. If you want to clarify your question then edit the original.
Look at the KeyError: 'sapi5' message. Now go to your code and check why that produces the error.
The code I gave you is not adding the backslash. See updated solution.
"it did not work"
We have no idea what that means. Please use the Improve question link below your question, and add complete details.
"Now, what should I do?"
At a guess, because there is a bit of detail missing, you should use the debugger to find out:
1. Exactly what is being returned from the call to getStringCellValue()
2. Find out why the split call does not work.
I am not sure why you would get the username, date of birth and age from a single cell.
I have not heard of Processing, so cannot make a suggestion there. But you may find that Tkinter is a better choice for a Python GUI, Take a look at tkinter — Python interface to Tcl/Tk — Python 3.9.5 documentation[^].
Richard MacCutchan 6-Jun-21 15:02pm View
Please stop and think. Look at your code, and the error message, and show us the complete details. Nothing you have posted up to now looks like the real issue.
Richard MacCutchan 6-Jun-21 12:57pm View
No it is not, go and look again, carefully, at the difference between the two words.
Richard MacCutchan 6-Jun-21 12:44pm View
... and a Hazmat suit. :)
Richard MacCutchan 6-Jun-21 12:26pm View
So you still expect us to guess what error you are talking about and where it occurs. If you really want help with your problem then please provide proper details. We have no idea what you see when you try to run this, or what the circumstances are.
Richard MacCutchan 6-Jun-21 12:13pm View
You forgot to combine the filepath and the filname in your UploadFile function. Try something like:
    data, err := ioutil.ReadFile(filepath + filename)
Richard MacCutchan 6-Jun-21 11:10am View
You cannot expect anyone here to be able to guess where in those 500+ lines of code the error occurs, or what circumstances cause it.
Richard MacCutchan 6-Jun-21 8:27am View
As I said above, you should talk to the person who posted the video. There is possibly something missing in the framework code.
Richard MacCutchan 6-Jun-21 7:24am View
What is the NODE structure?
Richard MacCutchan 6-Jun-21 7:21am View
Talk to Amazon, it's their system.
Richard MacCutchan 6-Jun-21 3:55am View
That code is surely auto generated by some tool (and I don't mean OP). :)
Richard MacCutchan 6-Jun-21 3:30am View
There is only one line in that code that is C++. And the bool type needs to be defined for a C compiler. Other than that it is pure C.
Richard MacCutchan 6-Jun-21 3:19am View
You don't seriously believe that anyone here will have the time to trawl through two and a half thousand lines of unformatted code looking for an extra or missing control character.
Richard MacCutchan 6-Jun-21 3:01am View
Sorry, no idea. I have used similar method calls in Win32 (C/C++), and Windows Forms applications, but never had a problem. Maybe it is something unique to WPF.
Richard MacCutchan 5-Jun-21 7:19am View
See my updated answer.
Richard MacCutchan 5-Jun-21 6:05am View
Thanks, you are welcome.
Richard MacCutchan 5-Jun-21 6:03am View
Maybe you should return the List<Thread> object from the call to createThreads. The main method can then get a random number, and use that thread item to get the information.
Richard MacCutchan 5-Jun-21 5:59am View
You are correct, my mistake based on the editor's syntax colouring. But I think line 19 may actually be the problem; it has three double quotes.
Richard MacCutchan 5-Jun-21 5:13am View
Richard MacCutchan 5-Jun-21 5:13am View
"Only std::cout allowed for text output."

Your instructions suggest this should be written in C++, but you are using C#.
Richard MacCutchan 5-Jun-21 4:47am View
You do not check the result of your insert command, so you have no idea whether it succeeded or not.
Richard MacCutchan 5-Jun-21 3:44am View
Which line does the error occur on?
Richard MacCutchan 5-Jun-21 3:38am View
"But it is showing Runtime error."
Do you not think it would be a good idea to explain what error you see?
Richard MacCutchan 5-Jun-21 3:31am View
You are welcome. Quite a neat program by the way.
Richard MacCutchan 4-Jun-21 12:05pm View
Sorry I am new to pandas. But I would guess that you need to convert the time strings from the data into TimeStamps and then use pandas.Timedelta — pandas 1.2.4 documentation[^] to calculate the differences.
Richard MacCutchan 4-Jun-21 10:26am View
You do not say where this data is coming from, but it mat be easier to remove the unwanted data as you read it.
Richard MacCutchan 4-Jun-21 7:46am View
There is something missing somewhere in your secret code.
Richard MacCutchan 4-Jun-21 6:41am View
Then you posted your question in the wrong place. Please go to Bugs and Suggestions[^] and post the details, and the administrators will help you.
Richard MacCutchan 4-Jun-21 5:55am View
And? Tried it where? What happened?

We have no idea what you are doing, so unless you explain in detail there is no way we can suggest a possible solution.
Richard MacCutchan 4-Jun-21 5:42am View
Because *a is the address of the first row, which happens to be the same as the address of the array.
Richard MacCutchan 4-Jun-21 5:35am View
pathname: path.join(__dirname, `./dist/index.html`),
Are you sure that '.' is valid in the path?
Richard MacCutchan 3-Jun-21 14:39pm View
Don't do this. If you make a mistake while writing the update then all your data can be lost.
Richard MacCutchan 3-Jun-21 12:00pm View
In theory all characters are allowed. But you did not tell us what you tried, where you tried it, or exactly what errors or problems you encountered.
Richard MacCutchan 3-Jun-21 9:36am View
"what is wrong with my code?"
No idea, but this is not a Solution. Please open your own question, and provide proper details of what problem you are facing.
Richard MacCutchan 3-Jun-21 8:50am View
Is this a programming question?
Richard MacCutchan 3-Jun-21 5:18am View
Your class name is customer, starting with a lower case letter.
Richard MacCutchan 3-Jun-21 5:18am View
Nor is it the same as "customer".
Richard MacCutchan 3-Jun-21 3:05am View
I suspect the issue may be that the C++ dll is the cause of the problem. You need to get together with the person who wrote it to find out exactly what target CPU it has been made for.
Richard MacCutchan 2-Jun-21 16:56pm View
You need to use the value of V to get the average, as specified in paragraph 2 above.
Richard MacCutchan 2-Jun-21 10:35am View
This is not a Solution.
Richard MacCutchan 2-Jun-21 7:29am View
You need to use the debugger to find out what is going on.
Richard MacCutchan 2-Jun-21 7:27am View
"Any suggetions."
Yes, please edit your question and add some proper detail. We have no idea what it is that failed, or why.
Richard MacCutchan 2-Jun-21 4:33am View
Richard MacCutchan 2-Jun-21 4:01am View
Well done, you copied my solution to your original question. But you removed the key comment that pointed out that your code will never exit the while loop, and thus never evaluate the reply to the question. Try and think why that is.
Richard MacCutchan 2-Jun-21 3:58am View
Yes, but school is boring. :)
Richard MacCutchan 2-Jun-21 3:57am View
That is telling you that the compiler/linker cannot find a definition of the function setup_adc. So either you forgot to write it in your code, or it is part of an external library that you did not include in your build.
Richard MacCutchan 1-Jun-21 15:49pm View
Look at the comments I have put in your code. You accept the answer from the user, but then just continue the while loop.
Richard MacCutchan 1-Jun-21 15:43pm View
The final <?php tag has not been closed.
Richard MacCutchan 1-Jun-21 12:33pm View
You forgot to include your code.
Richard MacCutchan 1-Jun-21 11:58am View
Richard MacCutchan 1-Jun-21 11:54am View
sumTempWeek = 0;
Richard MacCutchan 1-Jun-21 11:25am View
You need to reset sumTempWeek to zero after printing the total.
Richard MacCutchan 1-Jun-21 11:21am View
"problem not fixed"
Sorry, we are not mind readers. If you have a problem then please provide full details in your question.
Richard MacCutchan 1-Jun-21 8:23am View
See Solution 2
Richard MacCutchan 1-Jun-21 7:01am View
What is the question?
Richard MacCutchan 1-Jun-21 6:35am View
Look at line 24, you have a semi-colon that should not be there.
Richard MacCutchan 1-Jun-21 5:15am View
Maybe next week. :)
Richard MacCutchan 1-Jun-21 5:13am View
"Exception: The remote server returned an error: (401)."
It could not be more clear that the issue is on the server side. So examine all the information that the server returns to find out why it gives a 401. If necessary check the API documentation for the system in question.
Richard MacCutchan 1-Jun-21 3:48am View
If you really don't understand something as important as scope rules and class instantiation then I think your struggles are far from over.
Richard MacCutchan 1-Jun-21 3:40am View
It all happens by magic.
Richard MacCutchan 1-Jun-21 3:20am View
I did not tell you to change the path. I suggested that you use the debugger to establish whether it is correct or not. Start by reading the documentation at Class (Java Platform SE 7 )[^], which explains the syntax of the path string. Then compare that with what you have, and the location of your resource at run time.
Richard MacCutchan 1-Jun-21 3:16am View
So add a simple for loop that repeats 5 times.
Richard MacCutchan 31-May-21 15:04pm View
You have edited the question and removed the part that my comment refers to. But what is left makes no more sense.
Richard MacCutchan 31-May-21 12:32pm View
If you are waiting for someone here to write your assignment, you will have a very long wait.
Richard MacCutchan 31-May-21 11:42am View
The if statement is testing the number of rows returned from the database. If that is not equal to 1 then the code does nothing.
Richard MacCutchan 31-May-21 11:40am View
"but it did not work."
Please do not say that; it means nothing to us. Show the actual data you are using, and the results you get.
Richard MacCutchan 31-May-21 10:46am View
You only need one filter, and it should use the suit parameter from the call. You are also using startsWith in your filter, but the card names end with the suit.
Richard MacCutchan 31-May-21 10:29am View
Where exactly do you want to change 1 to 5?
Richard MacCutchan 31-May-21 9:22am View
"expected- WfRb+Vugfc1cbJNfXKL6bw=="
Why would you expect "5512065314089" to be encrypted and decrypted to "WfRb+Vugfc1cbJNfXKL6bw=="?
Richard MacCutchan 31-May-21 9:03am View
ActiveX is largely unsupported owing to security considerations.
Richard MacCutchan 31-May-21 7:55am View
"how to make with CSS ?"
C# does not use CSS. And that code will not convert directly into C#. You need to explain clearly what problem you are trying to solve.
Richard MacCutchan 31-May-21 5:30am View
Read again what I said. This is a server issue, and the server is telling you that your request is not allowed. So you need to talk to the owners of the server to find out why. Most likely it is because the server does not make files available for direct access. The only way you can get them is by clicking some download control on the server web pages, which then gets the file's content from the server and passes it to the browser.
Richard MacCutchan 31-May-21 5:02am View
The 403 status is returned from the server. You cannot circumvent that through code.
Richard MacCutchan 31-May-21 3:14am View
"where are the descriptions for ",options""
See the final sentence in my answer above.
Richard MacCutchan 30-May-21 12:05pm View
Yes, life is hard. But if you never try you will definitely never succeed.
Richard MacCutchan 30-May-21 10:34am View
The multiplications happen on the return statements:
Multiply 3 by the return value from the recursed call ... and return it back to the next level. So the very last return will effectively be what I showed above.
Richard MacCutchan 30-May-21 7:41am View
What is the problem? Please show the complete code and explain what results you get.
Richard MacCutchan 30-May-21 3:29am View
What is wrong with the code you have written?
Richard MacCutchan 30-May-21 3:27am View
Without seeing some code and the exact error message, and the line it refers to, it is impossible to answer the question.
Richard MacCutchan 30-May-21 3:11am View
Then you need to use some other option to filter the results, maybe SQL SELECT DISTINCT Statement[^]. Seriously, spend some time actually learning the system you are trying to use.
Richard MacCutchan 29-May-21 16:22pm View
No, you are just trying tpo waste our time.
Richard MacCutchan 29-May-21 16:19pm View
It is just a shorthand way of saying this.x = x. As explained in the C++ documentation.
Richard MacCutchan 29-May-21 11:36am View
see my suggested solution below.
Richard MacCutchan 29-May-21 10:24am View
See Solution below.
Richard MacCutchan 29-May-21 8:56am View
What exactly is the problem?
Richard MacCutchan 29-May-21 3:16am View
"Is the instance, stored on the Stack or Heap?"
Richard MacCutchan 29-May-21 3:11am View
The message is clear, some file does not exist where your program thinks it is.
Richard MacCutchan 29-May-21 3:10am View
What errors?
Richard MacCutchan 28-May-21 12:49pm View
Good luck.
Richard MacCutchan 28-May-21 11:33am View
"mas que não funciona."
Even in English, which is the language of this website, that tells us nothing.
Richard MacCutchan 28-May-21 10:59am View
Most likely because the people who wrote the code for the ChtomeDriver knew what they were doing. If you want the full explanation then check the documentation.
Richard MacCutchan 28-May-21 9:05am View
You need to do what the message tells you.
Richard MacCutchan 28-May-21 9:05am View
The only time it is important is when they need to be kept in a header file.
Richard MacCutchan 28-May-21 9:03am View
"its shows error."
What makes you believe that a bunch of strangers on the internet can see the error message on your screen?
Richard MacCutchan 28-May-21 8:04am View
No, she would just utter a spell.
Richard MacCutchan 28-May-21 7:56am View
Eloquently stated. And something else to add to "things I need to study".
Richard MacCutchan 28-May-21 7:23am View
1. I have fixed your formatting as far as I can, but you need to check it is correct.
2. You forgot to ask a question.
Richard MacCutchan 28-May-21 7:13am View
Please see my comment in your other question. Converting some code you found on the internet was not part of the assignment.
Richard MacCutchan 28-May-21 4:52am View
Thanks. I do wonder what, and how well, some of these new people are being taught.
Richard MacCutchan 28-May-21 4:32am View
Some people you just cannot help.
Richard MacCutchan 28-May-21 4:29am View
Creating a Winform is just a matter of creating a new class, adding controls to it, and calling the different methods to display it on the screen. You could have a skeleton form in your project that just needs to have controls added at runtime.

Saving the layout and/or content of a form (or any other data) can be done in a number of different ways: serialization, configuration settings, database etc. But first you need to decide what you need to save and where to save it according to your requirements.
Richard MacCutchan 28-May-21 3:48am View
As I explained yesterday, you cannot do it this way.
Richard MacCutchan 28-May-21 3:42am View
Food for thought: The Lounge[^].
Richard MacCutchan 28-May-21 3:07am View
Why would I need to? You have shown the question in your post above. If what you posted is not correct then please change it.
Richard MacCutchan 27-May-21 12:53pm View
Well you are still going to have problems. You can follow the rules and get it to work, or you can ignore the rules and continue to have problems.
Richard MacCutchan 27-May-21 10:54am View
Nearly 1000 lines of code?
Richard MacCutchan 27-May-21 10:02am View
Use an if statement or a ternary expression.

And why are you using long long types for such small numbers?
Richard MacCutchan 27-May-21 7:17am View
I was trying to recover some data from my (paid for) cloud based backup system the other day and suddenly got a popup saying:
"Object reference not set to an instance of an object".

I had to laugh (briefly).
Richard MacCutchan 27-May-21 7:01am View
Like I said, you first need to use the debugger to check that this is the actual problem. If you confirm that the return value is null then you can test for that condition and take some action.
Richard MacCutchan 27-May-21 6:57am View
you need to learn to stop and think before you start coding. Write things out on paper, one step at a time. And keep your methods simple, so that they only do one thing. The problem you got into above is because you are trying to do the reading, sorting and writing, inside the same method. This is especially important when you are fairly new to the subject.

Once you are happy that the overall logic meets your requirements then you can start coding.
Richard MacCutchan 27-May-21 6:18am View
You have still not shown the structure of the dengue_patient items. And we still have no idea what the problem is or where it occurs. If you want help then you need to help us understand your code.
Richard MacCutchan 27-May-21 6:15am View
You are assuming that all four columns contain data that can be converted to strings. But what if one column does not contain any data? Check your inputs first, don't assume they all contain valid data.
Richard MacCutchan 27-May-21 4:42am View
You need to provide more details of exactly what is going wrong and which line causes the problem. It may help if you show the structure of the dp_list items.
Richard MacCutchan 27-May-21 4:09am View
You are likely to get things very confused like that. The design of the Windows system is such that any drawing done outside of the OnPaint event, can get erased, so if you do it the way you suggest you may end up with nothing. You should collect all your data in the background workers, but do all the paining in the one Form event handler. And remember if you do too much painting too fast you will end up with a flickering form that drives your users mad.
Richard MacCutchan 27-May-21 3:37am View
In encryption/decryption, data is just considered as a stream of bytes. The encryption code does not try to understand its format.
Richard MacCutchan 27-May-21 3:34am View
Do you have a question?
Richard MacCutchan 27-May-21 3:29am View
It is commonly caused by dates or other numeric strings in the wrong order. For example a date of birth giving the month and day in the wrong order. But it sounds like a badly designed website.
Richard MacCutchan 26-May-21 16:28pm View
Ok, please feel free to go ahead and write it.
Richard MacCutchan 26-May-21 11:06am View
Use a for or do/while loop.
Richard MacCutchan 26-May-21 11:00am View
You forgot to include the error message.
Richard MacCutchan 26-May-21 7:43am View
Where is the code for ShowEmp?
Richard MacCutchan 26-May-21 5:27am View
My answer will only work for running a Java application, which is what your question was asking about. Any normal executable runs in the default Windows locale, so needs to use the features of the Windows SDK.
Richard MacCutchan 26-May-21 5:12am View
That is a different issue and you would need to check the options for whatever language the other program is written in. The quickest solution would probably be to modify the original program. Most languages allow applications to set their own locale.
Richard MacCutchan 26-May-21 4:57am View
You can set some properties for an application when you launch it. So the following command will run the application in the US locale:
java -D"" Application
Richard MacCutchan 26-May-21 4:26am View
The widget needs to know which font and character set that the filename is saved in.
Richard MacCutchan 26-May-21 4:20am View
I suggested <= although not strictly the rule. I am never sure why you should take the second value if they are equal.
Richard MacCutchan 26-May-21 3:41am View
Look at your definition of min and max, they are both returning the minimum value.
Richard MacCutchan 26-May-21 3:40am View
Are you the same person as priyaa_2021?