Lookout 4.5.1 b18 nested expressions on startup

There seem to be a problem with nested expressions on process
startup.
We used to program a delay on process startup so that audio
alarms (if any) acivate after given period of time.
Here's code example of how we used to do that.
Normally PlayWave should play ONCE after
5 second delay upon process startup.
/* doesn't work correctly on 4.5.1 b18 - plays TWICE */
/* !TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave */
ExpPlayWave = new ExpStartupDelay;
/* It works OK ... */
/* !TimerStartupDelay->ExpPlayWave->PlayWave */
ExpPlayWave = new !TimerStartupDelay;
ExpStartupDelay = new !TimerStartupDelay;
Panel1 = new Panel ("Control Panel", 0, 239, 109, 16, 35,
0xC0C0C0, 0,
0, 0,
TimerStartupDelay.status
{l= 130,t= 7,w=
38,h= 20
ExpPlayWave {l= 105,t= 12,w= 16,h=
16,opt=8193,
type=2},
ExpStartupDelay {l= 105,t= 37,w= 16,h=
16,opt=8193,
type=2},
"ExpPlayWave" {l= 8,t= 8,w= 87,h=
20,opt=3,fwt=400
"ExpStartupDelay" {l= 4,t= 35,w= 100,h=
20,opt=3,fwt=400
Panel1.activate= true;
PlayWave = new PlayWave (ExpPlayWave, "c:\windows\media\ding.wav");
TimerStartupDelay= new OneShot (true, :05);
In other words a signal received by PlayWave
should be identical in both cases:
!TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave
!TimerStartupDelay->ExpPlayWave->PlayWave
In fact it is't in 4.5.1 build 18.
It was OK with earlier Lookout versions/builds.
I would mostly appreciate to hear from NI on the problem.
We have many processes with timer values 'hidden'
within nested expressions. And it used to work fine for years.
I feel sick thinking of rewriting / debugging
dozens of programs.
Best Regards,
Sergei

Further to my previous posting, I just found out that
renaming ExpStartupDelay to Exp1 eliminates the problem.
The problem seems to occur only on process startup.
Can anybody comment on that? How can it be that
expression name affects it's value?
Best Regards,
Sergei
[email protected] wrote:
> There seem to be a problem with nested expressions on process
> startup.
>
> We used to program a delay on process startup so that audio
> alarms (if any) acivate after given period of time.
>
> Here's code example of how we used to do that.
>
> Normally PlayWave should play ONCE after
> 5 second delay upon process startup.
>
> ------------------
> /* doesn't work correctly on 4.5.1 b18 - plays TWICE */
> /* !TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave */
>
> ExpPlayWave = new ExpStartupDelay;
>
> /* It works OK ... */
> /* !TimerStartupDelay->ExpPlayWave->PlayWave */
>
> /*
> ExpPlayWave = new !TimerStartupDelay;
> */
>
> ExpStartupDelay = new !TimerStartupDelay;
>
> Panel1 = new Panel ("Control Panel", 0, 239, 109, 16, 35,
> 0xC0C0C0, 0,
> 0, 0,
> TimerStartupDelay.status
> {l= 130,t= 7,w=
> 38,h= 20
> },
> ExpPlayWave {l= 105,t= 12,w= 16,h=
> 16,opt=8193,
> type=2},
> ExpStartupDelay {l= 105,t= 37,w= 16,h=
> 16,opt=8193,
> type=2},
> "ExpPlayWave" {l= 8,t= 8,w= 87,h=
> 20,opt=3,fwt=400
> },
> "ExpStartupDelay" {l= 4,t= 35,w= 100,h=
> 20,opt=3,fwt=400
> });
> Panel1.activate= true;
>
> PlayWave = new PlayWave (ExpPlayWave, "c:\windows\media\ding.wav");
>
> TimerStartupDelay= new OneShot (true, :05);
>
> ---------------
>
> In other words a signal received by PlayWave
> should be identical in both cases:
>
> !TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave
>
> !TimerStartupDelay->ExpPlayWave->PlayWave
>
> In fact it is't in 4.5.1 build 18.
> It was OK with earlier Lookout versions/builds.
>
> I would mostly appreciate to hear from NI on the problem.
>
> We have many processes with timer values 'hidden'
> within nested expressions. And it used to work fine for years.
> I feel sick thinking of rewriting / debugging
> dozens of programs.
>
> Best Regards,
>
> Sergei

Similar Messages

  • Nested Expressions

    The following works gives me no errors, and the page comes up, but the modelReference is always binded to index 0:
    <c:forEach items="${model.jobList}" varStatus="status" >
    <c:out value="${status.index}" />
    <h:input_text id="Job" modelReference="model.jobList[0].name" converter="text">
    <g:validate_required/>
    </h:input_text><br>
    </c:forEach>
    I have tried the following:
    <c:forEach items="${model.jobList}" varStatus="status" >
    <c:out value="${pageScope.status.index}" />
    <h:input_text id="Job" modelReference="model.jobList[${status.index}].name" converter="text">
    <g:validate_required/>
    </h:input_text><br>
    </c:forEach>
    I know that I have to be able to embed the index as part of the
    binded name. I had no problem doing this with the Struts-el tags.
    I keep getting the old reliable:
    ModelReference expression '{0}' is illegal in this context
    Any ideas about what might be wrong?

    I have found this to be clearly a bug, but in the default
    faces context, since all custom tags make calls to the faces
    context getModelValue() method. This method is not handling
    the nested expression, as from the JSTL <c:foreach tag.
    The good news is that it is an easy fix. JSF is very configurable. I was able to fix this problem by creating my own FacesContextFactory and FacesContext. My FacesContext implementation simply extends the default implementation provided by sun. I simply override the getModelValue() method, evaluate the nested expression correctly, then call the parent getModelValue().
    Here is my simple FacesContextFactory==========================>
    package com.geac;
    import javax.faces.lifecycle.*;
    public class FacesContextFactoryImpl
         extends javax.faces.context.FacesContextFactory {
         public FacesContextFactoryImpl() {
         public javax.faces.context.FacesContext getFacesContext(
              javax.servlet.ServletContext context,
              javax.servlet.ServletRequest request,
              javax.servlet.ServletResponse response,
              Lifecycle lifecycle) {
              System.out.println("$$$$$com.geac.FacesContextFactory.getFacesContext");
              System.out.println("Call the new constructure...");
              com.geac.FacesContextImpl facesContext =
                   new FacesContextImpl(context, request, response, lifecycle);
              return facesContext;
    Here is my FacesContext=================>
    package com.geac;
    import javax.servlet.*;
    import javax.faces.lifecycle.*;
    public class FacesContextImpl extends com.sun.faces.context.FacesContextImpl {
         public FacesContextImpl(
              ServletContext sc,
              ServletRequest request,
              ServletResponse response,
              Lifecycle lifecycle) {
              super(sc, request, response, lifecycle);
         public java.lang.Object getModelValue(java.lang.String modelReference) {
              System.out.println(
    "@@@@@FacesContext.getModelValue[" + modelReference + "]");
    // Evaluate the complete expression here utilizing
    // standard JSTL API
    // Pass the already evaluated expression into the
    // parent API
              return super.getModelValue(modelReference);
    That's all there is to it. This allows the model reference for all
    provided custom tags to fully support the JSTL 1.0 standard like
    the JSR-127 requires.
    The JSTL <c:foreach tag can work seamlessly with the JSF EA3 release. This bug will ultimatley be fixed on its own account, but in the mean time...
    Hope this helps anyone else who happens to have the same question.

  • HELP: Possible to nest %=expression% within javascript code?

    Hi, I'm working on an application where I need to use dynamic JSP variables in javascript, as shown below
    onclick="jsFunc(this.form, '<=myClass.getSpecialString()%>');">(Te code is originally within a button tag)
    This will not work, any ideas why? If I alert the second javascript parameter in the jsFunc javascript function, I'll get <=myClass.getSpecialString%> written out in the message box instead of the value returned by myClass.getSpecialString().
    This means that the parser apparently does not first evaluate the JSP <%%> tags as one would expect...
    How can I provide JSP values in a javascript function as shown??
    Very thanful for any answers on this one!!
    Best Regards/
    AC

    As you see, there is some struts involved, however,it
    does not affect the main problem here...
    <html:button property="page"styleClass="form"
    onclick="jsFunc('<%=myClass.getString()%>');">
    <bean:message
    ean:message
    key="regularcustomer.ord.bulkorder.addBtn"/>
    </html:button>
    <SCRIPT LANGUAGE="JavaScript">
    function sFunc(test){
    alert(test);
    </SCRIPT>
    The problem is that the onclick attribute of the
    button tag can support run time JSP expressions, ONLY
    if the entire attribute is a JSP expression. If you
    just had this...
    onclick="<%=myClass.getString()%>", it would work.You would have to wrap the jsFunc() call inside of a Java String, along with the myClass.getString() String, for it to work correctly.

  • Windows standby feature disabled after lookout 4.5.1 b18 installation

    I am just upgrading my development system - using an HP8510w running Windows XP professional.  Haing the need to support some legacy systems in Lookout 4.5.1, I am having to install this software as well as the more recent Lookout 6.1.  On installing 4.5 only, after the installation the standby feature on the laptop disappeared.  Does anyone have an ideas what might have caused this?  I have tried a number of options, of which I am getting now where.  Any help would be appreciated.
    Ian

    Did you install the NI Keyboard Driver with Lookout 4.5?  I'm not sure if it is installed with 4.5 by default.
    This driver will cause a similar problem. So try to modify the 4.5, if the driver is installed, remove it.
    Ryan Shi
    National Instruments

  • Daily flow rate totals over several days displayed in Lookout 6.1

    I need to display running daily flow rate totals in lookout for several days. The expressions would be for "today", "yesterday", "two days prior" and "three days prior". I am using accumulators to do month to date totals and running averages. I am stumped as to how to accomplish the daily totals. This application is using Lookout 6.1.
    Thanks,
    Brad Adams
    Service Manager
    CommTech
    Email: [email protected]
    Phone: 615-889-4756
    Cell: 615-477-8975
    "Once you eliminate all other possibilities, what's left, however improbable, must be the solution"

    Look into the Sample object. You can trigger this object to log the daily value at midnite.
    Previous samples are retained as sample.2, sample.3 etc.
    Regards,
    Bob L

  • Expression in expression

    Hi,
    I am trying to seperate common components into tld. But for each page the backingbean is different. so, I want to send my backing name as parameter to customTag.
    Now the problem is it is not identifying the the value in in <h:outputText > if I append a value.
    Code in my xhtml :
    <sp:cai label="#{LabelsMessages.clientAccInfo}" beanName="MyController" styleClass="myGroupBox" modification="false"/>
    I want to make use of my Controller in jstl like this :
    <h:outputText id="orderMet3hod" value="#{#{beanName}.clientAddress}"/>
    It is throwing as parsing error.
    I want to achieve this :
    <h:outputText id="orderMet3hod" value="#{MyController.clientAddress}"/>
    I read in an article that valueExpression can't take expression.
    Please let me know how can I achive the required thing.
    Thanks in Advance,
    Paan

    Milind_Dhar is correct. However, I'll add that if "beanName" is supposed to refer to a managed bean, you can look that up by doing:
    ELContext elContext = facesContext.getELContext();
    Object managedBean = facesContext.getApplication().getExpressionFactory().
    createValueExpression(elContext, "#{" + beanName + "}", Object.class).getValue(elContext);
    You can then have your VariableResolver return this so your EL expression can continue its evaluation.... however, this doesn't answer how the variable "beanName" gets set. This appears to be a property of your component, but there's no (easy) way to get that value via an EL expression. Although perhaps you can figure something out.
    fwiw, JSFT solves this in a couple ways... it provides the ability to nest expressions via it's own proprietary syntax #{$attribute{beanName}.foo}. And probably more appropriately, it has events/handlers which allow you to do arbitrary java code which would easily solve this w/o having to add an EL resolver (which slows down the evalutation of all EL expressions). In this case, you could set a request attribute after the comonent in question is created which contains the beanName, or the bean itself:
    setAttribute(key="theBean" value="#{xyzBean}");
    Then in your EL: #{theBean.foo}
    Anyway, good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Corrupt Lookout 6.1 file - and lks won't compile

    I have a corrupt lookout 6.1 file - reports 'not a lookout process file' and when I go to recompile the lks the cbl is reporting an error and crashing.  Is there anything I can do. Any help would be appreciated.

    Back from the dead.
    Have had this happen more to me as well (granted on 5.1)
    Lookout seems to write corrupted data to the process AND the lks file.
    Memory error?
    Example:  Yesterday, closed a clients process to compact databases.  While closing Lookout the process was being saved.  Next startup, invalid process file and corrupt lks.  Found 2 things in the lks:
    1) Some object names were replaced with "INVALIDSIGNAL"
    2) ASCII character 5 (not a displayable character) was in the middle of an expression
    After fixing these errors, the process compiled.
     Any ideas?
    Mike
    Mike Crabtree - Lead Developer
    Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
    (866) 964-6948 / (760) 247-9512

  • DNF boolean expressions

    Hi folks,
    I would like to produce a "minimal" boolean expression in disjunctive normal form.
    Something like a AND b OR c to
    DNF: ab or ac
    Therefor i have developed a parser which produces that normal form, but the performance decreases very much if i parse expressions with lots of variables or nested expressions like:
    (a AND (b OR c OR d) AND (e OR f OR g)) OR ((b OR c OR d) AND (e OR f OR g) AND h) OR (i AND (e OR f OR g))
    It lastes up to 5 seconds.
    Do u know any free api, which i could use for this purpose?.
    Thanks in advance.

    Thats the code:
    package com.audatex.axn.ui.vsic.datamodel.util;
    import java.util.Vector;
    public class BooleanExpressionsParser
        private static final Logger _logger =  new Logger( JATOTest.class );
        public static int nVars;
        public static int nAmount;
        public static String sActiveVars;
        public static String sValidInput;
        public boolean isK0, isK1, isKsd, isKlinear, isKmonoton;
        public static boolean[] arResults;
        private static CBoolFkt cBoolFkt = new CBoolFkt();
        public static int format(String exp) {
            int result = cBoolFkt.format(exp);
            if (result == CBoolFkt.OK) {
                nVars = cBoolFkt.nMinVars;
                nAmount = 1 << nVars;
                sActiveVars = cBoolFkt.sActiveVars.toString();
                sValidInput = cBoolFkt.sValidInput.toString();
            return result;
        public static String doCalc() {
            arResults = new boolean[nAmount];
            for (int i = 0; i < nAmount; i++) {
                for (int run = 0; run < nVars; run++) {
                    cBoolFkt.Vars[cBoolFkt.sActiveVars.charAt(run)] = isBitSet(i,
                            nVars - run - 1);
                arResults[i] = cBoolFkt.evaluate();
            return doNF();
        public static String convertExpression(String boolExpression){
            _logger.debug(" " + boolExpression);
            int result = format(boolExpression);
            String res = "";
            if(result == CBoolFkt.OK){
                _logger.debug("The format is O.k ,doing calculation ");
                res = doCalc();
        return res;
        private static String  doNF() {
            StringBuffer sMDNF = new StringBuffer();
            return doQuineMcClusky( sMDNF);
        private static String doQuineMcClusky(StringBuffer sMDNF) {
            Vector arConjunctions = new Vector();
            Vector arUsedVars = new Vector();
            Vector arMarked = new Vector();
            int nUsedVarsMask = nAmount - 1;
            for (int i = 0; i < nAmount; i++) {
                if (arResults) {
    arConjunctions.addElement(new Integer(i));
    arUsedVars.addElement(new Integer(nUsedVarsMask));
    arMarked.addElement(new Boolean(false));
    _logger.debug("arConjunctions.size(): " + arConjunctions.size());
    for (int level = 0; level < nVars; level++) {
    int nConjunctions = arConjunctions.size();
    if (nConjunctions <= 1) {
    break;
    for (int checknr = 0; checknr < nConjunctions - 1; checknr++) {
    for (int comparenr = checknr + 1; comparenr < nConjunctions;
    comparenr++) {
    if (((Integer) arUsedVars.elementAt(checknr)).intValue() ==
    ((Integer) arUsedVars.elementAt(comparenr)).intValue()) {
    int checkval = ((Integer) arConjunctions.elementAt(
    checknr)).intValue();
    int compareval = ((Integer) arConjunctions.elementAt(
    comparenr)).intValue();
    int DifferMask = xOrBits(checkval, compareval);
    if (bitCount(DifferMask) == 1) {
    arMarked.setElementAt(new Boolean(true), checknr);
    arMarked.setElementAt(new Boolean(true), comparenr);
    int NewConj = andBits(checkval, compareval);
    int NewMask = xOrBits(DifferMask,
    ((Integer) arUsedVars.
    elementAt(checknr)).intValue());
    arConjunctions.addElement(new Integer(NewConj));
    arUsedVars.addElement(new Integer(NewMask));
    arMarked.addElement(new Boolean(false));
    nConjunctions = arConjunctions.size();
    for (int checknr = 0; checknr < nConjunctions - 1; checknr++) {
    if (((Boolean) arMarked.elementAt(checknr)).booleanValue() == false) {
    for (int comparenr = checknr + 1; comparenr < nConjunctions;
    comparenr++) {
    if (((Boolean) arMarked.elementAt(comparenr)).
    booleanValue() == false) {
    int checkval = ((Integer) arConjunctions.elementAt(
    checknr)).intValue();
    int compareval = ((Integer) arConjunctions.
    elementAt(comparenr)).intValue();
    int checkmask = ((Integer) arUsedVars.elementAt(
    checknr)).intValue();
    int comparemask = ((Integer) arUsedVars.elementAt(
    comparenr)).intValue();
    int maskand = andBits(checkmask, comparemask);
    if (checkmask == comparemask) {
    if (checkval == compareval) {
    arMarked.setElementAt(new Boolean(true),
    comparenr);
    } else {
    if ((maskand == checkmask) &&
    (andBits(compareval, maskand) == checkval)) {
    arMarked.setElementAt(new Boolean(true),
    comparenr);
    if ((maskand == comparemask) &&
    (andBits(checkval, maskand) == compareval)) {
    arMarked.setElementAt(new Boolean(true),
    checknr);
    for (int cleanup = nConjunctions - 1; cleanup >= 0; cleanup--) {
    if (((Boolean) arMarked.elementAt(cleanup)).booleanValue() == true) {
    arConjunctions.removeElementAt(cleanup);
    arUsedVars.removeElementAt(cleanup);
    arMarked.removeElementAt(cleanup);
    for (int i = 0; i < arConjunctions.size(); i++)
    int nUsed = ((Integer) arUsedVars.elementAt(i)).intValue();
    int nConj = ((Integer) arConjunctions.elementAt(i)).intValue();
    for (int run = 0; run < nVars; run++) {
    if (isBitSet(nUsed, nVars - run - 1)) {
    if (!isBitSet(nConj, nVars - run - 1)) {
    sMDNF.append("!");
    sMDNF.append(cBoolFkt.sActiveVars.charAt(run));
    sMDNF.append(" | ");
    // _logger.debug(arConjunctions.toString());
    //_logger.debug(arUsedVars.toString());
    //_logger.debug(arMarked.toString());
    sMDNF.setLength(sMDNF.length() - 3);
    return sMDNF.toString();
    public static boolean isBitSet(int Number, int Bit) {
    return (Number & (1 << Bit)) > 0;
    public static int andBits(int a, int b) {
    int Result = 0;
    int CurrBit = 0;
    while ((a > 0) || (b > 0)) {
    if (isBitSet(a, 0) && isBitSet(b, 0)) {
    Result += 1 << CurrBit;
    CurrBit++;
    a >>= 1;
    b >>= 1;
    return Result;
    public static int xOrBits(int a, int b) {
    int Result = 0;
    int CurrBit = 0;
    while ((a > 0) || (b > 0)) {
    if (isBitSet(a, 0) != isBitSet(b, 0)) {
    Result += 1 << CurrBit;
    CurrBit++;
    a >>= 1;
    b >>= 1;
    return Result;
    public static int bitCount(int Number) {
    int Result = 0;
    while (Number > 0) {
    if ((Number & 1) != 0) {
    Result++;
    Number >>= 1;
    return Result;
    * @return Returns the cBoolFkt.
    public CBoolFkt getCBoolFkt() {
    return cBoolFkt;
    * @param boolFkt The cBoolFkt to set.
    public void setCBoolFkt(CBoolFkt boolFkt) {
    cBoolFkt = boolFkt;
    public class CBoolFkt {
    // Constants to handle exceptions
    public static final int OK=0, NOTOKEN=1, UNKNOWNTOKEN=2,
    NOVARS=3, VAREXPECTED=4,
    BRACKETEXPECTED=5, BRACKETNOTALLOWED=6;
    // max. number of diferent vbles in the boolean expression
    public final int nMaxVars = 12;
    // Amount of current dif. vbles in the boolean exp.
    public int nMinVars;
    // Name of the current bool. exp sorted by alph. order
    public StringBuffer sActiveVars;
    public StringBuffer sValidInput;
    // Wertebelegung der Variablen by ASCII-Namen, also z.B. Vars['a']=true
    public boolean[] Vars = new boolean[128];
    // Name of the vbles.
    final char A='a', B='b', C='c', D='d',
    E='e', F='f', G='g', H='h',
    I='i', J='j', K='k', L='l',
    // operators
    OR='|', AND='&', XOR='+', EQU='=', _NOT='!',
    LOG='>', LB='(', RB=')', TRUE='1', _FALSE='0',
    _END=0;
    // Words that are replaced by the symbols behind
    final String[] arLongNames = { "or","oder","and","und",
    "xor","not","nicht","=>" };
    final char[] arLongToken = { '|','|','&','&','+','!','!','>' };
    private StringBuffer sExpression;
    private int iExpressionCount;
    private char cToken;
    // Detection of no valid syntax and integration of the expression with the language
    // of the parser
    public int format(String expression)
    boolean bForceVar = true;
    int nBracketCount = 0;
    sValidInput = new StringBuffer();
    if (expression.length()==0)
    return NOTOKEN;
    // convert to lower case
    expression = expression.toLowerCase();
    // for replacing the key words by symbols
    StringBuffer sNoLongNames = new StringBuffer(expression);
    // process de convertion
    for (int i=0; i<arLongNames.length; i++)
    while(sNoLongNames.toString().indexOf(arLongNames[i])!=-1)
    StringBuffer sTemp = new StringBuffer();
    // saveing word address
    int index = sNoLongNames.toString().indexOf(arLongNames[i]);
    if (index>0)
    sTemp.append(sNoLongNames.toString().substring(0,index));
    // replacing word
    sTemp.append(arLongToken[i]);
    if ((index+arLongNames[i].length())<sNoLongNames.length())
    sTemp.append(sNoLongNames.toString().substring(index+arLongNames[i].length()));
    sNoLongNames = sTemp;
    // convertion complete
    expression = sNoLongNames.toString();
    for (int i=0; i<expression.length(); i++)
    // Testing tokens
    switch(expression.charAt(i))
    case ' ': continue;
    // valid tokens
    case FALSE:; case TRUE:;
    case A:; case B:; case C:; case D:;
    case E:; case F:; case G:; case H:;
    case I:; case J:; case K:; case L:
    // every next token ist ok
    bForceVar = false;
    // ok
    sValidInput.append(expression.charAt(i));
    break;
    case _NOT:;
    // the next token must be vble
    bForceVar = true;
    // ok
    sValidInput.append(expression.charAt(i));
    break;
    case AND:; case OR:; case XOR:; case LOG:; case _EQU:;
    if (bForceVar)
    return VAREXPECTED;
    // the next token must be vble
    bForceVar = true;
    // ok
    sValidInput.append(expression.charAt(i));
    break;
    case _LB:;
    nBracketCount++;
    bForceVar = true;
    // ok
    sValidInput.append(expression.charAt(i));
    break;
    case _RB:;
    if (bForceVar||(nBracketCount==0))
    return BRACKETNOTALLOWED;
    nBracketCount--;
    // ok
    sValidInput.append(expression.charAt(i));
    break;
    // not valid token
    default: return UNKNOWNTOKEN;
    if (nBracketCount!=0)
    return BRACKETEXPECTED;
    if (bForceVar)
    return VAREXPECTED;
    // Counter of the number of vbles
    nMinVars=0;
    sActiveVars = new StringBuffer();
    // limitating pos vble names
    String sAllVars = "abcdefghijkl";
    // testing the vbles
    int i;
    for (i=0; i<nMaxVars; i++)
    if (sValidInput.toString().indexOf(sAllVars.charAt(i))!=-1)
    nMinVars++;
    sActiveVars.append(sAllVars.charAt(i));
    if (nMinVars==0)
    return NOVARS;
    expression = sValidInput.toString();
    sExpression = sValidInput;
    sExpression.append(_END);
    return OK;
    public boolean evaluate()
    sExpression = sValidInput;
    iExpressionCount = 0;
    return doEqu(true);
    private boolean doEqu(boolean get)
    boolean left = doLog(get);
    for (;;)
    if (cToken==_EQU)
    left=(doLog(true)==left);
    else
    return left;
    private boolean doLog(boolean get)
    boolean left = doOr(get);
    for (;;)
    if (cToken==_LOG)
    // a>b=!a|b
    left=doOr(true)||!left;
    else
    return left;
    private boolean doOr(boolean get)
    boolean left = doXor(get);
    for (;;)
    if (cToken==_OR)
    left|=doXor(true);
    else
    return left;
    private boolean doXor(boolean get)
    boolean left = doAnd(get);
    for (;;)
    if (cToken==_XOR)
    left^=doAnd(true);
    else
    return left;
    private boolean doAnd(boolean get)
    boolean left = doPrimary(get);
    for (;;)
    switch (cToken)
    case _AND:
    left&=doPrimary(true); break;
    case A:; case B:; case C:; case D:;
    case E:; case F:; case G:; case H:;
    case I:; case J:; case K:; case L:;
    case LB:; case NOT:
    left&=doPrimary(false); break;
    default:
    return left;
    private boolean doPrimary(boolean get)
    if (get)
    getToken();
    boolean temp;
    switch (cToken)
    case A:; case B:; case C:; case D:;
    case E:; case F:; case G:; case H:;
    case I:; case J:; case K:; case L:;
    temp = Vars[cToken];
    getToken();
    return temp;
    case _NOT:
    return !doPrimary(true);
    case _TRUE:
    getToken();
    return true;
    case _FALSE:
    getToken();
    return false;
    case _LB:
    temp = doEqu(true);
    getToken();
    return temp;
    default: return true;
    private void getToken()
    cToken = sExpression.charAt(iExpressionCount++);
    I try to convert the expression, not to evaluate it.
    For example:
    (a and b) or c and (d and b) ---> DNF: b & c & d l a & b

  • CitadelControl not working

    I am using Lookout 4.5.1 b18 with latest fixes applied. The CitadelControl object is not able to copy database from my primary server to standby server, where both are windows NT4 systems. The Object settings are as below:
    Object Name:CitadelControl1
    Archive trace matching this pattern:"\\kalki\ABT_Server\Expressions\*"
    From:now()-.00094445
    To:0
    From the database in this folder:"E:\Ems\database"
    To the database in this folder:"\\Kalki_node_19\EMS\database"
    When this value transitions to trueb1
    I found it copying to another system in my network.Inspite of being all the network configurations identical for the destination systems, it was copying to only one machine. What could be the reason ?
    Thanks,
    N.Manikantan
    Kalki Communication
    Technologies
    Bangalore

    I don't know who put 4 stars for my answers. Because it is wrong (partialy - )
    Currently, Citadel 4 does not support archiving trends over the network - not in Lookout 4.x nor in LabVIEW DSC 6.x.
    For this reason my mentioned points b. and c. are not possible. (at least not on my Windows 2000 machine .
    For a., there are Examples on EPD about this issue:
    DSC Archive:
    http://ae.natinst.com/devzone/explprog.nsf/41ee12ddba6c766a8625684700691463/e790f76f5b07317e86256b79005a458c?OpenDocument
    http://ae.natinst.com/devzone/explprog.nsf/41ee12ddba6c766a8625684700691463/0c644a54773838ec86256b790072d0b2?OpenDocument
    Lookout Archive:
    http://ae.natinst.com/devzone/explprog.nsf/41ee12ddba6c766a8625684700691463/6a419608a0aabcad86256b6f005c5a1e?OpenDocument
    Sorry for the confusion.
    Regards
    Roland
    PS I: In LabVIEW DSC 6.1 you could write VIs that archives the Alarm and Event part of the Citadel 4 database to a remote computer.
    PS II: I could not get the other approach to work on Windows 2000 and I did not try on Win9x. But let us know if someone could successfully use the other approach on Windows 2000.

  • ALSB 3.0 error while Assign-copy proxy req 2 business req in transformation

    Hi,
    I'm getting the following error while i'm mapping proxy service request to business service request in split-join using 'assign,copy'
    @compile time it's showing this warning.
    Warning: [Assign, Copy] Element {http://www.abcd.com}objGetStateLstTyp not allowed on schema type E=getStateProvinceList|D=getStateProvinceList@http://www.abcd.com/test for From.
    Hence causing the following error @runtime.
    The invocation resulted in an error: [selectionFailure] Expression 'Variable getStateProvinceListRequest.parameters, nested expression ns1:objGetStateLstTyp/ns1:businessLine' returned 0 items when exactly 1 is required..
    Please help.
    Edited by ganeshgadi at 05/29/2008 10:20 PM

    Hi , I am facing the same issue.
    were you able to resolve it.
    please let me know if you were.
    Many Thanks.

  • Af:query and or conditions

    Is it possible to use af:query for and or conditions , i am able to create view criteria with groups of and or conditions , but in run time it only uses the first group. looks like it is not possible , but wondering if anybody successful with work around
    I was hoping to implement functionality similar to what's documented in below link for 10.1.3 in version 11 using af:query
    http://my.opera.com/dominionspy/blog/2007/02/26/an-advanced-custom-search-form-for-adf
    Thanks

    Frank
    Thanks for your reply
    I found this in developer guide after posting my question here
    Note: Query search forms do not support view criteria defined by
    nested expressions (multiple groups of view criteria items). Therefore
    avoid creating a view criteria with multiple groups in its expression
    when you intend for the UI designer to be able to create a query
    search form.
    The main reason i want use the qf:query is to make use of the save search feature with mds
    our users need advanced search filters for this application and they need different filter based on which customer data they are searching , but for any particular customer the filter will stay the same and can be used when they need to search data for that customer again in future. thought save search will help a lot here
    i can code the same way as the above example i posted for 10.1.3 in 11g , but i need the save search feature and i do not know how to code for that on on my own
    Regards

  • SQL Subquery in FROM clause

    Hi,
    some of my complex extractions that I am currently working on require nested SELECT statements. As far as I can see OpenSQL only supports subqueries in the WHERE clause, not in the FROM clause. Is this assumptions correct or is there a way around it? I have managed to use Native SQL for these nested expressions but the preference of the client is to use OpenSQL.
    Any ideas?
    Thanks,
    Tobias

    Hi
    In from clause you can use join.
    You can read data from more than one database table in a single SELECT statement by using inner or left outer joins in the FROM clause.
    The disadvantage of using joins is that redundant data is read from the hierarchically-superior table if there is a 1:N relationship between the outer and inner tables. This can considerably increase the amount of data transferred from the database to the application server. Therefore, when you program a join, you should ensure that the SELECT clause contains a list of only the columns that you really need. Furthermore, joins bypass the table buffer and read directly from the database. For this reason, you should use an ABAP Dictionary view instead of a join if you only want to read the data.
    The runtime of a join statement is heavily dependent on the database optimizer, especially when it contains more than two database tables. However, joins are nearly always quicker than using nested SELECT statements.
    thanks
    jagan

  • Group finction error

    i got error
    [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM xydata a
    INNER JOIN fm4features f ON f.id = a.' at line 5
    [SQL] SELECT gpstime,
           MIN(gpstime) `mn`,
           MAX(gpstime) `mx`,
    SEC_TO_TIME(SUM(TIME_TO_SEC(TIMEDIFF(max(gpstime), min(gpstime)))) AS  totalworktime
                             FROM   xydata a
                             INNER JOIN fm4features f ON f.id = a.id
                             WHERE  objectid = 17
                                    AND clientid = 1
                                    AND gpstime > '2010-05-11 00:00:00'
                                    AND gpstime < '2010-05-11 23:59:59'
                                    AND f.dataid = 1
                                    AND f.VALUE = '1'
                                    AND gpstime IS NOT NULL                              
    GROUP  BY Date_format(gpstime, '%Y-%m-%d')
    ORDER  BY gpstime ASCwhere i am doing wrong please help me

    Hi,
    You have unbalanced parentheses on this line:
    SEC_TO_TIME(SUM(TIME_TO_SEC(TIMEDIFF(max(gpstime), min(gpstime)))) AS  totalworktimeThis would be obvious if you indented you code so that, when you use deeply nested expressions, each ')' is directly below its corresponding '(', with nothing but white space in between them.
    For example:
    SEC_TO_TIME ( SUM ( TIME_TO_SEC ( TIMEDIFF ( max (gpstime)
                                , min (gpstime)
                ) AS  totalworktime

  • What are interfaces

    sir,
    plz explain me about interfaces, whare are they where r used in ABAP and explain with example.

    Hi Sandeep,
    Interfaces
    Classes, their instances (objects), and access to objects using reference variables form the basics of ABAP Objects. These means already allow you to model typical business applications, such as customers, orders, order items, invoices, and so on, using objects, and to implement solutions using ABAP Objects.
    However, it is often necessary for similar classes to provide similar functions that are coded differently in each class but which should provide a uniform point of contact for the user. For example, you might have two similar classes, savings account and check account, both of which have a method for calculating end of year charges. The interfaces and names of the methods are the same, but the actual implementation is different. The user of the classes and their instances must also be able to run the end of year method for all accounts, without having to worry about the actual type of each individual account.
    ABAP Objects makes this possible by using interfaces. Interfaces are independent structures that you can implement in a class to extend the scope of that class. The class-specific scope of a class is defined by its components and visibility sections. The public components of a class define its public scope, since all of its attributes and method parameters can be addressed by all users.
    Interfaces extend the scope of a class by adding their own components to its public section. This allows users to address different classes across different inheritance trees via a universal point of contact. Interface references allow users to address and use different classes in exactly the same way. Interfaces, along with inheritance, provide one of the pillars of polymorphism, since they allow a single method within an interface to behave differently in different classes.
    Defining Interfaces
    Like classes, you can define interfaces either globally in the Repository or locally in an ABAP program. For information about how to define local interfaces, refer to the Class Builder section of the ABAP Workbench Tools documentation. The definition of a local interface intf is enclosed in the statements:
    INTERFACE intf.
    ENDINTERFACE.
    The definition contains the declaration for all components (attributes, methods, events) of the interface. You can define the same components in an interface as in a class. The components of interfaces do not have to be assigned individually to a visibility section, since they automatically belong to the public section of the class in which the interface is implemented. Interfaces do not have an implementation part, since their methods are implemented in the class that implements the interface.
    Implementing Interfaces
    Unlike classes, interfaces do not have instances. Instead, interfaces are implemented by classes. To implement an interface in a class, use the statement
    INTERFACES intf.
    in the declaration part of the class. This statement may only appear in the public section of the class.
    When you implement an interface in a class, the components of the interface are added to the other components in the public section. A component icomp of an interface intf can be addressed as though it were a member of the class under the name intf~icomp.
    The class must implement the methods of all interfaces implemented in it. The implementation part of the class must contain a method implementation for each interface method imeth:
    METHOD intf~imeth.
    ENDMETHOD.
    Interfaces can be implemented by different classes. Each of these classes is extended by the same set of components. The methods of the interface can be implemented differently in each class. However, each class should keep the semantics of the interface. A method implementation should provide precisely that functionality which is required by the interface.
    Interfaces allow you to use different classes in a uniform way using interface references (polymorphism). For example, interfaces that are implemented in different classes extend the public scope of each class by the same set of components. If a class does not have any class-specific public components, the interfaces define the entire public face of the class.
    Interface References
    Reference variables allow you to access objects (refer to Working with Objects). Instead of creating reference variables with reference to a class, you can also define them with reference to an interface. This kind of reference variable can contain references to objects of classes that implement the corresponding interface.
    To define an interface reference, use the addition TYPE REF TO intf in the TYPES or DATA statement. intf must be an interface that has been declared to the program before the actual reference declaration occurs. A reference variable with the type interface reference is called an interface reference variable, or interface reference for short.
    An interface reference iref allows a user to use the form iref->icomp to address all visible interface components icomp of the object to which the object reference is pointing. It allows the user to access all of the components of the object that were added to its definition by the implementation of the interface.
    Addressing Objects Using Interface References
    If a class class implements an interface intf, you can use the following assignment between the class reference variable crefand an interface reference irefto make the interface reference in irefpoint to the same object as the class reference in cref:
    iref = cref
    If a class class implements an interface intf, you do not need to create a class reference variable cref with reference to the class first in order to create an object of the class class. Instead, you can use the TYPE addition in the CREATE OBJECT statement to create an instance of the class with an interface reference variable.
    CREATE OBJECT iref TYPE class.
    This creates an instance of the class classto which the reference in irefpoints.
    If the interface intf contains an instance attribute attr and an instance method meth, you can address the interface components as follows:
    Using the class reference variable cref:
    ·        To access an attribute attr: cref->intf~attr
    ·        To call a method meth: CALL METHOD cref->intf~meth
    Using the interface reference variable iref:
    ·        To access an attribute attr: iref->attr
    ·        To call a method meth: CALL METHOD iref->meth
    As far as the static components of interfaces are concerned, you can only use the interface name to access constants:
    To access a constant const: intf=>const
    For all other static components of an interface, you can only use object references or the class class that implements the interface:
    To access a static attribute attr: class=>intf~attr
    To call a static method meth: CALL METHOD class=>intf~meth
    Nesting Interfaces
    You can nest interfaces. An interface can contain one or more interfaces as its components, and these interfaces can, in turn, themselves contain interfaces. An interface which contains another interface is called a nested or a compound interface. An interface which is contained in another interface is referred to as the component interface. An interface which does not contain any nested interfaces is called an elementary interface.
    All interface components of a nested interface are on the same level. If a nested interface i3 contains the interface components i2 which are themselves nested and contain the interface components i1, then the components i1 become interface components of i3. Generally, a nested interface contains each interface component exactly once. Even if a component interface is used a second time as the component of another component interface, it still exists only once.
    If you want to nest interfaces, use the statement INTERFACES in an interface definition:
    INTERFACE i3.
      INTERFACES: i1, i2 ...
    ENDINTERFACE.
    Here, the interface i3 consists of its components as well as of the interfaces i1 and i2. The components of the component interfaces are not directly visible in the nested interface. In the above definition of i3, expressions like i1comp or i2compcannot be used, with the exception of the ALIAS statement.
    There are several ways how you can use the components of component interfaces:
    Using Alias Names
    You can use the ALIAS statement in interface definitions to assign alias names to the components of component interfaces. This makes these components visible in the interface definition.
    INTERFACE i2.
      INTERFACES i1.
      ALIASES alias21 FOR i1~comp1.
    ENDINTERFACE.
    INTERFACE i3.
      INTERFACES i2.
      ALIASES alias31 FOR i2~alias21.
      ALIASES alias32 FOR i2~comp2.
    ENDINTERFACE.
    Assigning Interface References
    You can assign interface references typed with reference to one of the component interfaces to interface references typed with reference to a nested interface. You can then use the interface references typed with reference to a component interface to address the components of the component interfaces.
    INTERFACE i2.
      INTERFACES i1.
    ENDINTERFACE.
    INTERFACE i3.
        INTERFACES i2.
    ENDINTERFACE.
    DATA: iref1 TYPE REF TO i1,
          iref2 TYPE REF TO i2,
          iref3 TYPE REF TO i3.
    iref2 = iref3.
    iref1 = iref2.
    ... iref1->comp1 ...
    ... iref2->comp2 ...
    The following expressions are not possible:
    ... iref2->i1~comp1 ...
    ... iref3->i2~comp2 ...
    Implementing Nested Interfaces in Classes
    When you implement a nested interface in a class, then all interfaces contained are implemented in the class at the same level, whatever their nesting depth. The class must then implement all methods.
    INTERFACE i2.
      INTERFACES i1.
    ENDINTERFACE.
    INTERFACE i3.
      INTERFACES i2.
    ENDINTERFACE.
    CLASS class DEFINITION.
      INTERFACES i3.
    ENDCLASS.
    CLASS class IMPLEMENTATION.
      METHOD i1~meth.
      ENDMETHOD.
    ENDCLASS.
    Use:
    DATA: cref TYPE REF TO class.
    ... cref->i1~comp1 ...
    ... cref->i2~comp2 ...
    ... cref->i3~comp3 ...
    Nested expressions such as cref->i3i2comp2 or cref->i3i2i3~comp3 are not possible. The nesting hierarchy is only important when you assign interface references to each other. You can assign class references for classes which implement a nested interface to all interface references typed with reference to an interface component contained. The interface references only know the components of their interface within the class.
    Interfaces and Inheritance
    As far as interfaces are concerned, polymorphism is based on the fact that each class implementing an interface can implement its methods in a different way. To the outside, however, all interface components look the same. As a result, interface references can point to objects of all classes which implement the associated interface.
    The concepts of interfaces and of inheritance are completely orthogonal. In the classes of an inheritance tree you can implement as many interfaces as required. However, you must pay attention to the fact that each interface can be implemented only once per inheritance tree. This ensures that each interface component has a unique name intf~icomp across the entire inheritance tree and is contained in all subclasses starting with the class that implements the interface.  Interface references that can point to a class of an inheritance tree can also point to all subclasses. Once they have been implemented, interface methods are fully-fledged components of a class and can be redefined in subclasses. However, you cannot declare interface methods as abstract or final in the definition of the interface.
    Reward points, if useful.
    Regards,
    Nitin.

  • Implicit character or charactered structure -- to String  Conversion

    Hi everybody,
    that sounds trivial but i am struggeling.... which is the most elegant way to do a implicit "To-String" Conversion in ABAP Objects...
    I have e.g.
        data lok_string type string.
        lok_string = wa.
        m_object->addline( lok_string ).
    which is working fine but is not elegant comaring with java.
    i want
        m_object->addline( wa ).
    but this don't go when "wa" is a structured workarea with many "type c"s in it (and only these).
    but since the explicit assignment "lok_string = wa." is working well, there could be a elegant  implicit  one?
    (m_object->addline expects a string variable.)
    Thank is aprreciated.
    Regards
    Hartmut

    Hi Sandra,
    this is the right direction.... but i would like to have it as an nested expression... (since implicit conversion seams to be impossible)
    like...
    m_object->addline( lcl_xxx=>tostring( wa_head ) )
    but this line above is not an valid abap objects syntax, unfortunatelly
    ... having:
    class lcl_xxx definition.
      public section.
        class-methods tostring importing charlike type clike returning value(string) type string.
    endclass.                   
    class lcl_xxx implementation.
      method tostring.
        string = charlike.
      endmethod.                   
    endclass.                   
    Best regards
    Hartmut

Maybe you are looking for

  • After upgrading to OS 10.9.1 Aperature 3.2.3 does not work and I'm not able to download new version of Aperature.

    After upgrading to OS 10.9.1 Aperature 3.2.3 does not work and I have not been able to download upgrade of Aperature?

  • Exchange Rate Differences

    Hi experts, i understand the general concept of exchange rate differences ie Rate at which one currency may be converted into another. The exchange rate is used when simply converting one currency to another but i need to know where it will affect in

  • Deleting bookmark in safari

    On the iPad I cannot delete a website from the reading list.  All the help says hit the delete button.  On the iPad the bookmark bar there is no delete

  • Something wrong with itunes u, downloads dont appear in library

    I'm trying to download iOS development Videos podcast from itunes u and while certain videos have been downloaded, 13 of them wont appear as downloaded in itunes even after completing their downloads several times. any help?

  • Connect using sqlplus

    Total noob question. I'm having trouble connecting to my database using sqlplus. The database is on a different machine and is 11g. I have 9i and 10g clients installed locally. I'm using the following syntax: sqlplus usrnm/pass@orcl and the error i g