Click here to Skip to main content
15,925,133 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to match between two images? Pin
phowarso5-Jun-10 16:07
phowarso5-Jun-10 16:07 
AnswerRe: How to match between two images? Pin
Dr.Walt Fair, PE5-Jun-10 16:59
professionalDr.Walt Fair, PE5-Jun-10 16:59 
AnswerRe: How to match between two images? Pin
Anshul R8-Jun-10 20:02
Anshul R8-Jun-10 20:02 
AnswerRe: How to match between two images? Pin
mvdcorput11-Jun-10 22:57
mvdcorput11-Jun-10 22:57 
QuestionDRAWIMAGE to Print Image Pin
Anubhava Dimri5-Jun-10 2:08
Anubhava Dimri5-Jun-10 2:08 
AnswerRe: DRAWIMAGE to Print Image Pin
Luc Pattyn5-Jun-10 2:55
sitebuilderLuc Pattyn5-Jun-10 2:55 
GeneralRe: DRAWIMAGE to Print Image Pin
Anubhava Dimri6-Jun-10 18:45
Anubhava Dimri6-Jun-10 18:45 
GeneralRe: DRAWIMAGE to Print Image Pin
Luc Pattyn7-Jun-10 1:13
sitebuilderLuc Pattyn7-Jun-10 1:13 
QuestionGUID changes from immediate window to table? [modified] Pin
lemarshall4-Jun-10 17:08
lemarshall4-Jun-10 17:08 
AnswerRe: GUID changes from immediate window to table? Pin
Dave Kreskowiak4-Jun-10 19:21
mveDave Kreskowiak4-Jun-10 19:21 
AnswerRe: GUID changes from immediate window to table? Pin
riced4-Jun-10 20:10
riced4-Jun-10 20:10 
QuestionApache configuration files parser Pin
Murr@y4-Jun-10 7:54
Murr@y4-Jun-10 7:54 
AnswerRe: Apache configuration files parser Pin
Dave Kreskowiak4-Jun-10 8:53
mveDave Kreskowiak4-Jun-10 8:53 
GeneralRe: Apache configuration files parser Pin
Murr@y4-Jun-10 18:38
Murr@y4-Jun-10 18:38 
GeneralRe: Apache configuration files parser Pin
Dave Kreskowiak4-Jun-10 19:16
mveDave Kreskowiak4-Jun-10 19:16 
QuestionVB.Net syntax. Pin
priyamtheone4-Jun-10 6:27
priyamtheone4-Jun-10 6:27 
AnswerRe: VB.Net syntax. Pin
Smithers-Jones4-Jun-10 7:42
Smithers-Jones4-Jun-10 7:42 
GeneralRe: VB.Net syntax. Pin
priyamtheone6-Jun-10 4:23
priyamtheone6-Jun-10 4:23 
AnswerRe: VB.Net syntax. Pin
mvdcorput11-Jun-10 23:02
mvdcorput11-Jun-10 23:02 
QuestionSingle Value Aggregation with PLINQ Pin
Agarwaen594-Jun-10 1:38
Agarwaen594-Jun-10 1:38 
Greetings everyone,

I'm going through Stephen Toub's book "Patterns of Parallel programming" to try and figure out the different tips and tricks of parallel programming.
Besides having found few minor errors in the book already, I'm stuck on the example described on page 71:

Public Const NUM_STEPS As Integer = 1000000
Shared Function ParallelLinqPi() As Double
Dim [step] = 1.0 / CDbl(NUM_STEPS)
Return ParallelEnumerable.Range(0, NUM_STEPS).Select(
Function(i)
Dim x = (i + 0.5) * [step]
Return 4.0 / (1.0 + x * x)
End Function).Sum() * [step]
End Function

The VS underlines this whole chunk of code and explains the following:
"Overload resolution failed because no accessible 'Sum' accepts this number of arguments."
Apparently, the Sum() function at the end needs to have a selector (selector As System.Func(of Object,Double)). There is no mention of this in the book =(

What should I write inside the Sum, to make this example work, any ideas?
Thanks...

Agarwaen
AnswerRe: Single Value Aggregation with PLINQ Pin
Dave Kreskowiak4-Jun-10 8:38
mveDave Kreskowiak4-Jun-10 8:38 
GeneralRe: Single Value Aggregation with PLINQ Pin
Agarwaen596-Jun-10 5:40
Agarwaen596-Jun-10 5:40 
GeneralRe: Single Value Aggregation with PLINQ Pin
Dave Kreskowiak6-Jun-10 7:00
mveDave Kreskowiak6-Jun-10 7:00 
GeneralRe: Single Value Aggregation with PLINQ Pin
Agarwaen596-Jun-10 7:06
Agarwaen596-Jun-10 7:06 
GeneralRe: Single Value Aggregation with PLINQ Pin
Dave Kreskowiak6-Jun-10 8:27
mveDave Kreskowiak6-Jun-10 8:27 

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.