Click here to Skip to main content
15,891,761 members
Home / Discussions / C#
   

C#

 
GeneralReading XML which has colon in Element Pin
satsumatable17-Apr-08 20:43
satsumatable17-Apr-08 20:43 
GeneralRe: Reading XML which has colon in Element Pin
Christian Graus17-Apr-08 20:50
protectorChristian Graus17-Apr-08 20:50 
Questionhow can i create an twinkle effect on windows start bar as msn does when a message get Pin
greekius17-Apr-08 20:28
greekius17-Apr-08 20:28 
AnswerRe: how can i create an twinkle effect on windows start bar as msn does when a message get Pin
Ajay.k_Singh17-Apr-08 23:05
Ajay.k_Singh17-Apr-08 23:05 
Generalnormalize int data Pin
George_George17-Apr-08 20:28
George_George17-Apr-08 20:28 
GeneralRe: normalize int data Pin
Christian Graus17-Apr-08 20:33
protectorChristian Graus17-Apr-08 20:33 
GeneralRe: normalize int data Pin
George_George17-Apr-08 21:35
George_George17-Apr-08 21:35 
GeneralRe: normalize int data [modified] Pin
Luc Pattyn17-Apr-08 21:08
sitebuilderLuc Pattyn17-Apr-08 21:08 
Hi George,

here is some pseudo-code:
    intCollection iCollection=...;
    // determine int range
    int imin=int.MaxValue;
    int imax=int.MinValue;
    foreach(int i in iCollection) {
        if (i<imin) imin=i;
        if (i>imax) imax=i;
    }
    // determine scaling factors
    float fmin=0.0;
    float fmax=1.0;
    float scale=(fmax-fmin)/(imax-imin);
    // scale
    floatCollection fCollection=...; // empty
    foreach (int i in iCollection) {
        float f=fmin+(i-imin)*scale;   // <<<<<<<<<<<<<< bug fixed
        fCollection.Add(f);
    }
}


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


modified on Friday, April 18, 2008 3:37 AM

GeneralRe: normalize int data Pin
George_George17-Apr-08 21:15
George_George17-Apr-08 21:15 
GeneralRe: normalize int data Pin
George_George17-Apr-08 23:28
George_George17-Apr-08 23:28 
GeneralRe: normalize int data Pin
Luc Pattyn18-Apr-08 7:46
sitebuilderLuc Pattyn18-Apr-08 7:46 
GeneralRe: normalize int data Pin
George_George18-Apr-08 22:08
George_George18-Apr-08 22:08 
GeneralRe: normalize int data Pin
CPallini18-Apr-08 1:53
mveCPallini18-Apr-08 1:53 
GeneralRe: normalize int data Pin
Luc Pattyn18-Apr-08 4:55
sitebuilderLuc Pattyn18-Apr-08 4:55 
GeneralRe: normalize int data Pin
CPallini18-Apr-08 6:40
mveCPallini18-Apr-08 6:40 
GeneralRe: normalize int data Pin
Luc Pattyn18-Apr-08 7:24
sitebuilderLuc Pattyn18-Apr-08 7:24 
QuestionDynamic Controls. Pin
deezZ17-Apr-08 19:07
deezZ17-Apr-08 19:07 
GeneralRe: Dynamic Controls. Pin
Christian Graus17-Apr-08 19:38
protectorChristian Graus17-Apr-08 19:38 
GeneralRe: Dynamic Controls. Pin
darkelv17-Apr-08 19:51
darkelv17-Apr-08 19:51 
GeneralRe: Dynamic Controls. Pin
Christian Graus17-Apr-08 19:55
protectorChristian Graus17-Apr-08 19:55 
GeneralRe: Dynamic Controls. Pin
Razvan Dimescu17-Apr-08 19:58
Razvan Dimescu17-Apr-08 19:58 
GeneralRe: Dynamic Controls. Pin
Nouman Bhatti17-Apr-08 21:10
Nouman Bhatti17-Apr-08 21:10 
GeneralOpenFileDialog then open image Pin
zidan91117-Apr-08 18:34
zidan91117-Apr-08 18:34 
GeneralRe: OpenFileDialog then open image Pin
Christian Graus17-Apr-08 19:39
protectorChristian Graus17-Apr-08 19:39 
GeneralRe: OpenFileDialog then open image Pin
Vikram A Punathambekar17-Apr-08 20:19
Vikram A Punathambekar17-Apr-08 20:19 

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.