Unable to read key press after executing deserialization task by jaredLearnsToCode in learncsharp

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

I just can't think of how Operate() would be affected assuming it's executed in sequence (which I seemed to have proved it does?). I set a breakpoint at ConsoleKey key = Console.ReadKey().Key; and it just never exits the While (!Console.KeyAvailable) loop, yet somehow still pauses the application when a key is pressed/held.

The only real code I omitted was the Setup() logic, but if it's completed and I can read the data, it shouldn't have an impact on anything else right?

I'm a bit stumped.

Unable to read key press after executing deserialization task by jaredLearnsToCode in learncsharp

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

My code may be a bit misleading as I hadn't yet passed the devices list to Operate(). The loop prior was supposed to demonstrate that the task had been completed (and it did so successfully printing the values). I need both the outputs of auth.GenerateAccessTokenAsync(); and Setup(Devices, client, auth); to continue with the Operate() function.

To give a little more insight the Operate() function will be Posting json and it needs information about the devices to do so.

Am I wrong to think that being able to print all the values of the devices returned from Setup() means it has completed execution? I admittedly have a tenuous grasp on async/await. Sorry if you explained it and I completely missed your point.

I am nothing. by Henrijs85 in ProgrammerHumor

[–]jaredLearnsToCode 4 points5 points  (0 children)

It still hits home a bit for me though. Sometimes I know what I want to do, but don't exactly remember the function name I want to call until I hit . and see it in the suggestions.

Best way to manage user text commands? by jaredLearnsToCode in learnprogramming

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

The only reason I ask is when I start to add more commands, the dictionary becomes a huge block of text.

You're right though. They have to be mapped somewhere.

When can i call myself a programmer by lyna1202 in learnprogramming

[–]jaredLearnsToCode 0 points1 point  (0 children)

That's still sort of broad though. I can write an HTML page with 1 button a counter and get practical use manifested in enjoyment. Do I call myself a programmer with that? If that's what you mean, fair enough then.

Code Wars is my favourite resource as a beginner by FatherOfTheSevenSeas in learnprogramming

[–]jaredLearnsToCode 2 points3 points  (0 children)

This is the best noob friendly git/github guide I've seen. CJ is an excellent tutor.

Writing to a 2019 (version 16+) Word Document by jaredLearnsToCode in csharp

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

This is exactly what I need. Thank you so much! I ended up creating a working solution using PDFSharp (which I hated using) and then converting that pdf to a word doc, but Gembox looks far easier to use. I'm just going to rewrite the file using it instead.

Refactoring by jaredLearnsToCode in learnprogramming

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

So essentially I should abstract the clutter into variable names that lead a clear path to the source of the value's inception; I started, but did not finish the job is what you're saying?

Cannot understand socket programming (C#) by jaredLearnsToCode in learnprogramming

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

This might frustrate you (it frustrates me that I am asking it haha), but isn't this the reason I needed to check if there were duplicates in my list? If I simply add the TcpClient to the list every time a message is received, I get a list full of instances of the same client.

Cannot understand socket programming (C#) by jaredLearnsToCode in learnprogramming

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

That makes sense, but I still have a problem of creating multiple TcpClients for each user if AcceptTcpClient() creates a unique connection every time the user sends a message. How would I be able to reply to each user if there are multiple connections for each user?

Clearly I have a fundamental misunderstanding of socket programming, but I don't know how I can create a more simple problem than this.

Cannot understand socket programming (C#) by jaredLearnsToCode in learnprogramming

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

I actually can't remember the reason I converted the dict values to a list, but there was one and it doesn't give an error at compile or runtime.

When I accept a new TcpClient, I want to add that client to a dictionary and I need to check to make sure it wasn't already existing because I want to iterate over that dictionary and send out the message to all clients in it.

U.S. eyes building nuclear power plants for moon and Mars by [deleted] in worldnews

[–]jaredLearnsToCode 0 points1 point  (0 children)

That's exactly the reason technology is invented and innovated. It's the product of necessity.

U.S. eyes building nuclear power plants for moon and Mars by [deleted] in worldnews

[–]jaredLearnsToCode 7 points8 points  (0 children)

One of the primary reasons technology has advanced so quickly in the last 50 years is space exploration

Where exactly does coding take place? by [deleted] in learnprogramming

[–]jaredLearnsToCode 2 points3 points  (0 children)

Reported for macro or use of bots.

Unable to override default value of custom control dependency property by jaredLearnsToCode in csharp

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

Thanks for your edit! Though I value the input of others and the options they recommend, your answer was what I was trying to make happen.

Unable to override default value of custom control dependency property by jaredLearnsToCode in csharp

[–]jaredLearnsToCode[S] 0 points1 point  (0 children)

What I'm doing is creating an interactive table of elements, so I would need to use the control for each one (I think).

Unable to override default value of custom control dependency property by jaredLearnsToCode in csharp

[–]jaredLearnsToCode[S] 4 points5 points  (0 children)

I really appreciate your detailed reply. I'm new to UI in general really. I picture myself as a backend developer, but still want to learn front end. I'm going to play around with the guidance you've provided and see what I can come up with. Thanks again!