[Solved] System.Linq.Expression.Compile error

Resolved. The method was called recursively, creating the parameter and the expression and returned to himself. In this process the parameters were removed from memory, as they had already been used believed not to have problems. But they need to be kept in memory until the time of compilation. In this case I used a … Read more

[Solved] Static List in C#

Please try below code. It might work for you. Use predicate to find element from List. public static class A { public static readonly List<string> alist = new List<string> { //some big data about 70 rows }; public struct astruct { public const string adata = “a data”; } } public class B { string … Read more

[Solved] can not understand this SEGFAULT [closed]

Here is one issue: void WaveTableManager::insert(WaveTable * WT,int position) { if (wtvector.size()<=position) wtvector.resize(position); wtvector[position]=WT; // < — Out of bounds access } When you call resize(), the upper bound is vector::size()-1. Since position is the new size of the vector, what you probably want is this: wtvector[position – 1] = WT; 5 solved can not … Read more

[Solved] C++ show me how stop this while infintie loop

You said: I get an infinite loop when user does not enter a number Create a function that prints the prompt, tries to read the number, if reading doesn’t succeed, clears the input stream and calls itself again. double readGrade(int gradeNum) { double grade; cout << “Enter Grade ” << gradeNum <<” (From 0 to … Read more

[Solved] C# Regex questions [closed]

You could try the below regex. @”.*?(?= = CreateObject)|(?<=MoveObject\().*?(?=,)” OR @”\S+?(?= = CreateObject)|(?<=MoveObject\().*?(?=,)” DEMO 3 solved C# Regex questions [closed]

[Solved] Sorting two arrays in c++ [closed]

Just had to limit the inner loop to <9. The fixed code: for(int i=0;i<10;i++) //1st array, ascending { for(int j=0;j<9;j++) { if(array1[j]>array1[j+1]) { int temp=array1[j]; array1[j]=array1[j+1]; array1[j+1]=temp; } } } //Over for(int i=0;i<10;i++) //2nd array, descending { for(int j=0;j<9;j++) { if(array2[j]<array2[j+1]) { int temp=array2[j]; array2[j]=array2[j+1]; array2[j+1]=temp; } } } //Over Thank you guys! solved Sorting … Read more

[Solved] C# – Constantly adding 9 digits

Even after your edit, I don’t find the question very clear. However, I do think I understand that you are essentially trying to generate a random BigInteger value, and that you want the random value to be within a range defined by some specific number of digits. For example, if you ask for a 10-digit … Read more