Only returns true

Hi all,
associated with a button is the following cod eon HTML page:
onClick="if(validateAddress(this.form)) displayResult(this.form);"
In validateAddress Is this code:
return=false;
In displayResult is:
     var outTable;
     var validateAddressretVal=validateAddress(form);
     if(validateAddressretVal){
          outTable="<p>TRUE</p>"
     else{
          outTable="<p>FALSE</p>"     
     document.writeln(outTable)     
     document.close()
with return set to false nothing happens. With return set to true the HTML page displays true. How do I correct this and how do I get the rest of the page to display with the result.
TIA
Mat

where is the java in your question ?

Similar Messages

  • InetAddress.isReachable() only returns true

    Hello,
    Im trying to use the InetAddress.isReachable() method to get the host reacheability, but it only returns true to all addresses, being available or not...... in sniffer all appear to be ok, i can see the icmp packets incoming and outgoing....
    Somene could help me? :D
    thanks...

    jverd, because the network address that im using in
    this test is not being used in my network, i can see
    it using ping tool from my desktop, and because the
    sniffer shows me that the ping is requested, but does
    not get response... ok?Okay, so this is a local address? Like a 192.168, or a 10. or 172.whatever? And you're certain there's no computer that has that address?
    Just because ping fails doesn't mean nothing's there. A host might be there and not answering ping. isReachable also tries a TCP connection on port 7.
    Try telnet the_supposedly_bad_address 7 and see if it responds. If so, then there's a host at that address, and isReachable is correct. If it doesn't, then it would seem to be a bug in isReachable (though I'm still not totally sure).

  • Exchange 2007 SP2: HasActiveSyncDevicePartnership Always Returns True

    I am currently work with a customer in an Exchange Server 2007 SP2 environment. A Powershell script that is used for gathering mobile device information begins with at the mailbox level and filters with
    HasActiveSyncDevicePartnership equal to true, as in -
    Get-casmailbox -Filter {HasActivesyncDevicePartnership -eq $true }
    We have discovered that it appears as though this flag is set to true for every mailbox account, despite the fact that only a few mailboxes have actual EAS partnerships with devices.
    My understanding was that this flag should only ever return true if there is an actual ActiveSync partnership. Is there something I am missing here? Can the flag be true even if there is no (or has never been) a partnership?
    Don Sorcinelli - Microsoft MVP, Mobile Devices

    Hi,
    Yes, the value of the " HasActiveSyncDevicePartnership " will be set to true if there is an actual ActiveSync partnership. Also you can use the following command to
    check the detail sync information such as device name,  last sync time:
    Get-ActivesyncDeviceStatistics -Mailbox [email protected]
    If no statistics information returns, The most probable cause 
    should be that someone set the HasActiveSyncDevicePartnership to true for all mailbox users accidently. Please run the following command to change them back:
    get-casmailbox |set-casmailbox -HasActivesyncDevicePartnership $false
    Then set the
    HasActiveSyncDevicePartnership to true for the users who have an actual ActiveSync partnership:
    Set-casmailbox –identity
    [email protected] -HasActivesyncDevicePartnership $true
    Gen Lin
    TechNet Subscriber Support
    in forum
    If you have any feedback on our support, please contact
    [email protected]
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Thanks
    Gen Lin-MSFT

  • Boolean User Properties always returns TRUE

    Hi, I am trying to get some propeties from the user on the AD and I found out with the following issue, all the boolean attributes always return TRUE as value. The Code that I am using to extract them is the following
    foreach ($objUser in $objUsers)
     $bolPasswordNeverExpires = [boolean] $objUser.Properties['PasswordNeverExpires'];
     $bolEnabled = [boolean] $objUser.Properties['Enabled'];
     $bolAccountExpired = [boolean] $objUser.Properties['AccountExpired'];
    Could you please guide me into the proper direction to solve it. I looked up in most of powershell related topic and did not find a way to solve it. I even attempt using UserAccountControl Attribute to check Enabled status do not matter agains which value
    I check it, it always returns TRUE.

    Thank´s for the tip. Unluckily when I attempt it, if I left only
    $objUsers.PasswordNeverExpires or $objUsers.Enabled, it only return whites spaces and no comparison from True or False is feasible.
    If I change it to [boolean] $objUsers.PasswordNeverExpires or $objUsers.Enabled instead of using the Properties option, it returns False for all values.
    I attempt to use the UserAccountControl field for look up the property Ex: (objUser.UserAccountControl AND 2) for Enabled and it also returns True for all situation
    I look up for the properties on the ISE interface and the only ones displayed are the following ones:
    distinguishedname
    displayname
    whencreated
    samaccountname
    sn
    accountexpires
    pwdlastset
    samaccounttype
    adspath
    useraccountcontrol
    whenchanged
    cn
    userprincipalname
    lastlogontimestamp
    msds-user-account-control-computed
    May it be an issue with the filter that does not load the specified properties?

  • 11g HS ODBC database link only returning one column

    Hi,
    We having a problem with a HS ODBC database link to a SQLServer database - only one column is being returned (when we do a simple 'select * from remote_table@SQLServer_dblink'). We recently set up another HS database link to a MySQL database and that's works okay, even though the init*.ora files have the same settings configured.
    Any ideas what might cause this?
    This is the trace file:
    Oracle Corporation --- FRIDAY OCT 28 2011 14:26:33.827
    Heterogeneous Agent Release
    11.2.0.2.0
    Oracle Corporation --- FRIDAY OCT 28 2011 14:26:33.827
    Version 11.2.0.2.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib/libodbc.so"
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using MySQL_CSSUser as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    hgocont, line 2754: calling SqlDriverConnect got sqlstate I

    The characterset on our Oracle DB is AL16UTF16, but we have already tried several language settings without success (see commented out sections in the *.ora file below) - but interestingly not a UTF16. Is that the problem, do you think?
    The collation on the SQLServer DB is 'SQL_Latin1_General_CP1_CI_AS', if that makes any difference. The db server is Linux (5.6), Oracle db is 11.0.2.0 and the SQLServer db is v.8.
    We don't get an error when using the dblink...it's just that only the last column is returned. If we explicitly select any other columns, we get the 'invalid identifier' error. It's the same with whatever table we dblink to...the columns are just standard chars and numerics, nothing large or custom, etc.
    I'll try and dig up the full trace file....
    HS_FDS_CONNECT_INFO=CSS_ST
    set ODBCINI=/etc/odbc.ini
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_SHAREABLE_NAME = /usr/lib/libodbc.so
    HS_FDS_SQLLEN_INTERPRETATION=32
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8MSWIN1252
    #HS_LANGUAGE=AMERICAN_AMERICA.UTF8
    set ODBCINSTINI=/etc/odbcinst.ini
    set LD_LIBRARY_PATH=/usr/local/easysoft/lib:/usr/local/easysoft/sqlserver/lib:/usr/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • API search will only return the first 200 results????

    It seems that I can only retrieve 200 results when using doOracleSimpleSearch api call.
        osr = oses.doOracleSimpleSearch(strSearch, 1, 1000, false, false, true);
        nCount = osr.docsReturned;
        nCount2 = osr.resultElements.Length;
        nCount3 = osr.estimatedHitCount;nCount and nCount2 are both 200.
    nCount3 is 1332
    Ok, no problem. Even though I asked for 1000 results, I figure it will only return 200 at a time, so I write a simple loop.
       while (nTotalResults < nCount3)
          osr = oses.doOracleSimpleSearch(strSearch, nTotalResults + 1, 200, false, false, true);
          nCount = osr.docsReturned;
          nTotalResults += nCount;
       }After executing the search the first time, nTotalResults is set to 200, so I'm now requesting that the search starts at index 201 and to return the next block of 200.
    osr.docsReturned is now = 0
    stuck in infinite loop because it's not returning all my results.
    Update:
    It seems this is not just an API issue. If I do the search through the web interface, and go to page 20 (it's displaying 10 results per page) I see results. But as soon as I go to page 21, the page is blank even though it says there are over 1000 results.
    Edited by: JimG on Feb 15, 2012 5:17 PM

    You need to change the "Maximum Number of Results" from the Admin GUI.
    Go to Global Settings -> Query Configuration, and you'll find it there.

  • Executing VO only returns 1 record

    Hi,
    I am using Jdev 11.1.1.4.0.
    I have a Read only VO and have a methond in AMImpl class that reads
    ViewObjectImpl componentLOV;
    componentLOV= getComponentsNameOnly();
    componentLOV.setNamedWhereClauseParam("bndComponentName", componentName);
    componentLOV.executeQuery();
    return componentLOV.getAllRowsInRange();This only returns 1 record althought there are more than 1 record.
    If I change the code to componentLOV = getUpdatableVO();, then it returns all the records that meets the condition.
    Any idea?
    Thanks
    Bones Jones
    Edited by: Bones Jones on Jul 13, 2011 10:53 AM
    Edited by: Bones Jones on Jul 13, 2011 10:54 AM

    plz paste the complete method. You need List if you want to work with multiple rows
    here what i copied from the docs
    public class AppModuleImpl extends ApplicationModuleImpl
    public List<ViewRowImpl> findProducts(String location)
    List<ViewRowImpl> result = new ArrayList<ViewRowImpl>();
    ViewObjectImpl vo = getProductsView1();
    vo.setNamedWhereClauseParam("TheLocation", location);
    vo.setForwardOnly(true);
    vo.executeQuery();
    while (vo.hasNext()) {
    result.add((ViewRowImpl)vo.next());
    return result;
    }

  • HasEventListener and willTrigger always return true

    Hi  everybody.
    I'm trying to achieve the following result.
    I'm listing all items in a form.
    When I encounter a button I check if it has already an event listener applied to it. If not , I apply the event Listener with addEventListener.
    In this way, the next time I'll list the whole form I won't apply the event listener another time (if for example I apply the same event listener twice to a button which insert a new record in a database as result I'll have 2 records added also if the user clicked once...no good at all!!!)
    To accomplish this task I'm using the Actionscript function hasEventListener(EventType) and here comes the weird thing.
    Eveytime I invoke hasEventListener on the form's button it always returns true event if is the first time a list the form (so no event listener applied yet) , even if before to invoke hasEventListener I run removeEventListener.
    I've got the same behavior when i use willTrigger() function, it always returns true no matter when i call it.
    One possible solution could be set a global boolean property to store if Ialready listed the form and applied the event listener to it, but it would be better using hasEventListener, because I've got a class that perform this form listing , and this class is used on wide project, so if I get to fix this problem inside the class I would fix the problem in the entire project in on shot (I love oop programming!!!!)
    Has anybody already addressed this problem?
    Any advisement would be really appreciated.
    Thanks in advance for the attention.
    Best regards!!
    Luke

    Hi, flex harUI.
    Thanks very much for your reply.
    I knew that if I apply an event listener twice it should fire up only once, but this isn't what happen.
    Here's my scenario:
    -  I've got a component with the form inside it
    - Through a menu a go to the state the component is in and I call an "init" function inside the component
    - In the init function I call the Class which activate the form by applying eventlistener on the button
    - The user can navigate away from the component by click another menu item and then return to the component invoking again the form activation (and so let my application apply once again the addEventListener)
    - Here's what happen: the second,third,... time the user return to the component, when he try - for example - to add a record, the record is added two,three... times according to how many times the users "reinitialized" the component. The same things happen when the user tries to delete a record, he is prompted two,three,.... times if he's sure to delete it.....
    It's a really strange behaviour.
    I've found i worked around, by setting a global bool var "initialized" and before call the form activation i check the value of this var, but It's not a very beautiful solution, 'cause I would prefer to fix this problem inside the class, so the fix the problem in the whole project just in one shot!!! (that's why I would like to use hasEventListener() to check if the button has already an eventListener)
    Thaks anyway for the reply!
    If I've some news I'll update ya.
    Bye!

  • CI - Powershell Boolean Rule Always Returns True

    I'm trying to create a configuration baseline / item for a particular piece of software using a powershell script of data type Boolean. However, I'm having the issue that the evaluation is always returning compliant whether the workstation is or not. The
    script is as follows:
    $ErrorActionPreference = "SilentlyContinue"
    $Condition1 = (Test-Path -LiteralPath 'HKLM:\SOFTWARE\Adobe\Premiere Pro')
    $Condition2 = (Test-Path -LiteralPath 'C:\Program Files\Adobe\Adobe Premiere Pro CS6\Presets\Textures\720_govt1_bar.png')
    if ($Condition1) {
    if ($Condition2) {echo $true}
    else {echo $false}
    else {echo $true}
    This script works perfectly fine when run locally and always returns $true or $false as expected. However it only ever returns Compliant when used in a CI. It doesn't matter what the state of the 2 conditions are, it always evaluates Compliant.
    Any ideas?

    I'm beginning to wonder if there is variation between how well this feature works on Windows 7 and Windows 8.1. I'm beginning to notice that it usually works well on 7 but I have constant hell with it on 8. The last thing I tried which seemed to work (assuming
    it was not just randomness) was accepting the default "Platform" settings of the CI/CB. Before I had chosen Windows 7 and 8.1 only and was never able to return any value except Compliant on 8. Accepting the all platforms default Finally
    allowed me to show a state of Non-Compliant on 8. This was using a powershell script of string data type as discussed previously.
    My latest torment is discovering how to force a true re-evaluation of an updated CI/CB. In my non-compliant Win8 example, I have added a remediation script to an existing Monitor-Only CI and configured it to remediate. In my Win 7 members of the collection,
    everything works successfully, the condition is remediated and the state reports Compliant but on the Win8, although the local Control Panel applet shows both the CB and CI to have new revisions and the evaluation shows it has run with a new date/time,
    the remediation script never runs and changes to Compliant.
    Any suggestions how I can force an updated CI/CB to really re-evaluate, not just report it has?

  • JTable Won't Allow Editing Despite isCellUpdatable is Set to Return True

    Mass apologies if I somehow sent this to the wrong forum by mistake. However, aid from the local Java gurus would be much appreciated since I'm the only Java programmer at this company, so I don't have anyone to really ask for advice or anything.
    I've been trying to enter an updatable ResultSet into a JTable for about a week now, but the issue I ended up running into was that if you click on a cell with the intention to edit the contents, it won't even highlight the cell, much less let you edit it.
    I've searched Google and this forum along with tried to hunt down more complex books on Java rather than your standard "So you want to learn Java" cookbooks, but I've come up with null. I've also created about five different variations of TableModels for the purposes of handling this, including one that used an array of Objects instead of the ResultSet, but the problem persists.
    Here is the latest version of the TableModel that I've come up with
    package EventCalGUI;
    import javax.swing.table.AbstractTableModel;
    import EventCalSQL.TableData;
    @SuppressWarnings("serial")
    public class UpdateRSModel extends AbstractTableModel
         /** <code>TableData</code> from database */
         private TableData data;
         public UpdateRSModel(TableData tdata)
              data = tdata;
         @Override
         public int getColumnCount()
              return data.getColCount();
         @Override
         public int getRowCount()
              return data.getRowCount();
         @Override
         public Object getValueAt(int row, int col)
              return data.getValue(row, col);
         @Override
         public boolean isCellEditable(int row, int col)
              return true;
         @SuppressWarnings("unchecked")
         @Override
         public Class getColumnClass(int col)
              return data.getColClass(col);
         @Override
         public String getColumnName(int col)
              return data.getHeader(col);
         @Override
         public void setValueAt(Object value, int row, int col)
              data.setValue(value, row, col);
    }The reason for suppressing the warnings is because Eclipse attempts to be too helpful with its cautions and I was sick of seeing a long list of unnecessary yellow caution signs.
    This is the TableData class that the above TableModel derives from. I hadn't added in the actual ResultSet updating capabilities until I was sure I could get the JTable to work.
    package EventCalSQL;
    import java.sql.*;
    public class TableData
         Object[][] data = null;
         String[] headers = null;
         int rows = 0;
         int cols = 0;
         @SuppressWarnings("unchecked")
         Class[] colclass = null;
         public TableData (ResultSet rs)
              try
                   ResultSetMetaData metadata = rs.getMetaData();
                   // -------------- SET COLUMN DATA ---------------
                   cols = metadata.getColumnCount();
                   headers = new String[cols];
                   colclass = new Class[cols];
                   String classname = "";
                   for (int b = 0; b < cols; b++)
                        headers[b] = metadata.getColumnName(b + 1);
                        classname = metadata.getColumnClassName(b + 1);
                        colclass[b] = Class.forName(classname);
                   // ------------ SET ROW DATA --------------
                   if (rs.last())
                        rows = rs.getRow();
                        rs.beforeFirst();
                   if (rows != 0)
                        data = new Object[rows][cols];
                        for (int i = 0; i < rows; i++)
                             rs.absolute(i + 1);
                             for (int a = 0; a < cols; a++)
                                  data[i][a] = rs.getObject(a + 1);
              catch (SQLException sql)
                   // I'M UNINTERESTING!
              catch (ClassNotFoundException cnf)
                   // BE BORED!
              catch (NullPointerException np)
                   // I'M BORING!
         public Object getValue(int row, int col)
              return data[row][col];
         public String getHeader(int col)
              return headers[col];
         public void setValue(Object value, int row, int col)
              data[row][col] = value;
         public int getRowCount()
              return rows;
         public int getColCount()
              return cols;
         @SuppressWarnings("unchecked")
         public Class getColClass(int col)
              return colclass[col];
    }I've checked the exceptions, and they work. I just added into the comments since nothing's really supposed to happen there if it's an empty set. I just have a weird sense of humor after twenty-plus hours of coding variations of the same thing over and over.
    Thank you very much for any and all help ahead of time!

    Hidralisk: Thank you for the suggestion, but that's not the problem I'm running into. I really appreciate you trying to help though.
    camickr: I'll double-check my code to see where I might've unintentionally strayed from your suggestion. I deeply appreciate the help.
    Edited by: wsizemore on Dec 6, 2007 6:51 AM
    Haven't had the time to double-check my code since I've been re-assigned to other projects (the joys of being the solo Java programmer here), but I awarded you the points, camickr, since your suggestion seems to be the one that could've put me on the right track. Thanks so much for your help.

  • Return what ? IS IF UPDATE (Column_name) parameter in a trigger definition will return TRUE ?

    The IF UPDATE (Column_name) parameter in a trigger definition will return TRUE in case of an INSERT statement being executed on the triggered table: 
    Which option is correct ?
    a. YES
    b. NO
    c. It returns TRUE only if an UPDATE query is executed
    d. Both b and c

    See MSDN: UPDATE() (Transact-SQL)
    "Returns a Boolean value that indicates whether an INSERT or UPDATE
    attempt was made on a specified column .."
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • DCDataControl.isTransactionDirty() return true incorrectly

    Hi,
    My page is based on EO based VO and there is a view criteria build on the VO which become a search panel in the page.
    When user first come to the page, unless they perform a search, there is no result display in the page. And after user search, they can start modify the record in the down table. In the bean, I use DCDataControl.isTransactionDirty() to see whether there is pending changes in the page.
    However, after page load, before perform any search and modification, DCDataControl.isTransactionDirty() already return me True, which is wrong.
    Below code return true:
    BindingContext.getCurrent().findDataControl("PullSequenceSetupAMDataControl").isTransactionDirty();
    While below code return false:
    BindingContext.getCurrent().getDefaultDataControl().getApplicationModule().getTransaction().isDirty();
    I cannot rely on the AM.getTransaction().isDirty() because I have transient attribute on my page, when user change those, I want to consider it as pending changes as well so I have to use the first one, but somehow it return me weird result.
    However, I have no idea, why isTransactionDirty() return my True (dirty) even there is no records shows up on my page? Right now, I have to either issue a "commit"/"rollback" from my page, then isTransactionDirty() return my false (clean).
    So please do let me know in what condition, DCDataControl.isTransactionDirty() is consider as Dirty??
    Some point that I suspect that making this issue happen is:
    My VO contains a required bind variable which need user input at run time. So actually after page load, there will be a popup promt for user to enter the value for this bind variable. Seems like after this, transaction start becoming dirty. Please let me know whether this flow will impact how DCDataControl.isTransactionDirty() is working
    I am using Jdev 11.1.1.3.0
    Thanks.

    Hi, Thanks for your reply. However, it is not what i am asking, my scenario is:
    I have one jspx page which include mutiple tabs(Panel Tab), each tab actually has its own taskflow and its own jsff page. And each tab has its own data control also.
    However, we only want to check pending changes for one tab only. And that is why instead of using DataControlFrame.isTransactionDirty(), i am using below code to get the specific data control that used in the tab that want to check pending changes :
    BindingContext.getCurrent().findDataControl("PullSequenceSetupAMDataControl").isTransactionDirty()
    However, I don't have any action on this tab yet, some action on other tab somehow make all the data controls in every tab dirty. And that is why causing the trouble. And when click the cancel button on my tab(which is rollback icon I drag and drop to the page from my data control), it did reset all the data controls of all the tab back to clean.
    My questions is more like:
    Why does other tab that is not using my data control can make my data control dirty? Does datacontrol.isTransactionDirty() will be impacted by other datacontrol in the same DataControlFrame?
    Is there any setup I need to change so that only action on my taskflow or my tab will change my datacontrol's transaction dirty property?
    Also is there any document clearly documented that how datacontrol 's transactiondirty property is maintained?
    thanks.
    Pei

  • Checking an Array with a form input field to return true or false?

    I have an array that when dumped, lists dates for all days of the month. There is a form, where the user specifies the date and when submitted, transfers to a processing.cfm file which is where i want the <cfif> to check if the date specified in form exists in the array (this way, it only limits the user of only being able to select a date from this month for an event). Is it possible to have a cfif where it will check whether or not the array contains the date the user has specified and the return true (if contains the date specified), and transfers the form to email.cfm (where it will email all the form inputs) or will return false (if outside that range) then return back to the eventform.cfm?

    Nevermind. Figured it out.
    Heres my code if it will help anyone:
    <!---CFSET's--->
                    <cfset theDate = Now()>
                    <cfset NextMonth = DateAdd('m', 1, theDate) />
                    <cfset nextMonthNum = daysInMonth(#NextMonth#) />
                    <cfset weekNum = (#weekOfMonth(now())#) />
                    <cfset daysNum = daysInMonth(now()) />
                    <cfset dateToday = Now()>
                    <cfscript>
                                                      function weekOfMonth(thisDate) {
                                                                var thisDay=day(thisDate);
                                                                var thisWeek=0;
                                                                if (thisDay LTE 7)
                                                                thisWeek=1;
                                                                else if (thisDay GT 7 AND thisDay LTE 14)
                                                                thisWeek=2;
                                                                else if (thisDay GT 14 AND thisDay LTE 21)
                                                                thisWeek=3;
                                                                else
                                                                thisWeek=4;
                                                                return thisWeek;
                                            </cfscript>
                    <cfset datearray = ArrayNew(1)>
                    <cfif #DatePart('w', TheDate)# GTE 2 AND #weekNum# GTE 3>
                        <cfloop index="x" from="1" to="#daysNum#">
                                      <cfset datearray[x] = "#DateFormat(now(), "mm")#/#x#/#DateFormat(now(), "yy")#" />
                                <cfset recordnumber = #x#>
                                                      </cfloop>
                        <cfloop index="y" from="1" to="#nextMonthNum#">
                                  <cfset potato = #y# + #recordnumber# >
                                      <cfset datearray[potato] = "#DateFormat(NextMonth, "mm")#/#y#/#DateFormat(NextMonth, "yy")#" >
                        </cfloop>
                                  <cfelse>
                                  <cfloop index="z" from="1" to="#daysNum#">
                                <cfset datearray[z] = "#DateFormat(now(), "mm")#/#z#/#DateFormat(now(), "yy")#">
                                  </cfloop>
                            </cfif>
                    <cfif #arrayContains( datearray, "#form.activitydate#" )#>
                              <cflocation url="monkey.cfm">
                                  <cfelse>
                                      <cfset datetrue = "no">
                                <script>
                                                                                    alert("Date Not Valid. Please Specify Event Date Within Valid Range.<br>(Allow a couple seconds to refresh)")
                                                                                    history.go(-1)
                                                                          </script>
                    </cfif>

  • How can I search a file system and only return newer files?

    Sorry the title didn't give me much room to work with. I'm writing a tool which needs to track all the files in an OS. What I'd like to do is make it so my program will only return files that have been modified/created since the last search to add to my program. I was wondering if there's an efficient way to do this other than checking each file's timestamps? Also is there a way to tell from a parent directory whether any files in its directory have been modified/created? I'm looking for ways for Windows and Linux.

    I have no problem checking timestamps but it can be rather time consuming doing this. I don't know if this is quicker but I'd like to sort by modified date and check the time stamps for newer timestamps than the last time I ran. This way if I hit a time stamp equal to my last run I know to stop there. I checked Windows and the folder does tell you whether any file was created/modified in it's directory. However, if a file is created in one of its children's directories it won't update the time stamp. It's unfortunate because I could've avoided the search at a higher level directory otherwise. Without this I'll have to walk the whole structure one way or another. I can still improve the speed but I can't make it as efficient as I'd like.

  • Problem with return true and if statement

    I'm making a
    ship shooter
    game and I have a problem with the collision detection for the
    corners of the stage. When you hold down two of the arrows to move
    the ship into the corners of the screen, the ship will go past it.
    The function bellow is what I'm using to detect this collision. The
    reason I'm using a function is because it's used for the ship and
    for all the balls from the cannons (as shown in the last two lines
    of the attached code). This is the reason I need the return true,
    so the if statement can be evaluated to true and then unload the
    movieclip of the cannon ball. When I remove the return true, the
    collision works fine, but obviously my cannon balls all get stuck
    on the edges.
    Any ideas?

    Well the function is called every frame, for the ship and for
    every cannon ball that's on the screen. So it could be called about
    4 times or so per frame. The problem is that ship goes through the
    corners of the stage (btw, the green background is the stage area)
    when you go in a diagonal direction.
    Just curious...what's the unnecessary code you're talking
    about?

Maybe you are looking for

  • How to read data

    Hi experts, I have created a interactive form - Layout Type ZCI. The form is to be called from a Web dynpro abap application. The form contains a table UI with certain data. The table is bound to a node but doesn't contain all attributes of the node.

  • Changing keyboard modifier keys

    I use an editor (EMACS) which makes major use of the 'ctrl' key so I swap it with the 'caps lock' key so my little finger can hit it without getting a cramp. It works just fine about 90% of the time but the other 10%, when I hit the 'caps lock' key i

  • Please help me I can not reset my security question

    I need help I can not reset my security questions because my recovery email is not working and I don't know the security answers how do I change the recovery email?

  • NO ONE can hear me on my bluetooth

    so i got the tour... so excited.  and now NO ONE can hear me when i had my bluetooth in.  i called verizon they said i can come into the store and get a new phone cuz i'm within the 30 days.  has anyone been able to fix this or have gotten new phones

  • "Accept" apps in Mac appstore

    I just reformatted my hard drive (too much clutter and chaos, saved the important stuff to an external first) and when i go into the app store to reinstall iphoto it shows this..  when i click "accept" and put in my apple ID and password, nothing hap