[Solved] How can I use combobox with wpf mvvm

Your code in LocationFilter make no sense at all. ParticularEntries.Select(pg => pg.Region.Location == _selectedLocation); It returns an IEnumerable<bool> but it is never assigned. If you want to filter, you have to use Where. But even if you change your code to ParticularEntries = ParticularEntries.Where(pg => pg.Region.Location == _selectedLocation); you will see a change, but you … Read more

[Solved] logic help for smallest/largest value

You need to choose a standard unit of measure. The question suggests meters, so use that (you can use float or double for this, depending on what precision you need). The problem is then simple, create some variables for the sum, smallest seen, and largest seen, the for each new input, convert to the standard … Read more

[Solved] Print numbers in columns c++

I want to print a string array containing numbers organized in columns. The array contains {“2″,”1″,”3″,”16″,”8″,”3″,”4″,”1″,”2”} I want to print them in this form 2 16 4 1 8 1 3 3 2 For the the given code of yours, you can do following changes to achieve the result. Find the array length using sizeof(arr)/sizeof(*arr);. … Read more

[Solved] C# how to check if var contains constructor Params

how do i print instead of nothing – “unknown”? You can use the null-coalescing operator public string DogsOverall() { return $”Name {Name ?? “unknown”}, sex{Sex ?? “unknown”}, fathers name is {Father ?? “unknown”}, mothers name is {Mother ?? “unknown”}”; } solved C# how to check if var contains constructor Params

[Solved] While Loop In C++

Here’s the answer, you should prompt for input, then check the input using a while loop instead of IF-ELSE to make sure the user provided the answer you desired. This is actually a simple logic question tho. You may explore do-while loop too. #include <iostream> using namespace std; int main() { string item; float price; … Read more

[Solved] Can a string literal and a non-string non-compound literal be modified? [duplicate]

From the C Standard (6.4.5 String literals) 7 It is unspecified whether these arrays are distinct provided their elements have the appropriate values. If the program attempts to modify such an array, the behavior is undefined. As for your statement. The second paragraph says that “C does not strictly prohibit modifying string literals” while compilers … Read more

[Solved] How to Assign NULL to XS:date XML Format

If you control the XSD, you might redefine type field from being strictly xs:date to being <xs:simpleType name=”dateOrEmpty”> <xs:list itemType=”xs:date” maxLength=”1″/> </xs:simpleType> as answered by Michael Kay in a question regarding how to allow an XSD date to be an empty string. solved How to Assign NULL to XS:date XML Format

[Solved] How do I split a string with ‘$’ delimiter? [closed]

Split method returns a string array, if you need both elements of this array, Try: string s = “FINAL PAYMENT $25”; string[] resArray = s.Split(‘$’); var FPayment = resArray[0]; var second25= resArray[1]; 5 solved How do I split a string with ‘$’ delimiter? [closed]

[Solved] Could not push integer value in Stack. Can not convert char to int [closed]

Apparently type char is converted to ascii code. You have to use string to get the real number. Try this if (Char.IsDigit(c)) intChar.Push( Convert.ToInt32(c.ToString()) ); another way is to use GetNumericValue function. Since it returns double, it needs to be cast to int. if (Char.IsDigit(c)) intChar.Push( (int)Char.GetNumericValue(c) ); solved Could not push integer value in … Read more

[Solved] The function is not returning in clang

Actually, the function returns a value. Maybe you want to see it, so just print the result: #include <stdio.h> #include <cs50.h> int calcrectarea(int len,int wid){ return len*wid; } int main(){ printf(“enter length here:\n”); int x; scanf(“%d”,&x); printf(“enter width here:\n”); int y; scanf(“%d”, &y); printf(“area is: %d”, calcrectarea(x,y)); } solved The function is not returning in … Read more

[Solved] Function overloaded by bool and enum type is not differentiated while called using multiple ternary operator in C++

That is because the ternary operator always evaluates to a single type. You can’t “return” different types with this operator. When the compiler encounters such an expression he tries to figure out whether he can reduce the whole thing to one type. If that’s not possible you get a compile error. In your case there … Read more