15,902,447 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Pete O'Hanlon (Top 200 by date)
Pete O'Hanlon
6hrs 15mins ago
View
You are most welcome.
Pete O'Hanlon
4 days ago
View
The Github repository that this code comes from has documented this code. https://github.com/Jazea/Onvif.Core
Pete O'Hanlon
4 days ago
View
Well spotted. This is what happens when you code in the Codeproject editor rather than an IDE.
Pete O'Hanlon
4 days ago
View
You put a function call inside your main function. Move the function before main, and then call it from inside your main function.
Pete O'Hanlon
4 days ago
View
So, what you are really asking for is:
Header: string
Body: Multiple lines.
Footer: number
Is that correct?
Pete O'Hanlon
15-May-24 5:21am
View
It wouldn't surprise me.
Pete O'Hanlon
14-May-24 15:34pm
View
You are, of course, correct. This is what happens when you answer a question from memory.
Pete O'Hanlon
14-May-24 8:24am
View
My apologies, the reason you aren't able to handle this here is because you are listening for the wrong thing. What you need to do is add an event handler for the offline event on the window.
Pete O'Hanlon
14-May-24 3:58am
View
I'm not a Visual Basic developer so this might not be 100% correct, but you should be able to get the idea.
Public Function FindAncestorByType(Of T As {DependencyObject, New})( _
ByVal dependencyObject As DependencyObject) As T
Dim parent As DependencyObject = VisualTreeHelper.GetParent(dependencyObject)
If parent Is Nothing Then
Return Nothing
End If
Dim convertedParent As T = TryCast(parent, T)
If convertedParent Is Nothing Then
Return FindAncestorByType(Of T)(parent)
End If
Return convertedParent
End Function
Public Function FindDescendantByType(Of T As {DependencyObject, New})( _
ByVal dependencyObject As DependencyObject) As T
Dim child As DependencyObject = VisualTreeHelper.GetChild(dependencyObject)
If child Is Nothing Then
Return Nothing
End If
Dim convertedChild As T = TryCast(child, T)
If convertedChild Is Nothing Then
Return FindDescendantByType(Of T)(child)
End If
Return convertedChild
End Function
Using these calls, you can find the first instance of a particular type using the relevant call. So, if you wanted to find the DataGridCell from a child, you would call GetAncestorByType. To find the Rectangle, from an element higher in the visual tree you would call GetDescendantByType.
Pete O'Hanlon
14-May-24 3:05am
View
It's not just the cell that sits in the visual tree, it's the rectangle as well. So, once you have the cell, you have to use the visual tree to find the rectangle. Something to remember - your hunt for elements may need to be recursive.
Pete O'Hanlon
12-May-24 5:50am
View
Your image isn't set to share, so we can't see it.
Pete O'Hanlon
10-May-24 6:13am
View
Good luck with that. It's always good to bounce ideas off others.
Pete O'Hanlon
10-May-24 6:12am
View
Thank you so much young sir.
Pete O'Hanlon
10-May-24 5:54am
View
Oh snap.
Pete O'Hanlon
10-May-24 2:57am
View
I'm glad you got this working. Nicely done Anthony.
Pete O'Hanlon
9-May-24 9:10am
View
This question was answered two years ago. Why did you feel the need to post this?
Pete O'Hanlon
9-May-24 3:30am
View
Good luck.
Pete O'Hanlon
8-May-24 16:11pm
View
I thank you kind sir.
Pete O'Hanlon
8-May-24 7:14am
View
That's excellent news. I'm glad it's working for you now.
Pete O'Hanlon
8-May-24 0:22am
View
You are disposing your memory stream before you leave the converter method. Unsurprisingly, this disposes the image information. Just after you call EndInit();, call Freeze(); on your image to freeze the underlying image. This makes your image immutable.
Pete O'Hanlon
7-May-24 11:23am
View
Damn it Griff, your sarcasm was much better than my answer. A 5 from me.
Pete O'Hanlon
6-May-24 11:47am
View
If it's a Nissan, they probably call it something like Sea Mist.
Pete O'Hanlon
3-May-24 9:01am
View
My pleasure. I take it that's sorted for you now.
Pete O'Hanlon
3-May-24 9:00am
View
We aren't going to write code for you. If you want code, pay someone to do it for you. You haven't actually addressed the questions I posed and that is going to lead you to an incorrect solution.
Pete O'Hanlon
3-May-24 8:23am
View
Thanks Richard. I was playing around with combinations of VLOOKUP and SUMIF's then realised this could be done with a lot less difficulty.
Pete O'Hanlon
3-May-24 1:02am
View
Congratulations. I'm pleased that you managed to get it working.
Pete O'Hanlon
2-May-24 1:29am
View
I have already told you that you need to use the index of the cell and the row index. You should be able to do this for yourself now.
Pete O'Hanlon
1-May-24 14:38pm
View
Print this out and frame it. We can close the Internet now for we have reached peak perfection with your reply.
Pete O'Hanlon
1-May-24 11:18am
View
That's happening because you are using the id field in your calculation of the cell and startBook_C for the row. You need to correct your logic to use the index of the cell, and the index of the row. You should be able to work this out for yourself - attaching the debugger and stepping through this logic would have told you that.
Pete O'Hanlon
1-May-24 10:55am
View
So, you corrected the error that you were seeing before and the code compiles and runs. I know you have shared a picture but that doesn't tell me what error you are seeing now.
Pete O'Hanlon
1-May-24 3:15am
View
That got my 5.
Pete O'Hanlon
30-Apr-24 1:40am
View
Again, use the network tab to check what you are passing over. The error is telling you that you didn't supply idunidad, so check to see what you actually did pass across.
Pete O'Hanlon
29-Apr-24 2:39am
View
The error tells you, right at the top, what is wrong. It is expecting a parameter called unitid (idunidad) to be supplied, and this is missing. The server side has an expectation that a none-null value will be passed in here. If you correct this, you might get the results you are expecting. I say might because you may have missed out other parameters.
Pete O'Hanlon
25-Apr-24 12:15pm
View
If you have a Selected property on each row of your grid, when new ones scroll into view (as long as you are still drawing your rectangle), don't set the Selected property to false. That's the easiest part of the whole thing.
Pete O'Hanlon
24-Apr-24 5:08am
View
It's a little bit unclear what you are asking for here. In your example, are Clear and Left methods that can be called? Are they classes? Please give us more context as to what it is that you are trying to accomplish.
Pete O'Hanlon
24-Apr-24 3:08am
View
In the same spirit of generosity of vote as you have shown to others, this deserves a 5.
Pete O'Hanlon
24-Apr-24 2:34am
View
Given that the poster has shown that they are already using iTextSharp, your answer contributes nothing.
Pete O'Hanlon
22-Apr-24 7:16am
View
I'm glad you got it working. Congratulations.
Pete O'Hanlon
22-Apr-24 6:21am
View
Yes. I just simplified the filtering for ease of example.
Pete O'Hanlon
22-Apr-24 6:20am
View
And the source: https://stackblitz.com/edit/primeng-card-demo-p7xb2r?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts
Pete O'Hanlon
22-Apr-24 6:20am
View
https://primeng-card-demo-p7xb2r.stackblitz.io/
Pete O'Hanlon
22-Apr-24 6:12am
View
I have forked your repo and corrected it. You can find the details in my answer.
Pete O'Hanlon
22-Apr-24 4:26am
View
I got that, but the code sample you have in Stackblitz doesn't work so we can't correct it for you.
Pete O'Hanlon
21-Apr-24 13:36pm
View
You set it to false in your code. It needs to be true.
Pete O'Hanlon
18-Apr-24 10:48am
View
So numpy has deprecated this. It's possible that will still work, just add the following:
import warnings
warnings.filterwarnings("ignore", category=np.VisibleDeprecationWarning)
Pete O'Hanlon
18-Apr-24 10:08am
View
It looks like you're expecting to use OData here, but the URL you are hitting looks like a plain URL with no filtering available. You need to check the documentation to see what endpoint you should be hitting and what parameters you need to pass to support filtering. We can't help you with that - only the documentation is going to do that for you.
Pete O'Hanlon
16-Apr-24 5:08am
View
Glad you got it working.
Pete O'Hanlon
16-Apr-24 5:06am
View
That's true - I didn't take as much care copying as I should. I'll correct this.
Pete O'Hanlon
15-Apr-24 16:35pm
View
You’re welcome
Pete O'Hanlon
15-Apr-24 9:27am
View
You can store a class in there, so you could put whatever information you need in that.
Pete O'Hanlon
15-Apr-24 5:19am
View
My 5 for your more elegant solution.
Pete O'Hanlon
14-Apr-24 6:11am
View
This is an environment variable. If you are using docker, it should go in as an entry in your docker-compose yaml file.
Pete O'Hanlon
13-Apr-24 2:55am
View
What error do you get?
Pete O'Hanlon
12-Apr-24 9:33am
View
If an answer is going to be marked as the accepted answer, it should be this one.
Pete O'Hanlon
12-Apr-24 9:32am
View
I know it's only a measly 5 from me, but I wish I could award this 50 on style points alone. Very elegant.
Pete O'Hanlon
12-Apr-24 8:26am
View
This is true and it's such a great reply, you should add it to the question so I can award it as many points as possible and recommend it as the accepted answer.
Pete O'Hanlon
11-Apr-24 2:06am
View
Thank you Maciej.
Pete O'Hanlon
10-Apr-24 4:34am
View
I really wish I could upvote a comment.
Pete O'Hanlon
9-Apr-24 11:26am
View
A simple thing to do is write a class to manage the brush like this:
#include <windows.h>
class BrushHandle {
public:
BrushHandle(HBRUSH brush = nullptr) : brush_(brush) {}
~BrushHandle() {
if (brush_) {
DeleteObject(brush_);
}
}
operator HBRUSH() const {
return brush_;
}
private:
HBRUSH brush_;
};
Then, you can use the brush like this to create the brush:
BrushHandle brush(CreateSolidBrush(RGB(240, 240, 240)));
Pete O'Hanlon
9-Apr-24 11:17am
View
You fix it by correcting the code that triggers this exception. That's as much help as we can offer right now because you haven't given us any code. Think of it this way - we aren't sitting behind you and we haven't hacked into your hardware so we have no idea what the code is.
Pete O'Hanlon
9-Apr-24 11:00am
View
Okay, don't repeatedly create brushes. Store them as members instead and don't forget to destroy the object in the PostNcDestroy method.
Pete O'Hanlon
8-Apr-24 16:59pm
View
Thank you.
Pete O'Hanlon
8-Apr-24 9:15am
View
Have you tried the steps here? https://uk.godaddy.com/help/send-email-using-systemnetmail-in-windows-hosting-19291
Pete O'Hanlon
8-Apr-24 5:47am
View
What versions of Spring Boot and Tomcat are you running here?
Pete O'Hanlon
8-Apr-24 4:13am
View
Thanks.
Pete O'Hanlon
8-Apr-24 4:11am
View
I have updated the answer based on your new requirements.
Pete O'Hanlon
6-Apr-24 15:05pm
View
Unblocked again.
Pete O'Hanlon
6-Apr-24 14:01pm
View
I have unblocked your question on that forum.
Pete O'Hanlon
6-Apr-24 6:39am
View
It looks like you're replying to Griff here. Unfortunately, as you have posted this as an answer to your question, he won't be notified of your response.
Pete O'Hanlon
4-Apr-24 16:12pm
View
What am I missing here? I don't see any database updates in there.
Pete O'Hanlon
4-Apr-24 8:29am
View
I'm pleased you found it.
Pete O'Hanlon
3-Apr-24 5:58am
View
You have to explicitly enable server side rendering in React. It's a client-side framework by default. Angular is also client-side, and requires a connection to external services.
Pete O'Hanlon
2-Apr-24 3:22am
View
If you are replying to Andre, he won't be notified that you are doing so because you haven't actually replied to his answer. Don't add answers of your own if they are meant to be replies.
Pete O'Hanlon
2-Apr-24 2:35am
View
I'm glad to see that you sorted the problem. Just a small note - as you didn't reply to my messages, I didn't receive any notifications. If you want to reply to someone, click Reply on their message, don't post a new one that isn't connected.
Pete O'Hanlon
1-Apr-24 6:49am
View
When you download the file, what file name do you see?
Pete O'Hanlon
1-Apr-24 3:16am
View
If you have a question for Griff, post it as a reply to his answer. He will get an email informing him of your question.
Pete O'Hanlon
31-Mar-24 5:03am
View
You are most welcome.
Pete O'Hanlon
28-Mar-24 10:42am
View
This is a truly beautiful answer.
Pete O'Hanlon
27-Mar-24 11:32am
View
I have simplified the string. I was getting too cocky with the input and miscounted the ' characters.
Pete O'Hanlon
27-Mar-24 11:05am
View
That was my mistake - I copied your original code in and left the space in '\ '. I've just updated the answer. Also, if you post what you're actually getting back, that would help.
Pete O'Hanlon
27-Mar-24 3:06am
View
Thank you.
Pete O'Hanlon
26-Mar-24 12:24pm
View
My pleasure.
Pete O'Hanlon
26-Mar-24 12:22pm
View
The only way to do this would be to open the file, and transmit the individual parts of the file.
Pete O'Hanlon
26-Mar-24 12:15pm
View
That's correct.
Pete O'Hanlon
26-Mar-24 11:43am
View
I see that you're uploading the file to the server. The code to change the value would have to be in the handling code at the server.
Pete O'Hanlon
26-Mar-24 7:02am
View
Have you checked that the service is still set to auto-start on the server? Setting the start type to Automatic only applies during the registration of the service. This doesn't override someone else changing the value once it has been installed.
Pete O'Hanlon
26-Mar-24 5:13am
View
What you're probably going to be looking for is OpenIDConnect (OIDC). This sits on top of OAuth, and gives you access to authenticate and gather profile information. See https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2 for further information.
Pete O'Hanlon
26-Mar-24 3:58am
View
Do you get any response back when you issue the fetch, does it return bad data, or does it just hang? Right now, there's a lot going on in that code and you're asking us to guess which part doesn't work.
Pete O'Hanlon
22-Mar-24 4:48am
View
I like it. Have yourself a 5.
Pete O'Hanlon
22-Mar-24 3:23am
View
If you are asking a question, don't hijack an old answer, add a new question.
Pete O'Hanlon
22-Mar-24 3:08am
View
Thank you.
Pete O'Hanlon
20-Mar-24 7:14am
View
I'm not sure what optimisations have been put in place in CArray since I last used it. This approach was one I have used since the mid 90s, going backwards when removing items to avoid *clever* compiler tricks.
Pete O'Hanlon
19-Mar-24 9:32am
View
That's a given.
Pete O'Hanlon
19-Mar-24 9:20am
View
Sounds like something that should be on a range of bumper stickers. "Warnings are for wimps". "Exceptions are for a**holes".
Pete O'Hanlon
19-Mar-24 9:05am
View
You are most welcome. I am a big fan of ETL tools.
Pete O'Hanlon
19-Mar-24 8:50am
View
I'm glad you got it sorted.
Pete O'Hanlon
18-Mar-24 10:04am
View
Thanks Richard. I hadn't noticed that this was a resurrected question.
Pete O'Hanlon
17-Mar-24 14:00pm
View
Thank you.
Pete O'Hanlon
17-Mar-24 13:56pm
View
You should raise it from each property. The key to using this event is knowing that, if you raise the event with the property name as an argument then the binding engine knows the name of the property that changed. If you leave the property name as an empty string, the binding engine thinks all properties have changed.
Pete O'Hanlon
17-Mar-24 6:43am
View
5 from me.
Pete O'Hanlon
15-Mar-24 4:55am
View
Are these services deployed as separate Spring services or is it all in one service?
Pete O'Hanlon
15-Mar-24 2:15am
View
This is all part of the WiX v3 toolset which you can find
here
. The documentation listing the tooling is
here
.
Pete O'Hanlon
14-Mar-24 15:29pm
View
A 5 from me.
Pete O'Hanlon
14-Mar-24 7:14am
View
This has already been solved. Why are you adding to this now?
Pete O'Hanlon
12-Mar-24 14:51pm
View
Thank you so much.
Pete O'Hanlon
12-Mar-24 7:52am
View
I was just coming here to answer this very thing. I'll not bother now because this you answered this with a version of the answer I would have given. A 5 from me.
Pete O'Hanlon
12-Mar-24 7:50am
View
Thank you kind sir.
Pete O'Hanlon
12-Mar-24 7:44am
View
You should post a version of this as the answer so it is removed from the unanswered questions list and, more importantly, so that I can vote for your answer.
Pete O'Hanlon
11-Mar-24 14:43pm
View
My apologies. As I said, I was doing this from memory. The API I was thinking of was this one. https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-systemtimetotzspecificlocaltimeex
Pete O'Hanlon
11-Mar-24 6:58am
View
That's great. Thanks for letting me know.
Pete O'Hanlon
11-Mar-24 1:32am
View
You don't show the code that actually opens the file here. What does that code look like?
Pete O'Hanlon
11-Mar-24 0:18am
View
Have you followed the link yet? This is a cad library that gives support in WPF for Autocad display.
Pete O'Hanlon
8-Mar-24 7:00am
View
Deleted
Which icon are you trying to get? That's the info icon; is that the one you want?
Pete O'Hanlon
7-Mar-24 6:49am
View
Which version of Go are you using?
Pete O'Hanlon
7-Mar-24 6:37am
View
It was my absolute pleasure.
Pete O'Hanlon
7-Mar-24 3:11am
View
You can use Dog without registering it - I was just demonstrating that you didn't need to create an interface just to register a concrete type in the container.
Pete O'Hanlon
5-Mar-24 13:07pm
View
Succinct. I like it.
Pete O'Hanlon
5-Mar-24 2:46am
View
Your question doesn't make sense to me. If you want to zip it up, you could do this yourself. What are you really asking for here?
Pete O'Hanlon
4-Mar-24 14:09pm
View
You are most welcome.
Pete O'Hanlon
27-Feb-24 5:10am
View
The stack trace clearly shows the line that the error occurs in PageNavigationService. What is happening on line 808 and line 815?
Pete O'Hanlon
27-Feb-24 3:14am
View
What does "can't seem to get working" mean? Are you not getting data back? Is one field populating, but not the other? We can't see your screen so we need additional information if we are to help.
Pete O'Hanlon
24-Feb-24 17:06pm
View
Don’t use void on async methods, they hide exceptions. Use Task as the return type.
Pete O'Hanlon
24-Feb-24 17:03pm
View
Perhaps put a link to the nuget package that you have downloaded.
Pete O'Hanlon
23-Feb-24 10:14am
View
5 from me.
Pete O'Hanlon
23-Feb-24 10:04am
View
What error do you have? Saying you have an error is next to useless if we don't know what the problem is.
Pete O'Hanlon
20-Feb-24 14:34pm
View
It's my absolute pleasure.
Pete O'Hanlon
20-Feb-24 12:26pm
View
I have to ask. What type is PermitID in your C# code?
Pete O'Hanlon
19-Feb-24 8:34am
View
Is your tag right? Are you really looking at optimising HTML.
Pete O'Hanlon
9-Feb-24 4:10am
View
If you're looking for Laurent's implementation, you can find his archived GitHub version here. https://github.com/lbugnion/mvvmlight/blob/master/V3/GalaSoft.MvvmLight/GalaSoft.MvvmLight.Extras%20(NET35)/Command/EventToCommand.WPF.cs
Pete O'Hanlon
12-Jan-24 8:37am
View
No need to apologies. I saw that it hadn't been answered and thought "better late than never".
Pete O'Hanlon
12-Jan-24 1:32am
View
Have you looked at the logs in the site to see what's happening internally? That would be the best place to start, when you are trying to diagnose an issue like this. There could be many, many reasons why this is happening (from missing header information, incorrect agents, through to authentication issues), and the logs should give you more of an idea about what's actually going on.
Pete O'Hanlon
13-Dec-23 10:27am
View
Thank you.
Pete O'Hanlon
27-Nov-23 2:59am
View
When you put a breakpoint in GetCategories, what values do the parameters contain?
Pete O'Hanlon
31-Oct-23 11:40am
View
Which library are you using to read the document with?
Pete O'Hanlon
24-Oct-23 11:09am
View
You don't have any code for accessing the camera here so how can we tell you what's wrong with it? I can see the placeholder where you wanted to add the ability, but that view is just an empty bit of placeholder comment right now.
Pete O'Hanlon
1-Aug-23 3:11am
View
We aren't going to write your code for you. We aren't doing your course, so why should we solve your homework for you? You should have all the knowledge you need to solve this; if you don't, approach your tutor to get help.
Pete O'Hanlon
20-Jul-23 2:00am
View
And have you used a dependency checker to see if there are other missing dependencies? https://www.dependencywalker.com/
Pete O'Hanlon
19-Jul-23 8:25am
View
Did you copy the 32 bit DLLs into the build output directory and try that?
Pete O'Hanlon
19-Jun-23 0:56am
View
Then why does your question say that if errors in the loop?
Pete O'Hanlon
18-Jun-23 14:28pm
View
What error does it give? That's a rather important clue missing to what is going wrong.
Pete O'Hanlon
26-May-23 2:00am
View
Try your query out in MySQL directly. If things don't work when you try them through your application, check the query in the actual database itself. Also, change the query to this:
SELECT * FROM tbdata_reservasi WHERE tanggal_masuk >= @ST AND tanggal_keluar <= @ET
Copy and paste that line in directly. You had quotes in your original query, and they weren't needed.
One final thought; what data types have you used in the database for tanggal_masuk and tanggal_keluar?
Pete O'Hanlon
11-May-23 6:40am
View
I think we can guess the answer to that.
Pete O'Hanlon
10-May-23 4:47am
View
Deleted
Is the problem to do with nunit or when you're running the program as a standalone executable? With your wording, I wasn't 100% sure which it was.
Pete O'Hanlon
9-May-23 13:23pm
View
Do you know where in this code that it triggers the denied access operation? You have a number of lines of bluetooth code in there; knowing which one throws the exception would help diagnose the problem.
Pete O'Hanlon
23-Apr-23 15:49pm
View
You're coming across as very hostile in this post. You could simply have moved on, but you've chosen to be angry and make this personal.
Pete O'Hanlon
22-Apr-23 1:34am
View
What is the if statement in your validateUser method? The condition is missing in your question.
Pete O'Hanlon
14-Apr-23 3:08am
View
There are so many things here that mean you aren't going to get any help. First of all, we don't build systems for others, for free. Most members are professional developers, so expect to get paid for their efforts. Second issue; you have a scattergun approach to the languages involved, so we don't know what language you are expecting. Third, if you have tried to build this system, you should tell us what parts didn't work - we might be able to help you with those. Make sure that you are detailed in those posts; saying it doesn't work isn't enough. Show us code that reproduces the errors you are facing, tell us the exact problems you are seeing, and tell us what you have tried so far, to fix it.
Pete O'Hanlon
9-Mar-23 9:25am
View
Just as a matter of interest; your form isn't set to Always On Top is it?
Pete O'Hanlon
21-Feb-23 11:42am
View
Have you looked at the error information? Print this out in the catch block so you know what is causing the error.
Pete O'Hanlon
20-Feb-23 4:10am
View
I understand that it's tempting to come here and ask the people who answer on the site to do your work for you. You have to understand that no one is going to do that for you; people do not like it when others demand that they provide the work.
Pete O'Hanlon
25-Jan-23 8:17am
View
A disconnect does not trigger an exception - it's just an error code. What you need to wait for, is for the async call to time out. Once you get the timeout, EnsureSuccessStatusCode() will trigger an exception. If you want to reduce the timeout on your HttpClient, you can specify that as an option. I believe the default is 100 seconds.
Pete O'Hanlon
12-Jan-23 15:22pm
View
Don't abandon it. It's a fun little challenge and one you should definitely do. Try breaking it down into smaller chunks and solve those.
Pete O'Hanlon
1-Jul-22 3:15am
View
It would help if you could explain, further, what you were trying to accomplish. Are you trying to intercept mouse clicks on the clock widget?
Pete O'Hanlon
13-Jun-22 3:54am
View
Okay, so the problem you have here is with having a version of Excel registered that cannot open .xslx format files.
Pete O'Hanlon
10-Jun-22 6:46am
View
Put a breakpoint at the start of your code and step through it line by line to see which one throws the exception. I have a suspicion you're going to hit it on ReleaseComObject but you need to verify this. If you are just trying to close your application there, you just need to call application.Quit(); rather than ReleaseComObject.
Pete O'Hanlon
23-May-22 9:43am
View
This, as far as I'm concerned, is the correct answer.
Pete O'Hanlon
23-May-22 4:59am
View
You are most welcome.
Pete O'Hanlon
14-Apr-22 4:24am
View
What link are you trying to download? Remember, while you know what you are talking about, without providing clear and detailed thought processes, we have no context to help you here.
Pete O'Hanlon
5-Jan-22 9:16am
View
You're most welcome. I'm glad you're up and running.
Pete O'Hanlon
3-Nov-21 9:54am
View
Your onclick is doing return false.
Pete O'Hanlon
31-Oct-21 14:49pm
View
How much data are you trying to load?
Pete O'Hanlon
5-Oct-21 15:11pm
View
Are you trying to show the status result of a request here?
Pete O'Hanlon
29-Sep-21 6:43am
View
How can we help you? We have no sight of your code. We don't know what errors you are getting?
Pete O'Hanlon
27-Sep-21 11:15am
View
Are you trying to prevent it from being moved again? So, once it's dropped, that's it - it can't be moved ever again.
Pete O'Hanlon
29-Aug-21 10:25am
View
There are plenty of examples here. https://www.google.com/search?q=datetime+tryparse&oq=datetim.tr&aqs=chrome.2.69i58j69i57j0i10i30.7243j0j7&client=ms-android-samsung-gs-rev1&sourceid=chrome-mobile&ie=UTF-8
Pete O'Hanlon
6-Aug-21 6:49am
View
I guess I was the last report. He's outta here now.
Pete O'Hanlon
12-Apr-21 4:21am
View
You can do that as well. I'd be tempted to host a RESTful API on the server and interact with the database that way, if I were writing this.
Pete O'Hanlon
22-Jan-21 17:51pm
View
My 5
Pete O'Hanlon
28-Nov-20 17:29pm
View
What is your actual question? You have just dumped code.
Pete O'Hanlon
13-Nov-20 6:04am
View
Got my 5.
Pete O'Hanlon
13-Nov-20 5:25am
View
Richard's answer below shows what you need to do. The problem you had in your code is the process expects d:\GIT\proj1\GIT to be a runnable command whereas what you are actually trying to do is run GIT (which is in another directory) inside the d:\GIT\proj1 folder.
Pete O'Hanlon
13-Nov-20 4:48am
View
You said you the code doesn't work but that doesn't really tell us anything. Are you getting errors? If so, what errors are you seeing?
The beauty about process commands is that you can try them out without having to run the application. What do you get when you run the
d:\GIT\proj1\git pull master
command?
Pete O'Hanlon
13-Nov-20 4:43am
View
Thanks
Pete O'Hanlon
30-Sep-20 8:50am
View
There are a few paid for components that can do this for you. I've not seen any open source versions that would allow you to do this.
Pete O'Hanlon
30-Sep-20 8:34am
View
You're not an idiot. Sometimes it just takes explaining a problem to someone else to see it.
Pete O'Hanlon
30-Sep-20 8:11am
View
What do you mean when you say it doesn't work? What are you expecting to see when you run it?
Pete O'Hanlon
29-Sep-20 9:11am
View
Your API would look something like this:
[HttpPost]
public IActionResult Post([FromBody]EmailMessage email)
{
// the email message here should match the email you posted in your console
return Ok();
}
Pete O'Hanlon
30-Aug-20 17:48pm
View
Why are you doing async with GetClient? That doesn't need to be awaited.
Pete O'Hanlon
28-May-20 3:22am
View
My 5
Pete O'Hanlon
24-May-20 16:45pm
View
Nice.
Pete O'Hanlon
21-May-20 17:36pm
View
I have indeed. It's pretty straightforward.
Pete O'Hanlon
20-May-20 3:02am
View
This works equally well on Linux solutions (I do this myself). When you publish, just set Linux ARM64 as your target.
Pete O'Hanlon
19-May-20 9:16am
View
Thanks
Pete O'Hanlon
19-May-20 7:39am
View
I just mocked this up and it works perfectly for me. Perhaps you should share your code as to how you added the forms to each other.
Pete O'Hanlon
19-May-20 7:34am
View
What code do you use to close Form3?
Pete O'Hanlon
19-May-20 7:24am
View
So many answers, so many of them unsuitable.... :wink:
Pete O'Hanlon
29-Apr-20 5:53am
View
Sorry I haven't had a chance to respond before; IHttpClientFactory is normally injected into your code if you are using .NET Core and uses the DefaultHttpClientFactory. If you aren't using dependency injection, you can remove the constructor and replace the first using statement with (using HttpClient client = new HttpClient())
By the way, the using statement format you saw in my example was the new way of adding using blocks (introduced in C# 8). You can find details here: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#using-declarations
Pete O'Hanlon
24-Apr-20 6:38am
View
5ed
Pete O'Hanlon
17-Feb-20 2:49am
View
You know what I'm going to say. This is the correct way to do this. My 5.
Pete O'Hanlon
12-Feb-20 3:00am
View
I like it. 5.
Pete O'Hanlon
12-Feb-20 3:00am
View
Thanks.
Pete O'Hanlon
11-Feb-20 15:43pm
View
Thanks.
Pete O'Hanlon
6-Feb-20 9:40am
View
And that's the way to solve it. My 5.
Pete O'Hanlon
6-Feb-20 3:17am
View
It had popped to the top of the queue due to it just being updated.
Pete O'Hanlon
5-Feb-20 7:17am
View
Are you subscribing to the SelectionChanged event? If you are, just disconnect from the event handler before you associate Data with your ItemsSource. Resubscribe to SelectionChange immediately after DataGrid.ItemsSource = Data;.
Pete O'Hanlon
21-Jan-20 8:34am
View
When you get null back here, it's indicating that you have no matching elements being returned.
Pete O'Hanlon
21-Jan-20 8:06am
View
If you are talking about the processing that happens after SingleOrDefault, it will. You need to check to see whether text_block is null before you attempt to do anything with it.
Pete O'Hanlon
21-Jan-20 6:18am
View
You keep restating this and you have posted some code above. How do the two bits tie together? What problems are you actually having with that code? Are you seeing errors? What application infrastructure do you have?
Pete O'Hanlon
14-Jan-20 10:24am
View
That's just restating your requirement. It doesn't tell us what is going wrong with your code (if anything).
Pete O'Hanlon
13-Jan-20 6:24am
View
Do you not think it would be a good idea to find out what problem the poster actually has first?
Show More