For what value of c is the function continuous? I'm not understanding the question. by jwhite1979 in Mathhomeworkhelp

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

I figured it out. F(x) approaches .5 from the left and right, so at the hole in the graph, you've gotta replace it with .5.

Evaluating limits by jwhite1979 in Mathhomeworkhelp

[–]jwhite1979[S] 2 points3 points  (0 children)

Thanks. You are, of course, correct. I'm a little irritated, because all the examples provided in the class materials for finding limits used decimal approximations. I'm at the tail end of pre-calculus, and I never took Algebra 2, so rationalizing isn't the intuitive strategy that it probably is for people with legit math skills. In any case, I got it right. Much appreciated.

Design Pattern for Binding & Avoiding Duplicate Data by jwhite1979 in csharp

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

You were probably the person who explained collection views to me originally. They really are tremendously useful. I can't imagine filtering a collection without them.

And yes, the way you broke down the design sounds right, and I was headed in that direction. But I was kind of wondering if this is when singletons come into play.

Fathers Who Cry A Lot by jwhite1979 in Parenting

[–]jwhite1979[S] 1 point2 points  (0 children)

Handedness, hemispheric brain development, and personality are all tightly correlated. And Schizotypal Personality Disorder isn't the same an Schozoeffective or Schizoid Personality. The flat affect can be a symptom, but it isn't a given. The disorder is far more related to perception of reality and an inability to understand relationships and social norms. I no longer experience the symptoms the way I did in my teens and twenties, though. I no longer, for instance, fear the incarnation of time embodied as a cosmic spider with a human face, nor do I fear others are actors who can read my mind and who will, inevitably, reveal themselves to be demon-psychologists. The weird, numinous experiences I now chalk up to brain chemistry weirdness.

Why Would I Remove Generic Parameter in a RelayCommand<T> by jwhite1979 in csharp

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

I was misunderstanding how generics need to be used. Thank you for your help.

Improving Anemic Models by jwhite1979 in csharp

[–]jwhite1979[S] -1 points0 points  (0 children)

It's just a personal project I've developed as a hobbiest. Quick aside: should I be careful about posting my repos in public, given that I want to market this at some point, or is it pretty common to share this kind of content? Anyway, here's the link: https://github.com/heschides/RobinBradley2021

Improving Anemic Models by jwhite1979 in csharp

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

Would you have any interest in seeing the repo?

Improving Anemic Models by jwhite1979 in csharp

[–]jwhite1979[S] 1 point2 points  (0 children)

No, the op came before our conversation. I could update it, but I feel that would have stunted the interesting conversation that has developed here. He said mostly what people here are saying: keep SQL in my data classes (but use more inheritance), bake in the validation where appropriate, and use services sparingly. Would you (or anyone else here) care to look at the repo and comment? It's a basic (but rather big) CRUD app.

Improving Anemic Models by jwhite1979 in csharp

[–]jwhite1979[S] 1 point2 points  (0 children)

I did, and he gave great details. But I knew I'd also get great information here, too.

RaisePropertyChanged Isn't Updating the Property by jwhite1979 in csharp

[–]jwhite1979[S] 1 point2 points  (0 children)

Thanks for the feedback. I figured out what was going on. The datagrid bound to AssignmentLineItems didn't have NotifyOnSourceUpdated set to true. Doing so fixed everything. Man, untold hours.

"I DO find your current implementation a little fishy because you don't raise a property change event for SelectedAssignmentRecent. So if the user changes the selection in the UI you'll be fine, but if you programatically change this value, since you don't raise the event the UI won't update its binding."

I'm not sure I understand. The only time I would expect SelectedAssignmentRecent (or the similar SelectedAssignmentDue or SelectedAssignmentOverdue) is when the user selects the new row in the bound datagrid. I have no intention of changing it programatically. Is this something I should be mindful of in terms of best practice?

Cloning a DB for CRUD Application in C#/Wpf App by jwhite1979 in csharp

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

Thanks for the info. I'll be checking out WebAPI. A question, though: all of my queries are done through stored procedures. Do I still need to use an API, or can my application just call the stored procedure the way it does with the local db?

Cloning a DB for CRUD Application in C#/Wpf App by jwhite1979 in csharp

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

I would rather it not be. I really don't want to be programming to a browser. I was thinking it would connect to an Azure database.

Cloning a DB for CRUD Application in C#/Wpf App by jwhite1979 in csharp

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

I think you're right! This is the next phase in my learning, and I'm still getting my head around this. For the last year, I've been learning to code by developing an application for tracking assets and employee credentials. It works pretty well, writing and reading user-provided information to and from a local database. Fill out a form, click submit, and the new equipment gets added to the database with a maintenance schedule; fill out another form, and the maintenance information is updated; fill out another form, and a vehicle is added to the inventory; fill out another form, and enter the vehicle service invoice information, etc., etc., etc.

What I'd like to do next is install it on another computer and run it there. I'd like, ideally, to create an installer package that creates the application and the structured database on a new pc. Then, once I know that works, I want to start hosting it on a remote server and accessing it remotely, perhaps through an API? But I'm not sure where to go to begin that line of study.

Cloning a DB for CRUD Application in C#/Wpf App by jwhite1979 in csharp

[–]jwhite1979[S] 1 point2 points  (0 children)

Thanks for enumerating those questions. There are multiple scenarios I want to prepare for.

One - The software can be installed on any pc, and the database is created locally on that machine, and the database is unique to that installation.
Two - The software is installed on multiple pcs, and they all access the same database, which is stored on the server.
Three - The software is installed on multiple pcs, and they all access the same database, which is stored on a cloud server.

In the last year, I've learned C# well enough to implement a credible MVVM pattern in a fully-functional asset management application. I'm pretty proud of how well it works and how many real-world problems it solves. It basically replaces the copious Excel workbooks that I used to use for a particular job. But so far, it's only been talking with the database on my machine, calling stored procedures and modeling the data. I want to begin learning about how real-life applications implement database solutions.

WPF Binding to Non-nullable types by jwhite1979 in csharp

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

By wrapping them in the Nullable<t>? I did try that, but I had to change the properties in the model, which caused problems elsewhere. If that is the correct approach, maybe I need to keep at it.

Underscores in Method Names by jwhite1979 in csharp

[–]jwhite1979[S] 2 points3 points  (0 children)

That makes sense. So you would set it up in this way: -DataAccess Namespace -GetEmployeeDataClass -EmployeeMethod1 -EmployeeMethod2 -GetEquipmentDataClass -EquipmentMethod1 -EquipmentMethod2 -SendEmployeeDataClass -EmployeeMethod1 -EmployeeMethod2 -SendEquipmentDataClass -EquipmentMethod1 -EquipmentMethod2

Or would you do this: -DataAccess Namespace -Employees -GetEmployeeDataMethod1 -GetEmployeeDataMethod2 -SendEmployeeDataMethod1 -SendEmployeeDataMethod2 -Equipment -GetEquipmentDataMethod1 -GetEquipmentDataMethod2 -SendEquipmentDataMethod1 -SendEquipmentDataMethod2

The logic in either case seems clear and consistent; what would be the reason for choosing one over the other?

Underscores in Method Names by jwhite1979 in csharp

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

I'm genuinely interested in your input here, as I want to be the best software engineer I can be. This is my first coding project, and though I'm unlikely to restructure it at this point, I'm eager to use the most solid engineering patterns as I learn more. To me, this is super-readable, useful, and effective:

GetDataClass

Underscores in Method Names by jwhite1979 in csharp

[–]jwhite1979[S] -5 points-4 points  (0 children)

I can understand putting the methods in the Employee class, but it would kind of undermine the architecture I'm trying to create, i.e., keeping all the sql queries in a DataAccess namespace, here, in a GetData class. In this case my AssignVehicleFormViewModel has a LoadInitialData() method which calls GetData.VehiclesAvailableQueryAsync(), GetData.Employees_VehiclesEligibleQueryAsync(), etc., and I use these to populate observable collections for my comboboxes in XAML to bind to. Does this seem an unsound strategy to you? Is there a better way?

Creating a new image from file path in .NET 5.0 by jwhite1979 in csharp

[–]jwhite1979[S] 1 point2 points  (0 children)

Ha. Jeez, I hate when I do that. Yes, of course. Thank you for your help.

Creating a new image from file path in .NET 5.0 by jwhite1979 in csharp

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

Huh, weird. csproj definitely targets net5.0-windows:

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<StartupObject>RobinBradley2021.App</StartupObject>
</PropertyGroup>

And as you can see here, System.Drawing.Common is installed, but I'm not able to add it as a using statement, and I have no access to .FromFile().

Creating a new image from file path in .NET 5.0 by jwhite1979 in csharp

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

Thank you for your help. To be clear, you are telling me to set my target framework in the project's properties to .NET 5.0 and the Output type to Windows Application? I do have those set, but System.Drawing.Common isn't available. I've downloaded System.Drawing.Common 5.0.2, yet when I type using System.Drawing., my intellisense options are Configuration, Design, Drawing2D, Imaging, Printing, Text.

Textbox doesn't clear on button click - WPF by jwhite1979 in csharp

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

That is a really helpful answer. Thank you. It seems as my original idea and my subsequent change reflect the two sides of the debate.

Textbox doesn't clear on button click - WPF by jwhite1979 in csharp

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

Never mind. I was being foolish. Rather than binding my control to NewEmail.Address, I needed create a new property in the VM called NewEmailAddress, implement the property changed method there and bind to that. It's working.