Click here to Skip to main content
15,903,724 members
Home / Discussions / C#
   

C#

 
GeneralRe: SQL SERVER Instance Pin
jackie.398122-Feb-16 4:15
jackie.398122-Feb-16 4:15 
GeneralRe: SQL SERVER Instance Pin
OriginalGriff22-Feb-16 5:01
mveOriginalGriff22-Feb-16 5:01 
GeneralRe: SQL SERVER Instance Pin
jackie.398122-Feb-16 5:14
jackie.398122-Feb-16 5:14 
GeneralRe: SQL SERVER Instance Pin
OriginalGriff22-Feb-16 6:03
mveOriginalGriff22-Feb-16 6:03 
GeneralRe: SQL SERVER Instance Pin
jackie.398122-Feb-16 6:14
jackie.398122-Feb-16 6:14 
AnswerRe: SQL SERVER Instance Pin
Richard Deeming22-Feb-16 8:07
mveRichard Deeming22-Feb-16 8:07 
GeneralRe: SQL SERVER Instance Pin
OriginalGriff22-Feb-16 8:22
mveOriginalGriff22-Feb-16 8:22 
Questionrun-time "cost" (speed ? memory ?) of resetting a DataSource in order to refresh bound UI Controls ? Pin
BillWoodruff22-Feb-16 0:19
professionalBillWoodruff22-Feb-16 0:19 
AnswerRe: run-time "cost" (speed ? memory ?) of resetting a DataSource in order to refresh bound UI Controls ? Pin
Richard Deeming22-Feb-16 2:05
mveRichard Deeming22-Feb-16 2:05 
GeneralRe: run-time "cost" (speed ? memory ?) of resetting a DataSource in order to refresh bound UI Controls ? Pin
BillWoodruff22-Feb-16 3:12
professionalBillWoodruff22-Feb-16 3:12 
QuestionCan BHO(browser helper object) remove readonly attribute of an input Pin
Edward_Zhao21-Feb-16 17:36
professionalEdward_Zhao21-Feb-16 17:36 
AnswerRe: Can BHO(browser helper object) remove readonly attribute of an input Pin
Kornfeld Eliyahu Peter21-Feb-16 20:42
professionalKornfeld Eliyahu Peter21-Feb-16 20:42 
AnswerRe: Can BHO(browser helper object) remove readonly attribute of an input Pin
Pete O'Hanlon21-Feb-16 20:51
mvePete O'Hanlon21-Feb-16 20:51 
Questionhello guys I have a Question, how to display the result from this program in richtextbox when I push a buttom Pin
Member 1217509321-Feb-16 4:40
Member 1217509321-Feb-16 4:40 
QuestionRe: hello guys I have a Question, how to display the result from this program in richtextbox when I push a buttom Pin
CHill6021-Feb-16 5:23
mveCHill6021-Feb-16 5:23 
AnswerRe: hello guys I have a Question, how to display the result from this program in richtextbox when I push a buttom Pin
OriginalGriff21-Feb-16 5:23
mveOriginalGriff21-Feb-16 5:23 
Questionbest practice for run-time transforming large data set of high-precision values Pin
BillWoodruff20-Feb-16 18:14
professionalBillWoodruff20-Feb-16 18:14 
AnswerRe: best practice for run-time transforming large data set of high-precision values Pin
Garth J Lancaster20-Feb-16 19:02
professionalGarth J Lancaster20-Feb-16 19:02 
GeneralRe: best practice for run-time transforming large data set of high-precision values Pin
BillWoodruff20-Feb-16 19:21
professionalBillWoodruff20-Feb-16 19:21 
AnswerRe: best practice for run-time transforming large data set of high-precision values Pin
Pete O'Hanlon20-Feb-16 23:41
mvePete O'Hanlon20-Feb-16 23:41 
GeneralRe: best practice for run-time transforming large data set of high-precision values Pin
Kenneth Haugland22-Feb-16 2:56
mvaKenneth Haugland22-Feb-16 2:56 
GeneralRe: best practice for run-time transforming large data set of high-precision values Pin
Pete O'Hanlon22-Feb-16 3:30
mvePete O'Hanlon22-Feb-16 3:30 
AnswerRe: best practice for run-time transforming large data set of high-precision values Pin
Luc Pattyn21-Feb-16 11:57
sitebuilderLuc Pattyn21-Feb-16 11:57 
Hi Bill,

1.
From your list, given such a task, I would instinctively go for TransformPoints(), although I haven't ever used it.

2.
However.
Lacking contextual info, it is unclear to me why you would have a PointF[] array in the first place. A PointF[] may of course be a popular parameter type in the API's you are using, if not I would think twice before introducing it.

2a.
If this is a graphical WinForms application, surely PointF[] are sometimes useful. However chances are the transformations provided by the Graphics class could do the job you need done, unless drastic downscaling would cause way too many irrelevant points to be drawn.

2b.
"All" the points of a circle can be generated rather cheaply by algorithmic rotation, using something like:
xNext = x*cos(alpha) - y*sin(alpha);
yNext = y*cos(alpha) + x*sin(alpha);

where alpha is the angular step you want to use to step the circle's circumference. Obviously you need to calculate cos(alpha) and sin(alpha) only once, so each point would cost 4 muls + 2 adds, to be weighed against disk accesses and memory usage.

2b.PS: yes, this iterative approach will accumulate rounding errors; it may well be acceptable for a few hundred/thousand points on your circle. And using double rather than float probably wouldn't increase the cost at all.

2c.
A circle being extremely symmetrical, if you decide to store circular points anyhow, you could consider only storing one eight of a circle (say everything from 0 to 45 degrees). Then, having separate x[] and y[] arrays may prove easier than a single PointF[].

2c.PS: and when you store one eight of a circle, you should consider dealing with the eight points that belong together in a single go, before stepping to the next 8-tuple.


Hope any of this is relevant to you.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum


modified 21-Feb-16 18:13pm.

QuestionFileSystemWatcher Problem Pin
Kevin Marois19-Feb-16 5:26
professionalKevin Marois19-Feb-16 5:26 
AnswerRe: FileSystemWatcher Problem Pin
Richard MacCutchan19-Feb-16 5:39
mveRichard MacCutchan19-Feb-16 5:39 

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.