"False" in quiz is always graded as "True"

I'm new to Captivate.....using version 6.  I've created 3 short quizzes with a variety of questions. The problem is, there are several true/false questions, and each time the students answer True to a question that is actually False, it grades them as correct.
I've verified this in the Adobe Quiz Analyzer (students post their scores through their Adobe accounts).
But...when I edit the quiz, I have those questions marked "False" ......and.....when I take the quiz myself (both in Preview mode and published pdf) it grades me correctly. I also tried taking the quizzes from another computer, and everything still works properly for me.
There are no problems with the other types of questions....only the True/False.
Please help!  Thank you in advance.
Tara

Hello,
Welcome to Adobe Forums.
Which Adobe Flash Player installed on your Student's computers ?
Also have you tested a Sample project with 2 or 4 True/False questions, do you have same issue with your students ?
Thanks,
Vikram

Similar Messages

  • Htmlb:inputField always uses encode="TRUE"

    Hi,
    I have a inputField using data binding. The model field contains "Česká republika", and this code
    <htmlb:inputField id="InpSupl" value="//model/edit_wa.supplier" encode="FALSE"/>
    Renders to
    <input class="sapEdfTxtEnbl" size="60" maxlength="60" name="cont_INVEST_invest_edit_wa.supplier" id="cont_INVEST_InpSupl" value="&amp;#268;eská republika">
    How can I prevent this HTML-encoding?
    Version 6.40 SP 12.
    Thanks,
    Thilo

    Hmm, I don't understand all this.
    Look here, this is my complete output (sorry about that) of your example.
    And you can see, the ampersand is encoded, but I want the letter È (a upper sized C with a ^ on top).
    Why does it work at your place?
    <html><head><title> </title><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" ><meta http-equiv="imagetoolbar" content="no"><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/events.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/event_dictionary.js"></script><link id="urstyle" rel="stylesheet" type="text/css" href="/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/ur_ie6.css"><link rel="stylesheet" type="text/css" href="/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/ur_pop_ie6.css"><script type="text/javascript" language="JavaScript">var popup_emptydoc="/sap/public/bsp/sap/htmlb/domainRelaxOff.htm";var HTMLB_SECTION508 = false;</script><script type="text/javascript" language="JavaScript">var sapUrDomainRelaxing = {NONE:"NONE",MINIMAL:"MINIMAL",MAXIMAL:"MAXIMAL"};ur_system={doc:window.document ,mimepath:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/common/",stylepath:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/",emptyhoverurl:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/common/emptyhover.html",is508:false,direction:"ltr",domainrelaxing:sapUrDomainRelaxing.NONE,browser_abbrev:"ie6",dateformat:1,firstdayofweek:0}</script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/sapUrMapi_ie6.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/popup_ie6.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/languages/urMessageBundle_de.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/misc.js"></script></head><body class="urBdyStd" scroll="AUTO" style="margin-left:2;margin-right:2;margin-top:2;margin-bottom:2">
          <input disabled type="hidden" id="htmlb_first_form_id" name="htmlb_first_form_id" value="htmlb_form_1"><form id="htmlb_form_1" name="htmlb_form_1" method="POST" autocomplete="off"><input type="hidden" name="htmlbScrollX"><input type="hidden" name="htmlbScrollY"><input type="hidden" name="htmlbevt_ty"><input type="hidden" name="htmlbdoc_id" value=""><input type="hidden" name="htmlbevt_frm" id="htmlbevt_frm" value="htmlb_form_1"><input type="hidden" name="htmlbevt_oid"><input type="hidden" name="htmlbevt_id"><input type="hidden" name="htmlbevt_cnt"><input type="hidden" name="htmlbevt_par1"><input type="hidden" name="htmlbevt_par2"><input type="hidden" name="htmlbevt_par3"><input type="hidden" name="htmlbevt_par4"><input type="hidden" name="htmlbevt_par5"><input type="hidden" name="htmlbevt_par6"><input type="hidden" name="htmlbevt_par7"><input type="hidden" name="htmlbevt_par8"><input type="hidden" name="htmlbevt_par9"><input type="hidden" name="onInputProcessing" value="htmlb"><input type="hidden" name="htmlb_form_1_complete" id="htmlb_form_1_complete" code="OK"><input type="hidden" name="sap-htmlb-design" id="sap-htmlb-design" value="">
              <span id="InpSupl-r" class="urEdf2Whl"><input type="Text" class="urEdf2TxtEnbl" autocomplete="off" id="InpSupl" ct="InputField" name="InpSupl" st="" value="&amp;#268;eská republika" onblur="sapUrMapi_InputField_Blur('InpSupl',event)" onkeydown="sapUrMapi_InputField_keydown('InpSupl',event)" onkeyup="sapUrMapi_InputField_KeyUp('InpSupl',event)" onfocus="sapUrMapi_InputField_focus('InpSupl',event)"></span>
          </form>
    <script language="JavaScript">
    function sapArrErase(){if(typeof(sapUrMapi_PcTabSeq_Registry)=='undefined') return;sapUrMapi_PcTabSeq_Registry1=sapUrMapi_PcTabSeq_Registry;sapUrMapi_PcTabSeq_Registry=new Array();for(var p in sapUrMapi_PcTabSeq_Registry1){if(document.getElementById(p)!=null)sapUrMapi_PcTabSeq_Registry[p]=true;}}function sapOnResize(){sapArrErase();;}window.onresize=sapOnResize;window.attachEvent ('onload', sapOnResize);
    </script><script language="JavaScript">sapUrMapi_initLinkStatus();</script><noscript><iframe style="position:absolute;top:0;left:0;width:100%;height:150%" src="?sap-bsp-exception=NO_JS"></iframe></noscript><script language="JavaScript">if(document.cookie==null||document.cookie.indexOf("sap-contextid")<0){location.assign("?sap-bsp-exception=NO_CK");}</script></body></html>
    In my opinion the inputField always does a encode="TRUE" and I don't have a chance to set it to FALSE.

  • Bug with Network Load Balancing Services and SkipAsSource always reverting to true

    Steps to reproduce:
    Add an IP address to the cluster (2 nodes running Windows Server 2012) using the Network Load Balancing Manager
    Using PowerShell set the SkipAsSource flag on the IP Address to true (Set-NetIpAddress -IpAddress 192.168.1.10 -SkipAsSource $true). The flag is correctly set.
    Try to reverse the setting (Set-NetIpAddress -IpAddress 192.168.1.10 -SkipAsSource $false). Flag stays as true.
    It appears as though Network Load Balancing Services is remembering the setting from someone.
    Things I've tried all without success (in no particular order):
    Removing the IP address from the cluster and adding it back in
    Using PowerShell to remove the IP address and add it back in manually (on each host).Flag stays set as true on the 1st node but takes a second before it reverts back to true on the 2nd node.
    Using netsh to remove the IP address and add it back in manually (on each host). Flag stays set as true on the 1st node but takes a second before it reverts back to true on the 2nd node.
    Deleting each host from the cluster (one at a time), removing the registry keys CurrentControlSet\Services\WLBS and
    Removing both hosts from the cluster
    Restarting the hosts
    Using processmon (sysinternals) to try and find a registry entry that might be set when SkipAsSource is set
    Does anyone know:
    How to resolve this issue? I'm guessing resetting the TCP/IP stack would work but that's a last resort as it requires an on sight visit to the datacentre.
    Where the SkipAsSource flag it stored?
    How to reset the master/global cluster config?
    Thank in advance,
    Antony

    Hi Antony,
    I am trying to involve someone familiar with this topic to further look at this issue.
    There might be some time delay. Appreciate your patience.
    Best Regards.
    Steven Lee
    TechNet Community Support

  • Help! Urgent!!!  tree in web page

    I am new in Swing. I need to implement a tree in web page. The tree should appear in the left of a frame and the corresponding content should be displayed in the right of the frame.
    Could anyone give me an example? I need this help very urgently. Thank you very much in advance.
    my email addr:
    [email protected]

    this is mtmcode.js
    i try to send u another part of the code
    // Morten's JavaScript Tree Menu
    // version 2.3.0, dated 2001-04-30
    // http://www.treemenu.com/
    // Copyright (c) 2001, Morten Wang & contributors
    // All rights reserved.
    // This software is released under the BSD License which should accompany
    // it in the file "COPYING". If you do not have this file you can access
    // the license through the WWW at http://www.treemenu.com/license.txt
    * Define the MenuItem object. *
    function MTMenuItem(text, url, target, tooltip, icon)
    this.text = text;
    this.url = url ? url : "";
    this.target = target ? target : "";
    this.tooltip = tooltip;
    this.icon = icon ? icon : "";
    this.number = MTMNumber++;
    this.submenu = null;
    this.expanded = false;
    this.MTMakeSubmenu = MTMakeSubmenu;
    function MTMakeSubmenu(menu, isExpanded, collapseIcon, expandIcon)
    this.submenu = menu;
    this.expanded = isExpanded;
    this.collapseIcon = collapseIcon ? collapseIcon : "menu_folder_closed.gif";
    this.expandIcon = expandIcon ? expandIcon : "menu_folder_open.gif";
    * Define the Menu object. *
    function MTMenu()
    this.items = new Array();
    this.MTMAddItem = MTMAddItem;
    function MTMAddItem(item)
    this.items[this.items.length] = item;
    * Define the icon list, addIcon function and MTMIcon item. *
    function IconList()
    this.items = new Array();
    this.addIcon = addIcon;
    function addIcon(item)
    this.items[this.items.length] = item;
    function MTMIcon(iconfile, match, type)
    this.file = iconfile;
    this.match = match;
    this.type = type;
    * The MTMBrowser object. A custom "user agent" that'll define the browser *
    * seen from the menu's point of view. *
    function MTMBrowser()
    this.cookieEnabled = false;
    this.preHREF = "";
    this.MTMable = false;
    this.cssEnabled = true;
    this.browserType = "other";
    if(navigator.appName == "Netscape" && navigator.userAgent.indexOf("WebTV") == -1)
    if(parseInt(navigator.appVersion) == 3 && (navigator.userAgent.indexOf("Opera") == -1))
    this.MTMable = true;
    this.browserType = "NN3";
    this.cssEnabled = false;
              else if(parseInt(navigator.appVersion) >= 4)
    this.MTMable = true;
    this.browserType = parseInt(navigator.appVersion) == 4 ? "NN4" : "NN5";
              else if(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4)
    this.MTMable = true;
    this.browserType = "IE4";
              else if(navigator.appName == "Opera" && parseInt(navigator.appVersion) >= 5)
    this.MTMable = true;
    this.browserType = "O5";
    if(this.browserType != "NN4")
    this.preHREF = location.href.substring(0, location.href.lastIndexOf("/") +1);
    * Global variables. Not to be altered unless you know what you're doing. *
    * User-configurable options are at the end of this document. *
    var MTMLoaded = false;
    var MTMLevel;
    var MTMBar = new Array();
    var MTMIndices = new Array();
    var MTMUA = new MTMBrowser();
    var MTMClickedItem = false;
    var MTMExpansion = false;
    var MTMNumber = 1;
    var MTMTrackedItem = false;
    var MTMTrack = false;
    var MTMFrameNames;
    var MTMFirstRun = true;
    var MTMCurrentTime = 0; // for checking timeout.
    var MTMUpdating = false;
    var MTMWinSize, MTMyval, MTMxval;
    var MTMOutputString = "";
    var MTMCookieString = "";
    var MTMCookieCharNum = 0; // cookieString.charAt()-number
    * Code that picks up frame names of frames in the parent frameset. *
    function MTMgetFrames()
    if(MTMUA.MTMable)
    MTMFrameNames = new Array();
    for(i = 0; i < parent.frames.length; i++)
    MTMFrameNames[i] = parent.frames.name;
    * Functions to draw the menu. *
    function MTMSubAction(SubItem)
    SubItem.expanded = (SubItem.expanded) ? false : true;
    if(SubItem.expanded)
    MTMExpansion = true;
    MTMClickedItem = SubItem.number;
    if(MTMTrackedItem && MTMTrackedItem != SubItem.number)
    MTMTrackedItem = false;
    if(MTMEmulateWE || SubItem.url == "" || !SubItem.expanded)
    setTimeout("MTMDisplayMenu()", 10);
    return false;
              else
    return true;
    function MTMStartMenu()
    MTMLoaded = true;
    if(MTMFirstRun)
    MTMCurrentTime++;
    if(MTMCurrentTime == MTMTimeOut)
                        { // call MTMDisplayMenu
    setTimeout("MTMDisplayMenu()",10);
                        else
    setTimeout("MTMStartMenu()",100);
    function MTMDisplayMenu()
    if(MTMUA.MTMable && !MTMUpdating)
    MTMUpdating = true;
    if(MTMFirstRun)
    MTMgetFrames();
    if(MTMUseCookies)
                                  MTMFetchCookie();
    if(MTMTrack)
                        MTMTrackedItem = MTMTrackExpand(menu);
    if(MTMExpansion && MTMSubsAutoClose)
                        MTMCloseSubs(menu);
    MTMLevel = 0;
    MTMDoc = parent.frames[MTMenuFrame].document
    MTMDoc.open("text/html", "replace");
    MTMOutputString = '<html><head>\n';
    if(MTMLinkedSS)
    MTMOutputString += '<link rel="stylesheet" type="text/css" href="' + MTMUA.preHREF + MTMSSHREF + '">\n';
                        else if(MTMUA.cssEnabled)
    MTMOutputString += '<style type="text/css">\nbody {\n\tcolor:' + MTMTextColor + ';\n}\n';
    MTMOutputString += '#root {\n\tcolor:' + MTMRootColor + ';\n\tbackground:transparent;\n\tfont-family:' + MTMRootFont + ';\n\tfont-size:' + MTMRootCSSize + ';\n}\n';
    MTMOutputString += 'a {\n\tfont-family:' + MTMenuFont + ';\n\tfont-size:' + MTMenuCSSize + ';\n\ttext-decoration:none;\n\tcolor:' + MTMLinkColor + ';\n\tbackground:transparent;\n}\n';
    MTMOutputString += MTMakeA('pseudo', 'hover', MTMAhoverColor);
    MTMOutputString += MTMakeA('class', 'tracked', MTMTrackColor);
    MTMOutputString += MTMakeA('class', 'subexpanded', MTMSubExpandColor);
    MTMOutputString += MTMakeA('class', 'subclosed', MTMSubClosedColor) + MTMExtraCSS + '\n<\/style>\n';
    MTMOutputString += '<\/head>\n<body ';
    if(MTMBackground != "")
    MTMOutputString += 'background="' + MTMUA.preHREF + MTMenuImageDirectory + MTMBackground + '" ';
    MTMOutputString += 'bgcolor="' + MTMBGColor + '" text="' + MTMTextColor + '" link="' + MTMLinkColor + '" vlink="' + MTMLinkColor + '" alink="' + MTMLinkColor + '">\n';
    MTMOutputString += MTMHeader + '\n<table border="0" cellpadding="0" cellspacing="0" width="' + MTMTableWidth + '">\n';
    MTMOutputString += '<tr valign="top"><td nowrap><img src="' + MTMUA.preHREF + MTMenuImageDirectory + MTMRootIcon + '" align="left" border="0" vspace="0" hspace="0">';
    if(MTMUA.cssEnabled)
    MTMOutputString += '<span id="root"> ' + MTMenuText + '<\/span>';
                        else
    MTMOutputString += '<font size="' + MTMRootFontSize + '" face="' + MTMRootFont + '" color="' + MTMRootColor + '">' + MTMenuText + '<\/font>';
    MTMDoc.writeln(MTMOutputString + '</td></tr>');
    MTMListItems(menu);
    MTMDoc.writeln('<\/table>\n' + MTMFooter + '\n<\/body>\n<\/html>');
    MTMDoc.close();
    if(MTMUA.browserType == "NN5")
    parent.frames[MTMenuFrame].scrollTo(0, 0);
    if((MTMClickedItem || MTMTrackedItem) && MTMUA.browserType != "NN3" && !MTMFirstRun)
    MTMItemName = "sub" + (MTMClickedItem ? MTMClickedItem : MTMTrackedItem);
    if(document.layers && parent.frames[MTMenuFrame].scrollbars)
    MTMyval = parent.frames[MTMenuFrame].document.anchors[MTMItemName].y;
    MTMWinSize = parent.frames[MTMenuFrame].innerHeight;
                                  else if(MTMUA.browserType != "O5")
    if(MTMUA.browserType == "NN5")
    parent.frames[MTMenuFrame].document.all = parent.frames[MTMenuFrame].document.getElementsByTagName("*");
    MTMyval = MTMGetYPos(parent.frames[MTMenuFrame].document.all[MTMItemName]);
    MTMWinSize = MTMUA.browserType == "NN5" ? parent.frames[MTMenuFrame].innerHeight : parent.frames[MTMenuFrame].document.body.offsetHeight;
    if(MTMyval > (MTMWinSize - 60))
    parent.frames[MTMenuFrame].scrollBy(0, parseInt(MTMyval - (MTMWinSize * 1/3)));
    if(!MTMFirstRun && MTMUA.cookieEnabled)
    if(MTMCookieString != "")
    setCookie(MTMCookieName, MTMCookieString.substring(0,4000), MTMCookieDays);
                                  else
    setCookie(MTMCookieName, "", -1);
    MTMFirstRun = false;
    MTMClickedItem = false;
    MTMExpansion = false;
    MTMTrack = false;
    MTMCookieString = "";
    MTMUpdating = false;
    function MTMListItems(menu)
    var i, isLast;
    for (i = 0; i < menu.items.length; i++)
    MTMIndices[MTMLevel] = i;
    isLast = (i == menu.items.length -1);
    MTMDisplayItem(menu.items[i], isLast);
    if(menu.items[i].submenu && menu.items[i].expanded)
    MTMBar[MTMLevel] = (isLast) ? false : true;
    MTMLevel++;
    MTMListItems(menu.items[i].submenu);
    MTMLevel--;
                        else
    MTMBar[MTMLevel] = false;
    function MTMDisplayItem(item, last)
    var i, img;
    var MTMfrm = "parent.frames['code']";
    var MTMref = '.menu.items[' + MTMIndices[0] + ']';
    if(MTMLevel > 0)
    for(i = 1; i <= MTMLevel; i++)
    MTMref += ".submenu.items[" + MTMIndices[i] + "]";
    if(MTMUA.cookieEnabled)
    if(MTMFirstRun && MTMCookieString != "")
    item.expanded = (MTMCookieString.charAt(MTMCookieCharNum++) == "1") ? true : false;
                        else
    MTMCookieString += (item.expanded) ? "1" : "0";
    if(item.submenu)
    var usePlusMinus = false;
    if(MTMSubsGetPlus.toLowerCase() == "always" || MTMEmulateWE)
    usePlusMinus = true;
                        else if(MTMSubsGetPlus.toLowerCase() == "submenu")
    for (i = 0; i < item.submenu.items.length; i++)
    if (item.submenu.items[i].submenu)
    usePlusMinus = true; break;
    var MTMClickCmd = "return " + MTMfrm + ".MTMSubAction(" + MTMfrm + MTMref + ");";
    var MTMouseOverCmd = "parent.status='" + (item.expanded ? "Collapse " : "Expand ") + (item.text.indexOf("'") != -1 ? MTMEscapeQuotes(item.text) : item.text) + "';return true;";
    var MTMouseOutCmd = "parent.status=parent.defaultStatus;return true;";
    MTMOutputString = '<tr valign="top"><td nowrap>';
    if(MTMLevel > 0)
    for (i = 0; i < MTMLevel; i++)
    MTMOutputString += (MTMBar[i]) ? MTMakeImage("menu_bar.gif") : MTMakeImage("menu_pixel.gif");
    if(item.submenu && usePlusMinus)
    if(item.url == "")
    MTMOutputString += MTMakeLink(item, true, true, true, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                        else
    if(MTMEmulateWE)
    MTMOutputString += MTMakeLink(item, true, true, false, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                                  else
    if(!item.expanded)
    MTMOutputString += MTMakeLink(item, false, true, true, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                                  else
    MTMOutputString += MTMakeLink(item, true, true, false, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
    if(item.expanded)
    img = (last) ? "menu_corner_minus.gif" : "menu_tee_minus.gif";
              else
    img = (last) ? "menu_corner_plus.gif" : "menu_tee_plus.gif";
              else
    img = (last) ? "menu_corner.gif" : "menu_tee.gif";
    MTMOutputString += MTMakeImage(img);
    if(item.submenu)
    if(MTMEmulateWE && item.url != "")
    MTMOutputString += '</a>' + MTMakeLink(item, false, false, true);
                        else if(!usePlusMinus)
    if(item.url == "")
    MTMOutputString += MTMakeLink(item, true, true, true, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                                  else if(!item.expanded)
    MTMOutputString += MTMakeLink(item, false, true, true, MTMClickCmd);
                                  else
    MTMOutputString += MTMakeLink(item, true, true, false, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
    img = (item.expanded) ? item.expandIcon : item.collapseIcon;
              else
    MTMOutputString += MTMakeLink(item, false, true, true);
    img = (item.icon != "") ? item.icon : MTMFetchIcon(item.url);
    MTMOutputString += MTMakeImage(img);
    if(item.submenu && item.url != "" && item.expanded && !MTMEmulateWE)
    MTMOutputString += '</a>' + MTMakeLink(item, false, false, true);
    if(MTMUA.browserType == "NN3" && !MTMLinkedSS)
    var stringColor;
    if(item.submenu && (item.url == "") && (item.number == MTMClickedItem))
    stringColor = (item.expanded) ? MTMSubExpandColor : MTMSubClosedColor;
                        else if(MTMTrackedItem && MTMTrackedItem == item.number)
    stringColor = MTMTrackColor;
                        else
    stringColor = MTMLinkColor;
    MTMOutputString += '<font color="' + stringColor + '" size="' + MTMenuFontSize + '" face="' + MTMenuFont + '">';
    MTMOutputString += ' ' + item.text + ((MTMUA.browserType == "NN3" && !MTMLinkedSS) ? '</font>' : '') + '</a>' ;
    MTMDoc.writeln(MTMOutputString + '</td></tr>');
    function MTMEscapeQuotes(myString)
    var newString = "";
    var cur_pos = myString.indexOf("'");
    var prev_pos = 0;
    while (cur_pos != -1)
    if(cur_pos == 0)
    newString += "\\";
                        else if(myString.charAt(cur_pos-1) != "\\")
    newString += myString.substring(prev_pos, cur_pos) + "\\";
                        else if(myString.charAt(cur_pos-1) == "\\")
    newString += myString.substring(prev_pos, cur_pos);
    prev_pos = cur_pos++;
    cur_pos = myString.indexOf("'", cur_pos);
    return(newString + myString.substring(prev_pos, myString.length));
    function MTMTrackExpand(thisMenu)
    var i, targetPath, targetLocation;
    var foundNumber = false;
    for(i = 0; i < thisMenu.items.length; i++)
    if(thisMenu.items[i].url != "" && MTMTrackTarget(thisMenu.items[i].target))
    targetLocation = parent.frames[thisMenu.items[i].target].location;
    targetPath = targetLocation.pathname + targetLocation.search;
    if(MTMUA.browserType == "IE4" && targetLocation.protocol == "file:")
    var regExp = /\\/g;
    targetPath = targetPath.replace(regExp, "\/");
    if(targetPath.lastIndexOf(thisMenu.items[i].url) != -1 && (targetPath.lastIndexOf(thisMenu.items[i].url) + thisMenu.items[i].url.length) == targetPath.length)
    return(thisMenu.items[i].number);
    if(thisMenu.items[i].submenu)
    foundNumber = MTMTrackExpand(thisMenu.items[i].submenu);
    if(foundNumber)
    if(!thisMenu.items[i].expanded)
    thisMenu.items[i].expanded = true;
    if(!MTMClickedItem)
                                                      MTMClickedItem = thisMenu.items[i].number;
    MTMExpansion = true;
    return(foundNumber);
    return(foundNumber);
    function MTMCloseSubs(thisMenu)
    var i, j;
    var foundMatch = false;
    for(i = 0; i < thisMenu.items.length; i++)
    if(thisMenu.items[i].submenu && thisMenu.items[i].expanded)
    if(thisMenu.items[i].number == MTMClickedItem)
    foundMatch = true;
    for(j = 0; j < thisMenu.items[i].submenu.items.length; j++)
    if(thisMenu.items[i].submenu.items[j].expanded)
    thisMenu.items[i].submenu.items[j].expanded = false;
                                  else
    if(foundMatch)
    thisMenu.items[i].expanded = false;
                                            else
    foundMatch = MTMCloseSubs(thisMenu.items[i].submenu);
    if(!foundMatch)
    thisMenu.items[i].expanded = false;
    return(foundMatch);
    function MTMFetchIcon(testString)
    var i;
    for(i = 0; i < MTMIconList.items.length; i++)
    if((MTMIconList.items[i].type == 'any') && (testString.indexOf(MTMIconList.items[i].match) != -1))
    return(MTMIconList.items[i].file);
                        else if((MTMIconList.items[i].type == 'pre') && (testString.indexOf(MTMIconList.items[i].match) == 0))
    return(MTMIconList.items[i].file);
                        else if((MTMIconList.items[i].type == 'post') && (testString.indexOf(MTMIconList.items[i].match) != -1))
    if((testString.lastIndexOf(MTMIconList.items[i].match) + MTMIconList.items[i].match.length) == testString.length)
    return(MTMIconList.items[i].file);
    return("menu_link_default.gif");
    function MTMGetYPos(myObj)
    return(myObj.offsetTop + ((myObj.offsetParent) ? MTMGetYPos(myObj.offsetParent) : 0));
    function MTMCheckURL(myURL)
    var tempString = "";
    if((myURL.indexOf("http://") == 0) || (myURL.indexOf("https://") == 0) || (myURL.indexOf("mailto:") == 0) || (myURL.indexOf("ftp://") == 0) || (myURL.indexOf("telnet:") == 0) || (myURL.indexOf("news:") == 0) || (myURL.indexOf("gopher:") == 0) || (myURL.indexOf("nntp:") == 0) || (myURL.indexOf("javascript:") == 0))
    tempString += myURL;
              else
    tempString += MTMUA.preHREF + myURL;
    return(tempString);
    function MTMakeLink(thisItem, voidURL, addName, addTitle, clickEvent, mouseOverEvent, mouseOutEvent)
    var tempString = '<a href="' + (voidURL ? 'javascript:;' : MTMCheckURL(thisItem.url)) + ' ';
    if(MTMUseToolTips && addTitle && thisItem.tooltip)
    tempString += 'title="' + thisItem.tooltip + '" ';
    if(addName)
    tempString += 'name="sub' + thisItem.number + '" ';
    if(clickEvent)
    tempString += 'onclick="' + clickEvent + '" ';
    if(mouseOverEvent && mouseOverEvent != "")
    tempString += 'onmouseover="' + mouseOverEvent + '" ';
    if(mouseOutEvent && mouseOutEvent != "")
    tempString += 'onmouseout="' + mouseOutEvent + '" ';
    if(thisItem.submenu && MTMClickedItem && thisItem.number == MTMClickedItem)
    tempString += 'class="' + (thisItem.expanded ? "subexpanded" : "subclosed") + '" ';
              else if(MTMTrackedItem && thisItem.number == MTMTrackedItem)
    tempString += 'class="tracked"';
    if(thisItem.target != "")
    tempString += 'target="' + thisItem.target + '" ';
    return(tempString + '>');
    function MTMakeImage(thisImage)
    return('<img src="' + MTMUA.preHREF + MTMenuImageDirectory + thisImage + '" align="left" border="0" vspace="0" hspace="0" width="18" height="18">');
    function MTMakeBackImage(thisImage)
    var tempString = 'transparent url("' + ((MTMUA.preHREF == "") ? "" : MTMUA.preHREF);
    tempString += MTMenuImageDirectory + thisImage + '")'
    return(tempString);
    function MTMakeA(thisType, thisText, thisColor)
    var tempString = "";
    tempString += 'a' + ((thisType == "pseudo") ? ':' : '.');
    return(tempString + thisText + ' {\n\tcolor:' + thisColor + ';\n\tbackground:transparent;\n}\n');
    function MTMTrackTarget(thisTarget)
    if(thisTarget.charAt(0) == "_")
    return false;
              else
    for(i = 0; i < MTMFrameNames.length; i++)
    if(thisTarget == MTMFrameNames[i])
    return true;
    return false;
    function MTMFetchCookie()
    var cookieString = getCookie(MTMCookieName);
    if(cookieString == null)
              { // cookie wasn't found
    setCookie(MTMCookieName, "Say-No-If-You-Use-Confirm-Cookies");
    cookieString = getCookie(MTMCookieName);
    MTMUA.cookieEnabled = (cookieString == null) ? false : true;
    return;
    MTMCookieString = cookieString;
    MTMUA.cookieEnabled = true;
    // These are from Netscape's Client-Side JavaScript Guide.
    // setCookie() is altered to make it easier to set expiry.
    function getCookie(Name)
    var search = Name + "="
    if (document.cookie.length > 0)
              { // if there are any cookies
    offset = document.cookie.indexOf(search)
    if (offset != -1)
                        {   // if cookie exists
    offset += search.length
    // set index of beginning of value
    end = document.cookie.indexOf(";", offset)
    // set index of end of cookie value
    if (end == -1)
    end = document.cookie.length
    return unescape(document.cookie.substring(offset, end))
    function setCookie(name, value, daysExpire)
    if(daysExpire)
    var expires = new Date();
    expires.setTime(expires.getTime() + 1000*60*60*24*daysExpire);
    document.cookie = name + "=" + escape(value) + (daysExpire == null ? "" : (";expires=" + expires.toGMTString())) + ";path=/";

  • TRUE/FALSE problem

    I got a wired situation with a VI I wrote.
    I have a case TRUE/FALSE structure, and first of all, the true-part is
    ALWAYS first executed. When this part is done, I execute the false-case,
    for message handling and so on.
    But in the true case, I generate some data I want to use as a source in
    the false case.
    So in true case the string is an indicator, but in the false case, that
    string is the source for displaying. Does anyone know how to solve this.
    This true/false case is part of a loop. So I tried with a SHIFT
    REGISTER, but that doesn't seem to work.
    Any tip is welcome !
    Thanks
    Kristof

    Sorry I posted my message so early, mayby because the sunshine that lights
    my mind, but I have found a solution myself. Just putting the value in a
    loop and in the false case, connect the previous shift-register-value with
    the next....
    Thanks anyway !
    Kristof Poppe wrote:
    > I got a wired situation with a VI I wrote.
    > I have a case TRUE/FALSE structure, and first of all, the true-part is
    > ALWAYS first executed. When this part is done, I execute the false-case,
    > for message handling and so on.
    > But in the true case, I generate some data I want to use as a source in
    > the false case.
    > So in true case the string is an indicator, but in the false case, that
    > string is the source for displaying. Does anyone know how to solve this.
    > This true/false case is part
    of a loop. So I tried with a SHIFT
    > REGISTER, but that doesn't seem to work.
    > Any tip is welcome !
    >
    > Thanks
    >
    > Kristof

  • Applescript help with true or false script

    I'm in need of a applescript that will run two different scripts based on the outcome of an existing file.
    I have a folder called Status. Inside this folder is a simple text file called Good.rtf
    I would like a script that would run one or the other script base on the true or false output.  If file exists then:
    true will
    run script A
    false will
    run script B
    I have been searching the web for two days looking for something to help me get started on this and have not had much success.
    Please help me.   I really would appropriate any help or guidance. 
    Thanks....
    Ron

    Ron
    AppleScript calls this kind of script a "Conditional" = if this > then that
    Some templates are in MacintoshHD/Library/Scripts/Script Editor Scripts/Conditionals
    You don't need a value for "false" in binary as it is merely "not true" (else)
    if true then
        -- insert if actions here
    else
        -- insert else actions here
    end if
    If you already have your Scripts A & B working, copy>pastethem into the "insert actions here" part as appropriate
    ÇÇÇ

  • The case structure is not working well on comaring two strings using true or false string matching VI

    I need an execution of commands after the reply from the instrument matches with the string I provided for that i used true or false string match VI on which the true string the matching command and the string is the reply from the instrument. And I put the further executionable commands in frame after frame of sequence loop in the true of the case structure. Amd finally I given all the output strings to the concatenate string to get all the replies as one loop. But when I execute the program the desired result is not available. So kindly please help me to overcome this problem.  
    Attachments:
    basic serial with changes.vi ‏24 KB

    You VI makes absolutely no sense and I would recommend you start with a few simple LabVIEW tutorials before trying to tackle this.
    What is the point of the FOR loop with 1 iteration, it might as well not even be there, same difference.
    Why is there an abort primitive in the FOR loop, this mean the program will unconditionally stop abort before any downstream code will ever go into action. The program will never get past the FOR loop.
    You created a circular data dependency and LabVIEW inserted a feedback node automatically, making things even worse. (see also)
    You need to learn about dataflow, execution order, and data dependency.
    You need to learn about the various types of tunnels (plain, autoindexing, etc.)
    There is a tremendous amount of duplicate code. Large code sections are the same, differeing only by a string. You should only have one copy of that code inside a proper state machine. Have a look at the design templates and examples that ship with LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • Set item property to false and true

    when i set item to false and then set item property to true. The item is displayed but its gray out and not enabled. Am i missing something
    Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_FALSE);
    and then
              Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_TRUE);

    Check the Forms online help on Set_Item_Property, near the bottom in the usage notes. Lots of things happen when you set visible to False:
    Setting DISPLAYED to False:
      sets the Enabled and Navigable item properties to False
      sets the Updateable item property to False
      sets the Update_Null item property to False
      sets the Required item property to False
      sets the Queryable item property to False
    So you may need to set more of them back to true in your code when you want to make it re-display.

  • CP6 - True/False Question Type SCORM Problem

    We discovered a problem with CP6 and the True/False question type.  The screen shot below is the log file of what is passed to the LMS.  The question was a True/False question type.  The correct answer was False.  I selected False and the assessment showed that I got the answer correct.  However, the data that is being passed to the LMS is incorrect.  CP6 is sending a 't' when you select False and an 'f' when you select True.
    Yes, you can get around this by using a Multiple Choice question type and limit the answers to 2 with True and False as the options, but we should not have to do that.
    Any suggestions?

    There is a long discussion on Jim Leichliter's blog (captivatedev) about this. The team considered this to be correct, Jim disagrees.
    http://captivatedev.com/2012/12/04/captivate-true-false-question-bug/
    Cannot help you further,
    Lilybiri

  • True or False using RadioCheckbox - need help ASAP

    So I've been working my way through java with self-study. Our teacher gave us knoweldge not applicable to what he's asked us for our project (except logic). Basically, he wants us to present questions, have the user answer them, then show the number of correct answers.
    I'm now using checkboxes in a True or False 10-item test. I once used buttons, but I gave up and went to checkboxes. I managed to display them using this:
    Parameters:
    tofp = true or false panel
    tofql = true or false question label
    tofqp = true or false question panel
         if(e.getActionCommand().equals("True or False"))
              f2.hide();
              JPanel tofp = new JPanel();
              JPanel tofp2 = new JPanel();
              JPanel tofqp = new JPanel();
              JPanel tofqp2 = new JPanel();
              JPanel tofqp3 = new JPanel();
              JPanel tofqp4 = new JPanel();
              JPanel tofqp5 = new JPanel();
              JPanel tofqp6 = new JPanel();
              JPanel tofqp7 = new JPanel();
              JPanel tofqp8 = new JPanel();
              JPanel tofqp9 = new JPanel();
              JPanel tofqp10 = new JPanel();
              FormPanel3 = new JPanel();
              JLabel tof = new JLabel("<html><Font size=5>TRUE OR FALSE</font> </html>");
              JLabel tofql1 = new JLabel("<html>1. CFC, found in refrigerator and <P> aircons , means Chlorofluorinechloride.</html>");
              JLabel tofql2 = new JLabel("<html>2. Endangered species are species <P> that are less in number and are nearly extinct.</html>");
              JLabel tofql3 = new JLabel("<html>3. The smallest fish in the world <P>is the sardines. </html>");
              JLabel tofql4 = new JLabel("<html>4. The agents of soil erosion are <P>wind, water, and human.</html>");
              JLabel tofql5 = new JLabel("<html>5. One way of conversing energy is <P> by using fluorescent light.</html>");
              JLabel tofql6 = new JLabel("<html>6. The use of dynamite is a legal method <P> of fishing.</html>");
              JLabel tofql7 = new JLabel("<html>7. Windmill is an example of a potential <P>energy.</html>");
              JLabel tofql8 = new JLabel("<html>8. Tamaraws are found in Mindanao.</html>");
              JLabel tofql9 = new JLabel("<html>9. Mining causes minimum destruction to <P> our environment.</html>");
              JLabel tofql10 = new JLabel("<html>10. The Philippines is called the Pacific <P>Ring of Fire because of the many <P> volcanoes surrounding it.</html>");
                b4 = new JButton("Submit");
                b4.addActionListener(this);
              tofp.setPreferredSize(new Dimension(400,550));
              tofqp.add(tofql1);
              tofqp2.add(tofql2);
              tofqp3.add(tofql3);
              tofqp4.add(tofql4);
              tofqp5.add(tofql5);
              tofqp6.add(tofql6);
              tofqp7.add(tofql7);
              tofqp8.add(tofql8);
              tofqp9.add(tofql9);
              tofqp10.add(tofql10);
              tofp.add(tof);
              tofp.setBackground(Color.yellow);
              tofp.add(tofqp);
              tofp.add(tofqp2);
              tofp.add(tofqp3);
              tofp.add(tofqp4);
              tofp.add(tofqp5);
              tofp.add(tofqp6);
              tofp.add(tofqp7);
              tofp.add(tofqp8);
              tofp.add(tofqp9);
              tofp.add(tofqp10);
              tofp.add(b4);
         JRadioButton True = new JRadioButton("True");
             True.setActionCommand("True");
             True.setSelected(false);
         JRadioButton False = new JRadioButton("False");
             False.setActionCommand("False");
             False.setSelected(false);      
             ButtonGroup group = new ButtonGroup();
             group.add(True);
             group.add(False);
             JRadioButton True2 = new JRadioButton("True");
             True.setActionCommand("True");
             True.setSelected(false);
         JRadioButton False2 = new JRadioButton("False");
             False.setActionCommand("False");
             False.setSelected(false);      
             ButtonGroup group2 = new ButtonGroup();
             group2.add(True2);
             group2.add(False2);
             tofqp.add(True);
             tofqp.add(False);
               tofqp2.add(True2);
             tofqp2.add(False2);
              FormPanel3.add(tofp);
              FormPanel3.add(tofp2);
              FormPanel3.add(tofp2);
              f3.setContentPane(FormPanel3);
              f3.pack();
              f3.show();     
              f3.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f3.setResizable(false);I intentionally just have 2 groups of radio button displayed to test if I could tally the right answer. No luck.
    I'm a complete beginner to this sort of thing, as in starting from scratch. But if I were to apply what our teacher taught us, this would be a simple boolean program. Unfortunately, this kind of thing isn't too simple for me.
    So how do I tally the right answer upon clicking 'submit'. I know you have to have a new frame for that, but it's about tallying. Like the right answer for number 1 is false, for number 2 is true. If you click Submit, I should be able to show "You got 1 correct answer".

    Tan-Tan wrote:
    I'm now using checkboxes in a True or False 10-item test. I once used buttons, but I gave up and went to checkboxes. I managed to display them using this:I'm confused. So does your code use JRadioButtons (like your code says), or JCheckBoxes (like this sentence says)?
    I intentionally just have 2 groups of radio button displayed to test if I could tally the right answer. No luck.How did you attempt to tally the right answer? How do you have the right answers stored? How were you getting the status of each JRadioButton?
    So how do I tally the right answer upon clicking 'submit'. I know you have to have a new frame for that, but it's about tallying. Like the right answer for number 1 is false, for number 2 is true. If you click Submit, I should be able to show "You got 1 correct answer".Worry about how you display the tally later. For now just use a System.out.println. I'd use a for loop to get the status of each JRadioButton or JCheckBox, and check that against an array of correct answers.

  • Why can't I change the color of my ProgressBar? Always green.

    I added a ProgressBar object to my form. Works fine. But the bar is always green despite setting the Forecolor to Blue in the Design and to red in code:
    ' intTotalNumberOfFiles = 80
    pgbCloset.Value = 0
    pgbCloset.Step = 1
    pgbCloset.Maximum = 99
    pgbCloset.ForeColor = Color.Red ' for testing.
    For intCnt = 1 To intTotalNumberOfFiles
    'If intTotalNumberOfFiles > 0 Then pgbCloset.ForeColor = Color.Green
    'If intTotalNumberOfFiles > 30 Then pgbCloset.ForeColor = Color.Yellow
    'If intTotalNumberOfFiles > 60 Then pgbCloset.ForeColor = Color.Red
    pgbCloset.PerformStep()
    Next
    Any idea why? How do I fix this? Thx.

    ... ups, VB,so here's something to start with... (or uncheck the "enable XP visual styles" checkBox in your project's settings)
    Partial Public Class Form1
    Inherits Form
    Private WithEvents progressBar1 As New NewProgressBar()
    Private WithEvents button1 As New System.Windows.Forms.Button()
    Private WithEvents timer1 As New System.Windows.Forms.Timer()
    Private WithEvents button2 As New System.Windows.Forms.Button()
    Private WithEvents trackBar1 As New TrackBar()
    Private WithEvents trackBar2 As New TrackBar()
    Public Sub New()
    InitializeComponent()
    Me.button1.Location = New System.Drawing.Point(20, 105)
    Me.button1.Name = "button1"
    Me.button1.Size = New System.Drawing.Size(75, 23)
    Me.button1.TabIndex = 1
    Me.button1.Text = "button1"
    Me.button1.UseVisualStyleBackColor = True
    Me.timer1.Interval = 50
    Me.progressBar1.Location = New System.Drawing.Point(41, 1)
    Me.progressBar1.Name = "progressBar1"
    Me.progressBar1.Size = New System.Drawing.Size(187, 23)
    Me.progressBar1.TabIndex = 0
    Me.progressBar1.ShowText = True
    Me.progressBar1.ForeColor = Color.White
    'Colors and Positions
    Me.progressBar1.Color1 = Color.Red
    Me.progressBar1.Color2 = Color.Yellow
    Me.progressBar1.Color3 = Color.Green
    'PositionColor2 must be in a range from 0 to 1.0F
    Me.progressBar1.PositionColor2 = 0.71F
    Me.progressBar1.GammaCorrected = True
    'change OverlaySpeed and Delay and Width
    Me.progressBar1.OverlayAddAmount = 0.8F
    Me.progressBar1.OverlayReshowDelay = 35.0F
    Me.progressBar1.OverlayWidth = 50.0F
    Me.button2.Location = New System.Drawing.Point(120, 105)
    Me.button2.Name = "button2"
    Me.button2.Size = New System.Drawing.Size(75, 23)
    Me.button2.TabIndex = 2
    Me.button2.Text = "button2"
    Me.button2.UseVisualStyleBackColor = True
    Me.trackBar1.Location = New Point(20, 145)
    Me.trackBar1.Width = Me.progressBar1.Width
    Me.trackBar1.Minimum = 0
    Me.trackBar1.Maximum = 100
    Me.trackBar1.Value = 10
    Me.trackBar2.Location = New Point(20, 195)
    Me.trackBar2.Width = Me.progressBar1.Width
    Me.trackBar2.Minimum = 0
    Me.trackBar2.Maximum = 100
    Me.trackBar2.Value = 30
    Me.Controls.Add(Me.button2)
    Me.Controls.Add(Me.button1)
    Me.Controls.Add(Me.progressBar1)
    Me.Controls.Add(Me.trackBar1)
    Me.Controls.Add(Me.trackBar2)
    Me.progressBar1.Left = 0
    Me.progressBar1.Width = Me.ClientSize.Width
    End Sub
    Private Sub trackBar2_ValueChanged(sender As Object, e As EventArgs) Handles trackBar2.ValueChanged
    Me.progressBar1.OverlayReshowDelay = CSng(Me.trackBar2.Value)
    End Sub
    Private Sub trackBar1_ValueChanged(sender As Object, e As EventArgs) Handles trackBar1.ValueChanged
    Me.progressBar1.OverlayAddAmount = CSng(Me.trackBar1.Value) / 10.0F
    End Sub
    Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
    Me.timer1.Enabled = True
    End Sub
    Private Sub timer1_Tick(sender As Object, e As EventArgs) Handles timer1.Tick
    Me.timer1.Stop()
    Me.progressBar1.Value += 0.5F
    If Me.progressBar1.Value = Me.progressBar1.Maximum Then
    Me.progressBar1.Value = 0
    End If
    Me.timer1.Start()
    End Sub
    Private Sub button2_Click(sender As Object, e As EventArgs) Handles button2.Click
    Me.timer1.Enabled = False
    End Sub
    End Class
    Public Class NewProgressBar
    Inherits ProgressBar
    Public Property Percentage() As Single
    Get
    Return m_Percentage
    End Get
    Set(value As Single)
    m_Percentage = Value
    End Set
    End Property
    Private m_Percentage As Single
    Public Property ShowText() As Boolean
    Get
    Return m_ShowText
    End Get
    Set(value As Boolean)
    m_ShowText = Value
    End Set
    End Property
    Private m_ShowText As Boolean
    Private _doMarqueeOverlay As Boolean = False
    Private WithEvents timer1 As New Timer()
    Private _pos As Single = 0
    Private _rWidth As Single = 71
    Public Property OverlayWidth() As Single
    Get
    Return _rWidth
    End Get
    Set(value As Single)
    _rWidth = value
    End Set
    End Property
    Private _c As Integer = 0
    Private _posAdd As Single = 1.5F
    Public Property OverlayAddAmount() As Single
    Get
    Return _posAdd
    End Get
    Set(value As Single)
    _posAdd = value
    End Set
    End Property
    Private _posDelay As Single = 50
    Public Property OverlayReshowDelay() As Single
    Get
    Return _posDelay
    End Get
    Set(value As Single)
    _posDelay = value
    End Set
    End Property
    Public Property Color1() As Color
    Get
    Return m_Color1
    End Get
    Set(value As Color)
    m_Color1 = Value
    End Set
    End Property
    Private m_Color1 As Color
    Public Property Color2() As Color
    Get
    Return m_Color2
    End Get
    Set(value As Color)
    m_Color2 = Value
    End Set
    End Property
    Private m_Color2 As Color
    Public Property Color3() As Color
    Get
    Return m_Color3
    End Get
    Set(value As Color)
    m_Color3 = Value
    End Set
    End Property
    Private m_Color3 As Color
    Public Property PositionColor2() As Single
    Get
    Return m_PositionColor2
    End Get
    Set(value As Single)
    m_PositionColor2 = Value
    End Set
    End Property
    Private m_PositionColor2 As Single
    Public Shadows Property Value() As Single
    Get
    Return Me.Percentage
    End Get
    Set(value As Single)
    Me.Percentage = value
    'maybe dont invalidata always...
    If Not _doMarqueeOverlay Then
    Me.Invalidate()
    End If
    End Set
    End Property
    Private m_useImg As Boolean
    Public Property UseImg() As Boolean
    Get
    Return m_useImg
    End Get
    Set(value As Boolean)
    m_useImg = value
    End Set
    End Property
    Private m_image As Bitmap
    Public Property Image() As Bitmap
    Get
    Return m_image
    End Get
    Set(value As Bitmap)
    m_image = value
    End Set
    End Property
    Public Sub New()
    Me.SetStyle(ControlStyles.UserPaint, True)
    Me.DoubleBuffered = True
    Color1 = Color.Lime
    Color2 = Color.Green
    Color3 = Color.Red
    PositionColor2 = 0.55F
    End Sub
    Public Property GammaCorrected As Boolean
    Protected Overrides Sub OnPaint(e As PaintEventArgs)
    Dim rec As Rectangle = e.ClipRectangle
    rec.Width = CInt(rec.Width * (CDbl(Value) / Maximum)) - 4
    If ProgressBarRenderer.IsSupported Then
    ProgressBarRenderer.DrawHorizontalBar(e.Graphics, e.ClipRectangle)
    Else
    e.Graphics.DrawRectangle(Pens.Gray, 0, 0, Me.Width, Me.Height)
    End If
    rec.Height = rec.Height - 4
    If m_useImg AndAlso Not Image Is Nothing Then
    Using t As New TextureBrush(Image)
    e.Graphics.FillRectangle(t, 2, 2, rec.Width, rec.Height)
    End Using
    Else
    Using l As New System.Drawing.Drawing2D.LinearGradientBrush(e.ClipRectangle, Color.Green, Color.Red, 0.0F)
    Dim lb As New System.Drawing.Drawing2D.ColorBlend()
    lb.Colors = New Color() {Color1, Color2, Color3}
    lb.Positions = New Single() {0, PositionColor2, 1.0F}
    l.InterpolationColors = lb
    l.GammaCorrection = Me.GammaCorrected
    e.Graphics.FillRectangle(l, 2, 2, rec.Width, rec.Height)
    End Using
    End If
    Using l2 As New System.Drawing.Drawing2D.LinearGradientBrush(e.ClipRectangle, Color.FromArgb(147, 255, 255, 255), Color.FromArgb(0, 255, 255, 255), System.Drawing.Drawing2D.LinearGradientMode.Vertical)
    Dim lb As New System.Drawing.Drawing2D.ColorBlend()
    lb.Colors = New Color() {Color.FromArgb(40, 255, 255, 255), Color.FromArgb(147, 255, 255, 255), Color.FromArgb(40, 255, 255, 255), Color.FromArgb(0, 255, 255, 255)}
    lb.Positions = New Single() {0, 0.12F, 0.39F, 1.0F}
    l2.InterpolationColors = lb
    l2.WrapMode = System.Drawing.Drawing2D.WrapMode.Tile
    e.Graphics.FillRectangle(l2, 2, 2, rec.Width, rec.Height)
    End Using
    If Me.ShowText Then
    Using sb As New SolidBrush(Me.ForeColor)
    Dim sz As SizeF = e.Graphics.MeasureString(Percentage.ToString("N0") + " %", Me.Font)
    e.Graphics.DrawString(Percentage.ToString("N0") + " %", Me.Font, sb, New PointF((Me.Width - sz.Width) / 2.0F, (Me.Height - sz.Height) / 2.0F))
    End Using
    End If
    If Value > 0 AndAlso _doMarqueeOverlay = False Then
    StartMarquee()
    End If
    If Value = Maximum - 1 Then
    StopMarquee()
    End If
    If _doMarqueeOverlay Then
    Dim rWidth As Single = _rWidth
    If rec.Width < rWidth Then
    rWidth = rec.Width
    End If
    If rWidth + _pos > rec.Width Then
    rWidth = rec.Width - _pos
    End If
    Using l As New System.Drawing.Drawing2D.LinearGradientBrush(New RectangleF(_pos + 2, 2, _rWidth, rec.Height), Color.FromArgb(127, 255, 255, 255), Color.FromArgb(0, 255, 255, 255), System.Drawing.Drawing2D.LinearGradientMode.Horizontal)
    Dim lb As New System.Drawing.Drawing2D.Blend()
    lb.Factors = New Single() {1, 0, 1}
    lb.Positions = New Single() {0, 0.5F, 1.0F}
    l.Blend = lb
    'l.TranslateTransform(_pos - rWidth, 0);
    l.WrapMode = System.Drawing.Drawing2D.WrapMode.TileFlipXY
    e.Graphics.FillRectangle(l, _pos + 2, 2, rWidth, rec.Height)
    _pos += _posAdd
    If _pos >= rec.Width Then
    If _c < _posDelay Then
    _pos -= _posAdd
    _c += 1
    Else
    _pos = -_rWidth - _posDelay
    _c = 0
    End If
    End If
    End Using
    End If
    End Sub
    Private Sub StopMarquee()
    timer1.Stop()
    _doMarqueeOverlay = False
    End Sub
    Private Sub StartMarquee()
    _doMarqueeOverlay = True
    timer1.Interval = 10
    timer1.Start()
    End Sub
    Private Sub timer1_Tick(sender As Object, e As EventArgs) Handles timer1.Tick
    timer1.Stop()
    Invalidate()
    timer1.Start()
    End Sub
    Protected Overrides Sub Dispose(disposing As Boolean)
    If timer1.Enabled Then
    timer1.Stop()
    End If
    timer1.Dispose()
    If Not Image Is Nothing Then
    Image.Dispose()
    End If
    MyBase.Dispose(disposing)
    End Sub
    End Class
    Regards,
      Thorsten

  • Strange error in a multiple choice quiz

    Hi - this is strange. I get no error statement BUT the third text option box does a false answer BUT not always - damn strange.
    var qno=0;
    var rnd1;
    var rnd2;
    tick.visible=false;
    cross.visible=false;
    var right_answers=0;
    var wrong_answers=0;
    Grammar.visible = false;
    Grammar.addEventListener(MouseEvent.CLICK, GrammarAction);
    function GrammarAction(eventObject:MouseEvent) {
    Grammar.visible = false;
    function change_question() {
    if (tick.visible) {
    right_answers++;
    if (cross.visible) {
    wrong_answers++;
    if (qno==questions.length) {
    gotoAndPlay(2);
    } else {
    tick.visible=false;
    cross.visible=false;
    rnd1=Math.ceil(Math.random()*4); // randomise the answers
    rnd2=Math.ceil(Math.random()*questions.length)-1; // randomise the questions
    q.text=questions[rnd2];
    if (questions[rnd2]=="x") {
    change_question();
    questions[rnd2]="x";
    enable_disable(1);
    if (rnd1==1) {
    opt1.text=answers[rnd2][0];
    opt2.text=answers[rnd2][1];
    opt3.text=answers[rnd2][2];
    opt4.text=answers[rnd2][3];
    if (rnd1==2) {
    opt1.text=answers[rnd2][2];
    opt2.text=answers[rnd2][0];
    opt3.text=answers[rnd2][1];
    opt4.text=answers[rnd2][3];
    if (rnd1==3) {
    opt1.text=answers[rnd2][1];
    opt2.text=answers[rnd2][2];
    opt3.text=answers[rnd2][0];
    opt4.text=answers[rnd2][3];
    if (rnd1==4) {
    opt1.text=answers[rnd2][1];
    opt2.text=answers[rnd2][2];
    opt3.text=answers[rnd2][0];
    opt4.text=answers[rnd2][3];
    function enable_disable(a) {
    if (a==0) {
    shade1.mouseEnabled=false;
    shade2.mouseEnabled=false;
    shade3.mouseEnabled=false;
    shade4.mouseEnabled=false;
    if (a==1) {
    shade1.mouseEnabled=true;
    shade2.mouseEnabled=true;
    shade3.mouseEnabled=true;
    shade4.mouseEnabled=true;
    change_question();
    next_b.addEventListener(MouseEvent.CLICK, ButtonAction1);
    function ButtonAction1(eventObject:MouseEvent) {
    qno++;
    change_question();
    shade1.addEventListener(MouseEvent.CLICK, ButtonAction2);
    shade2.addEventListener(MouseEvent.CLICK, ButtonAction3);
    shade3.addEventListener(MouseEvent.CLICK, ButtonAction4);
    shade4.addEventListener(MouseEvent.CLICK, ButtonAction5);
    function ButtonAction2(eventObject:MouseEvent) {
    enable_disable(0);
    if (rnd1==1) {
    tick.visible=true;
    tick.y=shade1.y;
    } else {
    cross.visible=true;
    cross.y=shade1.y;
    Grammar.visible = true;
    trace (rnd1);
    function ButtonAction3(eventObject:MouseEvent) {
    enable_disable(0);
    if (rnd1==2) {
    tick.visible=true;
    tick.y=shade2.y;
    } else {
    cross.visible=true;
    cross.y=shade2.y;
    Grammar.visible = true;
    trace (rnd1);
    function ButtonAction4(eventObject:MouseEvent) {
    enable_disable(0);
    if (rnd1==3) {
    tick.visible=true;
    tick.y=shade3.y;
    } else {
    cross.visible=true;
    cross.y=shade3.y;
    Grammar.visible = true;
    trace (rnd1);
    function ButtonAction5(eventObject:MouseEvent) {
    enable_disable(0);
    if (rnd1==4) {
    tick.visible=true;
    tick.y=shade4.y;
    } else {
    cross.visible=true;
    cross.y=shade4.y;
    Grammar.visible = true;
    trace (rnd1);
    stop();

    Hi
    Your rnd1...Try this..
    trace(Math.ceil(Math.random()*3)+1);
    Best regards
    Peter

  • Allowing db-is-shared to be true in a cluster with ReadOnly EJBs

              Hi,
              We're running WL 6.1 SP2 on Solaris 2.8
              My question is about EJB caching in a cluster as we will shortly me moving to a clustered
              environment. The db-is-shared value for an EJB is normally meant to be always set
              to true in the case of a cluster because the database is shared across the cluster.
              However we are only using readonly Entity EJBs. We would expect to maintain the current
              db-is-shared value of false that we are using as our EJBs are very big and we cannot
              afford to go each time to the database. Will this be allowable in a cluster, that
              if you have readonly EJBs, you can maintain your db-is-shared value of false?
              Regs,
              Paul
              

              Cameron,
              We have a similar problem and would like to turn off db-shared property on entity
              beans. But this is what I got from BEA site. It says that we cannot do that in
              a clustered environment bcoz of caching limitations. We would like to use clustering
              ONLY for fail-over and would like not to hit the database so many time. Your thoughts
              please.
              Thanks
              Restrictions and Warnings for db-is-shared:
              Setting db-is-shared to "false" overrides WebLogic Server's default ejbLoad()
              container-managed-persistence behavior, regardless of whether the EJB's underlying
              data is updated by one WebLogic Server instance or multiple clients. If you incorrectly
              set db-is-shared to "false" and multiple clients (database clients, other WebLogic
              Server instances, and so forth) update the bean data, you run the risk of losing
              data integrity.
              Do not set db-is-shared to "false" if you set the entity bean's concurrency strategy
              to
              the "Database" option. If you do, WebLogic Server will ignore the db-is-shared
              setting.
              With database locking specified, the EJB container continues to cache instances
              of entity bean classes. However, the container does not cache the intermediate
              state of the EJB instance between transactions. Instead, WebLogic Server calls
              ejbLoad() for each instance at the beginning of a transaction to obtain the latest
              EJB data. This means that setting db-is-shared to "false" which prevents WebLogic
              Server from calling ejbload() at the beginning of each transaction is invalid.
              Also, due to caching limitations, you cannot set db-is-shared to "false" in a
              WebLogic Server cluster.
              "Cameron Purdy" <[email protected]> wrote:
              >db-is-shared implies that another client of the database can change
              >the
              >data, so yes, you can set it to false if the data is read-only.
              >
              >Peace,
              >
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com/coherence.jsp
              >Tangosol Coherence: Clustered Replicated Cache for Weblogic
              >
              >
              >"Paul Hammond" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi,
              >>
              >> We're running WL 6.1 SP2 on Solaris 2.8
              >>
              >> My question is about EJB caching in a cluster as we will shortly me
              >moving
              >to a clustered
              >> environment. The db-is-shared value for an EJB is normally meant to
              >be
              >always set
              >> to true in the case of a cluster because the database is shared across
              >the
              >cluster.
              >> However we are only using readonly Entity EJBs. We would expect to
              >maintain the current
              >> db-is-shared value of false that we are using as our EJBs are very
              >big and
              >we cannot
              >> afford to go each time to the database. Will this be allowable in a
              >cluster, that
              >> if you have readonly EJBs, you can maintain your db-is-shared value
              >of
              >false?
              >>
              >> Regs,
              >>
              >> Paul
              >>
              >>
              >
              >
              

  • SetRendered(true) a component when going to new page

    Hi,
    This might be a very basic question. I want to render a panelButtonBar ini page2.jspx. now initially I have <af:panelButtonBar binding="#{docDownload.panelButtonBar1}" id="panelButtonBar1"
    rendered="false">
    This bean is in session. Now in page 1 on clicking a link i call method onload() in the same bean. This method based on the parameters I send executes another viewobject and then if(param.equalsIgnoreCase("Y"))
    panelButtonBar1.setRendered(false); ----****
    return "success";
    Its always giving me null pointerException at ****. Why. Do i need to get the context of page2. But the bean is in session.
    Thanks in advance

    Hi,
    Thanks for responding. Let me explain. I have jspx page1 which has a link calls a action method lying in a backing bean which in session scope. This bean also has getter setter methods for the components of the my jspx page2. In page 2 I have a set of buttons which is kept in a panelButtonBar which is initailly rendered true.
    On calling my action method I fetch a value from my viewobject which is either 'Y' or 'N'. Based on this I want to set the above paneButtonBar false.
    I understand now why it was null, because the components can only be accessed in request. So now what do i do. Do I put a partial trigger on the buttonbar and call back the bean to set it false.
    Thanks

  • Help me with this quiz

    I am developing a quiz game, He will get the questions to an xml, I would create a random, but this have  to select different answers without repeat.
    I need make a code  to tell me how many nodes have xml, and after I select a node at random and return me, but then this never happens again.
    someone help me?

    Harry tanks for your help,
    but still unable to resolve, soo in my first frame i have this code
    function onQuizData(success)
        var quizNode = this.firstChild;
        var quizTitleNode = quizNode.firstChild;
        title = quizTitleNode.firstChild.nodeValue;
        var i = 0;// o numero complexo i=0
        var itemsNode = quizNode.childNodes[1];
        while (itemsNode.childNodes[i])
            var itemNode = itemsNode.childNodes[i];
            var questionNode = itemNode.childNodes[0];
            quizItems[i] = new QuizItem(questionNode.firstChild.nodeValue);
            var a = 1;
            var answerNode = itemNode.childNodes[a++];
            while (answerNode)
                var isCorrectAnswer = false;
                if (answerNode.attributes.correct == "y")
                    isCorrectAnswer = true;
                } // end if
                quizItems[i].addAnswer(answerNode.firstChild.nodeValue, isCorrectAnswer);
                answerNode = itemNode.childNodes[a++];
            } // end while
            ++i;
        } // end while
        gotoAndPlay(_currentframe + 1);
    } // End of the function
    var quizItems = new Array();
    var myData = new XML();
    myData.ignoreWhite = true;
    myData.onLoad = onQuizData;
    myData.load("questionario/questionario.xml");
    stop ();
    -- 2º frame--
    this frame contain the variable to the frame where I have the quiz
    var valores = quizItems.length;
    var currentQuestionNumber = 1;
    var numOfQuestionsAnsweredCorrectly = 0;
    var numOfQuestionsAnsweredIncorrectly = 0;
    var d1 = 1;
    trace(valores);
    --3ºframe--
    this is the frame where i wont select the aleatory response without repeat
    if (numeracao < quizItems.length)
    var array:Array = new Array(quizItems.length);
    currentQuestionNumber = Math.round(Math.random() * valores);
    else if (numeracao > quizItems.length){
    gotoAndStop(22);
    trace(currentQuestionNumber);
    var currentQuizItem = quizItems[currentQuestionNumber - 1];
    var hasAnswered = false;
    question = currentQuizItem.getQuestion();
    var i = 1;
    while (i <= currentQuizItem.getNumOfAnswers())
        _root["answer" + i] = currentQuizItem.getAnswer(i - 1);
        _root["answer" + i + "textBox"]._visible = true;
        _root["answer" + i + "Button"]._visible = true;
        _root["answer" + i + "Mark"]._visible = true;
        ++i;
    } // end while
    while (i <= 4)
        _root["answer" + i + "textBox"]._visible = false;
        _root["answer" + i + "Button"]._visible = false;
        _root["answer" + i + "Mark"]._visible = false;
        ++i;
    } // end while
    stop ();

Maybe you are looking for