• RELEVANCY SCORE 4.11

    DB:4.11:Mod Function Sometimes Returns Nan 3c





    My program has four subroutines that call MOD one or more times. I'm finding that the various MOD calls in the program will sometimes return NaN. Any ideas on how I could track if this is some problem on my end?

    I am only experiencing this on the 64bit platform (10.1.021). The 32bit build works without any problem.

    DOUBLEPRECISION RESULT,A,B
    B=360.0D0
    RESULT=MOD(A,B)

    If I replace the MOD call with

    RESULT=A-INT(A/B)*B

    I do not get a NaN result.

    I wrote out all the values used in the above MOD calculation to a file and wrote a simple program to read in the values and do a MOD on them. This simple program does not exhibit any problem with the MOD call.

    DB:4.11:Mod Function Sometimes Returns Nan 3c


    To answer your other question, since libmmd and msvcrt both provide "mod" routines with the same external name and same interface, if you have libmmd first then your C code will use libmmd's version and msvcrt's version will not be used since that name has already been resolved by libmmd.

  • RELEVANCY SCORE 3.46

    DB:3.46:Omp_Get_Thread_Num() Returns Nan 3f





    I was working with OpenMP sometimes ago and it was working good, today when I wanted to check something back this function returns NaN value!! even a hello project gets like it:

    program test

    I=10
    !$OMP PARALLEL NUM_THREADS(5)
    PRINT*,I,OMP_GET_THREAD_NUM()
    !$OMP END PARALLEL

    END PROGRAM test
    it prints five time "10 Nan" what can be wrong? any probability some files got damaged? Fix option didn't work

    DB:3.46:Omp_Get_Thread_Num() Returns Nan 3f


    According to the implicit typing rules of Fortran, a variable/function starting with (A-H, O-Z) is of type real. Thus, the integer result returned by the function is being interpreted as an IEEE real, which produces the NaNs that you saw.

    Either USE the OMP module as TimP told you, or declare OMP_GET_THREAD_NUM as INTEGER.

  • RELEVANCY SCORE 2.96

    DB:2.96:Program Gives Different Results Only On One Computer - Problem With Fpu? cm





    I have problems with my notebook. My program gives on it different results. Sometimes correct, sometimes there appears NaN in different places of code and different variables (when I detect NaN and run this part of code again it returns correct result). On another computers are results consistent.

    I think there is problem with FPU. Is there any thorough test of FPU? I tested RAM and it is OK.

    Thanks for suggestions

    Jakub

    DB:2.96:Program Gives Different Results Only On One Computer - Problem With Fpu? cm


    I will try your suggestions.

    Problem occurs in the middle of the array so index +-2 cannot cause problems (ix is allways =2 =Header.nx-2)

    Problem with NaN values occurs only on my notebook other computers I am using have not problems.

    I will report my investigation.

    Jakub

  • RELEVANCY SCORE 2.93

    DB:2.93:Best Fit Returns Nan jp



    I've encountered a problem with the "Linear Fit" function.

    If I give it the following data then it returns NaN for Intercept and Gradient.

    This is when set to "bisquare" method.

    I can find similar examples if I use "least absolute residual" method.

    "Least squares" functions fine.

    x values

    1

    2

    3

    4

    4

    5

    6

    y values

    -0.337

    -0.234

    -0.140

    -0.034

    0.34

    0.05

    0.14

    This is clearly the wrong solution. If I adjust any of the y values by 0.001 then it will work.

    A much simpler example of what it can't cope with is to do a "least absolute residual" through the data

    x=0,0,1

    y=0,0,1










    Attachments:







    cantfit.jpg ‏121 KB

    DB:2.93:Best Fit Returns Nan jp


    I don't really have much choice what's in the array. I know I could treat it beforehand, but I would expect a curve fitting algorithm to be robust enough to deal with the data.

    Because there aren't that many points I'm using my own custom least abs residual method for now.

  • RELEVANCY SCORE 2.90

    DB:2.90:Why Do Nan Comparisons Return True On Winec? c8


    On Win32 any comparison with NaN returns false (and as far as I know everywhere else as well). On WinEC however, any comparison with NaN returns true. Is there a reason for that?
    In the debug 'less than' implementation of Microsoft Visual Studio 9.0\VC\ce\include\xutility, this behavior even results in a debug error invalid operator:
    templateclass _Ty1, class _Ty2 inline bool __CLRCALL_OR_CDECL _Debug_lt(const _Ty1 _Left, const _Ty2 _Right, const wchar_t *_Where, unsigned int _Line)
    { // test if _Left _Right and operator is strict weak ordering
    if (!(_Left _Right))
    return (false);
    else if (_Right _Left)
    _DEBUG_ERROR2(invalid operator, _Where, _Line); return (true);
    }

    If one value is NaN the first 'if' is false, and the second 'if' is true resulting in the noted error. If I'm right, the standard does not state anything about the correct behavior for NaN comparisons. However, this debug_lt test looks like Microsoft considers
    returning false for NaN comparisons as standard.

    DB:2.90:Why Do Nan Comparisons Return True On Winec? c8

    On Win32 any comparison with NaN returns false (and as far as I know everywhere else as well). On WinEC however, any comparison with NaN returns true. Is there a reason for that?
    In the debug 'less than' implementation of Microsoft Visual Studio 9.0\VC\ce\include\xutility, this behavior even results in a debug error invalid operator:
    templateclass _Ty1, class _Ty2 inline bool __CLRCALL_OR_CDECL _Debug_lt(const _Ty1 _Left, const _Ty2 _Right, const wchar_t *_Where, unsigned int _Line)
    { // test if _Left _Right and operator is strict weak ordering
    if (!(_Left _Right))
    return (false);
    else if (_Right _Left)
    _DEBUG_ERROR2(invalid operator, _Where, _Line); return (true);
    }

    If one value is NaN the first 'if' is false, and the second 'if' is true resulting in the noted error. If I'm right, the standard does not state anything about the correct behavior for NaN comparisons. However, this debug_lt test looks like Microsoft considers
    returning false for NaN comparisons as standard.

  • RELEVANCY SCORE 2.88

    DB:2.88:How To Get A Quotient Value In A Division? 7x


    The MOD function returns the remainder of a division, but how can we get the value in quotient?

    I want to check if the quotient of a division has a decimal followed by 5 (xxxx.5) to apply banker's rounding.

    Or is there a different function to calculate banker's rounding in Oracle?

    DB:2.88:How To Get A Quotient Value In A Division? 7x

    840411 wrote:
    I have to check if (((x*12)/y)*100) results a value with decimal .5, and if the integer part before decimal is even, then return the integer part (FLOOR func). If the integer part before decimal is odd, then return the next nearest even integer(CEIL func)Not sure to understand your requirements, but this should do it :Scott@my10g SQLed
    Wrote file afiedt.buf

    1 with data as (
    2 select trunc(dbms_random.value(0,20))+0.5 n from dual connect by level = 10
    3 )
    4 select n,
    5 2*ceil(floor(n)/2) nn
    6* from data
    Scott@my10g SQL/

    N NN
    ---------- ----------
    9.5 10
    3.5 4
    19.5 20
    11.5 12
    11.5 12
    13.5 14
    8.5 8
    6.5 6
    15.5 16
    19.5 20

    10 rows selecteNot sure if the +"value with decimal .5"+ is a where clause, or a condition when to apply your "special rounding".

  • RELEVANCY SCORE 2.83

    DB:2.83:Expression Node Returns Nan Randomly 8p



    Hi,

    I've caught expression node (2009 SP 1) outputting NaNs when it shouldn't be. In the image below, probe 18's value is read from some hardware. Approximately 1 in 10 times, the expression node below will output a NaN. I also found this happening in another expression node elsewhere in the software yesterday. Weirdly, this software has been in development for a while and I hadn't noticed this problem before yesterday. Does anyone know what might be causing it? In the meantime I'll replace the expression nodes with multiplication VIs.

    DB:2.83:Expression Node Returns Nan Randomly 8p


    I would suggest doing a force-recompile of your code. Hold down the Control key and click on the Run arrow. That will force it to recompile the code. Unless someone else can reproduce it, it's most likely a corruption in the compiled code. You can also try recreating that portion of the code in a new VI. Do not copy and paste. Create as new.

  • RELEVANCY SCORE 2.81

    DB:2.81:The Center Property Of Map.Getbounds() Sometimes Has An Nan For Latitude Or Longitude jj


    We've noticed that sometimes the center property of map.getBounds() has an NaN for latitude or longitude or both.
    Try here:https://geofeedia.com/mapbugcenterNaN.cshtml
    If you successfully recreate the issue, your view will show NaN log messages just below the map.
    This happens while the map is changing views, sporadically. Sometimes, once the condition is hit, the center property will always have an NaN until the map is completely recreated using javascript.
    Can this issue be corrected?
    Thanks,
    Scott

    DB:2.81:The Center Property Of Map.Getbounds() Sometimes Has An Nan For Latitude Or Longitude jj

    Unfortunately, no, the throttled handlers won't work for us. They do help work around the bug, but the reason we're using viewchange is to update the map as it changes, not with a delay of 250ms. It's difficult to explain so try this example:
    https://geofeedia.com/geofeed.stream
    Click the Add Stream button then pan the map. For each viewchange, the circle on the map is redrawn. When the map's bounds are NaN, we can't draw the circle and it disappears.
    Our workaround, for now, is to use the map width height along withgetMetersPerPixel to determine the polygon for the circle. It's a hack and we'd much rather have the NaN issue fixed.

  • RELEVANCY SCORE 2.80

    DB:2.80:Using Mod Function 89


    Hello,

    I need to mod function in CO class,I am trying to use '%' which is Java equivalent to mod function but i am getting error.

    Please let me know.

    DB:2.80:Using Mod Function 89

    Thanks, got it with the foll. modification.

    String h1 = (String)(pageContext.getTransactionValue("DurationHours"));
    double p1 = 0.00;
    p1 = (Double.parseDouble(h1)%1.00);

  • RELEVANCY SCORE 2.76

    DB:2.76:Java Byte Array Returning Nan 9d



    Flex newbie here. I've spend hours and hours googling but can't figure this out. I've hit a wall and I'm all out of ideas.

    I have an existing app that I'm trying to create a thin client by using Flex 3, BlazeDS, Spring, BlzeDS Spring Integration project, running on JBoss 4.2.

    I have a DAO that returns me a serializable data object Z, which contains many fields including a byte array: byte[] fileBytes. I have everything wired up and in the mxml I tried to print the fields of Z, and everything works except the byte array, which is returning me nan/null. I can't do anything with it, and I've tried. As far as I can tell, byte[] is supposed to map to ByteArray, and this should work fine. I'm not sure what I'm doing wrong...any help would be MUCH appreciated!

    relevant portions of my mxml:

    ==================================================

    mx:RemoteObject id="masterRo" destination="masterService" mx:method name="getActiveObject" result="compileObject(event)"/ /mx:RemoteObject

    private function loadData():void { masterRo.getActiveObject(); }

    private function compileObject(event:ResultEvent):void {

    Alert.show("name:" + event.result.name + " createdDate:" + event.result.createdDate); // This works fine!

    Alert.show("bytes:" + event.result.fileBytes); // NaN

    var bytes:ByteArray = event.result.fileBytes as ByteArray; // TypeError: Error #1009: Cannot access a property or method of a null object reference. }

    mx:Button label="Search" click="loadData()"/

    ==================================================

    java method just queries the DB and returns Z, and I've verified that fileBytes has stuff in it.

    DB:2.76:Java Byte Array Returning Nan 9d

    I'm also trying to pass a byte[] object from Java to Flex trough BlazeDS and It doesn't seem to work. I still get null in the flex application. The invokation of the remoteobject seems fine. The byte[] array is filled in the remote service but doens't get serialized to Flex.

    Is this a known issue?

    Thanx in advance!

  • RELEVANCY SCORE 2.71

    DB:2.71:Problem: Linux Ifort 64 Bits Returns Nan On Ubuntu 64 Bits 19



    (sorry my english. it isn't too good)
    My OS is Ubuntu 7.10 64 bits and my CPU is a Intel Core 2 Duo (T5250).
    I have installed ifort 64 bits (l_fc_p_10.1.012_intel64.tar.gz) on my PC.

    I compile a code *.f use the command.
    $ ifort -o test *.f

    and run with
    $ ./test
    NaN 9.9999998E-03
    NaN 1.9801980E-04

    ----------------------------------------------

    I can't understand NaN result because when I use Ubuntu 7.10 32 bits and I run the same code compiled by ifort 32 bits (same PC) (l_fc_p_10.1.012_ia32) the result is

    $ ./test
    9.8724573E-03 9.9999998E-03
    1.9951592E-03 1.9801980E-04

    ----------------------------------------------

    Are there something wrong with my code or my compilation on a 64 bits system?

    The are only 3 codes in the directory of compilation. These codes are:

    __________________________________________________________________

    c Main program -- testegmacue.f
    IMPLICIT NONE
    INTEGER SEED,I,N,M, tempo
    REAL SOMA2,SOMA4
    COMPLEX U(100,100)

    N = 100
    M = 6000

    CALL SYSTEM_CLOCK(SEED)
    tempo = seed

    SEED = 10*ABS(COS(FLOAT(SEED)))

    CALL RANSET(SEED)

    SOMA2 = 0
    SOMA4 = 0
    DO I = 1,M
    SEED = SEED + 1
    CALL GMACUE(N,U,SEED)
    SOMA2 = SOMA2 + CABS(U(1,2))**2
    SOMA4 = SOMA4 + CABS(U(1,2))**4
    END DO
    WRITE(*,*) SOMA2/M, 1./N
    WRITE(*,*) SOMA4/M, 2./(N*(N+1))

    END
    _____________________________________________________________________

    c gmacue.f
    SUBROUTINE GMACUE(N,U,SEED)
    IMPLICIT NONE
    INTEGER SEED,N,I,J,IA,JA
    COMPLEX U(N,N)
    REAL FI,CHI,PSI,RANF
    REAL PI
    COMPLEX IM
    COMPLEX C1,C2
    IM = (0,1)
    PI = 3.14159
    CALL RANSET(SEED)

    DO IA=1,N
    DO JA=1,IA-1
    U(IA,JA) = 0
    END DO
    U(IA,IA) = 1
    DO JA=IA+1,N
    U(IA,JA) = 0
    END DO
    END DO

    DO I = N-1,1,-1
    DO J = I+1,N-1
    FI = 2*(N - J + 1)

    FI = 1./FI
    FI = ACOS(RANF()**FI)
    PSI = 2*PI*RANF()
    C1 = COS(FI)*CEXP(IM*PSI)
    C2 = SIN(FI)
    CALL SMATMUL(U,N,I,J,C1,C2)
    END DO
    FI = ACOS(RANF()**0.5)
    PSI = 2*PI*RANF()
    CHI = 2*PI*RANF()
    C1 = COS(FI)*CEXP(IM*PSI)
    C2 = SIN(FI)*CEXP(IM*CHI)
    CALL SMATMUL(U,N,I,N,C1,C2)
    END DO
    C1 = CEXP(IM*2*PI*RANF())
    DO I = 1, N
    DO J = 1,N
    U(I,J) = U(I,J)*C1
    END DO
    END DO
    RETURN
    END

    SUBROUTINE SMATMUL(A,N,I,J,C1,C2)
    IMPLICIT NONE
    INTEGER K,N,I,J
    COMPLEX A(N,N),C1,C2,AKI

    DO K = 1,N
    AKI = A(K,I)
    A(K,I) = C1*AKI - CONJG(C2)*A(K,J)
    A(K,J) = CONJG(C1)*A(K,J) + C2*AKI
    END DO

    RETURN
    END

    ______________________________________________________________________

    **==ranf.spg processed by SPAG 4.52O at 11:03 on 18 Oct 1996

    FUNCTION RANF()
    IMPLICIT NONE
    DOUBLE PRECISION RANF
    REAL*8 RCARRY
    RANF = DBLE(RCARRY())
    RETURN
    C ----------------------------------------------------C
    END
    **==randx.spg processed by SPAG 4.52O at 11:03 on 18 Oct 1996

    FUNCTION RANDX(Iseed)
    C----------------------------------------------------------------------C
    C Random number generator, fast and rough, machine independent.
    C Returns an uniformly distributed deviate in the 0 to 1 interval.
    C This random number generator is portable, machine-independent and
    C reproducible, for any machine with at least 32 bits / real number.
    C REF: Press, Flannery, Teukolsky, Vetterling, Numerical Recipes (1986)
    C----------------------------------------------------------------------C
    IMPLICIT NONE
    INTEGER IA, IC, Iseed, M1
    REAL*8 RANDX, RM
    PARAMETER (M1=714025, IA=1366, IC=150889, RM=1.D+0/M1)
    c
    Ise

    ed = MOD(IA*Iseed+IC, M1)
    RANDX = Iseed*RM
    IF (RANDX.LT.0.D+0) THEN
    STOP '*** Random number is negative ***'
    END IF
    c
    RETURN
    END
    **==ranset.spg processed by SPAG 4.52O at 11:03 on 18 Oct 1996

    SUBROUTINE RANSET(Iseed)
    IMPLICIT NONE
    INTEGER Iseed

    CALL RSTART(Iseed)
    RETURN
    END
    **==rstart.spg processed by SPAG 4.52O at 11:03 on 18 Oct 1996

    SUBROUTINE RSTART(Iseeda)
    C----------------------------------------------------------------------C
    C Initialize Marsaglia list of 24 random numbers.
    C----------------------------------------------------------------------C
    IMPLICIT NONE
    REAL*8 CARRY, ran, RANDX, SEED
    INTEGER i, I24, ISEED, Iseeda, J24
    COMMON /RANDOM/ SEED(24), CARRY, I24, J24, ISEED

    I24 = 24
    J24 = 10
    CARRY = 0.D+0
    ISEED = Iseeda
    c
    c get rid of initial correlations in rand by throwing
    c away the first 100 random numbers generated.
    c
    DO i = 1, 100
    ran = RANDX(ISEED)
    END DO
    c
    c initialize the 24 elements of seed
    c

    DO i = 1, 24
    SEED(i) = RANDX(ISEED)
    END DO

    RETURN
    END
    **==rcarry.spg processed by SPAG 4.52O at 11:03 on 18 Oct 1996

    FUNCTION RCARRY()
    C----------------------------------------------------------------------C
    C Random number generator from Marsaglia.
    C----------------------------------------------------------------------C
    IMPLICIT NONE
    REAL*8 CARRY, RCARRY, SEED, TWOm24, TWOp24, uni
    INTEGER I24, ISEED, J24
    PARAMETER (TWOp24=16777216.D+0, TWOm24=1.D+0/TWOp24)
    COMMON /RANDOM/ SEED(24), CARRY, I24, J24, ISEED
    c
    c f.james Comp. Phys. Comm. 60, 329 (1990)
    c algorithm by G. Marsaglia and A. Zaman
    c base b = 2**24 lags r=24 and s=10
    c
    uni = SEED(I24) - SEED(J24) - CARRY
    IF (uni.LT.0.D+0) THEN
    uni = uni + 1.D+0
    nbsp

    ; CARRY = TWOm24
    ELSE
    CARRY = 0.D+0
    END IF
    SEED(I24) = uni
    I24 = I24 - 1
    IF (I24.EQ.0) I24 = 24
    J24 = J24 - 1
    IF (J24.EQ.0) J24 = 24
    RCARRY = uni

    RETURN
    END

  • RELEVANCY SCORE 2.71

    DB:2.71:Apply Report Wide Conditional For Nan? 9m


    I am currently putting a conditional into each cell if an expression returns NaN.  Is there a way to have a particular value apply to a cell whenever NaN is returned, rather than writing conditionals for each cell?

    DB:2.71:Apply Report Wide Conditional For Nan? 9m

    The closest you can get is to write a custom code function (report menu - report properties - code tab) which takes the arguments of your calculation and returns the result as formatted string or as your custom NaN string. You can then call that function from all the report item expressions by e.g. =Code.MyFunction(Fields!A.Value, Fields!B.Value)
    -- Robert

  • RELEVANCY SCORE 2.70

    DB:2.70:How To Check For Nan fj



    The .NET framework already provides simple ways to achieve this. You can use the constant float.NaN if you need to actually generate a NaN in code, and float.IsNaN(value) returns true if the value is a NaN.


    There are some related things, such as constants and comparisons for infinity.

    DB:2.70:How To Check For Nan fj


    can someone explain me ,why (float.NaN == float.NaN) is false ???

  • RELEVANCY SCORE 2.70

    DB:2.70:Solve Linear Equations Nan Return s3


    I've implemented a modified Linear Levenberg Marquardt function for gauss fitting of spectral data, but have problems from time to time where I simply can't fit a specific data set.I've traced the problem to the function "Solve Linear Equations" outputting NaN for one or more solution vectors (Not all) which then plays havok with my function.I've located a data set which is initially OK, but which after solving the linear equations has NaN as the second element of the solution vector array. Changing the matrix type to something other than "generic" gets rid of the NaN for this particular data set, but gives problems with others which work with the "generic" matrix type.Since my mathematics lectures in college are a few years away now, I'm asking someone out there if they can help me with my problem. I can supply a "corrupting" data set if this would help, or maybe someone knows this problem and has a work-around?I've thought of leaving the matrix type to "generic" and checking the output to see if there's a NaN present, and if so, then re-calculate with another matrix type until there's no NaN. This is most likely not very sound mathematically, but it might reduce the number of rogue data sets.Thanks in advanceShane.



    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    DB:2.70:Solve Linear Equations Nan Return s3

    DSPGuy,wow, that sounds great. I'd love to try out the VI you posted, but I'm using LV 6.1.Any chance of posting it in 6.1 form? Please?I really need to get my old maths books out to understand what you just wrote. ThanksShane.



    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • RELEVANCY SCORE 2.69

    DB:2.69:How This Function Works? xd



    Hi All,

    Can any one please let me know how it is possible, and what it the logic in it?

    mod( -4,3 ) returns 2

    Thanks

    John

    DB:2.69:How This Function Works? xd


    Hi,

    the mod examples with positive integers are quite easy to understand. However, the negative integers divisions could be kind of confusing. In the specific example mod(-4,3) = 2, the explanation is that -4 / 3 = -1.3333. So the Module is the remainder. With positive numbers is quite easy to understand that 4 - 3 equals 1.

    But with negative the remainder would be calculated as -- -6 - (-4) = 2.

    The explanation is that with negative numbers -3 is not less than -4, so you'll need to look at -6 (-4 * 2 = -6 would be the next possible option for this division).

    hope this helps,

    regards

  • RELEVANCY SCORE 2.67

    DB:2.67:Evaluating Nan Comparison Type In Teststand Numeric Limit Step ad


    I'm using a 4070 DMM to return Resistance Measurements to a TestStand numeric Limit step. How can I use a comparison type when the LabView vi returns NaN (Not a Number). I want the step to pass as long as the Resistance Measurement is GT some value.

    DB:2.67:Evaluating Nan Comparison Type In Teststand Numeric Limit Step ad

    I have the same situation. Here is my solution:I use a Numeric Limit test with the following settingsComparison Type: LEGE (= =)Measurement Must Be: = NaN Or = {insert value here}This works just like "Locals.x 10 || Locals.x == NAN", since the NaN treats the '=' as a '='(less than OR equal to).

  • RELEVANCY SCORE 2.64

    DB:2.64:Re: Nan Aaaaaaaaaargh dp


    NaN does not equal NaN.
    Use Double.isNaN() or Float.isNaN().

    DB:2.64:Re: Nan Aaaaaaaaaargh dp

    ok yer reply 3+4 worked..must have missed them!
    thanks lot everyone!

  • RELEVANCY SCORE 2.63

    DB:2.63:Nan Becomes -Inf In A Table Or Graph zc


    LabWindows 6.0I read in float data sets from a text file, and when I encounter a NaN string I convert the resulting float to NaN by (float)sqrt(-1); The resulting variable converted has the value 0xFFC00000, and shows up as NaN when I put the mouse over it in break mode. When I save this variable back to a text file with fprintf(,"%f",) it is saved as "NaN", so the value really seems to be NaN. So far so good.However, when I put this variable into a table, it shows up as -Inf. Printed in a graph (as a member of an array) it also behaves like -Inf. When, in break mode, I use "View variable value" it still says "NaN" in the second field. BUT... when I select the variable and then use the "view memory display" function, it says -Inf when the format mode is "floats" but FFC00000 when the format mode is "hex longs".Is there a conversion bug somewhere, or am I missing something?Erwin Timmerman

    DB:2.63:Nan Becomes -Inf In A Table Or Graph zc

    Erwin,There are a couple of factors that are causing the behavior you're seeing.1. At the time CVI 6.0 was developed, there was a bug in the Microsoft compiler that caused NaN values to incorrectly be coerced to +Inf or -Inf, sometimes. Microsoft fixed this bug when they released Visual Studio.NET 2003, and as result the problem went away with CVI 7.1. This accounts for what you are seeing with numeric controls and tables (including the memory display, which uses a table control).2. The situation with graphs is different. Up until CVI 6.0, graphs did not distinguish between NaN, -Inf and +Inf. All would show up as a very large spike in the plot. Starting with CVI 7.0, the graph control starting making this distinction, and as a result, NaNs would show up as gaps in the plot. However, there's still a catch (there's always a catch :-)) in the process of investigating this issue, I noticed that the detection is not working when the data type of the plot is VAL_FLOAT instead of the more common VAL_DOUBLE. This bug will be fixed for CVI 8.0.So that's where things stand right now. To summarize: if you upgrade to CVI 7.1, you can fix all aspects of your problem, as long as you plot doubles instead of floats.Hope this helpsLuisNI

  • RELEVANCY SCORE 2.63

    DB:2.63:Php Flash - String To Integer Conversion Problem 78



    Hi,

    In my flash application I have a currency converter. This converter calls a PHP script, which accesses Google for an updated conversion rate, then returns the rate back to Flash. Now this whole procedure works absolutely fine on my MAMP server at home, and on many other clients servers. My current client is on 110mb.com hosting, and for some reason, the currency rate returned by the PHP script, is not an integer and fails to convert to an integer using the Number() function. This is baffling me, I don't understand the problem. Here is the script;

    The flash application uses LoadVars and the currency() function is called. This then echo's "rate=1.1243" or whatever the currency rate is. Then flash receives the variable "rate" and does what it needs to do. Now....flash can trace(rate) absolutely fine, but when I trace(Number(rate)), I get NaN

    On my home server and many other servers, it will convert to a number, but it doesn't work using 110mb.com server.

    Appreciate your help

    loadCurrency.load(_root.DOMAIN + "admin/flashFunctions.php?action=currencyconvertTo=" + currency);

    loadCurrency.onLoad = function(success:Boolean):Void {
    if (success) {
    trace(rate); // e.g 1.0283 - correct
    trace(Number(rate)); // NaN

    }
    }


    DB:2.63:Php Flash - String To Integer Conversion Problem 78


    you should use:

    function stripWhiteF(string:String):String {
    return string.split("\r").join("").split("\n").join("").split(" ").join("");
    }

  • RELEVANCY SCORE 2.62

    DB:2.62:(Mod N) Function ss


    How can I apply a (mod n) to an array 10 bytes long?

    DB:2.62:(Mod N) Function ss

    I'll stick the class here:
    It's all been tested pretty thoroughly, but NOT on a Java Card... I've been using the normal j2se to compile and run, but I've removed all need for ints in the code (apart from the debugging function that returns an int).
    Oh, and there's probably more efficient methods and more efficient bits and pieces here and there. If anyone finds any, please do say just in case I ever need to use this!

    Good luck! (especially implementing the division part)
    ;o)

    class JCInteger {
    short upper = 0;
    short lower = 0;

    // Constructors.
    public JCInteger( ) {}
    public JCInteger( short upper, short lower ) {
    setValue( upper, lower );
    }

    // ----------------------------------------------------------------
    // Accessors.
    public void setValue( short upper, short lower ) {
    this.upper = upper;
    this.lower = lower;
    }

    public short getUpper( ) { return upper; }

    public short getLower( ) { return lower; }

    // DEBUGGING
    public int getIntValue( ) {
    return ((int)(upper 16) + (int)(lower 0x0000ffff));
    }

    // ----------------------------------------------------------------

    private static short[] JCIntToShortBytes( JCInteger input ) {
    // Assuming input is not null and JCInteger has value.
    short[] result = new short[4];
    result[0] = (short)((input.getUpper() 8) 0x00ff);
    result[1] = (short)(input.getUpper() 0x00ff);
    result[2] = (short)((input.getLower() 8) 0x00ff);
    result[3] = (short)(input.getLower() 0x00ff);
    return result;
    }

    private static JCInteger JCIntFromShortBytes( short[] input ) {
    // Assuming input is not null and has 4 elements.
    return new JCInteger (
    (short)(input[1] + ((input[0] 8) 0xff00)),
    (short)(input[3] + ((input[2] 8) 0xff00))
    );
    }

    private static JCInteger sumJCIntArray( JCInteger[] input ) {
    // Assuming input is not null and has at least 2 element.
    JCInteger result = new JCInteger( input[0].getUpper(), input[0].getLower() );
    for( short i=1; iinput.length; i++ ) {
    result = result.plus( input[i] );
    }
    return result;
    }

    public static JCInteger minusJCInts( JCInteger input1, JCInteger input2 ) {
    short newUpper = (short)(~( input2.getUpper() ) ) ;
    short newLower = (short)((~input2.getLower()) + 1);
    // Hack! If overflowed when adding one to lower short, add one
    // to upper short!
    if( newLower == 0 )
    newUpper += 1;
    JCInteger input3 = new JCInteger( newUpper, newLower );

    return input1.plus( input3 );
    }

    public static JCInteger addJCInts( JCInteger input1, JCInteger input2 ) {
    short[] addByte = null;
    short[] myByte = null;
    short overflow;
    short result;

    addByte = JCIntToShortBytes( input1 );
    myByte = JCIntToShortBytes( input2 );

    for( short i=3; i=0; i-- ) {

    result = (short)(addByte[i] + myByte);
    myByte[i] = (short)(result 0x00ff);

    if( (i - 1) 0 )
    overflow = (short)((result 8) 0x00ff);
    else
    addByte[i-1] += (short)((result 8) 0x00ff);

    }

    return JCIntFromShortBytes( myByte );
    }

    public static JCInteger multiplyJCInts( JCInteger multiplier, JCInteger multiplyee ) {
    // Based on multiplication algorithm described here:
    // for each bit that is 1 in multiplier, shift the multiplyee by its position and
    // add all the results together at the end.
    // EXAMPLE:
    //
    // Multiplier: 00001011 (decimal 11)
    // Multiplyee: 00000110 (decimal 6)
    // 00001011 x 00000110:
    //
    // 00000110 (00000110 x 1 (shift 0)in multiplier)
    // 00001100 (00000110 x 10 (shift 1)in multiplier)
    // 00000000 (00000110 x 000 (shift 2)in multiplier)
    // 00110000 (00000110 x 1000 (shift 3)in multiplier)
    // -------- (Add all together)
    // 1000010 (decimal 66 which is correct result).
    //
    // Complication:
    // In this algorithm, biggest data type available is a short (16 bits)
    // Therefore, to detect overflow from a chunk of data, will have to
    // split all numbers(32 bit integers) into bytes(8 bit values) then
    // cast them to shorts. Thus, if the upper half of the short is not
    // 0 after performing an operation, there has been an overflow and this
    // must be taken into consideration in next operation.

    JCInteger[] resultsToAdd = new JCInteger[32];
    short overflow = 0;
    short carryOver= 0;
    short[] shifted = new short[4];
    short[] multiplyeeBytes = null;
    short[] multiplierBytes = null;
    shortinvertedIndex= 0;
    shortrelativeIndex= 0;

    multiplyeeBytes = JCIntToShortBytes( multiplyee );
    multiplierBytes = JCIntToShortBytes( multiplier );

    // For each byte of multiplier... starting with LSB...
    for( short b=3; b=0; b-- ) {

    // These values are calculated from the current multiplier index...
    // (Necessary, because if we're multiplying from 2nd least sig. bit
    // then we not only have to shift by the index of the bit, but also
    // by 8 bits extra!)
    invertedIndex = (short)(3 - b);
    relativeIndex = (short)(invertedIndex * 8);

    // For each bit in multiplier byte currently examining...
    for( short i=0; i8; i++ ) {
    // If this bit is a 1 then we must calculate the shift...
    if( ( multiplierBytes[b] (short)Math.pow(2, i) ) 0 ) {

    overflow = 0;

    // Reset all of 'shifted'.
    for( short k=0; k4; k++ )
    shifted[k] = 0;

    // Work from least significant byte of multiplyee upwards...
    // NOTE: This takes invertedIndex into account, because shifting
    // by multiples of 8 bits can be done simpler by using a previous
    // byte instead of shifting all.
    // EXAMPLE:
    // if we need to shift our 4 multiplyee bytes by 9 bits, we'd
    // use this: (bear in mind, the overflows will be difficult to
    // store)
    // out[3] = in[3] 9;
    // out[2] = in[2] 9;
    // out[1] = in[1] 9;
    // out[0] = in[0] 9;
    // Instead we can do this: (this makes calculations simpler and
    // removes the problem of storing the overflows).
    // out[3] = 0;
    // out[2] = in[3] 1;
    // out[1] = in[2] 1;
    // out[0] = in[1] 1;
    // discard in[0] because it is definitely and wholly overflowing!
    //
    for( short j=b; j=0; j-- ) {
    // For all bytes in multiplyee...
    // Shift by amount required, add overflow from last op,
    // Calculate overflow to be carried to next op,
    // Then normalise the value to be finished with (i.e.
    // get rid of overflow from current op).

    shifted[j] = (short)(multiplyeeBytes[j + invertedIndex] i);
    shifted[j] += overflow;
    overflow = (short)((shifted[j] 0xff00) 8);
    shifted[j] = (short)(shifted[j] 0x00ff);
    }

    // Create a JCInteger from all this shifting and fiddling, to be
    // added together at end of whole process.
    resultsToAdd[i + relativeIndex] = JCIntFromShortBytes( shifted );
    } else {
    // Bit was a 0, not a 1, so set this result to 0.
    resultsToAdd[i + relativeIndex] = new JCInteger( (short)0, (short)0 );
    }
    }
    }

    // Add all shifted 'integers' together!
    return sumJCIntArray( resultsToAdd );
    }

    // Not implemented!
    public static JCInteger divideJCInts( JCInteger input1, JCInteger input2 ) {
    return null;
    }

    public static boolean greaterThan( JCInteger input1, JCInteger input2 ) {
    short in1Upper = input1.getUpper();
    short in2Upper = input2.getUpper();
    if( in1Upper == in2Upper )
    return( input1.getLower() input2.getLower() );
    else
    return( in1Upper in2Upper );
    }

    public JCInteger plus( JCInteger input ) {
    return addJCInts( this, input );
    }

    public JCInteger minus( JCInteger input ) {
    return minusJCInts( this, input );
    }

    public JCInteger multiply( JCInteger input ) {
    return multiplyJCInts( this, input );
    }

    public JCInteger divide( JCInteger input ) {
    return divideJCInts( this, input );
    }

    public boolean isGreaterThan( JCInteger input ) {
    return greaterThan( this, input );
    }
    }

  • RELEVANCY SCORE 2.60

    DB:2.60:Nan 7d



    I am simply trying to add 1 to a variable and displar the result.

    var Score = Score + 1

    Alert(Score) returns NAN.

    What am I missing?

    DB:2.60:Nan 7d


    Ok, so Edge is sending an Object to your function, which obviously cannot be 'directly' converted to a numeric value. You would have to look into the Edge documentation to see what else is being returned from sym.$("") and the name of the property the text/string is stored in that you want to calculate (dot notation) So, it would be something like:

    Object.propertyNameOfTheValueYouAreLookingFor;

    Object.someOtherPropertyFromEdge;

    Object.someOtherPropertyFromEdge2;

    I'm not sure if Edge has a debugging tool to inspect an object, but firefox has an addon titled "javascript object examiner" which will show you the properties on an object.

    But hopefully someone who works with Edge will chime in as I am coming in from a strict javascript perspective.

  • RELEVANCY SCORE 2.60

    DB:2.60:Getting Actual Size Of Control mm


    If I have this:

    Grid x:Name=OuterGrid
    ContentControl x:Name=Content /
    /Grid

    How do I get the height/width of OuterGrid? ActualHeight returns 0 and Height returns NaN.
    Thanks

    DB:2.60:Getting Actual Size Of Control mm

    Check this:http://forums.silverlight.net/forums/t/185158.aspx

  • RELEVANCY SCORE 2.59

    DB:2.59:Goodnessoffit Misbehaving c1



    Hi,

    I found an issue with the Advanced Analysis Library function GoodnessOfFit, which I use to calculate R^2.

    For a given data set it returns SSE = NaN, R^2 = NaN, and RMSE = NaN, while the return status is NoAnalError.

    I can not see any mathematical sitation which might yield NaN for SSE, the summation of square error....

    Moreover, if problems arise with theinvolved calculations, I would expect the function to return an error condition.

    Hence I suppose it might be a bug...

    The occurence of this 'situation' depends on the data set.

    Wolfgang

    DB:2.59:Goodnessoffit Misbehaving c1


    Hi Andreas,

    thanks to the assistance of Luis who pointed out how to save variable values to a file I can now provide one data set showing 'unexpected' behavior.

    This is not the original problem as outlined above but it could be related.

    OK, after fitting a data set I am calling

    GoodnessOfFit ( y_selected,y_fit_1,weights,fit_points, ( fit_points - coefficients_1 ),sse, r_square,rmse );

    and receive a r_square value that is negative... For me this is unexpected if I believe in the name square....

    The return status is 'No Analysis Error' (0).

    I am attaching the data that shows this result, with fit_points = 24064, coefficients_1 = 3 and the result r_square = -8.719...e-1

    Wolfgang










    Attachments:







    y_selected.txt ‏449 KB

  • RELEVANCY SCORE 2.58

    DB:2.58:Textbox Expression Returns Nan xf


    How can I eliminate this behavior and return a 0 instead?

    DB:2.58:Textbox Expression Returns Nan xf

    I thought at using IIF but that would make the statement quite complicated, so I just put in a code function to do it.

  • RELEVANCY SCORE 2.58

    DB:2.58:Mod Function Discrepancy zc


    This should be straight forward but I don't understand why MOD function does not provide the correct result in Excel 2010. See table below. formula in column C is displayed in column D.

    A
    B
    C
    D

    1
    0.05
    0.05
    0
    =MOD($B1,$A$1)

    2

    0.1
    0
    =MOD($B2,$A$1)

    3

    0.15
    0.05
    =MOD($B3,$A$1)

    4

    0.2
    0
    =MOD($B4,$A$1)

    5

    0.25
    0.05
    =MOD($B5,$A$1)

    6

    0.3
    0.05
    =MOD($B6,$A$1)

    7

    0.35
    0.05
    =MOD($B7,$A$1)

    8

    0.4
    0
    =MOD($B8,$A$1)

    9

    0.45
    0.05
    =MOD($B9,$A$1)

    10

    0.5
    0.05
    =MOD($B10,$A$1)

    Why is =MOD(.3,.05) = .05? Should be 0. Same with all items in column B since all are evenly divisible by .05.

    Thanks,

    Sam

    DB:2.58:Mod Function Discrepancy zc

    Sam wrote:
    Why is =MOD(.3,.05) = .05? Should be 0. Same with all items in column B since all are evenly divisible by .05.

    As Lars-Åke and Hans explained, the probem arises because of the way that Excel represents numbers internally and the fact that most non-integers cannot be represented exactly [1].

    Sometimes, replacing MOD(B6,$A$1) with B6-$A$1*INT(B6/$A$1) works better. In fact, it returns exactly zero with all of your examples.

    But that is really not a panacea. First, it works with some of your examples only because of a defect (IMHO) in INT. Second, it is a coincidence that B6-$A$1*INT(B6/$A$1) is exactly zero, given the approximate representation of 0.05 in A1.

    In fact, x - y*Int(x / y) in VBA returns the same unexpected results as Excel MOD for your examples.

    -----
    [1] For some internal details, see
    http://support.microsoft.com/kb/78113.

    0.3 is represented internally as 0.299999999999999,988897769753748434595763683319091796875.

    0.05 is represented internally as 0.0500000000000000,0277555756156289135105907917022705078125.

    0.3/0.05 is represented internally as 5.99999999999999,911182158029987476766109466552734375.

    So it is surprising that Excel INT(0.3/0.05) is 6. In VBA, Int(0.3/0.05) is 5.

    The XL2010 implementation of Excel MOD effectively uses 5. XL2007 and earlier effectively uses 6.

  • RELEVANCY SCORE 2.57

    DB:2.57:Ippiexp_32f_C3ir(-Inf) Is Causing _Em_Invalid m7



    Hello,

    I'm using Log+Exp functions bundle to perform pow() function on my image. When working with zero pixels, log(0) returns -Inf and exp(-Inf) retuns zero, so the result is correct. However, if _EM_INVALID flag in floating-point control word is unmasked, exception "0xC00002B5: Multiple floating point traps" is thrown.

    I do not expect this exception, since no NaN is actually in game. For now I masked this flag during the call of ippiExp_32f_C3IR(), but I want proper behavior.

    DB:2.57:Ippiexp_32f_C3ir(-Inf) Is Causing _Em_Invalid m7


    I've uploaded binary dump of image causing crash when being exponentiating. Here is the code used to create dump:

    std::ofstreamoutput("img.32fC3");

    output.write(reinterpret_cast(width),sizeof(int));
    output.write(reinterpret_cast(height),sizeof(int));

    for(inti=0;ioutput.write(pLine,count);
    pLine+=step;
    }

    output.close();

    pLine is pointer to the beginning of the image. Step is standard IPP step between subsequent lines in bytes. count is number of significant bytes in a row.

    First two 4-byte bundles contain width and height of the image. Then data is stored in RGB order without padding, 4 bytes per channel.

  • RELEVANCY SCORE 2.57

    DB:2.57:Nan And Mysql xk


    Hi,TestStand (3.1) can use NaN constant for NumericLimitTest.But I log my results to a MySQL database (4.1.11) using the MySQL ODBC driver (3.51.12).When TestStand logs the results to the database, it returns an error : the error message is very long but it says that I have an error in my SQL syntax for the STEP_NUMERICLIMIT statement.I removed the NaN constant and it works.I tried to use the NaN constant with an Access database and it works.I found that MySQL doesn't manage the NaN constant. It is possible to use the 'NaN' value in SQL syntax but MySQL convert it to 0.Can anyone confirm that ?TestStand allows the use of the NaN constant, so I can't prevent the developpers from using it...Has anyone a suggestion to solve my problem ?Bruno

    DB:2.57:Nan And Mysql xk

    Thanks for all your advices.Finally TestStand uses other values than NAN that causes database logging errors : IND, +/-INF.So I think I will use a new database column that indicates an invalid value.I should compare the numeric result with the invalid values to log the data of this column (TestStand database configuration).And the advice for the developpers of sequence files will be : don't use (as possible) the values NAN, IND and +/-INF.Bruno

  • RELEVANCY SCORE 2.57

    DB:2.57:Nan (Not A Number) Dectection ks


    I have the FPU installed on 9.2.02 and sometimes the SDK will cease to respond while I am connected to the FPGA in debug mode. A closer examination of my code shows I am not taking into account Divide By Zero conditions and would like to remedy this. Example below:

    float x, y, z;

    some code that initialized x, y and z

    x = y / z

    Sometimes z is 0 and sometimes it is "NaN". I suspect that it is when either of these conditions occur that the SDK loses it's ability to communication with the FPGA (or the FPGA loses it's ability to communication with the SDK). Bottom line, the SDK no longer ceases operations on break points. I want to check for NaN and insert a value for x accordingly however I do not know how to detect NaN.

    Any ideas?

    Thanks!

    DB:2.57:Nan (Not A Number) Dectection ks

    Hi,

    Sorry forgot the name of the function, it's 'isnanf'

    Göran

  • RELEVANCY SCORE 2.56

    DB:2.56:Fft In Cvi 1k


    Hello CVI user,I use the FFT function in CVI, sometimes the FFT calculates every second "Q" value as "not a Number" (NaN) e.g. I can verify this behaviour if I feed the FFT with constant zeros forI and Q.Normally the result should also be also zero's.The problem occurs not every FFT call and the FFT returns no Error(both Arrays are defined as double- N = 1024) Could this be an NT problem? With W98 it seems to workThanksKlaus

    DB:2.56:Fft In Cvi 1k

    Hello CVI user,I use the FFT function in CVI, sometimes the FFT calculates every second "Q" value as "not a Number" (NaN) e.g. I can verify this behaviour if I feed the FFT with constant zeros forI and Q.Normally the result should also be also zero's.The problem occurs not every FFT call and the FFT returns no Error(both Arrays are defined as double- N = 1024) Could this be an NT problem? With W98 it seems to workThanksKlaus

  • RELEVANCY SCORE 2.56

    DB:2.56:Bmp Model (Migrated From Community.Research.Microsoft.Com) 79


    glory posted on 08-25-2010 9:42 AM
    I tried BMP model. There are several exception here. Anyone knows whats the problem?

    1: Improper distribution during inference (Gaussian(m/v=NaN, 1/v=NaN)). Cannot perform inference on this model.
    2: A first chance exception of type MicrosoftResearch.Infer.Factors.ImproperMessageException occurred in Infer.Runtime.dll

    VectorGaussian(-1.797 -1.714 4.367 0.279 1.939 0, 0.03862 0.0006133 -0.0006163 -3.937e-05 -0.0002736 0)
    0.0006133 0.0005028 -0.0001495 -9.549e-06 -6.635e-05 0
    -0.0006163 -0.0001495 0.1675 -0.05319 -0.3696 0
    -3.937e-05 -9.549e-06 -0.05319 0.9966 -0.02361 0
    -0.0002736 -6.635e-05 -0.3696 -0.02361 0.8359 0
    0 0 0 0 0 1
    VectorGaussian(NaN NaN NaN NaN NaN NaN, NaN NaN NaN NaN NaN NaN)
    NaN NaN NaN NaN NaN NaN
    NaN NaN NaN NaN NaN NaN
    NaN NaN NaN NaN NaN NaN
    NaN NaN NaN NaN NaN NaN
    NaN NaN NaN NaN NaN NaN

    A first chance exception of type MicrosoftResearch.Infer.Factors.ImproperMessageException occurred in Infer.Runtime.dll

  • RELEVANCY SCORE 2.55

    DB:2.55:Nan/Nan/Nan (Not A Number) Flash Forms Type="Datefield" 7c


    I have an application using Cold Fusion flash forms where the user selects the date with the flash calendar and the application stores the date in text format in the database. When I have to do date calculations I use the cdate() function to convert to date.In one out of every few hundred transactions, the text field in the database is filled with NaN/NaN/NaN rather than the date. When the cdate() function finds this, I get the expected error (invalid date or time string) or (data type mismatch).Has anyone else had this experience where randomly and rarely the datefield calendar outputs NaN/NaN/NaN to the text field in the database rather than the date? Any thoguhts or suggestions would be appreciated.Thanks

    DB:2.55:Nan/Nan/Nan (Not A Number) Flash Forms Type="Datefield" 7c

    I have an application using Cold Fusion flash forms where the user selects the date with the flash calendar and the application stores the date in text format in the database. When I have to do date calculations I use the cdate() function to convert to date.In one out of every few hundred transactions, the text field in the database is filled with NaN/NaN/NaN rather than the date. When the cdate() function finds this, I get the expected error (invalid date or time string) or (data type mismatch).Has anyone else had this experience where randomly and rarely the datefield calendar outputs NaN/NaN/NaN to the text field in the database rather than the date? Any thoguhts or suggestions would be appreciated.Thanks

  • RELEVANCY SCORE 2.53

    DB:2.53:,Nan In Call History j3



    So from time to time in my call history log it will display ",NAN" instead of the day it was received/called - the time for the phone call says "NaN:NaN AM". Sometimes it fixes itself and sometimes it doesn't. I have rebooted the device and it appears to fix it some of the time, other times it does not. Not a huge problem, just aninconvenience. Thoughts?

    DB:2.53:,Nan In Call History j3


    So from time to time in my call history log it will display ",NAN" instead of the day it was received/called - the time for the phone call says "NaN:NaN AM". Sometimes it fixes itself and sometimes it doesn't. I have rebooted the device and it appears to fix it some of the time, other times it does not. Not a huge problem, just aninconvenience. Thoughts?

  • RELEVANCY SCORE 2.52

    DB:2.52:How Do I Divide Fractions? dx


    I am currently writing a program that applies the Gram-Schmidt process. It is giving me a vector like this,
    NaN NaN NaN NaN NaN. I tracked the problem down and it turns out I am getting a NaN from this operation,

    double a = -1/5;
    double b = 4/5;
    System.out.println(a/b);

    That returns NaN. I have also noticed that b returns 0.0, so how do I fix this?

    DB:2.52:How Do I Divide Fractions? dx

    Good point. That step was included only as a logical bridge from one statement to the next, to aid in the understanding of what was happening.

    sigh...

  • RELEVANCY SCORE 2.51

    DB:2.51:How To Use The Nan Constant (Not A Number) p7


    I want to test the type of a value. If it's a number or not (string, empty, ...).

    The Typeof() function is maybe more appropriated ?

    Thank you for your help.

    DB:2.51:How To Use The Nan Constant (Not A Number) p7

    Hello,

    Are you using LabVIEW, LabWindows CVI , or other Software .

    Thanks

    regards

    Alexandre

  • RELEVANCY SCORE 2.51

    DB:2.51:Cpu Gadget Displays Nan sj


    I am doing a gadget, which i want to show the current CPU. But it returns NaN (Not a number). Can anyone tell, what i am doing wrong? Here is the source:

    Code Snippet

    DB:2.51:Cpu Gadget Displays Nan sj

    Thank you for the answer, but it does'nt work. Now it returns 0%.

  • RELEVANCY SCORE 2.51

    DB:2.51:Sdk Get Scene Info s8


    The interactive SDK example Use birdseye images-Get scene info uses an undocumented function: VEBirdseyeScene.GetThumbnailFilename(), which returns:http://t1.tiles.virtualearth.net/tiles/ot3695057.jpeg?g=[object Object]Another VEBirdseyeScene Class undocumented function, GetTileFilename(), returns http://tNaN.tiles.virtualearth.net/tiles/o02123002133-1329-NaN-NaN.jpeg?g=167Juanjo

    DB:2.51:Sdk Get Scene Info s8

    The interactive SDK example Use birdseye images-Get scene info uses an undocumented function: VEBirdseyeScene.GetThumbnailFilename(), which returns:http://t1.tiles.virtualearth.net/tiles/ot3695057.jpeg?g=[object Object]Another VEBirdseyeScene Class undocumented function, GetTileFilename(), returns http://tNaN.tiles.virtualearth.net/tiles/o02123002133-1329-NaN-NaN.jpeg?g=167Juanjo

  • RELEVANCY SCORE 2.50

    DB:2.50:Var Returning Nan In Function sm


    I have never had this issue until I starting writing my
    latest app. This is what it does. When the user logs in it gets a
    specific ID from the database. Whenever the user clicks on one of
    the various buttons (that opens pop ups) it carries that variable
    into the pop up. Simple, that is done. But when the "TitleWindow"
    loads I have a function that runs on the creationComplete. That
    code looks like a bit like this:
    ---
    creationComplete="initBuild()"
    ---
    [Bindable]
    public var landID:Number; // the variable coming in from the
    main application into this popUp.
    ---
    public function initBuild():void {
    if (landID 0) {
    trace(landID);
    }
    }
    ---
    The problem is that if I put the "landID" into a text field
    it shows the proper value of 3. But when I run that function is
    returns NaN as the value not matter. Yeah, I am new and have read a
    few books but never ran across something like this.

    DB:2.50:Var Returning Nan In Function sm

    Yeah, that is what it seems the more I learn. Just trying to
    separate my mind from my "normal" php knowledge since this is WAY
    different.

  • RELEVANCY SCORE 2.50

    DB:2.50:Softimage Mod Tool 7.5 Export Limitation Questions 3k


    I tried searching but couldn't find much, I need to know the export limitations for the dotXSI export function. An old game engine that I mod uses dotXSI 3.0 for compiling and sometimes it lets me export with UV's and some models I get function not implemented in EXP version and the compiled model will have no UV info. Seems like it's a certain property that the polymesh has that is stopping it sometimes from exporting. I've tried quite a few things but the only thing that seems to work is if I export using crosswalk, reimport then export as dotXSI 3.0. Any info on this is appreciated, don't see why this is even capped since the format is pretty old at this point, didn't think anyone still used it.

    DB:2.50:Softimage Mod Tool 7.5 Export Limitation Questions 3k

    I think you should really rule out that your installation has been corrupted somehow. A lot of things can do that, for instance registry tweakers. Try the runonce.bat to at least rule that out...

  • RELEVANCY SCORE 2.50

    DB:2.50:Mod Weirdness f1


    Can anyone tell why this simple formula:

    =MOD(127,60)

    returns this error:

    "The formula contains a function with the wrong number of arguments"

    and also, why does Numbers automatically change my formula to:

    =MOD(127,6)

    Thanks !

    DB:2.50:Mod Weirdness f1

    You didn't activate the GUI scripting.
    To do that, open the Universal acces System Preferences pane then check the box at the very bottom, the one speaking of "assistive devices".

    Yvan KOENIG (from FRANCE mardi 29 juillet 2008 20:41:02)

  • RELEVANCY SCORE 2.50

    DB:2.50:Problem With The Mod Function In Excel 33


    =MOD((15*(1,4-1));6)
    returns 6,0 and
    =MOD((15*(0,4));6)
    returns 0,0

    I would like the first MOD function to return 0 as well. Is there a reason why Excel behaves like this? Do you experience the same problem in excel 2010?

    I could replace the function with a INT-test instead ( =(15*(1,4-1))-6*INT((15*(1,4-1))/6) ), but it would be nicer if MOD would work.

    Office 2010 - I did not experience the same problem in office 2003

    Thanks

    DB:2.50:Problem With The Mod Function In Excel 33

    HanV wrote:
    With =A1-6-0, we're back at -1.77636E-15. If must say that I find this behavior very confusing. What is the difference between =A1-6 and =A1-6-0?

    If you find it confusing, I'm sure my explanation did little to alleviate Jennie's confusion. My apologies for getting too mired down in details. To answer your question....

    Refer to the poor description of the dubious heuristic under the misleading title "Example When a Value Reaches Zero" in http://support.microsoft.com/kb/78113 [3].

    In short, sometimes Excel forces an arithmetic result to be exactly zero if it considers the result to be "close enough" to zero [1].

    The operative word is "sometimes". KB 78113 states that it is when "an addition or subtraction operation result in a value at or very close to zero". But that is imprecise.

    First, it applies to the last arithmetic operation of a formula, not to subexpressions [2].

    Second, it applies when the last operation is subtraction of two operands with the same sign or addition of two operands with opposite signs.

    Third, and this is the key: it applies when the last operation changes the result.

    Parentheses count as an "operation" in this context. So =A1-6 is zero, but =(A1-6) is not zero, just as =A1-6-0 is not zero. The last operation, right parenthesis or -0, does not change the result.

    Don't try to make sense of that. It does not, IMHO. It is just the way it is.

    Bottom line: If you want to know the true value of an expression that might be close to zero, always append -0 to it.

    -----
    Endnotes

    [1] Let's not get into the definition of "close enough". To my knowledge, Microsoft never documents the criteria. I have deduced some of my own; but they are too complicated to explain, and they might be incomplete.

    [2] The "close to zero" heuristic also applies to comparisons of the form x=y, which we can think of x-y compared to zero.

    Generally, I don't believe this heuristic applies to Excel functions. But recently, I discovered that SUM has its own heuristic for changing
    some "close to zero" results to exactly zero. Too difficult to explain. Suffice it to say: IMHO, it is even more fickle than the addition/subtraction rule in KB 78113.

    [3] It is a "poor" description because it is incomplete and imprecise.

    It is a "dubious" heuristic because it is not applied consistently, leading to many seemingly inexplicable conditions. For example IF(A1=6,TRUE) is TRUE and =A1-6 is exactly zero, but IF(A1-6=0,TRUE) is FALSE.

    It is a "misleading" title because the heuristic is not limited to results that are "close to zero". For example, if A1 is =2^104+2^52, =A1-2^104 results in exactly zero, but =A1-2^104-0 demonstrates that the result is 2^52, which is obviously not "close to
    zero".

  • RELEVANCY SCORE 2.49

    DB:2.49:Sigar Giving Nan On Xen j1


    Hi,I am using SIGAR to get the CPU usage of nodes in a cluster running on Xen. The values I get sometimes include a NaN. Is this a known issue or is there a workaround for this?Thanks,Saliya

    DB:2.49:Sigar Giving Nan On Xen j1

    Hi,I am using SIGAR to get the CPU usage of nodes in a cluster running on Xen. The values I get sometimes include a NaN. Is this a known issue or is there a workaround for this?Thanks,Saliya

  • RELEVANCY SCORE 2.49

    DB:2.49:Bpel Engine Xpath (Non?) Compliance s7


    Hi,

    what is the level of compliance of BPEL Engine 10.1.3.4 (MLR#8) to XPATH 1.0 or XPATH 2.0?

    Specifically, I am interested in boolean() function. XPATH 1.0 and XPATH 2.0 specifications both state the following:

    http://www.w3.org/TR/xpath/#function-boolean

    Function: boolean boolean(object)
    The boolean function converts its argument to a boolean as follows:
    * a number is true if and only if it is neither positive or negative zero nor NaN
    * a node-set is true if and only if it is non-empty
    * a string is true if and only if its length is non-zero
    * an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type

    http://www.w3.org/TR/xpath-functions/#func-boolean

    15.1.1 fn:boolean
    fn:boolean($arg as item()*) as xs:boolean
    Summary: Computes the effective boolean value of the sequence $arg. See Section 2.4.3 Effective Boolean ValueXP
    * If $arg is the empty sequence, fn:boolean returns false.
    * If $arg is a sequence whose first item is a node, fn:boolean returns true.
    * If $arg is a singleton value of type xs:boolean or a derived from xs:boolean, fn:boolean returns $arg.
    * If $arg is a singleton value of type xs:string or a type derived from xs:string, xs:anyURI or a type derived from xs:anyURI or xs:untypedAtomic, fn:boolean returns false if the operand value has zero length; otherwise it returns true.
    * If $arg is a singleton value of any numeric type or a type derived from a numeric type, fn:boolean returns false if the operand value is NaN or is numerically equal to zero; otherwise it returns true.
    * In all other cases, fn:boolean raises a type error [err:FORG0006].

    In bpel, if I have a switch with a case expression as boolean(bpws:getVariableData('inputVariable','payload','/client:TestRequest/client:StringValue')), this returns false only if the StringValue element is missing in the inputVariable payload. If the StringValue element is present but is empty like stringElement/, then this expression returns true.

    Is this a bug?

    Thanks,
    Shanmu.

    DB:2.49:Bpel Engine Xpath (Non?) Compliance s7

    bumping up to check if some one can provide more information

    Regards,
    Shanmu.

  • RELEVANCY SCORE 2.49

    DB:2.49:Set Port Mod/Prt Debounce - ? x8



    Does anyone know what function is the "set port mod/prt debounce" command used for?

    DB:2.49:Set Port Mod/Prt Debounce - ? x8


    The debounce timer is the time a module's firmware waits before notifying the Supervisor Engine of a link change at the physical layer when a link goes down. This feature allows a user to enable an Ethernet Link Debounce timer on a per-port basis on Ethernet blades.

  • RELEVANCY SCORE 2.49

    DB:2.49:Worksheet Functions Not Supported By Application Object, Vba Mod Is Not The Same As Excel Mod 19


    kb article 107564 states thatVBA Mod function is the same as excel Mod funciton.
    and as a result of this the Excel Mod function is not available in VBA.
    Thevba help provides examples and specificaly states that the mod is rounded to an integer:
    Dim MyResult
    MyResult = 10 Mod 5 ' Returns 0.
    MyResult = 10 Mod 3 ' Returns 1.
    MyResult = 12 Mod 4.3 ' Returns 0.
    MyResult = 12.6 Mod 5 ' Returns 3.
    However using excel Mod(x,y) function: these results occur:

    Mod(10,5) = 0

    Mod(10,3) = 1

    Mod(12,4.3) = 3.4

    Mod(12.6,5) = 2.6

    This is from Excel 2010.
    How can we get the Application to use the Excel Worksheet function?

    DB:2.49:Worksheet Functions Not Supported By Application Object, Vba Mod Is Not The Same As Excel Mod 19

    Roll your own:

    Sub TestMacro()
    '12.3 Mod 3.4 should return 2.1
    MsgBox WSMod(12.3, 3.4)
    End Sub

    Function WSMod(dN As Double, dD As Double) As Double
    WSMod = (dN / dD - Int(dN / dD)) * dD
    End Function

  • RELEVANCY SCORE 2.48

    DB:2.48:Average On Crosstable With Nulls 1x


    Hi,
    I try to set average function on column in crosstable. Data contains NULLs. I got error during displaing report in HTML format (in Interactive format it's ok) - "oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException".
    Oracle support says Publisher is not working with NULLs in crosstable - but in Interactive View it's ok (almost - I see NaN instead of empty/NULL value).

    This simple query and some data:
    SELECT
    'Group' || ROUND((LEVEL+1)/4) "GROUP",
    'Row' || LEVEL "ROW",
    TRUNC(CURRENT_DATE) "DATE",
    LEVEL VALUE1,
    CASE WHEN mod(LEVEL,2) = 0 THEN LEVEL+LEVEL ELSE CAST(NULL AS NUMBER) END VALUE2
    FROM DUAL CONNECT BY LEVEL = 9;

    GROUP | ROW | DATE | VALUE1 | VALUE2
    ----------------------------------------
    Group1 | Row1 | 2011-08-02 | 1 |
    Group1 | Row2 | 2011-08-02 | 2 | 4
    Group1 | Row3 | 2011-08-02 | 3 |
    Group1 | Row4 | 2011-08-02 | 4 | 8

    In pure SQL i get correct result:
    SELECT "GROUP",
    AVG(VALUE1),
    AVG(VALUE2)
    FROM (
    SELECT 'Group' || ROUND((LEVEL+1)/4) "GROUP",
    'Row' || LEVEL "ROW",
    TRUNC(CURRENT_DATE) "DATE",
    LEVEL VALUE1,
    CASE WHEN mod(LEVEL,2) = 0 THEN LEVEL+LEVEL ELSE CAST(NULL AS NUMBER) END VALUE2
    FROM DUAL CONNECT BY LEVEL = 9
    )
    GROUP BY "GROUP"
    ;

    Edited by: stashek on 2011-08-08 23:37

    DB:2.48:Average On Crosstable With Nulls 1x

    Hi,
    I try to set average function on column in crosstable. Data contains NULLs. I got error during displaing report in HTML format (in Interactive format it's ok) - "oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException".
    Oracle support says Publisher is not working with NULLs in crosstable - but in Interactive View it's ok (almost - I see NaN instead of empty/NULL value).

    This simple query and some data:
    SELECT
    'Group' || ROUND((LEVEL+1)/4) "GROUP",
    'Row' || LEVEL "ROW",
    TRUNC(CURRENT_DATE) "DATE",
    LEVEL VALUE1,
    CASE WHEN mod(LEVEL,2) = 0 THEN LEVEL+LEVEL ELSE CAST(NULL AS NUMBER) END VALUE2
    FROM DUAL CONNECT BY LEVEL = 9;

    GROUP | ROW | DATE | VALUE1 | VALUE2
    ----------------------------------------
    Group1 | Row1 | 2011-08-02 | 1 |
    Group1 | Row2 | 2011-08-02 | 2 | 4
    Group1 | Row3 | 2011-08-02 | 3 |
    Group1 | Row4 | 2011-08-02 | 4 | 8

    In pure SQL i get correct result:
    SELECT "GROUP",
    AVG(VALUE1),
    AVG(VALUE2)
    FROM (
    SELECT 'Group' || ROUND((LEVEL+1)/4) "GROUP",
    'Row' || LEVEL "ROW",
    TRUNC(CURRENT_DATE) "DATE",
    LEVEL VALUE1,
    CASE WHEN mod(LEVEL,2) = 0 THEN LEVEL+LEVEL ELSE CAST(NULL AS NUMBER) END VALUE2
    FROM DUAL CONNECT BY LEVEL = 9
    )
    GROUP BY "GROUP"
    ;

    Edited by: stashek on 2011-08-08 23:37

  • RELEVANCY SCORE 2.48

    DB:2.48:Point By Point Functions Do Not Recover Correctly From Nan, Inf, Or -Inf. j9


    I have not checked all the point-by-point functions, but at least the mean function does not recover properly if an NaN, Inf, or -Inf value is entered into the input. Take the example code and run it. Change the input value to one of the above. Notice how the mean changes to NaN, Inf, or -Inf. Now if the value is changed back to a finite value, the mean goes to NaN for all three cases even after the "sample length" has been exceeded.The poper behavior of the subroutine would be for the mean to begin functioning again when all samples within the "sample length" have finite values.









    Attachments:







    Point-By-Point_NaN-Inf_Recovery_Bug.vi ‏20 KB

    DB:2.48:Point By Point Functions Do Not Recover Correctly From Nan, Inf, Or -Inf. j9

    I agree that this is unexpected behavior. This bugjust bit mehard, behavior is still presentin LV 8.0.1. No error code is generated either
    Thanks for the code CC, I will attempt to incorporate a similar workaround method.
    You Frogs like to consume bugs, no?



    ~~~~~~~~~~~~~~~~~~~~~~~~~~"It’s the questions that drive us.”~~~~~~~~~~~~~~~~~~~~~~~~~~

  • RELEVANCY SCORE 2.48

    DB:2.48:Sintaxys Of Mod Fox Function aa



    Does anyone knows whats the syntaxis for the mod function??

    Tnks all.

    DB:2.48:Sintaxys Of Mod Fox Function aa


    Hi Nicolas,

    MOD (N1, N2)....

    To get more help.....In the code area.....press F1....to get syntax help.

    Good luck, BB

  • RELEVANCY SCORE 2.48

    DB:2.48:Removing Nan sm


    Within my Matrix the percentage calculation sometimes returns a NaN value, how do i remove this...
    This is my calculation i am using

    =sum(IIF(Fields!Students.Value = 0, 0, 1))/iif(len(count(Fields!ID.Value)) = 0, 0, count(Fields!ID.Value))

    DB:2.48:Removing Nan sm

    Thanks, Sorna.
    Sam, as mentioned by Sorna above, you also need to handle the Null value scenario in your expression. I missed that point in my earlier reply. Thanks for pointing that out, Sorna.

    Cheers,
    ShalinShalin P. Kapadia

  • RELEVANCY SCORE 2.48

    DB:2.48:Re: Doubt In Using Sum() Function 8p


    Rajesh,

    2450+5000+null = null (NaN) is correct.

    Use instead of
    ?sum(SAL)?
    ?sum(SAL[.!=''])?
    which ignores the nulls.

    Regards
    Rainer

    DB:2.48:Re: Doubt In Using Sum() Function 8p

    Use

    xdoxslt:sum function, it will ignore the nulls..

  • RELEVANCY SCORE 2.48

    DB:2.48:Mod() Function - Incorrect Output dx


    The following bit of SQL uses the mod() function to determine modulus 2 of two large numbers

    13:37:20 SQLset echo on
    13:37:24 SQL@mod_test
    13:37:25 SQL
    13:37:25 SQL
    13:37:25 SQL
    13:37:25 SQLselect mod(power(2,127)-1,2) from dual
    13:37:25 2 /

    MOD(POWER(2,127)-1,2)
    ---------------------
    1

    1 row selected.

    13:37:25 SQL
    13:37:25 SQLselect mod(power(2,128)-1,2) from dual
    13:37:25 2 /

    MOD(POWER(2,128)-1,2)
    ---------------------
    -1

    1 row selected.

    13:37:25 SQL

    --------------------------------------------------

    Notice that mod(power(2,128)-1,2) returns an incorrect answer, while the
    answer for mod(power(2,127)-1,2) is correct.

    Does someone here know why?

    Is it a limit?

    Or is it a bug?

    Please supply an explanation and/or URL for your answer. :)

    DB:2.48:Mod() Function - Incorrect Output dx

    Thanks, I suspected there was a simple answer.

  • RELEVANCY SCORE 2.48

    DB:2.48:Cube Root Of A -Ive Number... sj


    Basically, a 'how to' question :)

    Math.pow(negativeNum, 1/3d);

    returns NaN

    yet, my calculator manages (-2)^(1/3) just fine :S

    DB:2.48:Cube Root Of A -Ive Number... sj

    Math.pow could perfectly well compute that
    principal value and, if it is numerically real,
    return it.Isn't that what it does currently? :)

  • RELEVANCY SCORE 2.48

    DB:2.48:C# Mod Function Question... j1


    I am finding mod is not just a simple calculation as I thought this morning.  I have some questions about the mod function...On My calculator -5 mod 6 = 1in Excell MOD(-5,6) = 1in Google -5 % 6 = 1Here is where I become confused...IN Microsofts C#  -5 % 6 = -5It seems all the first places quoted return mod from 0 to the number in the divisor, but C# returns mod from -divisor to divisor.Is there an explanation to this?Thanks,Keith

    DB:2.48:C# Mod Function Question... j1

    Keith,
    It may suprise you but in C# % is not a Mod operator.
    See
    http://blogs.msdn.com/b/ericlippert/archive/2011/12/05/what-s-the-difference-remainder-vs-modulus.aspx.
    D

  • RELEVANCY SCORE 2.48

    DB:2.48:Nan cz



    Hello,

    I wrote this program:

    real :: x,y,z,result

    x=2

    y=1

    z=1

    result=acos((x-y)/z)

    It returns result = NAN while it should it zero and I don't know why ! any help ? 

    Thanks,

    Andrew.

    DB:2.48:Nan cz


    I might also point out the old adage:

    GarbageOut = GarbageIn

    Implicit in the above is you do not output non-garbage for garbage in. acos requires input argument of -1.0 to 1.0. Outside that range is garbage-in.

    Jim Dempsey

  • RELEVANCY SCORE 2.47

    DB:2.47:Implement Mod(%) Function kk


    Please implement MOD(%) function without using the MOD or %. . Function should take in two integers and return one integer.

    DB:2.47:Implement Mod(%) Function kk

    The only reason to create and use a MOD function over the in build one is if this was a homework exercise.

    I'd have to classify that statement as false.

    A number of languages have slightly different built-in implementations that are a pain to use. For example what is mod(-1, 4) ? In some implementations the answer is -1 in others the answer is 3. If the built in version returns a value
    that is less useful to you then knowing how to write your own implementation is important and not necessarily a homework assignment. Some people may genuinely be interested in the mathematical definition of the mod function (or % operator)
    The wikipedia entry whose link is in the response by eyal below is decent and has an interesting table of language specific differences in implementation. The fact that such a table exists proves that the snarky responses are misguided. in any
    event, results that are always non-negative or results that are governed by the sign of the divisor are in my opinion most justifiable in mathematical terms. Results that depend on the sign of the dividend are difficult to use when trying
    to compute subscripts for arrays for example.
    The divisor based sign implementation looks like this
    // a = qb r such that 0 = r b and b 0
    // r = a - qb
    result = a - b*floor(a/b); // a % b
    here is the wikipedia link again
    http://en.wikipedia.org/wiki/Modulo_operation
    The non-answers here reflect cruelty or ignorance (inclusive or)

  • RELEVANCY SCORE 2.47

    DB:2.47:Air Mobile List Custom Layout as



    Hello Everyone,

    I am working with Adobe Air and I am making a mobile app. I want a custom list layout so I thought I would try some examples I found on the web. Unfortunately, most of these examples choke. They generally have code in the updateDisplayList call that resembles this.

    override public function updateDisplayList( width:Number, height:Number ):void

    {

    super.updateDisplayList( width, height );

    ....

    var layoutTarget:GroupBase = target;

    ....

    for( var i:int = 0 ; i layoutTarget.numElements; i++ )

    {

    element = layoutTarget.getElementAt( i ) as IVisualElement;

    CRASHES HERE -- element.setLayoutBoundsSize( NaN , NaN );

    element.setLayoutBoundsPosition( xpos , ypos );

    }

    }

    The issue I have found is that even though "layoutTarget.numElements" = 1, layoutTarget.getElementAt( i ) returns null, even when I don't cast it to anything.

    I've investigated looking at the TileLayout and VerticalLayout code, but I'm not quite sure I can even devise what is going on in there; they don't appear to be doing the stuff I am accustomed to seeing in the updateDIsplayList call.

    Any help is greatly appreciated.

    DB:2.47:Air Mobile List Custom Layout as


    I think it had something to do with my Layout class extending LayoutBase. Once I changed the superclass to VerticalLayout, it behaved. It still throws errors, but that is for another day.

  • RELEVANCY SCORE 2.47

    DB:2.47:Createprocesswithlogonw Fails And Getlasterror Returns 0 s9


    Hello,
    I need to spawn a process under a certain user, i use the CreateProcessWithLogonW() function, it creates the process then i use TerminateProcess() function to destroy the process, it works but sometimes CreateProcessWithLogonW returns 0 and GetLastError
    returns 0.
    Is there a way to have any information on what failed ?
    Thank you

    DB:2.47:Createprocesswithlogonw Fails And Getlasterror Returns 0 s9

    Nothing between CreateProcessWithLogonW and GetLastError.
    The code is Java with JNA (https://github.com/twall/jna), the problem disappeared when i removed the lpDesktop value, it must be NULL to work.

    WinBase.STARTUPINFO si = new WinBase.STARTUPINFO();
    si.dwFlags = WinBase.STARTF_USESHOWWINDOW | WinBase.STARTF_USESTDHANDLES;
    si.hStdInput = this.inRead.getValue();
    si.hStdOutput = this.outWrite.getValue();
    si.hStdError = this.errWrite.getValue();
    // si.lpDesktop = ; // == THIS SEEMS TO BE THE PROBLEM
    si.wShowWindow = new WinDef.WORD(0); // SW_HIDE

    boolean result = CreateProcessWithLogonW(
    /* String */ this.user, this.domain, this.password,
    /* int */ MyAdvapi.LOGON_WITH_PROFILE, // load user profile
    /* String */ null, // The name of the module to be executed
    /* String */ lpCommandLine, // The command line to be executed
    /* int */ WinBase.CREATE_NO_WINDOW | WinBase.CREATE_UNICODE_ENVIRONMENT, // creation flags
    /* String */ null, // the new process uses an environment created from the profile of the user
    /* String */ null, // the new process has the same current drive and directory as the calling process
    /* WinBase.STARTUPINFO */ si, // pointer to STARTUPINFO or STARTUPINFOEX structure
    /* WinBase.PROCESS_INFORMATION */ pi ); // pointer to PROCESS_FORMATION structure

    if (!result) {
    win32Error(CreateProcessWithLogon); // calls GetLastError
    }

    /* ... */

    private static void win32Error(final String functionName){
    int err = Kernel32.INSTANCE.GetLastError();
    String mess = Kernel32Util.formatMessageFromLastErrorCode(err);
    IOException e = new IOException(functionName+ error=+err+, +mess);
    throw new RuntimeException(e);
    }

  • RELEVANCY SCORE 2.47

    DB:2.47:Flex 4.5 Getstyle() Returns Null/Nan. d3



    Hi,

    I am migrating my code from flex 3.5 to 4.5.

    While migrating I came across a problem, wherever i am using getStyle method

    eg.

    getStyle("trackSkin")

    getStyle("tickLength")

    getStyle("tickOffset")

    getStyle("labelOffset")

    they return null or NaN. While this properties were available with SDK 3.5

    Please help.

    Regards

    Kiran

    DB:2.47:Flex 4.5 Getstyle() Returns Null/Nan. d3


    I am using it inside a class which extends UIComponent.

    e.g.

    var tLen:Number = getStyle("tickLength"); var tOff:Number = getStyle("tickOffset");

  • RELEVANCY SCORE 2.46

    DB:2.46:Deadlock During Debug ff



    Hi everybody,

    I'm trying to find where inside my program appears the first NaN var.  So I created the following function:

    logical FUNCTION testanan(var)

    implicit none
    real(8) var

    if (var /= var) then
    print*, 'deu NAN na', var
    TESTANAN=.TRUE.
    READ(*,*)
    endif

    ENDFUNCTION

                    

    I run in debug mode and when the message appears in the screen, I press pause to find out in which line the NaN appears. But when I do that, deadlock happens...

    How can I identify where is my first NaN happens?

    Regards

    DB:2.46:Deadlock During Debug ff


    Please don't use var /= var to test for NaN. Use the intrinsic IEEE_ISNAN from intrinsic module IEEE_ARITHMETIC. The compiler might choose to delete your comparison under normal optimization. If you want to do such tests, you must compile with the option /fp:strict

  • RELEVANCY SCORE 2.46

    DB:2.46:Returning Nan jd


    i'm having a javabean that calculates with some double variables, when it is accessed in .jsp page,it returns NaN. why it's happening????,
    plz help

    DB:2.46:Returning Nan jd

    Don't worry about it. You're jsp page just wants it's grandma.

  • RELEVANCY SCORE 2.46

    DB:2.46:Max Min Function d9


    The max min function behaves differently in LabVIEW 6.1 compared to 6.0.2. When comparing between NaN and 0.0, the function returned NaN as the max,in 6.0.2. In 6.1, it retunrs 0.0 as the max. Why is this so?

    DB:2.46:Max Min Function d9

    Thanks for the reply. It is interesting that both the max AND the min returned are zero!

  • RELEVANCY SCORE 2.46

    DB:2.46:Mod Function In Mdx 7s


    How to find the reminder in Mod function in MDX

    DB:2.46:Mod Function In Mdx 7s

    Hi Swathi,

    Doesn't % work?
    try this:
    with member num1 as 5
    member num2 as 2
    member mod as num1%num2
    select mod on 0
    from [Adventure Works]

    Let me know if you have any more questions on this. Please mark this post as an answer if it helps you resolve your question. - Bhawesh

  • RELEVANCY SCORE 2.46

    DB:2.46:Math.Pow Returns Nan 9d


    I am running into a strange problem when trying to raise a number slightly less than 1 to the 12th power. For example, pow(.99, 11.9) returns a good number, as does pow(.99,12.01). However, pow(.99, 12.0) returns NaN. Can anyone tell me why this is happening? Thank you in advance.

    DB:2.46:Math.Pow Returns Nan 9d

    Worked fine for me with jdk1.3.1. What version are you using?

    package Test;

    public class MathTest
    {

    public static void main(String[] args)
    {
    System.out.println(Math.pow(.99, 11.99));
    System.out.println(Math.pow(.99, 12.0));
    System.out.println(Math.pow(.99, 12.01));
    }

    }

  • RELEVANCY SCORE 2.45

    DB:2.45:Return Double Value Nan From Cvi Code Module x9



    When I return the value NAN from a CVI function in a DLL used as a code module, TestStand displays it as IND. I'm thinking the conversion is a feature of the CVI adapter.

    I want it to show as NAN in my report. Will I have to do some manipulation to get that result?

    Simple CVI function

    #include math.hvoid ReturnNAN(double *val)
    {
    *val = NAN;
    }

    According to CVI's help for C99 extensions, NAN is a quiet NAN.

    According to TestStand's help for special constant values, NAN is a quiet NAN, and IND is a Signaling NAN.

    I'm using TestStand 2010 SP1 and CVI 2010. Could someone check this with TestStand 2013 and CVI 2013 for me?

    Edit: I just tested with the C/C++ adapter, and I get the same behavior.

    Edit 2: I just tested changing the sign of the return value (i.e. *val = -NAN). The value is still displayed as IND




    Josh W. Certified TestStand ArchitectFormerly blue

    DB:2.45:Return Double Value Nan From Cvi Code Module x9


    It certainly does look like the documentation is incorrect or the implementation is incorrect. I'll submit a report.

    -Doug

  • RELEVANCY SCORE 2.45

    DB:2.45:Even/Odd Mod Function zp


    Create an anonymous PL/SQL block that accepts an integer number N through SQL*Plus substituion variable and then determines for each of the numbers in the range 1 through N inclusive whether it is odd or even. Use the MOD function to determine whether a number is odd or even. For example, MOD (10, 2) = 0 and MOD (11,2)=1. Print the results on the screen.

    Your program should handle NULL values. N should be set to 0 if a NULL value is entered.

    Here is the code I generated for this problem:

    ACCEPT num1 PROMPT 'Please enter a number between 1 and 10: '
    DECLARE
    mynum NUMBER := num1 (stores the user input into a PL/SQL variable);
    mynum1 NUMBER (stores the value returned from the MOD function);
    function MOD(mynum2 NUMBER)
    Return NUMBER (remainder datatype) is
    evenoddnum NUMBER (returns a remainder number from the calculation);
    BEGIN

    evenoddnum := mynum2/2 (divides the number entered by the user by 2);
    Return evenoddnum (the remainder from the division operation);
    END;
    BEGIN
    if (mynum) is NULL then
    mynum :=0;
    end if ; (sets all NULL values entered by the user to 0)

    mynum1 := MOD(mynum) (stores the remainder from the MOD calucation after the function is call. The user's input is passed as a parameter to the function) ;
    if (mynum1 = 0) then
    dbms_output.put_line ('You entered an even number');
    elsif (mynum1 = 1) then
    dbms_output.put_line ('You entered an odd number');
    end if; (test whether the remainder returned in mynum1 is 0 or 1)
    END;
    /

    Error message received:

    SQL start prog2c.sql
    Please enter a number between 1 and 10: 5
    mynum1 := MOD(mynum);
    *
    ERROR at line 20:
    ORA-06550: line 20, column 18:
    PLS-00306: wrong number or types of arguments in call to 'MOD'
    ORA-06550: line 20, column 8:
    PL/SQL: Statement ignored

    Does anyone have any idea what this error message means???? I am totally confused.

    Thanks!

    DB:2.45:Even/Odd Mod Function zp

    You declared your own function, MOD, that is the same as Oracle built-in function, bad move. I also don't see where you check if the input number is between 1 and 10.

  • RELEVANCY SCORE 2.45

    DB:2.45:Cra Editor - Mod Function d8



    Hi,

    I need to know if there is a way using the CRA Editor to implement the mod function.

    For example:

    123 mod 11 = 2

    This is a function that is available with the scientific Windows Calculator.

    Any help is welcome.

    Thanks.

    Frédéric

    DB:2.45:Cra Editor - Mod Function d8


    Hi,

    I have a workaround logic to find out MOD value. The procedure goes as follows...

    1. Define three integer variables X, Y and Z.

    2. Set the value of X as say 123. X holds the number to be divided - divident.

    3. The flow goes as follows...

    ---Start

    ---Set Y=X/11

    ---Set Z=Y*11

    ---Set Z=X-Z

    4. The value of Z returns the mod value.

    5. Some test cases...

    If X value is 123, Y=11 (result of 123/11), Z=11*11=121, Z = 123-121 = 2

    Note : In the place of 11 you can use any variable assigned with any value.

    Try out the above and update me the result.

    Regards

    Yogi

  • RELEVANCY SCORE 2.45

    DB:2.45:Open Circuit Measurments Return Nan 31


    In using the DMM 4070 I"ve noticed that in 2-wire resisitance mode, If I set the range to be smaller than the actual measured resistance I get back a "nan". I've also noticed that if I'm making measurements to verify open circuits I also get a "nan" back sometimes and sometimes is a huge resistance value. Is there any way to distinguish between the two?

    DB:2.45:Open Circuit Measurments Return Nan 31

    When measurements are outside of the
    range of the 4070 it will return 'NaN.' In your case, there is no way to
    distinguish between two different resistances if they are both beyond the range
    of the DMM card.




    Elijah KerrySenior Product Manager, LabVIEW_______________________________________________ Follow my Software Engineering for LabVIEW Blog

  • RELEVANCY SCORE 2.45

    DB:2.45:Javascript Code To Calculate Elapsed Hours Now Returns Value Nan 3x


    Hi all, I have some JavaScript code that calculated the Elapsed Hours from a date. the code used to work fine with no issues, but i have now noticed that it doesnt display the elapsed hours like it used to it now displays the value NaN.
    I dont have a huge amount of Java Knollege and the code javascript code I am using is from a sharepoint template that i installed (TimecardManagement)
    This is the code within my sharepoint webpart... It has a template with which calls the Javascript function, and then laterdown the code, witin another template, it calls the template that calls the javascript function.

    xsl:template name=show_elapsed_hours
    xsl:param name=timestamp /
    script type=text/javascriptShowElapsedHours(apos;xsl:value-of select=$timestamp /apos;);
    /script
    /xsl:template

    p
    Punched In: xsl:value-of select=@StartDate/
    br /
    Elapsed:
    xsl:call-template name=show_elapsed_hours
    xsl:with-param name=timestamp select=@StartDate /
    /xsl:call-template
    /p

    DB:2.45:Javascript Code To Calculate Elapsed Hours Now Returns Value Nan 3x

    Hi Tom,
    I have alread test the code, there is no errors in the javascript code.
    But there is some you should attention:

    xsl:template
    name=show_elapsed_hours
    xsl:param
    name=timestamp
    /
    script
    type=text/javascriptShowElapsedHours(apos;xsl:value-of
    select=$timestamp
    /apos;);
    /script

    /xsl:template
    Should be modify to :

    xsl:template
    name=show_elapsed_hours
    xsl:param
    name=timestamp
    /
    script
    type=text/javascriptShowElapsedHours(xsl:value-of
    select='$timestamp'
    /;);
    /script

    /xsl:template

    And there should be a field calledStartDate,and the string format of StartDate
    should like 2006-12-11T16:37:24Z .

    Thanks,
    Simon

  • RELEVANCY SCORE 2.45

    DB:2.45:Imaq Imagetoarray Returns Nan In Labview 7.0 am


    I wrote a VI to quantify an image using both LabVIEW 5.1 and IMAQ Vision 5.0. Recently I upgraded to LabVIEW 7.0. When I tried to run my VI, it worked well sometimes but very often, the data values were returned as NaN. Upon checking, I realized the problem lies with the IMAQ ImageToArray subVI. When I tried to convert an image to array, it sometimes return NaN. Can anyone help me with this problem? I am still using Vision 5.0.Thanks in advance.Kian

    DB:2.45:Imaq Imagetoarray Returns Nan In Labview 7.0 am

    That is a directory that may not be on your system due to the version of IMAQ Vision that you have.I have attached the LLB to this post in case you cannot locate it.Regards,Colin C.Applications Engineering



    Colin ChristoffersonCommunity Web MarketingBlog

  • RELEVANCY SCORE 2.44

    DB:2.44:Jaxb Marshalling Of "Double" Problem - Exponent Is In The Way sf


    An element declared as "xsd:double" in the schema is marshalled by JAXB as "3.000404E-4" to represent 0.0003000404 . When I try to process this XML document using XSLT, the standard number() function returns "NaN" because of the exponent in the representation of the number.

    Is there any way to have JAXB marshall this number in a way that is acceptable to XSLT?

    Thanks,

    -Allan

    DB:2.44:Jaxb Marshalling Of "Double" Problem - Exponent Is In The Way sf

    BigDecimals (xs:decimal) worked great. Thanks for the idea.

    -Allan

  • RELEVANCY SCORE 2.44

    DB:2.44:Skipwhile To Filter Out Unwanted Instances, Sometimes Not Working... s8


    I'm using Rx with WP7 and i'm trying to filter out 'GeoCoordinate.Unknown' instances using the 'SkipWhile' method, but occasionally I receive an 'Unknown' instance at the subscriber to the following method.
    The method 'CurrentLocationByTime' queries the device for the lat Long (GeoCoordinate class instance), and if this returns NaN for lat Long (i.e. GeoCoordinate.Unknown) I want these to be filtered out and not published to any subscribers to the
    subject (BehaviorSubject).
    Is there something wrong with the logic?

    var
    subject = new
    BehaviorSubjectGeoCoordinate(GeoCoordinate.Unknown);
    var
    observer = Observable.Interval(timeSpan);

    var
    subscriber = observer.ObserveOn(Scheduler.ThreadPool)
    .SubscribeOn(Scheduler.ThreadPool)
    .Select(t = CurrentLocationByTime(timeSpan))
    .Subscribe(subject);

    return
    subject
    .SkipWhile(c = c.IsUnknown)
    .DistinctUntilChanged()
    .Finally(() =
    {
    subscriber.Dispose();
    subscriber = null
    ;
    observer = null
    ;
    })
    .AsObservable();

    DB:2.44:Skipwhile To Filter Out Unwanted Instances, Sometimes Not Working... s8

    Hi Ollie,
    It can be simplified further because Interval uses ThreadPoolScheduler by default.

    return Observable
    .Interval(timeSpan)
    .Select(t = CurrentLocationByTime(timeSpan))
    .Where(c = !c.IsUnknown)
    .DistinctUntilChanged();

  • RELEVANCY SCORE 2.44

    DB:2.44:Code Hinting Incomplete js



    Hey guys, new here, apologies in advance if I'm not following appropriate procedure.

    Simple question followed by the full story: Is there a way to force Eclipse/Flex Builder to rebuild it's inline drop down code hinting list? I'm not talking about ctrl+spacebar, I mean get the whole program to include features not in an older SDK when you update to a newer one?

    The full story: I'm adapting some well written code from Keith Hair for finding line intersections, which returns null if no intersection is found. My code returns the x-value from the Point of intersection, but obviously can't return null.x, so I tried to have my code return a NaN when it gets a null from Keith's function. A quick look at the Flex API for Number reveals that the static constant NaN is available as Number.NaN, so I go back to Flex Builder type "Number.", the code hinting list pops up, and low and behold "NaN" ain't there.

    Because I like to jump to the worst, I assume my SDK is out of date or something, so I update it from 3.2 to 3.5, restart Flex Builder, but alas, it is not on the list again. So I begin updating Eclipse and generally just start going nuts without much to show for it. Throwing my hands up in exasperation, I just try typing Number.NaN into the code, rebuild the workspace, and happily there are no errors, but NaN is still not in the code hinting list. Clearly, this isn't so much an issue for NaN (it'll be fairly easy to remember how to get at it again in the future) but what gives me pause is wondering if there are other functions or constants I am missing when I browse through the code hinting list. My faith in the completeness of this feature is broken, please help.

    It's possible that this is a question better suited for the Eclipse forums, and if so, please let me know, I just thought I'd venture here first. Thanks very much.

    -Michael

    DB:2.44:Code Hinting Incomplete js


    So apparently Number.NaN is equivalent to just typing NaN (I do indeed feel like an idiot), but Number. produces a code hinting list with both POSITIVE_INFINITY and NEGATIVE_INFINITY, even though those are also interchangeable with Infinity and -Infinity respectively. What's going on here?

  • RELEVANCY SCORE 2.43

    DB:2.43:Round A Number cx


    I am an ASP developer giving JSP a try. I need an equal to the MOD() function in ASP that divides two numbers and only returns the remainder. Can someone point me in the correct direction? Thanks

    Dave

    DB:2.43:Round A Number cx

    A mod B in real life is
    A%B in Java Life

  • RELEVANCY SCORE 2.43

    DB:2.43:Get Visible Width Of An App? 8z


    Hello

    After intercepting the orientationchanged-event, I want to get the visible width of my app. So Width of the screen minus applicationbar (if landscape) and system tray width (if landscape and available)
    I've been using this.Width = shows NaN. Then tried this.AcutalWidth = This is sometimes working correctly, but sometimes I just get NaN.

    how can I solve this?

    Thanks

    James

    DB:2.43:Get Visible Width Of An App? 8z

    Hello

    After intercepting the orientationchanged-event, I want to get the visible width of my app. So Width of the screen minus applicationbar (if landscape) and system tray width (if landscape and available)
    I've been using this.Width = shows NaN. Then tried this.AcutalWidth = This is sometimes working correctly, but sometimes I just get NaN.

    how can I solve this?

    Thanks

    James

  • RELEVANCY SCORE 2.43

    DB:2.43:Delay In Ms Function da



    Hello,

    Im developing a delay function that works in milliseconds.

    this is my code so far:

    void delayms(unsigned int time){ result1 = max_value / 1000; final_result = result1 * time; d_enabled = FALSE; if(!d_enabled) { dmsec = 0; TPM2MOD = final_result; TPM2SC = 0x0F; TPM2C0SC = 0x54; TPM2C1SC = 0x10; d_enabled = TRUE; } while(!delay_done);}

    Heres the TPM_ISR

    interrupt VectorNumber_Vtpm2ch0 void timer2_CH0(void){ // Clear CH0F flag TPM2C0SC =0x7F; dmsec++; if(dmsec == final_result) { TPM2MOD = 0; TPM2SC = 0x00; TPM2C0SC = 0x00; TPM2C1SC = 0x00; delay_done = TRUE; } //Clear the 16-bit timer1 counter //TPM1CNTH = 0x00;}

    My timer counts at 1 second with a MOD equal to 0xFF ot 65535 so basically assigns the MOD value to a fixed one depending on the function call.

    My problem is, with that while it seems the timer ISR is not working, so Im looking for a way to loop inside the function until the timer returns a flag?.

    DB:2.43:Delay In Ms Function da


    Thank you very much, the only thing I had to do was, the incrval was 4000 so it was giving me a 336ms pulse, so I just multiplied, divided and changed the INCRVAL to a fixed value. Now it gives me the correct amount of ms.

    Regards.

  • RELEVANCY SCORE 2.43

    DB:2.43:Subpartition With Mod Function In Oracle 11g ja


    Hi All,Can we create Subpartition based on MOD Function in Oracle 11g ?

    DB:2.43:Subpartition With Mod Function In Oracle 11g ja

    Hi All,Can we create Subpartition based on MOD Function in Oracle 11g ?

  • RELEVANCY SCORE 2.42

    DB:2.42:Using Owa_Util.Get_Cgi_Env('Remote_User') dc


    Hello,
    We are running HTMLDB 2.0 on Oracle 10g, and are using owa_util.get_cgi_env('REMOTE_USER') to capture the username for application security purposes. Sometimes the function returns the SSO login user, which is what we want, and sometimes it returns HTMLDB_PUBLIC_USER. Does anyone know of a simple explanation for this behavior?

    Keith Mortara

    DB:2.42:Using Owa_Util.Get_Cgi_Env('Remote_User') dc

    Hello,
    We are running HTMLDB 2.0 on Oracle 10g, and are using owa_util.get_cgi_env('REMOTE_USER') to capture the username for application security purposes. Sometimes the function returns the SSO login user, which is what we want, and sometimes it returns HTMLDB_PUBLIC_USER. Does anyone know of a simple explanation for this behavior?

    Keith Mortara

  • RELEVANCY SCORE 2.42

    DB:2.42:Mod Syntax Error m8



    Hi All,

    I am getting Syntax error while using MOD mathematical function in Formula.Below is the formate.

    MOD(X/Y) where X is Key figure and Y is Formula variable.

    Plz Help me?

    DB:2.42:Mod Syntax Error m8


    The syntax of MOD is

    x MOD y

    not MOD(x/y).

    That is, if x and y are integers, x MOD y returns the remainder when x is divided by y.

  • RELEVANCY SCORE 2.42

    DB:2.42:Detection Of Nan In Ipps Functions 7c



    I'm doing a division on some 32f values that could have zeros in both operands. This will result in a NaN. Now, I'd like to change all the NaNs to zeros, but I don't see how to do it without an not equal function or a NaN-specific function.

    I'm using IPP 5.0, but I can upgrade if necessary.

    Thanks!

    DB:2.42:Detection Of Nan In Ipps Functions 7c


    I'm doing a division on some 32f values that could have zeros in both operands. This will result in a NaN. Now, I'd like to change all the NaNs to zeros, but I don't see how to do it without an not equal function or a NaN-specific function.

    I'm using IPP 5.0, but I can upgrade if necessary.

    Thanks!

  • RELEVANCY SCORE 2.42

    DB:2.42:Recompiling Framework.Swc 71


    In order to solve the DPI problem (see my last topic),I decided to see the sdk source code.I found changing systemManager.as , DensityUtils.as , RuntimeDPIProvider.as and DPIClassification.as file is the key to my problem ,so I changed the classifyDPI method in RuntimgDPIProvider.as file :mx_internal static function classifyDPI(dpi:Number):Number { if (dpi 200) return DPIClassification.DPI_160; if (dpi = 280) return DPIClassification.DPI_240;// I changed this if(dpi = 360) return DPIClassification.DPI_320; return DPIClassification.DPI_400; }then I added DPIClassification_DPI_400 = 400 in DPIClassification.as file In DensityUtils.as , I changed the getDPIScale method like this:public static function getDPIScale(sourceDPI:Number, targetDPI:Number):Number { // Unknown dpi returns NaN if ((sourceDPI != DPIClassification.DPI_160 sourceDPI != DPIClassification.DPI_240 sourceDPI != DPIClassification.DPI_320 sourceDPI != DPIClassification.DPI_400|| (targetDPI != DPIClassification.DPI_160 targetDPI != DPIClassification.DPI_240 targetDPI != DPIClassification.DPI_320 targetDPI != DPIClassification.DPI_400)) { return NaN; } return targetDPI / sourceDPI; }Now it seems that I can handle DPI problem by changing all these files. BUT,there's a new problem, I have to recompile framework.swc file to get these things work. If anyone have done this before?If these methods can be overrided in my application ,then how ?

    DB:2.42:Recompiling Framework.Swc 71

    There is another thing to do and is to modify MultiDPIBitmapSource.as inside spark/utils the same mode. Note: There is a small error in name of DensityUtils.as - DensityUtil.as at the beginning of post.Thanks a lot again.

  • RELEVANCY SCORE 2.42

    DB:2.42:Mod Function kd



    case when mod(a.acct_no,100) eq 0 then b.cust_xref_id else a.a_amx end as basic_cust_xref_id

    here the acct_no is character and its length is 13.

    How to make this work?Mod doesnt work for characters

    DB:2.42:Mod Function kd


    Use

    case when mod(coalesce(input(a.acct_no, ? best13.),0),100) eq 0 then b.cust_xref_id else a.a_amx end as basic_cust_xref_id

    or

    case when mod(coalesce(input(a.acct_no, ? best13.),1),100) eq 0 then b.cust_xref_id else a.a_amx end as basic_cust_xref_id

    depending if you want the value b.cust_xref_id or a.a_amx when a.acct_no is not a proper number.

    PG

  • RELEVANCY SCORE 2.42

    DB:2.42:Removing Newlines Are Carriage Returns From Query 71


    Hi i have this query .
    SELECTdivcode as div_cd, divname as div_dsc,
    nvl(modcode,0) as mdl_cd, nvl(mod,'All') as mdl_dsc
    FROM Test

    The values in these columns sometimes have newline and CRLF in them. I need to chek all columns for Newline or CRLF and strip them off.
    Can anybody plase guide me how to do that

    DB:2.42:Removing Newlines Are Carriage Returns From Query 71

    user13078372 wrote:
    It Does not solve my problem .
    like if i want to remove a newline character like '\n'
    ....
    Bascially i want to remove all newline(\n) and CR/LF characters , can anybody please help regarding thisI think using REGEXP-Functions is the right way, because regular expressions are powerful choice regarding string-manipulation/-checks... You have to find the right combination of the regexp-pattern-parameter!

    CR/LF will be removed by pattern [:cntrl:], but - yes - will not match "\n"

    try using following (example):
    select regexp_replace( 'this is my line\n and its end\n', '(\\n)$', '') from dual ;

    this is my line\n and its endabove pattern should remove "\n"-terminators only at the end of the line; if you omit the "$"-sign in the pattern, then "\n" will be removed everywhere:

    select regexp_replace( 'this is my line\n and its end\n', '(\\n)', '') from dual ;

    this is my line and its endTry combining both patterns (above and the [:cntrl:])...
    You should study regular expressions to get a deeper insight - it's powerful!

    Regards
    Nuerni

  • RELEVANCY SCORE 2.41

    DB:2.41:Datagrid Row Doesnt Resize When Cell Content Get Lower 8f


    In a custom DataGridColumn I have a TextBlock with TextWrap set to Wrap to display a long text. If the column get smaller the datagrid row get heiher but if the column get larger the datagrid row remains of the same height and don't get lower.

    I have tried to set the height of the ContentPresenter, DataGridCell, DataGridCellPresenter, etc but without success. Here also a dump of the controls hierarchy and their Height and ActualHeight:
    System.Windows.Controls.DataGrid NaN 300
    System.Windows.Controls.Border NaN 300
    System.Windows.Controls.Grid NaN 298
    System.Windows.Controls.Primitives.DataGridColumnHeader NaN 0
    System.Windows.Controls.Primitives.DataGridColumnHeadersPresenter NaN 23
    System.Windows.Controls.Primitives.DataGridColumnHeader NaN 23
    System.Windows.Controls.Grid NaN 23
    System.Windows.Shapes.Rectangle NaN 23
    System.Windows.Shapes.Rectangle NaN 23
    System.Windows.Controls.ContentPresenter NaN 15
    System.Windows.Controls.Grid NaN 15
    System.Windows.Controls.TextBlock NaN 15.2727279663086
    System.Windows.Shapes.Rectangle NaN 23
    System.Windows.Shapes.Path NaN 4.67804384231567
    System.Windows.Controls.Primitives.DataGridColumnHeader NaN 23
    System.Windows.Controls.Grid NaN 23
    System.Windows.Shapes.Rectangle NaN 23
    System.Windows.Shapes.Rectangle NaN 23
    System.Windows.Controls.ContentPresenter NaN 0
    System.Windows.Shapes.Rectangle NaN 0
    System.Windows.Shapes.Path NaN 4.67804384231567
    System.Windows.Controls.Primitives.DataGridColumnHeader NaN 0
    System.Windows.Controls.Grid NaN 0
    System.Windows.Controls.Border NaN 0
    System.Windows.Shapes.Rectangle NaN 0
    System.Windows.Shapes.Rectangle 1 1
    System.Windows.Controls.Primitives.DataGridRowsPresenter NaN 258
    System.Windows.Controls.DataGridRow NaN 248
    System.Windows.Controls.Primitives.DataGridFrozenGrid NaN 248
    System.Windows.Shapes.Rectangle NaN 248
    System.Windows.Controls.Primitives.DataGridRowHeader NaN 0
    System.Windows.Controls.Primitives.DataGridCellsPresenter NaN 248
    System.Windows.Controls.DataGridCell NaN 248
    System.Windows.Controls.Grid NaN 248
    System.Windows.Shapes.Rectangle NaN 248
    System.Windows.Controls.ContentPresenter NaN 248
    System.Windows.Controls.TextBlock NaN 112
    System.Windows.Shapes.Rectangle NaN 248
    System.Windows.Controls.DataGridCell NaN 248
    System.Windows.Controls.Grid NaN 248
    System.Windows.Shapes.Rectangle NaN 248
    System.Windows.Controls.ContentPresenter NaN 248
    System.Windows.Shapes.Rectangle NaN 0
    System.Windows.Controls.Primitives.DataGridDetailsPresenter NaN 0
    System.Windows.Shapes.Rectangle 1 0
    System.Windows.Shapes.Rectangle NaN 17
    System.Windows.Shapes.Rectangle NaN 17
    System.Windows.Controls.Primitives.ScrollBar NaN 0
    System.Windows.Controls.Grid NaN 17
    System.Windows.Shapes.Rectangle NaN 17
    System.Windows.Controls.Primitives.ScrollBar 18 18
    System.Windows.Controls.Grid NaN 18
    System.Windows.Controls.Grid NaN 18
    System.Windows.Shapes.Rectangle NaN 18
    System.Windows.Shapes.Rectangle NaN 18
    System.Windows.Shapes.Rectangle NaN 18
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Controls.Primitives.RepeatButton NaN 16
    System.Windows.Controls.Grid NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 14
    System.Windows.Shapes.Rectangle NaN 14
    System.Windows.Shapes.Path 8 6.84158325195313
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Controls.Primitives.RepeatButton NaN 18
    System.Windows.Controls.Grid NaN 18
    System.Windows.Controls.Primitives.Thumb NaN 18
    System.Windows.Controls.Grid NaN 18
    System.Windows.Controls.Grid NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 14
    System.Windows.Shapes.Rectangle NaN 14
    System.Windows.Controls.Primitives.RepeatButton NaN 18
    System.Windows.Controls.Grid NaN 18
    System.Windows.Controls.Primitives.RepeatButton NaN 16
    System.Windows.Controls.Grid NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Shapes.Rectangle NaN 14
    System.Windows.Shapes.Rectangle NaN 14
    System.Windows.Shapes.Path 8 6.84155750274658
    System.Windows.Shapes.Rectangle NaN 16
    System.Windows.Controls.Grid NaN 0
    System.Windows.Shapes.Rectangle NaN 0
    System.Windows.Shapes.Rectangle NaN 0
    System.Windows.Shapes.Rectangle NaN 0
    System.Windows.Controls.Primitives.RepeatButton 16 0
    System.Windows.Controls.Primitives.RepeatButton 0 0
    System.Windows.Controls.Primitives.Thumb 18 0
    System.Windows.Controls.Primitives.RepeatButton NaN 0
    System.Windows.Controls.Primitives.RepeatButton 16 0

    DB:2.41:Datagrid Row Doesnt Resize When Cell Content Get Lower 8f

    Thanks yifung, I find it really a big limitation the behavior set as grow only, but I didn't find any way to resize it. Perhaps is better to use a DataGrid of another SL library.

  • RELEVANCY SCORE 2.41

    DB:2.41:Xsl Problem In Weblogic7 7c



    The problem occurs when i try to parse a double value expressed in scientific notaion.

    e.g. -3.902317E4.

    xsl:variable name="temp"
    xsl:value-of select = "tempExpense" disable-output-escaping = "no" //xsl:variable

    xsl:value-of select = "number($temp)"/
    tempExpense is an element in the xml file i am processing. The number function
    returns a NaN. THIS CODE WORKS PERFECTLY FINE IN WEBLOGIC6.1.
    if i hardcode the valu like thisxsl:value-of select = "number(-3.902317E4)"/

    its working properly.
    Is it that weblogic7 uses a stricter parser etc. Could anyone suggest as to what

    need to be done to get the desired output.
    Thanks in advance
    aseef.j

    DB:2.41:Xsl Problem In Weblogic7 7c


    The problem occurs when i try to parse a double value expressed in scientific notaion.

    e.g. -3.902317E4.

    xsl:variable name="temp"
    xsl:value-of select = "tempExpense" disable-output-escaping = "no" //xsl:variable

    xsl:value-of select = "number($temp)"/
    tempExpense is an element in the xml file i am processing. The number function
    returns a NaN. THIS CODE WORKS PERFECTLY FINE IN WEBLOGIC6.1.
    if i hardcode the valu like thisxsl:value-of select = "number(-3.902317E4)"/

    its working properly.
    Is it that weblogic7 uses a stricter parser etc. Could anyone suggest as to what

    need to be done to get the desired output.
    Thanks in advance
    aseef.j

  • RELEVANCY SCORE 2.41

    DB:2.41:Exponentiation zd


    There is a little ambiguity on the proper way to write the exponents in a function
    So, I will make a little quiz

    I want to compute this:

    sin(3pi/4) = -0.70710678118654746

    Which answer is right ?

    Dim Teta As Double = 3 * Math.PI / 4
    Dim n As Double = 4
    Dim X As Double

    X = Math.Cos(Teta) ^ (2 / n) ' Returns: NaN

    X = (Math.Cos(Teta) ^ 2) ^ (1 / n) ' Returns: 0.840896415253715

    X = -0.70710678118654746 ^ (2 / n) ' Returns: -0.840896415253715

    DB:2.41:Exponentiation zd

    To BGQQ,
    With VB.Net did you use Math.Pow or the ^
    ?

    Dim D as Double = 2 ^ 2 ^ 3 ' Yields 64
    Math.Pow can not evaluate such expression unless you decide which ^ is to be performed first.

    Exactly. Do you mean (2^2)^3 or 2^(2^3). If you wrote it by hand and used stacked exponents then the anser is the latter.Those who use Application.DoEvents() have no idea what it does and those who know what it does never use it. JohnWein

  • RELEVANCY SCORE 2.41

    DB:2.41:Adding Substitute Formula To An Existing Formula Reformats Cell Value From Percentage To Plain Number p3


    Hi there,

    I have a formula which brings sales upsell percentages from a seperate sheet (copied in from an sql database table) into the main page of my sales kpi worksheet. As you may know, missing data in sql table fields can sometimes appear as "-" or "NaN" and sometimes
    "Infinity" given certain circumstances.
    Using a formula like: =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(VLOOKUP(A1,Sheet2!$A$1:$B$2,2,false),"NaN",0),"-",0),"Infinity",0) usually sorts this out, meaning a vlookup would return 0 instead. No worries.

    The problem comes from adding this type of formula to an exising =IF(ISERROR formula which corrects missing sales agent names where #N/A would usually be returned. When I try to incorporate an =substitute formula to the existing =IF(ISERROR formula, this
    is when the cell values get reformatted as a plain number rather than a percentage. (Eg. 49.12% would be reformatted as 0.4912)

    My formula as it stands:

    =IF(ISERROR(VLOOKUP(B2,Feed9!$A$2:$AG$127,46,false)),0,VLOOKUP(B2,Feed9!$A$2:$AG$127,46,false))

    This returns either the data im after, or zero if nothing is found. Great.

    However, if there are results other than the data im after (such as "-" "NaN" "Infinity" etc, mentioned above) this returns a #VALUE error. Ive tried different ways of adding an =substitute formula, and each time it reformats the cell values from percentage
    values to simple numerical values.

    This is what ive tried so far:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(ISERROR(VLOOKUP(B2,Feed9!$A$2:$AG$127,46,false)),0,VLOOKUP(B2,Feed9!$A$2:$AG$127,46,false)),"NaN",0),"-",0),"Infinity",0)

    This returns the correct data, but expressed as 0.4912 rather than 49.12%

    Any ideas how this can be avoided?

    - Please excuse any syntax errors, formulas typed from memory -

    DB:2.41:Adding Substitute Formula To An Existing Formula Reformats Cell Value From Percentage To Plain Number p3

    I'm glad to hear you got sorted out quickly. Thank you for taking the time for both your positive feedback and kind words.

  • RELEVANCY SCORE 2.41

    DB:2.41:Stats_Mode sf


    Hi,
    do we have Stats mod function in obiee

    thanks

    DB:2.41:Stats_Mode sf

    IT IS mOD NOT STATS MOD
    I.E.
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions173.htm#i1279911

    THANKS

  • RELEVANCY SCORE 2.41

    DB:2.41:Geocoordinate Speed Returns Nan On Emulator md


    Hi,

    I'm trying to determine the speed by using the GeoCoordinate speed propertythat is returned when a GeoCoordinateWatcher triggers a position changed. The problem is on the emulator the speed property is always NaN. On Stackoverflow I found the following solution:

    answer on stackoverflow
    But I can't find how to use the GeoCoordinateWatcher in a background thread, can someone help me find the solution?

    DB:2.41:Geocoordinate Speed Returns Nan On Emulator md

    I'll test the code in the link you posted. Thanks

    At the moment I don't have a development phone at my disposal, if I submit my app with the code you posted yesterday (with reactive extensions) the speed on a phone will come back as a number?

    Thanks for the help!
    Regards

  • RELEVANCY SCORE 2.40

    DB:2.40:Help Needed In Screen Variant For Va11 mx



    hi all,

    i have craeted a screen variant ...but how do we activate it.

    i used this function mod RS_HDSYS_GET_SC_VARIANT..

    and it returns nothing .....

    does this means that my screen variant is not active

    please advice

    thanks

    srinivas

    DB:2.40:Help Needed In Screen Variant For Va11 mx


    Did you get an answer to this or Have you figured it out because I am currently not getting anything back either for the FM I put into one of our custom Z programs.

  • RELEVANCY SCORE 2.40

    DB:2.40:Transfer Function Discrete Gives Nan Why? a1



    Hello,

    i have problem with discrete transfer function which has the input range [-30 to 30]

    and the transfer function as shown in the image attached

    the output is NaN ??? what could be the problem ?










    Attachments:







    Pole_placment.JPG ‏335 KB

    DB:2.40:Transfer Function Discrete Gives Nan Why? a1


    I have Fixed this problem and i put the code in sub VI as u suggested, in have another problem which is the input to the motor is not as required is way to big and changing all the time?

    wat could be the happening?!! i have attached the code










    Attachments:







    Pole_placment_adaptive_control.JPG ‏292 KB

  • RELEVANCY SCORE 2.40

    DB:2.40:Sap Cvom Geomap Error z9



    Hi,

    I am trying to implement geomaps in my app the following error shows up any idea to resolve this issue.

    Error: Problem parsing d="M65.25,NaNL195.75,NaNL326.25,NaNL456.75,NaNL587.25,NaNL717.75,NaN" d3.v2.js:1
    Error: Invalid value for line attribute y1="NaN" d3.v2.js:1
    Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1

    Uncaught TypeError: Cannot call method 'resourcePath' of undefined

    My code

    var Environment = sap.viz.env;

    var CrosstableDataset = sap.viz.data.CrosstableDataset;

    var vizcore = sap.viz.core;

    sap.viz.GeoManager.resourcePath('extension/viz.ext.geomaps/resources');

    Environment.initialize({

    'log': 'debug'

    });

    var chartOption = {

    title: {

    visible: true,

    text: 'Geo Bubble Chart Sample'

    }

    };

    var ds = new CrosstableDataset();

    var navValues = [{

    featureId: 'C21019301,NAVTEQ',

    name: 'New York'

    }, {

    featureId: 'C21086811,NAVTEQ',

    name: 'Vancouver'

    }, {

    featureId: 'C21155525,NAVTEQ',

    name: 'Montral'

    }, {

    featureId: 'C21156103,NAVTEQ',

    name: 'Ottawa'

    }, {

    featureId: 'C21055407,NAVTEQ',

    name: 'Toronto'

    }, {

    featureId: 'C23039216,NAVTEQ',

    name: 'Rio de Janeiro'

    }, {

    featureId: 'C23380551,NAVTEQ',

    name: 'Санкт-Петербург'

    }, {

    featureId: 'C20337455,NAVTEQ',

    name: 'London'

    }, {

    latLong: [0, 0],

    name: 'Center'

    }];

    var values = [];

    var infos = [];

    var measures = [],

    min = 18,

    max = 150,

    v, setNull = false;

    $.each(navValues, function(i, v) {

    values.push(v.name);

    infos.push({

    featureId: navValues[i].featureId,

    latLong: navValues[i].latLong

    });

    v = Math.round(Math.random() * max);

    if (v = min) {

    if (setNull) {

    v = null;

    } else {

    v = 'invalid value';

    }

    setNull = !setNull;

    }

    measures.push(v);

    });

    ds.setData({

    'analysisAxis': [{

    'index': 1,

    'data': [{

    'type': 'Dimension',

    'name': 'Region',

    'values': values,

    'infos': infos

    }]

    }],

    'measureValuesGroup': [{

    'index': 1,

    'data': [{

    'type': 'Measure',

    'name': 'Number of Planes',

    'values': [measures]

    }]

    }]

    });

    $('#chart').empty();

    var bar = vizcore.createViz({

    type: 'viz/geobubble',

    data: ds,

    container: $('#chart'),

    options: chartOption

    });

    DB:2.40:Sap Cvom Geomap Error z9


    Hi,

    I am trying to implement geomaps in my app the following error shows up any idea to resolve this issue.

    Error: Problem parsing d="M65.25,NaNL195.75,NaNL326.25,NaNL456.75,NaNL587.25,NaNL717.75,NaN" d3.v2.js:1
    Error: Invalid value for line attribute y1="NaN" d3.v2.js:1
    Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1Error: Invalid value for line attribute y1="NaN" d3.v2.js:1Error: Invalid value for line attribute y2="NaN" d3.v2.js:1

    Uncaught TypeError: Cannot call method 'resourcePath' of undefined

    My code

    var Environment = sap.viz.env;

    var CrosstableDataset = sap.viz.data.CrosstableDataset;

    var vizcore = sap.viz.core;

    sap.viz.GeoManager.resourcePath('extension/viz.ext.geomaps/resources');

    Environment.initialize({

    'log': 'debug'

    });

    var chartOption = {

    title: {

    visible: true,

    text: 'Geo Bubble Chart Sample'

    }

    };

    var ds = new CrosstableDataset();

    var navValues = [{

    featureId: 'C21019301,NAVTEQ',

    name: 'New York'

    }, {

    featureId: 'C21086811,NAVTEQ',

    name: 'Vancouver'

    }, {

    featureId: 'C21155525,NAVTEQ',

    name: 'Montral'

    }, {

    featureId: 'C21156103,NAVTEQ',

    name: 'Ottawa'

    }, {

    featureId: 'C21055407,NAVTEQ',

    name: 'Toronto'

    }, {

    featureId: 'C23039216,NAVTEQ',

    name: 'Rio de Janeiro'

    }, {

    featureId: 'C23380551,NAVTEQ',

    name: 'Санкт-Петербург'

    }, {

    featureId: 'C20337455,NAVTEQ',

    name: 'London'

    }, {

    latLong: [0, 0],

    name: 'Center'

    }];

    var values = [];

    var infos = [];

    var measures = [],

    min = 18,

    max = 150,

    v, setNull = false;

    $.each(navValues, function(i, v) {

    values.push(v.name);

    infos.push({

    featureId: navValues[i].featureId,

    latLong: navValues[i].latLong

    });

    v = Math.round(Math.random() * max);

    if (v = min) {

    if (setNull) {

    v = null;

    } else {

    v = 'invalid value';

    }

    setNull = !setNull;

    }

    measures.push(v);

    });

    ds.setData({

    'analysisAxis': [{

    'index': 1,

    'data': [{

    'type': 'Dimension',

    'name': 'Region',

    'values': values,

    'infos': infos

    }]

    }],

    'measureValuesGroup': [{

    'index': 1,

    'data': [{

    'type': 'Measure',

    'name': 'Number of Planes',

    'values': [measures]

    }]

    }]

    });

    $('#chart').empty();

    var bar = vizcore.createViz({

    type: 'viz/geobubble',

    data: ds,

    container: $('#chart'),

    options: chartOption

    });

  • RELEVANCY SCORE 2.40

    DB:2.40:Help In Mod() Function Please (Vba Vb.Net) a8


    '.Net 2003? -0.73325792801271883 mod 6.2831-0.73325792801271883
    'Execl 2003=MOD(-0.577946743;6.2831)5.705153257

    what can i do?! write function for same activity? any shortcut?

    DB:2.40:Help In Mod() Function Please (Vba Vb.Net) a8

    So, I don't think this ever worked (or at least XL's MOD function is not the same as VBA's Mod function in terms of implementation)
    However, you should always be careful when comparing floating point #'s for equality.  There are several reasons why floating point #'s will not compare equally even when you think they might.
    This is a pretty good article on it:
    http://msdn2.microsoft.com/en-us/library/ae382yt8.aspx
    Toddap_MS
     
     

  • RELEVANCY SCORE 2.40

    DB:2.40:Getting Nan While Reading The Data Using Airead x7


    I am using AT-MIO-16E-1 DAQ card for my application.I am capturing the data by configuring the card for a buffer size as 125000 scan rate as 250000.Sometimes while reading the data i am geeting the valuse as NAN

    DB:2.40:Getting Nan While Reading The Data Using Airead x7

    Hello;At this point I advise you to test your set up with one of Labview shipping examples. The better one to test that is the one named Continuous Acquisition and Chart (buffered).vi; which can be found at Search Examples-I/O Interfaces-Data Acquisition-Analog Input-Continuous Analog Input.If that works ok with your settings (Scan Rate and Buffer Size), you might want to review your code and make sure the code inside the Read loop is optimized.Hope this helps.Filipe

  • RELEVANCY SCORE 2.39

    DB:2.39:Predictcaselikelyhood Returns 0, 1 Or Nan ac


    Hi,
    I have a clustering model which I want to use to detect anamolies in input data. However when I create DMX queries in the SSAS MiningModel Prediction Tab using the PredictCaseLikelyHood function, the function usually returns 0, 1 or NaN without any
    apparent correlation to the underlying data. As far as I can tell from the clusters, theunderlying datais not particularly random.
    Any ideas to what could be causing this?
    Best regards
    Jrgen

    DB:2.39:Predictcaselikelyhood Returns 0, 1 Or Nan ac

    Hi,
    I have a clustering model which I want to use to detect anamolies in input data. However when I create DMX queries in the SSAS MiningModel Prediction Tab using the PredictCaseLikelyHood function, the function usually returns 0, 1 or NaN without any
    apparent correlation to the underlying data. As far as I can tell from the clusters, theunderlying datais not particularly random.
    Any ideas to what could be causing this?
    Best regards
    Jrgen

  • RELEVANCY SCORE 2.39

    DB:2.39:Modulus Returns Different Value In Excel Vs Excel Vba 3s


    Hello - Super dumb question:
    In my excel spreadsheet, if I input the formula =MOD(-14,12), I get an answer of 10
    In Excel VBA, if I use -14 Mod 12, I get -2
    Does anyone know why these provide different results, and more importantly, is there any way to get the same results in VBA as the spreadsheet function provides?
    Many thanks!DragonForest

    DB:2.39:Modulus Returns Different Value In Excel Vs Excel Vba 3s

    Yes that approach looks right but only if the Divisor is ve and both Number Divisor are Integers.
    Following is lightly tested to correct if Number and/or Divisor are -ve and if the Number is a decimal. As written there's still more to do to cater for a decimal divisor. Testing might expose further anomolies.
    ' purpose: to replicate the worksheet MOD function
    Function wfMod(Number As Double, Divisor As Double) As Double
    Dim num As Double
    Dim res As Double
    '' potentially incorrect if Divisor is -ve
    num = Int(Number 0.5)
    res = num Mod (Divisor)
    If Abs(res) = Divisor Then
    res = 0
    ElseIf res 0 And Divisor 0 Then
    res = res Divisor
    ElseIf Divisor 0 And res 0 Then
    res = res Divisor
    End If
    If num Number Then
    res = res (Number - num)
    End If
    wfMod = res
    End Function
    Feel free to adapt for all scenarios!
    Peter Thornton

  • RELEVANCY SCORE 2.39

    DB:2.39:Average Funtion Return Nan 8f


    If there is any Null value in group then average function returning NaN.

  • RELEVANCY SCORE 2.39

    DB:2.39:Render Target Returns Nan On 360, Not On Pc 9f


    When I deployed to the 360, I found that Vector4 textures are not supported as a render target, and that only one render target is supported at a time. I've refactored my code such that it uses four R32Fs and one render target, and this runs fine on my PC. But when deploying to the 360 I ran into another problem; GetData after GetTexture is returningcompletely wrong information.

    The thing is... even this simplified pixel shader returns NaN on 360! float4 Test() : COLOR0 {return (float4).25;}But it returns .25 for on the PC.
    How I'm calling it:this.GraphicsDevice.SetRenderTarget(0, null);this.GraphicsDevice.SetRenderTarget(0, rt[Offset + 0]);currentEffect.Begin();currentEffect.Techniques["Particle"].Passes["UpdateParticleLX"].Begin();this.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, this.VertCount, 0, this.PrimitiveCount);currentEffect.Techniques["Particle"].Passes["UpdateParticleLX"].End();currentEffect.End();this.GraphicsDevice.ResolveRenderTarget(0);ParticleLocation[0] = rt[Offset + 0].GetTexture();
    Debug of GetData on the PC shows:0.2500,0.2500 0.2500,0.25000.2500,0.2500 0.2500,0.25000.2500,0.2500 0.2500,0.2500...

    XBox shows: NaN,NaN NaN,NaNNaN,NaN NaN,NaNNaN,NaN NaN,NaN...

    DB:2.39:Render Target Returns Nan On 360, Not On Pc 9f

    For what it's worth, I wrote a simple program that renders to a
    floating point target and then uses GetData to read back the results,
    and that seems to be working ok for me. Using this effect: float4 PixelShader() : COLOR0 { return float4(23, 42, 0.5, -1); } technique { pass { PixelShader = compile ps_2_0 PixelShader(); } } This program code: using (RenderTarget2D rt = new RenderTarget2D(device, 32, 32, 1, SurfaceFormat.Single)) { device.SetRenderTarget(0, rt); using (SpriteBatch sprites = new SpriteBatch(device)) { sprites.Begin(SpriteBlendMode.None, SpriteSortMode.Immediate, SaveStateMode.None); effect.Begin(); effect.CurrentTechnique.Passes[0].Begin(); sprites.Draw(texture, Vector2.Zero, Color.White); sprites.End(); effect.CurrentTechnique.Passes[0].End(); effect.End(); } device.ResolveRenderTarget(0); device.SetRenderTarget(0, null); float[] results = new float[rt.Width * rt.Height]; rt.GetTexture().GetData(results); foreach (float result in results) Trace.WriteLine(result); } Prints
    the expected results. Vector2 format rendertargets also work correctly,
    but (as expected) trying to use a Vector4 format throws an exception
    when creating the rendertarget, due to that format not being supported.