Click here to Skip to main content
15,887,596 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionPrint multiple table rdlc report without view in vb.net 2010 Pin
ganesh tale4-Dec-15 16:36
ganesh tale4-Dec-15 16:36 
Question[C# 2008] How to detect any user interaction to implement a screensaver in a Compact Framework environment Pin
steve_94966133-Dec-15 4:44
professionalsteve_94966133-Dec-15 4:44 
AnswerRe: [C# 2008] How to detect any user interaction to implement a screensaver in a Compact Framework environment Pin
Eddy Vluggen3-Dec-15 4:52
professionalEddy Vluggen3-Dec-15 4:52 
GeneralRe: [C# 2008] How to detect any user interaction to implement a screensaver in a Compact Framework environment Pin
steve_94966133-Dec-15 5:27
professionalsteve_94966133-Dec-15 5:27 
AnswerRe: [C# 2008] How to detect any user interaction to implement a screensaver in a Compact Framework environment Pin
Matt T Heffron3-Dec-15 7:15
professionalMatt T Heffron3-Dec-15 7:15 
GeneralRe: [C# 2008] How to detect any user interaction to implement a screensaver in a Compact Framework environment Pin
steve_94966134-Dec-15 4:17
professionalsteve_94966134-Dec-15 4:17 
QuestionHow to calculate a geomean for a datatable column? Pin
Member 952753124-Nov-15 22:22
Member 952753124-Nov-15 22:22 
AnswerRe: How to calculate a geomean for a datatable column? Pin
Richard Deeming25-Nov-15 2:31
mveRichard Deeming25-Nov-15 2:31 
Member 9527531 wrote:
I did successful to calculate Average of a datatable's column by used:
aNewVal = dt.Compute("Sum(Total)", "EmpID = 5")

You've calculated the sum of the values, not the average. To calculate the average (arithmetic mean), you'd need to use Avg(Total) instead.
Member 9527531 wrote:
Do we have a similar command for calculate geomatric mean please? (In VB.net/C#)

There's nothing built-in - see the list of supported expressions on MSDN[^] - so you'll have to roll your own.

Using the arithmetic mean of logarithms[^] and a spot of LINQ, it's quite simple to calculate the geometric mean:
C#
IEnumerable<double> values = dt.AsEnumerable().Where(r => r.Field<int>("EmpID") == 5).Select(r => r.Field<double>("Total"));
double geometricMean = Math.Exp(values.Select(Math.Log).Average());




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: How to calculate a geomean for a datatable column? Pin
Member 95275314-Jul-16 0:19
Member 95275314-Jul-16 0:19 
QuestionIO.Ports.SerialPort Mysterious Delay in port.write Pin
Member 815385219-Nov-15 18:27
Member 815385219-Nov-15 18:27 
Answer[CrossPost] IO.Ports.SerialPort Mysterious Delay in port.write Pin
Garth J Lancaster19-Nov-15 18:47
professionalGarth J Lancaster19-Nov-15 18:47 
GeneralRe: [CrossPost] IO.Ports.SerialPort Mysterious Delay in port.write Pin
Member 815385223-Nov-15 15:37
Member 815385223-Nov-15 15:37 
GeneralRe: [CrossPost] IO.Ports.SerialPort Mysterious Delay in port.write Pin
Dave Kreskowiak23-Nov-15 16:18
mveDave Kreskowiak23-Nov-15 16:18 
GeneralRe: [CrossPost] IO.Ports.SerialPort Mysterious Delay in port.write Pin
Member 815385223-Nov-15 17:10
Member 815385223-Nov-15 17:10 
AnswerRe: IO.Ports.SerialPort Mysterious Delay in port.write Pin
Eddy Vluggen20-Nov-15 6:41
professionalEddy Vluggen20-Nov-15 6:41 
QuestionAfter adding ASP.NET login controls, how do I make it functional? Pin
Kaiser00717-Nov-15 9:10
Kaiser00717-Nov-15 9:10 
AnswerRe: After adding ASP.NET login controls, how do I make it functional? Pin
Richard MacCutchan17-Nov-15 21:49
mveRichard MacCutchan17-Nov-15 21:49 
AnswerRe: After adding ASP.NET login controls, how do I make it functional? Pin
Anil Sharma198318-Nov-15 19:56
professionalAnil Sharma198318-Nov-15 19:56 
GeneralWhy many developer hate asp.net? Pin
Anil Sharma198316-Nov-15 22:46
professionalAnil Sharma198316-Nov-15 22:46 
GeneralRe: Why many developer hate asp.net? Pin
Pete O'Hanlon16-Nov-15 23:04
mvePete O'Hanlon16-Nov-15 23:04 
AnswerRe: Why many developer hate asp.net? Pin
Afzaal Ahmad Zeeshan16-Nov-15 23:22
professionalAfzaal Ahmad Zeeshan16-Nov-15 23:22 
QuestionHow To Show Dll code in asp.net Pin
Robert Matthew29-Oct-15 21:02
Robert Matthew29-Oct-15 21:02 
AnswerRe: How To Show Dll code in asp.net Pin
Richard MacCutchan29-Oct-15 23:02
mveRichard MacCutchan29-Oct-15 23:02 
AnswerRe: How To Show Dll code in asp.net Pin
Dave Kreskowiak30-Oct-15 3:18
mveDave Kreskowiak30-Oct-15 3:18 
GeneralRe: How To Show Dll code in asp.net Pin
Richard MacCutchan30-Oct-15 6:13
mveRichard MacCutchan30-Oct-15 6:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.